mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
mesa: fix regression from b4bb668020
Pending commands to the previous context aren't flushed since commit b4bb668
Reported-by: Oleksiy Krivoshey <oleksiyk@gmail.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
This commit is contained in:
parent
cb7a36b651
commit
93102b4cd8
1 changed files with 7 additions and 0 deletions
|
|
@ -1399,6 +1399,8 @@ _mesa_make_current( struct gl_context *newCtx,
|
|||
struct gl_framebuffer *drawBuffer,
|
||||
struct gl_framebuffer *readBuffer )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(curCtx);
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(newCtx, "_mesa_make_current()\n");
|
||||
|
||||
|
|
@ -1419,6 +1421,11 @@ _mesa_make_current( struct gl_context *newCtx,
|
|||
}
|
||||
}
|
||||
|
||||
if (curCtx &&
|
||||
(curCtx->WinSysDrawBuffer || curCtx->WinSysReadBuffer) && /* make sure this context is valid for flushing */
|
||||
curCtx != newCtx)
|
||||
_mesa_flush(curCtx);
|
||||
|
||||
/* We used to call _glapi_check_multithread() here. Now do it in drivers */
|
||||
_glapi_set_context((void *) newCtx);
|
||||
ASSERT(_mesa_get_current_context() == newCtx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue