Skip to content

Tests: register d3d12_clear in ctest again (TEST-919) - #4294

Open
kingzzim7-create wants to merge 1 commit into
ItsNotRexed:mainfrom
kingzzim7-create:test-919-restore-clear
Open

kingzzim7-create wants to merge 1 commit into
ItsNotRexed:mainfrom
kingzzim7-create:test-919-restore-clear

Conversation

@kingzzim7-create

@kingzzim7-create kingzzim7-create commented Nov 23, 2026 •

Copy link
Copy Markdown

Claimed in the coordination issue as: TEST-919

Depends on: #521

What and why

3fc0b21 took d3d12_clear_test's default mode out of ctest because NVIDIA rounds a 0.5 clear to 0x7f where WARP gives 0x80, the tie rounding #521 (D3D-45) fixes. This restores the two lines it removed (add_test(NAME d3d12_clear ...) and SKIP_RETURN_CODE 77), so new cases in that test run in CI again. Merge after #521.

Tested

NVIDIA GeForce RTX 4060 Ti, driver 621.01, Windows 11, MSVC 14.52 (Visual Studio 2026), scripts\build_runtime.ps1, then d3d12_clear_test.exe with no arguments:

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: test registration only.)

AI-assisted: yes (Claude).

@Kam471 Kam471 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.

Built d3d12_clear_test at 064d578e and ran ctest -R '^d3d12_clear$' on Windows 11, RTX 5070 Ti: failed, exactly as the PR predicts:

R8G8B8A8_UNORM ... Vulkan 7f, WARP 80
R8G8B8A8_SNORM ... Vulkan 3f, WARP 40
B8G8R8A8_UNORM / B8G8R8X8_UNORM ... 7f vs 80
depth format 55 case 1 ... ff vs 00
5 color/depth format(s) differ from WARP

The 3D RTV case still passes (648 texels match WARP). This is the known 0.5 tie-rounding difference that #521 (D3D-45, still OPEN at c0a92ebc) fixes, and the PR says to merge only after #521. The registration itself is the intended two lines; no code issue, but do not merge before #521 or the new ctest entry goes red on NVIDIA.

@kingzzim7-create

Copy link
Copy Markdown
Author

Thanks @Kam471 , that matches my 4060 Ti run: the same five without #521, all clear on #521's head (c0a92eb). Agreed, merge after #521.

@MKmajster

Copy link
Copy Markdown

Tested 064d578 merged with #521's head c0a92eb (local merge, as "merge after #521" asks) on NVIDIA GeForce RTX 3070 (Ampere), driver 617.42, Windows 11 24H2, MSVC 19.44:

No game files. AI-assisted (Claude).

@Kam471

Kam471 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Dependency check: I built and ran *#521 at \c0a92ebc* on Windows 11, RTX 5070 Ti. Its \d3d12_clear_test\ default mode now reports 197 full/rectangle readbacks matched WARP (exit 0) and \d3d12_clear_formats_test\ reports 178 matched, 0 differ; \ctest -R d3d12_clear\ is 2/2. So once #521 merges, this PR's re-registration should go green on NVIDIA. Do not merge this one before #521.

@Hanioe2

Hanioe2 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

c0a92ebc of #521 already carries these two CMake lines, including SKIP_RETURN_CODE 77. I merged this PR's 064d578e into that exact head locally and the runtime/CMakeLists.txt diff against c0a92ebc was empty.

d3d12_clear passed on my RTX 5070 at c0a92ebc with all 197 RTV/DSV readbacks matching WARP. Direct verification on #521

AI-assisted.

@TreXito

TreXito commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

AMD data point. Tested 064d578e merged into #521's head c0a92ebc (clean merge, empty runtime/CMakeLists.txt diff against c0a92ebc, as @Hanioe2 found). Card: AMD Radeon RX 7800 XT (RDNA3, gfx1101), AMD Windows driver 26.11.2 (32.0.32029.2010). OS: Windows 10 Pro 22H2 build 19045.7846, so the reference is Windows 10's WARP. Build: MSVC 19.44 RelWithDebInfo via scripts\build_runtime.ps1, Vulkan SDK 1.4.363.0. Result: pass.

main aa2988cc (d3d12_clear_test built, not registered) 064d578e on #521 c0a92ebc
d3d12_clear_test exit 0: 197 full/rectangle readbacks matched WARP; 3D RTVs 648 texels match exit 0, same counts
d3d12_clear_formats_test n/a (added by #521) exit 0: 178 matched WARP, 0 differ, 0 failed
ctest -R "d3d12_clear|d3d12_rgb9e5_rtv" n/a 3/3 passed (d3d12_rgb9e5_rtv, d3d12_clear, d3d12_clear_formats)

Unlike NVIDIA (the five failures @kingzzim7-create and @Kam471 saw without #521), AMD already matches WARP on main. Every clear comes out as WARP's on this card even without #521, so the tie-rounding cases fail only on NVIDIA here. I didn't check the individual tie values. Merging this after #521, as agreed, is green on AMD too.

AI-assisted (Claude Code). No game files.

@JustDownTV

Copy link
Copy Markdown
Contributor

AMD data point, since the runs so far are all NVIDIA: on AMD Radeon iGPU (gfx1036, RDNA2, Windows driver 25.10.30.02), Windows 11, MSVC 14.51, LEONIDA_VK_VALIDATION=1, d3d12_clear_test with no arguments passes without #521 (runtime built at main aa2988cc plus #3797, which doesn't touch clears):

3D RTVs: 648 RGBA texels match WARP and expected slice colours
RTV and DSV clears: 197 full/rectangle readbacks matched WARP
exit 0

So AMD already rounds the 0.5 clears like WARP, and the re-registered d3d12_clear is green there with or without #521. The merge order only matters for NVIDIA.

AI-assisted: yes.

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