Two victory-gpu tests assume a host whose shader-visible heap reaches HEAP_VIEWS, so they fail on hosts that cap it (Intel Arc here) while CI cannot see either #3176

Open
opened 2026-11-26 11:15:37 +00:00 by zzm1234560621-prog · 10 comments
zzm1234560621-prog commented 2026-11-26 11:15:37 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by zzm1234560621-prog on 2026-11-26T11:15:37Z.


Two victory-gpu tests on main assert a descriptor-heap size no D3D12 device can provide, so they fail on every machine that has a GPU and are skipped on CI

main 63bcca4, Windows 11, Intel Arc iGPU (driver 32.0.101.6127), Rust 1.98.1:

cargo test -p victory-gpu
test result: FAILED. 237 passed; 2 failed; 1 ignored

---- descriptor::host::tests::dynamic_slots_are_held_until_released ----
panicked at crates/victory-gpu/src/descriptor/host.rs:2226:13:
assertion failed: heap.heap.GetDesc().NumDescriptors >= victory_shader::emit::HEAP_VIEWS

---- memory::tests::lists_share_a_table_and_copies_keep_their_views ----
panicked at crates/victory-gpu/src/memory.rs:1030:9:
assertion failed: pairs.0 >= 1 << 18 && pairs.1 >= 1 << 18
  "past the dynamic slots"

Both reproduce on unmodified main — I re-ran them on a clean tree from codeload with the same toolchain, and nothing else was applied.

The first one cannot pass anywhere

crates/victory-shader/src/shader.rs:33:

pub const HEAP_VIEWS: u32 = 1 << 21;   // 2_097_152

HostHeap::new creates the heap with the count it is given (descriptor/host.rs:110-121), and the test asks for HostHeap::new(false, 4), then asserts the heap has at least HEAP_VIEWS descriptors. 2_097_152 is above D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2 (1,000,000), so no device can satisfy it: this is not a driver difference, the assertion is unsatisfiable by construction.

The padding the comment describes is on the buffers, not the heap (descriptor/host.rs:122-131): strides and marks are upload_buffer(count.max(HEAP_VIEWS) * …), and the comment says shaders read the table as a root view "at indices clamped below HEAP_VIEWS", "also past a capped heap". So the heap holding count descriptors is the design, and the assertion is stale — presumably from before the heap indices changed.

The second looks like the same change

memory.rs:1030 expects a pair index >= 1 << 18 — "past the dynamic slots". If the dynamic-slot split moved with the same bindless/heap work, the expectation is stale in the same way. I have not traced which constant it should now compare against, so I am not claiming what the right number is.

Why CI does not see either

HostHeap::new starts with let host = host()? (descriptor/host.rs:104) and returns None when there is no D3D12 device, and the test does let Some(heap) = … else { return; }. windows-latest has no GPU, so both tests pass by returning early — which is exactly the configuration CI runs.

So these two have been failing for whoever runs the suite on real hardware, and green for everyone else.

What I would do

  • dynamic_slots_are_held_until_released: assert what the design guarantees instead — the heap has the count it was made with, and the stride/mark buffers have HEAP_VIEWS entries. If the intent was really "every index a shader can reach exists", the buffer is what has to be checked, not GetDesc().NumDescriptors.
  • lists_share_a_table_and_copies_keep_their_views: compare against the constant the split now uses.
  • Both are test-only changes; no behaviour is affected.

I have not opened a PR for it because the right assertions depend on what the dynamic-slot split is meant to be now, and that is a maintainer call rather than something to guess from the two failures.

No game files were used. Found while running the suite for #967; AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6625462448 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178). Originally posted by [zzm1234560621-prog](https://github.com/zzm1234560621-prog) on 2026-11-26T11:15:37Z. --- Two `victory-gpu` tests on `main` assert a descriptor-heap size no D3D12 device can provide, so they fail on every machine that has a GPU and are skipped on CI `main` `63bcca4`, Windows 11, Intel Arc iGPU (driver 32.0.101.6127), Rust 1.98.1: ``` cargo test -p victory-gpu test result: FAILED. 237 passed; 2 failed; 1 ignored ---- descriptor::host::tests::dynamic_slots_are_held_until_released ---- panicked at crates/victory-gpu/src/descriptor/host.rs:2226:13: assertion failed: heap.heap.GetDesc().NumDescriptors >= victory_shader::emit::HEAP_VIEWS ---- memory::tests::lists_share_a_table_and_copies_keep_their_views ---- panicked at crates/victory-gpu/src/memory.rs:1030:9: assertion failed: pairs.0 >= 1 << 18 && pairs.1 >= 1 << 18 "past the dynamic slots" ``` Both reproduce on **unmodified** `main` — I re-ran them on a clean tree from `codeload` with the same toolchain, and nothing else was applied. ## The first one cannot pass anywhere `crates/victory-shader/src/shader.rs:33`: ```rust pub const HEAP_VIEWS: u32 = 1 << 21; // 2_097_152 ``` `HostHeap::new` creates the heap with the count it is given (`descriptor/host.rs:110-121`), and the test asks for `HostHeap::new(false, 4)`, then asserts the heap has at least `HEAP_VIEWS` descriptors. `2_097_152` is above `D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2` (1,000,000), so no device can satisfy it: this is not a driver difference, the assertion is unsatisfiable by construction. The padding the comment describes is on the **buffers**, not the heap (`descriptor/host.rs:122-131`): `strides` and `marks` are `upload_buffer(count.max(HEAP_VIEWS) * …)`, and the comment says shaders read the table as a root view "at indices clamped below `HEAP_VIEWS`", "also past a capped heap". So the heap holding `count` descriptors is the design, and the assertion is stale — presumably from before the heap indices changed. ## The second looks like the same change `memory.rs:1030` expects a pair index `>= 1 << 18` — "past the dynamic slots". If the dynamic-slot split moved with the same bindless/heap work, the expectation is stale in the same way. I have not traced which constant it should now compare against, so I am not claiming what the right number is. ## Why CI does not see either `HostHeap::new` starts with `let host = host()?` (`descriptor/host.rs:104`) and returns `None` when there is no D3D12 device, and the test does `let Some(heap) = … else { return; }`. `windows-latest` has no GPU, so both tests pass by returning early — which is exactly the configuration CI runs. So these two have been failing for whoever runs the suite on real hardware, and green for everyone else. ## What I would do - `dynamic_slots_are_held_until_released`: assert what the design guarantees instead — the heap has the count it was made with, and the stride/mark buffers have `HEAP_VIEWS` entries. If the intent was really "every index a shader can reach exists", the buffer is what has to be checked, not `GetDesc().NumDescriptors`. - `lists_share_a_table_and_copies_keep_their_views`: compare against the constant the split now uses. - Both are test-only changes; no behaviour is affected. I have not opened a PR for it because the right assertions depend on what the dynamic-slot split is meant to be now, and that is a maintainer call rather than something to guess from the two failures. _No game files were used. Found while running the suite for #967; AI-assisted (Claude)._
zzm1234560621-prog commented 2026-11-26 12:05:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by zzm1234560621-prog on 2026-11-26T11:34:02Z.


Narrowed one of the two, and opened #3191 for it.

dynamic_slots_are_held_until_released — fixed in #3191 (test-only). The assertion was NumDescriptors >= HEAP_VIEWS, and HEAP_VIEWS (2^21) is above PORTABLE_VIEWS (10^6), so HostHeap::new's first attempt at (count + DYNAMIC).max(HEAP_VIEWS) fails on any host that caps shader-visible heaps and the heap keeps count + MIN_DYNAMIC instead. It now asserts total >= heap.count + heap.dynamic, which holds on both paths. On this machine that takes the suite from 2 failures to 1.

lists_share_a_table_and_copies_keep_their_views — this one is not about the cap, so I left it alone. pair_of returns the pair's slot, and on this machine it returns (2, 4), not something past 1 << 18. So the pairs are allotted low now, next to each other, and the 1 << 18 in the assertion is stale in a second way: it is not asking "past the capped dynamic range", it is asking "past DYNAMIC", which the current layout does not do at all.

If the intent of that assertion is the one in the test's doc comment — "the copies' views stay where they are for later lists and submissions, also when another copy comes; none takes a per-draw dynamic slot" — then the check that means it is: the two indices are distinct, even (a pair), and unchanged after the second submission. If instead the pairs are supposed to live above the dynamic range, then the allocation is what moved, and (2, 4) is the evidence.

Either answer is a two-line change; say which and I will add it to #3191 or a second PR.

Test-only. Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7190892106 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7190892106). Originally posted by [zzm1234560621-prog](https://github.com/zzm1234560621-prog) on 2026-11-26T11:34:02Z. --- Narrowed one of the two, and opened #3191 for it. **`dynamic_slots_are_held_until_released`** — fixed in #3191 (test-only). The assertion was `NumDescriptors >= HEAP_VIEWS`, and `HEAP_VIEWS` (2^21) is above `PORTABLE_VIEWS` (10^6), so `HostHeap::new`'s first attempt at `(count + DYNAMIC).max(HEAP_VIEWS)` fails on any host that caps shader-visible heaps and the heap keeps `count + MIN_DYNAMIC` instead. It now asserts `total >= heap.count + heap.dynamic`, which holds on both paths. On this machine that takes the suite from 2 failures to 1. **`lists_share_a_table_and_copies_keep_their_views`** — this one is *not* about the cap, so I left it alone. `pair_of` returns the pair's slot, and on this machine it returns **`(2, 4)`**, not something past `1 << 18`. So the pairs are allotted low now, next to each other, and the `1 << 18` in the assertion is stale in a second way: it is not asking "past the capped dynamic range", it is asking "past `DYNAMIC`", which the current layout does not do at all. If the intent of that assertion is the one in the test's doc comment — "the copies' views stay where they are for later lists and submissions, also when another copy comes; none takes a per-draw dynamic slot" — then the check that means it is: the two indices are distinct, even (a pair), and unchanged after the second submission. If instead the pairs are supposed to live above the dynamic range, then the allocation is what moved, and `(2, 4)` is the evidence. Either answer is a two-line change; say which and I will add it to #3191 or a second PR. _Test-only. Tested with AI assistance (Claude)._
zed6000 commented 2026-11-26 12:06:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by zed6000 on 2026-11-26T11:55:39Z.


A data point from a GPU where both tests pass. On an AMD RX 7900 XTX (Windows 11), main 63bcca4: cargo test -p victory-gpu --locked passes (231/0 lib, 1 ignored). Run by name with --test-threads=1, dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views both execute and pass. So this driver creates the shader-visible view heap at HEAP_VIEWS (2^21) or more, and the assertion can be met there. "Fail on every GPU" holds for hosts that cap shader-visible heaps (the Intel Arc here, the NVIDIA ones HostHeap::new names), not for all of them. #3191 (78524a7) merged onto 63bcca4 also passes here (231/0), so its narrowed assertion works on both kinds of host.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7191343270 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7191343270). Originally posted by [zed6000](https://github.com/zed6000) on 2026-11-26T11:55:39Z. --- A data point from a GPU where both tests pass. On an **AMD RX 7900 XTX** (Windows 11), `main` `63bcca4`: `cargo test -p victory-gpu --locked` passes (231/0 lib, 1 ignored). Run by name with `--test-threads=1`, `dynamic_slots_are_held_until_released` and `lists_share_a_table_and_copies_keep_their_views` both execute and pass. So this driver creates the shader-visible view heap at `HEAP_VIEWS` (2^21) or more, and the assertion can be met there. "Fail on every GPU" holds for hosts that cap shader-visible heaps (the Intel Arc here, the NVIDIA ones `HostHeap::new` names), not for all of them. #3191 (`78524a7`) merged onto `63bcca4` also passes here (231/0), so its narrowed assertion works on both kinds of host.
upstream-sync changed title from [GH #3178] Two victory-gpu tests assert a descriptor-heap size no device can provide, so they fail on every GPU and are skipped on CI to [GH #3178] Two victory-gpu tests assume a host whose shader-visible heap reaches HEAP_VIEWS, so they fail on hosts that cap it (Intel Arc here) while CI cannot see either 2026-11-26 13:04:11 +00:00
andrewpozdnakov7-jpg commented 2026-11-26 13:04:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T12:06:18Z.


@zzm1234560621-prog I measured the software path as well. Native D3D12 reported Tier 3 on both inbox WARP and app-local SDK 620 with WARP 1.0.22. Both accepted a shader-visible heap requested at 2,097,152 descriptors, and GetDesc() returned that exact size. Microsoft documents 1,000,000 for Tiers 1 and 2 and a higher possible limit for Tier 3. D3D12 hardware tiers

On main 63bcca43 the two existing tests both reached their checks and passed on app-local WARP. With diagnostic prints added to those tests, the first used 2,097,152 total, 4 title slots and 262,144 dynamic slots. The memory test allocated pairs beginning at 262,146 and 262,148. On the capped path, HostHeap::pair falls back to dynamic(2) when the separate pair range has no space, which explains the reported low pair indices. #2937 handles the tests on capped hosts and #3122 addresses the dedicated pair reservation.

AI-assisted with Codex. Synthetic D3D12 tests.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7191571141 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7191571141). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T12:06:18Z. --- @zzm1234560621-prog I measured the software path as well. Native D3D12 reported Tier 3 on both inbox WARP and app-local SDK 620 with WARP 1.0.22. Both accepted a shader-visible heap requested at **2,097,152 descriptors**, and `GetDesc()` returned that exact size. Microsoft documents 1,000,000 for Tiers 1 and 2 and a higher possible limit for Tier 3. [D3D12 hardware tiers](https://learn.microsoft.com/en-us/windows/win32/direct3d12/hardware-support) On main `63bcca43` the two existing tests both reached their checks and passed on app-local WARP. With diagnostic prints added to those tests, the first used 2,097,152 total, 4 title slots and 262,144 dynamic slots. The memory test allocated pairs beginning at 262,146 and 262,148. On the capped path, `HostHeap::pair` falls back to `dynamic(2)` when the separate pair range has no space, which explains the reported low pair indices. #2937 handles the tests on capped hosts and #3122 addresses the dedicated pair reservation. AI-assisted with Codex. Synthetic D3D12 tests.
zzm1234560621-prog commented 2026-11-26 13:04:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by zzm1234560621-prog on 2026-11-26T12:06:52Z.


Correcting myself on two counts from zed6000's RX 7900 XTX run, since both were in my framing rather than in the tests.

1. "No device can provide it" is wrong. HEAP_VIEWS is 2^21 and PORTABLE_VIEWS (10^6) is what HostHeap::new calls the tier 1/2 limit; a tier-3 host — the RX 7900 XTX — makes the heap at 2^21 or more, so the assertion is meetable there, and main passes both tests on that card. The right statement is the narrower one: on hosts that cap shader-visible heaps (the NVIDIA ones new names, and the Intel Arc here) new takes the MIN_DYNAMIC branch and the assertion cannot hold. I have changed the title to say that.

2. That also makes my "the second failure is not about the cap" wrong. zed6000 runs lists_share_a_table_and_copies_keep_their_views by name on the 7900 XTX and it passes, so pairs >= 1 << 18 holds where the heap takes the full range. On this Intel it is (2, 4). So both failures are one class — capped host — and the pair slots sit low exactly where the heap does, rather than the layout having moved for everyone as I wrote. Sorry for the misdirection.

What that leaves: the reason pair_of returns (2, 4) rather than count + MIN_DYNAMIC on the capped path is still unexplained by me, and I would rather not guess twice. If the intent is that the pairs sit past whatever dynamic range the host took, the assertion wants count + dynamic (the same quantity #3191 uses) rather than either constant; if (2, 4) is correct on a capped host, the assertion wants to be skipped there. One line either way, and I will add whichever you prefer to #3191.

The rest of #3191 stands as zed6000 verified: merged onto 63bcca4 it passes on the 7900 XTX (231/0) and on the Arc (230/1, the one being this test).

Test-only. AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7191583205 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7191583205). Originally posted by [zzm1234560621-prog](https://github.com/zzm1234560621-prog) on 2026-11-26T12:06:52Z. --- Correcting myself on two counts from zed6000's RX 7900 XTX run, since both were in my framing rather than in the tests. **1. "No device can provide it" is wrong.** `HEAP_VIEWS` is 2^21 and `PORTABLE_VIEWS` (10^6) is what `HostHeap::new` calls the tier 1/2 limit; a tier-3 host — the RX 7900 XTX — makes the heap at 2^21 or more, so the assertion is meetable there, and `main` passes both tests on that card. The right statement is the narrower one: on hosts that cap shader-visible heaps (the NVIDIA ones `new` names, and the Intel Arc here) `new` takes the `MIN_DYNAMIC` branch and the assertion cannot hold. I have changed the title to say that. **2. That also makes my "the second failure is not about the cap" wrong.** zed6000 runs `lists_share_a_table_and_copies_keep_their_views` by name on the 7900 XTX and it passes, so `pairs >= 1 << 18` holds where the heap takes the full range. On this Intel it is `(2, 4)`. So both failures are one class — capped host — and the pair slots sit low exactly where the heap does, rather than the layout having moved for everyone as I wrote. Sorry for the misdirection. What that leaves: the reason `pair_of` returns `(2, 4)` rather than `count + MIN_DYNAMIC` on the capped path is still unexplained by me, and I would rather not guess twice. If the intent is that the pairs sit past whatever dynamic range the host took, the assertion wants `count + dynamic` (the same quantity #3191 uses) rather than either constant; if `(2, 4)` is correct on a capped host, the assertion wants to be skipped there. One line either way, and I will add whichever you prefer to #3191. The rest of #3191 stands as zed6000 verified: merged onto `63bcca4` it passes on the 7900 XTX (231/0) and on the Arc (230/1, the one being this test). _Test-only. AI-assisted (Claude)._
zzm1234560621-prog commented 2026-11-26 13:04:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by zzm1234560621-prog on 2026-11-26T12:19:33Z.


Thanks — that closes the loop on my mistake and sharpens the failing set.

So the heap is creatable at HEAP_VIEWS on tier 3, and your measurement adds that WARP reports tier 3 and takes 2,097,152 as well. With the RX 7900 XTX result above, the assertion is meetable on: tier-3 hardware, and the software adapter. What fails is exactly the hosts capped at tier 1/2 — this Intel Arc, and the NVIDIA ones HostHeap::new's shortcut comment names — where new falls back to count + MIN_DYNAMIC.

That also explains why CI has been green without anyone noticing: the runner has no hardware adapter, but WARP is a device, host() succeeds on it, and on a tier-3 WARP the test passes rather than skipping.

#3191 sidesteps the whole question: it asserts count + dynamic, the range new guarantees on either path, and zed6000 confirmed it still passes on the 7900 XTX (231/0) as well as here. If you would rather keep asserting HEAP_VIEWS when the host is tier 3 and assert the shorter range otherwise, that is also two lines and I will redo #3191 that way — the tier is one CheckFeatureSupport away.

Test-only. AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7191856789 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7191856789). Originally posted by [zzm1234560621-prog](https://github.com/zzm1234560621-prog) on 2026-11-26T12:19:33Z. --- Thanks — that closes the loop on my mistake and sharpens the failing set. So the heap is creatable at `HEAP_VIEWS` on tier 3, and your measurement adds that **WARP reports tier 3** and takes 2,097,152 as well. With the RX 7900 XTX result above, the assertion is meetable on: tier-3 hardware, and the software adapter. What fails is exactly the hosts capped at tier 1/2 — this Intel Arc, and the NVIDIA ones `HostHeap::new`'s `shortcut` comment names — where `new` falls back to `count + MIN_DYNAMIC`. That also explains why CI has been green without anyone noticing: the runner has no hardware adapter, but WARP is a device, `host()` succeeds on it, and on a tier-3 WARP the test passes rather than skipping. #3191 sidesteps the whole question: it asserts `count + dynamic`, the range `new` guarantees on either path, and zed6000 confirmed it still passes on the 7900 XTX (231/0) as well as here. If you would rather keep asserting `HEAP_VIEWS` when the host is tier 3 and assert the shorter range otherwise, that is also two lines and I will redo #3191 that way — the tier is one `CheckFeatureSupport` away. _Test-only. AI-assisted (Claude)._
zzm1234560621-prog commented 2026-11-26 15:59:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by zzm1234560621-prog on 2026-11-26T15:59:18Z.


The memory one turned out not to be a cap arithmetic problem, and it has a diagnosis worth having here because it bears on the HEAP_VIEWS question: on a capped host the heap's pair region is empty, not merely small.

HostHeap::pair allocates from count + dynamic up to pairs_end, and on this host (1M cap, MIN_DYNAMIC = 1 << 16):

pairs_region start = count + dynamic = 65536
pairs_end          = below that
pair()             -> falls through to dynamic(2)
result             -> slots 2 and 4, not 65536+

So the copies' views are not "misplaced"; the region they would come from does not exist on this heap shape, and taking dynamic slots is the design's fallback (free_pair branches on exactly that boundary). The test was asserting a layout, not a behaviour.

I have PRs for both halves now:

  • #3191 — the assertion that asks for HEAP_VIEWS worth of room (how much the test requests);
  • #3286 — the memory test's >= 1 << 18, now gated on the pair region existing (has_pair_region), with the read assertions untouched.

Neither decides HEAP_VIEWS; both stop a test from encoding an answer to it. What is still open for the maintainers is the one this issue is about: whether a capped host should be given the larger dynamic range at all, or whether the shaders' clamp should follow the heap the host can actually make — with #3286's numbers, the second reading at least keeps the pair region reachable on such a host.

With both applied, cargo test -p victory-gpu --lib on this capped host goes 229/2 → 231/0.

No game files. AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7197025847 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7197025847). Originally posted by [zzm1234560621-prog](https://github.com/zzm1234560621-prog) on 2026-11-26T15:59:18Z. --- The memory one turned out not to be a cap arithmetic problem, and it has a diagnosis worth having here because it bears on the `HEAP_VIEWS` question: on a capped host the heap's **pair region is empty**, not merely small. `HostHeap::pair` allocates from `count + dynamic` up to `pairs_end`, and on this host (1M cap, `MIN_DYNAMIC` = 1 << 16): ``` pairs_region start = count + dynamic = 65536 pairs_end = below that pair() -> falls through to dynamic(2) result -> slots 2 and 4, not 65536+ ``` So the copies' views are not "misplaced"; the region they would come from does not exist on this heap shape, and taking dynamic slots is the design's fallback (`free_pair` branches on exactly that boundary). The test was asserting a layout, not a behaviour. I have PRs for both halves now: - **#3191** — the assertion that asks for `HEAP_VIEWS` worth of room (how much the test requests); - **#3286** — the memory test's `>= 1 << 18`, now gated on the pair region existing (`has_pair_region`), with the read assertions untouched. Neither decides `HEAP_VIEWS`; both stop a test from encoding an answer to it. What is still open for the maintainers is the one this issue is about: whether a capped host should be given the larger dynamic range at all, or whether the shaders' clamp should follow the heap the host can actually make — with #3286's numbers, the second reading at least keeps the pair region reachable on such a host. With both applied, `cargo test -p victory-gpu --lib` on this capped host goes 229/2 → **231/0**. _No game files. AI-assisted (Claude)._
zzm1234560621-prog commented 2026-11-26 16:05:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by zzm1234560621-prog on 2026-11-26T15:31:14Z.


A third site with the same assumption, found by running cargo test -p victory-gpu --lib on this host (Intel Arc Xe-LPG, 1M cap):

thread 'memory::tests::lists_share_a_table_and_copies_keep_their_views' panicked at
crates/victory-gpu/src/memory.rs:1030:9:
assert!(pairs.0 >= 1 << 18 && pairs.1 >= 1 << 18, "past the dynamic slots");

1 << 18 is the dynamic-slot region of a heap sized to HEAP_VIEWS; on a host capped at 1,000,000 the allocation lands below it, so the assertion fails for the same reason as the two in this issue — not because the tables or the copy-on-write views are wrong (the 0x100, 0x200 read above it passes).

So the count is three: descriptor::host::tests::dynamic_slots_are_held_until_released and the two range assertions here, and memory::tests::lists_share_a_table_and_copies_keep_their_views. #3191 fixes the first; I have not touched the memory one, since it is a different question (where the dynamic region starts on a capped heap, not how much room the test asks for) and it should be decided together with the HEAP_VIEWS question this issue is open about.

For the record, the same run on that host: 238 passed, 2 failed, 1 ignored — the two failures being exactly the first and third of those.

No game files. AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7196381665 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7196381665). Originally posted by [zzm1234560621-prog](https://github.com/zzm1234560621-prog) on 2026-11-26T15:31:14Z. --- A third site with the same assumption, found by running `cargo test -p victory-gpu --lib` on this host (Intel Arc Xe-LPG, 1M cap): ``` thread 'memory::tests::lists_share_a_table_and_copies_keep_their_views' panicked at crates/victory-gpu/src/memory.rs:1030:9: assert!(pairs.0 >= 1 << 18 && pairs.1 >= 1 << 18, "past the dynamic slots"); ``` `1 << 18` is the dynamic-slot region of a heap sized to `HEAP_VIEWS`; on a host capped at 1,000,000 the allocation lands below it, so the assertion fails for the same reason as the two in this issue — not because the tables or the copy-on-write views are wrong (the `0x100`, `0x200` read above it passes). So the count is three: `descriptor::host::tests::dynamic_slots_are_held_until_released` and the two range assertions here, and `memory::tests::lists_share_a_table_and_copies_keep_their_views`. #3191 fixes the first; I have not touched the memory one, since it is a different question (where the dynamic region starts on a capped heap, not how much room the test asks for) and it should be decided together with the `HEAP_VIEWS` question this issue is open about. For the record, the same run on that host: 238 passed, 2 failed, 1 ignored — the two failures being exactly the first and third of those. _No game files. AI-assisted (Claude)._
upipibi commented 2026-11-26 21:56:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-26T21:56:17Z.


The open PRs for the two failing tests (T1 dynamic_slots_are_held_until_released, host.rs:2226; T2 lists_share_a_table_and_copies_keep_their_views, memory.rs:1030), on a host capped at 1,000,000 views. Run = ours on an RTX 3070 (driver 616.56); the rest is by reading, not run.

PR approach T1 T2
#2683 HEAP_VIEWS = 1,000,000 on every host pass (run at aecd604 alone, 3070: see #2683) pass (run at aecd604)
#2461, #2177, #1779, #2628 probe the limit, clamp follows it pass pass
#3122 room for pairs, asserts follow the layout pass pass
#3300 heap ladder, T1 relaxed pass (run) fails (run)
#1548 full 2^18 dynamic on the 1M heap fails pass
#1349 same, trims fresh tables fails fails
#2475 #1349 rebased + skips on capped hosts skip skip
#3370 stride tables only (not the cap) fails fails

#2475 copies #1349. #2683 and the four probe PRs are rival answers to the clamp question, so one should land. Test-only: #3191 (T1), #3286 (T2).

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7204204075 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7204204075). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T21:56:17Z. --- The open PRs for the two failing tests (T1 `dynamic_slots_are_held_until_released`, host.rs:2226; T2 `lists_share_a_table_and_copies_keep_their_views`, memory.rs:1030), on a host capped at 1,000,000 views. Run = ours on an RTX 3070 (driver 616.56); the rest is by reading, not run. | PR | approach | T1 | T2 | |---|---|---|---| | #2683 | `HEAP_VIEWS` = 1,000,000 on every host | pass (run at `aecd604` alone, 3070: see #2683) | pass (run at `aecd604`) | | #2461, #2177, #1779, #2628 | probe the limit, clamp follows it | pass | pass | | #3122 | room for pairs, asserts follow the layout | pass | pass | | #3300 | heap ladder, T1 relaxed | pass (run) | fails (run) | | #1548 | full 2^18 dynamic on the 1M heap | fails | pass | | #1349 | same, trims fresh tables | fails | fails | | #2475 | #1349 rebased + skips on capped hosts | skip | skip | | #3370 | stride tables only (not the cap) | fails | fails | #2475 copies #1349. #2683 and the four probe PRs are rival answers to the clamp question, so one should land. Test-only: #3191 (T1), #3286 (T2). AI-assisted (Claude Code, Claude Opus 5.5).
zzm1234560621-prog commented 2026-11-27 00:01:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by zzm1234560621-prog on 2026-11-27T00:01:19Z.


Measured rather than inferred: the two together are green on this capped host.

I put both on one branch — preview/heap-caps (based on 63bcca4, #3191 then #3286 cherry-picked, no conflicts) — and ran it here (Intel Arc Xe-LPG, 1M view-heap cap):

cargo test -p victory-gpu --lib
test result: ok. 231 passed; 0 failed; 1 ignored
cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean

Against 63bcca4 on the same host that is 229 passed, 2 failed, the two failures being exactly:

  • descriptor::host::tests::dynamic_slots_are_held_until_released (#3191),
  • memory::tests::lists_share_a_table_and_copies_keep_their_views (#3286).

So each patch fixes its own test and neither depends on the other, but only together do they leave the crate green here. The branch is pushed for convenience, not as a PR: if landing one patch is preferred, preview/heap-caps is the diff to take and I will close the two and open one with that content.

What remains open is the question this issue is about — whether a capped host gets the larger dynamic range, or the shaders' clamp follows the heap the host can make. Neither PR answers it; both only stop a test from asserting one answer.

No game files. AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7206101888 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7206101888). Originally posted by [zzm1234560621-prog](https://github.com/zzm1234560621-prog) on 2026-11-27T00:01:19Z. --- Measured rather than inferred: the two together are green on this capped host. I put both on one branch — `preview/heap-caps` (based on `63bcca4`, #3191 then #3286 cherry-picked, no conflicts) — and ran it here (Intel Arc Xe-LPG, 1M view-heap cap): ``` cargo test -p victory-gpu --lib test result: ok. 231 passed; 0 failed; 1 ignored cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean ``` Against `63bcca4` on the same host that is **229 passed, 2 failed**, the two failures being exactly: - `descriptor::host::tests::dynamic_slots_are_held_until_released` (#3191), - `memory::tests::lists_share_a_table_and_copies_keep_their_views` (#3286). So each patch fixes its own test and neither depends on the other, but only together do they leave the crate green here. The branch is pushed for convenience, not as a PR: if landing one patch is preferred, `preview/heap-caps` is the diff to take and I will close the two and open one with that content. What remains open is the question this issue is about — whether a capped host gets the larger dynamic range, or the shaders' clamp follows the heap the host can make. Neither PR answers it; both only stop a test from asserting one answer. _No game files. AI-assisted (Claude)._
artor410 commented 2026-11-28 08:19:23 +00:00 (Migrated from github.com)
Author
Contributor

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


The #3178 test PRs side by side on NVIDIA Ampere

RTX 3070 Ti 8 GB, driver 610.88, Windows 11, rustc 1.98.1, hardware adapter. Each head was merged cleanly onto main 63bcca4, and cargo test -p victory-gpu --lib was run on each. The test heap here comes out at 65,540 descriptors (4 + MIN_DYNAMIC).

tree lib dynamic_slots_… lists_share_… what is still checked on a capped host
main 229 / 2 fail fail fail –
#1770 1beaca6 231 / 0 pass pass first test: >= 4 + MIN_DYNAMIC; pairs check skipped
#2251 fae93c4 231 / 0 pass pass first test: == count + dynamic; pairs check skipped; also changes the placed-view test
#2937 ba5f085 231 / 0 pass pass (returns early) assertion skipped; second test checks nothing
#3191 78524a7 230 / 1 fail pass fail fixes only the first test
#3244 e493332 231 / 0 pass pass count + dynamic, stride and mark tables cover HEAP_VIEWS, pairs distinct and inside the heap

Pick: #3244. It fixes both tests and keeps the most coverage on the capped path that NVIDIA actually runs. #3191 is not enough on its own. #1770, #2251 and #2937 pass by skipping the pairs check. #2251's placed-view change is separate from #3178 and can still land on its own.

The code PRs that change the capped heap itself (#3300, #3419, #2475) were not compared here.

(Claude Code, Claude Opus 5.5.)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7236507717 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7236507717). Originally posted by [artor410](https://github.com/artor410) on 2026-11-28T08:19:23Z. --- ## The #3178 test PRs side by side on NVIDIA Ampere RTX 3070 Ti 8 GB, driver 610.88, Windows 11, rustc 1.98.1, hardware adapter. Each head was merged cleanly onto `main` `63bcca4`, and `cargo test -p victory-gpu --lib` was run on each. The test heap here comes out at 65,540 descriptors (4 + `MIN_DYNAMIC`). | tree | lib | `dynamic_slots_…` | `lists_share_…` | what is still checked on a capped host | |---|---|---|---|---| | `main` | 229 / 2 fail | fail | fail | – | | #1770 `1beaca6` | 231 / 0 | pass | pass | first test: `>= 4 + MIN_DYNAMIC`; pairs check skipped | | #2251 `fae93c4` | 231 / 0 | pass | pass | first test: `== count + dynamic`; pairs check skipped; also changes the placed-view test | | #2937 `ba5f085` | 231 / 0 | pass | pass (returns early) | assertion skipped; second test checks nothing | | #3191 `78524a7` | 230 / **1 fail** | pass | **fail** | fixes only the first test | | **#3244** `e493332` | 231 / 0 | pass | pass | count + dynamic, stride and mark tables cover `HEAP_VIEWS`, pairs distinct and inside the heap | **Pick: #3244.** It fixes both tests and keeps the most coverage on the capped path that NVIDIA actually runs. #3191 is not enough on its own. #1770, #2251 and #2937 pass by skipping the pairs check. #2251's placed-view change is separate from #3178 and can still land on its own. The code PRs that change the capped heap itself (#3300, #3419, #2475) were not compared here. (Claude Code, Claude Opus 5.5.)
Sign in to join this conversation.
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#3176
No description provided.