diff options
author | Brian Paul <brianp@vmware.com> | 2010-05-14 08:03:42 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-05-14 08:17:02 -0600 |
commit | 39c13a115eb45fb6c711cd86cda3a0c178975b52 (patch) | |
tree | bb566191f5a215875f5106a9cd1f1aad7ceb8534 | |
parent | 34c20fd4f5a542222aef5a008f0fe64d8c447794 (diff) |
mesa: another transform feedback error check, 80-col wrapping
-rw-r--r-- | src/mesa/main/transformfeedback.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index cd3dd9b38c..050ebf0270 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -190,7 +190,8 @@ _mesa_free_transform_feedback(GLcontext *ctx) /* Delete the default feedback object */ assert(ctx->Driver.DeleteTransformFeedback); - ctx->Driver.DeleteTransformFeedback(ctx, ctx->TransformFeedback.DefaultObject); + ctx->Driver.DeleteTransformFeedback(ctx, + ctx->TransformFeedback.DefaultObject); ctx->TransformFeedback.CurrentObject = NULL; } @@ -749,7 +750,7 @@ _mesa_BindTransformFeedback(GLenum target, GLuint name) if (ctx->TransformFeedback.CurrentObject->Active && !ctx->TransformFeedback.CurrentObject->Paused) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glBindTransformFeedback(transform is active, or not paused)"); + "glBindTransformFeedback(transform is active, or not paused)"); return; } @@ -844,7 +845,7 @@ _mesa_ResumeTransformFeedback(void) if (!obj->Active || !obj->Paused) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glPauseTransformFeedback(feedback not active or not paused)"); + "glPauseTransformFeedback(feedback not active or not paused)"); return; } @@ -871,6 +872,11 @@ _mesa_DrawTransformFeedback(GLenum mode, GLuint name) struct gl_transform_feedback_object *obj = lookup_transform_feedback_object(ctx, name); + if (mode > GL_POLYGON) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glDrawTransformFeedback(mode=0x%x)", mode); + return; + } if (!obj) { _mesa_error(ctx, GL_INVALID_VALUE, "glDrawTransformFeedback(name = %u)", name); |