From: Brian Paul Date: Thu, 13 Aug 2009 18:53:20 +0000 (-0600) Subject: progs/util: ignore pre-defined uniforms in SetUniformValues() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=741869d73aa8c9d0d9ae8f1c4ca2df32e235960a;p=mesa.git progs/util: ignore pre-defined uniforms in SetUniformValues() --- diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c index 233252112a6..489e71cc30c 100644 --- a/progs/util/shaderutil.c +++ b/progs/util/shaderutil.c @@ -153,7 +153,14 @@ SetUniformValues(GLuint program, struct uniform_info uniforms[]) glUniform4fv(uniforms[i].location, 1, uniforms[i].value); break; default: - abort(); + if (strncmp(uniforms[i].name, "gl_", 3) == 0) { + /* built-in uniform: ignore */ + } + else { + fprintf(stderr, + "Unexpected uniform data type in SetUniformValues\n"); + abort(); + } } } }