diff --git a/src/mesa/main/glthread_bufferobj.c b/src/mesa/main/glthread_bufferobj.c index 34e6ce5a907..609cb0ffcad 100644 --- a/src/mesa/main/glthread_bufferobj.c +++ b/src/mesa/main/glthread_bufferobj.c @@ -505,6 +505,7 @@ _mesa_marshal_BufferSubData_merged(GLuint target_or_name, GLintptr offset, * the buffer storage, but we don't know the buffer size in glthread. */ if (ctx->Const.AllowGLThreadBufferSubDataOpt && + ctx->CurrentServerDispatch != ctx->ContextLost && data && offset > 0 && size > 0) { struct gl_buffer_object *upload_buffer = NULL; unsigned upload_offset = 0; diff --git a/src/mesa/main/glthread_marshal.h b/src/mesa/main/glthread_marshal.h index 1aab57de21c..6e8ec0e5756 100644 --- a/src/mesa/main/glthread_marshal.h +++ b/src/mesa/main/glthread_marshal.h @@ -148,6 +148,7 @@ _mesa_glthread_update_draw_always_async(struct gl_context *ctx) /* Executing erroneous cases will just generate GL_INVALID_OPERATION. */ ctx->GLThread.draw_always_async = ctx->API == API_OPENGL_CORE || + ctx->CurrentServerDispatch == ctx->ContextLost || ctx->GLThread.inside_begin_end || ctx->GLThread.ListMode; } diff --git a/src/mesa/main/robustness.c b/src/mesa/main/robustness.c index 476dc8d4738..ffbd2fec32d 100644 --- a/src/mesa/main/robustness.c +++ b/src/mesa/main/robustness.c @@ -29,6 +29,7 @@ #include "macros.h" #include "main/dispatch.h" /* for _gloffset_COUNT */ #include "api_exec_decl.h" +#include "glthread_marshal.h" static void GLAPIENTRY _context_lost_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, @@ -104,6 +105,7 @@ _mesa_set_context_lost_dispatch(struct gl_context *ctx) ctx->CurrentServerDispatch = ctx->ContextLost; _glapi_set_dispatch(ctx->CurrentServerDispatch); + _mesa_glthread_update_draw_always_async(ctx); } /**