ibld.MOV(reg, brw_imm_f(imm->val));
imm->nr = reg.nr;
- imm->subreg_offset = reg.offset % REG_SIZE;
+ imm->subreg_offset = reg.offset;
reg.offset += sizeof(float);
if (reg.offset == 8 * sizeof(float)) {
if (const_offset) {
/* Offsets are in bytes but they should always be multiples of 4 */
assert(const_offset->u32[0] % 4 == 0);
- src.offset = const_offset->u32[0] + src.offset % 4;
+ src.offset = const_offset->u32[0];
for (unsigned j = 0; j < instr->num_components; j++) {
bld.MOV(offset(dest, bld, j), offset(src, bld, j));
for (int i = 0; i < key->nr_userclip_plane_consts; i++) {
fs_reg u = userplane[i];
- fs_reg output = outputs[VARYING_SLOT_CLIP_DIST0 + i / 4];
- output.offset = output.offset % REG_SIZE + (i & 3) * REG_SIZE;
+ const fs_reg output = offset(outputs[VARYING_SLOT_CLIP_DIST0 + i / 4],
+ bld, i & 3);
abld.MUL(output, outputs[clip_vertex], u);
for (int j = 1; j < 4; j++) {
* single-result send is probably actually reducing register
* pressure.
*/
- if (inst->size_written <= inst->exec_size / 8 * REG_SIZE &&
- chosen_inst->size_written > chosen_inst->exec_size / 8 * REG_SIZE) {
+ if (inst->size_written <= 4 * inst->exec_size &&
+ chosen_inst->size_written > 4 * chosen_inst->exec_size) {
chosen = n;
continue;
} else if (inst->size_written > chosen_inst->size_written) {