Skip to content

Commit 90be6a9

Browse files
committed
examples/10-graphics: Windows stays at "builds", and the reason is a missing package
A run step was written, pushed and measured. The manifest declaration worked -- `Provisioning [xlings.workspace] entries (xim:mesa-lavapipe@26.2.0)` -- the ICD was found in the store, and the program still printed `render unavailable`, which is its own report that it enumerated no device. The missing piece is the LOADER, not the driver. `compat:vulkan` ships an import library on Windows and nothing else, and its own descriptor says why: a statically linked loader cannot work there, because upstream's `loader_windows.c` creates its locks in `DllMain` and a static library never gets one. The runtime `vulkan-1.dll` is expected to come from an installed GPU driver, and a GitHub Windows runner has none. `xim:mesa-lavapipe`'s Windows payload is an ICD that imports system DLLs and carries no loader either. So the example declares no device on Windows: an entry there would download 56 MB that nothing can load. macOS is not in the same position -- `compat:vulkan` builds the loader from source everywhere except Windows -- and keeps its run step. Raising this platform to "runs" needs a Windows `vulkan-1.dll` package, which is a packaging decision rather than a step in a workflow file. Both the workflow and the example manifest record the measurement where someone looking for the gap will find it.
1 parent 1a3fa43 commit 90be6a9

2 files changed

Lines changed: 32 additions & 40 deletions

File tree

.github/workflows/ci-windows.yml

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -456,44 +456,28 @@ jobs:
456456
done
457457
echo "ok: both shader stages compiled and the Vulkan half linked"
458458
459-
# AND NOW IT RUNS. `xim:mesa-lavapipe` publishes a Windows build, so this
460-
# host has a software device and the claim can be the same one Linux
461-
# makes: the program reached a device and rendered the image, not merely
462-
# that it compiled.
459+
# WINDOWS STAYS AT "BUILDS", AND THE REASON IS A MISSING PACKAGE RATHER
460+
# THAN A MISSING CI STEP.
463461
#
464-
# The device name IS compared here, unlike on macOS. lavapipe is a
465-
# software rasteriser that produces the same pixels by construction, so
466-
# the image cannot distinguish it from any other implementation and the
467-
# name is what does.
462+
# A run step was written, pushed, and measured. The manifest declaration
463+
# worked -- `Provisioning [xlings.workspace] entries
464+
# (xim:mesa-lavapipe@26.2.0)` -- and the ICD was found in the store, and
465+
# the program still printed `render unavailable`, which is its own report
466+
# that it enumerated no device.
468467
#
469-
# `VK_DRIVER_FILES` rather than an ICD search directory: the package is in
470-
# the xlings store rather than in the registry the Windows loader reads,
471-
# and naming the file is the one form that does not depend on that.
472-
- name: "Graphics: the offscreen example RUNS on lavapipe"
473-
shell: bash
474-
run: |
475-
set -e
476-
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
477-
# NOT installed from here, for the reason the macOS job records: the
478-
# example declares `xim:mesa-lavapipe` under `cfg(windows)`, so
479-
# finding the ICD without installing anything is what asserts the
480-
# declaration works.
481-
icd=$(find "${MCPP_HOME:-$HOME/.mcpp}/registry/data/xpkgs/xim-x-mesa-lavapipe" \
482-
"$HOME/.xlings/data/xpkgs/xim-x-mesa-lavapipe" \
483-
-name '*.json' -path '*icd.d*' -print -quit 2>/dev/null || true)
484-
[ -n "$icd" ] || { echo "no lavapipe ICD in either store"; exit 1; }
485-
echo "ICD: $icd"
486-
cd "$GITHUB_WORKSPACE/examples/10-graphics/offscreen"
487-
# `$MCPP_SELF`, which is what the build step above used. `/tmp/mcpp-fresh.exe`
488-
# is a copy a LATER step makes, so naming it here would look right and
489-
# fail with a missing file.
490-
out=$(VK_DRIVER_FILES="$icd" "$MCPP_SELF" run 2>&1) || { echo "$out"; exit 1; }
491-
echo "$out"
492-
echo "$out" | grep -q 'llvmpipe' \
493-
|| { echo "the run did not reach the lavapipe device"; exit 1; }
494-
echo "$out" | grep -qE 'centre pixel: \([0-9]+, [0-9]+, [0-9]+, 255\)' \
495-
|| { echo "no centre pixel was reported"; exit 1; }
496-
echo "ok: lavapipe enumerated and the image was rendered on it"
468+
# The missing piece is the LOADER, not the driver. `compat:vulkan` ships
469+
# an import library on Windows and nothing else, and says why in its own
470+
# descriptor: a statically linked loader cannot work there, because
471+
# upstream's `loader_windows.c` creates its locks in `DllMain` and a
472+
# static library never gets one. The runtime `vulkan-1.dll` is expected
473+
# to come from an installed GPU driver, and a GitHub Windows runner has
474+
# none. `xim:mesa-lavapipe`'s Windows payload is an ICD; it imports system
475+
# DLLs and carries no loader either.
476+
#
477+
# So raising this job to "runs" needs a Windows `vulkan-1.dll` package,
478+
# which is a packaging decision rather than a step in this file. macOS is
479+
# not in the same position: `compat:vulkan` builds the loader from source
480+
# everywhere except Windows, so that job does run.
497481

498482
- name: "Toolchain: LLVM — build mcpp (self-host)"
499483
shell: bash

examples/10-graphics/offscreen/mcpp.toml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,18 @@ vulkan-runtime = "2026.09.07"
6262
[target.'cfg(macos)'.xlings.workspace]
6363
"xim:moltenvk" = "1.4.2"
6464

65-
# Windows takes the same software rasteriser Linux does; upstream publishes a
66-
# separate build of it, one minor behind the Linux one.
67-
[target.'cfg(windows)'.xlings.workspace]
68-
"xim:mesa-lavapipe" = "26.2.0"
65+
# WINDOWS DECLARES NO DEVICE, AND THAT IS MEASURED RATHER THAN AN OVERSIGHT.
66+
#
67+
# `xim:mesa-lavapipe` publishes a Windows payload and it installs correctly, so
68+
# an entry here would work in the sense that the bytes arrive. The program still
69+
# reaches no device: `compat:vulkan` ships an import library on Windows and the
70+
# runtime `vulkan-1.dll` is expected to come from an installed GPU driver, which
71+
# a machine without one does not have. Declaring the driver would download 56 MB
72+
# that nothing can load.
73+
#
74+
# The gap is a Windows loader package. Until there is one, this platform builds
75+
# the Vulkan half and runs the CPU fallback, which is what the `cfg(not(...))`
76+
# section below carries.
6977

7078
[build]
7179
accel = "vulkan1.2"

0 commit comments

Comments
 (0)