shader: fix crash from packed ancillary used as DPP old operand #1769
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!1769
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1769/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?
@Pipe530 on GitHub · 2026-10-20 19:00 UTC · original
Pipe530:pipe530-crispy-succotash→main· +19 −2 · 3 files · 1 commits · merged 2026-10-23 07:51 UTCStreet Fighter 6 crashed when selecting Aki or C. Viper with:
shader info collection failed: packed pixel ancillary input has an unsupported live usePixel shader
0x96676ae157bdd6d9reuses the packed ancillary VGPR as scratch for quad shuffles, so its raw value reaches the "old" operand ofDppUpdateU32(the value kept only in lanes the update doesn't write).Changes (
ConstantPropagation.cpp)PackedAncillarybuiltin is now a candidate for normalization to 0.bound_controlor a quad-perm).Review fixes
Testing
The first version was verified by running SF6 (Aki and Viper playable, shader compiles to SPIR-V), and the other commits were also tested.
@coderabbitai[bot] on GitHub · 2026-10-20 19:06 UTC · original · edited 2026-10-23 04:18 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
4f6f099a-c873-445b-ac12-aed00bedbc89📥 Commits
Reviewing files that changed from the base of the PR and between 4fdbdaa3335008b1d2936b3772a0cee76cf23bdd and 8082c1343a6c83ed368a7fa51270e43c3de282f1.
📒 Files selected for processing: 1
src/graphics/shader/recompiler/ir/passes/ConstantPropagation.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
The pass now scans all
PackedAncillarysources. It normalizes a source to zero when its uses are dead, side-effect-free, or valid fully masked operand-1 updates ofDppUpdateU32. For lowered sources, it retains the existing PHI andSelectU32false-arm cases. It reprocesses affected users.Suggested reviewers:
nmzikPriority: ⬆️ High
Change: Bug fix
Merge Risk: 🟡 Moderate · up to
8082cShaders that read ancillary values retained in inactive lanes may produce incorrect results. Resolve that case before merging unless the risk is explicitly accepted.
Pre-merge checks:
5
Full details: Description check
Explanation
The description names the game crash, the affected shader, the DPP old-operand mechanism, and the changed file (ConstantPropagation.cpp). It also lists the review fixes and the testing performed. It is specific and directly related to the changeset, so it passes the lenient check.
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.@coderabbitai[bot] on GitHub · 2026-10-20 19:06 UTC · original · edited 2026-10-21 02:58 UTC
On
src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cppline 1015 (outdated):🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Keep ancillary values that feed a live PHI.
If
PackedAncillaryenters aPhibefore aBitFieldUExtract, the extraction does not qualify for field lowering: its direct producer is thePhi, notGetBuiltin. This new insertion still letsretained_onlyreplace the builtin with zero because it accepts everyPhiuse. The shader can then read zero instead of the packed sample or layer bits. Prove that the PHI path does not read those bits before normalizing it.✅ Addressed in commit 4fdbdaa
@coderabbitai[bot] on GitHub · 2026-10-20 19:06 UTC · original
On
src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cppline 1032 (outdated):🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Preserve the old value when DPP retains masked lanes.
DppUpdateU32takes the previous vector-register value as operand 1. A partial DPP or execution mask leaves that value in lanes the update does not write. If a later operation reads those lanes, replacingPackedAncillarywith zero changes their result. Classify this operand as discard-only only when the retained lanes cannot be observed; otherwise, preserve or lower the required ancillary bits. AMD’s DPP documentation confirms that masked lanes do not update the destination. (gpuopen.com)@coderabbitai[bot] on GitHub · 2026-10-20 19:06 UTC · original · reviewed
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
0a25b7b4-95b4-4ae6-9a9b-a1513173a0af📥 Commits
Reviewing files that changed from the base of the PR and between
7b7f9a70c6and aa0dc812a8198ca1b78ca5a39c3aee5b5d223b17.📒 Files selected for processing: 1
src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
@coderabbitai[bot] on GitHub · 2026-10-21 03:01 UTC · original · edited 2026-10-21 03:23 UTC
On
src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cppline 1018 (outdated):🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Include lowered ancillary sources in DPP old-operand normalization.
If one
PackedAncillarysource supplies a supported field extraction and the old operand of a live, eligibleDppUpdateU32, the extraction marks the source as lowered. This condition then excludes it from the DPP check. The lowered-source check does not acceptDppUpdateU32, so the raw builtin remains and shader info collection fails. Apply the same DPP eligibility check to lowered sources while preserving the existing PHI/select rules. (raw.githubusercontent.com)✅ Addressed in commit 8082c13
@coderabbitai[bot] on GitHub · 2026-10-21 03:01 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
67d1cf26-7902-40aa-9ff7-a0f7d348ddf5📥 Commits
Reviewing files that changed from the base of the PR and between aa0dc812a8198ca1b78ca5a39c3aee5b5d223b17 and 4fdbdaa3335008b1d2936b3772a0cee76cf23bdd.
📒 Files selected for processing: 1
src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.