summaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache/buffer_cache.cpp
diff options
context:
space:
mode:
authorcow <cow@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>2024-10-21 23:24:41 +0000
committerMike Lothian <mike@fireburn.co.uk>2024-12-20 15:24:58 +0000
commit6179cc0588ca74671cacb4b5f633082f70836407 (patch)
tree8f4e640f452303e79aa5bf092cbb6b5cd95d1e57 /src/video_core/buffer_cache/buffer_cache.cpp
parentdd0f9e32bc3838368ce0b981149cd1734f8b894d (diff)
kepler_compute: use safe memory read
If unsafe read is done there can sometimes be corrupt data in the KeplerCompute::ProcessLaunch qmd structure. Fixes GPU crashes in 'Princess Peach: Showtime!' when using vulkan renderer. Requires using "Accuracy Level High" (crashes will still happen if using "Normal"). Tested on Radeon 6750XT, Linux 6.11.2, Mesa 24.2.5 (RADV driver). Unsafe read was introduced in 115792158d3ac4ca746d1775f2381e8f8dd18582 "VideoCore: Implement DispatchIndirect" How did I debug this: - Used VK_LAYER_KHRONOS_validation which found invalid vkCmdDispatch (along with a lot of other noise!) - Instrumented all calls to vulkan Dispatch(), set breakpoint when grid_dim_x > 1024 (an obviously invalid value). Found dispatch came from RasterizerVulkan::DispatchCompute(). - Commented out DispatchCompute() entirely, game runs with no crashes but some graphics effects are missing. - Keep going one layer up, observe corrupted `launch_description` in KeplerCompute::ProcessLaunch() - Attempted safe ReadBlock (`which = VideoCommon::CacheType::All`) instead of ReadBlockUnsafe in KeplerCompute::ProcessLaunch(), did not help - Go one layer up to DmaPusher. Switch to safe_process(). No more corrupt `launch_description`.
Diffstat (limited to 'src/video_core/buffer_cache/buffer_cache.cpp')
0 files changed, 0 insertions, 0 deletions