glthread: leave dlist dispatch in place for Begin/End

If Begin/End are called from a display list make sure to leave
the dlist.c's dispatch table in place just like the non-glthread
code does.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7335
Fixes: 7f1cac7ba6 ("mesa/glthread: enable immediate mode")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19088>
This commit is contained in:
Timothy Arceri
2022-10-15 21:33:14 +11:00
committed by Marge Bot
parent ca02da294a
commit 7dcdd51938

View File

@@ -855,7 +855,8 @@ _mesa_Begin(GLenum mode)
* leave dlist.c's dispatch table in place.
*/
if (ctx->GLThread.enabled) {
ctx->CurrentServerDispatch = ctx->Exec;
if (ctx->CurrentServerDispatch == ctx->OutsideBeginEnd)
ctx->CurrentServerDispatch = ctx->Exec;
} else if (ctx->CurrentClientDispatch == ctx->OutsideBeginEnd) {
ctx->CurrentClientDispatch = ctx->CurrentServerDispatch = ctx->Exec;
_glapi_set_dispatch(ctx->CurrentClientDispatch);
@@ -914,7 +915,10 @@ _mesa_End(void)
ctx->Exec = ctx->OutsideBeginEnd;
if (ctx->GLThread.enabled) {
ctx->CurrentServerDispatch = ctx->Exec;
if (ctx->CurrentServerDispatch == ctx->BeginEnd ||
ctx->CurrentServerDispatch == ctx->HWSelectModeBeginEnd) {
ctx->CurrentServerDispatch = ctx->Exec;
}
} else if (ctx->CurrentClientDispatch == ctx->BeginEnd ||
ctx->CurrentClientDispatch == ctx->HWSelectModeBeginEnd) {
ctx->CurrentClientDispatch = ctx->CurrentServerDispatch = ctx->Exec;