shader: lower bound-table descriptor waterfalls in pixel stages #3823
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3823"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-02T05:33:22Z.
Problem
#3091 lowers the
v_readfirstlane_b32descriptor waterfall in pixel stages only when the descriptor is loaded from the resource heap. The same loop over a bound root table is refused, so an ordinary pixel shader that selects one of a few table slots per lane does not translate. A loop that only resembles a waterfall also falls through to the generic loop path without saying which part of the shape was not proven.Change
s_andn2_wrexecis treated as a waterfall attempt. If its shape does not hold, it is refused with the first unproven part (pixel descriptor waterfall: ...).main.The heap path from #3091 is unchanged.
Known limit: an outer uniform loop that contains a complete waterfall is refused early.
mainalready refuses the inner waterfall in that case.Validation
Windows, MSVC, on
17884dd31. Fixtures are source-built: the linked pair fromnative_sampled_pixel_gpu --write-fixture, patched so each lane derives its slot from its own coordinate.Both tests pass, none skipped.
sampleGradwith the quad derivatives.Not covered: a waterfall nested in another loop (refused, see above) and bound-table views other than non-comparison 2D or 2D-array texture SRVs (refused).
Part of #3210. Extends #3091.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T05:44:22Z.
Review: APPROVED
Independent Windows Debug result at
17884dd3:ctest --preset dev --no-tests=error -j 1 -R '^native_indexed_pixel_texture_(warp|hardware)$' --output-on-failurepassed 2/2 on Windows 11 26300.9974, WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. The three waterfall draws each matched 28 covered and four sentinel pixels per backend. The waterfall subcommand did not enable the debug layer. As a local mutation, I changed the descriptor-source guard to require the resource heap. The WARP control then failed on the expected bound-table translation at +0x88. Restored the source and rebuilt the compiler.