diff options
author | Paul Berry <[email protected]> | 2012-12-15 14:21:32 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-12-18 09:02:53 -0800 |
commit | 5b7099c74d7774dc59895536bad53bd1196e398c (patch) | |
tree | 5571409df894f68003491baa6f6476161ec898b7 /src/mesa/main/transformfeedback.c | |
parent | 1ad516207d2297b14fe26627e5bb599a9f704ac5 (diff) |
mesa: Make a function is_transform_feedback_active_and_unpaused.
The rather unweildy logic for determining this condition was repeated
in a large number of places. This patch consolidates it to a single
inline function.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/transformfeedback.c')
-rw-r--r-- | src/mesa/main/transformfeedback.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 61f2f4f11d0..42f38e0cc4a 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -819,8 +819,7 @@ _mesa_BindTransformFeedback(GLenum target, GLuint name) return; } - if (ctx->TransformFeedback.CurrentObject->Active && - !ctx->TransformFeedback.CurrentObject->Paused) { + if (_mesa_is_xfb_active_and_unpaused(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glBindTransformFeedback(transform is active, or not paused)"); return; @@ -890,7 +889,7 @@ _mesa_PauseTransformFeedback(void) obj = ctx->TransformFeedback.CurrentObject; - if (!obj->Active || obj->Paused) { + if (!_mesa_is_xfb_active_and_unpaused(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glPauseTransformFeedback(feedback not active or already paused)"); return; |