Skip to content

Certify Linux: land the vk_native layer work, build a Linux interactive CTS harness, and drive the three interactive categories on real hardware #1727

Description

@dfattal

Goal

Bring Linux to the same CTS standing Windows reached on 2026-09-23: 0 runtime-attributable failures across the three interactive categories (composition, actions, scenario), on a real GPU and a real X session, on top of the non-interactive arms that already gate CI. Windows got there across #1523 (d3d11), #1689/#1694/#1695 (d3d12) and #1704/#1705/#1706 (opengl); this is the Linux/Vulkan equivalent, and it is a smaller job than either Windows lane, because Linux is Vulkan-only.

Everything below can be done from the Linux box. The Windows box is only needed for a second opinion on a Vulkan runtime change (it can run -G vulkan too).

Where Linux already is

The work, in dependency order

1. vk_native must draw the layer types the interactive tests use (blocking)

Today comp_vk_native_compositor.c accepts quads into the accumulator and never draws them, exactly as D3D12 and GL did before #1689/#1704. Every CTS composition test puts its prompt, its labels and its reference image in quad layers, so the category is not failing on Vulkan — it is unjudgeable: no prompt, no labels, no content.

First step: rebase #1623 onto current main, land it, then port equirect2 to vk_native.

2. A Linux interactive harness (the actual new work)

The Windows driver is PowerShell + Win32: interactive_cts.ps1 (registry ActiveRuntime swap — not needed on Linux, XR_RUNTIME_JSON is honoured), cts_step.ps1 / cts_next.ps1 / cts_drive.ps1 (focus the CTS window, inject a key or click, capture, log a verdict), capture_dpi_aware.ps1, bar_profile.ps1 (gradient oracle), sab_measure.py / eq_diff.py (pixel oracles). The judging logic and oracles port as-is; only three platform primitives do not:

primitive Windows Linux equivalent
focus the CTS window SetForegroundWindow xdotool windowactivate / wmctrl -a (needs a WM — --xvfb starts a bare X server, so use a real session or add one)
inject key / button keybd_event with scancodes xdotool key / keydown / keyup / click, or skip X entirely (below)
capture the screen PrintWindow, DPI-aware import -window, xwd, or the runtime's own atlas capture (u_capture_intent_poll is already wired in comp_vk_native_compositor.c:6997; on Linux the trigger dir is $TMPDIR)

Two candidate routes for input — pick by measuring:

  • (a) X11 injection into the runtime's self-created window. comp_vk_native_window_xcb.c already selects XCB_EVENT_MASK_KEY_PRESS (:213, :223), but its event loop (:562) handles only CONFIGURE_NOTIFY / CLIENT_MESSAGE / DESTROY_NOTIFY — key presses are dropped on the floor. So (a) needs a small runtime change: pump XCB key events into qwerty the way comp_d3d11_window.cpp:852 pumps WM_KEY* into qwerty_process_win32. There is no qwerty_process_xcb yet; qwerty_win32.c and qwerty_sdl.c (qwerty_process_event) are the two models, and u_debug_gui.c:183 is the only existing caller of the SDL one.
  • (b) SDL front end. qwerty_sdl.c is already built when XRT_HAVE_SDL2, but nothing on the CTS path creates an SDL window, so it needs a pump too — probably more moving parts than (a).

Budget for the traps the Windows lane hit, all recorded in docs/reference/cts-interactive-procedure.md:

3. Drive the three categories on the bench box

./scripts/build_linux.sh
./scripts/fetch_build_cts.sh --apt
./scripts/run_cts.sh -g vulkan --scope full --conformance-layer   # non-interactive, real GPU, no --software
# then the new interactive mode, category by category, judging each prompt

Expect, from the Windows experience:

4. The rest of the Linux-specific surface

Once the three categories are green on the dev tree:

Definition of done

  1. feat(vk_native): compose-path migration, part 2 — quad layers, painter's-order blend, back-face cull, and linear-light colour (#1581 #1590 #1598 #1589 #1610) #1623 merged and equirect2 drawn on vk_native.
  2. A Linux interactive harness that can focus, inject and capture, with the one-click-one-case property demonstrated (the qwerty/GL hosted window: one left click delivers TWO select edges — the CTS advances two cases per click on -G opengl #1700 lesson).
  3. composition, actions, scenario driven on a real-GPU X session at the pinned CTS, with a per-case tally posted on Epic: OpenXR CTS coverage for the full supported matrix — 5 graphics plugins on Windows, 2 on Linux, 2 on Android (today: 1, non-interactive) #1523 in the same shape as the Windows ones, and 0 runtime-attributable failures (skips enumerated; InteractiveThrow recorded as rig-limited).
  4. docs/reference/cts-interactive-procedure.md § 6 gate updated to name the Linux lane, and docs/roadmap/linux-support.md § Conformance updated with what the hardware arm now covers.

Pointers

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions