mesa: use ctx->GLThread.enabled now that it's correct
authorMarek Olšák <marek.olsak@amd.com>
Mon, 29 Nov 2021 19:04:42 +0000 (14:04 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 14 Dec 2021 17:01:07 +0000 (12:01 -0500)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>

src/mesa/main/dlist.c
src/mesa/state_tracker/st_draw.c
src/mesa/vbo/vbo_exec_api.c

index bbe5ef6..02e4d6a 100644 (file)
@@ -13512,7 +13512,7 @@ _mesa_NewList(GLuint name, GLenum mode)
 
    ctx->CurrentServerDispatch = ctx->Save;
    _glapi_set_dispatch(ctx->CurrentServerDispatch);
-   if (ctx->MarshalExec == NULL) {
+   if (!ctx->GLThread.enabled) {
       ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
    }
 }
@@ -13724,7 +13724,7 @@ _mesa_EndList(void)
 
    ctx->CurrentServerDispatch = ctx->Exec;
    _glapi_set_dispatch(ctx->CurrentServerDispatch);
-   if (ctx->MarshalExec == NULL) {
+   if (!ctx->GLThread.enabled) {
       ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
    }
 }
@@ -13766,7 +13766,7 @@ _mesa_CallList(GLuint list)
    if (save_compile_flag) {
       ctx->CurrentServerDispatch = ctx->Save;
        _glapi_set_dispatch(ctx->CurrentServerDispatch);
-      if (ctx->MarshalExec == NULL) {
+      if (!ctx->GLThread.enabled) {
          ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
       }
    }
@@ -13952,7 +13952,7 @@ _mesa_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
    if (save_compile_flag) {
       ctx->CurrentServerDispatch = ctx->Save;
       _glapi_set_dispatch(ctx->CurrentServerDispatch);
-      if (ctx->MarshalExec == NULL) {
+      if (!ctx->GLThread.enabled) {
          ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
       }
    }
index 4d0420a..e9fe907 100644 (file)
@@ -109,7 +109,7 @@ prepare_draw(struct st_context *st, struct gl_context *ctx, uint64_t state_mask,
     */
    if (unlikely(st->pin_thread_counter != ST_L3_PINNING_DISABLED &&
                 /* no glthread */
-                ctx->CurrentClientDispatch != ctx->MarshalExec &&
+                !ctx->GLThread.enabled &&
                 /* do it occasionally */
                 ++st->pin_thread_counter % 512 == 0)) {
       st->pin_thread_counter = 0;
index f4a924f..e52285f 100644 (file)
@@ -849,7 +849,7 @@ _mesa_Begin(GLenum mode)
    /* We may have been called from a display list, in which case we should
     * leave dlist.c's dispatch table in place.
     */
-   if (ctx->CurrentClientDispatch == ctx->MarshalExec) {
+   if (ctx->GLThread.enabled) {
       ctx->CurrentServerDispatch = ctx->Exec;
    } else if (ctx->CurrentClientDispatch == ctx->OutsideBeginEnd) {
       ctx->CurrentClientDispatch = ctx->Exec;
@@ -908,7 +908,7 @@ _mesa_End(void)
 
    ctx->Exec = ctx->OutsideBeginEnd;
 
-   if (ctx->CurrentClientDispatch == ctx->MarshalExec) {
+   if (ctx->GLThread.enabled) {
       ctx->CurrentServerDispatch = ctx->Exec;
    } else if (ctx->CurrentClientDispatch == ctx->BeginEnd) {
       ctx->CurrentClientDispatch = ctx->Exec;