radeonsi: sync harder on finish

With the threaded submit code, there's a small window where
the fence can be signalled but the buffer lists cleanup code
from amdgpu_cs_submit_ib has not executed yet.

This is harmless in general, because num_active_ioctls is
an optimization.

When the glFinish is called though, it's best to avoid this
inconsistencies because it can create odd behavior as shown
by the flakes being fixed by this commit.
The test runs a query, uses glFinish and expect the results
to be available. Since results availability depends on
num_active_ioctls, it made the test flaky.

Fix this by syncing when PIPE_FLUSH_HINT_FINISH is set.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36930>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2025-08-22 11:04:18 +02:00 committed by Marge Bot
parent b536e38607
commit cd5f77f6c2
8 changed files with 6 additions and 173 deletions

View file

@ -1,31 +1,3 @@
dEQP-GLES3.functional.occlusion_query.all_occluders
dEQP-GLES3.functional.occlusion_query.conservative_all_occluders
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_stencil_write
dEQP-GLES3.functional.occlusion_query.stencil_clear
dEQP-GLES3.functional.occlusion_query.stencil_write
dEQP-GLES31.functional.geometry_shading.basic.output_max
KHR-GL46.direct_state_access.framebuffers_texture_layer_attachment

View file

@ -8,9 +8,6 @@ spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_
# Flaky with a Fail result since the piglit fix made it stop crashing.
glx@glx-make-current
# OQ flakes/fails started with no perceivable pattern around 2023-12-13
dEQP-GLES3.functional.occlusion_query..*
# uprev Piglit in Mesa
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_stencil_write_stencil_clear
glx@glx-multithread-texture
@ -19,18 +16,6 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread
dEQP-GLES2.functional.fbo.render.resize.rbo_bgra_stencil_index8
dEQP-GLES3.functional.fbo.render.recreate_color.tex2d_rg8ui_depth_stencil_rbo_depth24_stencil8
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_stencil_clear
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgba8888_non_square_fastest
dEQP-GLES3.functional.texture.filtering.3d.formats.r11f_g11f_b10f_nearest_mipmap_nearest
dEQP-GLES3.functional.texture.vertex.3d.wrap.repeat_clamp_mirror

View file

@ -1,19 +1,4 @@
dEQP-GLES2.functional.fragment_ops.depth_stencil.stencil_ops.decr_decr_wrap_incr_wrap
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.stencil_write
dEQP-GLES31.functional.copy_image.non_compressed.viewclass_32_bits.r32f_r32f.cubemap_to_texture2d_array
dEQP-GLES31.functional.geometry_shading.basic.output_256
dEQP-GLES31.functional.geometry_shading.basic.output_max

View file

@ -4,38 +4,3 @@ glx@glx-multithread-texture
# Random: ../src/util/hash_table.c:311: hash_table_search: Assertion `!key_pointer_is_reserved(ht, key)' failed.
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread
dEQP-GLES3.functional.occlusion_query.all_occluders
dEQP-GLES3.functional.occlusion_query.conservative_all_occluders
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.stencil_clear
dEQP-GLES3.functional.occlusion_query.stencil_write

1 # These fail randomly
4 # Random: ../src/util/hash_table.c:311: hash_table_search: Assertion `!key_pointer_is_reserved(ht, key)' failed.
5 spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread
6
dEQP-GLES3.functional.occlusion_query.conservative_all_occluders
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.stencil_clear
dEQP-GLES3.functional.occlusion_query.stencil_write

View file

@ -86,45 +86,6 @@ dEQP-GLES3.functional.fragment_ops.interaction.basic_shader.39
dEQP-GLES3.functional.fragment_ops.interaction.basic_shader.44
dEQP-GLES3.functional.fragment_ops.interaction.basic_shader.94
dEQP-GLES3.functional.occlusion_query.all_occluders
dEQP-GLES3.functional.occlusion_query.conservative_all_occluders
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor_depth_write
dEQP-GLES3.functional.occlusion_query.scissor_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_stencil_write
dEQP-GLES3.functional.occlusion_query.stencil_clear
dEQP-GLES3.functional.occlusion_query.stencil_write
dEQP-GLES3.functional.occlusion_query.stencil_write_stencil_clear
dEQP-GLES31.functional.tessellation.invariance.primitive_set.triangles_equal_spacing_cw_point_mode
dEQP-GLES31.functional.tessellation.invariance.primitive_set.triangles_fractional_even_spacing_ccw_point_mode
dEQP-GLES31.functional.tessellation.invariance.primitive_set.triangles_fractional_even_spacing_cw_point_mode

Can't render this file because it contains an unexpected character in line 13 and column 22.

View file

@ -38,34 +38,6 @@ KHR-GLES32.core.geometry_shader.primitive_counter.points_to_line_strip_rp
KHR-GLES32.core.geometry_shader.primitive_counter.triangles_to_line_strip
KHR-GLES32.core.geometry_shader.primitive_counter.triangles_to_line_strip_rp
dEQP-GLES3.functional.occlusion_query.conservative_all_occluders
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear
dEQP-GLES3.functional.occlusion_query.conservative_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_depth_clear_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_write
dEQP-GLES3.functional.occlusion_query.conservative_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.all_occluders
dEQP-GLES3.functional.occlusion_query.depth_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write_stencil_write_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor_depth_write_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor_stencil_write
dEQP-GLES3.functional.occlusion_query.stencil_clear
dEQP-GLES3.functional.occlusion_query.stencil_write
KHR-GL46.shaders.uniform_block.random.all_shared_buffer.12
# These pass when run separately, but fail when run via deqp-runner

Can't render this file because it contains an unexpected character in line 16 and column 22.

View file

@ -16,18 +16,6 @@ KHR-GLES32.core.ext_texture_shadow_lod.texturelod.samplercubearrayshadow_fragmen
dEQP-GLES2.functional.flush_finish.finish
dEQP-GLES2.functional.flush_finish.finish_wait
dEQP-GLES3.functional.occlusion_query.conservative_depth_write_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write
dEQP-GLES3.functional.occlusion_query.conservative_scissor_depth_write_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.conservative_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.depth_write_depth_clear_stencil_write
dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_clear
dEQP-GLES3.functional.occlusion_query.scissor_stencil_write
dEQP-GLES3.functional.texture.shadow.2d_array.linear_mipmap_linear.greater_or_equal_depth24_stencil8
dEQP-GLES3.functional.texture.shadow.2d_array.linear_mipmap_linear.less_depth_component32f
dEQP-GLES3.functional.texture.shadow.cube.nearest_mipmap_linear.not_equal_depth_component32f

Can't render this file because it contains an unexpected character in line 9 and column 22.

View file

@ -538,7 +538,12 @@ static void si_flush_all_queues(struct pipe_context *ctx,
}
assert(!fine.buf);
finish:
if (!(flags & (PIPE_FLUSH_DEFERRED | PIPE_FLUSH_ASYNC))) {
if (!(flags & (PIPE_FLUSH_DEFERRED | PIPE_FLUSH_ASYNC)) ||
(flags & PIPE_FLUSH_HINT_FINISH)) {
/* sync if PIPE_FLUSH_HINT_FINISH is set: this is required to get the
* BOs' num_active_ioctls value updated before the fence status can be
* read.
*/
ws->cs_sync_flush(&sctx->gfx_cs);
}
}