GPU: return the caller’s output pointer from four GetDesc methods #818

Open
MichaelSmithAI wants to merge 1 commit from upstream-pr/819 into main
MichaelSmithAI commented 2026-11-25 08:46:32 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MichaelSmithAI on 2026-11-25T08:46:32Z.


This ports BlueDragonReal’s four-method fix from Marvisak/VIctory#1093 to 9376fd6, preserving the original commit author. The guest implementations of GetDesc for a resource, heap, descriptor heap and command queue fill the caller’s buffer. Returning the same buffer pointer in RAX completes the Windows x64 ABI for these struct-returning methods. A caller that uses the returned address can then read the descriptor it supplied storage for.

I built the Windows GPU crate and ran all four affected vtable tests under Wine 11.22 with the GE vkd3d-proton 3.2 runtime. Each returned the exact caller pointer, preserved the tested descriptor fields, and returned null for a null output. These are synthetic ABI checks. Title progress and frame time were not measured.

AI-assisted port and verification.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6600638425 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/819). Originally posted by [MichaelSmithAI](https://github.com/MichaelSmithAI) on 2026-11-25T08:46:32Z. --- This ports BlueDragonReal’s four-method fix from [Marvisak/VIctory#1093](https://github.com/Marvisak/VIctory/pull/1093) to `9376fd6`, preserving the original commit author. The guest implementations of GetDesc for a resource, heap, descriptor heap and command queue fill the caller’s buffer. Returning the same buffer pointer in RAX completes the Windows x64 ABI for these struct-returning methods. A caller that uses the returned address can then read the descriptor it supplied storage for. I built the Windows GPU crate and ran all four affected vtable tests under Wine 11.22 with the GE vkd3d-proton 3.2 runtime. Each returned the exact caller pointer, preserved the tested descriptor fields, and returned null for a null output. These are synthetic ABI checks. Title progress and frame time were not measured. AI-assisted port and verification.
MamaLeVrai commented 2026-11-25 10:11:14 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T09:54:03Z.


Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head d1ba720 into main 9376fd6 in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails, with the same two errors as main itself on this machine (function placed_filler_twins is never used, field depth_written is never read, victory-gpu): this PR adds none and removes none. cargo test --workspace --locked: 542 passed, 0 failed, 10 ignored, two runs (main alone: 540 passed). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7158951605 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/819#issuecomment-7158951605). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T09:54:03Z. --- Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head `d1ba720` into `main` `9376fd6` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails, with the same two errors as `main` itself on this machine (`function placed_filler_twins is never used`, `field depth_written is never read`, `victory-gpu`): this PR adds none and removes none. `cargo test --workspace --locked`: 542 passed, 0 failed, 10 ignored, two runs (`main` alone: 540 passed). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/819:upstream-pr/819'
git switch 'upstream-pr/819'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/819'
git switch 'upstream-pr/819'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/819'
git switch 'upstream-pr/819'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/819'
git switch 'main'
git merge --squash 'upstream-pr/819'
git switch 'main'
git merge --ff-only 'upstream-pr/819'
git switch 'main'
git merge 'upstream-pr/819'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
fxceless/victory-fork!818
No description provided.