GPU: reject unknown shader model feature requests #2947
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2947
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2947"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 01:16 UTC · original
andrewpozdnakov7-jpg:codex2/shader-model-query→main· +21 −0 · 1 files · 1 commits · openCheckFeatureSupport(D3D12_FEATURE_SHADER_MODEL) was treating any integer as a version and returning success. D3D12 applications use E_INVALIDARG on an unknown request to try an older model. This change rejects undefined model requests before writing the result. Requests for the defined models 5.1 and 6.0 through 6.10 report up to the guest's SM 6.6 ceiling. Microsoft D3D12 contract, DirectX-Headers enum at 61c7718.
Validation
Native Windows FL 11_0 WARP with inbox D3D12 and with app-local Agility 1.620.2 both return E_INVALIDARG and retain the input for the seven invalid values in the test. The app-local runtime accepts a 6.10 request and reports its supported 6.9.
The same VIctory device-vtable fixture on main at
63bcca43reports S_OK for the zero/no-model request. The updated result is E_INVALIDARG with the original field value for all seven invalid requests. All 12 defined requests get the expected model at or below SM 6.6.Nine device tests and the full app-local WARP GPU diagnostics suite passed (247 passed, one ignored). Strict GPU Clippy in both feature configurations and the asset policy passed.
AI-assisted. Verification used synthetic inputs on software WARP.
@fuzeofficlal on GitHub · 2026-11-26 01:31 UTC · original
Code review and RTX 5090 + WARP verification at head
1735e200d1a3onmain(63bcca43c6a0):crates/victory-gpu/src/device.rs:329-339):size != 4E_INVALIDARGchecks, rejects undefined shader-model values outside0x51 | 0x60..=0x6awithE_INVALIDARGwithout mutating*q, and clamps valid requests to(*q).min(0x66)(S_OK), matching native D3D12CheckFeatureSupport(SHADER_MODEL).VICTORY_D3D12_DEBUG=1, Rust 1.98.1):cargo xtask policy:191 files ok;cargo clippy --locked -p victory-gpu --tests -- -D warnings: 0 warningsvictory-gpu -- device::tests: 9/9 passed on both RTX 5090 and WARP.LGTM.
@Marvisak on GitHub · 2026-11-26 04:29 UTC · original
Automated triage for the maintainers.
Needs work.
check_feature_supportfor SHADER_MODEL (victory-gpu/src/device.rs) would return E_INVALIDARG for values other than 5.1 and 6.0 through 6.10. The evidence is the desktop runtime on WARP, but this device stands in for the console's runtime, and nothing shows the title or its upscaler sends an undefined value. Please show that the title can send such a request, or give a reference for how the console runtime answers; otherwise this guards a case that does not occur and adds a hard upper bound (0x6a) nothing needs.CI: passing.
Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.