summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2017-06-30 15:11:15 -0700
committerMatt Turner <[email protected]>2017-07-20 16:56:50 -0700
commit069bf7c9078a1b03414a6ace4bbff887e212ab90 (patch)
tree4593f69841c75237ea5c88d92637cebe8ca1909b
parent1038d385a9b5817132d16f9f5877743d0bb8cca0 (diff)
i965/fs: Match destination type to size for ballot
No use in taking a 64-bit value when we know the high 32-bits are zero.
-rw-r--r--src/intel/compiler/brw_compiler.c2
-rw-r--r--src/intel/compiler/brw_fs_nir.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_compiler.c b/src/intel/compiler/brw_compiler.c
index e86ab0fc687..27fea4c8a00 100644
--- a/src/intel/compiler/brw_compiler.c
+++ b/src/intel/compiler/brw_compiler.c
@@ -58,7 +58,7 @@ static const struct nir_shader_compiler_options scalar_nir_options = {
.lower_unpack_unorm_2x16 = true,
.lower_unpack_unorm_4x8 = true,
.lower_subgroup_masks = true,
- .max_subgroup_size = 64, /* FIXME */
+ .max_subgroup_size = 32,
.max_unroll_iterations = 32,
};
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index 74f90dabeac..d760946e624 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -4189,7 +4189,11 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
bld.exec_all().MOV(flag, brw_imm_ud(0u));
bld.CMP(bld.null_reg_ud(), value, brw_imm_ud(0u), BRW_CONDITIONAL_NZ);
- dest.type = BRW_REGISTER_TYPE_UQ;
+ if (instr->dest.ssa.bit_size > 32) {
+ dest.type = BRW_REGISTER_TYPE_UQ;
+ } else {
+ dest.type = BRW_REGISTER_TYPE_UD;
+ }
bld.MOV(dest, flag);
break;
}