Skip to content

fix(godot-ref): render the Godot reference on lavapipe on every host - #1119

Merged
Vortiago merged 1 commit into
mainfrom
godot-ref-lavapipe
Nov 1, 2026
Merged

Vortiago merged 1 commit into
mainfrom
godot-ref-lavapipe

Conversation

@Vortiago

@Vortiago Vortiago commented Nov 1, 2026

Copy link
Copy Markdown
Owner

pnpm ref:godot now renders on lavapipe on every host, the same Vulkan driver as the comparison browser it is measured against.

The defect

The comparison browser picks lavapipe. pnpm ref:godot spawned Godot with no Vulkan driver filter. On a host with a GPU, Godot drew on the GPU while the browser drew on lavapipe, so the two sides of a comparison rasterised on different drivers.

The fix

  • scripts/godot-ref/lavapipe.mjs holds one setting, VK_LOADER_DRIVERS_SELECT='*lvp*'. The browser launch and the Godot spawn both pass it, so they cannot drift apart.
  • The bootstrap reports the device that drew the frame (RenderingServer.get_video_adapter_name()).
  • ref:godot refuses a Vulkan frame from any device but llvmpipe, as the browser side already refuses any renderer but llvmpipe. An OpenGL frame passes, because Xvfb draws it in software on every host.

Verification

Godot 4.6.3 (7d41c59c4, the commit the repo's ClassDB tables come from), on a host with an NVIDIA GTX 1650 and an Intel UHD 630. Godot rendered against a virtual kwin_wayland compositor:

  • With no filter: Using Device #0: NVIDIA - NVIDIA GeForce GTX 1650.
  • With the filter: Using Device #0: Unknown - llvmpipe (LLVM 22.1.8, 256 bits).

The unit tests pass: run.test.mjs and the showcase launch tests, 101 passed.

Not run: a full pnpm ref:godot render and the 15 engine tests in run.test.mjs. They need xvfb-run, which this host does not have.

Performance

No production code changes. ref:godot is a developer tool. On a host with a GPU, its renders now take lavapipe's software speed, which is the speed a host with no GPU always had.

The comparison browser picked lavapipe, but `pnpm ref:godot` spawned Godot
with no Vulkan driver filter. On a host with a GPU, Godot drew on the GPU
while the browser drew on lavapipe, so the two sides of a comparison
rasterised on different drivers.

scripts/godot-ref/lavapipe.mjs now holds one setting,
VK_LOADER_DRIVERS_SELECT='*lvp*', that the browser launch and the Godot spawn
both pass. The bootstrap also reports the device that drew the frame, and
ref:godot refuses a Vulkan frame from any device but llvmpipe, as the browser
side does.

Measured with Godot 4.6.3 (7d41c59c4) on a host with an NVIDIA GTX 1650,
rendered on a virtual kwin_wayland compositor:
- with no filter: Using Device #0: NVIDIA GeForce GTX 1650
- with the filter: Using Device #0: llvmpipe (LLVM 22.1.8, 256 bits)
@github-actions github-actions Bot added the ci Changes workflows, git hooks, agent config or repo scripts label Nov 1, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review

Important: 0. Nit: 0. Pre-existing: 0. I found no defect that clears the REVIEW.md bar. The lavapipe loader setting reaches both the Godot spawn and the browser launch from one shared constant. The new device check refuses only a Vulkan frame drawn by a device other than llvmpipe, and it passes an OpenGL frame and a missing report. I read the diff only. I did not run any command or test.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying textscene-inspector with  Cloudflare Pages  Cloudflare Pages

Latest commit: e51e111
Status: ✅  Deploy successful!
Preview URL: https://4bf64628.textscene-inspector.pages.dev
Branch Preview URL: https://godot-ref-lavapipe.textscene-inspector.pages.dev

View logs

@Vortiago
Vortiago merged commit 88ccc33 into main Nov 1, 2026
39 checks passed
@Vortiago
Vortiago deleted the godot-ref-lavapipe branch November 1, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Changes workflows, git hooks, agent config or repo scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant