summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2020-09-25 16:29:23 -0500
committerMarge Bot <eric+marge@anholt.net>2020-10-02 07:30:49 +0000
commit57e7c5f05eb15adf8e4d51a7536d8267e9ff0d2d (patch)
tree65e174ffa0b75f8296b5e96e0aaf616073644b25
parentf6667cb0ce828a8e4bc57e182ab1526fdd7a5e35 (diff)
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 <pendingchaos02@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
-rw-r--r--src/compiler/nir/nir_opt_load_store_vectorize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_opt_load_store_vectorize.c b/src/compiler/nir/nir_opt_load_store_vectorize.c
index 51405fa1bc3..d28419c1005 100644
--- a/src/compiler/nir/nir_opt_load_store_vectorize.c
+++ b/src/compiler/nir/nir_opt_load_store_vectorize.c
@@ -683,11 +683,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;
}