diff options
author | Brian Paul <[email protected]> | 2006-11-15 23:38:02 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-11-15 23:38:02 +0000 |
commit | 0c6723aee564a7b320ca122c3c9b003c863cc714 (patch) | |
tree | b7bf0782f986371da4deab676ced10229391d105 /src/mesa/shader/program.c | |
parent | 699a33ea77ecd164d7435811258eee96bd37aaa2 (diff) |
Add a size parameter to _mesa_add_unnamed_constant() and
_mesa_add_named_constant() to indicate vector size (1, 2, 3 or 4).
Always 4 for now...
Diffstat (limited to 'src/mesa/shader/program.c')
-rw-r--r-- | src/mesa/shader/program.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 5c03ad44c2e..e903fd03051 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -437,9 +437,11 @@ _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, */ GLint _mesa_add_named_constant(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4]) + const char *name, const GLfloat values[4], + GLuint size) { GLuint pos, swizzle; + ASSERT(size == 4); /* XXX future feature */ /* check if we already have this constant */ if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { return pos; @@ -459,9 +461,10 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, */ GLint _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, - const GLfloat values[4]) + const GLfloat values[4], GLuint size) { GLuint pos, swizzle; + ASSERT(size == 4); /* XXX future feature */ /* check if we already have this constant */ if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { return pos; |