Descriptors: null UAV for packed 16-bit formats D3D12 refuses #1946

Open
github-bot wants to merge 1 commit from github-bot/gh-1946 into main AGit
Owner

@⁠Biewlhenrique on GitHub · 2026-11-25 01:34 UTC · original
Biewlhenrique:fix/null-uav-packed-16bit → main · +13 −0 · 1 files · 1 commits · open

CreateUnorderedAccessView on a texture whose final format the host cannot store to (the packed 16-bit B5G5R5A1 / B4G4R4A4 formats) is refused and, on NVIDIA, removes the device. This checks the format with typed_store(), like the other typed views, and makes such a view null instead.

Seen running GTA VI on an RTX 5060 Ti. cargo check -p victory-gpu passes.

🤖 Generated with Claude Code

**@⁠Biewlhenrique** on GitHub · 2026-11-25 01:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/1946) `Biewlhenrique:fix/null-uav-packed-16bit` → `main` · +13 −0 · 1 files · 1 commits · open `CreateUnorderedAccessView` on a texture whose final format the host cannot store to (the packed 16-bit B5G5R5A1 / B4G4R4A4 formats) is refused and, on NVIDIA, removes the device. This checks the format with `typed_store()`, like the other typed views, and makes such a view null instead. Seen running GTA VI on an RTX 5060 Ti. `cargo check -p victory-gpu` passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
CreateUnorderedAccessView on a texture whose (final) format the host cannot
store to (the packed 16-bit B5G5R5A1 / B4G4R4A4 formats) is refused and, on
NVIDIA, takes the device with it. Check the format with typed_store() like
the other typed views do and make such a view null instead.

Seen running GTA VI on an RTX 5060 Ti.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:49:38 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 08:21 UTC · original

Automated triage for the maintainers.

Needs work.

In crates/victory-gpu/src/descriptor/host.rs, the View::Unordered arm of make now leaves a texture UAV null when its final format (the view's, else the texture's) fails typed_store. The check itself is cheap and harmless, because typed_store caches per format. Two things are missing before it can go in:

  • Evidence of the failing path. The only evidence is "seen running on an RTX 5060 Ti", with no log. On main, fits already refuses a UAV whose format is not of the texture's family. It also refuses a castable cross-family format that fails typed_store, and the texture must carry ALLOW_UNORDERED_ACCESS. So the failing case has to be a host texture created with UAV access in B5G5R5A1/B4G4R4A4 itself, or a same-family view. Please attach the D3D12 debug-layer message, or the victory log line with the format and resource that took the device down, so the maintainers can see which case it is. That case may be better fixed where the host texture is described (resource::host_desc).
  • Where the check lives. fits(..., unordered = true) is where the unordered view's format is settled. It already holds a typed_store check, limited to castable views of another family. Widening that condition to every unordered view would cover this case in one place instead of re-deriving the format in make.

CI: check passes. There is no test, but a host-format support check is hard to test without the specific GPU, so that is not a blocker.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 08:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/1946#issuecomment-7156923979) <!-- victory-triage v1 head=f88e3ef4e22f5e025aa9c49c6004c97ea9be4290 verdict=needs-work at=2026-11-25T08:21:13Z --> Automated triage for the maintainers. **Needs work.** In `crates/victory-gpu/src/descriptor/host.rs`, the `View::Unordered` arm of `make` now leaves a texture UAV null when its final format (the view's, else the texture's) fails `typed_store`. The check itself is cheap and harmless, because `typed_store` caches per format. Two things are missing before it can go in: - **Evidence of the failing path.** The only evidence is "seen running on an RTX 5060 Ti", with no log. On `main`, `fits` already refuses a UAV whose format is not of the texture's family. It also refuses a castable cross-family format that fails `typed_store`, and the texture must carry `ALLOW_UNORDERED_ACCESS`. So the failing case has to be a host texture created with UAV access in B5G5R5A1/B4G4R4A4 itself, or a same-family view. Please attach the D3D12 debug-layer message, or the `victory` log line with the format and resource that took the device down, so the maintainers can see which case it is. That case may be better fixed where the host texture is described (`resource::host_desc`). - **Where the check lives.** `fits(..., unordered = true)` is where the unordered view's format is settled. It already holds a `typed_store` check, limited to castable views of another family. Widening that condition to every unordered view would cover this case in one place instead of re-deriving the format in `make`. CI: `check` passes. There is no test, but a host-format support check is hard to test without the specific GPU, so that is not a blocker. --- _Generated by [Claude Code](https://claude.ai/code)_
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), B4G4R4A4 target half still removes the device; no new failures. 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/1946#issuecomment-7172523648) RTX 4060 Laptop (610.47), merged onto main 13f91cae: B5G5R5A1 UAV half **fixed** (views refused), B4G4R4A4 target half still removes the device; no new failures. 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).
Author
Owner

@⁠artor410 on GitHub · 2026-11-25 21:53 UTC · original

Tested on RTX 3070 Ti, driver 610.88, Windows 11 26300, rustc 1.98.1. main 13f91ca. Merged into main cleanly (4b62b91).

  • cargo test -p victory-gpu (main: 193 passed, 2 failed: the known heap-cap pair dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views). With this PR: 193 passed, same 2 failed. No new test.
  • Probe (temporary test, not committed): 256x256 texture via create_placed with the UAV and/or RT flag, then descriptor::host::make_view(View::Unordered(..)) and Host::rtv(texture, None), then GetDeviceRemovedReason, one process per case. On main: UAV view of 86 or 115 crashes the test process (0xc0000005 inside the driver); RTV of 115 removes the device (0x887A0001); 115 with RT|UAV gets no host texture. CheckFeatureSupport here: 86 RT yes, typed UAV no; 115 RT no, typed UAV no.
  • With this PR: UAV views of 86 and 115 are null and the process survives. RTV of 115 still removes the device (0x887A0001); 115 with RT|UAV still gets no host texture.

UAV only, same effect as #2462; the B4G4R4A4 render-target half of #735 is not covered.

(Claude Code, Claude Opus 5.5.)

**@⁠artor410** on GitHub · 2026-11-25 21:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/1946#issuecomment-7175667538) Tested on RTX 3070 Ti, driver 610.88, Windows 11 26300, rustc 1.98.1. main 13f91ca. Merged into main cleanly (4b62b91). - `cargo test -p victory-gpu` (main: 193 passed, 2 failed: the known heap-cap pair `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`). With this PR: 193 passed, same 2 failed. No new test. - Probe (temporary test, not committed): 256x256 texture via `create_placed` with the UAV and/or RT flag, then `descriptor::host::make_view(View::Unordered(..))` and `Host::rtv(texture, None)`, then `GetDeviceRemovedReason`, one process per case. On main: UAV view of 86 or 115 crashes the test process (0xc0000005 inside the driver); RTV of 115 removes the device (0x887A0001); 115 with RT|UAV gets no host texture. `CheckFeatureSupport` here: 86 RT yes, typed UAV no; 115 RT no, typed UAV no. - With this PR: UAV views of 86 and 115 are null and the process survives. RTV of 115 still removes the device (0x887A0001); 115 with RT|UAV still gets no host texture. UAV only, same effect as #2462; the B4G4R4A4 render-target half of #735 is not covered. (Claude Code, Claude Opus 5.5.)
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/1946/head:github-bot/gh-1946'
git switch 'github-bot/gh-1946'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1946'
git switch 'github-bot/gh-1946'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1946'
git switch 'github-bot/gh-1946'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1946'
git switch 'main'
git merge --squash 'github-bot/gh-1946'
git switch 'main'
git merge --ff-only 'github-bot/gh-1946'
git switch 'main'
git merge 'github-bot/gh-1946'
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!1946
No description provided.