shader: preserve live predicates through whole-quad expansion #801
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!801
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/801/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?
@neodouglas on GitHub · 2026-09-24 07:12 UTC · original
neodouglas:fix/entry-wqm-lane-test→main· +136 −8 · 3 files · 1 commits · merged 2026-09-24 08:02 UTCASTRO BOT’s NV12-to-RGB pixel shader lost its known-live lane predicate after
S_WQM, leaving redundant runtime selects around its color arithmetic. Preserve the source-live predicate alongside the expanded scalar mask: WQM can activate lanes but cannot deactivate a source lane. Entry predicates then fold naturally through the existing IR passes, including masks saved in SGPRs.The translation retains RDNA2 B32/B64 mask values, SCC updates, untouched destination halves, and raw-source/cross-half behavior. Explicit branches and descriptive names keep the WQM path readable. No instruction pre-scan, opcode-name matching, shader-specific case, or new backend operation is needed.
Validation:
kyty_emulator,shader_cfg_tests, andshader_recompiler_compute_testsusing the existing CMake configuration.shader_cfg_testsandshader_recompiler_compute_tests --wave64-onlypassed after the readability revision.launch.jsonwith--game-patchand Vulkan validation disabled; RenderDoc capture was triggered after 15 seconds on an RTX 5080 Laptop GPU.@coderabbitai[bot] on GitHub · 2026-09-24 07:25 UTC · original · edited 2026-09-24 07:35 UTC
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
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:
cea4608b-4789-46bd-bea8-a18666b76693📥 Commits
Reviewing files that changed from the base of the PR and between 7d3bb69dd52c80a7fa944e10c2855cb62386259d and 60366b2e2cfa34578b8e2262845d53c162273089.
📒 Files selected for processing (1)
src/graphics/shader/recompiler/frontend/translate/Translate.cpp🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📝 Walkthrough
Walkthrough
For pixel shaders, translation scans decoded instructions for an eligible entry
S_WQM_B32orS_WQM_B64instruction and passes its PC to each block translator. The scan stops if it encounters specified EXEC writes, control-flow instructions, or disqualifying opcode names. At the matching PC, both WQM paths set EXEC to true. Other shader stages useUINT32_MAX.Priority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
60366No actionable merge-blocking issue remains from the reviewed change; normal checks can proceed.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment
@coderabbitai helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-09-24 07:25 UTC · original · edited 2026-09-24 07:32 UTC
On
src/graphics/shader/recompiler/frontend/translate/Translate.cppline 918 (outdated):🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 7294
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 42284
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 37382
Reject EXEC writes through
inst.dst2before selecting the entry WQM.The decoder represents the
V_ADD_CO_U32carry-out form asDecoder::Opcode::V_ADD_I32. Its VOP3B scalar destination is stored ininst.dst2, andDecodeScalarDestinationacceptsExecLoandExecHi.Translator::ADD_U32then writesexec & carrythroughWriteMask(inst.dst2, ...).Therefore, a carry result can clear EXEC before
s_wqm exec, exec.FindEntryWqmPcdoes not detect this because it checks onlyinst.dst. The selected entry WQM then sets EXEC to constanttrue, which can enable later VALU writes for lanes that should remain inactive.Suggested fix
📝 Committable suggestion
✅ Addressed in commit 60366b2
@coderabbitai[bot] on GitHub · 2026-09-24 07:25 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:
fe21597c-12d7-423b-a72f-a4289e356365📥 Commits
Reviewing files that changed from the base of the PR and between
3dc3fd0197and 7d3bb69dd52c80a7fa944e10c2855cb62386259d.📒 Files selected for processing (3)
src/graphics/shader/recompiler/frontend/translate/Control.cppsrc/graphics/shader/recompiler/frontend/translate/Translate.cppsrc/graphics/shader/recompiler/frontend/translate/Translator.hIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@neodouglas on GitHub · 2026-09-24 07:44 UTC · original
Before/after video of the Astro Bot (PPSA21567) intro on Windows with an RTX 5090. The first part is with this change, the second part is without it:
https://youtu.be/qtIIslPr3QI