anv: Disable stencil writes when both write masks are zero
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 8 Dec 2016 04:31:12 +0000 (20:31 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 14 Feb 2017 22:18:55 +0000 (14:18 -0800)
commit6ce8592836b84f12bfe60de9f7913bfab11b8ef5
treecc9155ff76eadf2be61b05731363762bff3ea952
parent114c281e707919a1420d3a20219ce4392d8b360d
anv: Disable stencil writes when both write masks are zero

Vulkan doesn't have a stencilWriteEnable bit like it does for depth.
Instead, you have a stencil mask.  Since the stencil mask is handled as
dynamic state, we have to handle it later during command buffer
construction.  This, combined with a later commit, seems to help Dota2
on my Broadwell GT3e desktop by a couple percent because it allows the
hardware to move the depth and stencil writes to early in more cases.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/intel/vulkan/anv_private.h
src/intel/vulkan/gen7_cmd_buffer.c
src/intel/vulkan/gen8_cmd_buffer.c
src/intel/vulkan/genX_pipeline.c