From: Fabian Bieler Date: Wed, 29 May 2013 22:17:42 +0000 (+0200) Subject: mesa/shaderapi: Allow 0 GEOMETRY_VERTICES_OUT. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39ca58192b093607a5c7bb59d2f8cb13fbc63c63;p=mesa.git mesa/shaderapi: Allow 0 GEOMETRY_VERTICES_OUT. ARB_geometry_shader4 spec Errors: "The error INVALID_VALUE is generated by ProgramParameteriARB if is GEOMETRY_VERTICES_OUT_ARB and is negative." Reviewed-by: Paul Berry Reviewed-by: Ian Romanick Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 858cec57f7c..f3ae4f5d8fa 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1634,7 +1634,7 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value) if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_geometry_shader4) break; - if (value < 1 || + if (value < 0 || (unsigned) value > ctx->Const.MaxGeometryOutputVertices) { _mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameteri(GL_GEOMETRY_VERTICES_OUT_ARB=%d)",