Mesa (master): intel/nir: Lower things with > 4 components in lower_mem_access_bit_sizes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 31 17:09:40 UTC 2020


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

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Aug 27 17:55:04 2020 -0500

intel/nir: Lower things with > 4 components in lower_mem_access_bit_sizes

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6502>

---

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

diff --git a/src/intel/compiler/brw_nir_lower_mem_access_bit_sizes.c b/src/intel/compiler/brw_nir_lower_mem_access_bit_sizes.c
index c26ea0bb778..4ea20fe5b18 100644
--- a/src/intel/compiler/brw_nir_lower_mem_access_bit_sizes.c
+++ b/src/intel/compiler/brw_nir_lower_mem_access_bit_sizes.c
@@ -86,7 +86,7 @@ lower_mem_load_bit_size(nir_builder *b, nir_intrinsic_instr *intrin,
    const unsigned bytes_read = num_components * (bit_size / 8);
    const unsigned align = nir_intrinsic_align(intrin);
 
-   if (bit_size == 32 && align >= 32 &&
+   if (bit_size == 32 && align >= 32 && intrin->num_components <= 4 &&
        (!needs_scalar || intrin->num_components == 1))
       return false;
 
@@ -169,7 +169,7 @@ lower_mem_store_bit_size(nir_builder *b, nir_intrinsic_instr *intrin,
    assert(writemask < (1 << num_components));
 
    if ((value->bit_size <= 32 && num_components == 1) ||
-       (value->bit_size == 32 && align >= 32 &&
+       (value->bit_size == 32 && num_components <= 4 && align >= 32 &&
         writemask == (1 << num_components) - 1 &&
         !needs_scalar))
       return false;



More information about the mesa-commit mailing list