GPU: return hidden output pointer from GetDesc COM methods #2056
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2058"
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 fuzeofficlal on 2026-11-25T04:16:51Z.
Closes #779.
Summary
outinRAXfromdescriptor::desc(0x40),queue::desc(0xd0/0xe0),resource::heap_desc(0x40), andresource::resource_desc(0x50) to satisfy the x64 COM ABI for by-value structure returns (GetDesc), matchingallocation_infoandcustom_heap_properties.thisin addition to nulloutbefore writing the descriptor.Testing
descriptor::tests,queue::tests, andresource::testsverifying thatRAXequals the caller'soutbuffer pointer, the returned descriptor fields match, and nullthis/outpointers are handled safely.cargo test -p victory-gpu,cargo clippy --workspace --all-targets --all-features -- -D warnings, andcargo xtask policy.Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T04:17:33Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
GetDesc COM methods return the hidden output pointer — COM ABI correctness fix.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T04:44:47Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, Rust 1.98.1 MSVC):cargo test -p victory-gpu --lib get_desc_returns_its_output_pointer— 2 passed, 0 failed (heap_get_desc_returns_its_output_pointerandqueue_get_desc_returns_its_output_pointer)cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean MSVC ABI fix returning the hidden
outpointer fromGetDescCOM methods with targeted unit tests. Looks good.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T04:41:40Z.
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
600abfd.victory-gpu: 143 passed, 2 failed, 2 ignored; the newheap_get_desc_returns_its_output_pointerandqueue_get_desc_returns_its_output_pointerpass. The 2 failures are #1744's heap-cap failures onmain. Same asmainon this hardware. Not run: a title.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by BlueCatsz on 2026-11-25T08:42:47Z.
Heads-up for maintainers and @fuzeofficlal: #779 already had PR #1093 opened from
BlueCatsz:fix/gpu-getdesc-return-ptr(ef2f8fa1), which was mistakenly auto-closed at00:31 UTCshortly before#779's03:52 UTCtriage comment asked for a PR from that branch. I've appealed on #1093 to have it reopened so maintainers don't end up reviewing the same change twice.Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-25T09:50:42Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, head600abfd, Windows 10 x64 19045, NVIDIA GeForce RTX 5060, Rust 1.98.1 MSVC):cargo test -p victory-gpu --lib -- --test-threads=1 resource::tests::— 10 passed, 0 failedcargo test -p victory-gpu --lib -- --test-threads=1 descriptor::tests::— 6 passed, 0 failed (includingheap_get_desc_returns_its_output_pointer)cargo clippy -p victory-gpu --all-targets -- -D warnings— 0 warningsClean RAX output-pointer fix for GetDesc COM methods.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T09:24:27Z.
Automated triage for the maintainers.
Merge candidate.
The new head
d4bbd6fkeeps the fix for #779.descriptor.rsdesc,queue.rsdesc,resource.rsheap_descandresource.rsresource_descnow return the hiddenoutpointer in RAX, which the Microsoft x64 convention requires for struct returns and whichallocation_info/custom_heap_propertiesalready do. As suggested, the unreachablethis.is_null()guards and their assertions are gone. The tests call each method through its vtable slot and check the returned pointer and the descriptor fields.mainstill has the four()-returning versions, so this is not yet landed.#1093 (same change) is still closed. If it is reopened, only one of the two should land. This one merges cleanly and credits the other author.
CI: passing (
check).On your reply: thanks, the update addresses the earlier nit.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T10:41:12Z.
Updated in
d4bbd6f2: dropped the unreachablethis.is_null()checks/assertions per the triage note, and addedCo-authored-byattribution for @BlueCatsz (#1093) — happy with whichever PR maintainers prefer to land.Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-25T11:40:44Z.
Review: APPROVED
Re-verified
d4bbd6fon Windows 10 + NVIDIA GeForce RTX 5060:resource::tests::(10 passed)descriptor::tests::(6 passed)queue::tests::(5 passed, includingqueue_get_desc_returns_its_output_pointer)cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warningscargo xtask policy: 182 files okClean drop of the unreachable checks. Approving.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:05:27Z.
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because the premise does not hold. On the console these
GetDesctable entries take an explicit out pointer and return nothing, and the inline wrapper returns its own local copy, so no caller reads the return register.GetResourceAllocationInfoandGetCustomHeapPropertiesare different (they really return a struct through a hidden pointer), which is whyallocation_infoandcustom_heap_propertiesreturn it. The new tests only assert the new return value.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed