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

Open
Biewlhenrique wants to merge 1 commit from upstream-pr/1946 into main
Biewlhenrique commented 2026-11-25 01:34:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Biewlhenrique on 2026-11-25T01:34:56Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:issue:6595093302 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1946). Originally posted by [Biewlhenrique](https://github.com/Biewlhenrique) on 2026-11-25T01:34:56Z. --- `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)
catminou4 commented 2026-11-25 03:02:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:10:28Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

Descriptors: null UAV for packed 16-bit…: null-UAV descriptor handling for packed formats.

<!-- greyfinch-sync:Marvisak/VIctory:review:6050612893 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1946#pullrequestreview-6050612893). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T02:10:28Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. Descriptors: null UAV for packed 16-bit…: null-UAV descriptor handling for packed formats.
Marvisak commented 2026-11-25 09:06:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T08:21:24Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7156923979 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1946#issuecomment-7156923979). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T08:21:24Z. --- <!-- 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)_
KainanP commented 2026-11-25 20:06:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-25T19:36:12Z.


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://github.com/Marvisak/VIctory/issues/1753#issuecomment-7172510623. Tested with the help of an AI assistant (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7172523648 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1946#issuecomment-7172523648). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-25T19:36:12Z. --- 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://github.com/Marvisak/VIctory/issues/1753#issuecomment-7172510623. Tested with the help of an AI assistant (Claude Code).
artor410 commented 2026-11-25 22:04:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by artor410 on 2026-11-25T21:53:21Z.


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.)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7175667538 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1946#issuecomment-7175667538). Originally posted by [artor410](https://github.com/artor410) on 2026-11-25T21:53:21Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1946:upstream-pr/1946'
git switch 'upstream-pr/1946'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1946'
git switch 'upstream-pr/1946'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1946'
git switch 'upstream-pr/1946'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1946'
git switch 'main'
git merge --squash 'upstream-pr/1946'
git switch 'main'
git merge --ff-only 'upstream-pr/1946'
git switch 'main'
git merge 'upstream-pr/1946'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1944
No description provided.