From fd2c55b4bdfbc959c10aca9de4d930a224929bc8 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 20 Sep 2022 13:32:07 +0200 Subject: [PATCH] radv: make sure to initialize wd_switch_on_eop before checking its value This is technically not a bug because it might just trigger SWITCH_ON_EOI when streamout is used and I think it was fine. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7303 Signed-off-by: Samuel Pitoiset Reviewed-By: Mike Blumenkrantz Part-of: (cherry picked from commit 578e30f3e61f9fc58b738b61b91b23c94973f59e) --- .pick_status.json | 2 +- src/amd/vulkan/si_cmd_buffer.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index bf7bc39baf1..6829d91d5dd 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2533,7 +2533,7 @@ "description": "radv: make sure to initialize wd_switch_on_eop before checking its value", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index fdc8ab5ddd6..11ebd265de2 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -861,6 +861,12 @@ si_get_ia_multi_vgt_param(struct radv_cmd_buffer *cmd_buffer, bool instanced_dra if (gfx_level <= GFX8 && info->max_se == 4 && multi_instances_smaller_than_primgroup) wd_switch_on_eop = true; + /* Hardware requirement when drawing primitives from a stream + * output buffer. + */ + if (count_from_stream_output) + wd_switch_on_eop = true; + /* Required on GFX7 and later. */ if (info->max_se > 2 && !wd_switch_on_eop) ia_switch_on_eoi = true; @@ -877,12 +883,6 @@ si_get_ia_multi_vgt_param(struct radv_cmd_buffer *cmd_buffer, bool instanced_dra if (family == CHIP_BONAIRE && ia_switch_on_eoi && (instanced_draw || indirect_draw)) partial_vs_wave = true; - /* Hardware requirement when drawing primitives from a stream - * output buffer. - */ - if (count_from_stream_output) - wd_switch_on_eop = true; - /* If the WD switch is false, the IA switch must be false too. */ assert(wd_switch_on_eop || !ia_switch_on_eop); }