Repository navigation
GPU: textures drop unordered access in formats the host cannot write (NVIDIA B5G5R5A1) - #1787
Danigamer05 wants to merge 2 commits into
Conversation
Hosts differ in which formats take unordered access: NVIDIA has none for B5G5R5A1_UNORM, AMD has. host_desc kept the title's UAV flag for such a texture, so on an NVIDIA card the host description was invalid, and the size query shared_texture makes with it removed the device (DXGI_ERROR_INVALID_CALL) in the menus, about 50 s after start. A texture in a format the host cannot write from shaders (asked once per format with CheckFeatureSupport, typed unordered access views) is now made without that use; typeless formats keep it, their views decide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VIctory V2: community PRs, merged and testedOpen 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). 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: Unofficial community fork of Marvisak/VIctory, GPL-3.0. |
|
Related, for the reviewers: #1763, #1775 and #1780 (one change three times) fix the other half of the same NVIDIA AI-assisted (Claude Code). |
|
Automated triage for the maintainers. Needs work. Thanks for the update (
With the initial-state fix, this looks mergeable as the resource-side complement to #1763's view refusal. CI: passing ( Generated by Claude Code |
Review on Marvisak#1787: host textures are made with their castable formats, and D3D12 allows ALLOW_UNORDERED_ACCESS when a format the texture can be cast to takes typed unordered access (B5G5R5A1_UNORM's 16-bit aliases such as R16_UINT on NVIDIA). Dropping the use whenever the texture's own format lacks it lost writes through those aliases. host_desc now drops it only when neither the format nor any castable format takes typed unordered access. make_texture's fallback without castable formats (CreateCommittedResource3 refused or no Device10) drops it when the format alone lacks it, since there the alias is gone and the flag is illegal. The test makes the textures through make_texture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review, both points are right. Pushed
On the removal itself: agreed, the AI-assisted (Claude Code). |
What
host_desckeeps the title's unordered-access flag for a texture whose format the host GPU cannot write from shaders. NVIDIA has no typed unordered access forB5G5R5A1_UNORM(format 86); AMD has. On an NVIDIA card the host description is then invalid, and the size query thatshared_texturemakes with it (GetResourceAllocationInfo) removes the device.host_descdropsUNORDEREDwhenhost_unordered_formatsays the host has no typed unordered access views for the format.host_unordered_formatasksCheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)once per format and logs the formats it turns down. Typeless formats keep the use, since their views decide later. Without a host it answers yes.unordered_access_only_in_formats_the_host_writes: render-target + UAV textures in formats 86, 28, 87, 2 and 10 keep their render-target use, keep UAV exactly when the host has it, and are created by the host.Why
On
main70564ae, on an RTX 2080 SUPER (driver 621.01, Windows 11), every run ended in the menus about 50 s after start withDXGI_ERROR_INVALID_CALL(0x887A0001). WithVICTORY_D3D12_DEBUG=1the debug layer names it:With this change the log shows
the host has no unordered access for this format: its textures are made without it format=86, the run passes the menus and loads into the world, where it later stops on a GPU hang. That hang is the known wave64-on-32-lane class (mainrefuses no wave64 programs on NVIDIA) and is not touched here.Tests
cargo test -p victory-gpu --lib: the new test passes. Two tests fail on this machine both with and without this change, so they are not caused by it:descriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_views.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.rustfmt --check: clean for the lines this changes (other files onmainhave unrelated differences).No game data in the diff or the description. AI-assisted (Claude Code); runs on my machine with my own copy.
🤖 Generated with Claude Code