GPU: refuse typed UAVs in unsupported formats regardless of family or castability #1763

Open
github-bot wants to merge 4 commits from github-bot/gh-1763 into main AGit
Owner

@⁠n-romanovich on GitHub · 2026-11-24 22:09 UTC · original
n-romanovich:fix/typed-uav-format-support → main · +108 −0 · 1 files · 4 commits · open

Fixes #1753
Fixes #1754

Related: #1755, #1758

fits() in crates/victory-gpu/src/descriptor/host.rs previously checked typed_store() only when cast && family(view) != family(own). When a typed UAV used the texture's own format, a default view (view == 0), or a same-family cast (such as B5G5R5A1_UNORM), CreateUnorderedAccessView was still called on formats without D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW, triggering DXGI_ERROR_INVALID_CALL (0x887A0001) on NVIDIA.

  • Always check typed_store() for unordered == true in fits(), including view == 0 and same-family/non-castable targets.
  • Add synthetic unit test unsupported_typed_uav_format_is_refused.

AI-assisted; verified with cargo test -p victory-gpu --locked -- unsupported_typed_uav_format_is_refused and cargo build --release --locked -p victory on Windows 11 / RTX 5060 Ti.

**@⁠n-romanovich** on GitHub · 2026-11-24 22:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763) `n-romanovich:fix/typed-uav-format-support` → `main` · +108 −0 · 1 files · 4 commits · open Fixes #1753 Fixes #1754 Related: #1755, #1758 `fits()` in `crates/victory-gpu/src/descriptor/host.rs` previously checked `typed_store()` only when `cast && family(view) != family(own)`. When a typed UAV used the texture's own format, a default view (`view == 0`), or a same-family cast (such as `B5G5R5A1_UNORM`), `CreateUnorderedAccessView` was still called on formats without `D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW`, triggering `DXGI_ERROR_INVALID_CALL` (`0x887A0001`) on NVIDIA. - Always check `typed_store()` for `unordered == true` in `fits()`, including `view == 0` and same-family/non-castable targets. - Add synthetic unit test `unsupported_typed_uav_format_is_refused`. AI-assisted; verified with `cargo test -p victory-gpu --locked -- unsupported_typed_uav_format_is_refused` and `cargo build --release --locked -p victory` on Windows 11 / RTX 5060 Ti.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:43:52 +00:00
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-24 22:12 UTC · original

VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

**@⁠DesertGamer** on GitHub · 2026-11-24 22:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7145934043) ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Author
Owner

@⁠WillyboPeep on GitHub · 2026-11-24 22:23 UTC · original

Tested on an RTX 4090 (Ada, 32-lane waves, driver 621.01), Windows 11 build 26300, 32 GB RAM. 70564ae + this PR (ca168de), cargo build --release --locked -p victory, shader cache and pipeline library warmed first with translate --cache --pipelines (25,669 shaders translated, 316 refused; 26,664 of 28,164 pack pipelines in the library). Title 1.0.2.1, Series X profile, scripted Enter presses.

unsupported_typed_uav_format_is_refused passes on this card.

Build Result
70564ae device removed, DXGI_ERROR_INVALID_CALL (0x887A0001) after a submission of 1 list, 28 s after start, during the boot screens
70564ae + #1763 the format is refused once (an unordered view in a format the host cannot store target=86 own=86); boot, menus and loading run at 30 fps and the world is reached about 76 s after start

So on this card it fixes the #1753 / #1754 removal.

What stops it next, about 13 s into the world: 1.2 then 0.4 fps with 2,587 to 3,013 draws dropped per frame, then slow host submission ms=3041 lists=25 (all compute pipelines), then the device is removed with 0x887A0006 (hung) after that submission of 25 lists. The NVIDIA driver logged two Error occurred on GPUID: 100 events (nvlddmkm 153) at the moment of the hang; there was no display-driver reset (no event 4101). The view heap is capped as in #1760 (host view heap capped at 1000000, title count 1,245,184, no room for the null buffer views, 310,720 title slot past the host heap warnings), so this looks like the world stall that #1760 traces to the capped heap, not something this PR adds.

Run and written up with Claude Code.

**@⁠WillyboPeep** on GitHub · 2026-11-24 22:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7146178097) Tested on an **RTX 4090** (Ada, 32-lane waves, driver 621.01), Windows 11 build 26300, 32 GB RAM. `70564ae` + this PR (`ca168de`), `cargo build --release --locked -p victory`, shader cache and pipeline library warmed first with `translate --cache --pipelines` (25,669 shaders translated, 316 refused; 26,664 of 28,164 pack pipelines in the library). Title 1.0.2.1, Series X profile, scripted Enter presses. `unsupported_typed_uav_format_is_refused` passes on this card. | Build | Result | |---|---| | `70564ae` | device removed, `DXGI_ERROR_INVALID_CALL` (0x887A0001) after a submission of 1 list, 28 s after start, during the boot screens | | `70564ae` + #1763 | the format is refused once (`an unordered view in a format the host cannot store target=86 own=86`); boot, menus and loading run at 30 fps and the world is reached about 76 s after start | So on this card it fixes the #1753 / #1754 removal. What stops it next, about 13 s into the world: 1.2 then 0.4 fps with 2,587 to 3,013 draws dropped per frame, then `slow host submission ms=3041 lists=25` (all compute pipelines), then the device is removed with `0x887A0006` (hung) after that submission of 25 lists. The NVIDIA driver logged two `Error occurred on GPUID: 100` events (nvlddmkm 153) at the moment of the hang; there was no display-driver reset (no event 4101). The view heap is capped as in #1760 (`host view heap capped at 1000000`, title count 1,245,184, `no room for the null buffer views`, 310,720 `title slot past the host heap` warnings), so this looks like the world stall that #1760 traces to the capped heap, not something this PR adds. Run and written up with Claude Code.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 22:30 UTC · original

Overlap for the reviewers: #1775 (22:20) and #1780 (22:25) make the same change as this PR (22:09). In descriptor::host::fits, check typed_store for every unordered view, not only one cast to another family, so the B5G5R5A1_UNORM UAV is refused on NVIDIA (#1753 / #1754). This one closes both issues; #1775 closes #1753, #1780 #1754. Only one can merge as is. From reading the three descriptions and file lists (all descriptor/host.rs); nothing built.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-24 22:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7146305486) Overlap for the reviewers: #1775 (22:20) and #1780 (22:25) make the same change as this PR (22:09). In `descriptor::host::fits`, check `typed_store` for every unordered view, not only one cast to another family, so the `B5G5R5A1_UNORM` UAV is refused on NVIDIA (#1753 / #1754). This one closes both issues; #1775 closes #1753, #1780 #1754. Only one can merge as is. From reading the three descriptions and file lists (all `descriptor/host.rs`); nothing built. AI-assisted (Claude Code).
Author
Owner

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

Tested ca168de on an RTX 5070 Ti (driver 32.0.16.1742), Windows 11, after translate --cache --pipelines. On plain 70564ae this machine removes the device 16 to 17 s after start (see #1753).

Run Duration B5G5R5A1 debug messages End
release, no debug layer 2m39s n/a past the account picker; device removed after 7 lists ("GPU will not respond to more commands"), frame rate 0.2 to 0.3 fps beforehand
diag, VICTORY_D3D12_DEBUG=1 7m53s 1 (CreateCommittedResource3 ALLOW_UNORDERED_ACCESS warning, non-fatal) no device removal; the title's own crash handler fired (Breakpad minidump, upload blocked by the net policy)

So the startup INVALID_CALL from #1753 is gone on this card. The later failures look like the existing NVIDIA problems rather than this PR: the diag run still logs 185 CreateComputeShader wave64 refusals and 182 UAV-state "invalid for use as a vertex buffer" messages, and the release run's late removal matches the cutscene hang seen on ffe310e.

One remaining debug-layer note on the same texture: CreateCommittedResource3 also warns that the D3D12_CLEAR_VALUE format is not valid as a render target when ALLOW_RENDER_TARGET is set.

**@⁠Ryanarcx2** on GitHub · 2026-11-24 22:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7146355961) Tested `ca168de` on an RTX 5070 Ti (driver 32.0.16.1742), Windows 11, after `translate --cache --pipelines`. On plain `70564ae` this machine removes the device 16 to 17 s after start (see #1753). | Run | Duration | B5G5R5A1 debug messages | End | |---|---|---|---| | release, no debug layer | 2m39s | n/a | past the account picker; device removed after 7 lists ("GPU will not respond to more commands"), frame rate 0.2 to 0.3 fps beforehand | | diag, `VICTORY_D3D12_DEBUG=1` | 7m53s | 1 (`CreateCommittedResource3` ALLOW_UNORDERED_ACCESS warning, non-fatal) | no device removal; the title's own crash handler fired (Breakpad minidump, upload blocked by the net policy) | So the startup INVALID_CALL from #1753 is gone on this card. The later failures look like the existing NVIDIA problems rather than this PR: the diag run still logs 185 `CreateComputeShader` wave64 refusals and 182 UAV-state "invalid for use as a vertex buffer" messages, and the release run's late removal matches the cutscene hang seen on `ffe310e`. One remaining debug-layer note on the same texture: `CreateCommittedResource3` also warns that the D3D12_CLEAR_VALUE format is not valid as a render target when ALLOW_RENDER_TARGET is set.
Author
Owner

@⁠n-romanovich on GitHub · 2026-11-24 22:36 UTC · original

All review feedback has been addressed in dbd4fc2:

  • fits() in crates/victory-gpu/src/descriptor/host.rs does not use a hardcoded format list — typed_store(format) queries ID3D12Device::CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT) on the live host device for D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW.
  • sRGB textures with ALLOW_UNORDERED_ACCESS are created typeless on the host in crates/victory-gpu/src/resource.rs, and fits() maps sRGB UAV view formats to their linear counterparts before calling typed_store, so valid sRGB/linear UAVs are not over-refused.
  • Added descriptor::host::tests::supported_typed_uav_formats_are_accepted to pin that supported typed UAV formats (R8G8B8A8_UNORM, R8G8B8A8_UINT, R8G8B8A8_UNORM_SRGB → R8G8B8A8_UNORM, and default/explicit UAVs on R32_UINT and R16G16B16A16_FLOAT) remain accepted while None on typeless is still refused.

Verified on Windows (dbd4fc2):

  • cargo test -p victory-gpu --locked -- descriptor::host::tests::supported_typed_uav_formats_are_accepted descriptor::host::tests::unsupported_typed_uav_format_is_refused — 2 passed, 0 failed.
**@⁠n-romanovich** on GitHub · 2026-11-24 22:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7146424662) All review feedback has been addressed in `dbd4fc2`: - `fits()` in `crates/victory-gpu/src/descriptor/host.rs` does not use a hardcoded format list — `typed_store(format)` queries `ID3D12Device::CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)` on the live host device for `D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW`. - sRGB textures with `ALLOW_UNORDERED_ACCESS` are created typeless on the host in `crates/victory-gpu/src/resource.rs`, and `fits()` maps sRGB UAV view formats to their linear counterparts before calling `typed_store`, so valid sRGB/linear UAVs are not over-refused. - Added `descriptor::host::tests::supported_typed_uav_formats_are_accepted` to pin that supported typed UAV formats (`R8G8B8A8_UNORM`, `R8G8B8A8_UINT`, `R8G8B8A8_UNORM_SRGB` → `R8G8B8A8_UNORM`, and default/explicit UAVs on `R32_UINT` and `R16G16B16A16_FLOAT`) remain accepted while `None` on typeless is still refused. Verified on Windows (`dbd4fc2`): - `cargo test -p victory-gpu --locked -- descriptor::host::tests::supported_typed_uav_formats_are_accepted descriptor::host::tests::unsupported_typed_uav_format_is_refused` — **2 passed, 0 failed**.
Author
Owner

@⁠AgneyaK on GitHub · 2026-11-24 22:55 UTC · original

Tested in the title on an RTX 3050 6 GB Laptop (driver 32.0.16.2124, Windows 11 26300): 70564ae + this PR (dbd4fc2, clean merge), diag build, VICTORY_D3D12_DRED=1, local NVIDIA-adapter patch.

  • Plain 70564ae removes the device (0x887A0001) right after frame 128 here.
  • With this PR: no removal in 5 minutes, frames 128 → 4,096 (the menus, about 15 fps). It logged an unordered view in a format the host cannot store target=86 own=86 once.

One run. Details and the comparison with a sampler-heap change: #1754

AI use: Claude Code (Claude Opus 5.5) ran the build and wrote this; the results are from the run described.

**@⁠AgneyaK** on GitHub · 2026-11-24 22:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7146803277) Tested in the title on an RTX 3050 6 GB Laptop (driver 32.0.16.2124, Windows 11 26300): `70564ae` + this PR (`dbd4fc2`, clean merge), diag build, `VICTORY_D3D12_DRED=1`, local NVIDIA-adapter patch. - Plain `70564ae` removes the device (`0x887A0001`) right after frame 128 here. - With this PR: **no removal in 5 minutes**, frames 128 → 4,096 (the menus, about 15 fps). It logged `an unordered view in a format the host cannot store target=86 own=86` once. One run. Details and the comparison with a sampler-heap change: https://git.gtahub.st/github/Marvisak--VIctory/issues/1754 AI use: Claude Code (Claude Opus 5.5) ran the build and wrote this; the results are from the run described.
Author
Owner

@⁠alexodee on GitHub · 2026-11-24 23:07 UTC · original

Another NVIDIA data point for this problem: RTX 3070 Ti Laptop 8 GB (driver 596.36, 32-lane waves), 16 GB RAM, Windows 11 26300, Series X mode, 70564ae, diag build, shader cache and pipeline library pre-built.

I tested my own local equivalent, not this PR's commit: in descriptor::host::fits, every unordered view whose final format fails typed_store is refused, including a view in the texture's own format.

build runs result
70564ae 6 of 6 device removed, 0x887A0001, about 40 s after start (frame 128 to ~200), before the profile screen was passed
70564ae + that check 7 of 7 no 0x887A0001; menus at 30 fps and the loading art are reached

Some of the runs also had local diagnostics (probes, per-list submission, reserved textures), so this is not a clean A/B beyond the view check itself.

Where the device goes. The debug layer is not installed here, so I checked GetDeviceRemovedReason after every descriptor call. The first failing call is the CreateUnorderedAccessView in make(), View::Unordered:

view:  format 86 (B5G5R5A1_UNORM), TEXTURE2D, mip 0
host:  2560x1440, 1 mip, format 86, flags 0x5 (RENDER_TARGET | UNORDERED_ACCESS)
title: format 86
castable: [49, 50, 51, 52, 54, 56, 57, 58, 59, 68, 69, 85, 115]

So it is the view in the texture's own family that gets past fits(): the existing typed_store check only covers castable views of another family. With the check, the log has one line, an unordered view in a format the host cannot store view=86 own=86, and the run goes on.

What this does not fix: later, as the world loads, this machine still loses the device with 0x887A0006 (one compute list run alone) or 0x887A0007 / 0x8007000E with memory nearly full. Those look like separate problems.

AI use: Claude Code (Claude Opus 5.5) did the diagnosis and wrote this; posted at the request of the person whose machine ran the tests.

**@⁠alexodee** on GitHub · 2026-11-24 23:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7147033010) Another NVIDIA data point for this problem: **RTX 3070 Ti Laptop 8 GB** (driver 596.36, 32-lane waves), 16 GB RAM, Windows 11 26300, Series X mode, `70564ae`, diag build, shader cache and pipeline library pre-built. **I tested my own local equivalent, not this PR's commit:** in `descriptor::host::fits`, every unordered view whose final format fails `typed_store` is refused, including a view in the texture's own format. | build | runs | result | |---|---|---| | `70564ae` | 6 of 6 | device removed, `0x887A0001`, about 40 s after start (frame 128 to ~200), before the profile screen was passed | | `70564ae` + that check | 7 of 7 | no `0x887A0001`; menus at 30 fps and the loading art are reached | Some of the runs also had local diagnostics (probes, per-list submission, reserved textures), so this is not a clean A/B beyond the view check itself. **Where the device goes.** The debug layer is not installed here, so I checked `GetDeviceRemovedReason` after every descriptor call. The first failing call is the `CreateUnorderedAccessView` in `make()`, `View::Unordered`: ``` view: format 86 (B5G5R5A1_UNORM), TEXTURE2D, mip 0 host: 2560x1440, 1 mip, format 86, flags 0x5 (RENDER_TARGET | UNORDERED_ACCESS) title: format 86 castable: [49, 50, 51, 52, 54, 56, 57, 58, 59, 68, 69, 85, 115] ``` So it is the view in the texture's own family that gets past `fits()`: the existing `typed_store` check only covers castable views of another family. With the check, the log has one line, `an unordered view in a format the host cannot store view=86 own=86`, and the run goes on. **What this does not fix:** later, as the world loads, this machine still loses the device with `0x887A0006` (one compute list run alone) or `0x887A0007` / `0x8007000E` with memory nearly full. Those look like separate problems. AI use: Claude Code (Claude Opus 5.5) did the diagnosis and wrote this; posted at the request of the person whose machine ran the tests.
Author
Owner

@⁠dragoso on GitHub · 2026-11-25 00:01 UTC · original

I tested this on a Blackwell card, and it clears the boot-time removal reported in #1754 and #1753.

Setup

  • RTX 5060 Ti 16 GB, driver 617.42, Windows 11 26300. DXGI adapter 0 is the 5060 Ti.
  • diag build with VICTORY_D3D12_DRED=1.
  • Shader cache and pipeline library warmed with translate --cache --pipelines on 70564ae.
  • The same scripted Enter presses in both runs.

main 70564ae

  • The device was removed about 12 s in, after a submission of 1 list, with no breadcrumbs: 0x887A0001 (INVALID_CALL).
  • The last frame presented was 128, the same frame as #1754.

This PR (dbd4fc2) on 70564ae

  • No INVALID_CALL. The run gets past frame 128, through the menus and the start screen, and on into loading.
  • About 2 min 20 s in, the device is removed with 0x887A0006 (HUNG), after 16 lists.
  • DRED stops at command 53 of 69 in list 5, a single dispatch between barriers: compute f607780aa8e502d0.
  • Slow submissions before that: 24, median 459 ms, max 5,685 ms. That looks like a separate GPU timeout, not a problem with this change.

The host view heap capped at 1000000 warning (#1760, #1808) appears in both runs.

No retail data, logs or screenshots are attached.

AI-assisted (Claude Code).

**@⁠dragoso** on GitHub · 2026-11-25 00:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7148055658) I tested this on a Blackwell card, and it clears the boot-time removal reported in #1754 and #1753. **Setup** - RTX 5060 Ti 16 GB, driver 617.42, Windows 11 26300. DXGI adapter 0 is the 5060 Ti. - `diag` build with `VICTORY_D3D12_DRED=1`. - Shader cache and pipeline library warmed with `translate --cache --pipelines` on `70564ae`. - The same scripted Enter presses in both runs. **main `70564ae`** - The device was removed about 12 s in, after a submission of 1 list, with no breadcrumbs: `0x887A0001` (INVALID_CALL). - The last frame presented was 128, the same frame as #1754. **This PR (`dbd4fc2`) on `70564ae`** - No INVALID_CALL. The run gets past frame 128, through the menus and the start screen, and on into loading. - About 2 min 20 s in, the device is removed with `0x887A0006` (HUNG), after 16 lists. - DRED stops at command 53 of 69 in list 5, a single dispatch between barriers: compute `f607780aa8e502d0`. - Slow submissions before that: 24, median 459 ms, max 5,685 ms. That looks like a separate GPU timeout, not a problem with this change. The `host view heap capped at 1000000` warning (#1760, #1808) appears in both runs. No retail data, logs or screenshots are attached. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:35 UTC · original · edited 2026-11-26 01:23 UTC

Automated triage for the maintainers.

Needs work. Thanks for rebasing; it merges cleanly now. After the rebase, though, the fix itself is no longer in this diff: main already checks typed_store for every typed unordered view in fits() (crates/victory-gpu/src/descriptor/host.rs), merged in #2462 (ea488a9). What this branch still adds are the two tests, unsupported_typed_uav_format_is_refused and supported_typed_uav_formats_are_accepted. main has no test for fits(), so they have value, in particular the sRGB-to-linear mapping and the typeless-without-format refusal.

To make it mergeable as what it now is: retitle it and rewrite the description as tests for fits() (drop "Fixes #1753/#1754", since #2462 fixed those). Otherwise it can be closed as already in main.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7149731673) · edited 2026-11-26 01:23 UTC <!-- victory-triage v1 head=419cd13a63e37103b82ffb2fd63456c553a40d77 verdict=needs-work at=2026-11-26T01:23:54Z --> Automated triage for the maintainers. **Needs work.** Thanks for rebasing; it merges cleanly now. After the rebase, though, the fix itself is no longer in this diff: `main` already checks `typed_store` for every typed unordered view in `fits()` (`crates/victory-gpu/src/descriptor/host.rs`), merged in #2462 (`ea488a9`). What this branch still adds are the two tests, `unsupported_typed_uav_format_is_refused` and `supported_typed_uav_formats_are_accepted`. `main` has no test for `fits()`, so they have value, in particular the sRGB-to-linear mapping and the typeless-without-format refusal. To make it mergeable as what it now is: retitle it and rewrite the description as tests for `fits()` (drop "Fixes #1753/#1754", since #2462 fixed those). Otherwise it can be closed as already in `main`. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠n-romanovich on GitHub · 2026-11-25 01:44 UTC · original

@⁠Marvisak, rebased onto the current main and resolved the conflict in crates/victory-gpu/src/descriptor/host.rs.

**@⁠n-romanovich** on GitHub · 2026-11-25 01:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7149909336) @⁠Marvisak, rebased onto the current main and resolved the conflict in crates/victory-gpu/src/descriptor/host.rs.
Author
Owner

@⁠Ryanarcx2 on GitHub · 2026-11-25 05:38 UTC · original

Retested the rebased head 50d91b1 (on main 940d32f) on an RTX 5070 Ti (driver 32.0.16.1742), Windows 11 26200, Ryzen 7 9800X3D. Same shader cache and pipeline library as my earlier run; TdrDelay at the default (not set).

Build Lasted End
main 940d32f, release 16 s 0x887A0001 after a submission of 1 list, right after no host texture ... format: 115 (same as #1753)
this PR 50d91b1, release 3 min 23 s 0x887A0006 (hung) after 30 lists
this PR 50d91b1, release (2nd run) 2 min 44 s 0x887A0006 after 26 lists
this PR 50d91b1, diag --features diagnostics, VICTORY_D3D12_DEBUG=1, VICTORY_D3D12_DRED=1 1 min 53 s DXGI_ERROR_DEVICE_HUNG after 27 lists

So the boot-time removal is still fixed on top of current main. The format is refused once (an unordered view in a format the host cannot store target=86 own=86) and the run reaches world loading (story000_restofworld). With the debug layer on, no B5G5R5A1_UNORM typed-UAV error is logged.

What stops it next looks unrelated to this PR. Frame rate drops to 0.2-0.3 fps, submissions take about 2.8 s each (max 3.3 s), up to ~1,500 draws/frame are dropped, then the device hangs. The NVIDIA driver logs nvlddmkm event 153 three times at the moment of each hang, but there's no display-driver reset. host view heap capped at 1000000 with 310,720 title slot past the host heap warnings in every run (#1760).

The diag run's DRED breadcrumbs show exactly one list in progress: stopped at command 156 of 158, between barriers, a single dispatch 16x16x16 of compute 00167d58cc5a78d7. The 15 lists after it had not started. That shader had already been bound and run in several earlier, completed submissions (first bind about 40 s before the hang), so it does not hang every time.

Debug-layer messages in that run (692 total, none naming the hang):

  • 169 CreateComputeShader: wants wave lane count 64, device max is 32 (#578 / #223); the hung shader is not among the ones I can match to these
  • 225 transition-barrier before-state mismatches, mostly on 768x768 depth textures and their depth twins
  • 5 CreateDescriptorHeap: NumDescriptors 2,097,152, limit for shader-visible view heaps is 1,000,000
  • 1 SetComputeRootSignature: SetDescriptorHeaps must be called to bind a sampler descriptor before setting a root signature with SAMPLER_HEAP_DIRECTLY_INDEXED
  • 1 CreateCommittedResource3: the D3D12_CLEAR_VALUE format (B4G4R4A4_UNORM) is not valid as a render target with ALLOW_RENDER_TARGET set (the 2560x1440 format-115 texture that still gets no host texture)

The last point is a separate issue this PR doesn't try to fix, but it is still on the same texture. Logs available if anyone wants specific lines.

AI-assisted (Claude Code); the runs are mine.

**@⁠Ryanarcx2** on GitHub · 2026-11-25 05:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7153991466) Retested the rebased head `50d91b1` (on `main` `940d32f`) on an RTX 5070 Ti (driver 32.0.16.1742), Windows 11 26200, Ryzen 7 9800X3D. Same shader cache and pipeline library as my earlier run; TdrDelay at the default (not set). | Build | Lasted | End | |---|---|---| | `main` `940d32f`, release | 16 s | `0x887A0001` after a submission of 1 list, right after `no host texture ... format: 115` (same as #1753) | | this PR `50d91b1`, release | 3 min 23 s | `0x887A0006` (hung) after 30 lists | | this PR `50d91b1`, release (2nd run) | 2 min 44 s | `0x887A0006` after 26 lists | | this PR `50d91b1`, `diag --features diagnostics`, `VICTORY_D3D12_DEBUG=1`, `VICTORY_D3D12_DRED=1` | 1 min 53 s | `DXGI_ERROR_DEVICE_HUNG` after 27 lists | So the boot-time removal is still fixed on top of current `main`. The format is refused once (`an unordered view in a format the host cannot store target=86 own=86`) and the run reaches world loading (`story000_restofworld`). With the debug layer on, no `B5G5R5A1_UNORM` typed-UAV error is logged. What stops it next looks unrelated to this PR. Frame rate drops to 0.2-0.3 fps, submissions take about 2.8 s each (max 3.3 s), up to ~1,500 draws/frame are dropped, then the device hangs. The NVIDIA driver logs `nvlddmkm` event 153 three times at the moment of each hang, but there's no display-driver reset. `host view heap capped at 1000000` with 310,720 `title slot past the host heap` warnings in every run (#1760). The diag run's DRED breadcrumbs show exactly one list in progress: stopped at command 156 of 158, between barriers, a single `dispatch 16x16x16` of compute `00167d58cc5a78d7`. The 15 lists after it had not started. That shader had already been bound and run in several earlier, completed submissions (first bind about 40 s before the hang), so it does not hang every time. Debug-layer messages in that run (692 total, none naming the hang): - 169 `CreateComputeShader`: wants wave lane count 64, device max is 32 (#578 / #223); the hung shader is not among the ones I can match to these - 225 transition-barrier before-state mismatches, mostly on 768x768 depth textures and their `depth twin`s - 5 `CreateDescriptorHeap`: NumDescriptors 2,097,152, limit for shader-visible view heaps is 1,000,000 - 1 `SetComputeRootSignature`: SetDescriptorHeaps must be called to bind a sampler descriptor before setting a root signature with `SAMPLER_HEAP_DIRECTLY_INDEXED` - 1 `CreateCommittedResource3`: the `D3D12_CLEAR_VALUE` format (`B4G4R4A4_UNORM`) is not valid as a render target with `ALLOW_RENDER_TARGET` set (the 2560x1440 format-115 texture that still gets `no host texture`) The last point is a separate issue this PR doesn't try to fix, but it is still on the same texture. Logs available if anyone wants specific lines. AI-assisted (Claude Code); the runs are mine.
Author
Owner

@⁠nathanbzrr on GitHub · 2026-11-25 06:40 UTC · original

AMD RDNA3 + D3D12 Debug Layer + WARP test report for 50d91b19 (rebased onto main 940d32f):

Environment

  • Windows 11 10.0.26340 x64, rustc 1.98.1 (x86_64-pc-windows-msvc)
  • GPU: AMD Radeon RX 7600 (RDNA3, driver 32.0.32029.2010) + D3D12 WARP
  • DXIL validator: Windows SDK dxil.dll 1.8.2502.11
  • Scope: synthetic victory-gpu tests only (no game files / title not run)

Results on 50d91b19

  • cargo test -p victory-gpu --locked typed_uav -- --nocapture: 2 passed, 0 failed (unsupported_typed_uav_format_is_refused, supported_typed_uav_formats_are_accepted)
  • cargo test -p victory-gpu --locked -- --test-threads=1: 145 passed, 0 failed, 2 ignored
  • cargo test -p victory-gpu --all-features --locked -- --test-threads=1: 148 passed, 0 failed, 2 ignored
  • VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --locked -- --test-threads=1: 145 passed, 0 failed, 2 ignored (0 D3D12 Debug Layer errors/warnings)
  • VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --locked -- --test-threads=1: 145 passed, 0 failed, 2 ignored
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings (default and --all-features): 0 warnings

AI-assisted review/testing; all builds and GPU runs executed locally on my own machine. No game files used.

**@⁠nathanbzrr** on GitHub · 2026-11-25 06:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7155034616) AMD RDNA3 + D3D12 Debug Layer + WARP test report for `50d91b19` (rebased onto `main` `940d32f`): **Environment** - Windows 11 `10.0.26340` x64, `rustc 1.98.1` (`x86_64-pc-windows-msvc`) - GPU: **AMD Radeon RX 7600** (RDNA3, driver `32.0.32029.2010`) + **D3D12 WARP** - DXIL validator: Windows SDK `dxil.dll 1.8.2502.11` - Scope: synthetic `victory-gpu` tests only (no game files / title not run) **Results on `50d91b19`** - `cargo test -p victory-gpu --locked typed_uav -- --nocapture`: **2 passed, 0 failed** (`unsupported_typed_uav_format_is_refused`, `supported_typed_uav_formats_are_accepted`) - `cargo test -p victory-gpu --locked -- --test-threads=1`: **145 passed, 0 failed, 2 ignored** - `cargo test -p victory-gpu --all-features --locked -- --test-threads=1`: **148 passed, 0 failed, 2 ignored** - `VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --locked -- --test-threads=1`: **145 passed, 0 failed, 2 ignored** (0 D3D12 Debug Layer errors/warnings) - `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --locked -- --test-threads=1`: **145 passed, 0 failed, 2 ignored** - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` (default and `--all-features`): **0 warnings** *AI-assisted review/testing; all builds and GPU runs executed locally on my own machine. No game files used.*
Author
Owner

@⁠walterwallaceson on GitHub · 2026-11-25 07:23 UTC · original

Windows 10, RTX 3070, rebased head 50d91b1: works, and does what #1775 does on the same stack.

Setup: RTX 3070 8 GB, driver 621.14, Windows 10 22H2 (19045). main 940d32f + #463 (Agility SDK runtime, needed on Windows 10) + #1751 + #1906 + #385 + #688 + #189 (wave32). Diag build, a scripted Enter at the start screen, nothing skipped. The three rows differ only in which of the two fixes is in.

end world from
neither #1763 nor #1775 device removed 13 s after start (frame 64): DXGI_ERROR_INVALID_CALL after a submission of one list, no breadcrumbs, the #1753 symptom –
#1775 (b079909) 15 min, no removal, no errors 76 s
this PR (50d91b1) instead 15 min, no removal, no errors 82 s

With this PR the two 15-minute runs match within run-to-run noise (122 vs 121 submissions over 250 ms, 0.85 vs 0.9 fps at the end). cargo test --workspace gives the same results as with #1775 plus one more passing test.

Since #1775 is proposed for close as a duplicate of this PR: on this card and Windows 10 I see no case #1775 covers that this one doesn't.

Not checked: the removal with the debug layer on (so not shown that it is the same B5G5R5A1_UNORM view here); more than one run per row.

No game data attached. I'm testing with Claude's help, and Claude drafted this comment.

**@⁠walterwallaceson** on GitHub · 2026-11-25 07:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7155809942) **Windows 10, RTX 3070, rebased head `50d91b1`: works, and does what #1775 does on the same stack.** **Setup:** RTX 3070 8 GB, driver 621.14, Windows 10 22H2 (19045). `main` `940d32f` + #463 (Agility SDK runtime, needed on Windows 10) + #1751 + #1906 + #385 + #688 + #189 (`wave32`). Diag build, a scripted Enter at the start screen, nothing skipped. The three rows differ only in which of the two fixes is in. | | end | world from | |---|---|---| | neither #1763 nor #1775 | **device removed 13 s after start** (frame 64): `DXGI_ERROR_INVALID_CALL` after a submission of one list, no breadcrumbs, the #1753 symptom | – | | #1775 (`b079909`) | 15 min, no removal, no errors | 76 s | | this PR (`50d91b1`) instead | **15 min, no removal, no errors** | 82 s | With this PR the two 15-minute runs match within run-to-run noise (122 vs 121 submissions over 250 ms, 0.85 vs 0.9 fps at the end). `cargo test --workspace` gives the same results as with #1775 plus one more passing test. Since #1775 is proposed for close as a duplicate of this PR: on this card and Windows 10 I see no case #1775 covers that this one doesn't. **Not checked:** the removal with the debug layer on (so not shown that it is the same `B5G5R5A1_UNORM` view here); more than one run per row. No game data attached. I'm testing with Claude's help, and Claude drafted this comment.
Author
Owner

@⁠ShyVortex on GitHub · 2026-11-25 07:41 UTC · original · edited 2026-11-25 07:45 UTC

RTX 3080 Ti Laptop 16 GB (Ampere, 32-lane waves, driver 621.40), i7-12700H, 32 GB RAM, hybrid graphics (Iris Xe), Windows 11 26300. Diag build, VICTORY_D3D12_DRED=1, TDR at defaults (logged level=default delay=default ddi_delay=default).

  • main 940d32f: device removed (0x887A0004 / 0x887A0001) in the menus, ~6 s after no host texture for the 2560x1440 format 115 target. 2 of 2 runs.
  • 940d32f + this PR (50d91b1, clean): no removal at boot. Menus and loading art at 21-28 fps, through to world loading (the title's own state: "Game Running", prologue leadout cutscene prestreaming).

So it does what it says on this machine too.

What came next is the world-entry problem (#71), not this change, but one detail may be useful: about 3 s into world loading Windows reset the GPU (nvlddmkm 153) with TDR at defaults, the runtime logged no device removal at all, ~30 s later the title faulted (0xc0000005, write to 0x0 at victory-image+0x23cf683), and then the whole PC froze hard and needed the power button (Kernel-Power 41, bugcheck 0). The title's own crash report at that moment shows 0.9 GB of a 50 GB page file free, so commit was nearly exhausted; my sampler died with the PC, so I can't say how much of that was VIctory's. #1054 / 42961e8 warn only for TdrLevel 0/1; here it froze with the defaults.

AI-assisted (Claude Code).

**@⁠ShyVortex** on GitHub · 2026-11-25 07:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7156134693) · edited 2026-11-25 07:45 UTC RTX 3080 Ti Laptop 16 GB (Ampere, 32-lane waves, driver 621.40), i7-12700H, 32 GB RAM, hybrid graphics (Iris Xe), Windows 11 26300. Diag build, `VICTORY_D3D12_DRED=1`, TDR at defaults (logged `level=default delay=default ddi_delay=default`). - `main` `940d32f`: device removed (`0x887A0004` / `0x887A0001`) in the menus, ~6 s after `no host texture` for the 2560x1440 format 115 target. 2 of 2 runs. - `940d32f` + this PR (`50d91b1`, clean): no removal at boot. Menus and loading art at 21-28 fps, through to world loading (the title's own state: "Game Running", prologue leadout cutscene prestreaming). So it does what it says on this machine too. What came next is the world-entry problem (#71), not this change, but one detail may be useful: about 3 s into world loading Windows reset the GPU (`nvlddmkm` 153) **with TDR at defaults**, the runtime logged no device removal at all, ~30 s later the title faulted (`0xc0000005`, write to 0x0 at `victory-image+0x23cf683`), and then the whole PC froze hard and needed the power button (Kernel-Power 41, bugcheck 0). The title's own crash report at that moment shows 0.9 GB of a 50 GB page file free, so commit was nearly exhausted; my sampler died with the PC, so I can't say how much of that was VIctory's. #1054 / 42961e8 warn only for TdrLevel 0/1; here it froze with the defaults. AI-assisted (Claude Code).
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 08:10 UTC · original

One more NVIDIA data point for 50d91b1, with the debug layer's reason for the removal on plain main.

RTX 5070 (non-Ti), driver 616.92, Windows 11, diagnostics build (--profile diag --features diagnostics), Series X mode:

  • main 940d32f, D3D12 debug layer + DRED: device removed 11 s in, at boot. The debug layer logs id 342, CreateUnorderedAccessView: typed UAV of B5G5R5A1_UNORM not supported, then id 232, RemoveDevice / INVALID_CALL. Without the debug layer: removed at 9.5 s, 0x887A0001, DRED breadcrumbs empty.
  • main + this PR (50d91b1), DRED on: 10 minutes (the time limit I set) with no device removal, menus, then the world after the opening credits. No Kernel-Power or display-driver events in the System log during either run.

Not fixed by this PR, and not expected to be: the host view heap is still capped at 1,000,000 of the 1,245,184 descriptors asked for, and the frame is still unlit on main.

These were runs of the title with my own local copy of its data on my PC; only the logged messages and counts are quoted.

AI-assisted

**@⁠r4tedx** on GitHub · 2026-11-25 08:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7156696421) One more NVIDIA data point for `50d91b1`, with the debug layer's reason for the removal on plain `main`. RTX 5070 (non-Ti), driver 616.92, Windows 11, diagnostics build (`--profile diag --features diagnostics`), Series X mode: - **`main` `940d32f`, D3D12 debug layer + DRED:** device removed 11 s in, at boot. The debug layer logs id 342, `CreateUnorderedAccessView`: typed UAV of `B5G5R5A1_UNORM` not supported, then id 232, `RemoveDevice` / `INVALID_CALL`. Without the debug layer: removed at 9.5 s, `0x887A0001`, DRED breadcrumbs empty. - **`main` + this PR (`50d91b1`), DRED on:** 10 minutes (the time limit I set) with no device removal, menus, then the world after the opening credits. No Kernel-Power or display-driver events in the System log during either run. Not fixed by this PR, and not expected to be: the host view heap is still capped at 1,000,000 of the 1,245,184 descriptors asked for, and the frame is still unlit on `main`. These were runs of the title with my own local copy of its data on my PC; only the logged messages and counts are quoted. AI-assisted
Author
Owner

@⁠StExpeditus on GitHub · 2026-11-25 09:03 UTC · original

Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at 50d91b1. cargo test --workspace --locked --no-fail-fast -> 697 passed, 6 failed, 10 ignored. Failed: descriptor::host::tests::dynamic_slots_are_held_until_released ... FAILED | draw::tests::root_views_reach_their_copy_and_read_zeros_past_it ... FAILED | memory::tests::lists_share_a_table_and_copies_keep_their_views ... FAILED | emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride ... FAILED | emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros ... FAILED | emit::synthetic_tests::gathers_at_a_level_match_the_hardware ... FAILED

**@⁠StExpeditus** on GitHub · 2026-11-25 09:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7157815716) **Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24.** Branch at `50d91b1`. `cargo test --workspace --locked --no-fail-fast` -> 697 passed, 6 failed, 10 ignored. Failed: descriptor::host::tests::dynamic_slots_are_held_until_released ... FAILED | draw::tests::root_views_reach_their_copy_and_read_zeros_past_it ... FAILED | memory::tests::lists_share_a_table_and_copies_keep_their_views ... FAILED | emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride ... FAILED | emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros ... FAILED | emit::synthetic_tests::gathers_at_a_level_match_the_hardware ... FAILED
Author
Owner

@⁠R34P3RGit on GitHub · 2026-11-25 18:57 UTC · original

Confirmed startup fix on an RTX 5080 (NVIDIA driver 621.40). On unmodified main 13f91ca, the device was removed about 16 seconds after launch, after one submitted list, with DXGI_ERROR_INVALID_CALL (0x887A0001). The D3D12 debug layer reported an unsupported B5G5R5A1_UNORM typed UAV (ID 342), then device removal (ID 232).

With PR #1763 at 73a602b, the process passed the former failure point and stayed alive for a 35-second smoke test, which I ended intentionally. An interactive follow-up also worked past startup. This confirms the immediate NVIDIA startup fix on this setup; later rendering is not yet confirmed. A separate B4G4R4A4_UNORM render-target allocation refusal remains.

**@⁠R34P3RGit** on GitHub · 2026-11-25 18:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7171625572) Confirmed startup fix on an RTX 5080 (NVIDIA driver 621.40). On unmodified main `13f91ca`, the device was removed about 16 seconds after launch, after one submitted list, with `DXGI_ERROR_INVALID_CALL` (`0x887A0001`). The D3D12 debug layer reported an unsupported `B5G5R5A1_UNORM` typed UAV (ID 342), then device removal (ID 232). With PR #1763 at `73a602b`, the process passed the former failure point and stayed alive for a 35-second smoke test, which I ended intentionally. An interactive follow-up also worked past startup. This confirms the immediate NVIDIA startup fix on this setup; later rendering is not yet confirmed. A separate `B4G4R4A4_UNORM` render-target allocation refusal remains.
Author
Owner

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

RTX 4060 Laptop (610.47), merged onto main 13f91cae: B5G5R5A1 UAV half fixed (views refused, both with and without a description), B4G4R4A4 target half still removes the device; no new failures. Also tested together with #2626 (small conflict in fits, resolution in the linked comment): both halves pass. Details and the side-by-side table with the other #1753 PRs: #1753. Tested with the help of an AI assistant (Claude Code).

**@⁠KainanP** on GitHub · 2026-11-25 19:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1763#issuecomment-7172520383) RTX 4060 Laptop (610.47), merged onto main 13f91cae: B5G5R5A1 UAV half **fixed** (views refused, both with and without a description), B4G4R4A4 target half still removes the device; no new failures. Also tested together with #2626 (small conflict in `fits`, resolution in the linked comment): both halves pass. Details and the side-by-side table with the other #1753 PRs: https://git.gtahub.st/github/Marvisak--VIctory/issues/1753. Tested with the help of an AI assistant (Claude Code).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1763/head:github-bot/gh-1763'
git switch 'github-bot/gh-1763'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1763'
git switch 'github-bot/gh-1763'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1763'
git switch 'github-bot/gh-1763'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1763'
git switch 'main'
git merge --squash 'github-bot/gh-1763'
git switch 'main'
git merge --ff-only 'github-bot/gh-1763'
git switch 'main'
git merge 'github-bot/gh-1763'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!1763
No description provided.