diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/uniform_query.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index ec08ed48b40..f0ab0f07996 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -122,6 +122,16 @@ _mesa_GetActiveUniformsiv(GLuint program, case GL_UNIFORM_NAME_LENGTH: params[i] = strlen(uni->name) + 1; + + /* Page 61 (page 73 of the PDF) in section 2.11 of the OpenGL ES 3.0 + * spec says: + * + * "If the active uniform is an array, the uniform name returned + * in name will always be the name of the uniform array appended + * with "[0]"." + */ + if (uni->array_elements != 0) + params[i] += 3; break; case GL_UNIFORM_BLOCK_INDEX: |