Skip to content

Run the exhaustive D24 GPU conversion check with CTest - #1266

Merged
ItsNotRexed merged 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:codex/register-depth24-conversion
Nov 22, 2026
Merged

ItsNotRexed merged 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:codex/register-depth24-conversion

Conversation

@evilclanker9000

Copy link
Copy Markdown
Contributor

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

What and why

The runtime builds depth24_convert_test on Windows and Linux. Its executable checks all 16,777,216 depth words in both directions, float quantization against the CPU reference and pitched copies. It was missing from CTest and from the shader sweep. Running the executable directly previously reported an initialization error as a successful skip.

Register the existing GPU test when BUILD_TESTING is on. Use the Vulkan test device's three initialization results: unavailable returns 77 for CTest to skip, failed returns 1, and ready runs the comparison. The converter and its expected outputs stay the same. #1247 independently changes the compute pass for the Intel NaN discrepancy.

Tested

Windows 11, MSVC 19.44/Ninja. The merge-base CTest invocation with --no-tests=error -R "^depth24_convert$" found zero tests and exited 8. The same filter now registers one test.

Environment CTest result
RTX 5080, 616.92, Vulkan 1.4.351, Khronos validation on Passed, 7.50 s
Radeon Graphics, 32.0.21045.16010, Vulkan 1.4.315, Khronos validation on Passed, 7.13 s
Installed Vulkan loader with a driver selection matching no ICD Skipped, 0 failed
RTX 5080 with validation requested and the validation layer deliberately hidden Failed, executable exit 1; the previous initialization code printed an error and exited 0

Both hardware runs reported exact matches for all 16,777,216 uploads, round trips and CPU-referenced patterns, the pitched copy, and zero validation errors.

Checklist

  • No game data, keys or decryption, 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. N/A for CTest registration.

AI-assisted implementation and testing.

The exhaustive compute readback was built on CI but missing from its test list. Preserve device initialization failures and let CTest distinguish an unavailable GPU from a successful comparison.
@kapitche

Copy link
Copy Markdown
Contributor

Tested on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51):

Registering it is worth it: ctest would have shown the Intel NaN bug, which went unseen because this test only ran by hand.

@Rainmaker33

Copy link
Copy Markdown

Tested fd77619 on NVIDIA GeForce RTX 3090 (Ampere, subgroup 32..32), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass.

The PR's diff applied cleanly to main e7584c5. VS 2022, Vulkan SDK 1.4.363.0, llvm-mc 21.1.8. Runtime built with scripts\build_runtime.ps1 (CMake path, RelWithDebInfo).

  • ctest -C RelWithDebInfo --no-tests=error -R "^depth24_convert$": 1/1 passed (8.6 s).
  • The same command on a main build exits 8 (no tests), as in the PR.

No game files.

@evilclanker9000

Copy link
Copy Markdown
Contributor Author

Merged upstream e7584c5 into the topic branch without rewriting history. Head be43ac1 now contains #1247. The registered depth24_convert test passed again with validation on RTX 5080 (9.60 s) and Radeon Graphics (9.02 s), including the two infinities and every signed NaN payload. @kapitche, this is the integrated commit for repeating the CTest on the UHD 770.

ItsNotRexed added a commit that referenced this pull request Nov 22, 2026
@Ryderadzeee

Copy link
Copy Markdown
Contributor

Tested be43ac16 on an AMD Radeon RX 9070 XT (driver 32.0.32029.2010), Windows 11 build 26300.10075, MSVC 19.51.36256, RelWithDebInfo. AI-assisted testing.

ctest --test-dir runtime/build -C RelWithDebInfo -R '^depth24_convert$' --no-tests=error -V passed in 6.68 s with LEONIDA_VK_DEVICE='RX 9070 XT'. All 16,777,216 depth words matched conversion and round-trip checks. The float-reference, infinity, NaN and pitched-copy checks passed too.

  • On main at e7584c52, the same CTest filter found no registered test and exited 8.
  • With VK_DRIVER_FILES pointing to a nonexistent manifest, the executable returned 77 and CTest marked it skipped.
  • With an unmatched LEONIDA_VK_DEVICE filter, the executable returned 1 and CTest marked it failed.

The run used synthetic inputs with Vulkan validation layers disabled.

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.

5 participants