radv: disable primitive restart for non-indexed draws on GFX11
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 11 Oct 2023 07:56:42 +0000 (09:56 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 12 Oct 2023 06:33:40 +0000 (06:33 +0000)
Primitive restart is also applied to non-indexed draws on AMD GPUs. On
GFX11, DISABLE_FOR_AUTO_INDEX can be set but we will need a different
solution for older GPUs.

This fixes all line related flakes in CI (at least).

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

src/amd/ci/radv-navi31-aco-flakes.txt
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/si_cmd_buffer.c

index 5d4cc3d..5f2ac41 100644 (file)
@@ -11,9 +11,6 @@ dEQP-VK.mesh_shader.ext.query.all_queries.triangles.no_reset.get.no_wait.draw.32
 dEQP-VK.mesh_shader.ext.query.all_queries.triangles.reset_after.copy.no_wait.draw.64bit.with_availability.no_blocks.task_mesh.inside_rp.multi_view.with_secondary
 dEQP-VK.mesh_shader.ext.query.all_queries.triangles.reset_after.copy.wait.draw.64bit.with_availability.multiple_blocks.task_mesh.include_rp.single_view.only_primary
 dEQP-VK.mesh_shader.ext.query.mesh_invs_query.triangles.reset_before.copy.no_wait.indirect_draw.32bit.no_availability.single_block.task_mesh.inside_rp.single_view.with_secondary
-dEQP-VK.pipeline.fast_linked_library.extended_dynamic_state.before_good_static.topology_line_geom
-dEQP-VK.pipeline.monolithic.extended_dynamic_state.between_pipelines.topology_line_geom
-dEQP-VK.pipeline.monolithic.extended_dynamic_state.cmd_buffer_start.topology_line_geom
 dEQP-VK.rasterization.provoking_vertex.transform_feedback.per_pipeline.line_list
 dEQP-VK.rasterization.provoking_vertex.transform_feedback.per_pipeline.line_list_with_adjacency
 dEQP-VK.rasterization.provoking_vertex.transform_feedback.per_pipeline.triangle_list
index 471aa6a..652f145 100644 (file)
@@ -2391,7 +2391,12 @@ radv_emit_primitive_restart_enable(struct radv_cmd_buffer *cmd_buffer)
    const bool en = d->vk.ia.primitive_restart_enable;
 
    if (gfx_level >= GFX11) {
-      radeon_set_uconfig_reg(cs, R_03092C_GE_MULTI_PRIM_IB_RESET_EN, en);
+      radeon_set_uconfig_reg(cs, R_03092C_GE_MULTI_PRIM_IB_RESET_EN,
+                             S_03092C_RESET_EN(en) |
+                                /* This disables primitive restart for non-indexed draws.
+                                 * By keeping this set, we don't have to unset RESET_EN
+                                 * for non-indexed draws. */
+                                S_03092C_DISABLE_FOR_AUTO_INDEX(1));
    } else if (gfx_level >= GFX9) {
       radeon_set_uconfig_reg(cs, R_03092C_VGT_MULTI_PRIM_IB_RESET_EN, en);
    } else {
index 95ae6ee..ea35f10 100644 (file)
@@ -619,6 +619,11 @@ si_emit_graphics(struct radv_device *device, struct radeon_cmdbuf *cs)
       radeon_set_config_reg(cs, R_008B10_PA_SC_LINE_STIPPLE_STATE, 0);
    }
 
+   if (physical_device->rad_info.gfx_level >= GFX11) {
+      /* Disable primitive restart for all non-indexed draws. */
+      radeon_set_uconfig_reg(cs, R_03092C_GE_MULTI_PRIM_IB_RESET_EN, S_03092C_DISABLE_FOR_AUTO_INDEX(1));
+   }
+
    si_emit_compute(device, cs);
 }