*/
fs_reg vec4_offset = fs_reg(this, glsl_type::int_type);
instructions.push_tail(ADD(vec4_offset,
- varying_offset, const_offset & ~3));
+ varying_offset, fs_reg(const_offset & ~3)));
int scale = 1;
if (brw->gen == 4 && dispatch_width == 8) {
void init();
fs_reg();
- fs_reg(float f);
- fs_reg(int32_t i);
- fs_reg(uint32_t u);
+ explicit fs_reg(float f);
+ explicit fs_reg(int32_t i);
+ explicit fs_reg(uint32_t u);
fs_reg(struct brw_reg fixed_hw_reg);
fs_reg(enum register_file file, int reg);
fs_reg(enum register_file file, int reg, enum brw_reg_type type);
fs_inst *inst;
if (brw->gen >= 7) {
- inst = emit_texture_gen7(ir, dst, coordinate, shadow_c, lod, dpdy, sample_index, fs_reg(0u), fpi->TexSrcUnit);
+ inst = emit_texture_gen7(ir, dst, coordinate, shadow_c, lod, dpdy, sample_index, fs_reg(0u), fs_reg(fpi->TexSrcUnit));
} else if (brw->gen >= 5) {
inst = emit_texture_gen5(ir, dst, coordinate, shadow_c, lod, dpdy, sample_index, fpi->TexSrcUnit);
} else {
deref_array->array_index->accept(this);
fs_reg tmp(this, glsl_type::uint_type);
- emit(MUL(tmp, this->result, ATOMIC_COUNTER_SIZE));
- emit(ADD(offset, tmp, location->data.atomic.offset));
+ emit(MUL(tmp, this->result, fs_reg(ATOMIC_COUNTER_SIZE)));
+ emit(ADD(offset, tmp, fs_reg(location->data.atomic.offset)));
} else {
- offset = location->data.atomic.offset;
+ offset = fs_reg(location->data.atomic.offset);
}
/* Emit the appropriate machine instruction */
}
/* Emit the instruction. */
- inst = emit(SHADER_OPCODE_UNTYPED_ATOMIC, dst, atomic_op, surf_index);
+ inst = emit(SHADER_OPCODE_UNTYPED_ATOMIC, dst,
+ fs_reg(atomic_op), fs_reg(surf_index));
inst->base_mrf = 0;
inst->mlen = mlen;
inst->header_present = true;
mlen += operand_len;
/* Emit the instruction. */
- inst = emit(SHADER_OPCODE_UNTYPED_SURFACE_READ, dst, surf_index);
+ inst = emit(SHADER_OPCODE_UNTYPED_SURFACE_READ, dst, fs_reg(surf_index));
inst->base_mrf = 0;
inst->mlen = mlen;
inst->header_present = true;