Tests: heap-capped and barrier-less hosts run the GPU tests #2249

Open
kotekompotek wants to merge 3 commits from upstream-pr/2251 into main
kotekompotek commented 2026-11-25 08:51:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T08:51:16Z.


Summary

Three victory-gpu tests fail on a GTX 1050 (SM 6.5) host where they were asserting more than the code guarantees:

  • draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view — expects one host texture, but this host has no ID3D12Device10 (enhanced barriers), so takes() refuses the placed view and two textures are the correct layout.
  • memory::tests::a_view_made_for_a_paired_copy_takes_the_pair — same root cause: the test assumed format 42/67 pair views share when the host supports castable formats.
  • descriptor::host::tests::a_view_heap_past_its_dynamic_slots_keeps_the_static_ones (heap cap) — the test requested HEAP_VIEWS slots, but this host's shader-visible cap (NVIDIA ~1M, related to #2138) is below HEAP_VIEWS, so the heap falls back; the test now sizes itself against the actual heap.

All three now derive the expectation from the host's real capabilities (Host::enhanced_barriers(), the heap's reported size) instead of assuming them. On a fully capable host nothing changes — same assertions, same values.

Test plan

  • cargo test -p victory-gpu --locked on GTX 1050 / Win10: 143 passed, 2 ignored, 0 failed (was 140 passed, 3 failed)
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings — clean
<!-- greyfinch-sync:Marvisak/VIctory:issue:5488107971 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T08:51:16Z. --- ## Summary Three `victory-gpu` tests fail on a GTX 1050 (SM 6.5) host where they were asserting more than the code guarantees: - `draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view` — expects one host texture, but this host has no `ID3D12Device10` (enhanced barriers), so `takes()` refuses the placed view and two textures are the correct layout. - `memory::tests::a_view_made_for_a_paired_copy_takes_the_pair` — same root cause: the test assumed format 42/67 pair views share when the host supports castable formats. - `descriptor::host::tests::a_view_heap_past_its_dynamic_slots_keeps_the_static_ones` (heap cap) — the test requested `HEAP_VIEWS` slots, but this host's shader-visible cap (NVIDIA ~1M, related to #2138) is below `HEAP_VIEWS`, so the heap falls back; the test now sizes itself against the actual heap. All three now derive the expectation from the host's real capabilities (`Host::enhanced_barriers()`, the heap's reported size) instead of assuming them. On a fully capable host nothing changes — same assertions, same values. ## Test plan - `cargo test -p victory-gpu --locked` on GTX 1050 / Win10: **143 passed, 2 ignored, 0 failed** (was 140 passed, 3 failed) - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` — clean
DenRakEiw commented 2026-11-25 09:02:23 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T09:02:23Z.

Review: APPROVED


Verified locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC):

  • cargo test -p victory-gpu — 143 passed, 0 failed (2 ignored) on NVIDIA RTX 5090! Directly resolves both NVIDIA 1M view-heap cap test failures on main 940d32f.
  • cargo clippy -p victory-gpu --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

Clean pair_start() helper letting heap-capped (NVIDIA) and barrier-less hosts run the full victory-gpu test suite green. Looks great.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6054565585 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#pullrequestreview-6054565585). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T09:02:23Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC): - `cargo test -p victory-gpu` — **143 passed, 0 failed** (2 ignored) on NVIDIA RTX 5090! Directly resolves both NVIDIA 1M view-heap cap test failures on `main` `940d32f`. - `cargo clippy -p victory-gpu --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) Clean `pair_start()` helper letting heap-capped (NVIDIA) and barrier-less hosts run the full `victory-gpu` test suite green. Looks great. AI-assisted (Gemini 4 Neon).
Dathinel commented 2026-11-25 09:06:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dathinel on 2026-11-25T09:00:39Z.


The three changed tests went from 1/3 on 940d32f to 3/3 on 91e35f7 on my default Windows D3D12 device. With the diagnostics build and VICTORY_D3D12_WARP=1 they passed 3/3 on both revisions.

One remaining assumption in the placed-view test: obtaining ID3D12Device10 does not guarantee that CreateCommittedResource3 accepts this particular resource and format list. In resource::make_texture, a creation error clears the list and falls back to a separate texture. I exercised that branch on a Device10-capable host by injecting E_INVALIDARG at that call. The unmodified call passed; forcing the error made the first sharing assertion fail (actual false, expected true), before the pixel checks. This was fault injection, not a naturally occurring driver failure.

Could the test gate the sharing expectation on successful creation for that specific description, while still checking pixels on the fallback path? That would distinguish the two Device10-present outcomes. AI-assisted synthetic verification.

Readback follow-up on the same head: I adjusted the two expectations for the deliberately injected refusal and checked all 4,096 texels of each synthetic image. Both images matched their expected uniform RGBA on the default Windows device and on WARP, with and without refusal. The first format pair used a copy only under refusal; the BC1 pair used a copy in both runs. This narrows the observed failure to the sharing expectation for these fixtures.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7157754320 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7157754320). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-25T09:00:39Z. --- The three changed tests went from 1/3 on 940d32f to 3/3 on 91e35f7 on my default Windows D3D12 device. With the diagnostics build and VICTORY_D3D12_WARP=1 they passed 3/3 on both revisions. One remaining assumption in the placed-view test: obtaining ID3D12Device10 does not guarantee that CreateCommittedResource3 accepts this particular resource and format list. In resource::make_texture, a creation error clears the list and falls back to a separate texture. I exercised that branch on a Device10-capable host by injecting E_INVALIDARG at that call. The unmodified call passed; forcing the error made the first sharing assertion fail (actual false, expected true), before the pixel checks. This was fault injection, not a naturally occurring driver failure. Could the test gate the sharing expectation on successful creation for that specific description, while still checking pixels on the fallback path? That would distinguish the two Device10-present outcomes. AI-assisted synthetic verification. Readback follow-up on the same head: I adjusted the two expectations for the deliberately injected refusal and checked all 4,096 texels of each synthetic image. Both images matched their expected uniform RGBA on the default Windows device and on WARP, with and without refusal. The first format pair used a copy only under refusal; the BC1 pair used a copy in both runs. This narrows the observed failure to the sharing expectation for these fixtures.
catminou4 commented 2026-11-25 09:35:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T09:35:31Z.

Review: COMMENTED


Tests: heap-capped and barrier-less hosts run the GPU test suite; pair_start() exposes the capped-heap pair range. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Test-only hardening, good.

<!-- greyfinch-sync:Marvisak/VIctory:review:6055072447 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#pullrequestreview-6055072447). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T09:35:31Z. **Review:** COMMENTED --- Tests: heap-capped and barrier-less hosts run the GPU test suite; pair_start() exposes the capped-heap pair range. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Test-only hardening, good.
MamaLeVrai commented 2026-11-25 10:07:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-25T09:13:23Z.


Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head 91e35f79 into main 940d32f in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings: clean; the same with --all-features: clean. cargo test --workspace --locked: 701 passed, 0 failed, 10 ignored, two runs (main alone on the same machine: 701 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158039456 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7158039456). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T09:13:23Z. --- Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head `91e35f79` into `main` `940d32f` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean; the same with `--all-features`: clean. `cargo test --workspace --locked`: 701 passed, 0 failed, 10 ignored, two runs (`main` alone on the same machine: 701 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
Calvix2k commented 2026-11-25 10:07:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T09:40:48Z.


Your three host-derived expectations cover the placed-view test that #2005 was skipping, so I narrowed #2005 to just the one-time log for the missing D3D12 1.7 (the reason takes() refuses the view without it) and dropped its copy of the test change in 83ee34f. No overlap between the two branches now.

For the heap-cap case: HEAP_VIEWS is above the 1,000,000 shader-visible limit on both NVIDIA and this machine's Windows 10 WARP — deriving the heap size is the right fix; the alternative (a skip) would have hidden which cap was hit.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158655740 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7158655740). Originally posted by [Calvix2k](https://github.com/Calvix2k) on 2026-11-25T09:40:48Z. --- Your three host-derived expectations cover the placed-view test that #2005 was skipping, so I narrowed #2005 to just the one-time log for the missing D3D12 1.7 (the reason `takes()` refuses the view without it) and dropped its copy of the test change in `83ee34f`. No overlap between the two branches now. For the heap-cap case: `HEAP_VIEWS` is above the 1,000,000 shader-visible limit on both NVIDIA and this machine's Windows 10 WARP — deriving the heap size is the right fix; the alternative (a skip) would have hidden which cap was hit.
kotekompotek commented 2026-11-25 10:07:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T09:44:24Z.


Done, pushed as 519a820: the test no longer predicts sharing from ID3D12Device10 at all — it reads a.castable (the list make_texture clears on a refused CreateCommittedResource3) and expects one host texture only when the list holds a format of the view's family, mirroring takes()'s own check. So a Device10 host that refuses the list gets castable.is_empty() → copy expected → pixel checks still run on the fallback path. Verified locally on the GTX 1050 (no Device10 → empty list → two textures → copy): test passes.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158735392 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7158735392). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T09:44:24Z. --- Done, pushed as `519a820`: the test no longer predicts sharing from `ID3D12Device10` at all — it reads `a.castable` (the list `make_texture` clears on a refused `CreateCommittedResource3`) and expects one host texture only when the list holds a format of the view's family, mirroring `takes()`'s own check. So a Device10 host that refuses the list gets `castable.is_empty()` → copy expected → pixel checks still run on the fallback path. Verified locally on the GTX 1050 (no Device10 → empty list → two textures → copy): test passes.
upipibi commented 2026-11-25 11:05:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T10:26:10Z.


Ampere run, from a card that fails the two heap-limit tests on every run of main: RTX 3070 (driver 616.56, Windows 11), 519a820 against main 940d32f.

main 940d32f this PR 519a820
dynamic_slots_are_held_until_released + lists_share_a_table_and_copies_keep_their_views, --test-threads=1 both fail, 3 of 3 runs both pass, 3 of 3 runs
cargo test -p victory-gpu --locked 141 passed, 2 failed (those two), 2 runs 143 passed, 0 failed, 2 runs

No other test changes result here.

AI-assisted (Claude Code). Synthetic tests only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7159691517 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7159691517). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-25T10:26:10Z. --- Ampere run, from a card that fails the two heap-limit tests on every run of `main`: RTX 3070 (driver 616.56, Windows 11), `519a820` against `main` `940d32f`. | | `main` `940d32f` | this PR `519a820` | |---|---|---| | `dynamic_slots_are_held_until_released` + `lists_share_a_table_and_copies_keep_their_views`, `--test-threads=1` | both fail, 3 of 3 runs | both pass, 3 of 3 runs | | `cargo test -p victory-gpu --locked` | 141 passed, 2 failed (those two), 2 runs | **143 passed, 0 failed**, 2 runs | No other test changes result here. AI-assisted (Claude Code). Synthetic tests only.
Calvix2k commented 2026-11-25 11:05:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T10:40:15Z.


One data point for the heap-capped/castable split, since this test is the one that depends on it: a_texture_written_in_one_format_reads_in_another_through_a_placed_view expects shared = true and no ALIAS_COPIES movement in round 0, which is only true where the device has castable formats. On Windows 10 19045 / RX 7800 XT, the system runtime (no ID3D12Device10) fails it at one host texture (left false), and the same binary with the Agility runtime staged passes — whole suite 147 passed, 0 failed, 2 ignored. So the expectation to derive is "does this device cast formats", not the OS.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7160013487 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7160013487). Originally posted by [Calvix2k](https://github.com/Calvix2k) on 2026-11-25T10:40:15Z. --- One data point for the heap-capped/castable split, since this test is the one that depends on it: `a_texture_written_in_one_format_reads_in_another_through_a_placed_view` expects `shared = true` and no `ALIAS_COPIES` movement in round 0, which is only true where the device has castable formats. On Windows 10 19045 / RX 7800 XT, the system runtime (no `ID3D12Device10`) fails it at `one host texture` (left `false`), and the same binary with the Agility runtime staged passes — whole suite 147 passed, 0 failed, 2 ignored. So the expectation to derive is "does this device cast formats", not the OS.
Marvisak commented 2026-11-25 14:07:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T13:31:22Z.


Automated triage for the maintainers.

Merge candidate. fae93c4 makes the one change the last review asked for. In crates/victory-gpu/src/draw.rs, the placed-view test now counts the host texture's own format family (GetDesc().Format, with a SAFETY comment) alongside its castable list. That matches resource.rs takes(), so the expectation follows what the host actually created. The other changes are unchanged and still right: HostHeap::pair_start (test-only) in descriptor/host.rs, and the capped-heap checks in memory.rs and in the heap-size test. All three take their expectations from the host instead of assuming an uncapped heap.

On your reply: confirmed. This is the own-format case from the second look.

CI: check passing; merges cleanly.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7163898313 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7163898313). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T13:31:22Z. --- <!-- victory-triage v1 head=fae93c4b1ab7cd20dac5aada30255d58790bcb3f verdict=merge-candidate at=2026-11-26T07:22:00Z --> Automated triage for the maintainers. **Merge candidate.** `fae93c4` makes the one change the last review asked for. In `crates/victory-gpu/src/draw.rs`, the placed-view test now counts the host texture's own format family (`GetDesc().Format`, with a `SAFETY` comment) alongside its castable list. That matches `resource.rs` `takes()`, so the expectation follows what the host actually created. The other changes are unchanged and still right: `HostHeap::pair_start` (test-only) in `descriptor/host.rs`, and the capped-heap checks in `memory.rs` and in the heap-size test. All three take their expectations from the host instead of assuming an uncapped heap. On your reply: confirmed. This is the own-format case from the second look. CI: `check` passing; merges cleanly. --- _Generated by [Claude Code](https://claude.ai/code)_
kotekompotek commented 2026-11-25 15:04:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T14:11:37Z.


Thanks — that is exactly the expectation the test now derives: castable(d.format) on the created texture, so Win10-without-Device10 sees the split and the same binary on Agility sees the share. Good that #2005 was narrowed.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7164899331 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7164899331). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T14:11:37Z. --- Thanks — that is exactly the expectation the test now derives: `castable(d.format)` on the created texture, so Win10-without-Device10 sees the split and the same binary on Agility sees the share. Good that #2005 was narrowed.
Marvisak commented 2026-11-25 22:04:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:02:56Z.


Automated triage for the maintainers, second look (a review against main, with the PR built and tested).

Deriving the expectations from the host is right, and this can be merged after one change. The placed-view condition leaves out the texture's own format, which resource.rs takes() includes; without it, a_texture_written_in_one_format_reads_in_another_through_a_placed_view fails on an RX 6700 XT (3 runs of 3), and with it, it passes. In crates/victory-gpu/src/draw.rs: let own = unsafe { a.texture.GetDesc() }.Format.0 as u32; let shared = shared && (crate::resource::family(own) == crate::resource::family(format) || a.castable.iter().any(|&c| crate::resource::family(c) == crate::resource::family(format))); (with a SAFETY comment).

Push the change and it will be reviewed again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7175869604 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7175869604). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:02:56Z. --- Automated triage for the maintainers, second look (a review against `main`, with the PR built and tested). Deriving the expectations from the host is right, and this can be merged after one change. The placed-view condition leaves out the texture's own format, which `resource.rs` `takes()` includes; without it, `a_texture_written_in_one_format_reads_in_another_through_a_placed_view` fails on an RX 6700 XT (3 runs of 3), and with it, it passes. In `crates/victory-gpu/src/draw.rs`: `let own = unsafe { a.texture.GetDesc() }.Format.0 as u32; let shared = shared && (crate::resource::family(own) == crate::resource::family(format) || a.castable.iter().any(|&c| crate::resource::family(c) == crate::resource::family(format)));` (with a `SAFETY` comment). Push the change and it will be reviewed again. Thank you for the contribution.
kotekompotek commented 2026-11-26 07:01:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T06:30:35Z.


Done in fae93c4: the placed-view check now mirrors takes() — the host texture's own format family counts alongside the castable list (own from GetDesc, with a SAFETY comment).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7184498544 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7184498544). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-26T06:30:35Z. --- Done in `fae93c4`: the placed-view check now mirrors `takes()` — the host texture's own format family counts alongside the castable list (`own` from `GetDesc`, with a SAFETY comment).
fuzeofficlal commented 2026-11-26 12:54:39 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T12:54:39Z.

Review: APPROVED


Reviewed and verified fae93c4b merged locally onto origin/main (63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 with its 1M shader-visible view-heap cap and uncapped WARP, Rust 1.98.1 MSVC, Windows SDK 10.0.26100.0 dxil.dll; synthetic tests only, no game files).

Verification

  • git merge-tree against origin/main (63bcca43): clean.
  • cargo xtask policy (PR head): 182 files ok.
  • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings (default and --all-features, PR head and merged): 0 warnings.
  • RTX 5090 (merged, default — full victory-gpu library suite, no --skip): cargo test --locked -p victory-gpu --lib — 231 passed, 0 failed, 1 ignored (resolving both pre-existing NVIDIA 1M view-heap cap test failures on main).
  • RTX 5090 (VICTORY_D3D12_DEBUG=1, --features diagnostics, no --skip): descriptor::host::tests, memory::tests, draw::tests — 43 passed, 0 failed.
  • WARP (VICTORY_D3D12_WARP=1, VICTORY_D3D12_DEBUG=1, --features diagnostics — full victory-gpu library suite): 246 passed, 0 failed, 1 ignored (with the uncapped 2M heap exercising pair_start() == Some(...) and the full pair-slot range assertion).

Review Notes

  • HostHeap::pair_start() (crates/victory-gpu/src/descriptor/host.rs:377-380) combined with the check in crates/victory-gpu/src/memory.rs:675-677 and crates/victory-gpu/src/descriptor/host.rs:1499-1501 is a cleaner solution than skipping lists_share_a_table_and_copies_keep_their_views outright on 1M-capped NVIDIA hosts: the GPU page-table sharing, compute readback, and copy stability assertions still run on RTX 5090, and if a capped-heap sizing fix like #2461 lands (giving pairs_end > count + dynamic), pair_start() automatically re-enables the pair-range check.
  • In crates/victory-gpu/src/draw.rs:2189-2195, deriving shared from the host texture's own GetDesc().Format family together with a.castable matches resource.rs::takes() accurately for both non-Device10 hosts and Device10 drivers that refuse a castable list.
  • Note for maintainers: this overlaps with #2937 (descriptor/host.rs, memory.rs) and #2747 (draw.rs), so only one per area should be merged.

Looks good to merge.

<!-- greyfinch-sync:Marvisak/VIctory:review:6074471842 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#pullrequestreview-6074471842). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T12:54:39Z. **Review:** APPROVED --- Reviewed and verified `fae93c4b` merged locally onto `origin/main` (`63bcca43`) on Windows 11 x64 (NVIDIA GeForce RTX 5090 with its 1M shader-visible view-heap cap and uncapped WARP, Rust `1.98.1` MSVC, Windows SDK `10.0.26100.0` `dxil.dll`; synthetic tests only, no game files). ### Verification - `git merge-tree` against `origin/main` (`63bcca43`): clean. - `cargo xtask policy` (PR head): `182 files ok`. - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` (default and `--all-features`, PR head and merged): 0 warnings. - **RTX 5090 (merged, default — full `victory-gpu` library suite, no `--skip`):** `cargo test --locked -p victory-gpu --lib` — **231 passed, 0 failed, 1 ignored** (resolving both pre-existing NVIDIA 1M view-heap cap test failures on `main`). - **RTX 5090 (`VICTORY_D3D12_DEBUG=1`, `--features diagnostics`, no `--skip`):** `descriptor::host::tests`, `memory::tests`, `draw::tests` — **43 passed, 0 failed**. - **WARP (`VICTORY_D3D12_WARP=1`, `VICTORY_D3D12_DEBUG=1`, `--features diagnostics` — full `victory-gpu` library suite):** **246 passed, 0 failed, 1 ignored** (with the uncapped 2M heap exercising `pair_start() == Some(...)` and the full pair-slot range assertion). ### Review Notes - `HostHeap::pair_start()` (`crates/victory-gpu/src/descriptor/host.rs:377-380`) combined with the check in `crates/victory-gpu/src/memory.rs:675-677` and `crates/victory-gpu/src/descriptor/host.rs:1499-1501` is a cleaner solution than skipping `lists_share_a_table_and_copies_keep_their_views` outright on 1M-capped NVIDIA hosts: the GPU page-table sharing, compute readback, and copy stability assertions still run on RTX 5090, and if a capped-heap sizing fix like `#2461` lands (giving `pairs_end > count + dynamic`), `pair_start()` automatically re-enables the pair-range check. - In `crates/victory-gpu/src/draw.rs:2189-2195`, deriving `shared` from the host texture's own `GetDesc().Format` family together with `a.castable` matches `resource.rs::takes()` accurately for both non-`Device10` hosts and `Device10` drivers that refuse a castable list. - Note for maintainers: this overlaps with `#2937` (`descriptor/host.rs`, `memory.rs`) and `#2747` (`draw.rs`), so only one per area should be merged. Looks good to merge.
artor410 commented 2026-11-28 08:19:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by artor410 on 2026-11-28T08:19:17Z.


NVIDIA Ampere check of fae93c4, merged cleanly onto main 63bcca4 (tree d405749). RTX 3070 Ti 8 GB (Ampere, view heap capped at 1,000,000), driver 610.88, Windows 11, rustc 1.98.1, hardware adapter. Synthetic tests only.

Command: cargo test -p victory-gpu --lib, then the two #3178 tests with --nocapture --test-threads=1.

  • main: 229 pass / 2 fail (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views).
  • this PR: 231 pass / 0 fail. Both tests pass.

On a capped heap, pair_start() is None, so the pairs-position check is skipped here. The first test asserts NumDescriptors == count + dynamic, which is exact and good. This PR also carries the placed-view test change, which is separate from #3178.

Side by side with #1770, #2251, #2937, #3191 and #3244 in #3178.

(Claude Code, Claude Opus 5.5.)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7236506576 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2251#issuecomment-7236506576). Originally posted by [artor410](https://github.com/artor410) on 2026-11-28T08:19:17Z. --- NVIDIA Ampere check of `fae93c4`, merged cleanly onto `main` `63bcca4` (tree `d405749`). RTX 3070 Ti 8 GB (Ampere, view heap capped at 1,000,000), driver 610.88, Windows 11, rustc 1.98.1, hardware adapter. Synthetic tests only. Command: `cargo test -p victory-gpu --lib`, then the two #3178 tests with `--nocapture --test-threads=1`. - `main`: 229 pass / 2 fail (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`). - this PR: 231 pass / 0 fail. Both tests pass. On a capped heap, `pair_start()` is `None`, so the pairs-position check is skipped here. The first test asserts `NumDescriptors == count + dynamic`, which is exact and good. This PR also carries the placed-view test change, which is separate from #3178. Side by side with #1770, #2251, #2937, #3191 and #3244 in #3178. (Claude Code, Claude Opus 5.5.)
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/2251:upstream-pr/2251'
git switch 'upstream-pr/2251'

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/2251'
git switch 'upstream-pr/2251'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2251'
git switch 'upstream-pr/2251'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2251'
git switch 'main'
git merge --squash 'upstream-pr/2251'
git switch 'main'
git merge --ff-only 'upstream-pr/2251'
git switch 'main'
git merge 'upstream-pr/2251'
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
Marvisak/VIctory!2249
No description provided.