summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-01-30 16:55:03 -0700
committerBrian <brian@yutani.localnet.net>2007-01-30 16:55:03 -0700
commit716239877823e13a6111b5cff1bf2b446a37a537 (patch)
treed66c2a17ad08bb451a9d069f72905a85e0b0f242 /src
parentfc5a7ea5dec3a0a3e01d49559ba3cdad6c62222b (diff)
fix _mesa_get_uniform_location() so it uses the given program handle
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/shader_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 6bae17a905..e2fedf7fa6 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -741,8 +741,9 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
GLint
_mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name)
{
- if (ctx->Shader.CurrentProgram) {
- const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
+ struct gl_shader_program *shProg
+ = _mesa_lookup_shader_program(ctx, program);
+ if (shProg) {
GLuint loc;
for (loc = 0; loc < shProg->Uniforms->NumParameters; loc++) {
const struct gl_program_parameter *u