Repository navigation
d3d12_xs: ask the host D3D12CreateDevice for feature level 11_0 (BL-2) - #913
Conversation
The host path of D3D12XboxCreateDevice asked the PC D3D12CreateDevice for minimum feature level 12_0, which a comment called the least restrictive floor. It is the other way round: the minimum refuses every adapter below it, so a host that tops out at 11_x failed with E_INVALIDARG (docs/boot_leads.md BL-2). rt::d3d12_xs::create_host_device asks for kHostDeviceFloor = 11_0, the lowest level D3D12 creates a device at; the device keeps its highest level, which FEATURE_LEVELS reports and the log prints (max_feature_level). xs_proxy_mock_test drives it with mock hosts that top out at 11_0, 11_1, 12_0, 12_1 and 12_2. Each one is created at 11_0, the device proxy's slot 13 reports the host's own top level, and the failure paths (no host function, failing host, S_OK with no device) clear the output. With 12_0 as the floor the 11_x hosts fail. The Vulkan-backed device takes no feature level and stays at 12_1 (no ray tracing tier, no sampler feedback). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SweatierKey
left a comment
There was a problem hiding this comment.
Independent verification on Windows 11 against origin/main@a28927849:
- Built
xs_proxy_mock_test.exe(cross-compiled withclang-cl+ xwin SDK 10.0.26100) and ran natively on Windows 11:- Logged
[rt] d3d12_xs: host device created at minimum feature level 11_0; highest level {11_0, 11_1, 12_0, 12_1, 12_2}across all 5 mock host levels. xs_proxy_mock_test: PASS (9 allocations refused on purpose)(rc=0).
- Logged
python3 -I tests/test_docs_links.py:16/16PASS.python3 -I scripts/check_no_game_data.py: clean.
Clean implementation of BL-2 with thorough mock coverage across all 5 feature levels and error paths (E_POINTER, E_NOTIMPL, DXGI_ERROR_UNSUPPORTED, E_FAIL).
AI-assisted: yes
Testing resultsIndependently tested PR #913 against the baseline Tested revisions
Test environments
Test configuration
All selected build steps completed successfully CTest results
All 12 CTest invocations completed with exit code 0. D3D12 feature-level detectionThe HEAD revision successfully created the host The WARP-backed device proxy test reported the
Representative HEAD diagnostics: System 1: System 2: The reported values remained consistent across These results originate from the WARP-backed The different WARP results are reported as Mock feature-level coverageThe HEAD
All five levels were observed in every HEAD The complete mock test passed in all six HEAD The nine intentionally refused allocations Device proxyThe device proxy tests completed with zero failures The executed checks covered:
No regressions were observed. Queue proxyAll three tested backends passed in every The test coverage included:
The Vulkan backend reported no leaks during The out-of-range vtable calls returning D3D12 Vulkan deviceThe Vulkan device test completed successfully The following operations were covered:
The heap description comparison produced
The placed-resource clear comparison reported
The test reported these differences as being The results were unchanged between BASE and HEAD No new resource comparison failures were observed. Vulkan synchronization validationThe synchronization validation self-test
The reported Synchronization validation was confirmed to The Vulkan validation logs also contained:
The warning categories and their counts remained No unexpected validation errors were identified Limitations
ConclusionAll selected tests passed consistently on both The HEAD revision successfully created WARP-backed The mock tests exercised reported feature levels Device proxy, queue proxy, Vulkan device and No functional regressions, unexpected validation Result: PASS — no regressions detected. AI-assisted log analysis and report preparation. |
|
Thanks @Timon360SB and @SweatierKey for the runs. The 12_1 vs 12_2 WARP difference is what this change is meant to let through. The floor is only the minimum, so each host device reports its own top level. My guess is that the Windows 28000 system ships a newer WARP/D3D12 runtime that exposes 12_2, while 26200 and my 26300 report 12_1, but I have not checked that. Either way the proxy forwards the device's own answer. The Vulkan-backed device stays at 12_1 regardless, since it reports no ray tracing tier and no sampler feedback. |
|
Merged. Nothing blocks this, the claim is valid and first, and two other contributors' Windows runs pass. Locally, a Wine build of The fix is right: the level
AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5). |
Claimed in the coordination issue as: BL-2 (claim). See docs/boot_leads.md §BL-2.
What and why
The host path of
D3D12XboxCreateDevice(runtime/shims/d3d12_xs.cpp) called the PCD3D12CreateDevicewithD3D_FEATURE_LEVEL_12_0as the minimum. The comment called that "the least restrictive floor", but it is the other way round: the minimum refuses every adapter below it, so a host that tops out at 11_x failed withE_INVALIDARG(BL-2's finding, and @abnalstlll-byte's in #14). Asking for 11_0 refuses nothing the title could run on, and the device keeps its highest level.rt::d3d12_xs::create_host_device(create, adapter, out)asks forkHostDeviceFloor= 11_0, the lowest level D3D12 creates a device at. It clears*outon every failure: a null host function givesE_NOTIMPL, andS_OKwith no device givesE_FAIL. It also logs the device's top level, for example "host device created at minimum feature level 11_0; highest level 12_1".max_feature_level(device)returns the top of 11_0…12_2 fromD3D12_FEATURE_FEATURE_LEVELS.D3D12XboxCreateDeviceusescreate_host_device. The rest of that function is unchanged.LEONIDA_D3D12=vulkan) takes no feature level. It still answersFEATURE_LEVELSup to 12_1, because it reports no ray tracing tier and no sampler feedback, and 12_2 needs both. That is what the lead asks for: "12_2 only where mesh shaders and ray tracing are present".Tests
xs_proxy_mock_test, newcheck_host_device_floor, with no D3D12 runtime and no GPU:CheckFeatureSupport) reports that level;S_OKwith no device, and a null output.Mutation check: with
create_host_deviceasking for 12_0,xs_proxy_mock_testfails at the 11_0 host.Tested
Windows 11 Pro 26300, MSVC 19.50.35721.0, Vulkan SDK 1.4.363.0. Tested on
main8f05e09, then rebased onto a289278 with no conflicts.ctest -R "xs_proxy|d3d12_xs|device_proxy|queue_proxy": 9/9 passed. The WARP and RTX 5070 Ti host devices log "highest level 12_1".ctest -C RelWithDebInfo: 295 run, 294 passed. The one failure isd3d12_execute_indirect_validation, which fails onmaintoo (d3d12: ExecuteIndirect accepts the argument ranges newer D3D12 runtimes accept (D3D-EXECIND-RANGE) #337 / d3d12_execute_indirect_validation_test: handle Windows 11 26300 relaxed max=0 and padded-stride bounds #306).python -I scripts/check_no_game_data.pyon the changed files: clean.tests/test_docs_*.py: all pass excepttest_docs_links, which flagsdocs/boot_leads.md→CONTRIBUTING.md. That file is not touched here; the failure comes frommain.Not reproduced: the original 11_x failure on a Wine/Proton host (none available here). The mock host stands in for it.
GPUs tested: NVIDIA GeForce RTX 5070 Ti (Blackwell, PCI 10de:2c05), driver 617.42, Vulkan 1.4.351, Windows 11 Pro 26300; WARP for the host-device path.
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code