radv: fix synchronization with emulated GS primitives/invocations queries
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 5 Oct 2023 06:53:04 +0000 (08:53 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 5 Oct 2023 14:17:56 +0000 (14:17 +0000)
Move emitting the EOP even which writes the availability bit after the
GDS copy to ensure it's available.

This should fix all GS primitives/invocations flakes in CI.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25457>

src/amd/ci/radv-navi10-aco-flakes.txt
src/amd/ci/radv-navi21-aco-flakes.txt
src/amd/ci/radv-vangogh-aco-flakes.txt
src/amd/vulkan/radv_query.c

index d5e0600..af305ac 100644 (file)
@@ -7,7 +7,6 @@ dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_secondary_cmdbuffers
 dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.single_cmdbuffer
 dEQP-VK.pipeline.fast_linked_library.image.suballocation.sampling_type.combined.view_type.cube_array.format.r8g8b8a8_unorm.count_4.size.32x32_array_of_36
 dEQP-VK.pipeline.monolithic.extended_dynamic_state.cmd_buffer_start.topology_line_geom
-dEQP-VK.query_pool.statistics_query.host_query_reset.geometry_shader_invocations.secondary.32bits_triangle_strip_clear_depth
 dEQP-VK.texture.filtering.3d.combinations.nearest.linear.mirror_clamp_to_edge.mirror_clamp_to_edge.repeat
 
 # Catch all the line-related flakes we see on navi10
index ee08305..213dc8c 100644 (file)
@@ -21,11 +21,6 @@ dEQP-VK.pipeline.fast_linked_library.multisample_interpolation.sample_interpolat
 
 dEQP-VK.mesh_shader.ext.query.all_stats_query.triangles.host_reset.copy.wait.indirect_draw.32bit.with_availability.single_block.task_mesh.inside_rp.single_view.only_primary
 
-dEQP-VK.query_pool.statistics_query.host_query_reset.geometry_shader_invocations.secondary.32bits_dstoffset_cmdcopyquerypoolresults_line_list
-dEQP-VK.query_pool.statistics_query.host_query_reset.geometry_shader_primitives.secondary.32bits_dstoffset_cmdcopyquerypoolresults_line_list_with_adjacency
-dEQP-VK.query_pool.statistics_query.host_query_reset.geometry_shader_invocations.secondary.32bits_triangle_list
-dEQP-VK.query_pool.statistics_query.host_query_reset.geometry_shader_primitives.secondary.64bits_dstoffset_cmdcopyquerypoolresults_line_list_with_adjacency_clear_color
-
 # Too many of these tests to follow, so let's cast a broad net
 dEQP-VK.pipeline.*line_stipple_enable
 dEQP-VK.pipeline.*line_stipple_params
index 098d25b..85fee0b 100644 (file)
@@ -15,8 +15,3 @@ dEQP-VK.draw.renderpass.linear_interpolation.no_offset_4_samples
 dEQP-VK.draw.renderpass.linear_interpolation.no_offset_8_samples
 
 dEQP-VK.pipeline.monolithic.image.suballocation.sampling_type.separate.view_type.2d_array.format.r4g4b4a4_unorm_pack16.count_4.size.32x16_array_of_6
-
-# Seem to have been introduced with !19442, and can only be reproduced on
-# Steam Deck 2 at Martin Roukala (mupuf)'s farm. Investigation is under way.
-dEQP-VK.query_pool.statistics_query.geometry_shader_primitives.*
-dEQP-VK.query_pool.statistics_query.host_query_reset.geometry_shader_primitives.*
index 7333542..25184a2 100644 (file)
@@ -1904,10 +1904,6 @@ emit_end_query(struct radv_cmd_buffer *cmd_buffer, struct radv_query_pool *pool,
       radeon_emit(cs, va);
       radeon_emit(cs, va >> 32);
 
-      si_cs_emit_write_event_eop(cs, cmd_buffer->device->physical_device->rad_info.gfx_level,
-                                 radv_cmd_buffer_uses_mec(cmd_buffer), V_028A90_BOTTOM_OF_PIPE_TS, 0, EOP_DST_SEL_MEM,
-                                 EOP_DATA_SEL_VALUE_32BIT, avail_va, 1, cmd_buffer->gfx9_eop_bug_va);
-
       if (pool->uses_gds) {
          if (pool->vk.pipeline_statistics & VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT) {
             uint32_t gs_prim_offset =
@@ -1928,6 +1924,10 @@ emit_end_query(struct radv_cmd_buffer *cmd_buffer, struct radv_query_pool *pool,
          if (!cmd_buffer->state.active_pipeline_gds_queries)
             cmd_buffer->state.dirty |= RADV_CMD_DIRTY_SHADER_QUERY;
       }
+
+      si_cs_emit_write_event_eop(cs, cmd_buffer->device->physical_device->rad_info.gfx_level,
+                                 radv_cmd_buffer_uses_mec(cmd_buffer), V_028A90_BOTTOM_OF_PIPE_TS, 0, EOP_DST_SEL_MEM,
+                                 EOP_DATA_SEL_VALUE_32BIT, avail_va, 1, cmd_buffer->gfx9_eop_bug_va);
       break;
    }
    case VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT: