diff options
author | Kenneth Graunke <[email protected]> | 2013-09-06 12:38:12 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-09-12 10:18:59 -0700 |
commit | a7d616da69d631cc088c01b761a8b1b8b36c6b13 (patch) | |
tree | 5da1da552fc80653cf3dc0d99b13eb0da39de7d8 /src/mesa/main/transformfeedback.c | |
parent | 2487324591c1629492288a814e1d8a3046d37b15 (diff) |
mesa: Disallow TransformFeedbackVaryings when active.
Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/transformfeedback.c')
-rw-r--r-- | src/mesa/main/transformfeedback.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; |