i965/vec4: Add constructor of src_reg from a fixed hardware reg.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 23 Nov 2013 04:22:03 +0000 (20:22 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 19 Feb 2014 14:10:57 +0000 (15:10 +0100)
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4.h

index dd23ed48fe11e0202df70423af88a6e7fb3e8739..f041bac25e76bdca7d23a08a3c7437bf2ab991f5 100644 (file)
@@ -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();
index cfee16518b5afb6efcf2ba2fb8ffdbd18b930255..84f9b0ac3b7c8877b33af40e10e907b594c0683d 100644 (file)
@@ -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;