Fixes: 0a179bb6e26b ("st/mesa: Generate NIR for ATI_fragment_shader instead of TGSI.")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19689>
result = emit_dstmod(t, result, inst->DstReg[optype].dstMod);
/* Do the writemask */
- nir_const_value wrmask[4] = { 0 };
+ nir_const_value wrmask[4];
for (int i = 0; i < 4; i++) {
- if (inst->DstReg[optype].dstMask & (1 << i))
- wrmask[i].b = 1;
+ bool bit = inst->DstReg[optype].dstMask & (1 << i);
+ wrmask[i] = nir_const_value_for_bool(bit, 1);
}
t->temps[dstreg] = nir_bcsel(t->b,