From 98d07d53195b665a0415f4ea7e36d7ae17bc6a06 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Thu, 16 Apr 2026 23:39:24 +0800 Subject: [PATCH] pvr: preserve and pass more data for suspending render passes Suspending render pass jobs have more things than render targets to preserve, e.g. occlusion query related information, atomic / compute overlap enablement information etc. Preserve them too when suspending. When resuming, for boolean properties, or'ing them; for other preserved things assign them. This is for ensuring the last resuming fragment job is compatible with all suspending geometry jobs, as for suspending render passes the fragment job is omitted. The situation of the suspending render pass and the resuming render pass have different query pools is still not supported, and quite difficult to support. Backport-to: 26.0 Signed-off-by: Icenowy Zheng Reviewed-by: Nick Hamilton Part-of: --- src/imagination/ci/bxs-4-64-fails.txt | 28 ------------------------- src/imagination/ci/bxs-4-64-flakes.txt | 1 - src/imagination/ci/bxs-4-64-skips.txt | 7 ------- src/imagination/vulkan/pvr_arch_queue.c | 26 +++++++++++++++++++++++ 4 files changed, 26 insertions(+), 36 deletions(-) diff --git a/src/imagination/ci/bxs-4-64-fails.txt b/src/imagination/ci/bxs-4-64-fails.txt index 91b574807ed..ffd9783ee0a 100644 --- a/src/imagination/ci/bxs-4-64-fails.txt +++ b/src/imagination/ci/bxs-4-64-fails.txt @@ -14,31 +14,3 @@ dEQP-VK.binding_model.unused_invalid_descriptor.write.unused.uniform_buffer,Cras dEQP-VK.graphicsfuzz.cov-two-nested-loops-switch-case-matrix-array-increment,Fail dEQP-VK.graphicsfuzz.stable-binarysearch-tree-false-if-discard-loop,Fail dEQP-VK.memory.concurrent_access.shader_and_host,Crash -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed11,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed11_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed13_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed16_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed18,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed20_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed21_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed36,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed36_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed41_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed44,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed45_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed50,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed50_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed56,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed56_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed69_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed70,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed70_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed71,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed76,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed76_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed7_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed83_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed85_multiview,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed88,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed98,Fail -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed98_multiview,Fail diff --git a/src/imagination/ci/bxs-4-64-flakes.txt b/src/imagination/ci/bxs-4-64-flakes.txt index a79e57db63c..7e321ae4c60 100644 --- a/src/imagination/ci/bxs-4-64-flakes.txt +++ b/src/imagination/ci/bxs-4-64-flakes.txt @@ -64,7 +64,6 @@ dEQP-VK.pipeline.monolithic.stencil.format.d32_sfloat_s8_uint_separate_layouts.s dEQP-VK.pipeline.monolithic.stencil.nocolor.format.d24_unorm_s8_uint_separate_layouts.states.fail_incc.pass_wrap.dfail_keep.comp_always.any dEQP-VK.pipeline.monolithic.stencil.nocolor.format.d32_sfloat_s8_uint.states.fail_zero.pass_keep.dfail_inv.comp_less.any dEQP-VK.pipeline.monolithic.vertex_input.multiple_attributes.layout_skip.binding_one_to_one.attributes.uvec2.uvec3.mat2 -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed16_multiview dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.suballocation.unused_clear_attachments.colorunused_colorused_colorunused_colorunused_stencilonly_d32s8_unused dEQP-VK.renderpasses.renderpass2.dedicated_allocation.formats.a2b10g10r10_uint_pack32.input.load.dont_care.clear_draw dEQP-VK.renderpasses.renderpass2.suballocation.attachment_allocation.roll.87 diff --git a/src/imagination/ci/bxs-4-64-skips.txt b/src/imagination/ci/bxs-4-64-skips.txt index 52dc9ed0de9..63e82ff6bb4 100644 --- a/src/imagination/ci/bxs-4-64-skips.txt +++ b/src/imagination/ci/bxs-4-64-skips.txt @@ -5,10 +5,3 @@ dEQP-VK.memory.mapping.dedicated_alloc.buffer.full.variable.implicit_unmap dEQP-VK.memory.mapping.dedicated_alloc.buffer.full.variable.implicit_unmap_map2 dEQP-VK.memory.mapping.dedicated_alloc.image.full.variable.implicit_unmap dEQP-VK.memory.mapping.dedicated_alloc.image.full.variable.implicit_unmap_map2 -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed13_multiview -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed16_multiview -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed21_multiview -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed25_multiview -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed39_multiview -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed41_multiview -dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed7_multiview diff --git a/src/imagination/vulkan/pvr_arch_queue.c b/src/imagination/vulkan/pvr_arch_queue.c index a3cf161478a..1e10cd21180 100644 --- a/src/imagination/vulkan/pvr_arch_queue.c +++ b/src/imagination/vulkan/pvr_arch_queue.c @@ -730,6 +730,10 @@ static VkResult pvr_process_event_cmd(struct pvr_device *device, struct pvr_suspended_data { struct pvr_rt_dataset **rts; + bool frag_uses_atomic_ops; + bool disable_compute_overlap; + bool get_vis_results; + const struct pvr_query_pool *query_pool; }; static VkResult pvr_process_cmd_buffer(struct pvr_device *device, @@ -772,12 +776,34 @@ static VkResult pvr_process_cmd_buffer(struct pvr_device *device, if (sub_cmd->is_resume) { sub_cmd->gfx.job.view_state.rt_datasets = suspended_data->rts; + sub_cmd->gfx.job.frag_uses_atomic_ops |= + suspended_data->frag_uses_atomic_ops; + sub_cmd->gfx.job.disable_compute_overlap |= + suspended_data->disable_compute_overlap; + sub_cmd->gfx.job.get_vis_results |= suspended_data->get_vis_results; + if (!sub_cmd->gfx.query_pool) { + sub_cmd->gfx.query_pool = suspended_data->query_pool; + } else if (suspended_data->query_pool && + sub_cmd->gfx.query_pool != suspended_data->query_pool) { + pvr_finishme( + "Emit a barrier between suspending and resuming jobs with different query pools"); + } } if (sub_cmd->is_suspend) { suspended_data->rts = sub_cmd->gfx.job.view_state.rt_datasets; + suspended_data->frag_uses_atomic_ops = + sub_cmd->gfx.job.frag_uses_atomic_ops; + suspended_data->disable_compute_overlap = + sub_cmd->gfx.job.disable_compute_overlap; + suspended_data->get_vis_results = sub_cmd->gfx.job.get_vis_results; + suspended_data->query_pool = sub_cmd->gfx.query_pool; } else { suspended_data->rts = NULL; + suspended_data->frag_uses_atomic_ops = false; + suspended_data->disable_compute_overlap = false; + suspended_data->get_vis_results = false; + suspended_data->query_pool = NULL; } assert(sub_cmd->gfx.job.view_state.rt_datasets);