summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniforms.c
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2015-03-12 14:37:20 +0200
committerTapani Pälli <tapani.palli@intel.com>2015-04-16 07:55:57 +0300
commit1b256eb0ec1f919f23641f8d47d4b2ce126dd1a4 (patch)
tree2b0ab37ea7b28449c1e9c40d95ea518e80e80a6d /src/mesa/main/uniforms.c
parent51313f567d59afd5491e03d1593030066df974eb (diff)
downloadexternal_mesa3d-1b256eb0ec1f919f23641f8d47d4b2ce126dd1a4.zip
external_mesa3d-1b256eb0ec1f919f23641f8d47d4b2ce126dd1a4.tar.gz
external_mesa3d-1b256eb0ec1f919f23641f8d47d4b2ce126dd1a4.tar.bz2
mesa: refactor GetUniformIndices
Use _mesa_program_resource_index to get indices. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r--src/mesa/main/uniforms.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 0c16641..f4de1df 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -986,9 +986,9 @@ _mesa_GetUniformIndices(GLuint program,
}
for (i = 0; i < uniformCount; i++) {
- unsigned offset;
- uniformIndices[i] = _mesa_get_uniform_location(shProg,
- uniformNames[i], &offset);
+ struct gl_program_resource *res =
+ _mesa_program_resource_find_name(shProg, GL_UNIFORM, uniformNames[i]);
+ uniformIndices[i] = _mesa_program_resource_index(shProg, res);
}
}