shader: fix crash from packed ancillary used as DPP old operand #1769

Manually merged
github merged 1 commit from gh-pr/1769/head into gh-pr/1769/base 2026-11-26 10:05:21 +00:00
Owner

@⁠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 UTC

Street Fighter 6 crashed when selecting Aki or C. Viper with:

shader info collection failed: packed pixel ancillary input has an unsupported live use

Pixel shader 0x96676ae157bdd6d9 reuses the packed ancillary VGPR as scratch for quad shuffles, so its raw value reaches the "old" operand of DppUpdateU32 (the value kept only in lanes the update doesn't write).

Changes (ConstantPropagation.cpp)

  • Every raw PackedAncillary builtin is now a candidate for normalization to 0.
  • A use as the DPP update "old" operand is ignored only when the update writes every EXEC-active lane: full row/bank masks and an always-valid source lane (bound_control or a quad-perm).
  • PHI / select-fallback uses are still accepted only for sources that had a supported field extraction lowered (unchanged from before). Direct raw consumers still fail as before.

Review fixes

  • Don't fold raw ancillary values that feed a live PHI unless a field extraction was lowered (the first version accepted every PHI use).
  • Preserve the old value when DPP can leave lanes unwritten: the fold now requires full row/bank masks and a valid source lane.
  • Apply the DPP check to sources that were already lowered, so a source with both a field extraction and a DPP old-operand use no longer keeps its raw builtin and fails.

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.

**@⁠Pipe530** on GitHub · 2026-10-20 19:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1769) `Pipe530:pipe530-crispy-succotash` → `main` · +19 −2 · 3 files · 1 commits · merged 2026-10-23 07:51 UTC Street Fighter 6 crashed when selecting Aki or C. Viper with: `shader info collection failed: packed pixel ancillary input has an unsupported live use` Pixel shader `0x96676ae157bdd6d9` reuses the packed ancillary VGPR as scratch for quad shuffles, so its raw value reaches the "old" operand of `DppUpdateU32` (the value kept only in lanes the update doesn't write). ## Changes (`ConstantPropagation.cpp`) - Every raw `PackedAncillary` builtin is now a candidate for normalization to 0. - A use as the DPP update "old" operand is ignored only when the update writes every EXEC-active lane: full row/bank masks and an always-valid source lane (`bound_control` or a quad-perm). - PHI / select-fallback uses are still accepted only for sources that had a supported field extraction lowered (unchanged from before). Direct raw consumers still fail as before. ## Review fixes - Don't fold raw ancillary values that feed a live PHI unless a field extraction was lowered (the first version accepted every PHI use). - Preserve the old value when DPP can leave lanes unwritten: the fold now requires full row/bank masks and a valid source lane. - Apply the DPP check to sources that were already lowered, so a source with both a field extraction and a DPP old-operand use no longer keeps its raw builtin and fails. ## 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:05:19 +00:00
github manually merged commit 3577941eb2 into gh-pr/1769/base 2026-11-26 10:05:21 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-20 19:06 UTC · original · edited 2026-10-23 04:18 UTC

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 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
  • src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp

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 PackedAncillary sources. It normalizes a source to zero when its uses are dead, side-effect-free, or valid fully masked operand-1 updates of DppUpdateU32. For lowered sources, it retains the existing PHI and SelectU32 false-arm cases. It reprocesses affected users.

Suggested reviewers: nmzik

Priority: ⬆️ High

Change: Bug fix

Merge Risk: 🟡 Moderate · up to 8082c

Shaders 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: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: fixing a crash caused by a packed ancillary value used as a DPP old operand.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed 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 i…
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.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-20 19:06 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1769#issuecomment-6298934731) · edited 2026-10-23 04:18 UTC <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1769?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary><strong>ℹ️ Recent review info</strong></summary> <dl> <dd> <details> <summary><strong>⚙️ Run configuration</strong></summary> <dl> <dd> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `4f6f099a-c873-445b-ac12-aed00bedbc89` </dd> </dl> </details> <details> <summary><strong>📥 Commits</strong></summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 4fdbdaa3335008b1d2936b3772a0cee76cf23bdd and 8082c1343a6c83ed368a7fa51270e43c3de282f1. </dd> </dl> </details> <details> <summary><strong>📒 Files selected for processing: 1</strong></summary> <dl> <dd> * `src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp` </dd> </dl> </details> <details> <summary><strong>🚧 Files skipped from review as they are similar to previous changes: 1</strong></summary> <dl> <dd> * src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. </dd> </dl> </details> <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary><strong>📝 Walkthrough</strong></summary> <dl> <dd> The pass now scans all `PackedAncillary` sources. It normalizes a source to zero when its uses are dead, side-effect-free, or valid fully masked operand-1 updates of `DppUpdateU32`. For lowered sources, it retains the existing PHI and `SelectU32` false-arm cases. It reprocesses affected users. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬆️ High <!-- change_assessment_commit:"8082c1343a6c83ed368a7fa51270e43c3de282f1" --> **Change:** Bug fix <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong>🟡 Moderate</strong> · up to <code>8082c</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **🟡 Moderate** · up to `8082c` --> <!-- final_review_risk_coverage:{"sourceCommitId":"8082c1343a6c83ed368a7fa51270e43c3de282f1","coveredCommitId":"8082c1343a6c83ed368a7fa51270e43c3de282f1","kind":"reviewed"} --> Shaders that read ancillary values retained in inactive lanes may produce incorrect results. Resolve that case before merging unless the risk is explicitly accepted. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 5</strong></summary> <dl> <dd> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly and concisely describes the main change: fixing a crash caused by a packed ancillary value used as a DPP old operand. | | Docstring Coverage | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | 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 i… | <details> <summary><strong>Full details: Description check</strong></summary> <dl> <dd> **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. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1769)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>❤️ Share</strong></summary> <dl> <dd> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠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.cpp line 1015 (outdated):

@@ -1008,6 +1008,14 @@ void ConstantPropagationPass(const BlockList& blocks, uint32_t wave_size) {
 	drain();
 	// Normalize retained PHI/select values only after every supported field read has
 	// been lowered; direct raw consumers remain unsupported.
+	for (auto* block: blocks) {
+		for (auto& inst: *block) {
+			if (inst.GetOpcode() == ValueOpcode::GetBuiltin &&
+			    inst.Arg(0) == Value(static_cast<uint32_t>(StageInputKind::PackedAncillary))) {
+				worklist.lowered_ancillary.insert(&inst);

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Keep ancillary values that feed a live PHI.

If PackedAncillary enters a Phi before a BitFieldUExtract, the extraction does not qualify for field lowering: its direct producer is the Phi, not GetBuiltin. This new insertion still lets retained_only replace the builtin with zero because it accepts every Phi use. 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](https://github.com/KytyPS5/KytyPS5/pull/1769#discussion_r4329094509) · edited 2026-10-21 02:58 UTC On `src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp` line 1015 (outdated): ```diff @@ -1008,6 +1008,14 @@ void ConstantPropagationPass(const BlockList& blocks, uint32_t wave_size) { drain(); // Normalize retained PHI/select values only after every supported field read has // been lowered; direct raw consumers remain unsupported. + for (auto* block: blocks) { + for (auto& inst: *block) { + if (inst.GetOpcode() == ValueOpcode::GetBuiltin && + inst.Arg(0) == Value(static_cast<uint32_t>(StageInputKind::PackedAncillary))) { + worklist.lowered_ancillary.insert(&inst); ``` <!-- coderabbit-ai-generated:v1 --> **🎯 Functional Correctness** | **🟠 Major** | **🏗️ Heavy lift** **Keep ancillary values that feed a live PHI.** If `PackedAncillary` enters a `Phi` before a `BitFieldUExtract`, the extraction does not qualify for field lowering: its direct producer is the `Phi`, not `GetBuiltin`. This new insertion still lets `retained_only` replace the builtin with zero because it accepts every `Phi` use. 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. <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:c3d1cbea5981fb421c18c2c5 --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit 4fdbdaa
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-20 19:06 UTC · original
On src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp line 1032 (outdated):

@@ -1019,7 +1027,9 @@ void ConstantPropagationPass(const BlockList& blocks, uint32_t wave_size) {
 					return true;
 				}
 				return user.GetOpcode() == ValueOpcode::Phi ||
-				       (user.GetOpcode() == ValueOpcode::SelectU32 && use.operand == 2u);
+				       (user.GetOpcode() == ValueOpcode::SelectU32 && use.operand == 2u) ||
+				       // DPP "old" value only reaches lanes the update does not write.
+				       (user.GetOpcode() == ValueOpcode::DppUpdateU32 && use.operand == 1u);

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Preserve the old value when DPP retains masked lanes.

DppUpdateU32 takes 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, replacing PackedAncillary with 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](https://github.com/KytyPS5/KytyPS5/pull/1769#discussion_r4329094521) On `src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp` line 1032 (outdated): ```diff @@ -1019,7 +1027,9 @@ void ConstantPropagationPass(const BlockList& blocks, uint32_t wave_size) { return true; } return user.GetOpcode() == ValueOpcode::Phi || - (user.GetOpcode() == ValueOpcode::SelectU32 && use.operand == 2u); + (user.GetOpcode() == ValueOpcode::SelectU32 && use.operand == 2u) || + // DPP "old" value only reaches lanes the update does not write. + (user.GetOpcode() == ValueOpcode::DppUpdateU32 && use.operand == 1u); ``` **🎯 Functional Correctness** | **🟠 Major** | **🏗️ Heavy lift** **Preserve the old value when DPP retains masked lanes.** `DppUpdateU32` takes 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, replacing `PackedAncillary` with 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](https://gpuopen.com/learn/amd-gcn-assembly-cross-lane-operations/)) <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:df31dd85a271e9e9843a903f --> <!-- This is an auto-generated comment by CodeRabbit -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-20 19:06 UTC · original · reviewed

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0a25b7b4-95b4-4ae6-9a9b-a1513173a0af
📥 Commits

Reviewing files that changed from the base of the PR and between 7b7f9a70c6 and aa0dc812a8198ca1b78ca5a39c3aee5b5d223b17.

📒 Files selected for processing: 1
  • src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp

Included 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-20 19:06 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1769#pullrequestreview-5590206332) · **reviewed** **Actionable comments posted: 2** --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `0a25b7b4-95b4-4ae6-9a9b-a1513173a0af` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 7b7f9a70c652afd6ec8ea8599884d9b4b3abc9f3 and aa0dc812a8198ca1b78ca5a39c3aee5b5d223b17. </details> <details> <summary>📒 Files selected for processing: 1</summary> * `src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp` </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=23c4b56f-75f0-4e8d-bdb3-99db42f57551 attempt=887d0605-6443-4438-a8ac-c017b8e4ba23 batch=1/1 -->
Author
Owner

@⁠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.cpp line 1018 (outdated):

@@ -1008,9 +1008,42 @@ void ConstantPropagationPass(const BlockList& blocks, uint32_t wave_size) {
 	drain();
 	// Normalize retained PHI/select values only after every supported field read has
 	// been lowered; direct raw consumers remain unsupported.
+	// Raw ancillary reads whose only consumers are DPP updates that write every active lane:
+	// the old operand then reaches only EXEC-disabled lanes, so it is unobservable.
+	std::vector<Inst*> dpp_old_only;
+	for (auto* block: blocks) {
+		for (auto& inst: *block) {
+			if (inst.GetOpcode() == ValueOpcode::GetBuiltin &&
+			    inst.Arg(0) == Value(static_cast<uint32_t>(StageInputKind::PackedAncillary)) &&
+			    !worklist.lowered_ancillary.contains(&inst)) {

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Include lowered ancillary sources in DPP old-operand normalization.

If one PackedAncillary source supplies a supported field extraction and the old operand of a live, eligible DppUpdateU32, the extraction marks the source as lowered. This condition then excludes it from the DPP check. The lowered-source check does not accept DppUpdateU32, 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](https://github.com/KytyPS5/KytyPS5/pull/1769#discussion_r4332599917) · edited 2026-10-21 03:23 UTC On `src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp` line 1018 (outdated): ```diff @@ -1008,9 +1008,42 @@ void ConstantPropagationPass(const BlockList& blocks, uint32_t wave_size) { drain(); // Normalize retained PHI/select values only after every supported field read has // been lowered; direct raw consumers remain unsupported. + // Raw ancillary reads whose only consumers are DPP updates that write every active lane: + // the old operand then reaches only EXEC-disabled lanes, so it is unobservable. + std::vector<Inst*> dpp_old_only; + for (auto* block: blocks) { + for (auto& inst: *block) { + if (inst.GetOpcode() == ValueOpcode::GetBuiltin && + inst.Arg(0) == Value(static_cast<uint32_t>(StageInputKind::PackedAncillary)) && + !worklist.lowered_ancillary.contains(&inst)) { ``` <!-- coderabbit-ai-generated:v1 --> **🩺 Stability & Availability** | **🟠 Major** | **⚡ Quick win** **Include lowered ancillary sources in DPP old-operand normalization.** If one `PackedAncillary` source supplies a supported field extraction and the old operand of a live, eligible `DppUpdateU32`, the extraction marks the source as lowered. This condition then excludes it from the DPP check. The lowered-source check does not accept `DppUpdateU32`, 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](https://raw.githubusercontent.com/Pipe530/KytyPS5/pipe530-crispy-succotash/src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp)) <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:b94a5e0c586df532281481f2 --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit 8082c13
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-21 03:01 UTC · original · reviewed

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 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.cpp

Included 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](https://github.com/KytyPS5/KytyPS5/pull/1769#pullrequestreview-5594456972) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 1** --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `67d1cf26-7902-40aa-9ff7-a0f7d348ddf5` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between aa0dc812a8198ca1b78ca5a39c3aee5b5d223b17 and 4fdbdaa3335008b1d2936b3772a0cee76cf23bdd. </details> <details> <summary>📒 Files selected for processing: 1</summary> * `src/graphics/shader/recompiler/ir/passes/ConstantPropagation.cpp` </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=09b1a022-db91-4d78-86c1-12e981d33c86 attempt=8dbfbb16-ec42-4666-9aad-20cee4342b4e batch=1/1 -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.