summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/nvfragparse.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-22 09:07:27 -0600
committerBrian <[email protected]>2007-03-22 09:07:27 -0600
commit1bf81e3c5d65b636658d11072f4f027f5c499396 (patch)
tree9a32e209d11e797d390cc2b9961f8fa96010795c /src/mesa/shader/nvfragparse.c
parent1936b25ebd580c5ef9e8cb471a986da39ef46ca5 (diff)
In _mesa_add_unnamed_constant() and _mesa_lookup_parameter_constant() allow swizzleOut==NULL.
There are times when we don't want to allow swizzling when searching for or adding vector constants. Passing NULL for swizzleOut disables swizzling. This fixes a constant/swizzle bug in link_uniform_vars().
Diffstat (limited to 'src/mesa/shader/nvfragparse.c')
-rw-r--r--src/mesa/shader/nvfragparse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c
index b4e19ce74de..c46d8aa0833 100644
--- a/src/mesa/shader/nvfragparse.c
+++ b/src/mesa/shader/nvfragparse.c
@@ -1040,7 +1040,7 @@ Parse_VectorSrc(struct parse_state *parseState,
if (!Parse_ScalarConstant(parseState, values))
RETURN_ERROR;
paramIndex = _mesa_add_unnamed_constant(parseState->parameters,
- values, 4, &swizzle);
+ values, 4, NULL);
ASSERT(swizzle == SWIZZLE_NOOP);
srcReg->File = PROGRAM_NAMED_PARAM;
srcReg->Index = paramIndex;
@@ -1053,7 +1053,7 @@ Parse_VectorSrc(struct parse_state *parseState,
if (!Parse_VectorConstant(parseState, values))
RETURN_ERROR;
paramIndex = _mesa_add_unnamed_constant(parseState->parameters,
- values, 4, &swizzle);
+ values, 4, NULL);
ASSERT(swizzle == SWIZZLE_NOOP);
srcReg->File = PROGRAM_NAMED_PARAM;
srcReg->Index = paramIndex;
@@ -1145,7 +1145,7 @@ Parse_ScalarSrcReg(struct parse_state *parseState,
if (!Parse_VectorConstant(parseState, values))
RETURN_ERROR;
paramIndex = _mesa_add_unnamed_constant(parseState->parameters,
- values, 4, &swizzle);
+ values, 4, NULL);
ASSERT(swizzle == SWIZZLE_NOOP);
srcReg->File = PROGRAM_NAMED_PARAM;
srcReg->Index = paramIndex;
@@ -1171,7 +1171,7 @@ Parse_ScalarSrcReg(struct parse_state *parseState,
if (!Parse_ScalarConstant(parseState, values))
RETURN_ERROR;
paramIndex = _mesa_add_unnamed_constant(parseState->parameters,
- values, 4, &swizzle);
+ values, 4, NULL);
ASSERT(swizzle == SWIZZLE_NOOP);
srcReg->Index = paramIndex;
srcReg->File = PROGRAM_NAMED_PARAM;