D3D12: validate runtime capabilities before title initialization #1288

Open
github-bot wants to merge 2 commits from github-bot/gh-1288 into main AGit
Owner

@⁠spk-c on GitHub · 2026-11-26 10:54 UTC · original
spk-c:submit/d3d12-runtime-preflight → main · +102 −20 · 5 files · 2 commits · open

AI-assisted.

Summary

Propagate host D3D12 initialization failures to the runner, including their HRESULT. Before reading or mapping an executable for execution, require Shader Model 6.6 and Resource Binding Tier 3 on the device the renderer will use, then create a minimal root signature with the production Direct Indexing flags. Keep offline binding available on unsupported systems.

Handle absent root signature bytes explicitly and avoid dereferencing an empty diagnostic blob. Allocate the fence event after the descriptor heaps so a heap initialization error cannot leave that event open.

On the same adapter, a standalone synthetic probe reproduced E_INVALIDARG for the Direct Indexing flags with the system runtime at SM 6.5. With a verified Agility SDK the same signature succeeded. Microsoft DirectX specification

Validation

  • Workspace Cargo Check, all-target/all-feature Clippy with warnings denied, full asset policy and git diff --check passed.
  • Three synthetic regression tests passed for SM 6.5, SM 6.6 with binding tiers 2 and 3, and preservation of an injected D3D12 initialization HRESULT.
  • Native CLI smoke test returned a capability error before reading a deliberately missing file. Offline binding reported the expected file error.
  • An independent test executable linked the same preflight function and passed on real SM 6.6 hardware with the app-local Agility SDK.

Scope and current verification

The earlier access violation reading address 0x68 occurred after Direct Indexing root-signature rejection. Its causal path is still unproven. This change rejects unsupported runtimes early; it is not a claim to repair the original title dereference or every individual PSO failure.

The three synthetic regressions, Cargo Check, both strict Clippy configurations and the asset policy (220 files) were repeated on exact head ff4530a06395a119e9843b4da69636a7f2cef2d8 against 06702fe. The CLI and standalone Agility checks above are documented prior evidence. Integrated fork main 02c8d6c passed independent GitHub CI (654 passed, 21 ignored, no failures); that is not upstream exact-head CI. This complements #402, #69, #286, #183 and #1051. No performance claim or title assets.

Independent startup datapoint

GodlyBDS's report on RTX 3090 Ti / Windows 10 19045 compared older fork 58de9bf with local Agility export patch 5eb5156. Verified loaded D3D12Core.dll 1.620.2; startup reached the start screen/account prompts and timed stop exited 0, whereas inbox runtime failed before world entry. This complements the capability preflight but did not test the exact #1288 head, its diagnostics or in-world rendering. See original report.

Refresh against upstream 52ac4ec

New head 2a1a1228459f6aa4435306883e26b08503d55d7d. Clean isolated workspace Cargo Check and strict all-feature Clippy passed, together with all three focused preflight regressions. Original external startup evidence remains scoped to its older revisions. CI approval and upstream asset-policy fix #1357 remain pending.

**@⁠spk-c** on GitHub · 2026-11-26 10:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/1288) `spk-c:submit/d3d12-runtime-preflight` → `main` · +102 −20 · 5 files · 2 commits · open AI-assisted. ## Summary Propagate host D3D12 initialization failures to the runner, including their HRESULT. Before reading or mapping an executable for execution, require Shader Model 6.6 and Resource Binding Tier 3 on the device the renderer will use, then create a minimal root signature with the production Direct Indexing flags. Keep offline binding available on unsupported systems. Handle absent root signature bytes explicitly and avoid dereferencing an empty diagnostic blob. Allocate the fence event after the descriptor heaps so a heap initialization error cannot leave that event open. On the same adapter, a standalone synthetic probe reproduced E_INVALIDARG for the Direct Indexing flags with the system runtime at SM 6.5. With a verified Agility SDK the same signature succeeded. [Microsoft DirectX specification](https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_DynamicResources.html#device-capability) ## Validation - Workspace Cargo Check, all-target/all-feature Clippy with warnings denied, full asset policy and git diff --check passed. - Three synthetic regression tests passed for SM 6.5, SM 6.6 with binding tiers 2 and 3, and preservation of an injected D3D12 initialization HRESULT. - Native CLI smoke test returned a capability error before reading a deliberately missing file. Offline binding reported the expected file error. - An independent test executable linked the same preflight function and passed on real SM 6.6 hardware with the app-local Agility SDK. ## Scope and current verification The earlier access violation reading address `0x68` occurred after Direct Indexing root-signature rejection. Its causal path is still unproven. This change rejects unsupported runtimes early; it is not a claim to repair the original title dereference or every individual PSO failure. The three synthetic regressions, Cargo Check, both strict Clippy configurations and the asset policy (220 files) were repeated on exact head `ff4530a06395a119e9843b4da69636a7f2cef2d8` against `06702fe`. The CLI and standalone Agility checks above are documented prior evidence. Integrated fork main `02c8d6c` passed [independent GitHub CI](https://github.com/spk-c/victory-fork/actions/runs/45806009689) (654 passed, 21 ignored, no failures); that is not upstream exact-head CI. This complements #402, #69, #286, #183 and #1051. No performance claim or title assets. ## Independent startup datapoint [GodlyBDS's report](https://git.gtahub.st/github/fxceless--victory-fork/pulls/1288) on RTX 3090 Ti / Windows 10 19045 compared older fork `58de9bf` with local Agility export patch `5eb5156`. Verified loaded D3D12Core.dll 1.620.2; startup reached the start screen/account prompts and timed stop exited 0, whereas inbox runtime failed before world entry. This complements the capability preflight but did not test the exact #1288 head, its diagnostics or in-world rendering. See original report. ## Refresh against upstream 52ac4ec New head `2a1a1228459f6aa4435306883e26b08503d55d7d`. Clean isolated workspace Cargo Check and strict all-feature Clippy passed, together with all three focused preflight regressions. Original external startup evidence remains scoped to its older revisions. CI approval and upstream asset-policy fix #1357 remain pending.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:19:55 +00:00
Author
Owner

@⁠GodlyBDS on GitHub · 2026-11-26 16:04 UTC · original

Independent startup evidence for the Windows 10 capability check on an RTX 3090 Ti (driver 32.0.16.2140, Windows 10 19045). I compared the fork's 58de9bf4c367d4e27f6dd5da523ca2f68951bc77 with a local executable-export patch 5eb515638745576d6284e4ca73eeacefc162397f built from that revision. Both were cargo build --profile diag -p victory --features diagnostics -j 30 with Rust 1.98.1 MSVC.

With the inbox runtime the title failed before the world with an access violation. The export patch used SDK version 620 and app-relative .\D3D12\ for the separately staged Microsoft runtime. The process's loaded module list verified D3D12Core.dll 1.620.2 with the normal system d3d12.dll and dxgi.dll. It initialized the host device, reached the start screen/account prompts and stopped cleanly with exit 0 in the timed startup test.

This is a startup datapoint on the older fork and complements the preflight on this PR. The successful SDK route is also documented for a different GPU in Marvisak/VIctory#2563. The exact #1288 head, its diagnostics, and in-world rendering were outside this check. Claude Code ran the archived startup tests. OpenAI Codex (GPT-6 family) checked the module and build records and drafted this report.

**@⁠GodlyBDS** on GitHub · 2026-11-26 16:04 UTC · [original](https://github.com/fxceless/victory-fork/pull/1288#issuecomment-7197153104) Independent startup evidence for the Windows 10 capability check on an RTX 3090 Ti (driver 32.0.16.2140, Windows 10 19045). I compared the fork's `58de9bf4c367d4e27f6dd5da523ca2f68951bc77` with a local executable-export patch `5eb515638745576d6284e4ca73eeacefc162397f` built from that revision. Both were `cargo build --profile diag -p victory --features diagnostics -j 30` with Rust 1.98.1 MSVC. With the inbox runtime the title failed before the world with an access violation. The export patch used SDK version 620 and app-relative `.\D3D12\` for the separately staged Microsoft runtime. The process's loaded module list verified `D3D12Core.dll` 1.620.2 with the normal system `d3d12.dll` and `dxgi.dll`. It initialized the host device, reached the start screen/account prompts and stopped cleanly with exit 0 in the timed startup test. This is a startup datapoint on the older fork and complements the preflight on this PR. The successful SDK route is also documented for a different GPU in [Marvisak/VIctory#2563](https://github.com/Marvisak/VIctory/issues/2563). The exact #1288 head, its diagnostics, and in-world rendering were outside this check. Claude Code ran the archived startup tests. OpenAI Codex (GPT-6 family) checked the module and build records and drafted this report.
AI-assisted: keep original tested commit in history; local all-feature check, strict Clippy and focused tests passed. Upstream asset-policy baseline remains open (#1357).
This pull request can be merged automatically.
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/1288/head:github-bot/gh-1288'
git switch 'github-bot/gh-1288'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1288'
git switch 'github-bot/gh-1288'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1288'
git switch 'github-bot/gh-1288'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1288'
git switch 'main'
git merge --squash 'github-bot/gh-1288'
git switch 'main'
git merge --ff-only 'github-bot/gh-1288'
git switch 'main'
git merge 'github-bot/gh-1288'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.