Skip to content

d3d12_vulkan_device_test: check requests the host runtime predates against the layer's clamp (Windows 10, #704) - #816

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
Proudnoob4:featq-win10-host-predates
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
Proudnoob4:featq-win10-host-predates

Conversation

@Proudnoob4

Copy link
Copy Markdown
Contributor

Claimed in #634 (comment); item ID pending. Follow-up to D3D-86 (#704); same family as TEST-97 (#717) and #597.

Problem. compare_feature_support requires the layer to give the host runtime's HRESULT for D3D12_FEATURE_SHADER_MODEL and D3D12_FEATURE_ROOT_SIGNATURE. Windows 10's d3d12.dll predates shader models 6.7–6.9 and root signature 1.2: it refuses those requests with E_INVALIDARG, where the newer runtime #704 was measured on clamps them. The layer clamps them by design (S_OK, 6.0 / 1.1), so d3d12_vulkan_device fails on every Windows 10 machine:

shader model request 0x67: ours hr=0x00000000 value 0x60; host hr=0x80070057 value 0x60
shader model request 0x68: ... (0x69 the same)
root signature request 0x03: ours hr=0x00000000 value 0x02; host hr=0x80070057 value 0x02
line 1339: feature_mismatches <= 0

Change (test only). The requests ascend, so the test remembers the highest one the host answered. A request above it that the host refuses with E_INVALIDARG is checked against the layer's own clamp (S_OK, min(request, 6.0) / min(request, 1.1)) instead of the host, and the count is printed: CheckFeatureSupport: 4 requests the host runtime predates (e.g. Windows 10) checked against the layer's clamp instead of the host. A wrong layer answer there is still a mismatch. On a runtime that answers every request, the new branch is never taken.

Tested on Windows 10 22H2 (10.0.19045), RTX 4080, NVIDIA 621.01, MSVC 14.44, Windows SDK 10.0.26100:

main 8df277f this change on 8df277f
d3d12_vulkan_device_test FAIL (line 1339, 4 mismatches) pass
ctest (with LEONIDA_GAME_DIR, LEONIDA_TEST_DIR on an unscanned folder) d3d12_vulkan_device fails 31/31

The same run also took both of #717's Windows 10 branches: GetCopyableFootprints: 1 unaligned block-compressed cases skipped, and Resolve comparison: the host runtime has no ID3D12GraphicsCommandList7; ResolveSubresourceRegion cases are skipped (15 compared, 15 matched, 0 mismatches).

The branch sits on #704's own head (2112681) rather than current main, because my token can't push main's workflow changes to my fork. A trial merge with main 8df277f has no conflicts and gives a tree identical to the one tested above. Not run on Windows 11, where the host answers every request. No game data. AI-assisted (Claude Code in OpenCode): it wrote the change and ran these on this machine.

…ainst the layer's clamp

Windows 10's d3d12.dll refuses shader models 6.7-6.9 and root signature 1.2 with E_INVALIDARG, where a newer runtime clamps them, so the SHADER_MODEL / ROOT_SIGNATURE comparison from ItsNotRexed#704 counted 4 mismatches on every Windows 10 machine. A request above the highest one the host answered is now checked against the layer's own clamp (S_OK, 6.0 / 1.1) instead, and the count is printed.
@ItsNotRexed
ItsNotRexed merged commit 37e7f78 into ItsNotRexed:main Nov 22, 2026
10 checks passed
rasptum added a commit to rasptum/Leonida that referenced this pull request Nov 22, 2026
ID3D12DescriptorHeap::GetDesc and ID3D12Resource::GetHeapProperties echoed their inputs. On the host, a node
mask of 0 reads back as 1 (one node), and a committed resource reports the heap flags the runtime resolves:
its own flags, without CREATE_NOT_RESIDENT and CREATE_NOT_ZEROED, plus DENY_* bits for the resource classes
it is not (buffers 0xC0, textures without render-target or depth use 0x44, the others 0x84).

Measured with a probe on the default adapter (RTX 3060, driver 596.36) and WARP, Windows 10 19041 runtime.
d3d12_node_mask_test compares 18 heap cases and 8 descriptor heap cases with the host on both; before this
change every descriptor heap with node mask 0 and every committed buffer or texture differed on each reference. Not in ctest, like d3d12_resource_desc_test.

AI-assisted (Claude Code). Tested: d3d12_node_mask_test with and without LEONIDA_VK_VALIDATION=1 (0 validation
errors); full ctest, where d3d12_vulkan_device fails on CheckFeatureSupport shader model and root signature
(Windows 10 host predates them, ItsNotRexed#816), as on main.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants