aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/uniform_query.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-01-22 14:07:34 +0100
committermarha <marha@users.sourceforge.net>2013-01-22 14:07:34 +0100
commit470f7ca9f0be348faf2f03fc16811844c5eeffce (patch)
tree3071ab9b9fbabc772ee68c86fe587f260bde26c6 /mesalib/src/mesa/main/uniform_query.cpp
parent4fc6b34d1c14cc61f553ca59264d0909656933f3 (diff)
downloadvcxsrv-470f7ca9f0be348faf2f03fc16811844c5eeffce.tar.gz
vcxsrv-470f7ca9f0be348faf2f03fc16811844c5eeffce.tar.bz2
vcxsrv-470f7ca9f0be348faf2f03fc16811844c5eeffce.zip
fontconfig libfontenc mesa mkfontscale pixman xserver xkeyboard-config
fontconfig: 000ca9ccb03013a5b151f0d21148ab0ca4c2f2de libfontenc: f5d1208172e965fdd7fae8927bd3e29b3cc3a975 mesa: 148fc6d53716f39971a453792570c2b8c207efb6 mkfontscale: 547517571e695728278a264eedbac47b6e1f43bc pixman: 2c6577476e5b18e17904ae8af244a39c352e2e33 xserver: 70b127c9f1c53bdb42f078265e67f76b464deae2 xkeyboard-config: 6b35b1b43d2fdff30f530d7cf65fffd6c3504690
Diffstat (limited to 'mesalib/src/mesa/main/uniform_query.cpp')
-rw-r--r--mesalib/src/mesa/main/uniform_query.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/mesalib/src/mesa/main/uniform_query.cpp b/mesalib/src/mesa/main/uniform_query.cpp
index efff8f381..dc550bc43 100644
--- a/mesalib/src/mesa/main/uniform_query.cpp
+++ b/mesalib/src/mesa/main/uniform_query.cpp
@@ -46,8 +46,6 @@ _mesa_GetActiveUniform(GLhandleARB program, GLuint index,
struct gl_shader_program *shProg =
_mesa_lookup_shader_program_err(ctx, program, "glGetActiveUniform");
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!shProg)
return;
@@ -59,7 +57,7 @@ _mesa_GetActiveUniform(GLhandleARB program, GLuint index,
const struct gl_uniform_storage *const uni = &shProg->UniformStorage[index];
if (nameOut) {
- _mesa_copy_string(nameOut, maxLength, length, uni->name);
+ _mesa_get_uniform_name(uni, maxLength, length, nameOut);
}
if (size) {
@@ -122,6 +120,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:
@@ -583,8 +591,6 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
enum glsl_base_type basicType;
struct gl_uniform_storage *uni;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!validate_uniform_parameters(ctx, shProg, location, count,
&loc, &offset, "glUniform", false))
return;
@@ -836,8 +842,6 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
unsigned elements;
struct gl_uniform_storage *uni;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!validate_uniform_parameters(ctx, shProg, location, count,
&loc, &offset, "glUniformMatrix", false))
return;