summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2013-11-22 20:22:03 -0800
committerFrancisco Jerez <[email protected]>2014-02-19 15:10:57 +0100
commit7f00c5f1a3e0db20a89cfedefd53cbe817fec9e3 (patch)
tree8312f747743a21c5e6906f3f7877bf5d38ea9c31
parent98e048cf323c22688bfa465153e648005e555d12 (diff)
i965/vec4: Add constructor of src_reg from a fixed hardware reg.
Reviewed-by: Paul Berry <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp8
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index dd23ed48fe1..f041bac25e7 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -112,6 +112,14 @@ src_reg::src_reg(int32_t i)
this->imm.i = i;
}
+src_reg::src_reg(struct brw_reg reg)
+{
+ init();
+
+ this->file = HW_REG;
+ this->fixed_hw_reg = reg;
+}
+
src_reg::src_reg(dst_reg reg)
{
init();
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index cfee16518b5..84f9b0ac3b7 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -126,6 +126,7 @@ public:
src_reg(float f);
src_reg(uint32_t u);
src_reg(int32_t i);
+ src_reg(struct brw_reg reg);
bool equals(src_reg *r);
bool is_zero() const;