Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test.
Signed-off-by: Kenneth Graunke <[email protected]>
---
src/mesa/main/transformfeedback.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/mesa/main/transformfeedback.c
b/src/mesa/main/transformfeedback.c
index 3f8a7f4..eca0e5f 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;
--
1.8.3.4
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev