diff options
author | Dave Airlie <[email protected]> | 2019-04-03 12:20:40 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-04-03 13:59:06 +1000 |
commit | 11e1fa11d6e2f72d68d19711cce06153640b4d0c (patch) | |
tree | 7060c24a93b9def2475222893b5ab9c8ecbbdad2 | |
parent | eb8fefe0904909729bac37c32e738223653cbb58 (diff) |
intel/compiler: use defined size for vector components
If we increase vector sizing later it would be nice to avoid
tripped over this again.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
-rw-r--r-- | src/intel/compiler/brw_nir_lower_mem_access_bit_sizes.c | 2 |
1 files changed, 1 insertions, 1 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 0396f5ffcc0..0705c4efd82 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 @@ -85,7 +85,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); - nir_ssa_def *result[4] = { NULL, }; + nir_ssa_def *result[NIR_MAX_VEC_COMPONENTS] = { NULL, }; nir_src *offset_src = nir_get_io_offset_src(intrin); if (bit_size < 32 && nir_src_is_const(*offset_src)) { |