[Mesa-dev] [PATCH 07/14] mesa: add pause_transform_feedback() helper

Samuel Pitoiset samuel.pitoiset at gmail.com
Thu Aug 24 13:21:15 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mesa/main/transformfeedback.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 2d33555f35..2da7f635ba 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -1189,6 +1189,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)
 {
@@ -1203,13 +1217,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);
 }
 
 
-- 
2.14.1



More information about the mesa-dev mailing list