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 #3178

Open
opened 2026-11-26 11:32:54 +00:00 by github-bot · 7 comments
Owner

@⁠zzm1234560621-prog on GitHub · 2026-11-26 11:15 UTC · original

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).

**@⁠zzm1234560621-prog** on GitHub · 2026-11-26 11:15 UTC · [original](https://github.com/Marvisak/VIctory/issues/3178) 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)._
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:32:54 +00:00
Author
Owner

@⁠zzm1234560621-prog on GitHub · 2026-11-26 11:34 UTC · original

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).

**@⁠zzm1234560621-prog** on GitHub · 2026-11-26 11:34 UTC · [original](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7190892106) 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)._
Author
Owner

@⁠zed6000 on GitHub · 2026-11-26 11:55 UTC · original

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.

**@⁠zed6000** on GitHub · 2026-11-26 11:55 UTC · [original](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7191343270) 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.
github-bot changed title from 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 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 12:08:01 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 12:06 UTC · original

@⁠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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 12:06 UTC · [original](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7191571141) @⁠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.
Author
Owner

@⁠zzm1234560621-prog on GitHub · 2026-11-26 12:06 UTC · original

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** on GitHub · 2026-11-26 12:06 UTC · [original](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7191583205) 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)._
Author
Owner

@⁠zzm1234560621-prog on GitHub · 2026-11-26 12:19 UTC · original

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** on GitHub · 2026-11-26 12:19 UTC · [original](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7191856789) 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)._
Author
Owner

@⁠zzm1234560621-prog on GitHub · 2026-11-26 15:31 UTC · original

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).

**@⁠zzm1234560621-prog** on GitHub · 2026-11-26 15:31 UTC · [original](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7196381665) 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)._
Author
Owner

@⁠zzm1234560621-prog on GitHub · 2026-11-26 15:59 UTC · original

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** on GitHub · 2026-11-26 15:59 UTC · [original](https://github.com/Marvisak/VIctory/issues/3178#issuecomment-7197025847) 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)._
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#3178
No description provided.