From 39ca58192b093607a5c7bb59d2f8cb13fbc63c63 Mon Sep 17 00:00:00 2001 From: Fabian Bieler Date: Thu, 30 May 2013 00:17:42 +0200 Subject: [PATCH] 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 --- src/mesa/main/shaderapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)", -- 2.30.2