summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-04-07 23:12:00 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-04-07 23:12:00 +0000
commitb8ca0172e7562f2ed92ef99903980aae2e806a94 (patch)
tree25658e903ff7a5ffe1fec592c2c08af3209138db /src
parent071a4ddd92229b102b0b67410303505681114cd7 (diff)
scalar source reg can be a scalar or vector literal
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/nvfragparse.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/nvfragparse.c b/src/mesa/main/nvfragparse.c
index 725415ad85..5178dfd8d2 100644
--- a/src/mesa/main/nvfragparse.c
+++ b/src/mesa/main/nvfragparse.c
@@ -1,4 +1,4 @@
-/* $Id: nvfragparse.c,v 1.18 2003/04/07 14:58:58 brianp Exp $ */
+/* $Id: nvfragparse.c,v 1.19 2003/04/07 23:12:00 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1217,6 +1217,16 @@ Parse_ScalarSrcReg(struct parse_state *parseState,
if (!Parse_FragReg(parseState, &srcReg->Register))
RETURN_ERROR;
}
+ else if (token[0] == '{') {
+ /* vector literal */
+ GLfloat values[4];
+ GLuint paramIndex;
+ if (!Parse_VectorOrScalarConstant(parseState, values))
+ RETURN_ERROR;
+ paramIndex = add_unnamed_constant(parseState, values);
+ srcReg->IsParameter = GL_TRUE;
+ srcReg->Register = paramIndex;
+ }
else {
RETURN_ERROR2("Invalid source register name", token);
}