summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-04-18 16:27:35 -0600
committerBrian <[email protected]>2007-04-18 17:14:13 -0600
commitc93e883b205a679aa80f6228459890f9118ad909 (patch)
treef9e8290d6c013e7e3086a8c53bf436fe33c57824 /src/mesa/shader/shader_api.c
parent274ac7a801766a0ae766219ec6a40ed52e479d07 (diff)
Start fixing some issues with uniform variables and their types.
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 74bdef061b5..418ef5c7239 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -638,12 +638,8 @@ _mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
GLsizei maxLength, GLsizei *length, GLint *size,
GLenum *type, GLchar *nameOut)
{
- static const GLenum vec_types[] = {
- GL_FLOAT, GL_FLOAT_VEC2, GL_FLOAT_VEC3, GL_FLOAT_VEC4
- };
struct gl_shader_program *shProg
= _mesa_lookup_shader_program(ctx, program);
- GLint sz;
GLuint ind, j;
if (!shProg) {
@@ -664,11 +660,10 @@ _mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
/* found it */
copy_string(nameOut, maxLength, length,
shProg->Uniforms->Parameters[j].Name);
- sz = shProg->Uniforms->Parameters[j].Size;
if (size)
- *size = sz;
+ *size = shProg->Uniforms->Parameters[j].Size;
if (type)
- *type = vec_types[sz-1]; /* XXX this is a temporary hack */
+ *type = shProg->Uniforms->Parameters[j].DataType;
return;
}
ind++;