Mesa (gallium-0.1): ureg: add explicit undefined src/dest constructors
Keith Whitwell
keithw at kemper.freedesktop.org
Fri Aug 28 14:01:22 UTC 2009
Module: Mesa
Branch: gallium-0.1
Commit: 2fc182e7f0753cad77888069578cd723a541ac5f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2fc182e7f0753cad77888069578cd723a541ac5f
Author: Keith Whitwell <keithw at vmware.com>
Date: Thu Aug 27 15:35:53 2009 +0100
ureg: add explicit undefined src/dest constructors
Also functions to test for undefined registers.
---
src/gallium/auxiliary/tgsi/tgsi_ureg.h | 50 ++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index 50e98ba..2cebbeb 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -483,6 +483,56 @@ ureg_src( struct ureg_dst dst )
return src;
}
+
+
+static INLINE struct ureg_dst
+ureg_dst_undef( void )
+{
+ struct ureg_dst dst;
+
+ dst.File = TGSI_FILE_NULL;
+ dst.WriteMask = 0;
+ dst.Indirect = 0;
+ dst.Saturate = 0;
+ dst.Index = 0;
+ dst.Pad1 = 0;
+ dst.Pad2 = 0;
+
+ return dst;
+}
+
+static INLINE struct ureg_src
+ureg_src_undef( void )
+{
+ struct ureg_src src;
+
+ src.File = TGSI_FILE_NULL;
+ src.SwizzleX = 0;
+ src.SwizzleY = 0;
+ src.SwizzleZ = 0;
+ src.SwizzleW = 0;
+ src.Pad = 0;
+ src.Indirect = 0;
+ src.Absolute = 0;
+ src.Index = 0;
+ src.Negate = 0;
+
+ return src;
+}
+
+static INLINE boolean
+ureg_src_is_undef( struct ureg_src src )
+{
+ return src.File == TGSI_FILE_NULL;
+}
+
+static INLINE boolean
+ureg_dst_is_undef( struct ureg_dst dst )
+{
+ return dst.File == TGSI_FILE_NULL;
+}
+
+
#ifdef __cplusplus
}
#endif
More information about the mesa-commit
mailing list