anv: Fix sanitization of stencil state when the depth test is disabled
authorAlex Smith <asmith@feralinteractive.com>
Thu, 25 Oct 2018 09:50:52 +0000 (10:50 +0100)
committerAlex Smith <asmith@feralinteractive.com>
Fri, 26 Oct 2018 09:25:40 +0000 (10:25 +0100)
commit3bd239f71dc9365025c879c3a658493a6ca3504f
tree081ea577442e44e9b405a7631138649f14887ce7
parent79bbdf8e45f0961b800279afadb4bb74129d7034
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: 028e1137e6 "anv/pipeline: Be smarter about depth/stencil state"
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/genX_pipeline.c