<< *reinterpret_cast<nir_instr*>(instr)
<< "' (" << __func__ << ")\n";
+ TexInstruction *set_ofs = nullptr;
+
auto tex_op = TexInstruction::gather4;
if (instr->is_shadow) {
tex_op = (tex_op == TexInstruction::gather4_c) ?
TexInstruction::gather4_c_o : TexInstruction::gather4_o;
- auto set_ofs = new TexInstruction(TexInstruction::set_offsets, dummy,
+ set_ofs = new TexInstruction(TexInstruction::set_offsets, dummy,
ofs, sampler.id,
- sampler.id + R600_MAX_CONST_BUFFERS, src.sampler_offset);
+ sampler.id + R600_MAX_CONST_BUFFERS, src.sampler_offset);
set_ofs->set_dest_swizzle({7,7,7,7});
- emit_instruction(set_ofs);
}
}
set_rect_coordinate_flags(instr, irt);
+ if (set_ofs)
+ emit_instruction(set_ofs);
+
emit_instruction(irt);
return true;
}