Mesa (master): tgsi/ureg: Move ureg_dst_register() to the header.

Eric Anholt anholt at kemper.freedesktop.org
Fri Feb 6 23:59:45 UTC 2015


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Nov  7 12:35:58 2014 -0800

tgsi/ureg: Move ureg_dst_register() to the header.

I wanted to use it for nir-to-tgsi.  The equivalent ureg_src_register() is
also located here.

Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 src/gallium/auxiliary/tgsi/tgsi_ureg.c |   28 ----------------------------
 src/gallium/auxiliary/tgsi/tgsi_ureg.h |   25 +++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 28 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index f524dfb..88a7c11 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -241,34 +241,6 @@ static union tgsi_any_token *retrieve_token( struct ureg_program *ureg,
    return &ureg->domain[domain].tokens[nr];
 }
 
-
-
-static INLINE struct ureg_dst
-ureg_dst_register( unsigned file,
-                   unsigned index )
-{
-   struct ureg_dst dst;
-
-   dst.File      = file;
-   dst.WriteMask = TGSI_WRITEMASK_XYZW;
-   dst.Indirect  = 0;
-   dst.IndirectFile = TGSI_FILE_NULL;
-   dst.IndirectIndex = 0;
-   dst.IndirectSwizzle = 0;
-   dst.Saturate  = 0;
-   dst.Predicate = 0;
-   dst.PredNegate = 0;
-   dst.PredSwizzleX = TGSI_SWIZZLE_X;
-   dst.PredSwizzleY = TGSI_SWIZZLE_Y;
-   dst.PredSwizzleZ = TGSI_SWIZZLE_Z;
-   dst.PredSwizzleW = TGSI_SWIZZLE_W;
-   dst.Index     = index;
-   dst.ArrayID = 0;
-
-   return dst;
-}
-
-
 void
 ureg_property(struct ureg_program *ureg, unsigned name, unsigned value)
 {
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index f254b1e..b3f47ef 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -1137,6 +1137,31 @@ ureg_dst_array_offset( struct ureg_dst reg, int offset )
 }
 
 static INLINE struct ureg_dst
+ureg_dst_register( unsigned file,
+                   unsigned index )
+{
+   struct ureg_dst dst;
+
+   dst.File      = file;
+   dst.WriteMask = TGSI_WRITEMASK_XYZW;
+   dst.Indirect  = 0;
+   dst.IndirectFile = TGSI_FILE_NULL;
+   dst.IndirectIndex = 0;
+   dst.IndirectSwizzle = 0;
+   dst.Saturate  = 0;
+   dst.Predicate = 0;
+   dst.PredNegate = 0;
+   dst.PredSwizzleX = TGSI_SWIZZLE_X;
+   dst.PredSwizzleY = TGSI_SWIZZLE_Y;
+   dst.PredSwizzleZ = TGSI_SWIZZLE_Z;
+   dst.PredSwizzleW = TGSI_SWIZZLE_W;
+   dst.Index     = index;
+   dst.ArrayID = 0;
+
+   return dst;
+}
+
+static INLINE struct ureg_dst
 ureg_dst( struct ureg_src src )
 {
    struct ureg_dst dst;




More information about the mesa-commit mailing list