From: Marek Olšák Date: Mon, 24 Oct 2011 00:21:48 +0000 (+0200) Subject: mesa: fix GL error checking in TransformFeedbackVaryings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f77aa278d354bebdbda940b31c9cccf12a5d146f;p=mesa.git mesa: fix GL error checking in TransformFeedbackVaryings Reviewed-by: Kenneth Graunke Reviewed-by: Eric Anholt --- 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;