test: isolate the quad axis in the compute LOD replay #3299
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3299"
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 RonLogic on 2026-11-28T06:15:35Z.
Change
Refs #3255 and the RX 9060 XT readback in #3241.
The multidimensional Compute replay uses a trilinear sampler. Its original ramp produced horizontal and vertical derivatives of 0.5 and 1 texel along the same texture axis, while the reference required an exact mip-0 value. The revised ramp is constant within each horizontal pair. It places consecutive quads at a 0.75-texel vertical footprint and spatial 2D quads at three texels. This leaves room below the mip transition and keeps the layout difference visible in the readback.
The compile controls also inspect DXIL
NumThreads. The implicit shader must use flattened dimensions and the explicit-LOD shader must retain the requested shape. Production shader lowering and runtime bindings are unchanged.Verification
1936f7acon6a1968a1. Windows 11 build 26300.10075, DXC 1.9.2602.17, Agility 1.620.2. RTX 4070 driver 32.0.16.2124 and app-local WARP 1.0.22. Both adapters had the D3D12 debug layer enabled.All six checks passed, with zero skips. The independent source-built HLSL control read
ddx=0andddy=0.75texels for all 32 flattened threads on both adapters, and all 320 output and guard words matched. With an actual8x4x1spatial dispatch, it readddy=3and the mip-0 oracle rejected all 32 sample words. The first mismatch was0x3f800000expected versus0x40560000on RTX and0x404b0000on WARP. The metadata check independently rejected the unflattened8x4x1module when substituted for the flattened shader.Evidence and follow-up
The RX 9060 XT report remains to be rerun with this ramp. Its original
0x3f948000word is consistent with a fractional trilinear blend, so it leaves both the LOD calculation and the lane-order hypothesis open. The changed programs are generated by the existing synthetic fixture. I used Codex to prepare the change and ran verification locally.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T06:18:13Z.
Thanks, this fixes a flaw in the #3255 fixture that I missed. The original ramp,
V = (index & 15) / 16on the 8-texel-tall base, gave the consecutive quad 0.5 texel in ddx and 1 texel in ddy, both along the same texture axis. Undermax()that is LOD 0, right at the trilinear boundary. The RX 9060 XT word0x3f948000is 1 + 41/256. That is consistent with LOD log2(hypot(0.5, 1)) = 0.161 under trilinear filtering, which would blend in mip 1. I have not verified that on that card.I checked the new ramp by reading the diff (not run).
V = (index & 14) * 3 / (8 * HEIGHT)gives:The
& 14wrap falls between quads, never inside one. So the wrong quad layout stays observable, and the expected sample stays clear of the mip transition. TheNumThreadscheck on both shaders also pins the flattening directly, independent of the driver.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T06:23:31Z.
Review: APPROVED
Independent Release check on
1936f7ac:ctest --preset release --no-tests=error --output-on-failure -j 1 -R '^(native_compute_implicit_lod_.*|native_direct_container|shader_wave32_(hardware|warp))$'reported four passes and two capability skips. The RTX 4060 Laptop hardware replay and DXIL dimensions controls passed on Windows 11 build 26200/DXC 10.0.26100; inbox WARP 10.0.26100.9818 skipped the two wave32 cases. The revised ramp holds the coordinate constant across horizontal pairs and still distinguishes spatial ordering. The diff is confined to fixture and documentation. The RX 9060 XT follow-up remains open.