GPU: a UAV-flagged B5G5R5A1_UNORM texture removes the device on NVIDIA (main 940d32f, four runs, two cards) #1967

Closed
opened 2026-11-26 04:50:20 +00:00 by github-bot · 1 comment
Owner

@⁠MD5Visual on GitHub · 2026-11-25 01:54 UTC · original

On main 940d32f the world load ends in a device removal on NVIDIA, and the debug layer names the call. Same binary, two different NVIDIA cards, four runs, one failure.

Machine: Windows 11 Pro 26200, Ryzen 7 5800X3D, 64 GB, driver 32.0.16.1088 (610.88). Two adapters in this box: RTX 3090 24 GB and RTX 2070 SUPER 8 GB (the display adapter). Title is 1.0.2.1, blake3 b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93, version 930.048.020-vb_sub_story, TitleID 7952987A.

Build: 940d32f, diagnostics profile (--features diagnostics), no VICTORY_SHADER_LOOP_LIMIT, no VICTORY_SKIP_WAVE64, no DRED except where noted. --console default. Menus and first-boot flow run normally at 30 fps up to about frame 128.

One local-only patch, disclosed: the host device is created on an adapter chosen by name from EnumAdapters1, because D3D12CreateDevice(None, ...) takes the display adapter here and I wanted the 3090 as well as the 2070 SUPER. Nothing else is patched.

What happens

card switches ended at
RTX 3090 none 49.2 s
RTX 3090 debug layer 45.7 s
RTX 2070 SUPER none 49.1 s
RTX 2070 SUPER none (repeat) 48.7 s

All four end with:

host GPU device removed after a submission of 1 lists; no breadcrumbs
(The specified device interface or feature level is not supported on this system. (0x887A0004));
device removed: The application made a call that is invalid ... (0x887A0001);
debug layer: 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. FeatureLevel is D3D_FEATURE_LEVEL_12_2.
  D3D12_RESOURCE_DESC::Format is B5G5R5A1_UNORM.

So the failing call is an allocation query for a texture that carries the UAV flag in B5G5R5A1_UNORM (86), and the device goes away rather than any call returning an error.

Run-up in the same frame range

  • frame 128 presented, 192/192 draws and 64/64 dispatches, then frame saved.
  • twice: a title texture was released while a list not yet reset names its host copy - 3840x2160 format 28 flags 3145729, and 3840x2160 format 19 flags 2.
  • the host refuses castable formats ... (0x80070057), and no host texture for a 2560x1440 format 115 (B4G4R4A4_UNORM) with flags 1.
  • seven large buffer copied to the host (22-50 MB each).
  • three an unordered view of a depth texture, made on its writable twin (console 19 view 41; console 118 view 62 plane 1; console 118 view 56 plane 0).

The 3090 and the 2070 SUPER produce the same warnings in the same order, so this is not a memory-size or architecture limit.

Where I would look

I only read the tree, I have not run a debugger. In crates/victory-gpu/src/resource.rs:

  • castable() (line 1080) and castable_formats_share_the_element (1945) - the format families used when one host texture is exposed in several formats.
  • the host texture creation path around 1191-1262, which builds castable_formats when d.flags & DEPTH == 0, calls CreateCommittedResource, and on refusal logs the host refuses castable formats and retries without them.
  • GetResourceAllocationInfo at 801 and 1119 - the two places an allocation size is asked for from a descriptor.

twin.rs cannot be the source of this one: its plane_formats() only yields R32/R16/R8 families and its scratch resource is a buffer, so neither can be B5G5R5A1_UNORM.

The question

Is the intended behaviour here "keep the title's UAV flag only where the host format can be UAV, otherwise substitute a format that can be (as #89 does for render targets) or drop the flag"? If so, B5G5R5A1_UNORM (86) and B4G4R4A4_UNORM (115) both need that treatment on NVIDIA, and the guard has to happen before the allocation query, because after it the device is already gone.

Logs, target dumps and crash logs are local; I can paste any excerpt. Nothing has been uploaded anywhere.

**@⁠MD5Visual** on GitHub · 2026-11-25 01:54 UTC · [original](https://github.com/Marvisak/VIctory/issues/1967) On `main` `940d32f` the world load ends in a device removal on NVIDIA, and the debug layer names the call. Same binary, two different NVIDIA cards, four runs, one failure. **Machine**: Windows 11 Pro 26200, Ryzen 7 5800X3D, 64 GB, driver 32.0.16.1088 (610.88). Two adapters in this box: RTX 3090 24 GB and RTX 2070 SUPER 8 GB (the display adapter). Title is 1.0.2.1, blake3 `b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93`, version `930.048.020-vb_sub_story`, TitleID `7952987A`. **Build**: `940d32f`, diagnostics profile (`--features diagnostics`), no `VICTORY_SHADER_LOOP_LIMIT`, no `VICTORY_SKIP_WAVE64`, no DRED except where noted. `--console` default. Menus and first-boot flow run normally at 30 fps up to about frame 128. **One local-only patch**, disclosed: the host device is created on an adapter chosen by name from `EnumAdapters1`, because `D3D12CreateDevice(None, ...)` takes the display adapter here and I wanted the 3090 as well as the 2070 SUPER. Nothing else is patched. ## What happens | card | switches | ended at | |---|---|---| | RTX 3090 | none | 49.2 s | | RTX 3090 | debug layer | 45.7 s | | RTX 2070 SUPER | none | 49.1 s | | RTX 2070 SUPER | none (repeat) | 48.7 s | All four end with: ``` host GPU device removed after a submission of 1 lists; no breadcrumbs (The specified device interface or feature level is not supported on this system. (0x887A0004)); device removed: The application made a call that is invalid ... (0x887A0001); debug layer: 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. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_RESOURCE_DESC::Format is B5G5R5A1_UNORM. ``` So the failing call is an allocation query for a texture that carries the UAV flag in `B5G5R5A1_UNORM` (86), and the device goes away rather than any call returning an error. ## Run-up in the same frame range - frame 128 presented, 192/192 draws and 64/64 dispatches, then `frame saved`. - twice: `a title texture was released while a list not yet reset names its host copy` - 3840x2160 format 28 flags 3145729, and 3840x2160 format 19 flags 2. - `the host refuses castable formats ... (0x80070057)`, and `no host texture` for a 2560x1440 **format 115** (`B4G4R4A4_UNORM`) with flags 1. - seven `large buffer copied to the host` (22-50 MB each). - three `an unordered view of a depth texture, made on its writable twin` (console 19 view 41; console 118 view 62 plane 1; console 118 view 56 plane 0). The 3090 and the 2070 SUPER produce the same warnings in the same order, so this is not a memory-size or architecture limit. ## Where I would look I only read the tree, I have not run a debugger. In `crates/victory-gpu/src/resource.rs`: - `castable()` (line 1080) and `castable_formats_share_the_element` (1945) - the format families used when one host texture is exposed in several formats. - the host texture creation path around 1191-1262, which builds `castable_formats` when `d.flags & DEPTH == 0`, calls `CreateCommittedResource`, and on refusal logs `the host refuses castable formats` and retries without them. - `GetResourceAllocationInfo` at 801 and 1119 - the two places an allocation size is asked for from a descriptor. `twin.rs` cannot be the source of this one: its `plane_formats()` only yields R32/R16/R8 families and its scratch resource is a buffer, so neither can be `B5G5R5A1_UNORM`. ## The question Is the intended behaviour here "keep the title's UAV flag only where the host format can be UAV, otherwise substitute a format that can be (as #89 does for render targets) or drop the flag"? If so, `B5G5R5A1_UNORM` (86) and `B4G4R4A4_UNORM` (115) both need that treatment on NVIDIA, and the guard has to happen before the allocation query, because after it the device is already gone. Logs, target dumps and crash logs are local; I can paste any excerpt. Nothing has been uploaded anywhere.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:50:20 +00:00
Author
Owner

@⁠MD5Visual on GitHub · 2026-11-25 02:00 UTC · original

Duplicate of #1952, and the removal has an owner: #1832 (drop the unordered-access permission a format cannot carry, before any call names it).

#1952 is the same failure chain on NVIDIA: the B5G5R5A1_UNORM UAV-flagged texture refused at GetResourceAllocationInfo, the device removed a second later with 0x887A0004 / 0x887A0001 and no breadcrumbs. My four runs (3090 and 2070 SUPER, 940d32f) are in that thread with the debug-layer text, together with the one detail this report adds: the removal arrives without the host view heap capped at 1000000 and title slot past the host heap lines, so those are a separate symptom (#1779) and not a precondition for this one.

Measurement moved to #1952. Closing this to keep one thread per symptom.

**@⁠MD5Visual** on GitHub · 2026-11-25 02:00 UTC · [original](https://github.com/Marvisak/VIctory/issues/1967#issuecomment-7150209737) Duplicate of #1952, and the removal has an owner: **#1832** (drop the unordered-access permission a format cannot carry, before any call names it). #1952 is the same failure chain on NVIDIA: the `B5G5R5A1_UNORM` UAV-flagged texture refused at `GetResourceAllocationInfo`, the device removed a second later with `0x887A0004` / `0x887A0001` and no breadcrumbs. My four runs (3090 and 2070 SUPER, `940d32f`) are in that thread with the debug-layer text, together with the one detail this report adds: the removal arrives **without** the `host view heap capped at 1000000` and `title slot past the host heap` lines, so those are a separate symptom (#1779) and not a precondition for this one. Measurement moved to https://git.gtahub.st/github/Marvisak--VIctory/issues/1952. Closing this to keep one thread per symptom.
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#1967
No description provided.