diff options
author | Eric Anholt <eric@anholt.net> | 2012-03-14 14:44:22 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2012-03-19 22:01:53 -0700 |
commit | 56118ef9292caa947216d6b0a75c6ae588419556 (patch) | |
tree | 6c90f3b763463fde7899f316fa99282359424b5f /src/mesa/main/transformfeedback.c | |
parent | 7ca4f07b5b77ccac0a9b60dc5ac9082906b5947e (diff) | |
download | external_mesa3d-56118ef9292caa947216d6b0a75c6ae588419556.zip external_mesa3d-56118ef9292caa947216d6b0a75c6ae588419556.tar.gz external_mesa3d-56118ef9292caa947216d6b0a75c6ae588419556.tar.bz2 |
mesa: Validate the drawing primitive against the transform feedback mode.
Fixes piglit GL_EXT_transform_feedback/negative-prims.
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/main/transformfeedback.c')
-rw-r--r-- | src/mesa/main/transformfeedback.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index c2114c2..f2c1435 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -89,33 +89,6 @@ reference_transform_feedback_object(struct gl_transform_feedback_object **ptr, /** - * Check if the given primitive mode (as in glBegin(mode)) is compatible - * with the current transform feedback mode (if it's enabled). - * This is to be called from glBegin(), glDrawArrays(), glDrawElements(), etc. - * - * \return GL_TRUE if the mode is OK, GL_FALSE otherwise. - */ -GLboolean -_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode) -{ - if (ctx->TransformFeedback.CurrentObject->Active && - !ctx->TransformFeedback.CurrentObject->Paused) { - switch (mode) { - case GL_POINTS: - return ctx->TransformFeedback.Mode == GL_POINTS; - case GL_LINES: - case GL_LINE_STRIP: - case GL_LINE_LOOP: - return ctx->TransformFeedback.Mode == GL_LINES; - default: - return ctx->TransformFeedback.Mode == GL_TRIANGLES; - } - } - return GL_TRUE; -} - - -/** * Check that all the buffer objects currently bound for transform * feedback actually exist. Raise a GL_INVALID_OPERATION error if * any buffers are missing. |