Mesa (main): dzn: Fix {back,front}_wr_uses_ref assignment

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 29 20:05:20 UTC 2022


Module: Mesa
Branch: main
Commit: 804da0806d3ac127cf607588a25ca2b8d73fdf09
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=804da0806d3ac127cf607588a25ca2b8d73fdf09

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Tue Jun 28 14:51:23 2022 +0200

dzn: Fix {back,front}_wr_uses_ref assignment

We're lacking parens, as reported by clang.

Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17250>

---

 src/microsoft/vulkan/dzn_pipeline.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/microsoft/vulkan/dzn_pipeline.c b/src/microsoft/vulkan/dzn_pipeline.c
index 03388d1d5c3..1e325750bff 100644
--- a/src/microsoft/vulkan/dzn_pipeline.c
+++ b/src/microsoft/vulkan/dzn_pipeline.c
@@ -1257,24 +1257,24 @@ translate_stencil_test(struct dzn_graphics_pipeline *pipeline,
 
    bool back_wr_uses_ref =
       !(in->pRasterizationState->cullMode & VK_CULL_MODE_BACK_BIT) &&
-      (in_zsa->back.compareOp != VK_COMPARE_OP_ALWAYS &&
-       in_zsa->back.failOp == VK_STENCIL_OP_REPLACE) ||
-      (in_zsa->back.compareOp != VK_COMPARE_OP_NEVER &&
-       (!in_zsa->depthTestEnable || in_zsa->depthCompareOp != VK_COMPARE_OP_NEVER) &&
-       in_zsa->back.passOp == VK_STENCIL_OP_REPLACE) ||
-      (in_zsa->depthTestEnable &&
-       in_zsa->depthCompareOp != VK_COMPARE_OP_ALWAYS &&
-       in_zsa->back.depthFailOp == VK_STENCIL_OP_REPLACE);
+      ((in_zsa->back.compareOp != VK_COMPARE_OP_ALWAYS &&
+        in_zsa->back.failOp == VK_STENCIL_OP_REPLACE) ||
+       (in_zsa->back.compareOp != VK_COMPARE_OP_NEVER &&
+        (!in_zsa->depthTestEnable || in_zsa->depthCompareOp != VK_COMPARE_OP_NEVER) &&
+        in_zsa->back.passOp == VK_STENCIL_OP_REPLACE) ||
+       (in_zsa->depthTestEnable &&
+        in_zsa->depthCompareOp != VK_COMPARE_OP_ALWAYS &&
+        in_zsa->back.depthFailOp == VK_STENCIL_OP_REPLACE));
    bool front_wr_uses_ref =
       !(in->pRasterizationState->cullMode & VK_CULL_MODE_FRONT_BIT) &&
-      (in_zsa->front.compareOp != VK_COMPARE_OP_ALWAYS &&
-       in_zsa->front.failOp == VK_STENCIL_OP_REPLACE) ||
-      (in_zsa->front.compareOp != VK_COMPARE_OP_NEVER &&
-       (!in_zsa->depthTestEnable || in_zsa->depthCompareOp != VK_COMPARE_OP_NEVER) &&
-       in_zsa->front.passOp == VK_STENCIL_OP_REPLACE) ||
-      (in_zsa->depthTestEnable &&
-       in_zsa->depthCompareOp != VK_COMPARE_OP_ALWAYS &&
-       in_zsa->front.depthFailOp == VK_STENCIL_OP_REPLACE);
+      ((in_zsa->front.compareOp != VK_COMPARE_OP_ALWAYS &&
+        in_zsa->front.failOp == VK_STENCIL_OP_REPLACE) ||
+       (in_zsa->front.compareOp != VK_COMPARE_OP_NEVER &&
+        (!in_zsa->depthTestEnable || in_zsa->depthCompareOp != VK_COMPARE_OP_NEVER) &&
+        in_zsa->front.passOp == VK_STENCIL_OP_REPLACE) ||
+       (in_zsa->depthTestEnable &&
+        in_zsa->depthCompareOp != VK_COMPARE_OP_ALWAYS &&
+        in_zsa->front.depthFailOp == VK_STENCIL_OP_REPLACE));
 
    pipeline->zsa.stencil_test.front.write_mask =
       (pipeline->zsa.stencil_test.dynamic_write_mask ||



More information about the mesa-commit mailing list