From d9408eec593a0ce119f93f263a4626d90773747a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 12 Oct 2025 22:42:59 -0400 Subject: [PATCH] radeonsi: rename num_active_shader_queries -> streamout.num_ngg_queries Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/gfx11_query.c | 8 ++++---- src/gallium/drivers/radeonsi/si_pipe.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/gfx11_query.c b/src/gallium/drivers/radeonsi/gfx11_query.c index ecade746fe7..0d8b228694a 100644 --- a/src/gallium/drivers/radeonsi/gfx11_query.c +++ b/src/gallium/drivers/radeonsi/gfx11_query.c @@ -101,7 +101,7 @@ static bool gfx11_alloc_query_buffer(struct si_context *sctx) list_addtail(&qbuf->list, &sctx->shader_query_buffers); qbuf->head = 0; - qbuf->refcount = sctx->num_active_shader_queries; + qbuf->refcount = sctx->streamout.num_ngg_queries; success:; struct pipe_shader_buffer sbuf; @@ -135,7 +135,7 @@ static bool gfx11_sh_query_begin(struct si_context *sctx, struct si_query *rquer query->first = list_last_entry(&sctx->shader_query_buffers, struct gfx11_sh_query_buffer, list); query->first_begin = query->first->head; - sctx->num_active_shader_queries++; + sctx->streamout.num_ngg_queries++; query->first->refcount++; return true; @@ -161,9 +161,9 @@ static bool gfx11_sh_query_end(struct si_context *sctx, struct si_query *rquery) 0xffffffff, PIPE_QUERY_GPU_FINISHED); } - sctx->num_active_shader_queries--; + sctx->streamout.num_ngg_queries--; - if (sctx->num_active_shader_queries <= 0 || !si_is_atom_dirty(sctx, &sctx->atoms.s.shader_query)) { + if (sctx->streamout.num_ngg_queries <= 0 || !si_is_atom_dirty(sctx, &sctx->atoms.s.shader_query)) { si_set_internal_shader_buffer(sctx, SI_GS_QUERY_BUF, NULL); SET_FIELD(sctx->current_gs_state, GS_STATE_STREAMOUT_QUERY_ENABLED, 0); diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index a260f953397..5fa878b414f 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -838,6 +838,7 @@ struct si_streamout { bool streamout_enabled; bool prims_gen_query_enabled; int num_prims_gen_queries; + int num_ngg_queries; }; /* A shader state consists of the shader selector, which is a constant state @@ -1346,7 +1347,6 @@ struct si_context { /* Shader-based queries. */ struct list_head shader_query_buffers; - unsigned num_active_shader_queries; struct { bool with_cb;