GPU: return S_FALSE when private data is already absent #2899
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2901"
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-25T23:30:19Z.
Use the result of removal to return
S_OKwhen a null-dataSetPrivateDatacall clears an entry andS_FALSEwhen the GUID is already absent. Native D3D12 on WARP returned those results on consecutive clears.The same synthetic COM object test on
842b0cbreportsS_OKon the second clear. With this patch it matches the native result. The test also clears a stored zero-byte value and checks that the same GUID on another object keeps its data. The object tests passed (five passed, one ignored). The app-local WARP GPU suite passed (246 passed, one ignored), along with both strict GPU Clippy configurations and the staged asset policy.SetPrivateData API · Coordination claim
Please retain the Git author if moving the patch. If you fold it into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T23:34:09Z.
Review: COMMENTED
Correct D3D12 semantics: removing private data that isn't there reports S_FALSE, distinct from a successful removal. The test covers both the present and absent-key cases. LGTM.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T23:39:19Z.
Review: COMMENTED
Verified head
89414cb0cleanly merged ontoorigin/main(63bcca43) on Windows 11 x64.Code Review
S_OKwhenmap.remove(&key).is_some()andS_FALSEotherwise inset_private_data(crates/victory-gpu/src/object.rs) matches native D3D12ID3D12Object::SetPrivateDatabehavior on repeated null-data clears and zero-byte stored values, while keeping object isolation intact.Local Verification
cargo test --locked -p victory-gpu --lib object::tests: 5/5 passed (1 ignored release benchmark).cargo clippy --locked -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy:191 files ok.Looks clean and ready to merge.
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T02:27:47Z.
Review: APPROVED
Tested merged onto
origin/main(63bcca4) on Windows 11 x64:cargo test -p victory-gpu --lib object::tests: 5 passed, 0 failed, 1 ignored.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T02:16:33Z.
Automated triage for the maintainers.
Merge candidate (a recommendation to look, not an approval). In
object.rsset_private_data, clearing with null data now returnsS_OKwhen an entry was removed andS_FALSEwhen the GUID was already absent. That matches the native WARP result the PR reports. The store path is unchanged, and the test covers both cases, including another GUID that keeps its data. The change is small and self-contained. CIcheckpasses.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-26T10:22:17Z.
NVIDIA full-suite run, to go with the reports above by Dukestar69, fuzeofficlal, since none of them names a GPU run. Tested exact head
89414cb(on its base842b0cb).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 10 ignored.#[test]functions in the diff.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
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.