diff options
author | Ian Romanick <[email protected]> | 2011-09-07 10:41:32 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-10-18 17:26:38 -0700 |
commit | 1375d67984f0cd01efa7b256864f21dc4ff75982 (patch) | |
tree | 764b916797154d3daa3bf0101c6cbeb2aa05e0f3 /src/mesa/main | |
parent | a541ff3fb99f43f9f664daf275e315af2836977e (diff) |
mesa: Use glsl_type::gl_type in glGetActiveUniform
This has the same value has gl_program_parameter::DataType field.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/uniform_query.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 3164d7203de..ba7d7591f15 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -54,12 +54,14 @@ _mesa_GetActiveUniformARB(GLhandleARB program, GLuint index, if (!param) return; + const struct gl_uniform *const uni = &shProg->Uniforms->Uniforms[index]; + if (nameOut) { _mesa_copy_string(nameOut, maxLength, length, param->Name); } if (size) { - GLint typeSize = _mesa_sizeof_glsl_type(param->DataType); + GLint typeSize = _mesa_sizeof_glsl_type(uni->Type->gl_type); if ((GLint) param->Size > typeSize) { /* This is an array. * Array elements are placed on vector[4] boundaries so they're @@ -73,6 +75,6 @@ _mesa_GetActiveUniformARB(GLhandleARB program, GLuint index, } if (type) { - *type = param->DataType; + *type = uni->Type->gl_type; } } |