shader: eliminate uniform read-first-lane operations #735
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!735
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/735/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?
@carbonimax on GitHub · 2026-09-20 15:25 UTC · original
carbonimax:codex/read-first-lane-uniform→main· +364 −27 · 6 files · 2 commits · closed without mergingSummary
ReadFirstLanesources before SPIR-V emission.Validation
cmake --build /private/tmp/kyty-vertex-subgroup-build --target scalar_provenance_tests shader_cfg_testsctest --test-dir /private/tmp/kyty-vertex-subgroup-build -R "scalar_provenance|shader_cfg" --output-on-failure: 2/2 passed.Scope
This commit is based on current
main(c3cc845). The integration check also included #637 and the existing PerVertex/NGG stack; #637 is required to fold the constant lane-mask portion before this pass. This does not establish correct rendering or playability in the game.@coderabbitai[bot] on GitHub · 2026-09-20 15:28 UTC · original · edited 2026-10-16 06:50 UTC
📝 Walkthrough
The pass now validates and rebuilds eligible lane-invariant ReadFirstLane sources, replaces their uses, and records rewritten reads. Unsupported or lane-varying sources remain unchanged. Resource tracking now accepts qualifying wave-uniform rows and descriptor keys after read-lane elimination. Tests cover reconstruction, rejected proofs, resource plans, and compiled shader inputs.
Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Bug fix
Merge Risk: 🟡 Moderate · up to
3bc9aThe new ReadFirstLane elimination can change shader results when no lanes are active at the read and the masked selection's fallback value varies by lane. Prove that EXEC is non-empty at the read, or preserve the fallback value, before merging.
Pre-merge checks:
4 ·
1
Full details: Docstring Coverage
Explanation
Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 4 files. (2 skipped: 1 unsupported, 1 too large.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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-16 06:50 UTC · original · reviewed
ℹ️ Review info
⚙️ Run configuration
12255001-e960-4245-9882-6804863709b0📥 Commits
Reviewing files that changed from the base of the PR and between 5d1c509209e0f9bface958a1941fb1563e0a993c and
3bc9aac0b9.📒 Files selected for processing: 6
CMakeLists.txtsrc/graphics/shader/recompiler/ir/passes/ReadLaneElimination.cppsrc/graphics/shader/recompiler/ir/passes/ResourceTracking.cpptests/ResourceTrackingTests.cpptests/ScalarProvenanceTests.cpptests/shaderCfgTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Pull request closed