Repository navigation
Conversation
A local program that keeps the relative patch index only on inactive lanes, or in a vector-window slot nothing reloads, was refused as a data use. Follow the index through the values that carry it, and refuse only when a side effect still observes it.
|
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.
|
jotitadev
left a comment
There was a problem hiding this comment.
Linux run on NVIDIA and lavapipe, which the Linux CI job uses.
Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, plus lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same machine. Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Head 41972eeb9 merged into main 5d9dcc42d (clean merge), -j1 --timeout 30.
- Tests only (
TessellationLowering.cpprestored frommain):agc_driver_tessellationfails on both devices withtessellation lowering: the relative patch or vertex index is used outside a tessellation ring or LDS address at pc 0x0. - With the fix:
agc_driver_tessellationandagc_tessellation_factor_ringpass 3/3 on the RTX 3070 and 3/3 on lavapipe.
GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Intel and AMD Windows data: the new cases pass on both GPUs with this change and fail on both without it. Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
Full CTest ( AI-assisted: yes (Claude Code) |
|
Tested on Windows 11, MinGW-w64 GCC 15.2.0, NVIDIA GeForce RTX 5090 (driver 617.42), Ryzen 9 9950X3D. Head
Not tested: PPSA12361 (no dump here). I skimmed AI-assisted: yes. Written with AI assistance and reviewed by me. |
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the change and the thorough third-party runs. One correctness problem blocks it:
core/shader/recompiler/Optimization/src/TessellationLowering.cpp:256(ImpliesNot): forpredicate = !pit returnsImplies(p, condition).p => conditiondoes not give!p => !condition. Example:p = a && b,condition = a,predicate = !(a && b). Witha = true, b = falsethe predicate holds and the select takes its first arm, butdependsOnRelativefollows only the second arm and can accept an index that is observed. The sound cases arep == condition(then!p => !condition), or the other direction,condition => p. Please fix it (probably only the equality case, sinceImpliesonly looks atLogicalAndon the left) and add a test whose masked-select predicate is a negated conjunction where the observed arm carries the index, which must stay refused.
The rest of the diff (the CarriesRelativeBits set, the window-load reachability walk, the existing refusals kept) reads fine.
|
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 |
|
One checklist item remains incomplete independently of the code concern in the existing changes-requested review. |
What
A local tessellation program that uses the relative patch index only to address local data share, and otherwise keeps it on inactive lanes or in a vector-window slot nothing reloads, was refused:
usedAsDatatreated every value that was not itself an address as a data use. The index is now followed through the arithmetic, selects, bitcasts and other pure operations that carry its bits. A side effect counts only when the value it observes still depends on the index. An exec-masked select counts only the arm that exec takes. A vector-window store counts only when a later load can see it. Storing the index into local data share, or reloading it from the window, is still refused.PPSA12361 (Transport Fever 2: Console Edition) stops at startup on this refusal for shader
0x287f20000, stage 6.#6551 also edits
TessellationLowering.cpp, for a hull read at a control point chosen by a select or a phi. This change is the data-use check for a local program.Tested
Windows 11, MinGW-w64 GCC 16.1.0, NVIDIA GeForce RTX 5090, driver 610.62.
agc_driver_tessellation_testspasses. A local program whose relative index survives only on inactive lanes compiles. Restoring exec before storing the index, and a window load after the address is stored, are still refused, as is the existingLocalIndexAsDatacase. The previous hull and domain cases pass.0x287f20000compiles. The title gets past that shader and later stops on the multisampled storage-image refusal, which is feat(agc): write a multisampled color target through a storage image #5881.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)