turnip: Fix the "written stencil is unmodified" check.

We want to know if anything writes stencil, not if all of them do.

Fixes: b2a60c157e ("turnip: add LRZ early-z support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18691>
(cherry picked from commit b9f9bfa556)
This commit is contained in:
Emma Anholt
2022-09-19 15:11:24 -07:00
committed by Dylan Baker
parent ae4bc6fe1e
commit ee4b192b19
2 changed files with 5 additions and 5 deletions

View File

@@ -2551,7 +2551,7 @@
"description": "turnip: Fix the \"written stencil is unmodified\" check.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "b2a60c157e4d6cc62c55d8fe8777f7cbd548a722"
},

View File

@@ -4273,13 +4273,13 @@ tu6_writes_stencil(struct tu_cmd_buffer *cmd)
(cmd->state.rb_stencil_cntl & A6XX_RB_STENCIL_CONTROL_ZFAIL_BF__MASK) >> A6XX_RB_STENCIL_CONTROL_ZFAIL_BF__SHIFT;
bool stencil_front_op_writes =
front_pass_op != VK_STENCIL_OP_KEEP &&
front_fail_op != VK_STENCIL_OP_KEEP &&
front_pass_op != VK_STENCIL_OP_KEEP ||
front_fail_op != VK_STENCIL_OP_KEEP ||
front_depth_fail_op != VK_STENCIL_OP_KEEP;
bool stencil_back_op_writes =
back_pass_op != VK_STENCIL_OP_KEEP &&
back_fail_op != VK_STENCIL_OP_KEEP &&
back_pass_op != VK_STENCIL_OP_KEEP ||
back_fail_op != VK_STENCIL_OP_KEEP ||
back_depth_fail_op != VK_STENCIL_OP_KEEP;
return stencil_test_enable &&