diff options
author | Samuel Pitoiset <[email protected]> | 2017-08-24 12:01:27 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-08-25 11:35:29 +0200 |
commit | 654587696b4234d09a6b471b70e9629cf2887c27 (patch) | |
tree | 14e201fdf18c921a879b8dc28c62b0215c9ea5da /src/mesa/main/transformfeedback.c | |
parent | 3906e8ab6477af71e5c84cae17ee1efa1b9e541d (diff) |
mesa: add end_transform_feedback() helper
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/transformfeedback.c')
-rw-r--r-- | src/mesa/main/transformfeedback.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 525c5b7a5b8..d1d695ce485 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -495,6 +495,22 @@ _mesa_BeginTransformFeedback(GLenum mode) } +static void +end_transform_feedback(struct gl_context *ctx, + struct gl_transform_feedback_object *obj) +{ + FLUSH_VERTICES(ctx, 0); + ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback; + + assert(ctx->Driver.EndTransformFeedback); + ctx->Driver.EndTransformFeedback(ctx, obj); + + ctx->TransformFeedback.CurrentObject->Active = GL_FALSE; + ctx->TransformFeedback.CurrentObject->Paused = GL_FALSE; + ctx->TransformFeedback.CurrentObject->EndedAnytime = GL_TRUE; +} + + void GLAPIENTRY _mesa_EndTransformFeedback(void) { @@ -509,15 +525,7 @@ _mesa_EndTransformFeedback(void) return; } - FLUSH_VERTICES(ctx, 0); - ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback; - - assert(ctx->Driver.EndTransformFeedback); - ctx->Driver.EndTransformFeedback(ctx, obj); - - ctx->TransformFeedback.CurrentObject->Active = GL_FALSE; - ctx->TransformFeedback.CurrentObject->Paused = GL_FALSE; - ctx->TransformFeedback.CurrentObject->EndedAnytime = GL_TRUE; + end_transform_feedback(ctx, obj); } |