From: Marta Lofstedt <marta.lofst...@intel.com> According to the OpenGL ES standard, 7.3. For a call to glCreateShaderProgram with count < 0, a GL_INVALID_VALUE error should be generated.
Signed-off-by: Marta Lofstedt <marta.lofst...@linux.intel.com> --- src/mesa/main/shaderapi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index c783c69..266064d 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1890,6 +1890,15 @@ _mesa_create_shader_program(struct gl_context* ctx, GLboolean separate, const GLuint shader = create_shader(ctx, type); GLuint program = 0; + /* + * According to OpenGL ES 3.1 standard 7.3: GL_INVALID_VALUE + * should be generated, if count < 0. + */ + if (_mesa_is_gles31(ctx) && count < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glCreateShaderProgram (count < 0)"); + return program; + } + if (shader) { _mesa_ShaderSource(shader, count, strings, NULL); -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev