Module: Mesa Branch: main Commit: bbaf4f1954af5137d809b9d5509c91e7a2ee3fee URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bbaf4f1954af5137d809b9d5509c91e7a2ee3fee
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Mon May 2 15:16:29 2022 +0200 radeonsi: store the pipeline stats index Will be used in later commits. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15861> --- src/gallium/drivers/radeonsi/si_query.c | 1 + src/gallium/drivers/radeonsi/si_query.h | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_query.c b/src/gallium/drivers/radeonsi/si_query.c index 5e24fe54e67..d9cf2715fc3 100644 --- a/src/gallium/drivers/radeonsi/si_query.c +++ b/src/gallium/drivers/radeonsi/si_query.c @@ -729,6 +729,7 @@ static struct pipe_query *si_query_hw_create(struct si_screen *sscreen, unsigned query->result_size = 11 * 16; query->result_size += 8; /* for the fence + alignment */ query->b.num_cs_dw_suspend = 6 + si_cp_write_fence_dwords(sscreen); + query->index = index; break; default: assert(0); diff --git a/src/gallium/drivers/radeonsi/si_query.h b/src/gallium/drivers/radeonsi/si_query.h index a5860278eba..b169da16fca 100644 --- a/src/gallium/drivers/radeonsi/si_query.h +++ b/src/gallium/drivers/radeonsi/si_query.h @@ -211,8 +211,12 @@ struct si_query_hw { /* Size of the result in memory for both begin_query and end_query, * this can be one or two numbers, or it could even be a size of a structure. */ unsigned result_size; - /* For transform feedback: which stream the query is for */ - unsigned stream; + union { + /* For transform feedback: which stream the query is for */ + unsigned stream; + /* For pipeline stats: which counter is active */ + unsigned index; + }; /* Workaround via compute shader */ struct si_resource *workaround_buf;
