diff options
author | Michal Krol <[email protected]> | 2010-01-15 13:32:55 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2010-01-15 19:00:03 +0100 |
commit | 181adca5d6f03390dcfed567be6dfd9e14eb94a7 (patch) | |
tree | 298e0d3b9de8a9f9f059d7d1518a8a2332596032 /src/gallium/auxiliary/tgsi/tgsi_ureg.c | |
parent | 857b37980ce62a45f5d0b89ea613edeb6a81f9b7 (diff) |
tgsi: Add ureg_src_dimension().
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_ureg.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 2b51672b8ea..ae67c322bbe 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -242,13 +242,14 @@ ureg_src_register( unsigned file, src.SwizzleY = TGSI_SWIZZLE_Y; src.SwizzleZ = TGSI_SWIZZLE_Z; src.SwizzleW = TGSI_SWIZZLE_W; - src.Pad = 0; src.Indirect = 0; src.IndirectIndex = 0; src.IndirectSwizzle = 0; src.Absolute = 0; src.Index = index; src.Negate = 0; + src.Dimension = 0; + src.DimensionIndex = 0; return src; } @@ -655,7 +656,7 @@ void ureg_emit_src( struct ureg_program *ureg, struct ureg_src src ) { - unsigned size = 1 + (src.Indirect ? 1 : 0); + unsigned size = 1 + (src.Indirect ? 1 : 0) + (src.Dimension ? 1 : 0); union tgsi_any_token *out = get_tokens( ureg, DOMAIN_INSN, size ); unsigned n = 0; @@ -687,6 +688,15 @@ ureg_emit_src( struct ureg_program *ureg, n++; } + if (src.Dimension) { + out[0].src.Dimension = 1; + out[n].dim.Indirect = 0; + out[n].dim.Dimension = 0; + out[n].dim.Padding = 0; + out[n].dim.Index = src.DimensionIndex; + n++; + } + assert(n == size); } |