mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
st/glsl_to_tgsi: use correct writemask when converting generic intrinsics
This fixes a bug when lowering ballotARB: previously, using writemask 0xf, emit_asm would create TGSI_OPCODE_BALLOT instructions that span two registers to cover 4 64-bit channels. This could trample over other a neighbouring temporary. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101360 Cc: 17.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
25e5534734
commit
b28938ffce
1 changed files with 2 additions and 0 deletions
|
|
@ -3978,6 +3978,8 @@ glsl_to_tgsi_visitor::visit_generic_intrinsic(ir_call *ir, unsigned op)
|
|||
ir->return_deref->accept(this);
|
||||
st_dst_reg dst = st_dst_reg(this->result);
|
||||
|
||||
dst.writemask = u_bit_consecutive(0, ir->return_deref->var->type->vector_elements);
|
||||
|
||||
st_src_reg src[4] = { undef_src, undef_src, undef_src, undef_src };
|
||||
unsigned num_src = 0;
|
||||
foreach_in_list(ir_rvalue, param, &ir->actual_parameters) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue