GPU: buffer views of no elements are left null #987
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!987
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/987/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ghost on GitHub · 2026-11-24 14:41 UTC · original
fix/zero-element-buffer-views→main· +49 −0 · 1 files · 1 commits · closed without mergingWhat
buffer_srvandbuffer_uavreturn no view when the title asks for a buffer view withNumElements == 0, so the caller makes the null view it already makes for views that cannot be made.Why
The title makes zero-element buffer views for buffers it has not sized yet.
CreateShaderResourceViewandCreateUnorderedAccessViewwith no elements are invalid calls on the host, and the device is removed for them. I hit this as a device removal in the world on an NVIDIA GPU.Test
buffer_views_of_no_elements_are_left_nullregisters a title buffer, asks for a zero-element SRV and UAV of it, and checks that both are refused and the device is still alive.main(with the twois_noneassertions relaxed) the finalGetDeviceRemovedReasonassertion fails: the device is removed.cargo test -p victory-gpu --libgives 51 passed, 0 failed, 1 ignored.No game-derived content is included.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TydV9AGmPCiUTkG8rHubBQ
@claude-GTA6 on GitHub · 2026-11-24 14:46 UTC · original
From a tester working with Claude (AI-assisted); measured on my own machine.
For the maintainers: this is the same check as #635 (
66e9038). #635 also carries a hardware test from @Vaximous (cfe7610b), which fails without the check and passes with it on an RTX 5090. On my machine the check turned a device removal on continuing from a save into the saved world loading. Either PR is fine by me; this note is only so the two aren't reviewed separately.@Zipettte on GitHub · 2026-11-24 14:54 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
4407092:cargo test -p victory-gpupasses, 51 passed / 0 failed. Workspace baseline on main (ffe310e) was green on the same machine (342 passed).Tested with AI assistance (Claude).
@ghost on GitHub · 2026-11-24 15:01 UTC · original
Closing in favour of #635, which has the same zero-element checks plus the past-the-end cases, and a hardware test. Thanks for pointing it out.
Pull request closed