Shader tests: a host that caps view heaps below HEAP_VIEWS skips the null-view leg #2354

Closed
borosf wants to merge 2 commits from upstream-pr/2356 into main
borosf commented 2026-11-25 11:35:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-25T11:35:08Z.


Summary

  • Measured on an Intel Arc B580 (Xe2, SM 6.7): cargo test -p victory-shader --lib runs
    245 passed, 2 failed — the first discrete Intel Arc datapoint for this suite.
  • One failure is the known #1782 / NEW-32 dot4 class, not touched by this change.
    The other is new:
    stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros panicked with
    hardware: dispatch failed: The parameter is incorrect, because the test's view heap is
    HEAP_VIEWS (2^21) slots while D3D12 guarantees only
    D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2 (2^20) shader-visible ones.
    The driver that enforces the cap (this Arc B580) refuses the heap; WARP and the
    AMD/NVIDIA hosts so far mask it. #1829 saw the same limit ("limit for shader visible
    view heaps is 1000000") on Intel UHD, so the cap is the Intel-family norm, and the
    runtime already falls back (descriptor/host.rs, PORTABLE_VIEWS = the same 1,000,000).
  • Fix: Host::takes_null_view_heap() probes for the heap the null-buffer-view slot needs,
    and the test skips only that leg on hosts that cap below HEAP_VIEWS (the harness's own
    "no SM 6.6 device; skipped" pattern); WARP still runs and keeps CI coverage.

claiming: test-harness half of the capped-view-heap hosts, adjacent to FIND-9 / NEW-27
(the victory-gpu half, also confirmed on this card: both its tests fail the same way).
Commenting from this account is blocked by the integration's permissions, so the claim
rides this pull request.

Verification

  • cargo test -p victory-shader --lib: 145 passed, 0 failed in the preparing sandbox
    (no device; both legs skip), and on the reporting Intel Arc B580 the suite goes
    245 → 246 passing, the covered leg printing
    no HEAP_VIEWS view heap on hardware; skipped.
  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings: error set
    identical to pristine main 940d32f; no new warnings.
  • cargo run -p xtask --locked -- policy: 182 files ok. No game data involved.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6603567909 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2356). Originally posted by [borosf](https://github.com/borosf) on 2026-11-25T11:35:08Z. --- ## Summary - Measured on an Intel Arc B580 (Xe2, SM 6.7): `cargo test -p victory-shader --lib` runs **245 passed, 2 failed** — the first discrete Intel Arc datapoint for this suite. - One failure is the known #1782 / NEW-32 dot4 class, not touched by this change. The other is new: `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` panicked with `hardware: dispatch failed: The parameter is incorrect`, because the test's view heap is `HEAP_VIEWS` (2^21) slots while D3D12 guarantees only `D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2` (2^20) shader-visible ones. The driver that enforces the cap (this Arc B580) refuses the heap; WARP and the AMD/NVIDIA hosts so far mask it. #1829 saw the same limit ("limit for shader visible view heaps is 1000000") on Intel UHD, so the cap is the Intel-family norm, and the runtime already falls back (`descriptor/host.rs`, `PORTABLE_VIEWS` = the same 1,000,000). - Fix: `Host::takes_null_view_heap()` probes for the heap the null-buffer-view slot needs, and the test skips only that leg on hosts that cap below `HEAP_VIEWS` (the harness's own "no SM 6.6 device; skipped" pattern); WARP still runs and keeps CI coverage. claiming: test-harness half of the capped-view-heap hosts, adjacent to FIND-9 / NEW-27 (the victory-gpu half, also confirmed on this card: both its tests fail the same way). Commenting from this account is blocked by the integration's permissions, so the claim rides this pull request. ## Verification - `cargo test -p victory-shader --lib`: 145 passed, 0 failed in the preparing sandbox (no device; both legs skip), and on the reporting Intel Arc B580 the suite goes 245 → 246 passing, the covered leg printing `no HEAP_VIEWS view heap on hardware; skipped`. - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings`: error set identical to pristine `main` 940d32f; no new warnings. - `cargo run -p xtask --locked -- policy`: 182 files ok. No game data involved.
upstream-sync closed this pull request 2026-11-25 12:03:31 +00:00
DenRakEiw commented 2026-11-25 12:03:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T11:41:40Z.

Review: COMMENTED


Tested against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090:

  • Compile error (cargo test -p victory-shader):
    error[E0283]: type annotations needed
        --> crates\victory-shader\src\emit\host.rs:1298:18
         |
    1298 |                 .CreateDescriptorHeap(&D3D12_DESCRIPTOR_HEAP_DESC {
         |                  ^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the method `CreateDescriptorHeap`
    
    Specifying .CreateDescriptorHeap::<ID3D12DescriptorHeap>(&D3D12_DESCRIPTOR_HEAP_DESC { ... }) will resolve the type inference error.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6056954647 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2356#pullrequestreview-6056954647). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T11:41:40Z. **Review:** COMMENTED --- Tested against `origin/main` (`940d32f`) on Windows 11 + NVIDIA GeForce RTX 5090: - **Compile error (`cargo test -p victory-shader`):** ``` error[E0283]: type annotations needed --> crates\victory-shader\src\emit\host.rs:1298:18 | 1298 | .CreateDescriptorHeap(&D3D12_DESCRIPTOR_HEAP_DESC { | ^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the method `CreateDescriptorHeap` ``` Specifying `.CreateDescriptorHeap::<ID3D12DescriptorHeap>(&D3D12_DESCRIPTOR_HEAP_DESC { ... })` will resolve the type inference error. AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-25 12:03:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T11:56:16Z.

Review: APPROVED


Tested locally: merged into main 940d32f69b, cargo test -p victory-shader --locked on macOS arm64 — 144 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Approving — test-only: host capping view heaps below HEAP_VIEWS handled in tests.

<!-- greyfinch-sync:Marvisak/VIctory:review:6057148021 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2356#pullrequestreview-6057148021). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T11:56:16Z. **Review:** APPROVED --- Tested locally: merged into main 940d32f69b, `cargo test -p victory-shader --locked` on macOS arm64 — 144 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Approving — test-only: host capping view heaps below HEAP_VIEWS handled in tests.
DrDarkDK commented 2026-11-25 12:03:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T11:42:27Z.


I compared 7f3efbd with #1943 (7f67667 applied cleanly to 940d32f) on native Windows with an RTX 4070 Ti (621.01) and WARP.

On 940d32f, a_heap_buffer_read_where_no_buffer_view_is_reads_zeros fails during hardware dispatch with E_INVALIDARG. With either PR, the RTX leg is skipped because it rejects the requested heap size, and the WARP readback passes.

Since #1943 already has the same capability check and is marked as a merge candidate, could we carry the Arc B580 result over there and consolidate the two PRs?

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7161394104 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2356#issuecomment-7161394104). Originally posted by [DrDarkDK](https://github.com/DrDarkDK) on 2026-11-25T11:42:27Z. --- I compared `7f3efbd` with #1943 (`7f67667` applied cleanly to `940d32f`) on native Windows with an RTX 4070 Ti (621.01) and WARP. On `940d32f`, `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` fails during hardware dispatch with `E_INVALIDARG`. With either PR, the RTX leg is skipped because it rejects the requested heap size, and the WARP readback passes. Since #1943 already has the same capability check and is marked as a merge candidate, could we carry the Arc B580 result over there and consolidate the two PRs? *AI-assisted with Codex.*
borosf commented 2026-11-25 12:03:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-25T11:46:08Z.


Withdrawing this in favour of #1943 — opened earlier, same two files and the same capability
probe, already a merge candidate with green CI, and its skip covers every adapter rather
than the hardware leg only.

The datapoints gathered here carry over:

  • Intel Arc B580 (Xe2, SM 6.7, discrete): cargo test -p victory-shader --lib --test-threads=1 = 245 passed, 2 failed; this test with
    hardware: dispatch failed: The parameter is incorrect. The card caps shader-visible
    view heaps at 1,000,000 — the same limit as Intel UHD Xe-LP in #1829 — so the cap is the
    Intel-family norm, not a laptop-driver quirk.
  • The same failure reproduces on RTX 4070 Ti hardware on 940d32f (plain E_INVALIDARG),
    so the skip is worth having on desktop NVIDIA too.
  • The E0283 in this PR's first commit (the untyped CreateDescriptorHeap probe — the
    harness is #[cfg(windows)], so it only surfaces on a Windows compile) is fixed on
    7f3efbd and moot after consolidation; #1943's turbofish form is typed already.

No changes requested here — closing as a duplicate of #1943.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7161474335 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2356#issuecomment-7161474335). Originally posted by [borosf](https://github.com/borosf) on 2026-11-25T11:46:08Z. --- Withdrawing this in favour of #1943 — opened earlier, same two files and the same capability probe, already a merge candidate with green CI, and its skip covers every adapter rather than the hardware leg only. The datapoints gathered here carry over: - **Intel Arc B580** (Xe2, SM 6.7, discrete): `cargo test -p victory-shader --lib --test-threads=1` = 245 passed, 2 failed; this test with `hardware: dispatch failed: The parameter is incorrect`. The card caps shader-visible view heaps at 1,000,000 — the same limit as Intel UHD Xe-LP in #1829 — so the cap is the Intel-family norm, not a laptop-driver quirk. - The same failure reproduces on **RTX 4070 Ti** hardware on `940d32f` (plain `E_INVALIDARG`), so the skip is worth having on desktop NVIDIA too. - The `E0283` in this PR's first commit (the untyped `CreateDescriptorHeap` probe — the harness is `#[cfg(windows)]`, so it only surfaces on a Windows compile) is fixed on 7f3efbd and moot after consolidation; #1943's turbofish form is typed already. No changes requested here — closing as a duplicate of #1943.

Pull request closed

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
Marvisak/VIctory!2354
No description provided.