port: fall back to ID3D12Device3 when Device13 is unavailable #4160

Closed
github-bot wants to merge 2 commits from github-bot/gh-4160 into main AGit
Owner

@⁠tharun-37 on GitHub · 2026-11-30 16:53 UTC · original
tharun-37:fix/port-constants-device3-fallback → main · +15 −5 · 3 files · 2 commits · closed without merging

Fixes #3938.

What / why

On Windows 11 23H2 and earlier, ID3D12Device13::OpenExistingHeapFromAddress1 is not available. The renderer port (VICTORY_PORT_CONSTANTS=1) tried to use it and silently fell back to CPU copies, losing the −18 ms CPU/frame benefit.

What is in it

  • inplace::open: for From::Part, try ID3D12Device13 first; if the cast fails, fall back to ID3D12Device3::OpenExistingHeapFromAddress. The port's view always starts at the beginning of the allocated block, so the address-only call meets its requirement.
  • Updated the WARP test to run the fallback path (no longer skips when Device13 is absent).

Tested

  • cargo check -p victory-gpu --lib: passes.
  • cargo test -p victory-gpu --lib inplace:: port::: 10 tests pass (8 inplace + 2 port).
  • Full cargo test -p victory-gpu --lib: 452 passed, 0 failed, 36 ignored.

Not tested

  • No Windows 11 23H2 hardware available; the fallback logic is exercised on WARP (which lacks Device13).

AI use

  • AI-assisted (OpenCode): wrote the fix, test update, commit message and PR text.
**@⁠tharun-37** on GitHub · 2026-11-30 16:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4160) `tharun-37:fix/port-constants-device3-fallback` → `main` · +15 −5 · 3 files · 2 commits · closed without merging Fixes #3938. **What / why** On Windows 11 23H2 and earlier, `ID3D12Device13::OpenExistingHeapFromAddress1` is not available. The renderer port (`VICTORY_PORT_CONSTANTS=1`) tried to use it and silently fell back to CPU copies, losing the −18 ms CPU/frame benefit. **What is in it** - `inplace::open`: for `From::Part`, try `ID3D12Device13` first; if the cast fails, fall back to `ID3D12Device3::OpenExistingHeapFromAddress`. The port's view always starts at the beginning of the allocated block, so the address-only call meets its requirement. - Updated the WARP test to run the fallback path (no longer skips when Device13 is absent). **Tested** - `cargo check -p victory-gpu --lib`: passes. - `cargo test -p victory-gpu --lib inplace:: port::`: 10 tests pass (8 inplace + 2 port). - Full `cargo test -p victory-gpu --lib`: 452 passed, 0 failed, 36 ignored. **Not tested** - No Windows 11 23H2 hardware available; the fallback logic is exercised on WARP (which lacks Device13). **AI use** - AI-assisted (OpenCode): wrote the fix, test update, commit message and PR text.
On Windows 11 23H2 and earlier, ID3D12Device13::OpenExistingHeapFromAddress1 is not available, causing PORT_CONSTANTS to silently fall back to CPU copies. The port's view always starts at the beginning of the allocated block, so ID3D12Device3::OpenExistingHeapFromAddress meets the address requirement. Fall back to it when Device13 cast fails.

Fixes #3938.

AI-assisted (OpenCode).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 16:57:53 +00:00
github-bot closed this pull request 2026-12-01 18:50:39 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:46 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4160#issuecomment-7321516229) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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/trustno1-coder--VIctory-NVIDIA!4160
No description provided.