CLI: add opt-in host D3D12 preflight #1502

Closed
degradka wants to merge 1 commit from upstream-pr/1503 into main
degradka commented 2026-11-24 18:33:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by degradka on 2026-11-24T18:33:50Z.


What changes

victory run --execute --require-host now verifies the host D3D12 device before mapping and starting the title. If it cannot create a usable host, it reports the underlying device error and stops before title code runs.

  • The preflight is opt-in; plain run --execute retains the documented main-branch host() -> None behavior.
  • Host creation rejects shader models below 6.6 because translated pipelines require it, and reports the level the device returned.
  • A CheckFeatureSupport failure is propagated instead of being misreported as a shader-model level.

Crash evidence and scope

The original access violation was observed on the reporting Windows 11 build 22000 machine at title RVA +0xb5a5f8 (read 0x68). I did not establish that missing Shader Model 6.6 caused it, and this PR no longer claims to fix that crash. It provides an explicit preflight for users who prefer a clear configuration error over launching without a usable host device.

Validation

  • cargo test --locked -p victory --bin victory: 2 passed.
  • cargo check --locked -p victory-hle -p victory-gpu: passed.
  • cargo test --locked -p victory-gpu --lib: 50 passed, 1 benchmark ignored.
  • Verified victory run --help exposes --require-host.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6588754480 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1503). Originally posted by [degradka](https://github.com/degradka) on 2026-11-24T18:33:50Z. --- ## What changes victory run <exe> --execute --require-host now verifies the host D3D12 device before mapping and starting the title. If it cannot create a usable host, it reports the underlying device error and stops before title code runs. - The preflight is opt-in; plain run --execute retains the documented main-branch host() -> None behavior. - Host creation rejects shader models below 6.6 because translated pipelines require it, and reports the level the device returned. - A CheckFeatureSupport failure is propagated instead of being misreported as a shader-model level. ## Crash evidence and scope The original access violation was observed on the reporting Windows 11 build 22000 machine at title RVA +0xb5a5f8 (read 0x68). I did not establish that missing Shader Model 6.6 caused it, and this PR no longer claims to fix that crash. It provides an explicit preflight for users who prefer a clear configuration error over launching without a usable host device. ## Validation - cargo test --locked -p victory --bin victory: 2 passed. - cargo check --locked -p victory-hle -p victory-gpu: passed. - cargo test --locked -p victory-gpu --lib: 50 passed, 1 benchmark ignored. - Verified victory run --help exposes --require-host.
Marvisak commented 2026-11-25 04:06:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T03:28:59Z.


Automated triage for the maintainers.

Needs work. This requires shader model 6.6 in create (crates/victory-gpu/src/host.rs) and stops run --execute early through a new ensure_host.

  1. The new error message tells users to build with --features agility and run cargo xtask agility. Neither exists in main (they come from the unmerged #175), so it points users to commands that do not exist.
  2. main documents host() returning None as deliberate ("a run then behaves as before: nothing executes"). Making the host device a hard requirement for every run is a policy change for the maintainer to decide.

Please reword the message to something that is true on main, and say on which hosts this stopped the access violation you describe. CI has not run.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7151956080 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1503#issuecomment-7151956080). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T03:28:59Z. --- <!-- victory-triage v1 head=5a25850411e00846e37afb2ff7454030232ff96a verdict=needs-work at=2026-11-25T03:31:40Z --> Automated triage for the maintainers. **Needs work.** This requires shader model 6.6 in `create` (`crates/victory-gpu/src/host.rs`) and stops `run --execute` early through a new `ensure_host`. 1. The new error message tells users to build with `--features agility` and run `cargo xtask agility`. Neither exists in `main` (they come from the unmerged #175), so it points users to commands that do not exist. 2. `main` documents `host()` returning `None` as deliberate ("a run then behaves as before: nothing executes"). Making the host device a hard requirement for every run is a policy change for the maintainer to decide. Please reword the message to something that is true on `main`, and say on which hosts this stopped the access violation you describe. CI has not run. --- _Generated by [Claude Code](https://claude.ai/code)_
upstream-sync changed title from [PR #1503] GPU: fail fast when the host D3D12 runtime is unusable to [PR #1503] CLI: add opt-in host D3D12 preflight 2026-11-25 09:04:29 +00:00
upstream-sync closed this pull request 2026-11-25 09:04:29 +00:00
degradka commented 2026-11-25 09:06:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by degradka on 2026-11-25T08:22:21Z.


Thanks — revised to keep the host requirement opt-in via run --execute --require-host; the default path still follows the documented main-branch host() -> None fallback. I also removed the unmerged Agility commands and now propagate CheckFeatureSupport errors instead of printing an invented shader-model level.

I cannot honestly name a host where this patch stopped the access violation: the only evidence is the Windows 11 build 22000 crash recorded in the updated description, without proof that SM 6.6 was the cause. The PR now describes this as a preflight tool, not as a crash fix.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7156943625 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1503#issuecomment-7156943625). Originally posted by [degradka](https://github.com/degradka) on 2026-11-25T08:22:21Z. --- Thanks — revised to keep the host requirement opt-in via run --execute --require-host; the default path still follows the documented main-branch host() -> None fallback. I also removed the unmerged Agility commands and now propagate CheckFeatureSupport errors instead of printing an invented shader-model level. I cannot honestly name a host where this patch stopped the access violation: the only evidence is the Windows 11 build 22000 crash recorded in the updated description, without proof that SM 6.6 was the cause. The PR now describes this as a preflight tool, not as a crash fix.
degradka commented 2026-11-25 09:06:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by degradka on 2026-11-25T08:38:59Z.


Closing this. I hit an access violation on an older Windows 11 build (22000) and assumed missing shader model 6.6 was the cause, but I never confirmed that, and the title runs on my current machine. The patch also made create return no device below SM 6.6, which is a policy change for you to decide, not something to slip in. Sorry for the noise. I'll open a new PR if I can reproduce a crash and trace it to a cause.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7157298963 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1503#issuecomment-7157298963). Originally posted by [degradka](https://github.com/degradka) on 2026-11-25T08:38:59Z. --- Closing this. I hit an access violation on an older Windows 11 build (22000) and assumed missing shader model 6.6 was the cause, but I never confirmed that, and the title runs on my current machine. The patch also made create return no device below SM 6.6, which is a policy change for you to decide, not something to slip in. Sorry for the noise. I'll open a new PR if I can reproduce a crash and trace it to a cause.

Pull request closed

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
Marvisak/VIctory!1502
No description provided.