Skip to content

feat(shader): decode MIMG opcode 0xb8 as image_sample_c_o_a - #8015

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
fma-rc:fix/shader-mimg-sample-c-o-a
Oct 21, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
fma-rc:fix/shader-mimg-sample-c-o-a

Conversation

@fma-rc

@fma-rc fma-rc commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

What

Death Stranding 2 (PPSA02015) stops at 61.7 s on main with #5426 and #7978 when it first draws with a shader that uses MIMG opcode 0xb8:

terminate called after throwing an instance of 'std::runtime_error'
  what():  shader 0xc2805e1c00 stage 5: ShaderRecompiler::Recompile: unsupported MIMG opcode 0xb8

This decodes 0xb8 as image_sample_c_o_a. LLVM's gfx1030 disassembler reads the same instruction words with bit 0 clear as image_sample_c_o, and the _a rows already on main (0xa0, 0xa1, 0xa5, 0xa8, 0xb0) are the base opcode plus 0x80 with the adjust flag, so the new row is compare, offset and adjust on the existing sample path.

The title also registers shaders with MIMG 0xc8 and 0xd8. It does not use them before its next stop, so they still throw and are not part of this PR.

Tested

Linux (Arch, GCC 16.2.1) and Windows Server 2025 (WinLibs GCC 15.2, no GPU), on main b6583dd with this PR; after the rebase onto e90a1d1 (no recompiler or AGC changes) the named tests pass again on NVIDIA.

Checklist

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 19, 2026
@github-actions

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/ImageSampleGather.cpp

@wachi35676

Copy link
Copy Markdown
Contributor

Windows runs with GPUs, since the Windows run in the description had none.

Windows 11 Home 26300, WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON, main 9127ea36d with this head merged. GPUs: RTX 5070 Ti (NVIDIA 617.42) and the AMD Radeon iGPU (RDNA2, 1002:13c0, AMD proprietary driver 2026.04.17, ANYPS5_GPU=AMD). ANYPS5_REQUIRE_VULKAN=1, ctest -j4, failures rerun serially (there were none).

AI-assisted: yes (Claude Code); results above were run on this machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants