From f77aa278d354bebdbda940b31c9cccf12a5d146f Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 24 Oct 2011 02:21:48 +0200 Subject: mesa: fix GL error checking in TransformFeedbackVaryings Reviewed-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/main/transformfeedback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 47efad12109..86fff889122 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -603,7 +603,9 @@ _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count, return; } - if (count < 0 || count > ctx->Const.MaxTransformFeedbackSeparateAttribs) { + if (count < 0 || + (bufferMode == GL_SEPARATE_ATTRIBS && + count > ctx->Const.MaxTransformFeedbackSeparateAttribs)) { _mesa_error(ctx, GL_INVALID_VALUE, "glTransformFeedbackVaryings(count=%d)", count); return; -- cgit v1.2.3