summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_ureg.h
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2010-01-19 13:16:20 +0100
committerMichal Krol <[email protected]>2010-01-28 14:07:24 +0100
commit4367de152cc5bd7240d75a33e75c1b1671b5cc16 (patch)
tree71ed2b871eac71d6113bf97555a96e0f4974ab0e /src/gallium/auxiliary/tgsi/tgsi_ureg.h
parent0adfdaeaa1e20c81a9f37455fe78d15c6406e3d3 (diff)
tgsi: Handle 2-D declarations.
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index 8c8a6bbce66..c0dc722673f 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -178,6 +178,12 @@ ureg_DECL_immediate_int( struct ureg_program *,
const int *v,
unsigned nr );
+void
+ureg_DECL_constant2D(struct ureg_program *ureg,
+ unsigned first,
+ unsigned last,
+ unsigned index2D);
+
struct ureg_src
ureg_DECL_constant( struct ureg_program *,
unsigned index );
@@ -816,6 +822,30 @@ ureg_dst( struct ureg_src src )
}
static INLINE struct ureg_src
+ureg_src_register(unsigned file,
+ unsigned index)
+{
+ struct ureg_src src;
+
+ src.File = file;
+ src.SwizzleX = TGSI_SWIZZLE_X;
+ src.SwizzleY = TGSI_SWIZZLE_Y;
+ src.SwizzleZ = TGSI_SWIZZLE_Z;
+ src.SwizzleW = TGSI_SWIZZLE_W;
+ src.Indirect = 0;
+ src.IndirectFile = TGSI_FILE_NULL;
+ src.IndirectIndex = 0;
+ src.IndirectSwizzle = 0;
+ src.Absolute = 0;
+ src.Index = index;
+ src.Negate = 0;
+ src.Dimension = 0;
+ src.DimensionIndex = 0;
+
+ return src;
+}
+
+static INLINE struct ureg_src
ureg_src( struct ureg_dst dst )
{
struct ureg_src src;