Mesa (master): blorp: Fix alignment test for HIZ_CCS_WT fast-clears

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 10 22:13:59 UTC 2020


Module: Mesa
Branch: master
Commit: 1eff389bd3ee17c340d9047051f559f0ac4e44b5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1eff389bd3ee17c340d9047051f559f0ac4e44b5

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Tue Sep  8 07:33:59 2020 -0700

blorp: Fix alignment test for HIZ_CCS_WT fast-clears

Remove the extra logical ORs in the ternary operation.

Fixes: 5425fcf2cb3 ("intel/blorp: Satisfy HIZ_CCS fast-clear alignments")
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6650>

---

 src/intel/blorp/blorp_clear.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c
index e79f602261e..7c7796d0b12 100644
--- a/src/intel/blorp/blorp_clear.c
+++ b/src/intel/blorp/blorp_clear.c
@@ -832,8 +832,8 @@ blorp_can_hiz_clear_depth(const struct gen_device_info *devinfo,
       const uint32_t haligned_x1 = ALIGN(x1, surf->image_alignment_el.w);
       const uint32_t valigned_y1 = ALIGN(y1, surf->image_alignment_el.h);
       const bool unaligned = (slice_x0 + x0) % 16 || (slice_y0 + y0) % 8 ||
-                             max_x1_y1 ? haligned_x1 % 16 || valigned_y1 % 8 :
-                             x1 % 16 || y1 % 8;
+                             (max_x1_y1 ? haligned_x1 % 16 || valigned_y1 % 8 :
+                              x1 % 16 || y1 % 8);
       const bool alignment_used = surf->levels > 1 ||
                                   surf->logical_level0_px.depth > 1 ||
                                   surf->logical_level0_px.array_len > 1;



More information about the mesa-commit mailing list