mesa: do FLUSH_VERTICES() in _mesa_flush/finish()
authorBrian Paul <brianp@vmware.com>
Wed, 9 May 2012 17:56:10 +0000 (11:56 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 11 May 2012 22:13:14 +0000 (16:13 -0600)
This was being done in the _mesa_Flush/Finish() calls but if there
was an internal call to _mesa_flush/finish() the FLUSH_VERTICES()
wouldn't happen.  Looks like only the intel and radeon drivers made
such calls in MakeCurrent().

src/mesa/main/context.c

index 7e2ac98b9a0d5d872f2b02f31cd77f412fa05209..bafd250a15c27e532364b18f92b028253538300b 100644 (file)
@@ -1635,6 +1635,7 @@ _mesa_record_error(struct gl_context *ctx, GLenum error)
 void
 _mesa_finish(struct gl_context *ctx)
 {
+   FLUSH_VERTICES( ctx, 0 );
    FLUSH_CURRENT( ctx, 0 );
    if (ctx->Driver.Finish) {
       ctx->Driver.Finish(ctx);
@@ -1648,6 +1649,7 @@ _mesa_finish(struct gl_context *ctx)
 void
 _mesa_flush(struct gl_context *ctx)
 {
+   FLUSH_VERTICES( ctx, 0 );
    FLUSH_CURRENT( ctx, 0 );
    if (ctx->Driver.Flush) {
       ctx->Driver.Flush(ctx);
@@ -1666,7 +1668,7 @@ void GLAPIENTRY
 _mesa_Finish(void)
 {
    GET_CURRENT_CONTEXT(ctx);
-   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
    _mesa_finish(ctx);
 }
 
@@ -1681,7 +1683,7 @@ void GLAPIENTRY
 _mesa_Flush(void)
 {
    GET_CURRENT_CONTEXT(ctx);
-   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
    _mesa_flush(ctx);
 }