GLSL_TYPE_UINT);
if (!const_offset) {
buffer.reladdr = ralloc(mem_ctx, st_src_reg);
- memcpy(buffer.reladdr, &sampler_reladdr, sizeof(sampler_reladdr));
+ *buffer.reladdr = op[0];
emit_arl(ir, sampler_reladdr, op[0]);
}
emit_asm(ir, TGSI_OPCODE_RESQ, result_dst)->buffer = buffer;
if (!const_block) {
block->accept(this);
- emit_arl(ir, sampler_reladdr, this->result);
buffer.reladdr = ralloc(mem_ctx, st_src_reg);
- memcpy(buffer.reladdr, &sampler_reladdr, sizeof(sampler_reladdr));
+ *buffer.reladdr = this->result;
+ emit_arl(ir, sampler_reladdr, this->result);
}
/* Calculate the surface offset */
get_deref_offsets(img, &sampler_array_size, &sampler_base,
(unsigned int *)&image.index, &reladdr);
if (reladdr.file != PROGRAM_UNDEFINED) {
- emit_arl(ir, sampler_reladdr, reladdr);
image.reladdr = ralloc(mem_ctx, st_src_reg);
- memcpy(image.reladdr, &sampler_reladdr, sizeof(reladdr));
+ *image.reladdr = reladdr;
+ emit_arl(ir, sampler_reladdr, reladdr);
}
st_dst_reg dst = undef_dst;