diff options
-rw-r--r-- | src/intel/compiler/brw_vec4_nir.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp index 6301c951144..c357ee2271b 100644 --- a/src/intel/compiler/brw_vec4_nir.cpp +++ b/src/intel/compiler/brw_vec4_nir.cpp @@ -963,7 +963,7 @@ try_immediate_source(const nir_alu_instr *instr, src_reg *op, case BRW_REGISTER_TYPE_D: case BRW_REGISTER_TYPE_UD: { int first_comp = -1; - int d; + int d = 0; for (unsigned i = 0; i < NIR_MAX_VEC_COMPONENTS; i++) { if (nir_alu_instr_channel_used(instr, idx, i)) { @@ -978,6 +978,8 @@ try_immediate_source(const nir_alu_instr *instr, src_reg *op, } } + assert(first_comp >= 0); + if (op[idx].abs) d = MAX2(-d, d); |