Intel Arc A770: world draws but stays black, then host GPU device removed (0x887A0004) on the world load; HEAP_VIEWS clamp is past the host heap #2671

Open
opened 2026-11-26 05:11:40 +00:00 by github-bot · 2 comments
Owner

@⁠iiiirokuuug-rgb on GitHub · 2026-11-25 17:50 UTC · original

Intel Arc A770 16 GB (driver 32.0.101.9033): menus at 30 fps, world draws (494-3,690 draws/frame) but is black, then host GPU device removed (0x887A0004) during the world load — same on 940d32f and on mauri9911/leonida-victory e61ef78.

Machine: Xeon E5-2678 v3, 24 GB RAM, 48 GB page file, Windows 11 26200, Intel Arc A770 16 GB (driver 32.0.101.9033), retail 1.0.2.1, release build.

What it reaches:

boot, first-boot screens, menus       30 fps
loading into the world                passes
world                                 494-3,690 draws/dispatches per frame, 3,381 host textures (9.3 GB)
frame time in the world               1.4-6.5 s (0.2-1 fps); copies 2.2 GB per frame
then                                  host GPU device removed after a submission of 3-32 lists
                                      GetDeviceRemovedReason = 0x887A0004

One world frame was visible on screen before the removal.

TdrDelay=60 / TdrDdiDelay=60 makes no difference — the removal is not a TDR: it follows submissions that take seconds, but the reason stays 0x887A0004, and it also happens on 3-list submissions.

The descriptor heap is the first thing that breaks. The title asks for 1,245,184 slots:

WARN descriptor::host: host view heap capped at 1000000 error=0x80070057 count=1245184
WARN descriptor::host: title slot past the host heap index=1172015 count=934464
WARN descriptor::host: no free dynamic descriptor slots: a table is not made n=256
WARN draw: no dynamic slots for root views: dropped

There is also a constant mismatch that looks like a bug of its own: victory-shader/src/emit/shader.rs clamps heap indices in translated shaders to HEAP_VIEWS = 1 << 21 (2,097,152), but victory-gpu/src/descriptor/host.rs can never create a heap larger than PORTABLE_VIEWS = 1_000_000. So any title index in [heap size, 2M) is clamped to 2,097,151, which is past the end of the heap — a descriptor read past the heap.

Locally I set HEAP_VIEWS = 1_000_000 - 65_536 (the title region of the largest heap that can exist: PORTABLE_VIEWS minus MIN_DYNAMIC), rebuilt, and re-ran:

before:  11 draws/frame in the world, black
after:   453 -> 3,690 draws/frame, one world frame visible

The world still ends in 0x887A0004, but the clamp fix is worth having: it turns an out-of-bounds descriptor read into a null-slot read, which is what the comment above HEAP_VIEWS already says it intends ("indices past the host's heap faults the device: the last slot instead") — the last slot just has to be inside the heap.

This is the same wall as #2550 (RTX 3080: "title slot past host descriptor heap" entering the world) and #1440/#1670/#314 for the removal itself, and I do not see an Intel Arc report on it yet — that is why I am filing it. VICTORY_WATCH/VICTORY_COPY_MODE=none changed nothing for us.

No game data is quoted: counts, formats and log lines only.

**@⁠iiiirokuuug-rgb** on GitHub · 2026-11-25 17:50 UTC · [original](https://github.com/Marvisak/VIctory/issues/2671) **Intel Arc A770 16 GB (driver 32.0.101.9033): menus at 30 fps, world draws (494-3,690 draws/frame) but is black, then `host GPU device removed` (0x887A0004) during the world load — same on `940d32f` and on `mauri9911/leonida-victory` `e61ef78`.** Machine: Xeon E5-2678 v3, 24 GB RAM, 48 GB page file, Windows 11 26200, Intel Arc A770 16 GB (driver 32.0.101.9033), retail 1.0.2.1, release build. What it reaches: ``` boot, first-boot screens, menus 30 fps loading into the world passes world 494-3,690 draws/dispatches per frame, 3,381 host textures (9.3 GB) frame time in the world 1.4-6.5 s (0.2-1 fps); copies 2.2 GB per frame then host GPU device removed after a submission of 3-32 lists GetDeviceRemovedReason = 0x887A0004 ``` One world frame was visible on screen before the removal. **`TdrDelay`=60 / `TdrDdiDelay`=60 makes no difference** — the removal is not a TDR: it follows submissions that take seconds, but the reason stays `0x887A0004`, and it also happens on 3-list submissions. **The descriptor heap is the first thing that breaks.** The title asks for 1,245,184 slots: ``` WARN descriptor::host: host view heap capped at 1000000 error=0x80070057 count=1245184 WARN descriptor::host: title slot past the host heap index=1172015 count=934464 WARN descriptor::host: no free dynamic descriptor slots: a table is not made n=256 WARN draw: no dynamic slots for root views: dropped ``` There is also a constant mismatch that looks like a bug of its own: `victory-shader/src/emit/shader.rs` clamps heap indices in translated shaders to `HEAP_VIEWS = 1 << 21` (2,097,152), but `victory-gpu/src/descriptor/host.rs` can never create a heap larger than `PORTABLE_VIEWS = 1_000_000`. So any title index in [heap size, 2M) is clamped to 2,097,151, which is **past the end of the heap** — a descriptor read past the heap. Locally I set `HEAP_VIEWS = 1_000_000 - 65_536` (the title region of the largest heap that can exist: `PORTABLE_VIEWS` minus `MIN_DYNAMIC`), rebuilt, and re-ran: ``` before: 11 draws/frame in the world, black after: 453 -> 3,690 draws/frame, one world frame visible ``` The world still ends in `0x887A0004`, but the clamp fix is worth having: it turns an out-of-bounds descriptor read into a null-slot read, which is what the comment above `HEAP_VIEWS` already says it intends ("indices past the host's heap faults the device: the last slot instead") — the last slot just has to be *inside* the heap. This is the same wall as #2550 (RTX 3080: "title slot past host descriptor heap" entering the world) and #1440/#1670/#314 for the removal itself, and I do not see an Intel Arc report on it yet — that is why I am filing it. `VICTORY_WATCH`/`VICTORY_COPY_MODE=none` changed nothing for us. No game data is quoted: counts, formats and log lines only.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:11:40 +00:00
Author
Owner

@⁠pes7 on GitHub · 2026-11-25 18:08 UTC · original

Your clamp finding is right, and it is a PR now: #2683. Measured on an NVIDIA machine (the same tier-2 cap), the two directions agree.

What your local patch and mine differ in, and why I did not simply set HEAP_VIEWS = 1_000_000 - 65_536:

  • HEAP_VIEWS is also the size the host asks for (make((count + DYNAMIC).max(HEAP_VIEWS))), so lowering it to the cargo-cult number would also lower the request - harmless here, because count (1 245 184) dominates, but it makes the constant mean two things.
  • The larger question is what the clamp should point at. The cap path fills the whole heap with null descriptors (fill_null), so any index inside the heap is safe; the only hard requirement is index < heap size. 1_000_000 (PORTABLE_VIEWS) is the largest heap that can exist, so no index the clamp can produce is ever outside it - and NULL_BUFFER_VIEW (999 998) then lands inside the heap instead of 32 MB past it.
  • Once it lands inside, the two null slots need room above the dynamic ones. In main they had none - count + extra == PORTABLE_VIEWS exactly - which is why the log said no room for the null buffer views and every computed-index read went to "what is there". The capped path now keeps its top NULL_RESERVE (1 024) slots for them: title slots are unchanged at 934 464, dynamic slots go from 65 536 to 64 512.

Verified here (NVIDIA, warm caches, retail 1.0.2.1):

before: WARN host view heap capped at 1000000 count=1245184
        WARN no room for the null buffer views ... count=934464 total=1000000
after:  WARN host view heap capped at 1000000 count=1245184
        (no "no room for the null buffer views" anywhere in the run)

Your draw counts (11 -> 453-3 690 a frame) are the number I could not produce, because my machine reaches the menu and then dies of the TDR in #2661 before the world is drawn. If you can run #2683, the interesting part is whether the world's picture changes on the Arc with the null slots actually made - title slot past the host heap will still name every slot above 934 464, and those are now a null read rather than an out-of-bounds one.

On the removal itself: on this machine the debug layer names it DXGI_ERROR_DEVICE_HUNG (TDR), and it happens in the menu at 30 fps, not during the world load - see #2661. So the two reports may be the same removal (yours survives longer because each world frame is 1.4-6.5 s of CPU work while the GPU side is short, so fewer commands pile up per submission).

Two things I would try on the Arc, if you have the patience:

  1. VICTORY_D3D12_DEBUG=1 with a diagnostics build - it prints the reason as RemoveDevice ... DXGI_ERROR_DEVICE_HUNG (0x887A0006) instead of the 0x887A0004 the queue reports afterwards. That would settle whether your TdrDelay=60 experiment was defeated by the DXGI default rather than the registry key.
  2. VICTORY_SKIP_PIPELINES=<hash> for the compute shader named in your breadcrumb report, to see whether the removal follows the shader or the submission size.
**@⁠pes7** on GitHub · 2026-11-25 18:08 UTC · [original](https://github.com/Marvisak/VIctory/issues/2671#issuecomment-7170499263) Your clamp finding is right, and it is a PR now: #2683. Measured on an NVIDIA machine (the same tier-2 cap), the two directions agree. What your local patch and mine differ in, and why I did not simply set `HEAP_VIEWS = 1_000_000 - 65_536`: * `HEAP_VIEWS` is also the size the host *asks* for (`make((count + DYNAMIC).max(HEAP_VIEWS))`), so lowering it to the cargo-cult number would also lower the request - harmless here, because `count` (1 245 184) dominates, but it makes the constant mean two things. * The larger question is what the clamp should point at. The cap path fills the *whole* heap with null descriptors (`fill_null`), so any index inside the heap is safe; the only hard requirement is `index < heap size`. `1_000_000` (`PORTABLE_VIEWS`) is the largest heap that can exist, so no index the clamp can produce is ever outside it - and `NULL_BUFFER_VIEW` (999 998) then lands inside the heap instead of 32 MB past it. * Once it lands inside, the two null slots need room above the dynamic ones. In `main` they had none - `count + extra == PORTABLE_VIEWS` exactly - which is why the log said `no room for the null buffer views` and every computed-index read went to "what is there". The capped path now keeps its top `NULL_RESERVE` (1 024) slots for them: title slots are unchanged at 934 464, dynamic slots go from 65 536 to 64 512. Verified here (NVIDIA, warm caches, retail 1.0.2.1): ``` before: WARN host view heap capped at 1000000 count=1245184 WARN no room for the null buffer views ... count=934464 total=1000000 after: WARN host view heap capped at 1000000 count=1245184 (no "no room for the null buffer views" anywhere in the run) ``` Your draw counts (11 -> 453-3 690 a frame) are the number I could not produce, because my machine reaches the menu and then dies of the TDR in #2661 before the world is drawn. If you can run #2683, the interesting part is whether the world's *picture* changes on the Arc with the null slots actually made - `title slot past the host heap` will still name every slot above 934 464, and those are now a null read rather than an out-of-bounds one. On the removal itself: on this machine the debug layer names it `DXGI_ERROR_DEVICE_HUNG` (TDR), and it happens in the menu at 30 fps, not during the world load - see #2661. So the two reports may be the same removal (yours survives longer because each world frame is 1.4-6.5 s of *CPU* work while the GPU side is short, so fewer commands pile up per submission). Two things I would try on the Arc, if you have the patience: 1. `VICTORY_D3D12_DEBUG=1` with a `diagnostics` build - it prints the reason as `RemoveDevice ... DXGI_ERROR_DEVICE_HUNG` (0x887A0006) instead of the `0x887A0004` the queue reports afterwards. That would settle whether your `TdrDelay=60` experiment was defeated by the *DXGI* default rather than the registry key. 2. `VICTORY_SKIP_PIPELINES=<hash>` for the compute shader named in your breadcrumb report, to see whether the removal follows the shader or the submission size.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 18:47 UTC · original

Automated triage for the maintainers.

The clamp mismatch is confirmed in main (13f91ca): HEAP_VIEWS is 1 << 21 in crates/victory-shader/src/emit/shader.rs (NULL_BUFFER_VIEW = HEAP_VIEWS - 2), while HostHeap creation in crates/victory-gpu/src/descriptor/host.rs falls back to a heap of PORTABLE_VIEWS (1,000,000) when the title asks for more. Clamped indices can then point past the heap, and the null buffer views are not made (the no room for the null buffer views warning). Open PR #2683 (by @⁠pes7) moves the clamp inside the largest heap a host can make and reserves room for the null views.

As a run report: the runs were on 940d32f and on a third-party fork (mauri9911/leonida-victory), not this repository's current main. The heap cap itself is tracked in #2138 (oldest report, title asks for 1,245,184 view slots), also #2550. The later removal may be the hang in #2661. A retry on current main with #2683, ideally a diagnostics build with VICTORY_D3D12_DEBUG=1 so the removal reason is named, would help.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 18:47 UTC · [original](https://github.com/Marvisak/VIctory/issues/2671#issuecomment-7171414793) <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T18:08:37Z at=2026-11-25T18:49:45Z --> Automated triage for the maintainers. The clamp mismatch is confirmed in main (13f91ca): `HEAP_VIEWS` is `1 << 21` in `crates/victory-shader/src/emit/shader.rs` (`NULL_BUFFER_VIEW = HEAP_VIEWS - 2`), while `HostHeap` creation in `crates/victory-gpu/src/descriptor/host.rs` falls back to a heap of `PORTABLE_VIEWS` (1,000,000) when the title asks for more. Clamped indices can then point past the heap, and the null buffer views are not made (the `no room for the null buffer views` warning). Open PR #2683 (by @⁠pes7) moves the clamp inside the largest heap a host can make and reserves room for the null views. As a run report: the runs were on `940d32f` and on a third-party fork (`mauri9911/leonida-victory`), not this repository's current main. The heap cap itself is tracked in #2138 (oldest report, `title asks for 1,245,184 view slots`), also #2550. The later removal may be the hang in #2661. A retry on current main with #2683, ideally a `diagnostics` build with `VICTORY_D3D12_DEBUG=1` so the removal reason is named, would help. --- _Generated by [Claude Code](https://claude.ai/code)_
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#2671
No description provided.