Skip to content

d3d12_vulkan_device: answer Intel integrated OPTIONS1 lanes per generation (D3D-280) - #2308

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
mesterember104-cpu:d3d280-lanes
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
mesterember104-cpu:d3d280-lanes

Conversation

@mesterember104-cpu

Copy link
Copy Markdown

d3d12_vulkan_device: answer Intel integrated OPTIONS1 lanes per generation (D3D-280)

Fixes D3D-280.

What breaks

compare_options1 fails on an Intel Meteor Lake iGPU (Xe-LPG, 0x8086:0x7d55, driver
32.0.101.6127): the layer answers D3D12_OPTIONS1 WaveLaneCountMin/Max = 16..16 while the host
D3D12 driver on the same adapter answers 8..32. The test prints
D3D12_OPTIONS1 WaveLaneCountMin: ours 16, host 8 / WaveLaneCountMax: ours 16, host 32
(@MelonPy's measurement, main 6a6704d + #1935), and EXPECT(options1 <= 0) fails.

The cause is the D3D-121 rule (#1285), which pins the answer to a fixed kIntelD3D12Lanes = 16
for every Intel (0x8086) integrated GPU whose Vulkan subgroup range contains 16
(runtime/shims/d3d12_vulkan_device.cpp:581-589 on main 4eb6155). That generalization was
measured on Xe-LP only (UHD 770 on 32.0.101.6129, Raptor Lake-S Mobile on 101.7092), where the
host really does answer 16..16 while Vulkan reports the compiler's whole 8..32 choice. Meteor Lake
is a different architecture on a different driver branch, and there the host answers what Vulkan
reports anyway (8..32) — @MelonPy: "the unmodified Vulkan range would have matched the host's min
and max here".

The fix

The fixed 16..16 answer stays for the Intel integrated lines where the host measured 16..16, and
the Xe-core integrated lines from Xe-LPG on keep their Vulkan range:

  • Keep the 16..16 pin (pre-Xe-LPG integrated lines). Measured host 16..16: UHD 770
    (32.0.101.6129), Raptor Lake-S Mobile (101.7092) — D3D-121 — and, additionally in this PR's
    regression run, Tiger Lake 0x9a78 (32.0.101.7088).
  • Keep the Vulkan range (Xe-LPG and later Xe-core iGPUs), identified by device-ID ranges:
    Meteor Lake / Arrow Lake 0x7d40-0x7dc5, Lunar Lake 0x64a0-0x64b6. On Meteor Lake the
    unmodified Vulkan range is exactly the host's answer (measured, above). Discrete Arc already
    keeps the Vulkan range (TEST-57), so nothing changes there.
  • Everything else (including future Xe generations not in the list) behaves exactly as on main:
    the 16..16 pin, to be revised per measurement like TEST-57 was.

Two deliberate choices, in the repo's style of pinning only measured host behavior:

  • Why device-ID ranges instead of mirroring the host's answer at runtime. The Vulkan-backed
    device is built from VulkanDeviceInfo (Vulkan objects only) and has no path to the native
    D3D12 stack: mirroring would mean creating a real D3D12 device lazily inside the first
    CheckFeatureSupport call — new plumbing, heavy at game start, and on Wine the system
    d3d12.dll is vkd3d, a second translation layer, so the "host answer" there is not the
    platform driver's. The host is the oracle where it can be: compare_options1 (and the other
    compare_* helpers) create the host device on the same adapter by LUID/PCI-ID and compare on
    real hardware; that is what validates this fix on any Intel machine. In the shim, the only
    facts in hand are the Vulkan properties — which subgroup_facts() already reads
    (properties.properties.vendorID/deviceID) — so the rule is expressed per generation from
    those.
  • Why ranges listed out, not a numeric cutoff. The Intel device-ID space is not
    generation-ordered: Tiger Lake (Xe-LP, 2020) is 0x9a4x-0x9a7x and sorts above Meteor Lake
    (Xe-LPG, 2023) at 0x7d4x. A single deviceID >= boundary would wrongly release the pin for
    Tiger Lake, so the new Xe-core integrated lines are listed by their ID ranges.

Regression checks (older Intel iGPU)

Machine: Intel UHD Graphics, Tiger Lake iGPU 0x8086:0x9a78, driver 32.0.101.7088, Windows 11 —
i.e. a pre-Xe-LPG line whose host answers 16..16 and where the pin is active.

  • d3d12_vulkan_device ctest (RelWithDebInfo): passed before the change (1/1, 6.94 s) and
    passed after (1/1, 4.35 s).
  • compare_options1 line, identical before and after (0 mismatches both runs, so ours equals the
    host):
    D3D12_OPTIONS1: lanes 16..16, total 16 (host total 768)
  • Full test stdout compared with the baseline run after masking heap addresses: identical
    (the volume-SRV allocation-info lines and the invalid-copy refusal logs are unchanged too; the
    whole test passes on this machine both before and after).

What I ask from @MelonPy

A rerun of d3d12_vulkan_device on the Meteor Lake machine (0x7d55): the test should now print
D3D12_OPTIONS1: lanes 8..32, total 32 (host total 4096) with no ours X, host Y mismatch lines,
i.e. compare_options1 returns 0. If you ever get an Arrow Lake (0x7d4x-0x7dc5) or Lunar Lake
(0x64a0-0x64b6) machine, the same test run would confirm those two listed ranges; discrete Arc
(TEST-57) is untouched and still keeps the Vulkan range.

Scope

  • runtime/shims/d3d12_vulkan_device.cpp: the D3D-121 rule becomes generation-aware
    (device-ID ranges from Xe-LPG on skip the pin). The lane range is consumed only by
    D3D12_FEATURE_D3D12_OPTIONS1, so nothing else changes.
  • docs/d3d12_vulkan.md: the OPTIONS1 bullet documents the per-generation rule and the third
    Xe-LP measurement.
  • No game files.

AI-assisted (GLM, operated by the account owner)

…ation (D3D-280)

Meteor Lake (Xe-LPG) hosts answer 8..32 while the D3D-121 rule pins 16..16 for every
Intel integrated GPU; keep the measured 16..16 pin on pre-Xe-LPG lines (Tiger Lake
regression-checked locally) and keep the Vulkan range on Xe-LPG+ device-ID ranges
(Meteor/Arrow Lake 0x7d40-0x7dc5, Lunar Lake 0x64a0-0x64b6).

Fixes D3D-280.
@FaKL-Code

Copy link
Copy Markdown
Contributor

Tested 7812487 (merged onto main 4947579) on NVIDIA GeForce RTX 4060 Ti, driver 610.88 (32.0.16.1088), Windows 11 26200, MSVC 14.51.36231 (VS 2026), Vulkan SDK 1.4.363.0: pass

  • Clean configure + build of runtime/ (Visual Studio generator, RelWithDebInfo).
  • ctest -C RelWithDebInfo: 115/116 in the parallel run (-j 4, 7 skipped for missing inputs or optional components, gameinput disabled, as on main). The one failure was loader, which trips its PE-image read-time check while other builds compete for the disk (Defender scanning). Rerun alone with nothing else building, it passes, as it does on main and the other PRs I tested.
  • d3d12_vulkan_device passes, also when rerun with LEONIDA_VK_VALIDATION=1.
  • This is NVIDIA, so the Intel branch doesn't run here. It only shows the change doesn't affect other vendors; it hasn't been tested on Intel hardware.

Review note on the ID ranges, checked against the Linux kernel's include/drm/intel/pciids.h (INTEL_MTL_IDS, INTEL_ARL_IDS, INTEL_LNL_IDS, INTEL_PTL_IDS). These Xe-LPG-or-later IDs fall outside 0x7d40..0x7dc5 / 0x64a0..0x64b6, so they would still get the 16..16 override:

  • 0x7DD1 (Arrow Lake H), 0x7DD5 (Meteor Lake): above 0x7dc5
  • 0xB640 (Arrow Lake S)
  • 0x6420 (Lunar Lake): below 0x64a0
  • Panther Lake (0xB080–0xB08F, …): not covered at all

Matching an explicit ID list taken from that header, or treating any ID not on a known pre-Xe-LPG list as newer, would avoid this. The 0x7dc5 upper bound looks especially accidental, since both 0x7DD1 and 0x7DD5 sit just above it.

AI-assisted (Claude).

@Dom-in

Dom-in commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Windows + GPU check: AMD Radeon RX 9070 (RDNA4), Windows 11, MSVC Release, Vulkan SDK 1.4.363. Tested head 7812487 merged onto main 4947579 (clean merge), full build, full ctest -C Release -j 4: 100% tests passed out of 116, the same as the main baseline on this machine (116/116), so nothing regresses here.

AI-assisted (Claude Code); runs on my machine.

@yasaiiko

Copy link
Copy Markdown

Tested PR head 7812487accc7db9d93511e135b84d8ce4729b2bc and its parent 49475796c226c8511b9470bf97a4daf57b8af323 on the same Intel integrated GPU, PCI 8086:7D41, Windows driver 32.0.101.9150, Windows 11 Pro build 26300. This covers a device in the Arrow Lake range requested in the PR.

Revision Layer min..max Native D3D12 min..max Targeted CTest
Parent 16..16 8..32 Failed on both lane bounds
PR head 8..32 8..32 Passed, 1/1

Built the d3d12_vulkan_device_test target for Windows x64 with MSVC and Ninja (RelWithDebInfo), then ran ctest --test-dir review-build -R "^d3d12_vulkan_device$" -V on each revision. The PR run reported layer total 32 and host total 2048; the test deliberately excludes total lane count from the equality check. No game files were used.

@marquezinii

Copy link
Copy Markdown
Contributor

Tested 7812487 (on main 4947579) on RTX 5070, driver 621.24, Windows 11 26H2 (26300), MSVC 14.52 (VS Build Tools 18), RelWithDebInfo, with VK_LAYER_KHRONOS_validation on (LEONIDA_VK_VALIDATION=1): pass. Full ctest 116/116.

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.

6 participants