diff options
| author | marha <marha@users.sourceforge.net> | 2015-04-30 23:24:30 +0200 |
|---|---|---|
| committer | marha <marha@users.sourceforge.net> | 2015-04-30 23:24:30 +0200 |
| commit | a71d524ecad48837e0124a03124bc05f59a48be7 (patch) | |
| tree | 87c5ba1711e03cb9692e23cc685b938571b52d76 /mesalib/src/mesa/main/uniform_query.cpp | |
| parent | 2a00e489122f6c4b525090dbdba2855a2ea2d519 (diff) | |
| download | vcxsrv-a71d524ecad48837e0124a03124bc05f59a48be7.tar.gz vcxsrv-a71d524ecad48837e0124a03124bc05f59a48be7.tar.bz2 vcxsrv-a71d524ecad48837e0124a03124bc05f59a48be7.zip | |
fontconfig pixman libX11 mesa git update 30 Apr 2015
libX11 commit d3415d1f052530760b4617db45affcb984cfe35c
pixman commit e0c0153d8e5d42c08c2b9bd2cf2123bff2c48d75
fontconfig commit 4a6f5efd5f6a468e1872d58e589bcf30ba88e2fd
mesa commit 1ac7db07b363207e8ded9259f84bbcaa084b8667
Diffstat (limited to 'mesalib/src/mesa/main/uniform_query.cpp')
| -rw-r--r-- | mesalib/src/mesa/main/uniform_query.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/uniform_query.cpp b/mesalib/src/mesa/main/uniform_query.cpp index 4e77b3284..3e857ed10 100644 --- a/mesalib/src/mesa/main/uniform_query.cpp +++ b/mesalib/src/mesa/main/uniform_query.cpp @@ -129,14 +129,26 @@ _mesa_GetActiveUniformsiv(GLuint program, res_prop = resource_prop_from_uniform_prop(pname); + /* We need to first verify that each entry exists as active uniform. If + * not, generate error and do not cause any other side effects. + * + * In the case of and error condition, Page 16 (section 2.3.1 Errors) + * of the OpenGL 4.5 spec says: + * + * "If the generating command modifies values through a pointer argu- + * ment, no change is made to these values." + */ for (int i = 0; i < uniformCount; i++) { - res = _mesa_program_resource_find_index(shProg, GL_UNIFORM, - uniformIndices[i]); - if (!res) { + if (!_mesa_program_resource_find_index(shProg, GL_UNIFORM, + uniformIndices[i])) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformsiv(index)"); - break; + return; } + } + for (int i = 0; i < uniformCount; i++) { + res = _mesa_program_resource_find_index(shProg, GL_UNIFORM, + uniformIndices[i]); if (!_mesa_program_resource_prop(shProg, res, uniformIndices[i], res_prop, ¶ms[i], "glGetActiveUniformsiv")) |
