summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-02-19 21:18:44 -0800
committerMatt Turner <[email protected]>2014-06-01 13:29:23 -0700
commit1b60391ed48dc18b034fc3dc837919f4c8b7905c (patch)
tree882c2d7e57d7663c1b8ac5125d38a3816e949e84 /src
parenta391e99b231f107e8881c00a85af236472f5167d (diff)
i965/fs: ralloc fs_inst's fs_reg sources.
Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp8
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index af458babde8..48231082929 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -55,6 +55,9 @@ void
fs_inst::init()
{
memset(this, 0, sizeof(*this));
+
+ this->src = ralloc_array(this, fs_reg, 3);
+
this->conditional_mod = BRW_CONDITIONAL_NONE;
this->dst = reg_undef;
@@ -142,6 +145,11 @@ fs_inst::fs_inst(enum opcode opcode, fs_reg dst,
fs_inst::fs_inst(const fs_inst &that)
{
memcpy(this, &that, sizeof(that));
+
+ this->src = ralloc_array(this, fs_reg, 3);
+
+ for (int i = 0; i < 3; i++)
+ this->src[i] = that.src[i];
}
#define ALU1(op) \
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index e079842c186..11a5c7c6159 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -211,7 +211,7 @@ public:
bool writes_flag() const;
fs_reg dst;
- fs_reg src[3];
+ fs_reg *src;
uint32_t texture_offset; /**< Texture offset bitfield */
uint32_t offset; /* spill/unspill offset */