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>
This commit is contained in:
Jason Ekstrand
2016-12-07 20:31:12 -08:00
parent 114c281e70
commit 6ce8592836
4 changed files with 17 additions and 2 deletions

View File

@@ -1471,6 +1471,7 @@ struct anv_pipeline {
uint32_t cs_right_mask;
bool writes_stencil;
bool depth_clamp_enable;
struct {