Skip to content

ci: execute authored Vulkan fixtures on lavapipe - #2866

Open
mooki000 wants to merge 4 commits into
NotRexed:mainfrom
mooki000:ci/vulkan-fixtures-lavapipe
Open

mooki000 wants to merge 4 commits into
NotRexed:mainfrom
mooki000:ci/vulkan-fixtures-lavapipe

Conversation

@mooki000

Copy link
Copy Markdown
Contributor

Result: all 13 authored cases pass on NVIDIA GeForce RTX 4090 (615.78.08), Intel(R) Graphics (RPL-S) (Mesa ANV 26.2.5), and Ubuntu's llvmpipe (Mesa 25.2.8). Validation is directly confirmed for every fixture on lavapipe in CI; it was not installed for the local NVIDIA/Intel runs. The validated fork job took 23 seconds from start to finish, including setup.

What this is for: give contributors real Vulkan execution checks without a game dump, following #2797's idea of game-free GPU tests. The existing fixtures use the production write-back shader and copy/presentation helpers, but ordinary source checks did not execute their device paths. Not measured: the game, a swapchain, HDR, DLSS, full renderer behavior or performance. Lavapipe is CPU software Vulkan, not a hardware GPU.

Refs #2797. This is only the hosted, dump-free part of that proposal. It needs no exception to “No game in CI,” no self-hosted runner and no access to a tester's machine.

Device selection is explicit in both places: CI pins the lavapipe ICD and matches the reported name llvmpipe; local runs pin the NVIDIA/Intel ICD and match RTX 4090 / RPL-S from vulkaninfo, not a marketing label.

Problem

  • tests/run_all.py --strict fails missing build tools, but retains each test's declared OS skips. Its shards do not add GPU opt-ins.
  • test_wb_diff_observations_gpu.py therefore only compiles. test_vulkan_copy_span.py runs its CPU fixture unless asked for --gpu. The offscreen aspect fixture is skipped on both CI systems.
  • A zero exit alone would be misleading: the copy fixture returns zero when it prints SKIP. Write-back and aspect also do not turn validation messages into process failures themselves.
  • The aspect fixture preferred any discrete device and had no explicit selection option. That is unsuitable for claiming that a particular driver was exercised.

What changed

  • First commit, test-only: aspect gains --device SUBSTRING, case-insensitive. No match fails and lists the devices seen. Without the flag its existing first-discrete-else-first preference and output stay unchanged.
  • One new job in source-regressions.yml: Vulkan fixtures (lavapipe, validation), on ubuntu-24.04. It installs only the C++ compiler, Mesa Vulkan driver, loader/headers, validation layer and vulkaninfo; records their versions; and requires exactly one lavapipe ICD manifest. Both Vulkan loader variables point to that one file. Checkout remains commit-pinned, without persisted credentials. Permissions remain read-only; existing concurrency applies.
  • tests/run_vulkan_fixtures.py: records vulkaninfo --summary, requires one llvmpipe device and the validation layer, then explicitly selects llvmpipe in all three fixtures. Nonzero exits, exit 77, skips, missing/wrong device names, missing/repeated cases, zero readback counts and validation errors fail the job. It keeps running the other fixtures after a failure and writes the usual result/time/check/note summary.
  • Validation: forces the Khronos layer and requires the loader to confirm insertion into each fixture's instance and device chains. Installed/advertised validation alone is not enough. The two fixtures without an error callback have the layer log errors to stdout; the wrapper reads that output and fails on errors. The copy fixture must also report that its validation messenger is enabled. No product code is changed to hide errors.
  • Game-free regression and contributor guide: cover the failure rules, workflow pinning/permissions/device settings, and the actual aspect-selection function with authored device properties. Ordinary source checks keep their GPU-independent defaults.
Fixture Executed checks Required Vulkan support
Write-back observations Five buffer/feedback cases, using the production compute shader 1.3, buffer device address, maintenance4, compute subgroup votes, coherent host memory
Copy span Four texels and untouched padding in a 24-byte upload/readback span 1.1, transfer queue, RGBA8 transfer support, coherent host memory
Offscreen aspect Seven aspect/crop/blit cases with pixel readback 1.3, synchronization2, RGBA8 linear blits, graphics queue

These capabilities are present in Mesa 25.2.8's lavapipe declarations and format handling, the Mesa release currently listed for Ubuntu 24.04 updates. The actual runner's package and device versions are logged. There is no reduced “pass” set: all 13 cases are required; a missing capability fails.

When it runs: every PR to main, main push and manual source-check run, matching the existing unfiltered source workflow. Packaging jobs ignore documentation-only changes and the large DLSS link job has narrow filters; this small authored execution check stays with source regressions. It also notices changes in the runner's Mesa on otherwise unrelated PRs.

How it was tested

Original runtime base 51da0464b4cf0c7f56b81ebd6bb309325835e175; final rebased base f5c9acc15bbadc88e32bdfb7c4e1eed782c1c0e4, head d5d04b20a36433e9ff1de18acdf95ae0581eb879. All four commits are patch-identical across the rebase. The fixture drivers/templates, shader and copy inputs are unchanged; the exact generated aspect program is byte-identical despite unrelated changes in its source file. Hardware results therefore carry without repeating the same programs. The final docstring-only commit changes no executable code.

Linux kernel 7.2.15-1-omarchy, i9-13900K, Clang 23.1.3, GCC 16.2.1, Python 3.12.16, Vulkan headers 1.4.345; 2026-11-12. All fixture execution is offscreen, without a window or swapchain. Final author/trailer/title/no-game-output checks pass on the rebased head.

  • New regression, with Clang: first 10 checks pass; after requiring direct layer-activation evidence, Ran 11 tests in 0.213s, OK. The added case rejects either missing activation marker from every fixture.
  • Same regression against the pinned main source: exits 1, for the absent explicit selector and absent lavapipe job. The output/validation rejection cases are device-free; they do not count as GPU execution.
  • Original-base whole source suite on d7760411: 476 passed, 0 failed, 20 skipped in 213 s (linux, 4 at once), with --strict --jobs 4; no shard.
  • Rebased whole suite on d5d04b2: 501 passed, 2 failed, 20 skipped in 294 s (linux, 4 at once). The new wrapper test passes. The two failures are main's own at this base, not this change's: test_program_cache_one_variant.py (fixed by fix(tests): the one-variant cache test builds with the compressed program cache in the tree #2861) and test_readme_menu_rows.py (fixed by docs(readme): the option table has the Skip opening row, so main's readme check passes #2857). On Windows main has a third, test_wb_shadow_remake.py (a fix is on its way as its own pull request). The fork's run on this rebased head fails in exactly those three tests and nowhere else; its Vulkan fixtures (lavapipe, validation) job, both Windows builds, the AppImage and actionlint pass.
  • Windows-target syntax: both the new selector-test translation unit and the full generated aspect fixture pass with their warnings-as-errors flags. The automatic checker intentionally marked the GPU-skipped driver unjudged; an explicit compile-only capture of that same driver completed the syntax check. Neither is a Windows device run.
  • Real Windows source execution on 5857491d: test_vulkan_fixtures_ci.py passes in part 2/2 (1.3 s), including the selector helper. Windows totals: part 1/2 227 passed, 0 failed, 17 skipped in 209 s; part 2/2 236 passed, 0 failed, 16 skipped in 165 s. Full Windows Vulkan execution remains untested.
  • RTX 4090 / NVIDIA 615.78.08 / Vulkan 1.4.351: all 13 cases pass, all three commands exit 0; write-back 0.749 s, copy 0.617 s, aspect 4.566 s, including compilation. Runs at 10:41:26–10:41:31 -06:00; 1-minute load 7.03→8.07. Validation layer not installed here. No Xid, device-loss or NVRM errors. The nine HDMI-0 EDID-read kernel warnings are unrelated display messages, not validation errors.
  • Intel(R) Graphics (RPL-S) / Mesa ANV 26.2.5-arch1.1 / Vulkan 1.4.354: all 13 cases pass with substring RPL-S, all commands exit 0; write-back 0.669 s, copy 0.901 s, aspect 0.963 s, including compilation. Runs at 11:32:02–11:32:05 -06:00; load 121.24/115.20/76.38, unchanged during the three commands. These are correctness results on a busy PC, not a speed comparison. Validation layer not installed here; kernel interval empty.
  • A setup mistake of mine, kept for the record: the first Intel attempt asked for UHD Graphics 770, which is not in the name the driver reports, so the write-back fixture returned 77 with zero cases run. That is the wrapper refusing a wrong device, as intended; the Intel cases were then run with RPL-S.
  • The fork's source workflow on the patch-identical head 6085c658, on the base from before main's three failures: every job passes, both Windows parts included, and the Vulkan job confirms the Khronos layer in each fixture's instance and device chains. Whole job: 23 to 26 seconds in the earlier runs, 11 of them package setup.

The first lavapipe job selected llvmpipe (LLVM 20.1.2, 256 bits), API 1.4.318, Mesa 25.2.8-0ubuntu0.24.04.4, with validation package 1.3.275.0-1, loader/headers 1.3.275.0-1build1, Vulkan tools 1.3.275.0+dfsg1-1, GCC 13.3.0 and Python 3.12.3.

Fixture Cases passed in each run First compile + execute Validated compile + execute
Write-back 5 1.77 s 1.52 s
Copy span 1 0.87 s 0.86 s
Offscreen aspect 7 1.07 s 0.97 s

The validated result is 3 passed, 0 failed, 0 skipped in 6.30 s (lavapipe, validation on).

No local lavapipe execution or validation-layer result is claimed for these runs: the software ICD was absent when checked, and the Khronos layer was unavailable to both local driver runs. No system packages were installed for this work. The fork job supplies the lavapipe/validation proof.

Not tested

  • No game or game-derived fixture data, full renderer startup/replay, swapchain, display, HDR, DLSS or frame generation. The aspect fixture still stubs filtered/HDR routing.
  • No AMD/Steam Deck or Windows Vulkan execution. The new selector's Windows syntax check is not a Windows device run.
  • No frame-rate or hardware-performance comparison. Software Vulkan cannot establish real-GPU correctness or speed.
  • No extra synchronization-validation or GPU-assisted-validation coverage is claimed; the job enables ordinary core validation.

Risks

  • An Ubuntu Mesa, LLVM or validation-layer update can change a result. Versions and full error messages are kept so that a runner change can be distinguished from a source change. Package versions are recorded, not pinned to an apt revision that may disappear.
  • One more concurrent job per source-check run. The two whole jobs took 26 and 23 seconds, below the approximately-one-minute target; later runner/package changes can move that. The five-minute timeout is a safety limit, not an expected duration.
  • A renamed or additional fixture case requires updating the strict expected-case list. A missing case must never look like a successful run.

Overlaps

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra noreply@openai.com

mooki000 and others added 4 commits November 12, 2026 12:42
Keep the existing discrete-device preference without --device. An explicit substring selects only matching devices and prints the enumerated names on failure.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Run the three game-free Vulkan fixtures with the Khronos validation layer on Ubuntu 24.04. Restrict the loader to lavapipe, record versions and identity, and reject skipped, incomplete, wrong-device or validation-error results. Keep the source suite GPU-independent and test the strict result contract without a device.

Refs NotRexed#2797

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Request layer diagnostics and require both instance and device validation-layer insertion records from each process. Merely enumerating the installed layer or setting its environment variable no longer satisfies the validation claim. Keep rejecting errors even when every fixture case reports success.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Replace the old normal-CI-skips-GPU wording with the source-suite and dedicated lavapipe-job distinction. Include maintenance4 in the write-back fixture requirements. No executable code changes.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
@mooki000
mooki000 force-pushed the ci/vulkan-fixtures-lavapipe branch from d5d04b2 to 6ea3f6a Compare November 12, 2026 18:42
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.

1 participant