summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-03-27 09:40:30 -0700
committerMatt Turner <mattst88@gmail.com>2014-04-05 09:47:36 -0700
commit8b1ab5c93bfcc22b7f50a5c10958e43d0571f8a0 (patch)
treed5c39c5395d521c279c8ef58f0ea14e6a01316d8 /src
parent39ecfca121b6ae1ae55ed474d564998ce967682a (diff)
i965/fs: Mark appropriate fs_inst members as const.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp14
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h16
2 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index c88f7c9b7b1..fd9fba73d50 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -323,7 +323,7 @@ fs_visitor::DEP_RESOLVE_MOV(int grf)
}
bool
-fs_inst::equals(fs_inst *inst)
+fs_inst::equals(fs_inst *inst) const
{
return (opcode == inst->opcode &&
dst.equals(inst->dst) &&
@@ -344,7 +344,7 @@ fs_inst::equals(fs_inst *inst)
}
bool
-fs_inst::overwrites_reg(const fs_reg &reg)
+fs_inst::overwrites_reg(const fs_reg &reg) const
{
return (reg.file == dst.file &&
reg.reg == dst.reg &&
@@ -353,7 +353,7 @@ fs_inst::overwrites_reg(const fs_reg &reg)
}
bool
-fs_inst::is_send_from_grf()
+fs_inst::is_send_from_grf() const
{
return (opcode == FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN7 ||
opcode == SHADER_OPCODE_SHADER_TIME_ADD ||
@@ -761,7 +761,7 @@ fs_visitor::pop_force_uncompressed()
* it.
*/
bool
-fs_inst::is_partial_write()
+fs_inst::is_partial_write() const
{
return ((this->predicate && this->opcode != BRW_OPCODE_SEL) ||
this->force_uncompressed ||
@@ -769,7 +769,7 @@ fs_inst::is_partial_write()
}
int
-fs_inst::regs_read(fs_visitor *v, int arg)
+fs_inst::regs_read(fs_visitor *v, int arg) const
{
if (is_tex() && arg == 0 && src[0].file == GRF) {
if (v->dispatch_width == 16)
@@ -781,13 +781,13 @@ fs_inst::regs_read(fs_visitor *v, int arg)
}
bool
-fs_inst::reads_flag()
+fs_inst::reads_flag() const
{
return predicate;
}
bool
-fs_inst::writes_flag()
+fs_inst::writes_flag() const
{
return (conditional_mod && opcode != BRW_OPCODE_SEL) ||
opcode == FS_OPCODE_MOV_DISPATCH_TO_FLAGS;
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 0d064f60888..408669358b2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -196,14 +196,14 @@ public:
fs_inst(enum opcode opcode, fs_reg dst,
fs_reg src0, fs_reg src1,fs_reg src2);
- bool equals(fs_inst *inst);
- bool overwrites_reg(const fs_reg &reg);
- bool is_send_from_grf();
- bool is_partial_write();
- int regs_read(fs_visitor *v, int arg);
-
- bool reads_flag();
- bool writes_flag();
+ bool equals(fs_inst *inst) const;
+ bool overwrites_reg(const fs_reg &reg) const;
+ bool is_send_from_grf() const;
+ bool is_partial_write() const;
+ int regs_read(fs_visitor *v, int arg) const;
+
+ bool reads_flag() const;
+ bool writes_flag() const;
fs_reg dst;
fs_reg src[3];