diff options
author | Samuel Pitoiset <[email protected]> | 2017-08-24 12:29:50 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-08-25 11:35:29 +0200 |
commit | 061a1eebe193094d0f672b0f9b21db6f4ade3cee (patch) | |
tree | d3982c3b5bfd373e74695aba2db139b0d942ad01 /src/mesa | |
parent | 08cecec3c0053ea9b95ac38a05da672bf05af19a (diff) |
mesa: add pause_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 8e6ea9c9ca2..633b629a9d0 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -1193,6 +1193,20 @@ _mesa_DeleteTransformFeedbacks(GLsizei n, const GLuint *names) * Pause transform feedback. * Part of GL_ARB_transform_feedback2. */ +static void +pause_transform_feedback(struct gl_context *ctx, + struct gl_transform_feedback_object *obj) +{ + FLUSH_VERTICES(ctx, 0); + ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback; + + assert(ctx->Driver.PauseTransformFeedback); + ctx->Driver.PauseTransformFeedback(ctx, obj); + + obj->Paused = GL_TRUE; +} + + void GLAPIENTRY _mesa_PauseTransformFeedback(void) { @@ -1207,13 +1221,7 @@ _mesa_PauseTransformFeedback(void) return; } - FLUSH_VERTICES(ctx, 0); - ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback; - - assert(ctx->Driver.PauseTransformFeedback); - ctx->Driver.PauseTransformFeedback(ctx, obj); - - obj->Paused = GL_TRUE; + pause_transform_feedback(ctx, obj); } |