From b8794af274a0b17df9b00d51c5c4c5bd6bef61dd Mon Sep 17 00:00:00 2001 From: Takoroka <137927095+Takoroka@users.noreply.github.com> Date: Fri, 30 Oct 2026 12:04:03 -0400 Subject: vulkan: keep a failing shader's dump from ending the process When a graphics pipeline's translation throws, its handler walks each program again to dump it. A program whose flow cannot be analyzed (an indirect branch Nintendo Switch Sports Resort uses) throws again there, the exception leaves the handler and the process ends. Contain it, so the pipeline fails, the error is logged and the title goes on. --- src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/video_core/renderer_vulkan') diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index ac878ddfef..bbc4f3c625 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -981,7 +981,12 @@ std::unique_ptr PipelineCache::CreateGraphicsPipeline( ++env_index; const u32 cfg_offset{static_cast(env.StartAddress() + sizeof(Shader::ProgramHeader))}; - Shader::Maxwell::Flow::CFG cfg(env, pools.flow_block, cfg_offset, index == 0); + try { + // Walks the program for the dump; the one that failed may fail here again, and an + // exception leaving this handler would end the process. + Shader::Maxwell::Flow::CFG cfg(env, pools.flow_block, cfg_offset, index == 0); + } catch (const Shader::Exception&) { + } env.Dump(hash, key.unique_hashes[index]); } LOG_ERROR(Render_Vulkan, "{}", exception.what()); -- cgit v1.2.3