Skip to content

Runtime: node masks and resolved heap flags as the host reports them - #838

Merged
ItsNotRexed merged 2 commits into
ItsNotRexed:mainfrom
rasptum:d3d-hunt-rasptum
Nov 22, 2026
Merged

ItsNotRexed merged 2 commits into
ItsNotRexed:mainfrom
rasptum:d3d-hunt-rasptum

Conversation

@rasptum

@rasptum rasptum commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: #634 (comment)

What and why

ID3D12DescriptorHeap::GetDesc and ID3D12Resource::GetHeapProperties echoed their inputs. The host runtime reports:

  • a node mask of 0 as 1 (one node on a single adapter), for descriptor heaps and committed resources;
  • for committed resources, the resolved heap flags: the caller's flags without CREATE_NOT_RESIDENT and CREATE_NOT_ZEROED, plus the DENY_* bits of the resource classes the resource is not (buffers 0xC0, textures without render-target or depth use 0x44, render-target and depth textures 0x84).

The layer now does the same. The new d3d12_node_mask_test compares both getters with the host and with WARP. It is registered like d3d12_resource_desc_test (run explicitly on a Vulkan GPU, not in ctest).

Tested

  • RTX 3060, driver 596.36, Windows 10 Pro 19045 (d3d12.dll 10.0.19041): d3d12_node_mask_test matches on all 18 heap cases and all 8 descriptor heap cases, against the default adapter and WARP.
  • Negative control: against main's shim the same test fails, with all 18 heap cases and the 4 descriptor heaps given node mask 0 differing on each reference.
  • With LEONIDA_VK_VALIDATION=1: 0 validation errors.
  • Full ctest: 31 of the 32 tests that run pass (gameinput is disabled). d3d12_vulkan_device fails on CheckFeatureSupport (shader model and root signature) on this Windows 10 host, as it does on main; #816 addresses that.
  • Not run: other GPUs, Windows 11, Intel or AMD hardware. 1D textures are not in the test.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

rasptum and others added 2 commits November 21, 2026 22:46
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>
A mismatch now prints the node masks and heap flags the case asked for (the four mask cases share a name).
Corrects a comment that said CREATE_NOT_ZEROED is kept (the host drops it), and wraps lines over 120 columns.
No change to what is compared: 18 of 18 heap and 8 of 8 descriptor heap cases match on the default adapter
and WARP; against main's shim 18 heap and 4 descriptor heap cases differ on each.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@quackottu quackottu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 60d4324 on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1 and LEONIDA_D3D12=vulkan: pass

  • ctest -C RelWithDebInfo: 100% tests passed, 0 tests failed out of 32
  • d3d12_node_mask_test (changed here): exit=0 validation=0 | [rt] d3d12: default-heap buffers are not zero-filled yet; dimension 1
  • 33 test programs in the build pass with 0 validation errors
  • d3d12_clear_test fails (R8G8B8A8_UNORM/SNORM 0.5 ties and a D16 clear byte differ from WARP) exactly as on main 4a36bb1 here, so not from this PR; #521 addresses it

Implicit Vulkan layers (overlays) were off through an empty VK_IMPLICIT_LAYER_PATH.

@ItsNotRexed
ItsNotRexed merged commit 59e757e into ItsNotRexed:main Nov 22, 2026
10 checks passed
ItsNotRexed pushed a commit that referenced this pull request Nov 22, 2026
The host D3D12 runtime reports NodeMask 1 for a direct, compute or copy
queue created with 0 on a single adapter, as #838 made descriptor heaps and
resources do. d3d12_node_mask_test now compares the six queue cases with
the default adapter and WARP.
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.

3 participants