GPU: return S_FALSE when private data is already absent #2901

Open
github-bot wants to merge 1 commit from github-bot/gh-2901 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 23:30 UTC · original
andrewpozdnakov7-jpg:codex2/private-data-empty-removal → main · +13 −6 · 1 files · 1 commits · open

Use the result of removal to return S_OK when a null-data SetPrivateData call clears an entry and S_FALSE when the GUID is already absent. Native D3D12 on WARP returned those results on consecutive clears.

The same synthetic COM object test on 842b0cb reports S_OK on 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]>.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 23:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/2901) `andrewpozdnakov7-jpg:codex2/private-data-empty-removal` → `main` · +13 −6 · 1 files · 1 commits · open Use the result of removal to return `S_OK` when a null-data `SetPrivateData` call clears an entry and `S_FALSE` when the GUID is already absent. Native D3D12 on WARP returned those results on consecutive clears. The same synthetic COM object test on `842b0cb` reports `S_OK` on 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](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12object-setprivatedata) · [Coordination claim](https://git.gtahub.st/github/Marvisak--VIctory/issues/1633) 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]>`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:17:04 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-26 02:16 UTC · original

Automated triage for the maintainers.

Merge candidate (a recommendation to look, not an approval). In object.rs set_private_data, clearing with null data now returns S_OK when an entry was removed and S_FALSE when 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. CI check passes.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-26 02:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/2901#issuecomment-7180637280) <!-- victory-triage v1 head=89414cb04546859a605bd086b0f2e55015b42548 verdict=merge-candidate at=2026-11-26T02:16:30Z --> Automated triage for the maintainers. **Merge candidate** (a recommendation to look, not an approval). In `object.rs` `set_private_data`, clearing with null data now returns `S_OK` when an entry was removed and `S_FALSE` when 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. CI `check` passes. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 23:34 UTC · original · reviewed

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.

**@⁠kotekompotek** on GitHub · 2026-11-25 23:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/2901#pullrequestreview-6066469918) · **reviewed** 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.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 23:39 UTC · original · reviewed

Verified head 89414cb0 cleanly merged onto origin/main (63bcca43) on Windows 11 x64.

Code Review

  • Returning S_OK when map.remove(&key).is_some() and S_FALSE otherwise in set_private_data (crates/victory-gpu/src/object.rs) matches native D3D12 ID3D12Object::SetPrivateData behavior 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.

**@⁠fuzeofficlal** on GitHub · 2026-11-25 23:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/2901#pullrequestreview-6066518931) · **reviewed** Verified head `89414cb0` cleanly merged onto `origin/main` (`63bcca43`) on Windows 11 x64. ### Code Review - Returning `S_OK` when `map.remove(&key).is_some()` and `S_FALSE` otherwise in `set_private_data` (`crates/victory-gpu/src/object.rs`) matches native D3D12 `ID3D12Object::SetPrivateData` behavior 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.
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 02:27 UTC · original · approved these changes

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).

**@⁠Dukestar69** on GitHub · 2026-11-26 02:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/2901#pullrequestreview-6067754003) · **approved these changes** 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).
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 10:22 UTC · original

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 base 842b0cb).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo 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.
  • No new #[test] functions in the diff.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#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_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-26 10:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/2901#issuecomment-7189275546) 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 base `842b0cb`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo 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**. - No new `#[test]` functions in the diff. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#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_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2901/head:github-bot/gh-2901'
git switch 'github-bot/gh-2901'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2901'
git switch 'github-bot/gh-2901'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2901'
git switch 'github-bot/gh-2901'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2901'
git switch 'main'
git merge --squash 'github-bot/gh-2901'
git switch 'main'
git merge --ff-only 'github-bot/gh-2901'
git switch 'main'
git merge 'github-bot/gh-2901'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2901
No description provided.