Skip to content
Commit 8afef6d5 authored by Alex Smith's avatar Alex Smith Committed by Juan A. Suarez Romero
Browse files

anv: Fix sanitization of stencil state when the depth test is disabled



When depth testing is disabled, we shouldn't pay attention to the
specified depthCompareOp, and just treat it as always passing. Before,
if the depth test is disabled, but depthCompareOp is VK_COMPARE_OP_NEVER
(e.g. from the app having zero-initialized the structure), then
sanitize_stencil_face() would have incorrectly changed passOp to
VK_STENCIL_OP_KEEP.

v2: Roll the depthTestEnable check into the ds_aspect check below since
    they now both do the same thing.

Fixes: 028e1137 "anv/pipeline: Be smarter about depth/stencil state"
Signed-off-by: default avatarAlex Smith <asmith@feralinteractive.com>
Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 3bd239f7)
parent 957c148a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment