diff options
author | Samuel Pitoiset <[email protected]> | 2017-08-24 12:09:23 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-08-25 11:35:30 +0200 |
commit | f0476e00207950cc13e9c845ac4a0203f7e39296 (patch) | |
tree | 0dd33e08b9ac0875ecd27975724275f471d92704 /src/mesa | |
parent | 1c88ed9558ef38a1334cb63bff16af0c19e69054 (diff) |
mesa: add resume_transform_feedback() helper
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/transformfeedback.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index c7db48c593b..02867b5b890 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -1237,6 +1237,20 @@ _mesa_PauseTransformFeedback(void) * Resume transform feedback. * Part of GL_ARB_transform_feedback2. */ +static void +resume_transform_feedback(struct gl_context *ctx, + struct gl_transform_feedback_object *obj) +{ + FLUSH_VERTICES(ctx, 0); + ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback; + + obj->Paused = GL_FALSE; + + assert(ctx->Driver.ResumeTransformFeedback); + ctx->Driver.ResumeTransformFeedback(ctx, obj); +} + + void GLAPIENTRY _mesa_ResumeTransformFeedback(void) { @@ -1262,13 +1276,7 @@ _mesa_ResumeTransformFeedback(void) return; } - FLUSH_VERTICES(ctx, 0); - ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback; - - obj->Paused = GL_FALSE; - - assert(ctx->Driver.ResumeTransformFeedback); - ctx->Driver.ResumeTransformFeedback(ctx, obj); + resume_transform_feedback(ctx, obj); } extern void GLAPIENTRY |