GPU: match failed feature-level query results #2929
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2931"
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?
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T00:26:50Z.
Summary
Match the
D3D12_FEATURE_FEATURE_LEVELSfailure results. An empty list returnsE_INVALIDARGand leavesMaxSupportedFeatureLeveluntouched. A nonempty list with no supported level returnsDXGI_ERROR_UNSUPPORTEDand writes zero. A successful query still reports the highest requested level within the console's 12_2 ceiling.Verification
0x1234. Requests[0]and[0xd000]returnDXGI_ERROR_UNSUPPORTEDand write zero. A valid mixed request succeeds;[0xb000, 0xb123]returns0xb123.63bcca4observes the wrong empty-list status, a stale output above the ceiling, and success for[0]. It passes all three cases with this change and preserves the success and wrong-size controls. The query structure is documented in Microsoft's feature-level API reference.Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T00:29:36Z.
Review: COMMENTED
Verified: count==0 is now rejected alongside null (matching D3D12's E_INVALIDARG for an empty level list), and
highestis written unconditionally — 0 on failure — so a caller can't mistake a stale value for a result. The UNTOUCHED sentinel test pins the write-on-failure contract. LGTM.Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T00:42:43Z.
Code review and RTX 5090 + WARP verification at head
e15a3d35b560merged cleanly ontomain(63bcca43c6a0):crates/victory-gpu/src/device.rs:354-373): ReturnsE_INVALIDARGearly without mutatingquery.highestwhenquery.count == 0 || query.requested.is_null(); otherwise writes the highest requested level<= HIGHEST_FEATURE_LEVEL(0xc200, or0if none qualify) and returnsDXGI_ERROR_UNSUPPORTED(0x887A0004) whenquery.highest == 0(covering both all-above-max like[0xd000]and all-zero[0]), matching native D3D12CheckFeatureSupport(FEATURE_LEVELS).VICTORY_D3D12_DEBUG=1, Rust 1.98.1):cargo clippy -p victory-gpu --all-targets --locked -- -D warnings(default +--features diagnostics): 0 warnings;cargo test -p xtask --locked: 6/6 passeddevice::tests: 8/8 passed on both RTX 5090 and WARPdescriptor::host::tests+host::tests+pipeline::host::tests: 31/31 passed on WARP; 30/31 on RTX 5090 (only pre-existing NVIDIA 1M heap-cap baselinedynamic_slots_are_held_until_released)victory-gpu --lib --features diagnostics(skippingpresent_plane_tests): 245/245 passed, 1 ignored.Clean and accurate; LGTM.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T04:25:37Z.
Automated triage for the maintainers.
Needs work.
feature_levelsinvictory-gpu/src/device.rsnow returnsE_INVALIDARGfor an empty request andDXGI_ERROR_UNSUPPORTED(writing 0) when no level is supported. That matches the desktop WARP behaviour measured, but these are the console runtime's return values, and nothing shows the title ever sends such a request, so as it stands this guards paths the title may never reach. Please point to a title call that hits one of these paths, or to the console runtime's documented behaviour, and stop asserting acceptance of non-level values such as0xb123unless that is shown.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.