d3d12_xs: ask the host D3D12CreateDevice for feature level 11_0 (BL-2) #913
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!913
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/913/head"
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?
@kawaii-shakal on GitHub · 2026-11-24 15:10 UTC · original
kawaii-shakal:bl2-feature-level→main· +135 −8 · 5 files · 1 commits · merged 2026-11-24 20:30 UTCClaimed 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
main8f05e09e2, then rebased ontoa28927849with 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 (#337 / #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
@SweatierKey on GitHub · 2026-11-24 15:18 UTC · original · approved these changes
Independent verification on Windows 11 against
origin/main@a28927849:xs_proxy_mock_test.exe(cross-compiled withclang-cl+ xwin SDK 10.0.26100) and ran natively on Windows 11:[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).python3 -I tests/test_docs_links.py:16/16PASS.python3 -I scripts/check_no_game_data.py: clean.Clean implementation of
BL-2with thorough mock coverage across all 5 feature levels and error paths (E_POINTER,E_NOTIMPL,DXGI_ERROR_UNSUPPORTED,E_FAIL).AI-assisted: yes
@Timon360SB on GitHub · 2026-11-24 15:49 UTC · original
Testing results
Independently tested PR #913 against the baseline
on two NVIDIA-based Windows systems.
Tested revisions
a28927849adb4e40dfdec8c32fb6758dcd205a37245c959ea0a109904b0fb6f1f6f1bafee241f8f4Test environments
Test configuration
All selected build steps completed successfully
for BASE and HEAD on both systems.
CTest results
xs_proxy_mockdevice_proxyqueue_proxyd3d12_vulkan_devicevk_sync_validationAll 12 CTest invocations completed with exit code 0.
D3D12 feature-level detection
The HEAD revision successfully created the host
D3D12 device using feature level 11_0 as the
minimum requirement.
The WARP-backed device proxy test reported the
following highest feature levels:
Representative HEAD diagnostics:
System 1:
host device created at minimum feature level 11_0; highest level 12_1System 2:
host device created at minimum feature level 11_0; highest level 12_2The reported values remained consistent across
all three repetitions on each system.
These results originate from the WARP-backed
device proxy test and should not be interpreted
as the physical NVIDIA GPUs' maximum supported
D3D12 feature levels.
The different WARP results are reported as
observed; their underlying cause was not
independently investigated.
Mock feature-level coverage
The HEAD
xs_proxy_mocktest exercised thefollowing reported highest feature levels:
All five levels were observed in every HEAD
mock-test execution.
The complete mock test passed in all six HEAD
executions.
The nine intentionally refused allocations
reported by the mock test were also present
in BASE and are expected.
Device proxy
The device proxy tests completed with zero failures
on both revisions and both systems.
The executed checks covered:
No regressions were observed.
Queue proxy
All three tested backends passed in every
queue_proxyinvocation.The test coverage included:
The Vulkan backend reported no leaks during
the 12-round device, queue and fence lifetime
test.
The out-of-range vtable calls returning
E_NOTIMPLwere expected test scenarios,not execution failures.
D3D12 Vulkan device
The Vulkan device test completed successfully
on both physical GPUs.
The following operations were covered:
The heap description comparison produced
identical results across all executions:
The placed-resource clear comparison reported
the following results in every invocation:
The test reported these differences as being
within its 0.6 ULP tolerance.
The results were unchanged between BASE and HEAD
on both systems.
No new resource comparison failures were observed.
Vulkan synchronization validation
The synchronization validation self-test
produced the expected results in all executions.
The reported
WRITE_AFTER_WRITEhazard wasintentionally triggered by the self-test.
Synchronization validation was confirmed to
be active in all 12 self-test executions.
The Vulkan validation logs also contained:
VALIDATION-SETTINGSwarnings.WARNING-Setting-Limit-Adjustedwarnings.the required features were unavailable.
The warning categories and their counts remained
unchanged between BASE and HEAD.
No unexpected validation errors were identified
within the executed test scope.
Limitations
WARP and mock devices.
independently verified.
Conclusion
All selected tests passed consistently on both
systems and both tested revisions.
The HEAD revision successfully created WARP-backed
host devices with a minimum feature level of 11_0
and reported the highest available feature level
for each tested WARP environment.
The mock tests exercised reported feature levels
from 11_0 through 12_2 without test failures.
Device proxy, queue proxy, Vulkan device and
synchronization validation tests completed
successfully.
No functional regressions, unexpected validation
errors or test failures were observed between
BASE and HEAD within the tested scope.
Result: PASS — no regressions detected.
AI-assisted log analysis and report preparation.
@kawaii-shakal on GitHub · 2026-11-24 16:10 UTC · original
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.
@aslan2142 on GitHub · 2026-11-24 20:30 UTC · original
Merged. Nothing blocks this, the claim is valid and first, and two other contributors' Windows runs pass. Locally, a Wine build of
xs_proxy_mock_testonmain+ this PR passes the new case for every host level (11_0 to 12_2); withcreate_host_devicechanged back to 12_0, the run fails at the 11_0 host.The fix is right: the level
D3D12CreateDevicetakes is a minimum, so 11_0 turns no adapter away, and the title still sees the host's own top level through slot 13. Three small, optional points for a follow-up:d3d12_xs_device.cpp(create_host_device): the log line has "11_0" written in; it could formatkHostDeviceFloor. When theFEATURE_LEVELSquery fails, it prints "highest level 0_0"; "highest level unknown" would read better.xs_proxy_mock_test.cpp, thefake_create_device(…, D3D_FEATURE_LEVEL_12_0, …)check calls the mock directly, so it tests no shim code. A comment saying it only documents the old behaviour would help.d3d12_xs_device.handdocs/d3d12_xs_surface.md: "the lowest level D3D12 creates a device at" is a little too broad, becauseD3D_FEATURE_LEVEL_1_0_COREand1_0_GENERICare lower. "The lowest graphics feature level" would be exact.AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).