summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-02-20 09:40:02 -0800
committerMatt Turner <[email protected]>2014-06-01 13:29:23 -0700
commit6d3a15223aedaff26dd3aab900e02c8548956973 (patch)
tree63d81f5528a3639b9b8293c25624d209b2fdbcee /src/mesa/drivers/dri/i965
parentbfcf6a665b2cd782f024f384c053d7bc3033ceec (diff)
i965/fs: Add and use an fs_inst copy constructor.
Will get more complicated when fs_reg src becomes a pointer. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp5
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 1a83c8c2c2c..af458babde8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -139,6 +139,11 @@ fs_inst::fs_inst(enum opcode opcode, fs_reg dst,
assert(src[2].reg_offset >= 0);
}
+fs_inst::fs_inst(const fs_inst &that)
+{
+ memcpy(this, &that, sizeof(that));
+}
+
#define ALU1(op) \
fs_inst * \
fs_visitor::op(fs_reg dst, fs_reg src0) \
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 789f0b38c53..bda233c29df 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -197,6 +197,7 @@ public:
fs_inst(enum opcode opcode, fs_reg dst, fs_reg src0, fs_reg src1);
fs_inst(enum opcode opcode, fs_reg dst,
fs_reg src0, fs_reg src1,fs_reg src2);
+ fs_inst(const fs_inst &that);
bool equals(fs_inst *inst) const;
bool overwrites_reg(const fs_reg &reg) const;