diff options
author | Jason Ekstrand <[email protected]> | 2019-07-15 17:14:26 -0500 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2019-07-17 08:12:37 +0000 |
commit | 3a27a5b98937bd11b19c5d848120236d8d84ff75 (patch) | |
tree | 8fb469b2c10e9b09bd1ce6b69dfd9528adfd29af | |
parent | 43682f0c6f4384ec9d8dbeedfd5eaef769141ace (diff) |
anv: Account for dynamic stencil write disables in the PMA fix
In 6ce8592836b8 we started looking at the dynamic stencil state and
disabling stencil writes when the stencil mask is zero. Unfortunately,
we never updated the PMA fix code accordingly so 3DSTATE_WM_DEPTH_STENCIL
and the PMA fix were getting out-of-sync causing hangs.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109203
Fixes: 6ce8592836 "anv: Disable stencil writes when both write..."
Reviewed-by: Lionel Landwerlin <[email protected]>
(cherry picked from commit 6a441151c245d7b59b84502257a0ff1a300b8633)
-rw-r--r-- | src/intel/vulkan/gen8_cmd_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/intel/vulkan/gen8_cmd_buffer.c b/src/intel/vulkan/gen8_cmd_buffer.c index 2e6d9de9f4a..762cc373cb6 100644 --- a/src/intel/vulkan/gen8_cmd_buffer.c +++ b/src/intel/vulkan/gen8_cmd_buffer.c @@ -355,6 +355,8 @@ want_stencil_pma_fix(struct anv_cmd_buffer *cmd_buffer) */ const bool stc_write_en = (ds_iview->image->aspects & VK_IMAGE_ASPECT_STENCIL_BIT) && + (cmd_buffer->state.gfx.dynamic.stencil_write_mask.front || + cmd_buffer->state.gfx.dynamic.stencil_write_mask.back) && pipeline->writes_stencil; /* STC_TEST_EN && 3DSTATE_PS_EXTRA::PixelShaderComputesStencil */ |