summaryrefslogtreecommitdiff
path: root/src/mesa/shader/prog_parameter.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-04-18 16:48:55 -0600
committerBrian <brian@yutani.localnet.net>2007-04-18 17:14:14 -0600
commit6b3027e291baf6a7dc5e63780d05f89753a13d74 (patch)
tree0ee1530a07989627765c8b37242d8a176248c0f2 /src/mesa/shader/prog_parameter.c
parent8d370fb2eee702e1ba2c622716645d450272549a (diff)
comments, assertions
Diffstat (limited to 'src/mesa/shader/prog_parameter.c')
-rw-r--r--src/mesa/shader/prog_parameter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index a01a6456fb..9e3d3fecf2 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -274,7 +274,6 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList,
else {
i = _mesa_add_parameter(paramList, PROGRAM_UNIFORM, name,
size, datatype, NULL, NULL);
-
return i;
}
}
@@ -291,11 +290,13 @@ _mesa_add_sampler(struct gl_program_parameter_list *paramList,
{
GLint i = _mesa_lookup_parameter_index(paramList, -1, name);
if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_SAMPLER) {
+ ASSERT(paramList->Parameters[i].Size == 1);
+ ASSERT(paramList->Parameters[i].DataType == datatype);
/* already in list */
return i;
}
else {
- const GLint size = 1;
+ const GLint size = 1; /* a sampler is basically a texture unit number */
i = _mesa_add_parameter(paramList, PROGRAM_SAMPLER, name,
size, datatype, NULL, NULL);
return i;