NVIDIA: main at 70564ae removes the device ~6 s after start (typed UAV on B5G5R5A1_UNORM, DXGI_ERROR_INVALID_CALL) #1753

Closed
opened 2026-11-26 04:43:39 +00:00 by github-bot · 11 comments
Owner

@⁠JurajSimicevic on GitHub · 2026-11-24 21:59 UTC · original

Setup: RTX 5080 16 GB (driver 32.0.16.1742), Intel Core Ultra 7 270K Plus, Windows 11 Pro 26200. Plain main at 70564ae, diag build (--profile diag --features diagnostics), VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1. Series X dump.

What happens: about 6 s after start, during the first boot screens (one frame-rate line, 0.2 fps), the device is removed with DXGI_ERROR_INVALID_CALL after a submission of one list (no breadcrumbs). Runs on ffe310e (before tonight's merges) on the same machine reached the world every time.

Right before it, the debug layer reports:

ID3D12Device::GetResourceAllocationInfo: A texture that has D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS set in D3D12_RESOURCE_DESC::Flags must be created with a format that either can be used as unordered access, or cast to a format that could be used as unordered access.
ID3D12Device::CreateUnorderedAccessView: The format (0x56, B5G5R5A1_UNORM) cannot be used with a Typed Unordered Access View. [...] Use CheckFormatSupport to check Format support. id=342 severity=1
ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL [...]) id=232

So a typed UAV is made on a B5G5R5A1_UNORM texture, a format NVIDIA doesn't support for typed UAVs; creating it invalidates the device.

Also new since ffe310e, in the same seconds:

  • 310,720 × title slot past the host heap index=… count=934464 for_draw=false (indices 934,464 to 1,245,183): the title's view heap of 1,245,184 slots is capped at 1,000,000 (host view heap capped at 1000000), and views for the slots past the cap are now asked for outside draws.
  • CreateDescriptorHeap: NumDescriptors 2097152 / 1507328 / 1310720, but the limit for shader visible view heaps is 1000000 (the HEAP_VIEWS attempts, then the fallbacks).

Not the cause: my branch for the view-heap dynamic range (#1751) stops in exactly the same way, with the same messages and the same count of warnings; plain main was checked separately to be sure.

Possibly a fix along the lines of checking D3D12_FORMAT_SUPPORT2_UAV_TYPED_*/CheckFormatSupport before making a typed UAV (or making a typeless/null one instead), but I haven't traced which commit between ffe310e and 70564ae started making this view.

AI-assisted (Claude Code).

**@⁠JurajSimicevic** on GitHub · 2026-11-24 21:59 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753) **Setup:** RTX 5080 16 GB (driver 32.0.16.1742), Intel Core Ultra 7 270K Plus, Windows 11 Pro 26200. Plain `main` at `70564ae`, diag build (`--profile diag --features diagnostics`), `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1`. Series X dump. **What happens:** about 6 s after start, during the first boot screens (one frame-rate line, 0.2 fps), the device is removed with `DXGI_ERROR_INVALID_CALL` after a submission of one list (no breadcrumbs). Runs on `ffe310e` (before tonight's merges) on the same machine reached the world every time. Right before it, the debug layer reports: ``` ID3D12Device::GetResourceAllocationInfo: A texture that has D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS set in D3D12_RESOURCE_DESC::Flags must be created with a format that either can be used as unordered access, or cast to a format that could be used as unordered access. ID3D12Device::CreateUnorderedAccessView: The format (0x56, B5G5R5A1_UNORM) cannot be used with a Typed Unordered Access View. [...] Use CheckFormatSupport to check Format support. id=342 severity=1 ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL [...]) id=232 ``` So a typed UAV is made on a `B5G5R5A1_UNORM` texture, a format NVIDIA doesn't support for typed UAVs; creating it invalidates the device. Also new since `ffe310e`, in the same seconds: - 310,720 × `title slot past the host heap index=… count=934464 for_draw=false` (indices 934,464 to 1,245,183): the title's view heap of 1,245,184 slots is capped at 1,000,000 (`host view heap capped at 1000000`), and views for the slots past the cap are now asked for outside draws. - `CreateDescriptorHeap: NumDescriptors 2097152 / 1507328 / 1310720, but the limit for shader visible view heaps is 1000000` (the `HEAP_VIEWS` attempts, then the fallbacks). **Not the cause:** my branch for the view-heap dynamic range (#1751) stops in exactly the same way, with the same messages and the same count of warnings; plain `main` was checked separately to be sure. Possibly a fix along the lines of checking `D3D12_FORMAT_SUPPORT2_UAV_TYPED_*`/`CheckFormatSupport` before making a typed UAV (or making a typeless/null one instead), but I haven't traced which commit between `ffe310e` and `70564ae` started making this view. AI-assisted (Claude Code).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:43:39 +00:00
Author
Owner

@⁠alessiodeia on GitHub · 2026-11-24 22:08 UTC · original

Same crash on an RTX 2070 SUPER (Turing, driver 621.40), plain 70564ae: device removed after ~70 s with DXGI_ERROR_INVALID_CALL. The debug layer shows CreateUnorderedAccessView: The format (0x56, B5G5R5A1_UNORM) cannot be used with a Typed Unordered Access View right before it.

@⁠JurajSimicevic I saw your claim in #1633 and I'm not opening a competing PR. I had already written and verified the same fix, so here it is in case it saves you time: alessiodeia/VIctory@7c889c2 on fix/typed-uav-format-support. Feel free to take any of it.

  • Where it comes from: I logged every texture UAV the runtime makes. The failing one is view=86 own=86 flags=5 (render target + unordered access) on a texture made through CreateCommittedResource3 with castable(86) = R8G8/R16 formats plus B5G6R5/B4G4R4A4. The castable list is what lets the device accept the UAV flag on B5G5R5A1. fits then sees no cast and the same family, so typed_store is never asked.
  • The fix: in fits, check typed_store on the format the view is actually made in (own unless the view casts or the texture is typeless), and against own when the view has no format. This replaces the cast-only check.
  • A test pitfall: a test that makes the B5G5R5A1/B5G6R5/B4G4R4A4 texture with a plain CreateCommittedResource and the UAV flag passes vacuously. On this card the device refuses to create it, so the case is skipped. The texture has to be made with CreateCommittedResource3 and the castable list, as make_texture does. With that, the test (unordered_views_need_a_format_the_device_stores_to) fails on 70564ae (B5G6R5 accepted) and passes with the fix. It also makes R8G8B8A8 as a control and checks the device is alive at the end.
  • In the title: with the fix the B5G5R5A1 view is refused (an unordered view in a format the host cannot store view=86 own=86) at the point where the plain build died, and the run went on to ~4.8 min. It then hit a different removal before the world: a 4.5 s submission ending in dispatch 16x16x16 [compute 00167d58cc5a78d7], with 119 wave64 compute pipelines refused on this 32-lane card. I expect that one is a wave64 matter (#439/#189), not this bug.
  • workspace clippy -D warnings clean with and without --all-features; cargo xtask policy ok. On this card dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views fail on plain 70564ae as well (capped view heap), so they're unrelated.

AI-assisted (Claude Code). No game data attached.

**@⁠alessiodeia** on GitHub · 2026-11-24 22:08 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7145859876) Same crash on an **RTX 2070 SUPER** (Turing, driver 621.40), plain `70564ae`: device removed after ~70 s with `DXGI_ERROR_INVALID_CALL`. The debug layer shows `CreateUnorderedAccessView: The format (0x56, B5G5R5A1_UNORM) cannot be used with a Typed Unordered Access View` right before it. @⁠JurajSimicevic I saw your claim in #1633 and I'm not opening a competing PR. I had already written and verified the same fix, so here it is in case it saves you time: [`alessiodeia/VIctory@7c889c2`](https://github.com/alessiodeia/VIctory/commit/7c889c2) on `fix/typed-uav-format-support`. Feel free to take any of it. - **Where it comes from:** I logged every texture UAV the runtime makes. The failing one is `view=86 own=86 flags=5` (render target + unordered access) on a texture made through `CreateCommittedResource3` with `castable(86)` = R8G8/R16 formats plus B5G6R5/B4G4R4A4. The castable list is what lets the device accept the UAV flag on B5G5R5A1. `fits` then sees no cast and the same family, so `typed_store` is never asked. - **The fix:** in `fits`, check `typed_store` on the format the view is actually made in (`own` unless the view casts or the texture is typeless), and against `own` when the view has no format. This replaces the cast-only check. - **A test pitfall:** a test that makes the B5G5R5A1/B5G6R5/B4G4R4A4 texture with a plain `CreateCommittedResource` and the UAV flag passes vacuously. On this card the device refuses to create it, so the case is skipped. The texture has to be made with `CreateCommittedResource3` and the castable list, as `make_texture` does. With that, the test (`unordered_views_need_a_format_the_device_stores_to`) fails on `70564ae` (B5G6R5 accepted) and passes with the fix. It also makes R8G8B8A8 as a control and checks the device is alive at the end. - **In the title:** with the fix the B5G5R5A1 view is refused (`an unordered view in a format the host cannot store view=86 own=86`) at the point where the plain build died, and the run went on to ~4.8 min. It then hit a different removal before the world: a 4.5 s submission ending in `dispatch 16x16x16 [compute 00167d58cc5a78d7]`, with 119 wave64 compute pipelines refused on this 32-lane card. I expect that one is a wave64 matter (#439/#189), not this bug. - workspace clippy `-D warnings` clean with and without `--all-features`; `cargo xtask policy` ok. On this card `dynamic_slots_are_held_until_released` and `lists_share_a_table_and_copies_keep_their_views` fail on plain `70564ae` as well (capped view heap), so they're unrelated. AI-assisted (Claude Code). No game data attached.
Author
Owner

@⁠Ryanarcx2 on GitHub · 2026-11-24 22:16 UTC · original

Confirming on an RTX 5070 Ti (driver 32.0.16.1742), Windows 11, main at 70564ae, after translate --cache --pipelines.

Run Time to device removal Error
diag, VICTORY_D3D12_DEBUG=1 17 s DXGI_ERROR_INVALID_CALL; debug layer: GetResourceAllocationInfo: ALLOW_UNORDERED_ACCESS texture with format B5G5R5A1_UNORM
release, no debug layer 16 s 0x887A0001, 1 list submitted

The release run logs, under a second before removal: the host refuses castable formats ... 2560x1440 then no host texture ... format: 115 (E_INVALIDARG). On ffe310e the same two 2560x1440 textures (formats 86/115) were also refused, but the run continued through the menus to the first cutscene. So this looks like a regression from 13bbd6f on NVIDIA. It happens before the account picker, with or without the debug layer.

Happy to test #1763 / #1765.

**@⁠Ryanarcx2** on GitHub · 2026-11-24 22:16 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7146021096) Confirming on an RTX 5070 Ti (driver 32.0.16.1742), Windows 11, `main` at `70564ae`, after `translate --cache --pipelines`. | Run | Time to device removal | Error | |---|---|---| | diag, `VICTORY_D3D12_DEBUG=1` | 17 s | `DXGI_ERROR_INVALID_CALL`; debug layer: `GetResourceAllocationInfo`: ALLOW_UNORDERED_ACCESS texture with format B5G5R5A1_UNORM | | release, no debug layer | 16 s | `0x887A0001`, 1 list submitted | The release run logs, under a second before removal: `the host refuses castable formats ... 2560x1440` then `no host texture ... format: 115` (E_INVALIDARG). On `ffe310e` the same two 2560x1440 textures (formats 86/115) were also refused, but the run continued through the menus to the first cutscene. So this looks like a regression from `13bbd6f` on NVIDIA. It happens before the account picker, with or without the debug layer. Happy to test #1763 / #1765.
Author
Owner

@⁠antoinerz1 on GitHub · 2026-11-24 22:40 UTC · original

Review of the three open fixes for this crash (#1763, #1775, #1780), tested on an RTX 4060 Ti

All three change the same check in descriptor::host::fits. I ran each one's tests on NVIDIA, then undid each fix (keeping its test) to see whether the test catches the bug. No game run, no game data.

Setup: RTX 4060 Ti, driver 32.0.16.1088, Windows 11 26300, main at 70564ae. Heads: #1763 dbd4fc2, #1775 3f91087, #1780 151fa7d. cargo test -p victory-gpu --locked --lib descriptor::host.

#1763 #1775 #1780
View with a format (view=86 own=86, the one the title makes) refused refused refused
View without a description (view == 0) on a B5G5R5A1 texture refused, not logged refused, logged still made
New tests pass on this card yes yes yes
New tests fail with the fix undone no (pass either way) yes not applicable (pure test, see below)

#1780: the if view == 0 { return !typeless; } early return comes before the new check, so a UAV without a description on a B5G5R5A1 texture still reaches CreateUnorderedAccessView. viewed_format handles view == 0, but fits never calls it with 0. I applied #1775's GPU test on top of #1780: it fails at assert_eq!(fits(&texture, &castable, None, true), stores) (left: true, right: false). The new test checks viewed_format alone, so it would still pass if fits stopped calling it. The title's view in the reports has a description, so this does not show in the game runs, but the device-removal path is still there.

#1763: the fix is the same as #1775's. Its tests don't exercise it: unsupported_typed_uav_format_is_refused uses an R16_TYPELESS texture viewed as B5G5R5A1, a cast across families that main already refused. With both changed lines put back to main's, both new tests still pass here.

#1775: with the fix undone, its test fails on this card (left: true, right: false), so it creates the castable B5G5R5A1 texture the way resource does and checks both the described and undescribed views. It is also the only one with a game run reported past the boot (#1753 author, RTX 5080).

So #1775 looks like the one to merge, and #1763/#1780 can close in its favour. In all three, the only other failure in that module is dynamic_slots_are_held_until_released, which fails on main on this card too (the HEAP_VIEWS cap, #1751/#1777).

AI-assisted (Claude Code).

**@⁠antoinerz1** on GitHub · 2026-11-24 22:40 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7146508336) **Review of the three open fixes for this crash (#1763, #1775, #1780), tested on an RTX 4060 Ti** All three change the same check in `descriptor::host::fits`. I ran each one's tests on NVIDIA, then undid each fix (keeping its test) to see whether the test catches the bug. No game run, no game data. **Setup:** RTX 4060 Ti, driver 32.0.16.1088, Windows 11 26300, `main` at `70564ae`. Heads: #1763 `dbd4fc2`, #1775 `3f91087`, #1780 `151fa7d`. `cargo test -p victory-gpu --locked --lib descriptor::host`. | | #1763 | #1775 | #1780 | |---|---|---|---| | View with a format (`view=86 own=86`, the one the title makes) | refused | refused | refused | | View without a description (`view == 0`) on a B5G5R5A1 texture | refused, not logged | refused, logged | **still made** | | New tests pass on this card | yes | yes | yes | | New tests fail with the fix undone | **no** (pass either way) | yes | not applicable (pure test, see below) | **#1780:** the `if view == 0 { return !typeless; }` early return comes before the new check, so a UAV without a description on a B5G5R5A1 texture still reaches `CreateUnorderedAccessView`. `viewed_format` handles `view == 0`, but `fits` never calls it with 0. I applied #1775's GPU test on top of #1780: it fails at `assert_eq!(fits(&texture, &castable, None, true), stores)` (`left: true, right: false`). The new test checks `viewed_format` alone, so it would still pass if `fits` stopped calling it. The title's view in the reports has a description, so this does not show in the game runs, but the device-removal path is still there. **#1763:** the fix is the same as #1775's. Its tests don't exercise it: `unsupported_typed_uav_format_is_refused` uses an `R16_TYPELESS` texture viewed as B5G5R5A1, a cast across families that `main` already refused. With both changed lines put back to `main`'s, both new tests still pass here. **#1775:** with the fix undone, its test fails on this card (`left: true, right: false`), so it creates the castable B5G5R5A1 texture the way `resource` does and checks both the described and undescribed views. It is also the only one with a game run reported past the boot (#1753 author, RTX 5080). So #1775 looks like the one to merge, and #1763/#1780 can close in its favour. In all three, the only other failure in that module is `dynamic_slots_are_held_until_released`, which fails on `main` on this card too (the `HEAP_VIEWS` cap, #1751/#1777). AI-assisted (Claude Code).
Author
Owner

@⁠crissuper20 on GitHub · 2026-11-24 23:17 UTC · original

Same crash on a GTX 1650 (Turing TU117, 4 GB, driver 32.0.16.2124), Windows 11 LTSC 24H2, diag build, Series S, my existing save. On plain 70564ae the device is removed with DXGI_ERROR_INVALID_CALL after a 1-list submission, ~2.5 min after start and before the world load.

Each of the three fixes on its own, merged onto 70564ae, 6-minute runs with the same save and input script:

device removed world load started
70564ae yes (~2.5 min) no
+ #1763 (dbd4fc2) no yes
+ #1775 (3f91087) no yes
+ #1780 (151fa7d) no yes

So all three remove it here too; nothing on this card favors one over another. Fine to pick whichever the reviewers prefer and close the other two.

Claude Code assisted.

**@⁠crissuper20** on GitHub · 2026-11-24 23:17 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7147232544) Same crash on a **GTX 1650** (Turing TU117, 4 GB, driver 32.0.16.2124), Windows 11 LTSC 24H2, diag build, Series S, my existing save. On plain `70564ae` the device is removed with `DXGI_ERROR_INVALID_CALL` after a 1-list submission, ~2.5 min after start and before the world load. Each of the three fixes on its own, merged onto `70564ae`, 6-minute runs with the same save and input script: | | device removed | world load started | |---|---|---| | `70564ae` | **yes** (~2.5 min) | no | | + #1763 (`dbd4fc2`) | no | yes | | + #1775 (`3f91087`) | no | yes | | + #1780 (`151fa7d`) | no | yes | So all three remove it here too; nothing on this card favors one over another. Fine to pick whichever the reviewers prefer and close the other two. Claude Code assisted.
Author
Owner

@⁠PigBun-AI on GitHub · 2026-11-24 23:50 UTC · original

AI-assisted comment (PigBun-AI): the measurements below were taken by an AI agent team on one machine and are reported as-is.

Confirming #1753 on an RTX 5090 (Windows, D3D12 FL 12.2; driver version not recorded), main at 70564ae0, default adapter, 1280x720 window. Measurements only:

Without any fix (70564ae0, diagnostics build, VICTORY_D3D12_DEBUG=1): the device is removed about 24 s after start (17 s in the first run without the debug layer). The D3D12 debug layer says, immediately before the removal:

D3D12 ERROR: ID3D12Device::CreateUnorderedAccessView: The format (0x56, B5G5R5A1_UNORM)
cannot be used with a Typed Unordered Access View. This is because the current graphics
implementation does not even support this Format. ... Use CheckFormatSupport to check Format support. id=342
D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason
(DXGI_ERROR_INVALID_CALL ...) id=232

Nothing is drawn (8 captured frames all black). Two runs had the same event order.

With a guard (one extra commit on top of 70564ae0 that asks CheckFeatureSupport(FORMAT_SUPPORT) for the view format and creates a null UAV when UAV_TYPED_STORE is missing), the same RTX 5090 query for DXGI 86 returns

format=86 support1=14996464 support2=512 ok=false

i.e. TYPED_UNORDERED_ACCESS_VIEW (and UAV_TYPED_STORE) are not reported for B5G5R5A1_UNORM; of the 24 formats the game asked about in that run, only 86 was refused (a 2560x1440 texture). With the guard the device was not removed again for the whole 71 s that the run lasted, and the game reached its first world frame at ~59 s.

Caveats: single machine, single run per configuration; the guarded run was stopped by our own memory guard 12 s after entering the world, so it says nothing about later stability. In the same guarded run 77 compute pipelines were refused with 0x80070057 shortly after the world started; we have not looked into why. We saw no report of this on a 5090 in this issue, so this may help others on the 50 series.

Debug-layer log lines and the guard output are available if useful.

**@⁠PigBun-AI** on GitHub · 2026-11-24 23:50 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7147847476) AI-assisted comment (PigBun-AI): the measurements below were taken by an AI agent team on one machine and are reported as-is. Confirming #1753 on an **RTX 5090** (Windows, D3D12 FL 12.2; driver version not recorded), `main` at 70564ae0, default adapter, 1280x720 window. Measurements only: **Without any fix** (`70564ae0`, diagnostics build, `VICTORY_D3D12_DEBUG=1`): the device is removed about 24 s after start (17 s in the first run without the debug layer). The D3D12 debug layer says, immediately before the removal: ``` D3D12 ERROR: ID3D12Device::CreateUnorderedAccessView: The format (0x56, B5G5R5A1_UNORM) cannot be used with a Typed Unordered Access View. This is because the current graphics implementation does not even support this Format. ... Use CheckFormatSupport to check Format support. id=342 D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL ...) id=232 ``` Nothing is drawn (8 captured frames all black). Two runs had the same event order. **With a guard** (one extra commit on top of 70564ae0 that asks `CheckFeatureSupport(FORMAT_SUPPORT)` for the view format and creates a null UAV when `UAV_TYPED_STORE` is missing), the same RTX 5090 query for DXGI 86 returns ``` format=86 support1=14996464 support2=512 ok=false ``` i.e. TYPED_UNORDERED_ACCESS_VIEW (and UAV_TYPED_STORE) are not reported for B5G5R5A1_UNORM; of the 24 formats the game asked about in that run, only 86 was refused (a 2560x1440 texture). With the guard the device was not removed again for the whole 71 s that the run lasted, and the game reached its first world frame at ~59 s. Caveats: single machine, single run per configuration; the guarded run was stopped by our own memory guard 12 s after entering the world, so it says nothing about later stability. In the same guarded run 77 compute pipelines were refused with 0x80070057 shortly after the world started; we have not looked into why. We saw no report of this on a 5090 in this issue, so this may help others on the 50 series. Debug-layer log lines and the guard output are available if useful.
Author
Owner

@⁠MoonYueya on GitHub · 2026-11-25 05:49 UTC · original

Still reproduces on current main 940d32f (RTX 3080 10 GB, driver 32.0.16.1742, Windows 11 26300): device removed ~20 s after start, before any menu, exit 0x887A0001, max frame 128 (64 with the debug layer). With VICTORY_D3D12_DEBUG=1 GBV=1 DRED=1 the last calls are, within 16 µs:

id=817  CreateCommittedResource3   CLEAR_VALUE::Format B4G4R4A4_UNORM
id=599  CreateCommittedResource    B4G4R4A4_UNORM cannot be a render target
id=342  CreateUnorderedAccessView  B5G5R5A1_UNORM cannot be a typed UAV
id=232  RemoveDevice               DXGI_ERROR_INVALID_CALL   (5 µs after 342)

DRED breadcrumbs are empty, so it is the invalid call, not a GPU hang.

#1843 + #1832 merged together on 940d32f (both clean merges, local only), same switches: ids 342 and 232 are gone, no device removal, the run reaches the world (frame 1024, 111 s, captured frames change). That agrees with the other confirmations here.

The next blocker after that fix, in case nobody has hit it yet: the same run then dies at frame 1024 with an access violation writing address 0:

first-chance exception 0xc0000005 at <title image>+0x23cf683 (write 0x0: nothing mapped there), rax=0x0 rbx=0x0

Still present with the fix: id 645 ×3 (CreateDescriptorHeap asks for 2,097,152 / 1,507,328 / 1,310,720 views), id 599/817 once each for the B4G4R4A4_UNORM render target, and 310,720 title slot past the host heap lines (the title wants 1,245,184 slots, the heap is capped at 1,000,000).

Not tested: #1843 or #1832 alone; which commit introduced the removal; the access violation beyond its offset.

AI-assisted: an AI agent ran the builds, runs and log analysis on my machine.

**@⁠MoonYueya** on GitHub · 2026-11-25 05:49 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7154172139) Still reproduces on current `main` `940d32f` (RTX 3080 10 GB, driver 32.0.16.1742, Windows 11 26300): device removed ~20 s after start, before any menu, exit `0x887A0001`, max frame 128 (64 with the debug layer). With `VICTORY_D3D12_DEBUG=1 GBV=1 DRED=1` the last calls are, within 16 µs: ``` id=817 CreateCommittedResource3 CLEAR_VALUE::Format B4G4R4A4_UNORM id=599 CreateCommittedResource B4G4R4A4_UNORM cannot be a render target id=342 CreateUnorderedAccessView B5G5R5A1_UNORM cannot be a typed UAV id=232 RemoveDevice DXGI_ERROR_INVALID_CALL (5 µs after 342) ``` DRED breadcrumbs are empty, so it is the invalid call, not a GPU hang. **#1843 + #1832 merged together on `940d32f`** (both clean merges, local only), same switches: ids 342 and 232 are gone, no device removal, the run reaches the world (frame 1024, 111 s, captured frames change). That agrees with the other confirmations here. **The next blocker after that fix**, in case nobody has hit it yet: the same run then dies at frame 1024 with an access violation writing address 0: ``` first-chance exception 0xc0000005 at <title image>+0x23cf683 (write 0x0: nothing mapped there), rax=0x0 rbx=0x0 ``` Still present with the fix: id 645 ×3 (`CreateDescriptorHeap` asks for 2,097,152 / 1,507,328 / 1,310,720 views), id 599/817 once each for the `B4G4R4A4_UNORM` render target, and 310,720 `title slot past the host heap` lines (the title wants 1,245,184 slots, the heap is capped at 1,000,000). Not tested: #1843 or #1832 alone; which commit introduced the removal; the access violation beyond its offset. *AI-assisted: an AI agent ran the builds, runs and log analysis on my machine.*
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 12:52 UTC · original · edited 2026-11-26 00:47 UTC

Automated triage for the maintainers.

The view-side defect described here is fixed in main (current 63bcca4) by #1273 (merged 2026-11-25 21:40 UTC) and ea488a9 "GPU: no typed unordered view in a format the host cannot store to" (#2462, merged 21:57 UTC). In fits (crates/victory-gpu/src/descriptor/host.rs), every typed unordered view is now checked with typed_store against the format it is made in (the texture's own format unless the view is castable or the texture typeless), and a UAV with no description is checked against the texture's own format. A B5G5R5A1_UNORM unordered view on NVIDIA is refused (an unordered view in a format the host cannot store, logged once) and its slot left null instead of reaching CreateUnorderedAccessView. Writes through it are dropped.

MoonYueya's follow-up (still removed on 13f91cae) was measured on the commit both of those PRs were based on, i.e. before they landed, so it does not contradict this. Their local port of the same change on 13f91cae stopped the removal (600 s runs, no device removal).

Not changed by these: host_desc (crates/victory-gpu/src/resource.rs) still keeps ALLOW_UNORDERED_ACCESS on these textures, so with the debug layer on GetResourceAllocationInfo still reports them (KainanP measured that this does not remove the device without the debug layer). The B4G4R4A4_UNORM colour target whose RTV removes the device on NVIDIA (debug id 599) is a separate failure tracked in #735 and #2563.

Proposed for closing as fixed in main (#1273 and ea488a9/#2462, fits in crates/victory-gpu/src/descriptor/host.rs). This issue will be closed in 48 hours unless the reporter replies or a maintainer removes the triage: proposed close label. If a run on 63bcca4 or later on NVIDIA still removes the device right after a B5G5R5A1 unordered view (debug id 342), please post the commit, GPU, driver and the debug-layer lines, and this stays open.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 12:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7162966479) · edited 2026-11-26 00:47 UTC <!-- victory-issue-triage v1 verdict=proposed-close seen=2026-11-25T22:19:09Z at=2026-11-26T00:47:30Z --> Automated triage for the maintainers. **The view-side defect described here is fixed in `main`** (current `63bcca4`) by #1273 (merged 2026-11-25 21:40 UTC) and ea488a9 "GPU: no typed unordered view in a format the host cannot store to" (#2462, merged 21:57 UTC). In `fits` (`crates/victory-gpu/src/descriptor/host.rs`), every typed unordered view is now checked with `typed_store` against the format it is made in (the texture's own format unless the view is castable or the texture typeless), and a UAV with no description is checked against the texture's own format. A `B5G5R5A1_UNORM` unordered view on NVIDIA is refused (`an unordered view in a format the host cannot store`, logged once) and its slot left null instead of reaching `CreateUnorderedAccessView`. Writes through it are dropped. MoonYueya's follow-up (still removed on `13f91cae`) was measured on the commit both of those PRs were based on, i.e. before they landed, so it does not contradict this. Their local port of the same change on `13f91cae` stopped the removal (600 s runs, no device removal). Not changed by these: `host_desc` (`crates/victory-gpu/src/resource.rs`) still keeps `ALLOW_UNORDERED_ACCESS` on these textures, so with the debug layer on `GetResourceAllocationInfo` still reports them (KainanP measured that this does not remove the device without the debug layer). The `B4G4R4A4_UNORM` colour target whose RTV removes the device on NVIDIA (debug id 599) is a separate failure tracked in #735 and #2563. Proposed for closing as fixed in `main` (#1273 and ea488a9/#2462, `fits` in `crates/victory-gpu/src/descriptor/host.rs`). This issue will be closed in 48 hours unless the reporter replies or a maintainer removes the `triage: proposed close` label. If a run on `63bcca4` or later on NVIDIA still removes the device right after a `B5G5R5A1` unordered view (debug id 342), please post the commit, GPU, driver and the debug-layer lines, and this stays open. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠KainanP on GitHub · 2026-11-25 19:35 UTC · original

One test of the open #1753 PRs, measured on an affected NVIDIA card plus Intel and WARP

There are about 20 open PRs for this bug. I ran the same two-part reproduction test against each one that merges, so they can be compared directly. No game, no game data.

Machine: Windows 11 Home 26200. DXGI adapter 0: RTX 4060 Laptop GPU (10de:28a0, driver 610.47 / UMD 32.0.16.1047). Adapter 1: Intel UHD Graphics (8086:a78b, 31.0.101.5445). Also WARP (10.0.26100.9818). main at 13f91cae. The D3D12 debug layer (SDK layers) is not installed here. Results come from GetDeviceRemovedReason and the process exit code.

What each adapter reports (CheckFeatureSupport, then a plain CreateCommittedResource 64x64 without a cast list)

RTX 4060 L Intel UHD WARP
B5G5R5A1_UNORM (86): render target yes yes yes
86: typed UAV / UAV typed store / typed load no / no / no no / no / no yes / yes / yes
86 created with ALLOW_UNORDERED_ACCESS E_INVALIDARG E_INVALIDARG ok
B4G4R4A4_UNORM (115): render target no yes yes
115 created with ALLOW_RENDER_TARGET E_INVALIDARG ok ok
115: typed UAV no no yes
B5G6R5_UNORM (85): typed UAV no no yes

None of these plain creations removes the device. They just return E_INVALIDARG. Two things here differ from what the PR descriptions say:

  • This RTX reports RENDER_TARGET = no for 115. It does not report support and then refuse, which is the premise of #2305 and #2332. On main the 115 target gets a host texture anyway, because it is created with a castable-format list (CreateCommittedResource3). What removes the device is the render target view in 115.
  • Intel UHD has no typed UAV for 86 either. On Intel, main does not crash. Instead the castable creation is refused, so the B5G5R5A1 texture gets no host texture at all. Half (a) is not NVIDIA-only.

The reproduction test (on main, without the game)

Branch KainanP/VIctory@test/1753-packed-format-repro, one commit c2fce178. It adds two tests to resource.rs that go through the crate's normal paths:

  • (a) nvidia_1753_b5g5r5a1_texture_asking_for_unordered_access: a placed B5G5R5A1 title texture whose usage asks for unordered access, then a second title texture on the same memory (the shared path's allocation-size query), then its UAVs through descriptor::host::make_view, once in B5G5R5A1 and once without a description. Passes if the device is alive after each step.
  • (b) nvidia_1753_b4g4r4a4_colour_target: a B4G4R4A4 colour target and the title's RTV record, bound the way set_targets binds it (host.rtv). Passes if the device is alive and the host texture is one the host renders to. If it is not, the title's draws to it are lost.

On main with the RTX, both tests fail with DXGI_ERROR_INVALID_CALL device removal. (a) fails at the UAV in 86 and (b) fails at the RTV in 115. On WARP both pass. On Intel, (a) fails because there is no host texture and (b) passes.

Per PR (RTX 4060 unless noted; PR heads as of this comment)

"Suite" means cargo test -p victory-gpu with heap_direct_texture_reads_mark_their_heap_index skipped (#2571). On this RTX, main itself fails 2 tests, dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views (capped view heap). "none" means the PR adds no failure beyond those 2. No PR touches victory-shader.

PR (head) Merges onto 13f91cae Own test (a) B5G5R5A1 UAV (b) B4G4R4A4 target Suite Approach
main FAIL: device removed at the UAV in 86 FAIL: device removed at the RTV in 115 2 known
#1832 (f1e53b87) clean yes (#[ignore]) pass (flag dropped, UAVs null) FAIL (removed) none drop UAV flag at creation
#1843 (3502e6c5) conflict: adjacent new tests only yes pass (views refused) FAIL (removed) none check every UAV in fits
#1843 + #1832 as above pass FAIL (removed) none both
#2319 (35588589) clean yes pass (flag dropped) FAIL (removed) none drop flag
#2459 (ce9d6fda) clean yes pass (flag dropped) FAIL (removed) none drop flag (family)
#1763 (73a602b1) clean yes pass (views refused) FAIL (removed) none check every UAV in fits
#2462 (a1ac77f3) clean no pass (views refused) FAIL (removed) none check every UAV in fits
#1946 (f88e3ef4) clean no pass (views refused, in make) FAIL (removed) none check the view's final format
#1926 (644aed49) README conflict only (tested with main's README) yes pass FAIL (removed) none drop flag + check views; also bundles unrelated changes (--cpu-percent, DXIL dumps)
#2180 (a4abd078) merges cleanly but does not build (draw.rs:421, list.rs:1016 need &texture); tested with that fix yes pass (flag dropped) FAIL: no crash, but the RT flag is stripped, so draws and clears to the target are skipped none strip UAV/RT flags
#1787 (e0e5096f) clean yes FAIL (removed) FAIL (removed) none keep flag when a castable alias stores
#2442 (6b966912) clean yes FAIL (removed) FAIL (removed) none same idea as #1787
#2286 (97df7659) clean no FAIL (removed) FAIL (removed) none allocation-size query only
#1780 (151fa7d7) clean yes (pure fn) FAIL: access violation (0xc0000005, the test process crashes) FAIL (removed) none fits, but view == 0 returns before the new check
#2432 (f7cb3f3e) clean no FAIL: access violation, same gap FAIL (removed) none same gap as #1780, plus the allocation query
#2626 (d1dc7ad4) clean yes (3) pass: host texture R8G8B8A8, both UAVs made pass: host texture R8G8B8A8, RTV in 28 none R8G8B8A8 stand-in for writable 86/115
#2332 (0e350ab1) conflict in pc_format (adjacent arms; kept main's 118 to 120) yes, fails on main (asserts pc_format(118) == 45, main now maps it to 20) FAIL (removed) pass (115 made as 86) its own test 115 reinterpreted as 86
#2305 (dbce84b5) conflict: adjacent tests (kept both) yes FAIL (removed) FAIL: its null view, CreateRenderTargetView(None, None, ..), removes the device itself none null RTV

Not run:

  • #2636 only touches capture.rs: it decodes captures and cannot affect either half.
  • #55 is 591 commits behind and make_texture has been rewritten since (real conflict).
  • #89 has real conflicts in descriptor/host.rs, list.rs and texture.rs. It uses the same R8G8B8A8 widening idea as #2626.

Intel UHD (local adapter hook), a selection:

(a) (b) Suite
main FAIL: no host texture (creation refused, device alive) pass 3 known (the 2 above, plus a_texture_written_in_one_format_reads_in_another_through_a_placed_view)
#2462 FAIL: no host texture (a view check cannot help) pass none
#1832 pass pass none
#1843 + #1832 pass pass none
#2626 pass (RGBA8) pass (RGBA8, even though Intel renders 115: the stand-in needs both uses) none

WARP (--features diagnostics, VICTORY_D3D12_WARP=1): main, #1843+#1832 and #2626 all pass both halves and the full suite (0 failures). The fixes are no-ops there because WARP stores to and renders 86 and 115.

Semantic differences

  • Dropping the UAV flag at creation (#1832, #2319, #2459, #1926, #2180) gives a host texture without the permission. fits then refuses every UAV and the slot is null, so a shader that stores to it writes nothing. This is the only kind of (a) fix that also works on Intel, where main gets no texture at all. It also keeps the flag out of the plain description that GetResourceAllocationInfo sees (the debug-layer error quoted in this issue). Here, without the debug layer, that query did not remove the device. #2459's test asserts !takes(86) unconditionally, so by reading it would fail on hosts that store 86 (WARP, AMD).
  • Refusing the view (#1763, #1843, #2462, #1946) leaves the texture with the flag, which is legal through its cast list, and makes the slot null. Stores are dropped in the same way. This does not help Intel. #1780 and #2432 check only views that have a format, so a UAV without a description of a B5G5R5A1 texture still reaches CreateUnorderedAccessView and crashes the process on this RTX.
  • Keeping the flag when a castable alias stores (#1787, #2442) does not fix this bug. castable(86) always contains R16_* formats, so the flag stays and the UAV in 86 is still made.
  • #2626 substitutes the format instead of dropping a use. Writable 86/115 textures become R8G8B8A8_UNORM, and UAVs and RTVs are real views, so stores and draws land. Uploads and readbacks are converted on the CPU. GPU copies and resolves between a stand-in and a texture in the packed layout are skipped with a one-time warning (a stated shortcut). It is the largest change (8 files) and uses 2x memory for those textures.
  • #2332 renders because 86 is renderable, but the 4-4-4-4 bits are read as 5-5-5-1. Alpha collapses to 1 bit, and texels the title uploads or reads back come out with wrong colours. 86 still has no typed UAV, so (a) remains.

Recommendation

  • #2626 is the only PR that fixes both halves with working writes, on the RTX, on Intel, and as a no-op on WARP, with no new suite failures.
  • I suggest pairing it with #1763 as a general guard for any other format without typed stores (B5G6R5 is in the same position on both cards). #1763 conflicts with #2626 in fits because #2626 removes typed_store. I resolved it by keeping #1763's check and defining typed_store(f) as crate::resource::format_support(f).contains(D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW). With that, #2626 + #1763 pass both halves on the RTX and the suite shows only the 2 known failures.
  • If you would rather not take #2626's conversion code yet, #1832 + #1763 is the smallest pair that stops (a) on NVIDIA and Intel. It drops the writes, though, and (b) stays broken: no other PR makes the 115 target renderable on NVIDIA.
  • These PRs do not fix this bug as written: #1787, #2442, #2286 (alone), #1780 and #2432 (the access violation above), #2305 (its null RTV removes the device) and #2636 (unrelated).

Reproduce

git fetch https://github.com/KainanP/VIctory test/1753-packed-format-repro
git cherry-pick c2fce178          # onto main, or onto main with a PR merged
# each half in its own process (a removed device ends the shared host)
cargo test -p victory-gpu --lib -- --exact resource::tests::nvidia_1753_b5g5r5a1_texture_asking_for_unordered_access --nocapture
cargo test -p victory-gpu --lib -- --exact resource::tests::nvidia_1753_b4g4r4a4_colour_target --nocapture
# regressions
cargo test -p victory-gpu -- --skip heap_direct_texture_reads_mark_their_heap_index --skip nvidia_1753_
# WARP
VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics -- ...

The Intel runs used a local adapter-selection hook (VICTORY_TEST_ADAPTER=Intel) that is not upstream. The format table came from a throwaway test that calls CheckFeatureSupport and a plain CreateCommittedResource on every DXGI adapter plus WARP.

Tested with the help of an AI assistant (Claude Code).

**@⁠KainanP** on GitHub · 2026-11-25 19:35 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7172510623) ## One test of the open #1753 PRs, measured on an affected NVIDIA card plus Intel and WARP There are about 20 open PRs for this bug. I ran the same two-part reproduction test against each one that merges, so they can be compared directly. No game, no game data. **Machine:** Windows 11 Home 26200. DXGI adapter 0: **RTX 4060 Laptop GPU** (10de:28a0, driver 610.47 / UMD 32.0.16.1047). Adapter 1: Intel UHD Graphics (8086:a78b, 31.0.101.5445). Also WARP (10.0.26100.9818). `main` at `13f91cae`. The D3D12 debug layer (SDK layers) is not installed here. Results come from `GetDeviceRemovedReason` and the process exit code. ### What each adapter reports (`CheckFeatureSupport`, then a plain `CreateCommittedResource` 64x64 without a cast list) | | RTX 4060 L | Intel UHD | WARP | |---|---|---|---| | B5G5R5A1_UNORM (86): render target | yes | yes | yes | | 86: typed UAV / UAV typed store / typed load | **no / no / no** | **no / no / no** | yes / yes / yes | | 86 created with ALLOW_UNORDERED_ACCESS | E_INVALIDARG | E_INVALIDARG | ok | | B4G4R4A4_UNORM (115): render target | **no** | yes | yes | | 115 created with ALLOW_RENDER_TARGET | E_INVALIDARG | ok | ok | | 115: typed UAV | no | no | yes | | B5G6R5_UNORM (85): typed UAV | no | no | yes | None of these plain creations removes the device. They just return E_INVALIDARG. Two things here differ from what the PR descriptions say: - **This RTX reports `RENDER_TARGET = no` for 115.** It does not report support and then refuse, which is the premise of #2305 and #2332. On `main` the 115 target gets a host texture anyway, because it is created with a castable-format list (`CreateCommittedResource3`). What removes the device is the render target view in 115. - **Intel UHD has no typed UAV for 86 either.** On Intel, `main` does not crash. Instead the castable creation is refused, so the B5G5R5A1 texture gets **no host texture at all**. Half (a) is not NVIDIA-only. ### The reproduction test (on `main`, without the game) Branch [`KainanP/VIctory@test/1753-packed-format-repro`](https://github.com/KainanP/VIctory/tree/test/1753-packed-format-repro), one commit [`c2fce178`](https://github.com/KainanP/VIctory/commit/c2fce17803bd7074c725ae33c0b337f22eac73ff). It adds two tests to `resource.rs` that go through the crate's normal paths: - **(a)** `nvidia_1753_b5g5r5a1_texture_asking_for_unordered_access`: a placed B5G5R5A1 title texture whose usage asks for unordered access, then a second title texture on the same memory (the shared path's allocation-size query), then its UAVs through `descriptor::host::make_view`, once in B5G5R5A1 and once without a description. Passes if the device is alive after each step. - **(b)** `nvidia_1753_b4g4r4a4_colour_target`: a B4G4R4A4 colour target and the title's RTV record, bound the way `set_targets` binds it (`host.rtv`). Passes if the device is alive *and* the host texture is one the host renders to. If it is not, the title's draws to it are lost. On `main` with the RTX, **both tests fail with `DXGI_ERROR_INVALID_CALL` device removal**. (a) fails at the UAV in 86 and (b) fails at the RTV in 115. On WARP both pass. On Intel, (a) fails because there is no host texture and (b) passes. ### Per PR (RTX 4060 unless noted; PR heads as of this comment) "Suite" means `cargo test -p victory-gpu` with `heap_direct_texture_reads_mark_their_heap_index` skipped (#2571). On this RTX, `main` itself fails 2 tests, `dynamic_slots_are_held_until_released` and `lists_share_a_table_and_copies_keep_their_views` (capped view heap). "none" means the PR adds no failure beyond those 2. No PR touches `victory-shader`. | PR (head) | Merges onto `13f91cae` | Own test | (a) B5G5R5A1 UAV | (b) B4G4R4A4 target | Suite | Approach | |---|---|---|---|---|---|---| | `main` | | | **FAIL**: device removed at the UAV in 86 | **FAIL**: device removed at the RTV in 115 | 2 known | | | #1832 (`f1e53b87`) | clean | yes (`#[ignore]`) | pass (flag dropped, UAVs null) | FAIL (removed) | none | drop UAV flag at creation | | #1843 (`3502e6c5`) | conflict: adjacent new tests only | yes | pass (views refused) | FAIL (removed) | none | check every UAV in `fits` | | #1843 + #1832 | as above | | pass | FAIL (removed) | none | both | | #2319 (`35588589`) | clean | yes | pass (flag dropped) | FAIL (removed) | none | drop flag | | #2459 (`ce9d6fda`) | clean | yes | pass (flag dropped) | FAIL (removed) | none | drop flag (family) | | #1763 (`73a602b1`) | clean | yes | pass (views refused) | FAIL (removed) | none | check every UAV in `fits` | | #2462 (`a1ac77f3`) | clean | no | pass (views refused) | FAIL (removed) | none | check every UAV in `fits` | | #1946 (`f88e3ef4`) | clean | no | pass (views refused, in `make`) | FAIL (removed) | none | check the view's final format | | #1926 (`644aed49`) | README conflict only (tested with `main`'s README) | yes | pass | FAIL (removed) | none | drop flag + check views; also bundles unrelated changes (`--cpu-percent`, DXIL dumps) | | #2180 (`a4abd078`) | merges cleanly but **does not build** (`draw.rs:421`, `list.rs:1016` need `&texture`); tested with that fix | yes | pass (flag dropped) | FAIL: no crash, but the RT flag is stripped, so draws and clears to the target are skipped | none | strip UAV/RT flags | | #1787 (`e0e5096f`) | clean | yes | **FAIL** (removed) | FAIL (removed) | none | keep flag when a castable alias stores | | #2442 (`6b966912`) | clean | yes | **FAIL** (removed) | FAIL (removed) | none | same idea as #1787 | | #2286 (`97df7659`) | clean | no | **FAIL** (removed) | FAIL (removed) | none | allocation-size query only | | #1780 (`151fa7d7`) | clean | yes (pure fn) | **FAIL: access violation** (0xc0000005, the test process crashes) | FAIL (removed) | none | `fits`, but `view == 0` returns before the new check | | #2432 (`f7cb3f3e`) | clean | no | **FAIL: access violation**, same gap | FAIL (removed) | none | same gap as #1780, plus the allocation query | | **#2626** (`d1dc7ad4`) | clean | yes (3) | **pass**: host texture R8G8B8A8, both UAVs made | **pass**: host texture R8G8B8A8, RTV in 28 | none | R8G8B8A8 stand-in for writable 86/115 | | #2332 (`0e350ab1`) | conflict in `pc_format` (adjacent arms; kept `main`'s 118 to 120) | yes, **fails on main** (asserts `pc_format(118) == 45`, main now maps it to 20) | FAIL (removed) | pass (115 made as 86) | its own test | 115 reinterpreted as 86 | | #2305 (`dbce84b5`) | conflict: adjacent tests (kept both) | yes | FAIL (removed) | **FAIL**: its null view, `CreateRenderTargetView(None, None, ..)`, removes the device itself | none | null RTV | Not run: - #2636 only touches `capture.rs`: it decodes captures and cannot affect either half. - #55 is 591 commits behind and `make_texture` has been rewritten since (real conflict). - #89 has real conflicts in `descriptor/host.rs`, `list.rs` and `texture.rs`. It uses the same R8G8B8A8 widening idea as #2626. **Intel UHD** (local adapter hook), a selection: | | (a) | (b) | Suite | |---|---|---|---| | `main` | **FAIL**: no host texture (creation refused, device alive) | pass | 3 known (the 2 above, plus `a_texture_written_in_one_format_reads_in_another_through_a_placed_view`) | | #2462 | **FAIL**: no host texture (a view check cannot help) | pass | none | | #1832 | pass | pass | none | | #1843 + #1832 | pass | pass | none | | #2626 | pass (RGBA8) | pass (RGBA8, even though Intel renders 115: the stand-in needs both uses) | none | **WARP** (`--features diagnostics`, `VICTORY_D3D12_WARP=1`): `main`, #1843+#1832 and #2626 all pass both halves and the full suite (0 failures). The fixes are no-ops there because WARP stores to and renders 86 and 115. ### Semantic differences - **Dropping the UAV flag at creation** (#1832, #2319, #2459, #1926, #2180) gives a host texture without the permission. `fits` then refuses every UAV and the slot is null, so **a shader that stores to it writes nothing**. This is the only kind of (a) fix that also works on Intel, where `main` gets no texture at all. It also keeps the flag out of the plain description that `GetResourceAllocationInfo` sees (the debug-layer error quoted in this issue). Here, without the debug layer, that query did not remove the device. #2459's test asserts `!takes(86)` unconditionally, so by reading it would fail on hosts that store 86 (WARP, AMD). - **Refusing the view** (#1763, #1843, #2462, #1946) leaves the texture with the flag, which is legal through its cast list, and makes the slot null. Stores are dropped in the same way. This does not help Intel. #1780 and #2432 check only views that have a format, so a UAV without a description of a B5G5R5A1 texture still reaches `CreateUnorderedAccessView` and crashes the process on this RTX. - **Keeping the flag when a castable alias stores** (#1787, #2442) does not fix this bug. `castable(86)` always contains R16_* formats, so the flag stays and the UAV in 86 is still made. - **#2626 substitutes the format** instead of dropping a use. Writable 86/115 textures become R8G8B8A8_UNORM, and UAVs and RTVs are real views, so stores and draws land. Uploads and readbacks are converted on the CPU. GPU copies and resolves between a stand-in and a texture in the packed layout are skipped with a one-time warning (a stated shortcut). It is the largest change (8 files) and uses 2x memory for those textures. - **#2332** renders because 86 is renderable, but the 4-4-4-4 bits are read as 5-5-5-1. Alpha collapses to 1 bit, and texels the title uploads or reads back come out with wrong colours. 86 still has no typed UAV, so (a) remains. ### Recommendation - **#2626 is the only PR that fixes both halves with working writes**, on the RTX, on Intel, and as a no-op on WARP, with no new suite failures. - I suggest pairing it with **#1763** as a general guard for any other format without typed stores (B5G6R5 is in the same position on both cards). #1763 conflicts with #2626 in `fits` because #2626 removes `typed_store`. I resolved it by keeping #1763's check and defining `typed_store(f)` as `crate::resource::format_support(f).contains(D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW)`. With that, **#2626 + #1763 pass both halves on the RTX and the suite shows only the 2 known failures**. - If you would rather not take #2626's conversion code yet, **#1832 + #1763** is the smallest pair that stops (a) on NVIDIA and Intel. It drops the writes, though, and (b) stays broken: no other PR makes the 115 target renderable on NVIDIA. - These PRs do not fix this bug as written: #1787, #2442, #2286 (alone), #1780 and #2432 (the access violation above), #2305 (its null RTV removes the device) and #2636 (unrelated). ### Reproduce ```sh git fetch https://github.com/KainanP/VIctory test/1753-packed-format-repro git cherry-pick c2fce178 # onto main, or onto main with a PR merged # each half in its own process (a removed device ends the shared host) cargo test -p victory-gpu --lib -- --exact resource::tests::nvidia_1753_b5g5r5a1_texture_asking_for_unordered_access --nocapture cargo test -p victory-gpu --lib -- --exact resource::tests::nvidia_1753_b4g4r4a4_colour_target --nocapture # regressions cargo test -p victory-gpu -- --skip heap_direct_texture_reads_mark_their_heap_index --skip nvidia_1753_ # WARP VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics -- ... ``` The Intel runs used a local adapter-selection hook (`VICTORY_TEST_ADAPTER=Intel`) that is not upstream. The format table came from a throwaway test that calls `CheckFeatureSupport` and a plain `CreateCommittedResource` on every DXGI adapter plus WARP. Tested with the help of an AI assistant (Claude Code).
Author
Owner

@⁠MoonYueya on GitHub · 2026-11-25 22:19 UTC · original

Follow-up on 13f91cae: 83 commits later, the pre-menu device removal is unchanged

Summary

At 13f91caee25f2fdf2c062be5f7a27f058e51cbca the title still removes the device before any menu appears. Two runs, same binary, same linked overlay, same title executable:

run switches wall exit max frame reached world
A none 15 s 0x887A0005 128 no
B VICTORY_D3D12_DEBUG=1 GBV=1 DRED=1 14 s 0x887A0005 64 no

The debug-layer timeline (run B, microseconds):

...51.747225  id=817  CreateCommittedResource3   CLEAR_VALUE::Format B4G4R4A4_UNORM
...51.747242  id=599  CreateCommittedResource    B4G4R4A4_UNORM cannot be a render target
...51.747248  id=599  GetResourceAllocationInfo  B5G5R5A1_UNORM cannot be a UAV
...51.747254  id=342  CreateUnorderedAccessView  B5G5R5A1_UNORM cannot be a typed UAV   <- first fatal
...51.747257  id=232  RemoveDevice               DXGI_ERROR_INVALID_CALL                <- 3 us later

DRED breadcrumbs are empty, so this is a CPU-side invalid call.

What did not move across the 83 commits

This is the part I think is worth recording, because a lot of GPU work landed in this range (heap/view/descriptor rework, texture placement, copy tracking) and yet:

counter 940d32f6 13f91cae
title slot past the host heap 310,720 310,720
host view heap capped at 1000000 1 1
no host texture 1 1
no room for the null buffer views 2 2
debug ids seen 1016, 1419, 645×3, 971, 817, 599×2, 342, 232 identical

And the two code sites behind the two loudest ids are untouched:

  • id 645: const PORTABLE_VIEWS: u32 = 1_000_000; (crates/victory-gpu/src/descriptor/host.rs:87) — unchanged.
  • id 1419: D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED is still set unconditionally (pipeline/host.rs:784, victory-shader/src/emit/host.rs:255) with no matching sampler-heap bind.

I also checked whether the two open proposals that address the fatal call have landed: they have not. fits() still short-circuits a format-less view with return !typeless; (host.rs:1295), without consulting typed_store(); and resource.rs contains no stripping of ALLOW_UNORDERED_ACCESS.

What I could and could not test

I ported those two proposals locally (never pushed) onto 13f91cae — the format-less-view guard change plus the flag strip. With the patch the device is no longer removed: two 600 s runs completed with deviceRemoved=0, panic=0, 0 untranslated shaders, a steady 30 fps and max frame 16384.

But they did not reach the world, so this is not evidence that the port fixes playability. Both runs came to rest on the account-picker screen and stayed there for the remaining ~16 minutes (frame fingerprint unchanged from frame 2048 to frame 16384). That is my input script's shortcoming, not a claim about the title.

Consequently, everything world-side is untested here: the frame rate, the two material pixel programs, and audio. I am reporting this only so the "did the patch work?" question is not read as answered.

Reproduction

  1. cargo build --profile diag -p victory --features diagnostics
  2. Run with VICTORY_D3D12_DEBUG=1 (add GBV=1 DRED=1 for the ids above).
  3. Watch the InfoQueue callback output for ids 342 and 232.

Input was fully automated: the title reads its key timeline from an environment variable inside its own process; no synthetic input was sent to the desktop and no window was brought to the foreground.

Machine: NVIDIA RTX 3080 10 GB, driver 32.0.16.1742; AMD Ryzen 7 7700; 31.1 GB RAM; Windows 11 build 26300. TDR settings at OS defaults.

Written with AI assistance: the builds, runs and log analysis were carried out by an AI agent on the author's machine.

**@⁠MoonYueya** on GitHub · 2026-11-25 22:19 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7176213319) Follow-up on `13f91cae`: 83 commits later, the pre-menu device removal is unchanged ## Summary At `13f91caee25f2fdf2c062be5f7a27f058e51cbca` the title still removes the device before any menu appears. Two runs, same binary, same linked overlay, same title executable: | run | switches | wall | exit | max frame | reached world | |---|---|---|---|---|---| | A | none | **15 s** | `0x887A0005` | 128 | no | | B | `VICTORY_D3D12_DEBUG=1 GBV=1 DRED=1` | **14 s** | `0x887A0005` | 64 | no | The debug-layer timeline (run B, microseconds): ``` ...51.747225 id=817 CreateCommittedResource3 CLEAR_VALUE::Format B4G4R4A4_UNORM ...51.747242 id=599 CreateCommittedResource B4G4R4A4_UNORM cannot be a render target ...51.747248 id=599 GetResourceAllocationInfo B5G5R5A1_UNORM cannot be a UAV ...51.747254 id=342 CreateUnorderedAccessView B5G5R5A1_UNORM cannot be a typed UAV <- first fatal ...51.747257 id=232 RemoveDevice DXGI_ERROR_INVALID_CALL <- 3 us later ``` DRED breadcrumbs are empty, so this is a CPU-side invalid call. ## What did not move across the 83 commits This is the part I think is worth recording, because a lot of GPU work landed in this range (heap/view/descriptor rework, texture placement, copy tracking) and yet: | counter | 940d32f6 | 13f91cae | |---|---|---| | `title slot past the host heap` | 310,720 | **310,720** | | `host view heap capped at 1000000` | 1 | **1** | | `no host texture` | 1 | **1** | | `no room for the null buffer views` | 2 | **2** | | debug ids seen | 1016, 1419, 645×3, 971, 817, 599×2, 342, 232 | **identical** | And the two code sites behind the two loudest ids are untouched: * id 645: `const PORTABLE_VIEWS: u32 = 1_000_000;` (`crates/victory-gpu/src/descriptor/host.rs:87`) — unchanged. * id 1419: `D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED` is still set unconditionally (`pipeline/host.rs:784`, `victory-shader/src/emit/host.rs:255`) with no matching sampler-heap bind. I also checked whether the two open proposals that address the fatal call have landed: **they have not**. `fits()` still short-circuits a format-less view with `return !typeless;` (`host.rs:1295`), without consulting `typed_store()`; and `resource.rs` contains no stripping of `ALLOW_UNORDERED_ACCESS`. ## What I could and could not test I ported those two proposals locally (never pushed) onto `13f91cae` — the format-less-view guard change plus the flag strip. With the patch the device is no longer removed: two 600 s runs completed with `deviceRemoved=0`, `panic=0`, 0 untranslated shaders, a steady 30 fps and max frame 16384. **But they did not reach the world**, so this is not evidence that the port fixes playability. Both runs came to rest on the account-picker screen and stayed there for the remaining ~16 minutes (frame fingerprint unchanged from frame 2048 to frame 16384). That is my input script's shortcoming, not a claim about the title. Consequently, everything world-side is untested here: the frame rate, the two material pixel programs, and audio. I am reporting this only so the "did the patch work?" question is not read as answered. ## Reproduction 1. `cargo build --profile diag -p victory --features diagnostics` 2. Run with `VICTORY_D3D12_DEBUG=1` (add `GBV=1 DRED=1` for the ids above). 3. Watch the InfoQueue callback output for ids 342 and 232. Input was fully automated: the title reads its key timeline from an environment variable inside its own process; no synthetic input was sent to the desktop and no window was brought to the foreground. Machine: NVIDIA RTX 3080 10 GB, driver 32.0.16.1742; AMD Ryzen 7 7700; 31.1 GB RAM; Windows 11 build 26300. TDR settings at OS defaults. *Written with AI assistance: the builds, runs and log analysis were carried out by an AI agent on the author's machine.*
Author
Owner

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

Closing as fixed on main, as the triage above says. #1273 and ea488a9 (#2462) check every typed unordered view against the format it is made in. The B5G5R5A1_UNORM view is now refused and its slot stays null, so it no longer reaches CreateUnorderedAccessView.

Checked on the RTX 5080 (driver 32.0.16.1742) with plain main 63bcca4: a diag build, run with VICTORY_D3D12_DEBUG=1 and VICTORY_D3D12_DRED=1, nothing else added.

  • 34 s after start, the view is refused (an unordered view in a format the host cannot store, once).
  • The debug layer reports no typed UAV error (id 342), and the device is not removed.
  • The run stayed in the menus for 17 minutes, then went into the world and ran there for about 3 minutes, until I stopped it (frame 30,378). Before these changes, main removed the device on this card about 6 s after start, before any menu.

The B4G4R4A4_UNORM render target (debug id 599) is a separate failure, tracked in #735 and #2563.

AI-assisted.

**@⁠JurajSimicevic** on GitHub · 2026-11-26 11:34 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7190900906) Closing as fixed on `main`, as the triage above says. #1273 and ea488a9 (#2462) check every typed unordered view against the format it is made in. The `B5G5R5A1_UNORM` view is now refused and its slot stays null, so it no longer reaches `CreateUnorderedAccessView`. Checked on the RTX 5080 (driver 32.0.16.1742) with plain `main` `63bcca4`: a diag build, run with `VICTORY_D3D12_DEBUG=1` and `VICTORY_D3D12_DRED=1`, nothing else added. - 34 s after start, the view is refused (`an unordered view in a format the host cannot store`, once). - The debug layer reports no typed UAV error (id 342), and the device is not removed. - The run stayed in the menus for 17 minutes, then went into the world and ran there for about 3 minutes, until I stopped it (frame 30,378). Before these changes, `main` removed the device on this card about 6 s after start, before any menu. The `B4G4R4A4_UNORM` render target (debug id 599) is a separate failure, tracked in #735 and #2563. AI-assisted.
Author
Owner

@⁠zdaniukdmitry on GitHub · 2026-11-26 16:49 UTC · original

Confirmed on a desktop RTX 4060 (8 GB, driver 610.88, Windows 11 26300), plain main
63bcca4, no local changes, title 1.0.2.1: the boot-time removal is gone. Menus run at
30 fps; the world is reached and drawn (3.9k–5.3k draws/frame). A 10-minute run had no
device removal and an empty crashes.log, and it played through the intro into the
prologue — sound is there, but the picture stays almost black apart from credits and
subtitles (the black-world side of that belongs in #71). Before this fix the same card
died on the first submission with B4G4R4A4_UNORM as a clear value and
B5G5R5A1_UNORM as a typed UAV, which I had worked around by mapping 85/86/115 to
B8G8R8A8_UNORM locally — that workaround is no longer needed.

Still refused on this card: compute pipelines needing wave64 (host pipeline refused 0x80070057), as in #2220.

Assembled with an AI assistant from local logs; I reviewed the text.

**@⁠zdaniukdmitry** on GitHub · 2026-11-26 16:49 UTC · [original](https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7198152294) Confirmed on a desktop RTX 4060 (8 GB, driver 610.88, Windows 11 26300), plain `main` `63bcca4`, no local changes, title 1.0.2.1: the boot-time removal is gone. Menus run at 30 fps; the world is reached and drawn (3.9k–5.3k draws/frame). A 10-minute run had no device removal and an empty `crashes.log`, and it played through the intro into the prologue — sound is there, but the picture stays almost black apart from credits and subtitles (the black-world side of that belongs in #71). Before this fix the same card died on the first submission with `B4G4R4A4_UNORM` as a clear value and `B5G5R5A1_UNORM` as a typed UAV, which I had worked around by mapping 85/86/115 to `B8G8R8A8_UNORM` locally — that workaround is no longer needed. Still refused on this card: compute pipelines needing wave64 (`host pipeline refused 0x80070057`), as in #2220. Assembled with an AI assistant from local logs; I reviewed the text.
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#1753
No description provided.