Tests: exercise direct geometry in expanded heap windows #2430

Open
venetanji wants to merge 2 commits from upstream-pr/2440 into main
venetanji commented 2026-11-25 18:57:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by venetanji on 2026-11-25T18:57:07Z.


The direct-DXIL test helper falls back to HLSL above four memory windows, even when heap windows support sixteen. That lets a requested direct test pass without exercising direct translation. Honor the existing layout limit and assert a real DXIL result. Part of #2088.

What is in it

  • One existing test file: an isolated CPU sentinel regression for compute and NGG at eight/sixteen heap windows, including the non-heap fallback.
  • Extend the numeric NGG record check to window 15; add a direct legacy-GS compute-prepass check of all 192 reference fields and an untouched window-0 decoy. New direct GPU variants require the selected split-wave64 mode. Existing default fixtures and expected numbers remain.
  • Complements #2408/#2383: these execute highest-window NGG/legacy data; they do not change a compiler backend, shader policy, or runtime.

Tested

  • git diff --check: passes. The only changed file is gpu/recomp/tests.rs, compiled under cfg(test).
  • Targeted integration command: the Wine sandbox invoked each libtest selector with --exact --nocapture --test-threads=1 and XCL_DIRECT_DXIL=1: direct_test_helper_honors_expanded_heap_windows, gpu_mesh_mode_reads_expanded_heap_windows, gpu_geometry_direct_expanded_heap_prefix_counts.
  • Before porting to this clean public base, the same fixture bodies passed in our separate Windows-PE/Wine integration on RTX 3080 Ti / NVIDIA 615.78.08 / vkd3d-proton 3.2: three selected parent invocations passed (one CPU, two GPU), plus one separately asserted child, with zero failures/ignored/skips. The legacy check compares 192 fields plus its decoy. Those integration results do not qualify this portable head.
  • Earlier clean-public revision dc6c7870 on base 2898511. Windows/no-GPU CI passed, using Windows 2025, Rust 1.100.0 MSVC/debug and scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched (workspace build/tests, four test threads). That CI merge tree was byte-identical to revision dc6c7870. Main libtest: 1287 passed, 0 failed, 26 ignored; the script reports 344 explicit GPU skips overall. The new CPU sentinel passes, while both new GPU cases explicitly skip for no wave64. This is not hardware GPU coverage. Central CI awaits maintainer approval.
  • Current head 633b1e42 normally merges upstream 08db8020 without rewriting history. Its diff against that upstream pin is byte-identical to the earlier one-file test patch; all assertions and fixture provenance are unchanged. Current upstream Windows/no-GPU CI awaits maintainer approval; no test counts for this merge head are claimed.

Not tested

  • This clean public head on a real GPU, the full hardware suite, native Windows GPU execution, AMD/Intel/native-wave64-selected mode, or retail rendering/FPS. The legacy fixture is a compute prepass, not native mesh/raster coverage.
  • No production runtime changed and no official retail-smoke results are claimed.

AI use

  • Codex (GPT-6), in coordinated supervised sessions, wrote the narrow test-helper correction and fixture extensions, preserved the existing numeric model, checked provenance/duplicates and prepared this test-only port at the user's request.
<!-- greyfinch-sync:ivall/xcl:issue:5497319873 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2440). Originally posted by [venetanji](https://github.com/venetanji) on 2026-11-25T18:57:07Z. --- The direct-DXIL test helper falls back to HLSL above four memory windows, even when heap windows support sixteen. That lets a requested direct test pass without exercising direct translation. Honor the existing layout limit and assert a real DXIL result. Part of #2088. **What is in it** - One existing test file: an isolated CPU sentinel regression for compute and NGG at eight/sixteen heap windows, including the non-heap fallback. - Extend the numeric NGG record check to window 15; add a direct legacy-GS compute-prepass check of all 192 reference fields and an untouched window-0 decoy. New direct GPU variants require the selected split-wave64 mode. Existing default fixtures and expected numbers remain. - Complements #2408/#2383: these execute highest-window NGG/legacy data; they do not change a compiler backend, shader policy, or runtime. **Tested** - `git diff --check`: passes. The only changed file is `gpu/recomp/tests.rs`, compiled under `cfg(test)`. - Targeted integration command: the Wine sandbox invoked each libtest selector with `--exact --nocapture --test-threads=1` and `XCL_DIRECT_DXIL=1`: `direct_test_helper_honors_expanded_heap_windows`, `gpu_mesh_mode_reads_expanded_heap_windows`, `gpu_geometry_direct_expanded_heap_prefix_counts`. - Before porting to this clean public base, the same fixture bodies passed in our separate Windows-PE/Wine integration on RTX 3080 Ti / NVIDIA 615.78.08 / vkd3d-proton 3.2: three selected parent invocations passed (one CPU, two GPU), plus one separately asserted child, with zero failures/ignored/skips. The legacy check compares 192 fields plus its decoy. Those integration results do not qualify this portable head. - Earlier clean-public revision `dc6c7870` on base `2898511`. [Windows/no-GPU CI passed](https://github.com/venetanji/xcl/actions/runs/45680473633), using Windows 2025, Rust 1.100.0 MSVC/debug and `scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched` (workspace build/tests, four test threads). That CI merge tree was byte-identical to revision `dc6c7870`. Main libtest: 1287 passed, 0 failed, 26 ignored; the script reports 344 explicit GPU skips overall. The new CPU sentinel passes, while both new GPU cases explicitly skip for no wave64. This is not hardware GPU coverage. Central CI awaits maintainer approval. - Current head `633b1e42` normally merges upstream `08db8020` without rewriting history. Its diff against that upstream pin is byte-identical to the earlier one-file test patch; all assertions and fixture provenance are unchanged. [Current upstream Windows/no-GPU CI](https://github.com/xcl-dev/xcl/actions/runs/45727735660) awaits maintainer approval; no test counts for this merge head are claimed. **Not tested** - This clean public head on a real GPU, the full hardware suite, native Windows GPU execution, AMD/Intel/native-wave64-selected mode, or retail rendering/FPS. The legacy fixture is a compute prepass, not native mesh/raster coverage. - No production runtime changed and no official retail-smoke results are claimed. **AI use** - Codex (GPT-6), in coordinated supervised sessions, wrote the narrow test-helper correction and fixture extensions, preserved the existing numeric model, checked provenance/duplicates and prepared this test-only port at the user's request.
SlopTart commented 2026-11-25 20:08:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T19:18:48Z.


Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite, cold cache: 162 passed / 4 failed. Three are the known baseline trio on this lane; the fourth is the new gpu_promoted_uav_clear_values_pass_create_committed_resource failure that current main carries (reported here), not caused by this PR. Everything else is green.

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7172123715 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2440#issuecomment-7172123715). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T19:18:48Z. --- **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite, cold cache: 162 passed / 4 failed. Three are the known baseline trio on this lane; the fourth is the new `gpu_promoted_uav_clear_values_pass_create_committed_resource` failure that current main carries ([reported here](https://github.com/xcl-dev/xcl/pull/2280#issuecomment-7172066690)), not caused by this PR. Everything else is green. **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
DavidM1911 commented 2026-11-25 21:05:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:15:53Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: 1 real failure, deterministic (also fails --test-threads=1, 1219/1):
gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier
  assertion failed: group barriers in the program (lower_dxil.rs:1155)

The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge.

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7173414379 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2440#issuecomment-7173414379). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T20:15:53Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: **1 real failure**, deterministic (also fails `--test-threads=1`, 1219/1): ``` gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier assertion failed: group barriers in the program (lower_dxil.rs:1155) ``` The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge. — Devin
DavidM1911 commented 2026-11-26 03:06:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T02:12:19Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7180565352 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2440#issuecomment-7180565352). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T02:12:19Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
github-actions[bot] commented 2026-11-30 08:41:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:41:02Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273213140 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2440#issuecomment-7273213140). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:41:02Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 08:05:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:05:27Z.


Triage (#1607) – head 633b1e4

No open or merged PR makes this change. On main the helper's check has moved into direct_enabled in gpu/recomp/tests.rs, and it is still opt.mem_windows <= 4. So the fallback to HLSL above four windows that this PR fixes is still there, and the PR needs a rebase onto that function.
The new GPU variants (gpu_mesh_mode_reads_expanded_heap_windows, gpu_geometry_direct_expanded_heap_prefix_counts) were only run under Wine/vkd3d-proton, and they skip without split wave64. No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304860038 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2440#issuecomment-7304860038). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:05:27Z. --- **Triage (#1607)** – head 633b1e4 No open or merged PR makes this change. On main the helper's check has moved into `direct_enabled` in gpu/recomp/tests.rs, and it is still `opt.mem_windows <= 4`. So the fallback to HLSL above four windows that this PR fixes is still there, and the PR needs a rebase onto that function. The new GPU variants (`gpu_mesh_mode_reads_expanded_heap_windows`, `gpu_geometry_direct_expanded_heap_prefix_counts`) were only run under Wine/vkd3d-proton, and they skip without split wave64. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2440:upstream-pr/2440'
git switch 'upstream-pr/2440'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2440'
git switch 'upstream-pr/2440'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2440'
git switch 'upstream-pr/2440'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2440'
git switch 'main'
git merge --squash 'upstream-pr/2440'
git switch 'main'
git merge --ff-only 'upstream-pr/2440'
git switch 'main'
git merge 'upstream-pr/2440'
git push origin 'main'
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
xcl-dev/xcl!2430
No description provided.