Module: Mesa
Branch: staging/20.2
Commit: 285d4d07879cc3d69c737d0f4125d5aa7cb12a0e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=285d4d07879cc3d69c737d0f4125d5aa7cb12a0e

Author: Jason Ekstrand <[email protected]>
Date:   Fri Sep 25 16:29:23 2020 -0500

nir/opt_load_store_vectorize: Use bit sizes when checking mask compatibility

Without this, it was checking bit size compatibility with bit sizes such
as 96 which is clearly invalid.

No shader-db changes on Ice Lake

Fixes: ce9205c03bd20d "nir: add a load/store vectorization pass"
Reviewed-by: Rhys Perry <[email protected]>
Reviewed-by: Jesse Natalie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
(cherry picked from commit 57e7c5f05eb15adf8e4d51a7536d8267e9ff0d2d)

---

 .pick_status.json                               | 2 +-
 src/compiler/nir/nir_opt_load_store_vectorize.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 572642751a1..d86b1d965cd 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -598,7 +598,7 @@
         "description": "nir/opt_load_store_vectorize: Use bit sizes when 
checking mask compatibility",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "ce9205c03bd20d26af23ca891e97a9f848a612d1"
     },
diff --git a/src/compiler/nir/nir_opt_load_store_vectorize.c 
b/src/compiler/nir/nir_opt_load_store_vectorize.c
index cf9626ff21d..9e1be94aa63 100644
--- a/src/compiler/nir/nir_opt_load_store_vectorize.c
+++ b/src/compiler/nir/nir_opt_load_store_vectorize.c
@@ -709,11 +709,11 @@ new_bitsize_acceptable(struct vectorize_ctx *ctx, 
unsigned new_bit_size,
          return false;
 
       unsigned write_mask = nir_intrinsic_write_mask(low->intrin);
-      if (!writemask_representable(write_mask, low_size, new_bit_size))
+      if (!writemask_representable(write_mask, get_bit_size(low), 
new_bit_size))
          return false;
 
       write_mask = nir_intrinsic_write_mask(high->intrin);
-      if (!writemask_representable(write_mask, high_size, new_bit_size))
+      if (!writemask_representable(write_mask, get_bit_size(high), 
new_bit_size))
          return false;
    }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to