summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-10-15 17:42:43 -0700
committerEric Anholt <[email protected]>2012-10-17 12:23:59 -0700
commit9499f7984e7393f5acf214f126481695a774e8e7 (patch)
tree780baf0fc06b3dfda6a578a16e8fe60e9decc049 /src/mesa/drivers
parent914d8f9f84a3539758716d676d59a1fee4cc559f (diff)
i965/vs: Simplify emit_scratch_write() prototype.
Both callers used (effectively) inst->dst as the argument, so just reference it. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp11
3 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index de0df552553..d6d6c8a904b 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -428,7 +428,6 @@ public:
int base_offset);
void emit_scratch_write(vec4_instruction *inst,
src_reg temp,
- dst_reg orig_dst,
int base_offset);
void emit_pull_constant_load(vec4_instruction *inst,
dst_reg dst,
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
index bad27287e5a..a2381bc30f2 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
@@ -355,7 +355,7 @@ vec4_visitor::spill_reg(int spill_reg_nr)
*/
src_reg temp = src_reg(inst->dst);
temp.swizzle = BRW_SWIZZLE_XYZW;
- emit_scratch_write(inst, temp, spill_reg, spill_offset);
+ emit_scratch_write(inst, temp, spill_offset);
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 59428a19210..60295adbd87 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -2465,14 +2465,13 @@ vec4_visitor::emit_scratch_read(vec4_instruction *inst,
*/
void
vec4_visitor::emit_scratch_write(vec4_instruction *inst,
- src_reg temp, dst_reg orig_dst,
- int base_offset)
+ src_reg temp, int base_offset)
{
- int reg_offset = base_offset + orig_dst.reg_offset;
- src_reg index = get_scratch_offset(inst, orig_dst.reladdr, reg_offset);
+ int reg_offset = base_offset + inst->dst.reg_offset;
+ src_reg index = get_scratch_offset(inst, inst->dst.reladdr, reg_offset);
dst_reg dst = dst_reg(brw_writemask(brw_vec8_grf(0, 0),
- orig_dst.writemask));
+ inst->dst.writemask));
vec4_instruction *write = SCRATCH_WRITE(dst, temp, index);
write->predicate = inst->predicate;
write->ir = inst->ir;
@@ -2534,7 +2533,7 @@ vec4_visitor::move_grf_array_access_to_scratch()
if (inst->dst.file == GRF && scratch_loc[inst->dst.reg] != -1) {
src_reg temp = src_reg(this, glsl_type::vec4_type);
- emit_scratch_write(inst, temp, inst->dst, scratch_loc[inst->dst.reg]);
+ emit_scratch_write(inst, temp, scratch_loc[inst->dst.reg]);
inst->dst.file = temp.file;
inst->dst.reg = temp.reg;