tests: read back s_pack_ll/lh/hh and s_absdiff_i32 on D3D12 WARP and hardware (follow-up to #2512) #2515
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2523"
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-11-25T19:47:28Z.
Follow-up to #2512, which merged before I pushed this. It adds the D3D12 readback @tedin7 asked for in his review of
s_pack_ll_b32_b16,s_pack_lh_b32_b16,s_pack_hh_b32_b16ands_absdiff_i32. Part of #1723.tests/startup_gfx2hlsl_pack_absdiff_check.py dispatch <dxc> <offscreen_check> <adapter>(the no-argument mode is unchanged):offscreen_check --raw-uav-dump.s_absdiff_i32. Both are compared with the integer references already in the file.--raw-uav-dumprequires.startup_gfx2hlsl_pack_absdiff_dispatch_warpand_hardware, withSKIP_RETURN_CODE 77, next to the existing test.Cases (8 absdiff + 3 x 9 pack = 35 per adapter), covering the edges named in the review:
(0x80000000, 1)and its reverse,(0x7fffffff, 0x80000000)and its reverse,(5, 5),(0, 0),(0xffffffff, 0),(3, 10);0xffffffff,0x0000ffff,0xffff0000,0x00010000/0x0000ffff,0x12345678/0x9abcdef0and0/0xffffffff, in both orders where they differ, covering<< 16and& 0xffff0000.Results at this branch's head (main
396e7e2plus this commit), Windows 11, Python 3.14, DXC from the Windows SDK 10.0.26100, debug layer not enabled:python -B tests/startup_gfx2hlsl_pack_absdiff_check.py: ok.... dispatch <dxc> <offscreen_check> warp: 35/35 cases, Microsoft Basic Render Driver.... dispatch <dxc> <offscreen_check> hardware: 35/35 cases, NVIDIA GeForce RTX 5080 (driver 32.0.16.2101).Mutations in
tools/startup/gfx2hlsl.py. Each made both dispatch runs fail; the mismatch counts are per adapter:s_absdiff_i32withoutasint: 4;s_absdiff_i32SCC inverted: 8;s_pack_llshifting by 15: 7;s_pack_lhmasking0x7fff0000: 4;s_pack_hhshifting by 15: 7.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:51:36Z.
Review: COMMENTED
Review of head
0aa09869(comment only).Checked:
dispatchmode builds a cs_6_0 shader from the lines gfx2hlsl really emits, XORs the loaded sources so DXC cannot fold them, and compares D (and SCC fors_absdiff_i32) with the integer references already in the file. The operand region is checked unchanged. Real D3D12 readback, not a string check.--raw-uav-dumprequires. Exit 77 maps to SKIP in CMake for both adapters. Sibling check is registered next to the existing test.Commands run (Linux, worktree of the exact head):
python3 -B tests/startup_gfx2hlsl_pack_absdiff_check.py: okpython3 tests/docs_links_check.py: okpython3 tests/bidi_controls_check.py: okgit diff --check origin/main...HEAD: cleanNot run here: the dispatch test needs DXC and D3D12, so it is verified in the Win2025 WARP run that follows.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T20:00:24Z.
Win2025 WARP receipt for head
18f3d720after updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
18f3d720de85565ff8f02c7d1368131a8e840354:--preset dev):cmake --build --preset dev -- -j 2):163.64s(configure2.82s)ctest --preset dev -R 'startup_gfx2hlsl_pack_absdiff' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (3.00s:startup_gfx2hlsl_pack_absdiff_dispatch_warp0.57s,startup_gfx2hlsl_pack_absdiff_dispatch_hardware0.56s,startup_gfx2hlsl_pack_absdiff2.88s)/O2(--preset release):cmake --build --preset release -- -j 2):86.72s(configure2.01s)ctest --preset release -R 'startup_gfx2hlsl_pack_absdiff' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (4.03s:startup_gfx2hlsl_pack_absdiff_dispatch_warp1.09s,startup_gfx2hlsl_pack_absdiff_dispatch_hardware0.72s,startup_gfx2hlsl_pack_absdiff3.81s)tests/startup_gfx2hlsl_pack_absdiff_check.pyok (4.2s)sccachehits/wall omittedAI-assisted; commands listed were executed locally.