summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-10-22 18:38:19 -0600
committerBrian Paul <brianp@vmware.com>2009-10-22 18:38:19 -0600
commitab9d1011f5549502a4b960c2067cde69856a2719 (patch)
tree21e45f55898d31001aa9cbc5ec5469974c94c75a /src/mesa/main
parent347fb3737be03488827d25610bec59cfb05bcab0 (diff)
parent55058652b886b95bfc24109a9edb04d274c01c1a (diff)
Merge branch 'mesa_7_6_branch'
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c37
-rw-r--r--src/mesa/main/context.h8
2 files changed, 37 insertions, 8 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index ea1ee22812..490b8f0f33 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1505,6 +1505,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
@@ -1515,10 +1542,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);
}
@@ -1533,10 +1557,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);
}
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 5587695fa0..c3be1063f8 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -170,6 +170,14 @@ _mesa_valid_to_render(GLcontext *ctx, const char *where);
extern void
_mesa_record_error( GLcontext *ctx, GLenum error );
+
+extern void
+_mesa_finish(GLcontext *ctx);
+
+extern void
+_mesa_flush(GLcontext *ctx);
+
+
extern void GLAPIENTRY
_mesa_Finish( void );