tests: batch heap-view store references by compute shader #2646
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2654"
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-26T00:37:52Z.
Change
compute_store_aot_heap_view_store_{warp,hardware}used to start a renderer for every reference, even when several references shared one compiled compute shader. This change uses the existing--compute-store-batchpath once per shader. Every reference still uploads its own data, dispatches and compares 320 words after the fence.The five batches contain 12 UINT4, 12 D16 XYZW, 16 D16 X, 17 D16 XY and 17 D16 XYZ references. The 52 shader mutations each compile and run separately, including their first-mismatched-word checks. A batch error identifies the mode and the individual slot, payload or format. The fixture retains its hardware-unavailable exit 77.
Verification
I compared main
8ecaa8ecand the candidate on Windows 11 using the same compiled renderer and DXC 1.9.2609. On WARP, an RTX 4060 and an Intel UHD Graphics 770, each side performed 126 independent 320-word readbacks per backend. Each candidate matched the baseline for all 57 HLSL/DXIL compilation pairs, shader and case-file fingerprints, mismatch counts, and first differing word (index, expected and actual). Each backend had 74 matching references and 52 detected mutations. Renderer invocations fell from 126 to 57.I timed the uninstrumented fixture with a warm-up on each revision and three alternating measured pairs. On desktop WARP the median went from 33.094 s to 23.520 s (28.9% lower). The raw baseline runs were 27.804, 33.094 and 35.023 s. The candidate runs were 21.301, 23.520 and 25.616 s.
The translation controls passed, all five synthetic LLVM programs assembled and matched the CLI translation, and 507 documentation links passed. Five injected renderer results also checked the return path: only the opted-in hardware exit 77 became a skip, and WARP 77 and hardware errors remained failures.
Evidence and follow-up
The same three-pair benchmark on the RTX 4060 went from a median of 70.141 s to 44.492 s (36.6% lower). On Intel UHD Graphics 770 it went from 82.438 s to 51.410 s (37.6% lower). All 24 timed invocations across the three backends exited 0.
I also flipped reference word 319 in the middle of each of the five WARP batches. Each run named the failing slot, reported word 319 with its expected and actual values, and still reported a pass for the final case.
This is the heap-view store fixture requested in the #448 follow-up. The shader programs, heap records, payloads and mutations come from the existing public fixture.
Refs #448.
AI-assisted contribution using Codex (GPT-6.2 Astra, xhigh).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:41:00Z.
Review: COMMENTED
Review of head
01a6501f(comment only, test-only change).What I checked:
compute_heap_store_check.pynow builds one case file per reference and sends them through the existingcheck_referencesbatch path (--compute-store-batch), one renderer per shader. Case contents match the old per-call cases: same slots, payloads, wrong-format tables. The "wrong FLOAT4 format" case still expects an all-sentinel result (written_offsets=()), same as before.check_referencesgets an opt-inallow_hardware_skip, so the hardware exit 77 is kept. The other caller ignores the new return value, so it is unaffected.docs/experiments.mdtext matches the code. No other open or merged PR covers this slice (#2615 and #2635 are the sibling batching changes it follows).Commands run (Linux):
git diff --check origin/main...HEAD: cleanpython3 tests/docs_links_check.py: passpython3 tests/bidi_controls_check.py: passpython3 -m py_compileon both touched tests: okNo findings. The Windows WARP run is still to come (no renderer on Linux).
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:44:54Z.
Win2025 WARP receipt for head
799a37ccafter updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
799a37cccba40b644647b2bf977ecfac68a6538a:--preset dev):cmake --build --preset dev -- -j 2):0.00s(configure0.00s)ctest --preset dev -R '^compute_(heap_store|store_aot_heap_view_store|load_format|store_aot_load_format)' --parallel 6 --no-tests=error --output-on-failure): 4/4 passed (3.93s:compute_heap_store_controls0.52s,compute_load_format_controls0.53s,compute_store_aot_heap_view_store_hardware3.78s,compute_store_aot_heap_view_store_warp3.81s)/O2(--preset release):cmake --build --preset release -- -j 2):0.00s(configure0.00s)ctest --preset release -R '^compute_(heap_store|store_aot_heap_view_store|load_format|store_aot_load_format)' --parallel 6 --no-tests=error --output-on-failure): 4/4 passed (3.86s:compute_heap_store_controls0.51s,compute_load_format_controls0.53s,compute_store_aot_heap_view_store_warp3.72s,compute_store_aot_heap_view_store_hardware3.74s)tests/compute_heap_store_check.pyok (0.5s),tests/compute_heap_view_check.pyok (0.5s),tests/compute_load_format_check.pyok (0.5s)13.3sAI-assisted; commands listed were executed locally.