Potentially we'll want more than three sources for Phi nodes.
---
 src/mesa/drivers/dri/i965/brw_fs.cpp | 8 ++++++++
 src/mesa/drivers/dri/i965/brw_fs.h   | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp 
b/src/mesa/drivers/dri/i965/brw_fs.cpp
index bb2d290..69d1059 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;
@@ -119,6 +122,11 @@ 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 8e2af4f..9dbd9a3 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -208,7 +208,7 @@ public:
    bool writes_flag() const;
 
    fs_reg dst;
-   fs_reg src[3];
+   fs_reg *src;
 
    /** @{
     * Annotation for the generated IR.  One of the two can be set.
-- 
1.8.3.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to