aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-22 18:16:10 -0600
committerBrian Paul <[email protected]>2009-10-22 18:16:10 -0600
commit4837e01bcd3d011a38d75cc9f1eff629c3de6fd6 (patch)
treea377f11390e83b3b89dc010b7d8a20fc01556b04 /src/mesa/main/context.c
parent61a96a2ac72b3f071151de436a48c6ec985e3653 (diff)
mesa: code refactoring- new _mesa_finish(), _mesa_flush()
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c37
1 files changed, 29 insertions, 8 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index ac6540f4a06..e844a7432df 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1544,6 +1544,33 @@ _mesa_record_error(GLcontext *ctx, GLenum error)
/**
+ * Flush commands and wait for completion.
+ */
+void
+_mesa_finish(GLcontext *ctx)
+{
+ FLUSH_CURRENT( ctx, 0 );
+ if (ctx->Driver.Finish) {
+ ctx->Driver.Finish(ctx);
+ }
+}
+
+
+/**
+ * Flush commands.
+ */
+void
+_mesa_flush(GLcontext *ctx)
+{
+ FLUSH_CURRENT( ctx, 0 );
+ if (ctx->Driver.Flush) {
+ ctx->Driver.Flush(ctx);
+ }
+}
+
+
+
+/**
* Execute glFinish().
*
* Calls the #ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH macro and the
@@ -1554,10 +1581,7 @@ _mesa_Finish(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- FLUSH_CURRENT( ctx, 0 );
- if (ctx->Driver.Finish) {
- ctx->Driver.Finish(ctx);
- }
+ _mesa_finish(ctx);
}
@@ -1572,10 +1596,7 @@ _mesa_Flush(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- FLUSH_CURRENT( ctx, 0 );
- if (ctx->Driver.Flush) {
- ctx->Driver.Flush(ctx);
- }
+ _mesa_flush(ctx);
}