diff options
author | Jason Ekstrand <[email protected]> | 2014-09-06 13:48:34 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2014-09-30 10:29:13 -0700 |
commit | f0d43c09b2fa32db66b7b6dc13becb0c7d3edeea (patch) | |
tree | 70990b9349d0330ca1aa93ea5f2453e85298569b /src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | |
parent | 0089d025aa7f7497b3097c5067b589410cd40fbc (diff) |
i965/fs: Use offset a lot more places
We have this wonderful offset() function for advancing registers, but we're
not using it. Using offset() allows us to do some sanity checking and
avoid manually touching fs_reg::reg_offset. In a few commits, we will make
offset do even more nifty things for us.
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 33829d253e7..a627b64d328 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -558,7 +558,7 @@ fs_visitor::emit_unspill(bblock_t *block, fs_inst *inst, fs_reg dst, } inst->insert_before(block, unspill_inst); - dst.reg_offset++; + dst = offset(dst, 1); spill_offset += dispatch_width * sizeof(float); } } @@ -716,7 +716,7 @@ fs_visitor::spill_reg(int spill_reg) fs_inst *spill_inst = new(mem_ctx) fs_inst(SHADER_OPCODE_GEN4_SCRATCH_WRITE, reg_null_f, spill_src); - spill_src.reg_offset++; + spill_src = offset(spill_src, 1); spill_inst->offset = subset_spill_offset + chan * reg_size; spill_inst->ir = inst->ir; spill_inst->annotation = inst->annotation; |