Repository navigation
feat(recompiler): support waterfall select conditions and key bounds in pointer image tables - #7388
Conversation
|
Thanks. The three pieces look sound on their own. One consistency issue, and a test question:
|
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
One more thing: this head doesn't compile. |
6d52850 to
d813f7e
Compare
|
Updated:
|
d813f7e to
9a78a08
Compare
|
Fixed in the latest update:
Also, whenever you have a moment, could you please take a look at our other open PRs:
|
9a78a08 to
1a62a3f
Compare
|
Built
Adding a non-const pointer overload in inline bool ActiveMaskImplies(IrValue* mask, IrValue* condition) {
return ActiveMaskImplies(static_cast<const IrValue*>(mask), static_cast<const IrValue*>(condition));
}With that change, the The unbounded checks before it pass. That differs from your note that the bounded case fails on AI-assisted: yes |
|
Pushed commit
|
|
@pushkarreddyy I ran this on Marvel's Guardians of the Galaxy (PPSA01748), the title in #7362. The title still stops at the same shader.
Tested and written by Claude (AI assistant) on a contributor's machine. |
…in pointer image tables
…d test key dynamic
59c0f66 to
bfd5b6e
Compare
|
@Tamalero Thanks for testing on Marvel's Guardians of the Galaxy (
|
|
Windows data point for
So with the production files restored to Not tested: the full AI-assisted (Claude Code). |
|
Windows NVIDIA run, since the description lists no GPU run. Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), AMD Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies,
No title run. AI-assisted: yes (runs done with Claude Code). |
|
@Neithennn Thank you for running the hardware verification on Windows 11 with the RTX 4080! Great to see all 10 image-table and waterfall tests passing ( |
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the update. The bound propagation and the ActiveMaskImplies helper look sound; three things left:
SrtTape.cpp:107still compares the select condition to the mask with== mask, so a select on one conjunct of the mask is approved by the validator and the evaluator but the tape still compiles the inactive arm. @oneandonlydean asked for it to useActiveMaskImpliestoo; please apply it there and add a case that fails without it.docs/dev/debt/shader.md:37onmain("Image tables ... read bys_loadthrough a 64-bit pointer hold the keys the key's known bits allow ...") is deleted by this PR. That line is unrelated and still true; please restore it and keep your new line next to it.SrtInstructionPredicates.hpp: the#include <concepts>/<type_traits>sit after declarations inside the namespace. Move them to the top with the other includes.
Also note that @Tamalero's run shows PPSA01748 still stops at the same shader with this head, so the PR should not say it unblocks #7362 until that changes.
|
@adriadam10 Thanks for the review! All four points have been addressed in
Pre-flight conventions check passed with 0 findings ( |
|
First AMD-on-Linux (RADV) run of this PR. Merged onto AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite (
GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes |
|
First AMD-on-Linux (RADV) run of this PR. Merged onto AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite ( Comparing the JUnit output with This checks correctness only; I did not measure performance. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes |
|
Re-checked the new head against the previous review:
Thanks for the Windows/NVIDIA runs from the other reviewers; merged. |
|
Rechecked the current head 91abb61 on Marvel's Guardians of the Galaxy (PPSA01748), Linux, RTX 4090. Both builds are on
That's expected, I think: the key there is Tested and written by Claude (AI assistant) on a contributor's machine. |
What
This pull request addresses shader recompiler evaluation, tape compilation, and image table key bounds for pointer-based SRT image tables indexing dynamic waterfall keys:
ResourceTracker.cpp): Propagate 32-bit bit bounds throughIrOpcode::ReadFirstLaneandIrOpcode::SelectU32inpossibleU32Bitsso scalarized bit indices retain bounded domains without falling back to unbounded domains (0xffffffff).SrtInstructionPredicates.cpp): Register bit-scanning and bit-counting operations (BitCount32,FindILsb32,FindUMsb32) as runtime-uniform operations underIsRuntimeUniformOp.SrtRuntimeValidator.cpp,SrtTape.cpp): AddActiveMaskImplieshelper to check conjunction masks (LogicalAndexpressions) forIsRuntimeSelectvalidation and tape compilation. When_activeMaskimplies the selection condition, the active lane branch is compiled and evaluated directly without compiling or demanding wave-wide uniformity on the inactive branch.SrtInstructionPredicates.hpp): Place standard library headers (<concepts>,<type_traits>) at file scope at the top of the header.ShaderMemory.cpp): AddverifyWaterfallImageTableunit test exercising descriptor planning, validator acceptance of conjunct selects, andSrtTapecompilation and execution of active select arms.docs/dev/debt/shader.md): Preserve existing pointer image table debt entry and documentReadFirstLane/SelectU32bound propagation and active mask implication semantics.Tested
python tools/check_conventions.py --base 4ffb0cd12passes with 0 findings and 0 errors.verifyWaterfallImageTable()passes in both--bindlessand full test suites undercore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp.Checklist