GPU: reject shader-visible RTV and DSV heap creation #2959
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2961"
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 Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T01:34:29Z.
CreateDescriptorHeap now returns E_INVALIDARG when an RTV or DSV heap is requested with SHADER_VISIBLE and an output object. Only CBV/SRV/UAV and sampler heaps support the flag. D3D12 descriptor heap flags.
On both inbox and app-local D3D12 WARP, the two shader-visible RTV/DSV creations returned E_INVALIDARG with no heap. Six valid combinations of type and flag created an object. The eight null-output calls returned S_FALSE. The test uses one descriptor per heap.
The same fixture through VIctory's device vtable on main at
63bcca43failed because the shader-visible RTV case returned S_OK and an object. The patch passes the complete 16-call matrix.Eight descriptor tests and the full WARP GPU diagnostics suite passed (247 passed, one ignored). Strict GPU Clippy with default and diagnostic features and asset policy passed.
AI-assisted. Validation used synthetic calls and software WARP.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T01:55:46Z.
Review: COMMENTED
Reviewed and verified against
main(63bcca43) on Windows 11 (RTX 5090 + WARP,VICTORY_D3D12_DEBUG=1) — clean fix and ready to merge:crates/victory-gpu/src/descriptor.rs:749-754rejectsSHADER_VISIBLEon non-CBV_SRV_UAV/SAMPLERdescriptor heaps (RTV2/ DSV3) withE_INVALIDARGwhile preserving theout.is_null()S_FALSEprobe path and normal shader-visible view/sampler heap creation.Local verification:
VICTORY_D3D12_DEBUG=1):descriptor::tests8/8 (includingshader_visibility_is_rejected_for_rtv_and_dsv_heaps),descriptor::host::tests14/14 (excluding pre-existing NVIDIA 1M view-heap baseline test)--features diagnostics,VICTORY_D3D12_DEBUG=1):descriptor::23/23 passedcargo clippy -p victory-gpu --all-targets(default &--features diagnostics) +cargo xtask policy(191 files ok): 0 warningsImported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T02:22:54Z.
Review: COMMENTED
Verified: D3D12 only allows D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE on CBV_SRV_UAV and SAMPLER heaps — rejecting RTV(2)/DSV(3) before allocation is correct, and keeping the rejection behind !out.is_null() preserves the S_FALSE null-output probe path the title relies on. Test covers the matrix.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T05:36:00Z.
Automated triage for the maintainers.
Needs work. The change in
create_heap(victory-gpu/src/descriptor.rs) makes the emulated console device returnE_INVALIDARGfor a shader-visible RTV/DSV heap. The code itself is small and the test is clear, but the evidence is desktop D3D12 (the Learn page and WARP), while this function stands in for the console's runtime, whose validation can differ. The title only ever sees what the console runtime does, so anE_INVALIDARGhere is only right if the console runtime also refuses this call; if it does not, the change could turn an accepted call into a failure. Either way, a call the title never makes gains nothing from this.What would change the verdict: evidence that the console runtime rejects this flag combination (for example, the title's own code checking for that failure), or a log showing the title makes this call. Without that, this looks like a guard for a case that does not occur.
CI: passing.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T00:13:58Z.
Independent Windows verification of PR #2961 (GPU: reject shader-visible RTV and DSV heap creation).
70d6b07, basemain, merge-base63bcca4. OPEN, MERGEABLE/CLEAN, non-draft, no formal approval, no prior comment from me.cargo test --locked, worktree-localCARGO_TARGET_DIR,CARGO_BUILD_JOBS=2(repo pins 1.98.1; no clippy/rustup). No game data, synthetic fake D3D12 vtable only, GPU/driver N/A.cargo test --locked -p victory-gpu --lib descriptor::tests::shader_visibility_is_rejected_for_rtv_and_dsv_heaps -- --exacttest result: ok. 1 passed; 0 failed; 0 ignored; 232 filtered out.git diff --checkagainst merge-base63bcca4: clean (exit 0).origin/main(0 hits).Caveat: only the targeted synthetic test was run; real D3D12 device behaviour and the full crate suite were not exercised.
AI-assisted (Hy4 flash). No game assets, extracted shaders, keys or DRM content used or uploaded.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.