From: Samuel Pitoiset Date: Wed, 16 Nov 2022 14:49:24 +0000 (+0100) Subject: radv: suspend/resume XFB queries with NGG for meta operations X-Git-Tag: upstream/22.3.5~413 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7964efaa975dc3865b58bc3eaa4ed040995d1d8b;p=platform%2Fupstream%2Fmesa.git radv: suspend/resume XFB queries with NGG for meta operations XFB queries enable primitives generated queries with NGG and meta operations shouldn't be counted. Reproduced on GFX10.3 by forcing NGG streamout. Cc: 22.3 mesa-stable Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: (cherry picked from commit 62356e71f431684008efc7e471bddb1ada9801a3) --- diff --git a/.pick_status.json b/.pick_status.json index a532291..623fa50 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -13,7 +13,7 @@ "description": "radv: suspend/resume XFB queries with NGG for meta operations", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c index b442c20..73ad1f5 100644 --- a/src/amd/vulkan/radv_meta.c +++ b/src/amd/vulkan/radv_meta.c @@ -62,6 +62,12 @@ radv_suspend_queries(struct radv_meta_saved_state *state, struct radv_cmd_buffer state->active_prims_gen_gds_queries = cmd_buffer->state.active_prims_gen_gds_queries; cmd_buffer->state.active_prims_gen_gds_queries = 0; } + + /* Transform feedback queries (NGG). */ + if (cmd_buffer->state.active_prims_xfb_gds_queries) { + state->active_prims_xfb_gds_queries = cmd_buffer->state.active_prims_xfb_gds_queries; + cmd_buffer->state.active_prims_xfb_gds_queries = 0; + } } static void @@ -90,6 +96,11 @@ radv_resume_queries(const struct radv_meta_saved_state *state, struct radv_cmd_b if (state->active_prims_gen_gds_queries) { cmd_buffer->state.active_prims_gen_gds_queries = state->active_prims_gen_gds_queries; } + + /* Transform feedback queries (NGG). */ + if (state->active_prims_xfb_gds_queries) { + cmd_buffer->state.active_prims_xfb_gds_queries = state->active_prims_xfb_gds_queries; + } } void @@ -106,6 +117,7 @@ radv_meta_save(struct radv_meta_saved_state *state, struct radv_cmd_buffer *cmd_ state->flags = flags; state->active_prims_gen_gds_queries = 0; + state->active_prims_xfb_gds_queries = 0; if (state->flags & RADV_META_SAVE_GRAPHICS_PIPELINE) { assert(!(state->flags & RADV_META_SAVE_COMPUTE_PIPELINE)); diff --git a/src/amd/vulkan/radv_meta.h b/src/amd/vulkan/radv_meta.h index ee54a9b..cded5fd 100644 --- a/src/amd/vulkan/radv_meta.h +++ b/src/amd/vulkan/radv_meta.h @@ -56,6 +56,7 @@ struct radv_meta_saved_state { unsigned active_pipeline_gds_queries; unsigned active_prims_gen_gds_queries; + unsigned active_prims_xfb_gds_queries; bool predicating; };