victory-gpu: reject typed UAVs in formats the host cannot store #19
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19"
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?
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T06:10:55Z.
Summary
Adapt
Marvisak/VIctoryea488a9(#2462,GPU: no typed unordered view in a format the host cannot store to) intocrates/victory-gpu/src/descriptor/host.rs:typed_store(format: u32) -> boolqueryingD3D12_FEATURE_FORMAT_SUPPORTforD3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW.typed_storeacross all threefits(..., unordered: true)return paths (view == 0,target_formatstand-in, and typeless/typed view format check) so formats a host card cannot store to (such asDXGI_FORMAT_B5G5R5A1_UNORMon NVIDIA) stay null instead of triggeringDXGI_ERROR_INVALID_CALL/RemoveDevice.descriptor::host::bake_flip_tests::typed_store_and_fits_reject_unsupported_unordered_view_formats.Rig Specs Tested On
13th Gen Intel(R) Core(TM) i7-13700FNVIDIA GeForce RTX 4060 Ti(8 GiBVRAM)32 GiBWindows 11 Home (Build 26300)/ NVIDIA Driver32.0.16.2124Run Settings & Profile
release&--release --features victory-gpu/diagnostics@6dae70fc0cd4200a36ec9a5ff5d9016951be036c(0non-system MinGW DLLs each)series-soffDLSS qualityoffVICTORY_*Overrides:D:\victory-build\verify-tools\verify-world.ps1withpr19-diag.exe,-GoldenDataDir 'D:\victory-data\golden-data-minivi',-WorldSeconds 75,-AutoNudgeMenudock->balcony), 75s in-world telemetry (14world windows, max11,053draws/frame)Measurements & Verification
9.0–9.6 fpswithwaiting for pipelines = 0.0 ms(matchingbaseline-main8.9–10.6 fps). Overall raw 14-window median was5.5 fps(223.15 ms) only because-AutoNudgeMenuentered the dock while838pipelines were still compiling (waiting for pipelines = 385.1–500.6 ms/frameacross 6 dock windows vs13.1–48.2 msinbaseline-main).final_waiting=4,314(vs7,121baseline),0cannot storetriggers, visualslit=9/24,luma=105.1,edge_energy=7.0,magenta=0.0%(inspectedframe-8171.png&frame-9275.png).offcard accountinghad0samples recorded (threshold/sweep did not trigger under6,985 MBbudget);copystatreported5,904 MBin use of6,985 MBbudget (over=0 MB,3,023host copies let go240 MB)0(crashes=0,no_host_texture_errors=0)cargo +1.98.1-x86_64-pc-windows-gnu xtask policy(294 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask(6 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features victory-gpu/diagnostics -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu(449 passed; 0 failed; 36 ignored, includingtyped_store_and_fits_reject_unsupported_unordered_view_formats)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T07:04:00Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
This PR ports the typed-UAV format-support guard into
crates/victory-gpu/src/descriptor/host.rs:typed_store(format: u32) -> bool, queryingID3D12Device::CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT, ...)forD3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEWand caching results in aMutex<Vec<(u32, bool)>>.typed_storeacross all threefits(..., unordered: true)return paths (view == 0,crate::resource::target_format(view) == own, and thetypeless/ typed family check) before rewriting*format.descriptor::host::bake_flip_tests::typed_store_and_fits_reject_unsupported_unordered_view_formats.Checks & Observations
fits, sRGB-to-linear remapping forunorderedviews still runs beforeviewis read, sotyped_storechecks the actual resolved format that would be passed toCreateUnorderedAccessView.typed_store, ifhost()were everNone,falsewould be cached inKNOWN; returningfalseearly onlet Some(h) = host() else { return false; };would avoid caching a pre-init miss.typed_storeonR8G8B8A8_UNORM,BC7_UNORM, andB5G5R5A1_UNORM, and exercisesfitsonR8G8B8A8_TYPELESS, though it does not directly exercise the!typed_storerejection branch insidefits(hardware-dependent).Verdict
needs-gpu-test— Clean D3D12 host descriptor change with passing CI; because it queries adapter-specificD3D12_FEATURE_FORMAT_SUPPORTflags incrates/victory-gpu/src/descriptor/host.rs, a local real-GPU smoke test is recommended before merging.Generated with Antigravity CLI (
agy).