From 097d95349276362ca18132cce997f79196b2824d Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 21 Jul 2025 13:42:20 -0400 Subject: [PATCH] mesa/st: check for tc on context create MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/mesa/state_tracker/st_context.c | 2 ++ src/mesa/state_tracker/st_context.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 82fc18eac13..ef4d81e8748 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -67,6 +67,7 @@ #include "util/u_memory.h" #include "util/hash_table.h" #include "util/thread_sched.h" +#include "util/u_threaded_context.h" #include "cso_cache/cso_context.h" #include "compiler/glsl/glsl_parser_extras.h" #include "nir.h" @@ -466,6 +467,7 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe, cso_flags = 0; break; } + st->is_threaded_context = pipe->draw_vbo == tc_draw_vbo; st->cso_context = cso_create_context(pipe, cso_flags); ctx->cso_context = st->cso_context; diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index a0410e0e48b..b5c51082527 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -212,6 +212,7 @@ struct st_context bool validate_all_dirty_states; bool can_null_texture; + bool is_threaded_context; /* driver supports scissored clears */ bool can_scissor_clear;