Mesa (master): i965/vs: Add a new dst_reg constructor for file, number, type, and mask.

Kenneth Graunke kwg at kemper.freedesktop.org
Sun Dec 18 12:40:06 PST 2011


Module: Mesa
Branch: master
Commit: bdd76ebef126281d837f3a817a9f19fca7799a88
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bdd76ebef126281d837f3a817a9f19fca7799a88

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Oct 27 21:45:12 2011 -0700

i965/vs: Add a new dst_reg constructor for file, number, type, and mask.

This will be especially useful for loading texturing parameters, where I
need to (for example) reference m3.xz<D>.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/drivers/dri/i965/brw_vec4.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index eb90253..5bf8027 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -210,6 +210,16 @@ public:
       this->reg = reg;
    }
 
+   dst_reg(register_file file, int reg, const glsl_type *type, int writemask)
+   {
+      init();
+
+      this->file = file;
+      this->reg = reg;
+      this->type = brw_type_for_base_type(type);
+      this->writemask = writemask;
+   }
+
    dst_reg(struct brw_reg reg)
    {
       init();



More information about the mesa-commit mailing list