tooling: compare raw UAV output of condstore_256 with and without GVN #955

Merged
rasptum merged 1 commit from upstream-pr/962 into main 2026-11-23 19:22:26 +00:00
rasptum commented 2026-11-23 18:58:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-23T18:58:26Z.


Refs #775. This is the output-parity follow-up R0Y00 suggested after #918 (milestone: #676 replay profile, mixed-sampler compute compile time). The interface is a new offscreen_check --raw-uav-dump operation plus the CTest entries dxc_gvn_output_warp and dxc_gvn_output_hardware.

What it checks

tests/dxc_gvn_output_check.py compiles condstore_256 from tools/dxc_compile_time.py twice: with default optimization and with -opt-disable gvn. It dispatches both blobs with identical inputs and compares the complete raw UAV (70,656 bytes, 17,664 words) bit for bit, with each other and with an expected buffer computed from the HLSL alone. The two containers differ (default GVN folds the alternating conditions into phis, while the no-GVN build recomputes them). The script prints both SHA-256 values and fails if they are equal.

  • Inputs: the sampler fixture's bindings (2x1 R32_FLOAT texture 0.25/0.75, wrap/clamp point samplers, LESS_EQUAL comparison samplers). The UAV is pre-filled with ((i + 1) * 0x9E3779B1) | 1, so unwritten words stay distinguishable. There are two dispatches, with 1 and 2 groups; they change 130 and 260 words respectively.
  • Wrong-output controls (both must be detected):
    • store k=101 redirected into the unused tail, compiled with default optimization, must mismatch at exactly words [16485, 16704];
    • a one-bit flip of expected word 16385 must mismatch at exactly [16385].
  • Target: cs_6_0 without 16-bit types. The Windows 10 in-box runtime exposes SM 6.6 on neither WARP nor the RTX 3060 (offscreen_check reports the SM 6.6 skip on both). GVN still takes 81.8 % of the pass time of condstore_1024 at cs_6_0.
  • The DXC version, flags and container hashes are printed. Exit 77 is reported as a skip.

Results

Windows 10 Pro build 19045, Ryzen 7 3700X, no Agility SDK, no debug layer. WARP was the in-box d3d10warp.dll 10.0.19041.5794; the hardware adapter was an NVIDIA GeForce RTX 3060 (vendor 10de device 2503) on driver 32.0.15.9636.

DXC adapter default vs expected no-GVN vs expected default vs no-GVN mutated-store control corrupted-expected control
1.7.2308.16 (52da17e29, Windows SDK 10.0.26100; CTest DXC) WARP 0 / 17,664 0 0 [16485, 16704] [16385]
1.7.2308.16 RTX 3060 0 0 0 [16485, 16704] [16385]
1.9.0.5512 (01b62ad47, LunarG Vulkan SDK 1.4.363.0) WARP 0 0 0 [16485, 16704] [16385]
1.9.0.5512 RTX 3060 0 0 0 [16485, 16704] [16385]

Each cell covers both dispatches (1 and 2 groups). There were no capability skips. The container hashes are cc17e4dc... (default) and 649f66ed... (no-GVN) for 1.7, and ac0ff6cb... and 11042b5a... for 1.9. This supports output equivalence of the GVN option on this one minimized shader, for these inputs and adapters. It makes no claim about production flags, cs_6_6 DXIL, larger members of the family or the archive cohort.

Commands

$env:TMP = "$PWD\out\tmp"; $env:TEMP = $env:TMP
.\tools\dev.ps1
cmake --preset dev; cmake --build --preset dev
ctest --preset dev --no-tests=error -R '^(dxc_gvn_output_(warp|hardware)|dxc_compile_time_gvn|offscreen_capability_table_self_test|spirv_sampler_views_(warp|hardware)|docs_links)$'   # 7/7 passed
cmake --preset release; cmake --build --preset release
ctest --preset release --no-tests=error -R '<same filter>'   # 7/7 passed
ctest --preset dev --no-tests=error -R '^dxc_gvn_output_warp$' -V
out\pe-env\Scripts\python.exe -B tests\dxc_gvn_output_check.py F:\VulkanSDK\Bin\dxc.exe out\build\dev\offscreen_check.exe warp   # 1.9 rows, also hardware
python -B tests/form_coverage_check.py; python -B tests/docs_links_check.py; python -B tests/bidi_controls_check.py   # pass

The full dev and release builds and tests ran before the rebase. On the final commit cf3c75f (rebased onto c8b8807, clean), offscreen_check was rebuilt in dev. dxc_gvn_output_warp, dxc_gvn_output_hardware, dxc_compile_time_gvn, offscreen_capability_table_self_test and the three Python checks passed again. The release build was not repeated on the final commit.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6566614179 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/962). Originally posted by [rasptum](https://github.com/rasptum) on 2026-11-23T18:58:26Z. --- Refs #775. This is the output-parity follow-up R0Y00 suggested after #918 (milestone: #676 replay profile, mixed-sampler compute compile time). The interface is a new `offscreen_check --raw-uav-dump` operation plus the CTest entries `dxc_gvn_output_warp` and `dxc_gvn_output_hardware`. ## What it checks `tests/dxc_gvn_output_check.py` compiles `condstore_256` from `tools/dxc_compile_time.py` twice: with default optimization and with `-opt-disable gvn`. It dispatches both blobs with identical inputs and compares the **complete raw UAV** (70,656 bytes, 17,664 words) bit for bit, with each other and with an expected buffer computed from the HLSL alone. The two containers differ (default GVN folds the alternating conditions into phis, while the no-GVN build recomputes them). The script prints both SHA-256 values and fails if they are equal. - **Inputs:** the sampler fixture's bindings (2x1 R32_FLOAT texture 0.25/0.75, wrap/clamp point samplers, LESS_EQUAL comparison samplers). The UAV is pre-filled with `((i + 1) * 0x9E3779B1) | 1`, so unwritten words stay distinguishable. There are two dispatches, with 1 and 2 groups; they change 130 and 260 words respectively. - **Wrong-output controls (both must be detected):** - store k=101 redirected into the unused tail, compiled with default optimization, must mismatch at exactly words [16485, 16704]; - a one-bit flip of expected word 16385 must mismatch at exactly [16385]. - **Target:** cs_6_0 without 16-bit types. The Windows 10 in-box runtime exposes SM 6.6 on neither WARP nor the RTX 3060 (`offscreen_check` reports the SM 6.6 skip on both). GVN still takes 81.8 % of the pass time of `condstore_1024` at cs_6_0. - The DXC version, flags and container hashes are printed. Exit 77 is reported as a skip. ## Results Windows 10 Pro build 19045, Ryzen 7 3700X, no Agility SDK, no debug layer. WARP was the in-box `d3d10warp.dll` 10.0.19041.5794; the hardware adapter was an NVIDIA GeForce RTX 3060 (vendor 10de device 2503) on driver 32.0.15.9636. | DXC | adapter | default vs expected | no-GVN vs expected | default vs no-GVN | mutated-store control | corrupted-expected control | |---|---|---|---|---|---|---| | 1.7.2308.16 (`52da17e29`, Windows SDK 10.0.26100; CTest DXC) | WARP | 0 / 17,664 | 0 | 0 | [16485, 16704] | [16385] | | 1.7.2308.16 | RTX 3060 | 0 | 0 | 0 | [16485, 16704] | [16385] | | 1.9.0.5512 (`01b62ad47`, LunarG Vulkan SDK 1.4.363.0) | WARP | 0 | 0 | 0 | [16485, 16704] | [16385] | | 1.9.0.5512 | RTX 3060 | 0 | 0 | 0 | [16485, 16704] | [16385] | Each cell covers both dispatches (1 and 2 groups). There were no capability skips. The container hashes are `cc17e4dc...` (default) and `649f66ed...` (no-GVN) for 1.7, and `ac0ff6cb...` and `11042b5a...` for 1.9. This supports output equivalence of the GVN option on this one minimized shader, for these inputs and adapters. It makes no claim about production flags, cs_6_6 DXIL, larger members of the family or the archive cohort. ## Commands ```powershell $env:TMP = "$PWD\out\tmp"; $env:TEMP = $env:TMP .\tools\dev.ps1 cmake --preset dev; cmake --build --preset dev ctest --preset dev --no-tests=error -R '^(dxc_gvn_output_(warp|hardware)|dxc_compile_time_gvn|offscreen_capability_table_self_test|spirv_sampler_views_(warp|hardware)|docs_links)$' # 7/7 passed cmake --preset release; cmake --build --preset release ctest --preset release --no-tests=error -R '<same filter>' # 7/7 passed ctest --preset dev --no-tests=error -R '^dxc_gvn_output_warp$' -V out\pe-env\Scripts\python.exe -B tests\dxc_gvn_output_check.py F:\VulkanSDK\Bin\dxc.exe out\build\dev\offscreen_check.exe warp # 1.9 rows, also hardware python -B tests/form_coverage_check.py; python -B tests/docs_links_check.py; python -B tests/bidi_controls_check.py # pass ``` The full dev and release builds and tests ran before the rebase. On the final commit `cf3c75f` (rebased onto `c8b8807`, clean), `offscreen_check` was rebuilt in dev. `dxc_gvn_output_warp`, `dxc_gvn_output_hardware`, `dxc_compile_time_gvn`, `offscreen_capability_table_self_test` and the three Python checks passed again. The release build was not repeated on the final commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-24 06:45:36 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!955
No description provided.