From: Kenneth Graunke Date: Fri, 6 Sep 2013 19:38:12 +0000 (-0700) Subject: mesa: Disallow TransformFeedbackVaryings when active. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7d616da69d631cc088c01b761a8b1b8b36c6b13;p=mesa.git mesa: Disallow TransformFeedbackVaryings when active. Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test. Signed-off-by: Kenneth Graunke Reviewed-by: Marek Olšák --- diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 3f8a7f48dad..eca0e5f55c9 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -611,6 +611,16 @@ _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count, GLint i; GET_CURRENT_CONTEXT(ctx); + /* From the ARB_transform_feedback2 specification: + * "The error INVALID_OPERATION is generated by TransformFeedbackVaryings + * if the current transform feedback object is active, even if paused." + */ + if (ctx->TransformFeedback.CurrentObject->Active) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTransformFeedbackVaryings(current object is active)"); + return; + } + switch (bufferMode) { case GL_INTERLEAVED_ATTRIBS: break;