[Mesa-dev] [PATCH 05/14] mesa: add end_transform_feedback() helper
Samuel Pitoiset
samuel.pitoiset at gmail.com
Thu Aug 24 13:21:13 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mesa/main/transformfeedback.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 47c72ca1b1..b32d0e6c53 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -491,6 +491,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)
{
@@ -505,15 +521,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);
}
--
2.14.1
More information about the mesa-dev
mailing list