Repository navigation
test(d3d12): compare POINT and LINEAR M2 draws against CPU pixels - #3717
Conversation
kacper-serewis
left a comment
There was a problem hiding this comment.
9cae273 on RTX 5070 driver 616.56, Windows MSVC 19.50: POINT and LINEAR each matched all 4096 pixels exactly, wrap/clamp differed at the expected 1536. Substituting POINT in the LINEAR descriptor failed first at (4,0); restoring it reproduced the pass. Three synthetic shaders passed spirv-val. AI-assisted.
|
Independent Radeon Windows verification of the unchanged 9cae273 M2 test passed with #3045 in scratch. POINT and LINEAR each matched all 4,096 pixels exactly, the addressing control differed at the expected 1,536, and core/synchronization validation reported zero warnings/errors. Configuration and GPU report. AI-assisted. |
Desamodeth
left a comment
There was a problem hiding this comment.
Tested 9cae273 on Windows 11, MSVC Release, RTX 5070 (621.24), Vulkan validation on. LLVM 23.1.5 assembled the three M2 fixtures; all three translated and passed spirv-val. Both POINT and LINEAR matched the CPU on all 4,096 pixels, with maximum channel error 0. The addressing control differed on the expected 1,536 pixels. As a separate negative control I changed only the LINEAR sampler U address mode from CLAMP to WRAP: the test failed at (0, 0), red 110 instead of 0. Restoring CLAMP passed again. Synthetic draws only. AI-assisted.
|
Tested 9cae273 on NVIDIA GeForce RTX 4090 (Ada), 621.14 (Vulkan 1.4.357), Windows 11 (26200): pass. A second NVIDIA generation next to the author's RTX 3090 / 621.24. MSVC 19.44 (VS 2022), Ninja, RelWithDebInfo; the branch is on
So bilinear filtering through the layer matches the CPU's four-tap blend exactly on this driver as well, without needing the one-level tolerance. I did not repeat the PR's negative control (forcing the POINT slot). No game files. AI-assisted check (Claude Code). |
|
Tested
Code read of AI-assisted. |
|
Tested 9cae273 under Wine 11.21 (Fedora 45) on AMD Radeon 610M iGPU (RDNA2 gfx1036, RADV Mesa 26.2.6) and NVIDIA RTX 4070 Ti (615.78.08): pass. This is the first run on RADV and on a Linux driver; the earlier checks are AMD and NVIDIA on Windows.
Not run: AI-assisted (Claude Code); numbers copied from the run logs. |
|
Tested
AI-assisted (Claude). No game files. |
|
Also tested No game files. AI-assisted (Claude Code). |
Claimed in the coordination issue: #3574 (comment)
What and why
The existing M2 draw verifies point sampling and wrap/clamp addressing. This adds a LINEAR/CLAMP sampler slot and draws the same two scissored halves again with the same pipeline, UVs, textures and root tables. The two results are read back separately. The CPU computes the four clamped taps at each pixel center and rounds the blend to RGBA8. POINT and the wrap/clamp control retain their exact comparisons. LINEAR allows one UNORM level per channel.
Tested
Fresh Windows checkout at 9cae273, MSVC, NVIDIA GeForce RTX 3090, driver 621.24, Vulkan validation enabled. Built the d3d12_m2_textured_test target with the repository's three hand-written shader fixtures. All three translated and passed spirv-val.
ctest --test-dir build-m2 -V -R "^d3d12_m2_textured$"passed. All 4096 POINT pixels and all 4096 LINEAR pixels matched the CPU exactly (maximum observed channel error 0). The existing addressing control still differed at its expected 1536 pixels. Forcing the POINT slot for the LINEAR draw in a local negative control failed at (4, 0), red 0 versus expected 2.Checklist