Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
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;