summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2017-01-11 19:55:33 -0800
committerJason Ekstrand <[email protected]>2018-06-28 13:19:38 -0700
commitbcbc7d3a1756af9f3135f53c89be253732c9e39c (patch)
tree53b371bbf73ae05fd1b3c11c7ac3497e28e995fa /src/intel
parent7144247c2c349e7013ec33cfb46eb3e84b63007a (diff)
intel/fs: Fix nir_intrinsic_load_helper_invocation for SIMD32.
Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/compiler/brw_fs_nir.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index b881975905e..1e842748e4f 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -185,11 +185,15 @@ emit_system_values_block(nir_block *block, fs_visitor *v)
* masks for 2 and 3) in SIMD16.
*/
fs_reg shifted = abld.vgrf(BRW_REGISTER_TYPE_UW, 1);
- abld.SHR(shifted,
- stride(byte_offset(retype(brw_vec1_grf(1, 0),
- BRW_REGISTER_TYPE_UB), 28),
- 1, 8, 0),
- brw_imm_v(0x76543210));
+
+ for (unsigned i = 0; i < DIV_ROUND_UP(v->dispatch_width, 16); i++) {
+ const fs_builder hbld = abld.group(MIN2(16, v->dispatch_width), i);
+ hbld.SHR(offset(shifted, hbld, i),
+ stride(retype(brw_vec1_grf(1 + i, 7),
+ BRW_REGISTER_TYPE_UB),
+ 1, 8, 0),
+ brw_imm_v(0x76543210));
+ }
/* A set bit in the pixel mask means the channel is enabled, but
* that is the opposite of gl_HelperInvocation so we need to invert