tests: reuse and overlap binary16 draw shader compiles #2782
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2790"
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 RavenCurseBurg on 2026-11-26T09:23:56Z.
Change
Compile each distinct (profile, generated HLSL) once per compiler in the binary16 ALU draw fixture. Submit the pixel and vertex shaders for the current case together, with at most three compiler processes. Consume their results and issue the draws in the existing order. The final SDWA wrong-word control draws the shader pair from its corresponding positive case.
Refs #448. This addresses the remaining FXC/DXC cost mentioned in #2766. That PR changes the shared renderer. This change is confined to
startup_gfx2hlsl_f16_alu_draw_check.pyand can land independently.Verification
Compared
4bbe52eeand1e632e13on Windows 11 build 26100.9711, DXC 1.9.2609.5 (SM 6.0), Windows SDK FXC (SM 5.1), D3D12 debug layer unavailable. The same MSVC-builtoffscreen_checkwas used on both revisions. Run the fixture on each checkout:Run the hardware command with
XBOX2WINDOWS_ADAPTER=Inteland thenNVIDIA. For each draw I recorded the profiles, SHA-256 of both HLSL sources and both compiled blobs, the expected pixel words, exit code, stdout and stderr.All three runs went from 338 compiler launches to 252 (86 fewer, 25.4%). Four successive full WARP runs with fresh temporary shader directories took 115.2 s, 69.7 s, 62.6 s, 119.6 s, in parent / branch / branch / parent order. Host load affects these times. The launch counts and draw comparisons were identical across adapters.
I also injected compiler failures at the pixel, first-vertex and second-vertex positions of a two-chunk case. Errors surfaced in draw order even when a later worker failed first. A first draw returning skip 77 still took precedence over the later shader's failure.
AI-assisted contribution using Codex.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T09:28:21Z.
Review: COMMENTED
Review of head
1e632e13(comment only). No blocking findings.tests/startup_gfx2hlsl_f16_alu_draw_check.py. Compiles are deduplicated by (profile, HLSL source) and run at most three at a time. Results are consumed in draw order, so draws and expected words are unchanged and an earlier failure still wins over a later one.startup_gfx2hlsl_f16_alu_draw_controlsandstartup_gfx2hlsl_f16_alu_draw_warppass 2/2 on both (receipt in the thread). CI is green.Commands run:
python3 -m py_compile,git diff --check origin/main...HEAD, thecontrolsmode of the fixture, and the Win2025 ctest runs above.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T09:27:09Z.
Win2025 WARP receipt for head
1e632e13.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
1e632e13b3235baa7f6a755d0cc44f2c50881776:--preset dev):ctest --preset dev -R 'startup_gfx2hlsl_f16_alu_draw_(controls|warp)' --parallel 6 --no-tests=error --output-on-failure: 2/2 passed (startup_gfx2hlsl_f16_alu_draw_controls0.33s,startup_gfx2hlsl_f16_alu_draw_warp21.29s)--preset release): same command: 2/2 passed (controls 0.34s, warp 20.76s)*_hardwarenot run (the VM only has WARP). Python-only change, so the prebuiltoffscreen_checkwas reused.Review of the exact head (comment only, no blocking findings):
tests/startup_gfx2hlsl_f16_alu_draw_check.py. The compile dedup key is (profile, HLSL source), so one source cannot be reused across profiles.python3 -m py_compile,git diff --check origin/main...HEAD, and thecontrolsmode of the fixture.AI-assisted; commands listed were executed locally.