summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_parameter.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-11-10 12:33:17 -0700
committerBrian Paul <[email protected]>2008-11-10 12:39:36 -0700
commit2d76a0d77af7be9539f89cba37ce84338c1cdda4 (patch)
tree6e722f4d0f8356707ed9402dc9eeeb5dc56704b4 /src/mesa/shader/prog_parameter.c
parent379ff8c9567940ebff44870cf7b0202882445fa6 (diff)
mesa: track initialization status of uniform variables. Plus, asst clean-ups.
Diffstat (limited to 'src/mesa/shader/prog_parameter.c')
-rw-r--r--src/mesa/shader/prog_parameter.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index 2dfd923a0f3..29c5b33f6cd 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -128,6 +128,7 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList,
if (values) {
COPY_4V(paramList->ParameterValues[oldNum + i], values);
values += 4;
+ p->Initialized = GL_TRUE;
}
else {
/* silence valgrind */
@@ -259,7 +260,8 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList,
*/
GLint
_mesa_add_uniform(struct gl_program_parameter_list *paramList,
- const char *name, GLuint size, GLenum datatype)
+ const char *name, GLuint size, GLenum datatype,
+ const GLfloat *values)
{
GLint i = _mesa_lookup_parameter_index(paramList, -1, name);
ASSERT(datatype != GL_NONE);
@@ -271,7 +273,7 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList,
}
else {
i = _mesa_add_parameter(paramList, PROGRAM_UNIFORM, name,
- size, datatype, NULL, NULL);
+ size, datatype, values, NULL);
return i;
}
}