aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 12:04:03 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 12:04:04 -0400
commitb8794af274a0b17df9b00d51c5c4c5bd6bef61dd (patch)
tree7a09b5639eab90668bc9403f90b6d6c814c529bb /src/video_core/renderer_vulkan
parentf362528c0447c491bfe00c0bdd5d8c245396a24c (diff)
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.
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp7
1 files changed, 6 insertions, 1 deletions
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<GraphicsPipeline> PipelineCache::CreateGraphicsPipeline(
++env_index;
const u32 cfg_offset{static_cast<u32>(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());