summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp22
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp4
3 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index fa186b536bf..e816b94e608 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -323,19 +323,19 @@ vec4_visitor::implied_mrf_writes(vec4_instruction *inst)
}
bool
-src_reg::equals(src_reg *r)
+src_reg::equals(const src_reg &r) const
{
- return (file == r->file &&
- reg == r->reg &&
- reg_offset == r->reg_offset &&
- type == r->type &&
- negate == r->negate &&
- abs == r->abs &&
- swizzle == r->swizzle &&
- !reladdr && !r->reladdr &&
- memcmp(&fixed_hw_reg, &r->fixed_hw_reg,
+ return (file == r.file &&
+ reg == r.reg &&
+ reg_offset == r.reg_offset &&
+ type == r.type &&
+ negate == r.negate &&
+ abs == r.abs &&
+ swizzle == r.swizzle &&
+ !reladdr && !r.reladdr &&
+ memcmp(&fixed_hw_reg, &r.fixed_hw_reg,
sizeof(fixed_hw_reg)) == 0 &&
- imm.u == r->imm.u);
+ imm.u == r.imm.u);
}
static bool
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index c2bbd68edf6..a3ba9c77647 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -126,7 +126,7 @@ public:
src_reg(int32_t i);
src_reg(struct brw_reg reg);
- bool equals(src_reg *r);
+ bool equals(const src_reg &r) const;
bool is_zero() const;
bool is_one() const;
bool is_accumulator() const;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index 3242c3a0dd0..abafe47a759 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -82,7 +82,7 @@ try_constant_propagation(vec4_instruction *inst, int arg, src_reg *values[4])
*/
src_reg value = *values[0];
for (int i = 1; i < 4; i++) {
- if (!value.equals(values[i]))
+ if (!value.equals(*values[i]))
return false;
}
@@ -289,7 +289,7 @@ vec4_visitor::try_copy_propagation(vec4_instruction *inst, int arg,
return false;
/* Don't report progress if this is a noop. */
- if (value.equals(&inst->src[arg]))
+ if (value.equals(inst->src[arg]))
return false;
value.type = inst->src[arg].type;