Skip to content

d3d12_vulkan_device_test: compare A4B4G4R4 with the host only where the host has the format - #2438

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
MeNoSkills:test-a4b4g4r4-win10-host
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
MeNoSkills:test-a4b4g4r4-win10-host

Conversation

@MeNoSkills

Copy link
Copy Markdown
Contributor

Claim: #2300 (comment) (new TEST item; no ID yet). Follow-up to #1914 (D3D-259); same spirit as #717 (keep the test running on Windows 10).

Problem

d3d12_vulkan_device_test stops on a Windows 10 host: new_format_round_trips prints new format 191: the host refuses a texture the layer creates and line 4064: new_format_round_trips(...) == 0 (191 is A4B4G4R4_UNORM). Windows 10's D3D12 doesn't have that format: its own CheckFeatureSupport reports no 2D texture for it. The test treated that as a layer bug and aborted, so every later check in the file didn't run on such a host.

Change

Test only. The host comparison for a new format now runs only when the host itself reports D3D12_FORMAT_SUPPORT1_TEXTURE2D for it, and prints a line otherwise. A host that reports the format and still refuses the texture fails as before, so a real mismatch is still caught.

Tested

Windows 10 Pro 19045 (D3D12 host without A4B4G4R4), MSVC 2022, Windows SDK 10.0.26100.0, on main 49475796:

  • Before: d3d12_vulkan_device_test exits 1 at that line on NVIDIA GeForce RTX 4070 Ti (621.24) and on the AMD Radeon Graphics iGPU of a Ryzen 7 9700X (24.30.18).
  • After: new formats: 11 of 11 created and copied both ways bit for bit (host compared), 9 render-target clears matched the host, A4B4G4R4 render target not reported, skipped, 0 failures, and the test continues.

Not in this PR

The test still exits 1 further on, for other reasons I did not touch: on the RTX 4070 Ti invalid arguments heap: HARDWARE_PROTECTED: ours 0x00000000, host 0x80070057 (line 5741, the area of #1820), and on the AMD iGPU invalid arguments format 67 RT: ours 0x00000000, host 0x80070057 (line 4211). I haven't checked whether these differ on a Windows 11 host.

AI-assisted (Claude Code).

…he host has the format

new_format_round_trips (D3D-259, ItsNotRexed#1914) failed on a Windows 10 host with 'new format 191: the host refuses a texture the layer creates': A4B4G4R4_UNORM is not in Windows 10's D3D12, whose CheckFeatureSupport reports no 2D texture for it, and the test stops there so no later check runs. The host comparison now runs only for a format the host reports as a 2D texture; a host that reports it and still refuses it fails as before.
@yagoviccari1-spec

Copy link
Copy Markdown

Tested 911ee1a on Windows 11 build 26200.9974, NVIDIA RTX 5060 Ti / driver 621.24 (Vulkan 1.4.357), MSVC 19.44.35207, CMake 4.5.1 + Ninja 1.13.2, llvm-mc 21.1.8 and SPIRV-Tools v2026.4 on PATH:

  • ctest --test-dir runtime/build -R '^d3d12_vulkan_device$' --output-on-failure: Passed, 6.29 s and 6.18 s (two runs).
  • Same test on main 4947579 on this machine: Passed, 6.20 s — no regression.
  • The new "host runtime has no such 2D texture ... host comparison skipped" line did not appear on this Windows 11 host, so that branch is not exercised here; the host comparison still ran as before. This is a no-regression check on Windows 11, not a verification of the Windows 10 path.

No game files used. Ran with an AI agent on my machine.

@FaKL-Code

Copy link
Copy Markdown
Contributor

Tested 911ee1a (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): no new warnings (same C4201/C4456/C4996 counts as main).
  • ctest -C RelWithDebInfo -j 4: 116/116 passed (loader run on its own; 7 skipped for missing inputs or optional components, gameinput disabled, as on main).
  • d3d12_vulkan_device, command_list, d3d12_com and d3d12_msaa_draw also pass with LEONIDA_VK_VALIDATION=1.
  • On this host the new skip path does not trigger: the host runtime has the A4B4G4R4 texture ("new formats: 11 of 11 created and copied both ways bit for bit (host compared)"), so the comparison still runs.

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 911ee1a merged onto main 4947579 (clean merge), full build, full ctest -C Release -j 4: 100% tests passed out of 116, no new failures. The main baseline on the same machine passes 116/116.

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

@JRamos1993

Copy link
Copy Markdown
Contributor

Tested 911ee1a (on main 4947579) on an RTX 5090 (driver 616.92), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363, fresh RelWithDebInfo build:

  • d3d12_vulkan_device: passes 20 of 20 runs, and passes under LEONIDA_VK_VALIDATION=1 with 0 validation messages.
  • Full ctest: 125/125. No new /W4 warnings.

AI-assisted (Claude Code).

@pwu2775-dev

Copy link
Copy Markdown
Contributor

Tested 911ee1a on NVIDIA GeForce RTX 4070 (driver 617.42), Windows 11 (26300), MSVC 19.44, scripts/build_runtime.ps1 (Ninja), RelWithDebInfo: pass. ctest 124/124 (GameInput disabled, no SDL3). d3d12_vulkan_device prints new formats: 11 of 11 created and copied both ways bit for bit (host compared), 9 render-target clears matched the host, A4B4G4R4 render target not reported, skipped, 0 failures.

I also read the diff; two small points. (1) SUCCEEDED(CheckFeatureSupport(...)) && (Support1 & TEXTURE2D) sends a failed query into the skip branch too, and the message then says the host has no such 2D texture; keeping the HRESULT would tell "the host lacks the format" from "the query failed". (2) The summary line prints (host compared) whenever host.p is set, even if every comparison was skipped; counting the compared formats would make it accurate.

AI-assisted: the review was done by Codex (gpt-6.2-sol); both points were checked against the code.

@evilclanker9000

Copy link
Copy Markdown
Contributor

Tested 911ee1a on Windows 11 (26200), MSVC 19.4x (VS 2022 Build Tools), Ninja RelWithDebInfo: pass on both GPUs of a two-GPU PC.

  • NVIDIA GeForce RTX 5080, driver 616.92 (LEONIDA_VK_DEVICE=nvidia): ctest 108/108 passed, including d3d12_vulkan_device.
  • AMD Radeon RDNA2 iGPU, driver 32.0.21045.16010 (LEONIDA_VK_DEVICE=radeon, LEONIDA_HOST_ADAPTER=radeon so the host comparisons run on the same GPU): ctest 108/108 passed.

No game files. AI-assisted check (Claude Code), Vonsek3.

@bvtterbroot

Copy link
Copy Markdown

Tested 911ee1a on AMD Radeon RX 7900 XTX (RDNA3, Navi 31), AMD driver 26.11.2, Vulkan 1.4.359, Windows 11: pass.

  • Runtime build: ok.
  • ctest --test-dir runtime/build: 124/124 passed.

Tools: MSVC 14.44 (scripts/build_runtime.ps1), Vulkan SDK 1.4.363.0, llvm-mc 21.1.8 (WSL).

@marquezinii

marquezinii commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Tested 911ee1a (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, including d3d12_vulkan_device.

@lunisahdidouch

Copy link
Copy Markdown

Tested 911ee1a on Windows 11 with an RX 9070 (AMD 26.11.1, Vulkan 1.4.359), built with VS 2022 Build Tools: pass

ctest -R d3d12_vulkan_device passes with the A4B4G4R4 host comparison on AMD's D3D12 driver. Builds clean.

AI-assisted

@ItsNotRexed
ItsNotRexed merged commit b715e6a into ItsNotRexed:main Nov 22, 2026
ItsNotRexed pushed a commit that referenced this pull request Nov 23, 2026
… is skipped, and count the compared ones

Follow-up to #2438 from the review of pwu2775-dev. A failed host FORMAT_SUPPORT query was treated as 'no such texture' without saying so, and the summary printed '(host compared)' even when every comparison was skipped. The query's answer is now printed (E_FAIL on Windows 10 build 19045, E_INVALIDARG seen on another 19041 host, so a single code is not assumed) and the summary says how many formats were compared and how many the host lacks.
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.