Experimental: Improve indirect image resource specialization for Wolverine #1108
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1108
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1108/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@fzfalcon on GitHub · 2026-10-06 15:31 UTC · original
fzfalcon:main→main· +114 −2 · 3 files · 2 commits · closed without mergingSummary
This PR introduces an experimental shader resource specialization change
targeted at improving compatibility with Marvel's Wolverine (PPSA03671)
on Windows.
Wolverine currently reaches shader compilation but can fail during
resource materialization with:
The failure occurs in:
during:
Changes
Adds an experimental Windows-only CMake option:
KYTY_WOLVERINE_RELAXED_IMAGE_SPECIALIZATIONApplies the option to the emulator target on Windows.
Adjusts indirect image resource materialization to tolerate specific
compatible resource metadata differences.
Keeps stricter resource properties unchanged, including:
The change is intentionally limited to the shader resource
specialization path.
Motivation
The goal is to determine whether the current indirect image candidate
compatibility check is too strict for Wolverine's shader/resource usage.
This is an experimental compatibility change and is intended for
testing and further investigation.
Testing
Target:
Previous behavior:
Expected behavior:
Status
Experimental / Work in Progress.
This PR does not claim full Wolverine compatibility or performance
improvements yet.
Further testing is required to determine whether the relaxed
specialization produces correct rendering and stable execution.
@coderabbitai[bot] on GitHub · 2026-10-06 15:39 UTC · original · edited 2026-10-06 16:14 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
901107fc-317e-440e-9e8f-c2faebee2ab1📥 Commits
Reviewing files that changed from the base of the PR and between
79d553f8e6and0ff4f1b197.📒 Files selected for processing (1)
src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
📝 Walkthrough
Walkthrough
Adds a default-off CMake option for relaxed image specialization on Windows. Updates indirect-image checks for mip counts and swizzles. When the option is enabled, eligible candidates with remaining metadata mismatches are normalized to the typed exemplar; other incompatible candidates continue to fail specialization.
Priority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
0ff4fNo actionable merge-blocking issue was established. The experimental option can proceed with the further rendering and stability testing the author identified.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@ -645,0 +673,4 @@std::fprintf(stderr,"shader resource specialization: relaxed indirect image candidate at pc 0x%08x\n",program.info.images[root_index].first_use_pc);continue;@coderabbitai[bot] on GitHub · 2026-10-06 15:39 UTC · original · edited 2026-10-06 16:04 UTC
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 12724
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 28684
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 18199
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 9848
Reject candidates with a different relevant swizzle.
The relaxed branch can accept a converted-image candidate with a different swizzle, then apply the root resource’s swizzle to that candidate’s sample. This can produce incorrect channels. Add
swizzle_compatibleto the fallback guard in both files.🐛 Suggested fix
✅ Addressed in commit
0ff4f1b@coderabbitai[bot] on GitHub · 2026-10-06 15:39 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
b7b799fc-9908-4a18-b83d-beb8a9d8052f📥 Commits
Reviewing files that changed from the base of the PR and between
fb7ff7ec03and79d553f8e6.📒 Files selected for processing (3)
CMakeLists.txtKytyPS5-Wolverine-v1.patchsrc/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
@Nmzik on GitHub · 2026-10-06 17:27 UTC · original
@fazilprogrmr-svg We already have #937. Work is in progress
Pull request closed