summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/tgsi_text.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-10-23 14:31:24 +0100
committerKeith Whitwell <keithw@vmware.com>2009-10-23 14:31:24 +0100
commitb9cb74c7f826dfd320f5e5b54aa933898f7ddd3d (patch)
treebd228f2769b91239bf0d836daa82095fe106bb1d /src/gallium/auxiliary/tgsi/tgsi_text.c
parent4e1d51786e0657c7430d731ac464f2a73e32eddf (diff)
gallium: remove the swizzling parts of ExtSwizzle
These haven't been used by the mesa state tracker since the conversion to tgsi_ureg, and it seems that none of the other state trackers are using it either. This helps simplify one of the biggest suprises when starting off with TGSI shaders.
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_text.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index d438450b1e..87d9cd7b3f 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -538,13 +538,11 @@ static boolean
parse_optional_swizzle(
struct translate_ctx *ctx,
uint swizzle[4],
- boolean *parsed_swizzle,
- boolean *parsed_extswizzle )
+ boolean *parsed_swizzle )
{
const char *cur = ctx->cur;
*parsed_swizzle = FALSE;
- *parsed_extswizzle = FALSE;
eat_opt_white( &cur );
if (*cur == '.') {
@@ -562,15 +560,8 @@ parse_optional_swizzle(
else if (uprcase( *cur ) == 'W')
swizzle[i] = TGSI_SWIZZLE_W;
else {
- if (*cur == '0')
- swizzle[i] = TGSI_EXTSWIZZLE_ZERO;
- else if (*cur == '1')
- swizzle[i] = TGSI_EXTSWIZZLE_ONE;
- else {
- report_error( ctx, "Expected register swizzle component `x', `y', `z', `w', `0' or `1'" );
- return FALSE;
- }
- *parsed_extswizzle = TRUE;
+ report_error( ctx, "Expected register swizzle component `x', `y', `z', `w', `0' or `1'" );
+ return FALSE;
}
cur++;
}
@@ -595,7 +586,6 @@ parse_src_operand(
uint swizzle[4];
boolean parsed_ext_negate_paren = FALSE;
boolean parsed_swizzle;
- boolean parsed_extswizzle;
if (*ctx->cur == '-') {
cur = ctx->cur;
@@ -690,16 +680,8 @@ parse_src_operand(
/* Parse optional swizzle.
*/
- if (parse_optional_swizzle( ctx, swizzle, &parsed_swizzle, &parsed_extswizzle )) {
- if (parsed_extswizzle) {
- assert( parsed_swizzle );
-
- src->SrcRegisterExtSwz.ExtSwizzleX = swizzle[0];
- src->SrcRegisterExtSwz.ExtSwizzleY = swizzle[1];
- src->SrcRegisterExtSwz.ExtSwizzleZ = swizzle[2];
- src->SrcRegisterExtSwz.ExtSwizzleW = swizzle[3];
- }
- else if (parsed_swizzle) {
+ if (parse_optional_swizzle( ctx, swizzle, &parsed_swizzle )) {
+ if (parsed_swizzle) {
src->SrcRegister.SwizzleX = swizzle[0];
src->SrcRegister.SwizzleY = swizzle[1];
src->SrcRegister.SwizzleZ = swizzle[2];