if (param->Type == PROGRAM_SAMPLER) {
/* This controls which texture unit which is used by a sampler */
+ GLboolean changed = GL_FALSE;
GLint i;
- /* data type for setting samplers must be int */
- if (type != GL_INT) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glUniform(only glUniform1i can be used "
- "to set sampler uniforms)");
- return;
- }
+ /* this should have been caught by the compatible_types() check */
+ ASSERT(type == GL_INT);
- /* XXX arrays of samplers haven't been tested much, but it's not a
- * common thing...
- */
+ /* loop over number of samplers to change */
for (i = 0; i < count; i++) {
GLuint sampler =
(GLuint) program->Parameters->ParameterValues[index + offset + i][0];