From: Brian Paul Date: Wed, 26 Aug 2009 20:49:15 +0000 (-0600) Subject: Merge branch 'mesa_7_5_branch' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38f56411067d51ad0de0ea73498964baaacea90b;p=mesa.git Merge branch 'mesa_7_5_branch' --- 38f56411067d51ad0de0ea73498964baaacea90b diff --cc src/mesa/shader/shader_api.c index 23aca3000e9,c36fc271a00..54a25dfaf07 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@@ -1631,12 -1624,20 +1631,13 @@@ set_program_uniform(GLcontext *ctx, str 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];