mesa: protect driver.flush() with FLUSH_CURRENT
Need to do this to ensure vbo code unmaps its buffers before calling the driver, which may be sitting on top of a memory manager which objects to firing commands from a mapped buffer.
This commit is contained in:

committed by
José Fonseca

parent
c1a3b85280
commit
009749b4a8
@@ -187,7 +187,7 @@ GLfloat _mesa_ubyte_to_float_color_tab[256];
|
||||
void
|
||||
_mesa_notifySwapBuffers(__GLcontext *ctx)
|
||||
{
|
||||
FLUSH_VERTICES( ctx, 0 );
|
||||
FLUSH_CURRENT( ctx, 0 );
|
||||
if (ctx->Driver.Flush) {
|
||||
ctx->Driver.Flush(ctx);
|
||||
}
|
||||
@@ -1514,6 +1514,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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user