Galaxy Shell / docs
Docs / Decisions and plans

Plan: a wgpu renderer for the Smithay compositor

openspec/changes/wgpu-renderer-plan/design.md · Edit on GitHub ↗

This document records decisions, plans or evidence from a project stage. It does not imply that every item is implemented or validated in the current version.

On this page

Plan: a wgpu renderer for the Smithay compositor

Doc status: partly landed. The results below are dated history. Landed: phases 0 to 4 and phase 2b. GLES is removed from the compositor: steps 1 to 11 of gles-removal-plan.md (2026-11-10 to 2026-11-12) left a wgpu-only renderer, a normal dependency since step 10 with no build feature since step 11, and no build has GLES. The effects bridge (native/wgpu-bridge), the wgpu-effects feature and --effects-backend went in step 2; --renderer, AGENT_NATIVE_RENDERER (ignored; the recovery start still exports it for the registered older release) and the file renderer-gles in step 6; the GLES elements, passes and backends in steps 7 and 8; the parity tests in step 9. The recovery start asks for OpenGL (AGENT_NATIVE_GPU_API=gl), and gpuApiAsked replaced rendererAsked. Not landed: nothing of the plan; not verified: a physical login with the GLES-free build has not been done by the owner. Where the plan and the dated results below name the wgpu-renderer feature, --renderer, GlesRenderer, GLES parity tests or .frag files, they describe what existed and ran then (test names that end in _match_gles were renamed in step 9). Checked 2026-11-12.

The test names in the results below that end in _match_gles or _matches_gles are history: step 9 of the GLES removal plan converted those tests to checks without GLES and renamed them (Step 9 result there).

State: proposal of 2026-11-09; phase 0 (probe) done, see Phase 0 result; phase 1 (offscreen renderer) done, see Phase 1 result; phase 2 accepted at the physical login; phase 3 step 1 (window finish and outline) done, see Phase 3 step 1; phase 3 step 2 (glass) done, see Phase 3 step 2; phase 3 step 3 (canvas lens) done, see Phase 3 step 3; steps 4 to 6 done, see their sections; phase 4, the switch, done on 2026-11-10, see Phase 4, the switch. Asked by the owner after the effects moved to wgpu ("how would 2 work? I have interest into going this way", then "Yes, plan and probe"). It extends the hypothesis "Renderizador wgpu completo" in the removed portability-plan.md (section Saída do wgpu no Linux), which recommended keeping Smithay and not forking it; that still holds.

Why

(Situation of 2026-11-09, before phase 4.) Since 2026-11-09 the effects ran on wgpu by default (decision of 2026-11-09 in the removed wgpu-release-plan.md), but Smithay still composites every frame with its GlesRenderer. Each effect pays a GLES to Vulkan to GLES round trip through linear dma-bufs and SYNC_FD fences, and phase 0 of the zero-copy plan measured that this round trip, not the bytes, is the remaining cost (p99 about 25 ms against 19 ms for GLES; the removed wgpu-zero-copy-plan.md, Resultado da fase 0). The bridge also needs Vulkan, so a machine without it keeps the GLES shaders. A renderer of our own removes both: one wgpu encoder and one submission per frame, and wgpu chooses Vulkan or its OpenGL backend.

What it is

Smithay's output path is generic over the renderer: DrmCompositor::render_frame and OutputDamageTracker take any type that implements its renderer traits. Smithay 0.7.0 ships only gles, pixman, glow, multigpu and test renderers. We implement one more, WgpuRenderer, in the compositor crate (no fork):

Smithay trait Job in WgpuRenderer
Renderer, Frame Begin a frame on a target, clear, draw solid rectangles and textured quads with source crop, transform, alpha and damage; finish with one submission and a sync point
ImportMem SHM client buffers through queue.write_texture, limited to damage
ImportDma Client dma-bufs as wgpu textures (Vulkan external memory, or an EGLImage on the GL backend)
Bind<Dmabuf> The GBM scanout buffers of DrmCompositor as the render target
Bind to an offscreen texture Thumbnails, overview planes, workspace previews, the sharp zoom cache
ExportMem Read back for user screenshots and window capture, with the same rules as today
ImportDmaWl, ImportMemWl The Wayland buffer paths Smithay's element code calls

Each custom element of ours (glass, mask glass, blur, canvas warp, black hole, workspace cards and shadow, window finish, outline, F9 theme effects) implements RenderElement<WgpuRenderer> and records its passes into the same encoder. The WGSL passes of native/wgpu-bridge become those passes; their GLES to Vulkan transport goes away. The nested backend draws the same way into an offscreen target presented on the winit window.

What does not change

Smithay for protocols, input, DRM/KMS, libseat, damage tracking and the element tree; Electron and the web UI; the core; the IPC and every consent contract in AGENTS.md; the visual result, which must match GLES pixel for pixel within the limits of each existing parity test.

Backends and this machine

wgpu picks the backend. Vulkan is the first target. The open point is the RX 550 (Polaris, RADV): it has no VK_EXT_image_drm_format_modifier, EGL lists no explicit modifiers, and GBM returned Modifier::Invalid even for LINEAR (probe of 2026-11-07). Without the extension Vulkan cannot describe a tiled scanout or client buffer, so phase 0 decides among:

  • Vulkan only, if this GPU can render into a scanout-capable buffer and sample client buffers through linear or implicit layouts;
  • GL backend (wgpu_hal::gles::Adapter::new_external on the compositor's EGL context, with dma-bufs imported as EGLImages and wrapped by texture_from_raw), which would also be the path for machines without Vulkan;
  • a hybrid, for example GL import of client buffers and Vulkan for the frame, which brings back a crossing per client buffer and must then be measured.

Newer GPUs (AMD GFX9 and later, Intel) have the modifier extension and are expected to take the Vulkan path; that cannot be proven on this machine.

Phases

  1. Probe, throwaway (experiments/wgpu-renderer-probe/). On the render node only, headless, no KMS: Vulkan import and render of GBM scanout buffers and client-like dma-bufs (implicit, linear), SYNC_FD with them, and the wgpu GL backend on an external EGL context with EGLImage import and render. Acceptance: a report with pass or fail per question and the backend choice for this machine. If neither backend can import client buffers here, the plan stops for an owner decision.
  2. Minimal renderer, offscreen. Renderer, Frame, ImportMem and Bind to a texture: solid colors, textures, crop, transforms, alpha and damage. Acceptance: Smithay elements drawn by both renderers in a headless test match within 1/255, plus Smithay's own renderer tests that apply.
  3. Real output behind a startup switch. ImportDma, Bind<Dmabuf>, the DRM path and the nested window, selected by --renderer wgpu (GLES stays the default renderer). Plain windows only; every custom element still has its GLES type, so this phase runs without effects. Acceptance: nested QA with real clients (SHM and dma-buf, the nine client formats of the bridge tests, resize, transforms), screenshots and window capture, and the lock screen; then one physical login with the owner. The standard Rust gates also add a compile-only run, --cargo check --locked --features session,wgpu-renderer --tests, so the feature and its parity tests cannot rot between GPU runs (history: the feature went in step 11 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md, 2026-11-12; AGENTS.md has the current gates). Phase 2 runs in parts: part A, the renderer traits and their headless parity tests (done, see Phase 2 part A result); part B, the switch, the DRM path and the headless backend (done, see Phase 2 part B result; the nested window stays GLES); phase 2b, the dma-buf path of the wgpu GL backend.
  4. Effects as native passes, one per change. Port each custom element in this order: window finish and outline (simple), glass and mask glass, canvas warp, black hole, workspace cards and shadow, F9 theme effects. Each step keeps its existing parity test, now between the two renderers. A loadable theme keeps its WGSL ABI.
  5. Switch and clean up, in two parts since the owner decisions of 2026-11-10 (see Phase 4, the switch).
    • 4a, the switch (done 2026-11-10). wgpu is the default renderer of --session and --headless in a build with wgpu-renderer. --renderer gles and AGENT_NATIVE_RENDERER=gles stayed as the way out until step 6 of the removal plan (2026-11-11), and the recovery of the login asks for GLES. The performance gates of wgpu-benchmark.md against GLES (ABBA, p95, p99, interval, CPU, PSS), which this phase required before, do not block and are not run, by the owner's decision.
    • 4b, the removal of GLES (landed in steps 1 to 11 of the removal plan, 2026-11-10 to 12; the owner's physical login with the GLES-free build is not verified yet). It removed GlesRenderer, the GLES scene, the GLES to Vulkan transport of the bridge, the wgpu_* adapters, --effects-backend and the .frag references. Its plan is openspec/changes/archive/2026-11-10-gles-removal-plan/design.md.

Size and risks

  • Size (2026-11-09, before the removal). 32 of the 69 non-test compositor sources name GLES types or calls (search of 2026-11-09, may count high), and 7 .frag files remain as GLES references. Most of that is the custom elements, already ported to WGSL.
  • Smithay's element types (TextureRenderElement, SolidColorRenderElement, the surface tree) are generic over the renderer, but some helpers assume GLES texture types; phase 1 lists them.
  • Multi-GPU (MultiRenderer) is not used today and stays out of scope.
  • Reference. Smithay's draft Vulkan renderer PR (Smithay/smithay#2165) is read for its trait mapping only; it was a rough draft with conflicts on 2026-11-06.
  • Mac. The macOS version is not a compositor, but an effects core that is pure wgpu is closer to what it needs than the GLES bridge (macos-handoff.md).

Rollback

Every phase landed behind --renderer wgpu until phase 4. Since the switch (2026-11-10) a login composites with wgpu. Since step 6 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md (2026-11-11) a build with the wgpu renderer has no way back to GLES: --renderer and the file renderer-gles are gone, and a left-over renderer-gles is inert on purpose (one warning line).

The emergency way back keeps the wgpu renderer and leaves Vulkan: create the empty file ~/.config/agent-native-os/gpu-api-gl and log in again, and the renderer runs on OpenGL without opening the Vulkan device. The login recovery asks for OpenGL (AGENT_NATIVE_GPU_API=gl) and still exports AGENT_NATIVE_RENDERER=gles for the registered recovery release, which has GLES. Any of this takes effect at the next login; nothing changes in the running compositor. No phase touches the session in use, the installed routing or the profile; QA is nested through scripts/nested-qa.py.

Phase 0 result (2026-11-09)

experiments/wgpu-renderer-probe/ ran twice with the same results, headless on the render node only (no DRM master, KMS or live session), on the RX 550 with Mesa 26.0.8. The pattern changes on every pixel, at 256x256 and 301x203 (odd width, to catch pitch errors). Evidence is local in ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-probe/.

Question Result
V1a. GBM SCANOUT|RENDERING bo (implicit layout) as a Vulkan render target Pass, OPTIMAL and LINEAR import; GL readback and gbm_bo_map exact. The memory is tiled, and RADV takes the layout from the amdgpu BO metadata at bind
V1b. GBM bo with LINEAR Pass. The memory is linear; only the reported modifier is Invalid
V1c. Vulkan export imported back into GBM with SCANOUT Pass for a linear buffer and a linear exportable image; an OPTIMAL export is refused for SCANOUT (EINVAL)
V2. Client bos written by GL, sampled in Vulkan Pass with OPTIMAL import for implicit and linear bos; a LINEAR import of an implicit bo is wrong (49152 of 65536 pixels); NV12 not allocatable by GBM here
V3. SYNC_FD both ways Pass; the fence import into EGL must run with the context current
G1. wgpu GL backend on Smithay's EGL context (new_external) Pass, OpenGL ES 3.2, about 6 ms
G2. Client dma-buf through Smithay's import, wrapped by texture_from_raw Pass, all exact
G3. Scanout bo as a GL render target for wgpu Pass, renderbuffer and texture routes
G4. Sharing the context with Smithay Works with a hazard: wgpu leaves pixel-store, framebuffer, program and scissor state that breaks Smithay's readback, so a state reset boundary is required

Imports cost about 33 to 61 us (Vulkan) and 13 to 26 us (EGL) per buffer.

The risk on this card. vkGetPhysicalDeviceImageFormatProperties2 reports DMA_BUF external images as unsupported at every tiling and usage. Without VK_EXT_image_drm_format_modifier, the working OPTIMAL import is outside Vulkan valid usage: it works by a RADV implementation detail, validation layers would flag it, and a Mesa update could change it.

Backend choice (recommendation, owner to confirm before phase 2):

  • Vulkan where the device has VK_EXT_image_drm_format_modifier (AMD GFX9 and later, Intel).
  • On a device without it, such as this Polaris card, Vulkan with the OPTIMAL implicit import only after a startup self-test of the same checks as V1a and V2 passes on that boot; otherwise the wgpu GL backend.
  • The GL backend is also the path for machines without Vulkan, which answers the compatibility question that started this plan. It needs the state reset boundary of G4 and accepts the downlevel limits of wgpu's GL backend.
  • Never import an implicit bo as LINEAR; render targets are GBM SCANOUT|RENDERING bos imported into Vulkan, the allocation Smithay already makes.

Not tested: a real scanout (AddFB2 and page flip), multi-plane formats, explicit modifiers (none here), threads, sustained performance, validation layers and any Smithay trait. Phase 1 can start on either backend, because it draws offscreen.

Two older notes do not reproduce on Mesa 26.0.8: a linear Vulkan image now exports, and a LINEAR GBM bo is linear in memory even though it reports Modifier::Invalid. Route C of the removed wgpu-zero-copy-plan.md is no longer needed for performance, so it is not reopened.

Phase 1 result (2026-11-09)

native/wgpu-renderer (crate galaxy-wgpu-renderer, GPL-3.0-or-later, wgpu 30.0.1, Smithay 0.7.0 with only wayland_frontend) holds WgpuRenderer. It is a crate of its own beside native/wgpu-bridge, not a module of the compositor as the table above said, so it builds and is tested without the compositor and phase 3 can move the bridge passes next to it. The compositor linked it then only under the optional feature wgpu-renderer, and only from its tests; default, session and wgpu-effects builds did not compile it (history: since step 10 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md every build links it, and the feature went in step 11). scripts/prepare-project.py hashes its sources and manifest like the bridge's.

Traits. RendererSuper and Renderer (filters, debug flags with TINT, wait), Frame (WgpuFrame: clear, draw_solid, render_texture_from_to, transformation, wait, finish, submit on drop), ImportMem (Argb8888, Xrgb8888, Abgr8888, Xbgr8888), ImportMemWl (SHM with the per-surface texture cache and damage-only uploads of GLES), ExportMem (copy_framebuffer, copy_texture, map_texture), Bind<WgpuTexture> and Offscreen<WgpuTexture>, plus Texture, TextureMapping and a Fence, and From<WgpuError> for SwapBuffersError.

Design. Every call of a frame appends vertices to one CPU array and a draw to a list; finish writes one vertex buffer, records one render pass with LoadOp::Load in one encoder and submits once. The vertices come from the same matrices as GlesRenderer (projection, texture matrix, damage clamped into the destination, one quad per damage rectangle), computed on the CPU; the projection leaves out GLES's flip180, because a wgpu framebuffer starts at its top row, so both renderers store the same rows at the same addresses. Blending is ONE, ONE_MINUS_SRC_ALPHA for color and alpha; clear and opaque solids draw without blending, and texture damage is split into the parts inside and outside the opaque regions, the inside drawn without blending, as GLES does. Argb/Xrgb are Bgra8Unorm, Abgr/Xbgr Rgba8Unorm, and a flag makes the shader ignore the stored alpha of the X formats like GLES's NO_ALPHA. The sampler follows downscale_filter and upscale_filter, with CLAMP_TO_EDGE. The fence polls the wgpu device; wait skips a fence of the same device, because one queue runs in order. Read back is synchronous in copy_*.

Parity. native/smithay/src/wgpu_renderer_tests.rs draws the same element lists (SolidColorRenderElement, TextureRenderElement, MemoryRenderBufferRenderElement in one render_elements! enum) with OutputDamageTracker through GlesRenderer (EGL on the render node) and WgpuRenderer into 301x203 offscreen targets and compares the read back bytes. RX 550, Mesa 26.0.8; Vulkan is RADV, the GL backend is radeonsi through new_external on its own EGL context and thread (G1). Both backends gave the same numbers:

Group Max error (/255) Bytes that differ
Solids with alpha, overlapping, partly off the output, translucent clear 0 0
The four 8-bit memory formats, opaque and alpha 1 28
Crop and scale up and down, filters Linear/Linear, Nearest/Nearest, Linear/Nearest 1 3468, 985, 985
The eight buffer transforms 1 183
The eight output transforms (whole scene) 1 98 each
Element alpha on alpha and X formats and on a solid 1 22080
Damage-only redraws over five frames, with update_memory through MemoryRenderBuffer 1 455
The Frame API: partial clear, solid and texture damage, opaque regions, a dropped frame 1 560
ImportMemWl of a synthetic SHM client (texture read back), full and damage-only upload 0 0

Every group covers overlap in order and the odd size. Two traps came up and the test avoids them: the GLES texture shader runs at mediump, which is fp16 on radeonsi, so colors that land on x.5 in 8 bits (0.1, 0.2, 0.3) round apart and the remaining 1/255 differences come from that; and a nearest sample exactly on a texel edge is implementation-defined (a 40 to 110 px upscale gave 203/255 on 342 pixels), so the test uses widths that keep pixel centers off edges. Mutation checks showed the tests catch the opaque-region split (251/255 when it is removed) and the X-format flag (255/255). Evidence is local in ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-phase1/.

Gaps for phase 2.

  • ImportDma, ImportDmaWl and Bind<Dmabuf>. Smithay's ImportAll, and with it the surface tree elements (WaylandSurfaceRenderElement, render_elements_from_surface_tree), needs ImportDmaWl as well as ImportMemWl, so real windows wait for phase 2.
  • An exportable fence: DrmCompositor passes SyncPoint::export as the plane's IN_FENCE_FD; WgpuFence exports nothing, so it would need a Vulkan semaphore export (SYNC_FD) or an EGL fence on the GL backend.
  • 10-bit and half-float memory formats, which GLES also imports.
  • Blit and BlitFrame, and Offscreen to a renderbuffer type.
  • On the GL backend, Smithay and wgpu on one EGL context need the state reset boundary of G4; the tests kept them on separate contexts and threads.

Where wgpu differs from GLES on purpose. A y-inverted texture (import_memory with flipped) maps v to 1 - v, so the image comes out upside down, which is what the flag means; GLES 0.7.0 multiplies by diag(1, -1), which under CLAMP_TO_EDGE samples a single row, so the parity tests cannot compare it and native_wgpu_renderer_flipped_import_reverses_rows checks the reversed rows of a known pattern instead. render refuses an output larger than its target, which GLES draws with a larger viewport. An update_memory inside a frame reaches the GPU before the whole frame, because write_texture runs before the next submission; GLES uploads in place. Texture::format reports the format that was imported, where GLES reports the alpha twin of an X format.

Review round 1 (2026-11-09). An independent review asked for these changes, made in a second commit:

  • Errors a client can cause (M1). The renderer installs an on_uncaptured_error handler that logs, so a wgpu validation error no longer panics; every texture, bind group, upload, read back and frame submission runs inside an out-of-memory and a validation error scope (as native/wgpu-bridge does) and returns WgpuError::Device. Sizes are checked first: zero gives UnexpectedSize and a side above max_texture_dimension_2d gives TooLarge, for import_memory, SHM imports and create_buffer. At start the renderer probes, in a scope, whether the device can create a Bgra8Unorm texture with the usage it needs; if not (some GL drivers), Argb/Xrgb are stored as Rgba8Unorm with R and B swapped on upload and on read back, so MEM_FORMATS stays the same. The RX 550 has it on Vulkan and on GL; the tests force the other path with without_bgra_storage and it matches GLES with the same bounds.
  • Feedback loop (M2). render_texture_from_to with the bound target as its source returns WgpuError::FeedbackLoop (Arc::ptr_eq of the two textures).
  • Opaque read back (L4). copy_* returns alpha 255 when the source or the requested format has no alpha, also after a draw with alpha below 1 into an X target.
  • SHM cache (L5). A new SHM texture enters the surface cache only after its first upload succeeds.
  • Read back size (L7). A read back whose padded size exceeds max_buffer_size returns TooLarge.
  • Tests. Each group now also asserts a bound on the count of differing bytes, about 1.5 times the measured counts above (Solids and SHM 0, Formats 64, the crop groups 5200 and 1500, buffer transforms 300, alpha 33000, damage 700, each output transform 150, the Frame API 850), and the reference must hold at least five distinct pixels, not only differ from its first pixel. New GPU tests: refused sizes, the feedback loop, opaque X targets, the flipped import and a device with a 1 MiB max_buffer_size. 42 native_wgpu_ tests pass.
  • Accepted without code. L8: the fence polls the device and the GL backend needs its context current on the calling thread (both above); is_exportable stays false until phase 2. L9: each draw allocates small vectors for its damage split; the cost is negligible next to the GPU work and phase 2 can pool them if a profile shows it.

Review round 2 (2026-11-09). A second review of the round 1 diff, fixed in a third commit:

  • Cached failures (M1, M2). A new vertex buffer is created in its own error scope and kept only when valid, and a frame whose submission fails drops the cached buffer, so one transient error no longer poisons every later frame. A render pipeline (and a sampler) is created in a scope and enters its cache only on success; the draw that needed it returns the error from clear, draw_solid or render_texture_from_to, drops its quads and leaves the rest of the frame. The doc of WgpuRenderer::new now says exactly what runs in scopes: everything after construction; the shader and layouts of the constructor have fixed descriptors.
  • Errors the handler would hide (M3). The GPU tests replace the logging handler with one that counts (checked in the tests), and a guard fails each test if any wgpu error reached it, so an unscoped error is a test failure. A #[doc(hidden)] hook, inject_failure, makes the next pipeline or vertex buffer invalid; native_wgpu_renderer_recovers_after_injected_failures checks the error and that the following frames draw. 43 native_wgpu_ tests pass.
  • Smaller items. Read back computes its capacity in usize (L4). FeedbackLoop also compares the wrapped wgpu::Texture, so two handles of one GPU texture (as phase 2 imports may make) are caught (L7). The GL backend bounds were measured on their own (L10): radeonsi gave the same count as RADV in every group, and so did the Rgba8Unorm storage path, so one table holds.
  • Accepted without code. L8: the SHM bounds math is in usize, safe on the 64-bit targets the project supports, noted at the call. L9: the Bgra8Unorm probe checks that the texture can be created with every usage, not that sampling and rendering it give correct bytes; the parity tests cover that on this machine.

Smithay helpers that assume GLES. None among the elements used here: TextureRenderElement, SolidColorRenderElement, MemoryRenderBuffer and OutputDamageTracker are generic and worked unchanged. The GLES assumptions are in the compositor's own elements and helpers (the 32 sources counted above) and in ImportAll's need of a dma-buf path.

Phase 2 part A result (2026-11-09)

Part A gives WgpuRenderer the dma-buf traits that a real output needs, on wgpu's Vulkan backend, tested headless on the render node. Nothing in the compositor uses them yet: no --renderer wgpu, no DrmCompositor, no nested window and no session were touched. The code is in native/wgpu-renderer/src/dma.rs and selftest.rs. It copies, with attribution, the extension checks and SYNC_FD semaphores of native/wgpu-bridge/src/transport.rs, the sync-file ioctls of dma_sync.rs and the image import of the probe's vulkan.rs. It does not link the bridge, which depends on GlesRenderer.

What is implemented.

  • WgpuRenderer::for_render_node(path) opens the Vulkan device of a DRM render node with the dma-buf extensions: external memory fd and dma-buf, SYNC_FD semaphores, the foreign queue family, and VK_EXT_image_drm_format_modifier when the driver has it. It matches the node by VK_EXT_physical_device_drm. A renderer from new or from_adapter has no dma-buf path (DmaSupport::Unsupported), and its imports return WgpuError::DmaUnavailable.
  • ImportDma imports plane 0 of a single-plane dma-buf as a wgpu texture, zero copy, through texture_from_raw with dedicated imported memory. The imports are cached per buffer (WeakDmabuf) like GLES. The buffer must be at least as large as Vulkan's requirement.
  • ImportDmaWl returns WgpuError::NotDmabuf for a buffer that is not a dma-buf. Smithay's default panics there. With ImportMemWl, this gives ImportAll, so render_elements_from_surface_tree works.
  • Bind<Dmabuf> renders into a dma-buf, with supported_formats set to dmabuf_render_formats().
  • WgpuFence of a frame on this path holds the SYNC_FD of the submission: is_exportable is true and export gives a dup, as DrmCompositor passes it to IN_FENCE_FD.
  • Backend choice, DmaSupport:
    • Explicit, with the modifier extension: the modifiers the driver lists for each format and use, checked with vkGetPhysicalDeviceImageFormatProperties2, and implicit buffers never. Since review round 1 they are only candidates: the self-test checks each one, and only the ones that pass import.
    • Implicit, without it (this RX 550, RADV, Mesa 26.0.8): implicit buffers import with OPTIMAL tiling, never as LINEAR. Buffers with the LINEAR modifier import with LINEAR tiling, to sample only, and only when vkGetImageSubresourceLayout gives the buffer's stride as the row pitch with offset 0.
    • Unsupported(why).
  • dmabuf_formats lists only what the self-test passed, on both paths (since review round 1). Before the test, or after a failed one, every import and bind is refused.
  • Formats (DMA_FORMATS):
    • Argb8888, Xrgb8888, Abgr8888, Xbgr8888, Abgr2101010 and Xbgr2101010 sample and render.
    • Argb2101010 and Xrgb2101010 sample only. They are stored as Rgb10a2Unorm (the same bits as A2B10G10R10), and the shader swaps red and blue.
    • X formats ignore the stored alpha, as with memory textures.

Synchronization.

  • Each submission that uses imported images is one vkQueueSubmit with three command buffers:

    1. a raw acquire from VK_QUEUE_FAMILY_FOREIGN_EXT into the layout that wgpu tracks for the image;
    2. wgpu's commands;
    3. a raw release back to the foreign family in GENERAL.

    wgpu forbids raw and wgpu commands in one encoder; the frame is still one encoder and one submit.

  • Before the submit, the renderer takes each buffer's implicit fences with DMA_BUF_IOCTL_EXPORT_SYNC_FILE: the writers for a sampled buffer, every user for a target. It imports them as temporary SYNC_FD wait semaphores, because Vulkan defines no implicit synchronization for imported external memory.

  • The submission signals a SYNC_FD semaphore. Its fd is the frame's fence, and it goes back into each buffer's reservation with DMA_BUF_IOCTL_IMPORT_SYNC_FILE, so KMS and clients see it implicitly.

  • Renderer::wait and Frame::wait with a fence of another device stage its exported SYNC_FD as a GPU wait of the next submission. A fence that does not export is waited on the CPU, which is the documented fallback.

  • Semaphores come from a pool and return to it when on_submitted_work_done reports their submission.

  • Smithay 0.7.0's elements never call wait for client buffers; client sync is the implicit fence above.

  • Errors stay in the phase 1 rules: every Vulkan call returns WgpuError, wgpu calls run in error scopes, and sizes are checked against the device limits.

Self-test (WgpuRenderer::self_test(&GbmDevice), the checks V1a and V2 of the probe). As first written, on Implicit, it ran every format of DMA_FORMATS at 131x67 (review round 1 below changed the sizes, the explicit path and the pass rule):

  • sample: a GBM RENDERING buffer is written through GBM's map with a hash per pixel, then imported, drawn 1:1 with nearest filters and read back.
  • linear: the same with a buffer of linear layout. Without modifiers, GBM's LINEAR flag reports Modifier::Invalid, so the same plane is described again with Modifier::Linear, as a client that sends modifier 0.
  • render, for the render formats: the renderer draws an opaque pattern into a GBM SCANOUT|RENDERING buffer, which is read back through GBM's map.

GBM's map detiles with the driver's own layout, so any layout disagreement fails a check, within 1/255. Argb8888 and Xrgb8888 must pass sample and render. Then the passing formats are enabled and the report returns Ok(SelfTestReport). Otherwise nothing is enabled and it returns Err(SelfTestError::Failed(report)). On Explicit it checks nothing and returns Ok with empty lists. On Unsupported it returns Err(SelfTestError::Unsupported). It never panics.

On the RX 550 every format passed sample and linear, and the six render formats passed render. With the device and GBM opened, the test ran in 0.18 s. A forced failure (inject_failure(DmaImport) hands the first import a memfd) gives vkGetMemoryFdPropertiesKHR: ERROR_INVALID_EXTERNAL_HANDLE on Argb8888 and returns Failed. After that, imports and binds are refused and both format lists are empty, and a later self-test passes again.

Parity (native/smithay/src/wgpu_renderer_dma_tests.rs, and the surface tree test in wgpu_renderer_shm_tests.rs). Every buffer is a synthetic GBM buffer on the render node. GLES is EGL on the same device. Every test uses the counting uncaptured-error guard of phase 1. On the RX 550 with Mesa 26.0.8, the maximum error is 1/255 in every row:

Test Bytes that differ
Client buffer through TextureRenderElement (1:1, cropped and scaled with alpha 0.6, buffer transform 90), Argb8888 945
The same, Xrgb8888 1377
The same, Abgr8888 992
The same, Xbgr8888 1625
The same, Abgr2101010 943
The same, Xbgr2101010 1535
The same, Argb2101010 1112
The same, Xrgb2101010 1836
Bind<Dmabuf> into a GBM scanout buffer, read through GBM, 8-bit targets, Solids / Formats / Alpha 0 / 28 / 22080
The same, Abgr2101010 and Xbgr2101010 targets 0 / 749 / 765
Surface tree (render_elements_from_surface_tree, ImportAll) of a linux-dmabuf client buffer, Argb8888 implicit and LINEAR 670
GLES draws into a buffer without waiting; wgpu waits on its fence (GPU wait of its SYNC_FD) and samples it, 3 rounds 0
The 16 phase 1 scenes through the renderer of the dma-buf path as the phase 1 table

Each client format row holds for the implicit buffer, the implicit buffer of linear layout and the LINEAR-modifier buffer, with the same counts. The test bounds are about 1.5 times these counts.

The 1/255 differences are the GLES mediump rounding of phase 1. The 10-bit targets add their own quantization, which is why the Formats count grows to 749.

The frame of Bind<Dmabuf> exports an fd. In each of three frames, /proc/self/fd names it anon_inode:sync_file and poll reports it signaled within 5 s.

ImportDmaWl of a SHM buffer returns NotDmabuf. A test found that a dma-buf commit is held by the compositor until the buffer's fence signals (dmabuf.rs, hold_commit), so the surface test pumps until the new buffer is applied.

Not covered, stated plainly.

  • Of the nine client formats of wgpu_dmabuf_tests.rs, Rgb565 (no wgpu format), NV12 and YUV420 (more than one plane) do not import. The wgpu renderer does not list them, so under --renderer wgpu the compositor must announce WgpuRenderer::dmabuf_formats(), not the GLES list. That is part B.
  • The explicit-modifier path is written but never ran, because this machine has no VK_EXT_image_drm_format_modifier. It needs a GFX9 or newer AMD GPU, or Intel. Since review round 1 it is gated by the self-test like the implicit path, and that gate did not run either.
  • LINEAR buffers are not render targets on the implicit path, and Argb2101010 and Xrgb2101010 are never render targets.
  • DrmCompositor, KMS planes, the IN_FENCE use of the exported fd, the nested window and a physical output were not exercised. Only the fd itself was checked.
  • No explicit-sync protocol (linux-drm-syncobj). Clients sync implicitly.
  • The import ignores damage (zero copy). Multi-GPU is out of scope.
  • No mutation run was made against the new tests.

Review round 1 of part A

The fixes of the first review of 55b27ccd, and what they found.

The render targets of this RX 550 fail at real sizes. The self-test now runs every format at 131x67 and 1031x617, and the sample and render checks of Argb8888 and Xrgb8888 also at 1920x1080 and 3840x2160 (the LINEAR check at the two small sizes). Sampling passed at every size for every format, implicit and LINEAR. Every render target failed at 1031x617 and above, before anything is drawn: RADV's OPTIMAL image with COLOR_ATTACHMENT needs more memory than the GBM SCANOUT|RENDERING buffer has, so the import refuses it:

Size GBM buffer Vulkan, COLOR_ATTACHMENT Vulkan, sampled or transfer only
131x67 39168 39168 39168
1031x617 2949120 2957328 2949120
1920x1080 8847360 8867856 8847360
2560x1440 15728640 15759376 not measured
3840x2160 33423360 33493008 33423360

The extra bytes grow with the pixel count by about 1/128 byte per pixel, the size of CMASK (fast clear metadata, 4 bits per 8x8 tile); RADV leaves it out below 512x512, which is why 131x67 passed in part A. STORAGE, TRANSFER_DST, INPUT_ATTACHMENT, MUTABLE_FORMAT and ALIAS did not remove it (measured with a throwaway query of vkGetImageMemoryRequirements). Binding the BO anyway would let RADV write metadata past the buffer, so the refusal stays. The 131x67 pass of part A was a false positive for output sizes. Consequence: on this machine dmabuf_render_formats() is empty and Bind<Dmabuf> refuses every GBM scanout buffer, so DrmCompositor cannot render through this renderer here yet. A path that would fit (not built): import the target with TRANSFER_SRC | TRANSFER_DST only, whose requirement equals the BO in the table, render into a persistent wgpu texture per imported buffer, and copy it into the buffer at the end of the frame's single encoder (about 33 MB of copy per 4K frame).

Pass rule. self_test returns Ok when Argb8888 and Xrgb8888 sample (implicit buffers on the implicit path, any listed modifier on the explicit one); render targets are enabled on their own, only the formats that passed at every size. Ok therefore no longer means that a target binds: read SelfTestReport::render or dmabuf_render_formats(). The report now lists Formats (code and modifier) in sample and render, has one check per format and modifier with its sizes, and elapsed.

Time. In release on the RX 550 the whole test takes 0.67 to 0.74 s (two runs), with the device and GBM already open; in the debug test build about 34 s. With 1440p in the list as well it took 3.3 to 3.5 s in release, so 1440p was left out.

Explicit path. Imports are refused there too until self_test passes (WgpuRenderer::dma_verified()); the test allocates a GBM buffer with each listed modifier, samples it and renders into it at every size, and enables only the modifiers that passed. Implicit (Modifier::Invalid) buffers never import on it. Before Vulkan sees a client plane the import checks whole texels, a stride of at least the width, and offset plus stride times height inside the buffer (fstat size); the explicit path then checks with vkGetImageSubresourceLayout (MEMORY_PLANE_0) that the image took exactly the client's offset and row pitch, and every path that vkGetImageMemoryRequirements fits in the buffer. The implicit OPTIMAL path refuses an offset other than 0. None of the explicit code ran here.

Other fixes.

  • A submission that fails before anything is queued puts the waits of Renderer::wait back and destroys only the ones it created. Tested with a new InjectedFailure::DmaSubmit: the staged wait survives the failure and the next frame consumes it and matches GLES.
  • The sync-file ioctls are probed at import (export the reader fences, import them back as reads), and a buffer without them is refused there. After a submission, a failed reservation import is logged and the frame stands, and a failed SYNC_FD export is logged and gives a fence that is not exportable instead of an error after the work was queued.
  • The imported image and memory belong to the drop callback of the wgpu-hal texture (TextureMemory::External), so a failed create_texture_from_hal frees them instead of leaking.
  • The first acquire of every image uses GENERAL as the old layout, also for a new target; a transition from UNDEFINED lets the driver drop the content, which a re-imported scanout buffer with an age must keep. See the comment in dma.rs.
  • Every self-test run drops the cached imports first, so a failed rerun cannot leave a cached import usable.
  • The buffer size comes from fstat, so the client's file offset is never moved.

Tests added (all pass on the RX 550): client buffers at 1920x1080, 2560x1440 and 3840x2160 sampled 1:1 match GLES with 0 differing bytes; a client rewrites its buffer and the cached import shows the new content, 1105 bytes at 1/255 against GLES, implicit and LINEAR; the failed submission above; a frame that samples a client dma-buf exports a SYNC_FD. The later-frames bind test (age 1 over a scanout buffer) and the large bind comparison are written but report "not covered" here, because no format binds; the bind parity of part A no longer runs on this machine for the same reason.

Phase 2b, the GL backend dma-buf path. On a device without Vulkan, or one whose self-test fails, the wgpu GL backend could import client buffers as EGLImages and wrap them with texture_from_raw, as the probe did. It would render into EGLImage-backed renderbuffers, and its fences would come from EGL_ANDROID_native_fence_sync. That needs the EGL state boundary of G4 between Smithay and wgpu on one context. Built on 2026-11-10 without that boundary, because the renderer owns its EGL context and no Smithay GLES renderer shares it: see Phase 2b result.

Phase 2 part B result (2026-11-09)

Part B wires WgpuRenderer into the outputs of the compositor behind the startup switch --renderer gles|wgpu (default gles, native/smithay/src/renderer_choice.rs). The switch is independent of --effects-backend; under --renderer wgpu the GLES effects bridge is never built and the effects backend is forced to GLES, with a warning when --effects-backend wgpu was given. wgpu without the wgpu-renderer build feature is refused at parse time, and so is --nested --renderer wgpu. state --full reports renderer. No IPC command or setting changes it. The feature now links into the binary, and a full preparation builds session,wgpu-effects,wgpu-renderer (scripts/prepare-project.py), so the login binary has it while GLES stays the default. When that build fails, the preparer builds session,wgpu-effects with a warning (review round 1 below).

Start. native/smithay/src/wgpu_output.rs opens the renderer with for_render_node on the render node of the same GPU, refuses Unsupported, and runs self_test on the Explicit and the Implicit path alike, since neither imports nor binds before it passes (commit 2111a8aa). Every failure is logged and ends the start with an error; GLES never replaces it within one run. linux-dmabuf announces dmabuf_formats() of the renderer on that render node (dmabuf::announce_formats); --no-dmabuf still keeps it off.

What runs on each path.

  • DRM (drm.rs, Composer::Wgpu): the render node of the primary GPU (DrmNode::dev_path_with_type(Render)), the GBM allocator, the formats of dmabuf_render_formats() for the scanout buffers, Bind<Dmabuf> and the exportable SyncPoint of the frame passed as IN_FENCE to queue_buffer when the plane has IN_FENCE_FD (a plane without it would make Smithay wait on the CPU without a limit, so the fence is dropped there and KMS waits on the implicit fence in the buffer). On such a plane a frame that did not finish within the bounded wait is held back until its fence signals (review round 1 below). The DRM path requires at least one dma-buf render format and refuses to start otherwise. Not run on hardware: it needs the physical login.
  • winit (--nested, the --visible window of nested QA): skipped. Smithay 0.7.0's winit backend owns an EGL surface and a GlesRenderer, so a wgpu window would need a second window backend; --nested --renderer wgpu and nested-qa.py start --visible --renderer wgpu are refused with that reason.
  • Headless (--headless, the default of nested QA): one WgpuTexture per output (1920x1080, Transform::Normal), one or two outputs, the same order of a frame as the GLES headless pipeline (dma-buf resolve, sweep, workspace transitions, captures, scenes, presentation feedback with a single output, lock confirmation, frame callbacks). It needs no dma-buf render format, because it draws into its own textures.

The plain scene (native/smithay/src/wgpu_scene.rs). It takes the same windows in the same order, with the same placements and clips, as the GLES scene, through helpers extracted from scene.rs with GLES behavior unchanged: primary_clip, secondary_clip, grab_guest_parts, wallpaper_parts, lock_content, lock_surface_elements, popup_elements and the generic cursor_elements_at. It draws windows and their popups, the wallpaper and host windows, the protected layers and panels, the chat, the cursor, a window held across outputs, the lock surfaces and the canvas camera (through the placements). While locked only the lock content of each output is drawn. The order is computed first as renderer-free items, so tests check it without a GPU.

Skipped elements, each with its GLES type still, and their bookkeeping reset so the state tells the truth:

  • window finish (rounded corners, border, shadow) and outline (drawn since phase 3 step 1);
  • chat glass, mask glass and the bar and panel glass (chat_glass_drawn 0, chat_alpha_glass_drawn false, per output too, so the host keeps its heavier tint; drawn since phase 3 step 2);
  • canvas lens (set_warp_drawn(None), so input stays flat; drawn since phase 3 step 3);
  • black hole (cleared; drawn since phase 3 step 4);
  • workspace cards, their shadow and the web planes of workspace transitions (the web planes drawn since phase 3 step 5, the cards and shadow since step 6);
  • overview planes (overview_planes.fail() at start, so the host keeps the image path; drawn since phase 3 step 5);
  • the downscale cache of sharp zoom (windows draw directly);
  • workspace previews (refused with "Workspace preview needs the GLES renderer"; drawn since phase 3 step 5);
  • F9 theme effects (a theme request answers with effectsOperationError; answered since phase 3 step 6, which compiles the WGSL of a theme and refuses a theme with only GLSL).

Screenshots and capture. Output captures (frame_of), window captures (render_window) and the original-resolution bands (process_window_capture_wgpu, bounded by max_texture_dimension_2d) run on the renderer through the generic CaptureRenderer trait of capture.rs, without the window finish. While locked, captures stay refused as before.

Tests. No GPU: the switch parsing (the_renderer_is_gles_unless_wgpu_is_asked_and_built), the plain scene order and its clips against primary_clip, the reset bookkeeping, a locked frame with only the lock surfaces on the primary and the extra output, and an extra output in local coordinates (wgpu_scene_tests.rs). Ignored GPU tests: native_wgpu_renderer_plain_scene_matches_gles draws the same plain scene of synthetic SHM clients with both renderers (0 bytes differ on the RX 550), and native_wgpu_renderer_headless_backend_draws_a_synthetic_client starts the wgpu headless backend, maps a synthetic client and reads it back through an output capture and a window capture.

Nested QA (run 7c68c0ed, nested-qa.py start --renderer wgpu, headless, one output, synthetic profile, no provider). Start log: "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 0 render formats", linux-dmabuf on with 16 formats. The profile's wallpaper, bottom bar and chat drew; GNOME Calculator (GTK4, GL, dma-buf) and a second one with GSK_RENDERER=cairo (SHM) drew side by side (clientBufferCommits dma-buf 402, shm 19); Super+Shift+T to the grid resized both, and they redrew at the new size; Super+L reached sessionLock.state: locked, which needs the lock frame confirmation of this backend. The capture while locked was refused, as by design. Unlock was not run: it needs a PAM password. The compositor log had no error. Captures, local only, in ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-phase2/: 01-shell-start.png, 02-two-calculators.png, 03-grid-resized.png.

What this machine shows for DRM. With the reviewed self-test of part A (2111a8aa), the RX 550 passes sampling but no render format: RADV's optimal color-attachment image needs slightly more memory than the GBM scanout buffer (CMASK), so Bind<Dmabuf> is refused at real output sizes. --session --renderer wgpu therefore exits at start here with "the dma-buf self-test passed no render format, so no scanout buffer can be drawn". That is the intended refusal, not a fallback. A follow-up of the renderer crate (draw into a wgpu texture and copy into the buffer) keeps Bind<Dmabuf> and dmabuf_render_formats() as the interface, so this path needs no change for it. The headless backend draws into Bind<WgpuTexture> and does not depend on it.

What still needs the physical login: the DRM path at all (scanout, page flips, IN_FENCE, hotplug, several heads, VT switch), the real host and core on it, and the owner's judgment of the plain scene without effects.

Review round 1 of part B

Fixes for the low findings of the review of 7ff1f632.

  • No flip of an unfinished frame without IN_FENCE_FD (drm.rs, outputs::holds_unfinished_frame). Under wgpu, on a plane without IN_FENCE_FD, a frame that did not finish within RENDER_WAIT is not queued: its buffer stays the next buffer of the GbmBufferedSurface with its damage, and each later render of that head (the 16 ms timer) queues it once SyncPoint::is_reached says the fence signalled, with no new frame drawn into it meanwhile; its flip event draws the next frame. The implicit fence that the renderer imports into the buffer (DMA_BUF_IOCTL_IMPORT_SYNC_FILE) is best effort and missing when the fence does not export, so KMS alone could scan out a buffer the GPU still writes. Skipping the flip was chosen over a longer CPU wait, which would stop the event loop. A VT switch clears the held frame; the surface keeps the buffer and the next frame draws into it again, with more damage than needed, which is safe. A held frame confirms no lock frame; the next one does, as for any unfinished frame. A GPU that never signals keeps the head waiting, as KMS would. GLES and wgpu with IN_FENCE_FD flip as before. Not run on hardware.
  • Preparer fallback (scripts/prepare-project.py, openspec/specs/project-loading/spec.md, Build features and the fallback). A failed full build is built again as session,wgpu-effects with a warning: line; .project-build.json records cargoFeatures (the binary) and cargoFeaturesWanted, and the same sources are not built twice again. Tests in scripts/test/test_shared_build_cache.py.
  • A reduced capability map under wgpu (renderer_choice::WGPU_SKIPPED_CAPABILITIES, applied in desktop/snapshot.rs). Reported false: workspacePreviews and workspacePreviewUnchanged (previews are refused, so the core stops asking), workspaceWebPlanes (the host stops marking the content of a slide), panelBackdropBlur, barBackdropBlur and barMaterial (the host keeps the CSS filter of the bar and the panels, which it turned off when the compositor said it drew the blur), overviewPlanes (the host keeps the image path and hides the setting), chatBackdropBlur and chatBubbleGlass (no region reports), alphaGlass (no chat_alpha_glass lease and no 2 s grace), panelAlphaGlass (the top bar and the panels are declared without alpha glass), canvasWarp (no lease; the setting hides) and wallpaperSink (the core sends no sink heartbeat). Kept, because they gate more than drawing: workspaceTransitions (the workspace order, the motion preference and the validation of the step and swipe requests), chatDock and chatBox (the floating chat, also the dock glass rectangle, which costs one ignored command), visualStyle (the clear color follows it, and panel declarations are validated by it), canvasSharpZoom (the fractional scale offer still works; only the cache is skipped), thumbnailTransitions (drawn through the placements), the lock, outputs, declarations and the rest. check-host-skew.py only warns about a missing panelAlphaGlass when the host has the lighter veil. Checked in the core (smithay.js, server.js, window-declarations.js, workspace-previews.js) and the host (host.js, workspace-previews.js, recovery-client.js); no route of the lock, the approvals, the chat dock or the workspace outputs reads a capability of the list.
  • Workspace slides under wgpu. The plain scene draws no slide, but a selection or a swipe still started one, which held the pointer (blocks_pointer) for its duration with nothing on screen. WorkspaceTransitions::set_plain, set by Compositor::set_renderer at start, now makes a selection and a swipe commit with no visual, while the motion preference stays on for the camera and thumbnail flights. The depth pipeline is untouched: the plain scene never calls workspace_depth.begin, so finish_flight has nothing to end, and a test checks it stays empty. History: Phase 3 step 5 draws the slide under wgpu and removed set_plain; a selection and a swipe now hold the pointer while the slide shows, as under GLES.
  • Tests. the_shared_scene_helpers_give_the_pinned_canvas_order_clips_and_popups and ..._guest_and_extra_output_items pin the items of the shared helpers to literal values (a canvas with a hidden chat, two windows and a menu; a window held over the primary output from the extra one; the extra output in local coordinates). With primary_clip changed to cut the popups to the window, the pinned test failed and the older order test still passed, which is the gap the review named. The GLES scene's own loop still needs a GPU, so only the ignored native_wgpu_renderer_plain_scene_matches_gles covers it. Also the_wgpu_snapshot_reports_only_what_the_plain_scene_honors, under_wgpu_a_workspace_switch_draws_no_slide_and_holds_nothing and only_an_unfinished_wgpu_frame_without_in_fence_waits_back.
  • GPU suite, all 32 native_wgpu_renderer_ tests with --ignored --test-threads=1 under session,wgpu-renderer on the RX 550: 32 passed (277 s).
  • Nested QA (run 1240769b, headless, one output, synthetic profile, no provider). Start log: "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 6 render formats", linux-dmabuf on with 16 formats. state --full showed renderer: wgpu and the capabilities of the list false, the lock, the chat dock, the transitions and the workspace outputs true, and workspaceMotion.enabled true. GNOME Calculator (dma-buf) and a GSK_RENDERER=cairo copy (SHM) drew (clientBufferCommits dma-buf 1777, shm 19); Super+L reached sessionLock.state: locked, and the capture while locked was refused by design. The compositor log had no error. Capture, local only: ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-phase2/r2-01-two-calculators.png. Not run: the held frame (it needs a plane without IN_FENCE_FD and a slow GPU on DRM), the DRM path, a workspace slide in the nested run.

Phase 2 part A, bind through a copy (2026-11-09)

The fix for the render targets that round 1 found refused on the RX 550. Bind<Dmabuf> now imports the GBM scanout buffer with TRANSFER_SRC | TRANSFER_DST only, never COLOR_ATTACHMENT, so Vulkan's memory requirement is the size of the buffer (table of round 1). Frames draw into a wgpu texture of the same size and format, the shadow, kept with the cached import of that buffer (texture::Shadow). At the end of the frame's one encoder the whole shadow is copied into the imported image, before the release barrier of the one submission. The first frame of a new import copies the buffer into the shadow first, in the same encoder, so the shadow always holds the buffer's last content: a frame that redraws only the damage of a buffer age (DrmCompositor counts the age per buffer) loads the right pixels, also after a re-import. The shadow counts as filled only after a submission that ran. The image's last use in a frame is the copy, so its layout at the release is TRANSFER_DST_OPTIMAL (Access::Present).

The copy path is used everywhere, also on the explicit path (whose render candidates are now the modifiers with TRANSFER_SRC | TRANSFER_DST features) and at sizes where COLOR_ATTACHMENT would fit: one target path, and the self-test checks the one that runs. Nothing of it ran on the explicit path, which this GPU lacks.

Is the transfer-only write correct? Yes, at every size and format measured. The self-test compares the bytes read through GBM's map with the expected pattern, and a new test, native_wgpu_renderer_dma_bind_through_copy_matches_gles, compares with GLES drawing the same into a GBM SCANOUT|RENDERING buffer of the same size and format, read through GBM. Frame 1 blends a pattern with alpha over a clear; the damage frame then draws only a translucent and an opaque rectangle into the same buffer, after a frame into a second buffer of the same size (so each buffer keeps its own shadow). RX 550, RADV, Mesa 26.0.8:

Size 8-bit targets, frame 1 8-bit, damage frame 10-bit targets, frame 1 10-bit, damage frame
131x67 356 592 331 335
1031x617 26226 43522 24162 24691
1920x1080 84521 140529 81826 83469
3840x2160 342855 568108 315981 322904

The counts are differing bytes; the maximum error is 1/255 in every cell. 8-bit means Argb8888, Xrgb8888, Abgr8888 and Xbgr8888, which gave the same counts; 10-bit means Abgr2101010 and Xbgr2101010, also equal. The 1/255 steps are the GLES mediump rounding of the blended pattern, as in phase 1 (about 1.7% of the bytes at most); a layout disagreement would give large errors over whole tiles. The test bound is 2.6% of the bytes. Argb2101010 and Xrgb2101010 stay sample only.

Self-test. The render check now draws a whole frame and then a damage-only frame into the same buffer, through Bind<Dmabuf>, at the same sizes as before (every format at 131x67 and 1031x617, Argb8888 and Xrgb8888 also at 1920x1080 and 3840x2160). On the RX 550 every render format passes at every size, so dmabuf_render_formats() holds the six render formats with Modifier::Invalid. In release, with the device and GBM open, it takes 0.95 to 1.15 s (three runs: 1.14, 1.04 and 0.95 s), up from 0.7 s, because the render checks at the output sizes no longer stop at the import. The sizes were kept.

Cost. Damage-only frames waited one by one, in the debug test build: 2.1 ms into a 1080p scanout buffer against 1.2 ms into a renderer texture, 3.5 ms against 1.9 ms at 4K. The difference, about 0.9 ms at 1080p and 1.6 ms at 4K, is the copy plus the dma-buf acquire, release and sync-file work; it is wall time, not GPU timestamps. Each target also holds a second texture of its size (33 MB at 4K, per buffer of the swapchain).

API. No public name changed. Bind<Dmabuf> binds the formats that the self-test passed, which on this machine are now six. WgpuTarget::texture() of a dma-buf target is still the imported buffer, which no longer has RENDER_ATTACHMENT, so Bind<WgpuTexture> refuses it with NotRenderable; copy_framebuffer reads the buffer.

The other tests now run here. With render formats, the bind tests of part A no longer skip and pass: native_wgpu_renderer_dma_bind_matches_gles and native_wgpu_renderer_dma_bind_later_frames_match_gles within their part A bounds, and the bind halves of the SYNC_FD and failed-submission tests. The bind rows of native_wgpu_renderer_dma_large_buffers_match_gles ran for the first time and gave 1/255 in 84901, 150306 and 338139 bytes at 1080p, 1440p and 4K (Argb8888 and Xrgb8888 alike), the same blend rounding; their bound of 0, measured on the client rows, became the 2.6% above.

For part B. The DRM start of --session --renderer wgpu no longer meets the refusal "the dma-buf self-test passed no render format" on this machine, and the nested start should now log 6 render formats. Neither was run for this change.

Not covered. DrmCompositor, KMS and a physical output were not run; the explicit path did not run; GPU time was not measured with timestamps; only whole-texture copies are made, not the damaged region.

The seed copy, proven (follow-up). The test native_wgpu_renderer_dma_bind_seeds_the_shadow_from_the_buffer fills a GBM SCANOUT|RENDERING buffer through GLES, and in a second case through a first WgpuRenderer that is dropped before, then lets a renderer that never imported the buffer draw only the two rectangles of the damage frame into it. At 131x67 and 1920x1080, for the six render formats, 0 pixels changed outside the damage, and the whole buffer matched GLES drawing the same damage over its own fill within 1/255. With the seed copy disabled the test fails at its first case (7415 of the 8777 pixels of 131x67 changed outside the damage); the self-test does not catch that, because its damage frame follows a whole frame of the same renderer. The invariant, written at texture::Shadow: while an import is cached, this renderer is the only writer of the bound buffer, and a write by anyone else is overwritten by the next copy-back. The render check of the self-test now also compares alpha for Argb8888, Abgr8888 and Abgr2101010 (the frame is opaque, so it must read 255), which costs nothing measurable: 1.04, 1.03 and 1.12 s in release, in the range of before. Accepted for phase 2: one shadow per cached target, about 33 MB per 4K XRGB buffer and about 100 MB for a triple-buffered 4K output, and a copy of the whole texture on every frame. A copy of only the damaged region is a phase 4 performance item.

Physical login (2026-11-09)

History: the owner removed the entry on 2026-11-09, after phase 3 ("I want to remove it"). scripts/register-smithay-session.sh now deletes agent-native-smithay-wgpu.desktop and agent-native-smithay-wgpu-gdm when it finds them; the compositor still honors AGENT_NATIVE_RENDERER with --session. The rest of this section is the record of the entry.

The owner asked to try one physical login under the wgpu renderer ("Yes, set it up"). A GDM entry, Galaxy Shell (wgpu) (packaging/agent-native-smithay-wgpu.desktop), runs scripts/agent-native-smithay-wgpu-gdm, which exports AGENT_NATIVE_RENDERER=wgpu and then starts the normal login (agent-native-smithay-gdm), the same way the safe mode entry sets its flag. The variable reaches the compositor through project-session.py and smithay-session.py, which copy the environment, so the dispatch copies need no update. The compositor reads it only with --session and never over --renderer; a value the build cannot run (a binary from the preparer's fallback without wgpu-renderer) keeps GLES with a warning, so the entry always logs in. The normal Galaxy Shell entry is unchanged and stays GLES. The known-good fallback release is older and ignores the variable, so recovery after a failed start is a GLES session.

Installing the entry needs the administrator once, from the active checkout: sudo /home/naaando/projetos/galaxy-shell/scripts/register-smithay-session.sh (it also installs the safe mode entry). What to check in that login: windows of SHM and dma-buf clients, resize, the cursor, a screenshot, lock and unlock with the password, a VT switch and back, and the compositor log line "wgpu Vulkan renderer, ... self-test passed, ... 6 render formats". To leave, log out and pick the normal entry.

Result of the first physical login (2026-11-09, 16:00). The owner logged in through "Galaxy Shell (wgpu)" on the RX 550 at 1920x1080 (/dev/dri/card1). The compositor log says "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 6 render formats"; it shows no error beyond Smithay's usual DRM warnings at start. The owner's verdict: "it lost the border on the window but everything else looks good". The missing border is the window finish and outline, skipped by the plain scene of phase 2 and the first port of phase 3. Phase 2 is accepted; the default renderer stays GLES until phase 4.

Phase 3 step 1: window finish and outline (2026-11-09)

Asked by the owner after the physical login ("it lost the border on the window but everything else looks good", then "Yes, start phase 3"). Under --renderer wgpu the plain scene now draws the window finish (rounded corners, rim, glow, contour, the opening reveal and the area average of a far window) and the Grid drag outline, at the same places and from the same inputs as the GLES scene. The GLES path is unchanged: its uniforms, order and programs are the same, moved behind a helper (scene_passes::gles_finish).

The extension point (native/wgpu-renderer/src/program.rs, README, Custom programs). A custom element draws with its own WGSL fragment shader and its own uniform block, inside the frame's one encoder, one render pass and one submission:

  • WgpuRenderer::compile_program(ProgramSource { label, wgsl, uniform_size, textured }) compiles WGSL after PROGRAM_PRELUDE (the renderer's vertex stage, the texture at @group(0), smithay_texel) with its uniform block at @group(1) @binding(0), inside error scopes. A bad source, a shader that does not validate or a bad size is an Err; pipelines are built per target format and blending and cached only when valid.
  • WgpuFrame::override_texture_program(&program, &bytes) and clear_texture_program_override() are the counterpart of GlesFrame::override_default_tex_program: every texture draw between them uses the program.
  • WgpuFrame::draw_program(&program, src, dst, size, damage, alpha, &bytes) is the counterpart of render_pixel_shader_to: a procedural quad, uv over src, always blended.
  • WgpuFrame::pixel_mapping() maps @builtin(position) to frame pixels, as the GLES finish maps gl_FragCoord through u_map_x and u_map_y.
  • WgpuRenderer::user_data() and WgpuFrame::user_data() keep the compiled programs, as the EGL context's user data does for GLES.

The uniform blocks of one frame go into one uniform buffer at the device's offset alignment, bound with a dynamic offset. A program of another renderer, a block of the wrong size or a texture program used as a procedural one is an error. The glass, the warp, the black hole, the workspace cards and F9 can use the same entry points.

The port. The shading moved into shared WGSL of the bridge (finish-core.wgsl, outline-core.wgsl); the bridge's own passes and the renderer programs (native/smithay/src/window_finish.wgsl, outline.wgsl) both call it. scene_passes.rs holds the uniforms and two traits, ScenePasses (begin and end of the finish around the inner draw) and OutlinePass, implemented for GlesRenderer and WgpuRenderer. Finished<E, P> gains a program type: GlesTexProgram in the GLES scene, () in the plain scene, which takes the program from the frame. RoundedOutline is the outline element of the plain scene; the solid pieces of the outline stay its fallback, as in GLES. No capability gated the finish or the outline, so WGPU_SKIPPED_CAPABILITIES keeps its thirteen entries.

Parity (wgpu_renderer_finish_tests.rs, ignored GPU tests, RX 550, Vulkan against GLES on the same render node, 320x240, eight output transforms each). Four windows: translucent ARGB content at scale 1, an XRGB window with element alpha 0.8, a far window at scale 0.27 (four averaging taps, a small radius) and an ABGR window at scale 1.5; frame 2 redraws only a damaged part of two windows.

Case What it covers Max error Bytes that differ
Settled default style, radius 12, three frames with partial damage 0/255 0 in all 8 transforms
Styled visual style (radius 16, accent rim) and the rounded Grid outline 0/255 0 in all 8 transforms
Reveal opening reveal at 175, 350 and 525 ms, then 100 ms later 0/255 0 in all 8 transforms

The bound of each case is 0 pixels off by more than 1/255. A further test checks that the comparison is about a real finish: the corner is cut to the clear color, the interior keeps the client pixel and the rim changes the top edge, in both renderers. The plain scene test and the headless backend test now end the opening reveal of their windows, which the plain scene draws too. Focused and unfocused windows draw the same finish in GLES (the finish has no focus input), so there is no focus case to compare.

What stays skipped: chat glass, mask glass and the bar and panel glass; the canvas lens; the black hole (drawn since phase 3 step 4); workspace cards, their shadow and the web planes of workspace transitions; overview planes; the downscale cache of sharp zoom; workspace previews; F9 theme effects. Window captures (render_window) still have no finish in either renderer.

Nested QA (headless, one output, synthetic profile, no provider, Canvas). Run d83d1618 with --renderer wgpu (start log: "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 6 render formats") and run 5f296232 with --renderer gles, the same steps: two GNOME Calculator windows, a capture with the right one focused, a click on the left one, a capture with it focused. Both renderers drew the rounded corners, the light rim at the top and the darker contour at the bottom. Between the two captures with the left window focused, the interior of the right window differs in 0 of 557,520 pixels and the left window's interior by at most 1/255; the top rim row differs by at most 3/255 in 84 of 1,840 pixels, where its antialiased edge blends over the animated wallpaper, which moved between the runs. The compositor log of the wgpu run had no error. Captures, local only, in ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-phase3/: 01-wgpu-focused-right.png, 02-wgpu-focused-left.png, 03-gles-focused-right.png, 04-gles-focused-left.png, 05-corner-zoom-gles-left-wgpu-right.png. Not run: the Grid drag outline in nested QA (covered by the parity test only) and the physical login with this change.

Phase 3 step 2: glass (2026-11-09)

Asked by the owner ("Yes, port glass"). Under --renderer wgpu the plain scene now draws every glass of the GLES scene: the backdrop blur of the bar and of the declared panels with their material (the liquid glass of a protected panel with the bar material, and the CSS bridge values --compositor-blur, --compositor-refraction and --compositor-rim-intensity), the chat glass regions and bubbles, the dock glass, and the glass from the alpha of the chat windows, the top bar and the protected popups, on the primary output and on extra outputs. It takes the same requests as the GLES scene (crate::scene::glass_request, chat_glass_request, chat_region_requests, output_chat_glass_request, output_chat_region_requests), so the leases (chat_alpha_glass), the reported regions, chatBlur, the bar material and visual_style reach it unchanged. The GLES path is unchanged: its code only became visible to the new module, and retain_masks takes its window list from a shared mask_windows.

The backdrop facility (native/smithay/src/plain_glass.rs). It does not read the framebuffer. Like the GLES scene, a glass renders the elements behind it (the elements below its window, relocated to its crop) into its own offscreen texture through its own OutputDamageTracker, then runs its passes and draws the result as an element of the output frame. A copy of the framebuffer would read stale pixels outside the damage, among them the glass and the panel above it from the previous frame, and it would not match GLES. The API mirrors the GLES pipelines:

  • plain_glass::GlassPipeline::render(renderer, id, output, bounds, material, behind) and MaskPipeline::render(renderer, window, output, bounds, surfaces, behind, close), each returning Option<GlassElement>, with retain. The same validation, regions, budgets (MAX_PIXELS, MAX_PANELS, MAX_CHAT_PIXELS), blur divisor, mask tuning and uniforms as crate::glass and crate::glass_mask.
  • GlassPasses (render_glass, draw_glass), the bound of the plain scene's elements, implemented for WgpuRenderer and, drawing no glass, for GlesRenderer, which draws the plain scene only as the reference of the GPU tests.
  • GlassElement keeps its identity and commit while the backdrop and the material stay, so static glass damages nothing. Its draw sets override_texture_program_with around the texture of its last pass.
  • Each offscreen pass is one renderer frame and one submission on the same queue before the output's frame, which keeps one encoder and one submission. A pass that fails is an error of that glass: it warns once and the frame draws without it. The programs compile once per renderer into its user data; a failed one leaves that glass off.
  • Order, as GLES: a request sits right after the elements of its window; the requests run bottom first and their glass is inserted at that place, so a lower glass is part of the backdrop of an upper one. A rounded glass is cut to its clip; an alpha glass is not.
  • The renderer crate gained two program options (README, Custom programs): second_texture (the mask of the final pass at @group(2), LINEAR and CLAMP_TO_EDGE, as unit 1 of the GLES program) and repeat (REPEAT sampling, the wrap that GLES leaves on its offscreen textures, which the unclamped morphology of the mask reads).
  • The shading moved into shared WGSL of the bridge: glass-core.wgsl, mask-core.wgsl and mask-glass-core.wgsl. The bridge's passes (glass.wgsl, mask.wgsl, mask-glass.wgsl) and the renderer programs (native/smithay/src/glass.wgsl, glass_mask.wgsl, glass_mask_final.wgsl) define only their bindings and samplers around it. The bridge output is unchanged: the 27 bridge GPU tests (native_wgpu_, session,wgpu-effects) print 962 measurement lines, identical at b6dba506 and on this branch except one F9 line (max error 1 against 0) of a test that uses none of these shaders, where the GLES reference itself varies.
  • The scene reports what drew, as GLES: chat_glass_drawn, chat_alpha_glass_drawn and the entries of outputChatGlass per extra output. An unplugged extra output loses its entry in remove_extra_output, as under GLES.
  • A locked frame of any output drops every glass and mask target, since their textures hold blurred desktop and chat pixels; the first frame after the unlock renders them again (GLES keeps its GL targets and retires only its wgpu side).
  • A change of close alone runs the mask again, as a change of the mask parameters does in crate::glass_mask with wgpu-effects (close is part of the change key).
  • A failed draw of a GlassElement (its bind group or uniforms) fails the frame, as a draw error of the GLES glass element does; skipping it would report glass that did not draw.

Capabilities. WGPU_SKIPPED_CAPABILITIES drops panelBackdropBlur, barBackdropBlur, barMaterial, chatBackdropBlur, chatBubbleGlass, alphaGlass and panelAlphaGlass, so the core sends the alpha glass lease and the regions again and declares the top bar and the protected panels with alpha glass. Six stay: workspacePreviews, workspacePreviewUnchanged, workspaceWebPlanes, overviewPlanes, canvasWarp, wallpaperSink.

Parity (wgpu_renderer_glass_tests.rs, ignored GPU tests, RX 550, Vulkan against the GLES pipelines on the same render node). The backdrop is a busy opaque pattern that changes on every pixel; the output is 320x240. Each case draws three frames: the first, one after a 40x28 part of the backdrop changed (partial damage, which redraws the glass over it, measured here) and one with nothing changed, which must not damage the output in either renderer (asserted in every case). Each case also checks that both renderers drew the same glass or none, and that the reference shows the glass.

Case What it covers Max error Bytes that differ
Panel blur 0, 0.5, 12, 24, 47.9, 72 blur 0 draws no glass in either; 72 is the max 0 to 1/255 0 to 920
Panel radius 0, 0.5, 12, 64 rounded corners 1/255 1,045 to 1,128
Panel saturate 0, 1.45, 2 the saturation of the final pass 0 to 1/255 0 to 2
Liquid, blur 12 and 72, refraction and rim (0, 0), (1, 1), (0.5, 0.3) the lens and the lit rim 1/255 1 to 4,909
Shapes: past the bottom right, thin pill, one pixel, small, cut by its clip regions cut by the output and by the clip 0 to 1/255 0 to 1,040
Shape past the top left (liquid, refraction and rim 0.5) a glass cut by the output corner 2/255 256 (7 pixels over 1/255)
Stacked: bar pill, panel, three overlapping chat regions lower glass in the backdrop of upper glass 1/255 237
Mixed (bar pill, chat region, chat alpha glass, popup alpha glass) under all 8 output transforms an output transform 1/255 4,444 to 4,967
Extra output: the mixed case on 320x240 and on a 400x300 output with _90, twice, one set of pipelines an extra output 1/255 4,753 and 4,967
Alpha glass, aligned masks: 220x160 and past the edge, closed and not the alpha glass 0 to 1/255 0 to 2,999
Alpha glass, 9x5 a tiny window 1/255 4 to 17
Alpha glass, unaligned or odd-sized masks (220x160, 257x193, past the edge) see below 1 to 104/255 936 to 5,326 (0 to 255 pixels over 1/255)

Two of these exceed 1/255, with evidence:

  • Past the top left, 2/255 in 7 pixels of one column. The bridge test of the same geometry and material (native_wgpu_glass_matches_gles_and_preserves_damage, bounds (-10, -8) 129x73, blur 24, refraction and rim 0.5) has the same max error of 2 between the shared WGSL and glass.frag, so it is the shading shared with the bridge, not this port (history: that bridge test went in step 2 and glass.frag in step 7 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md; no GLES reference of the glass is left).
  • Unaligned alpha masks. native_wgpu_renderer_alpha_glass_stages_match_gles reads each stage. The backdrop source is exact in every case. With an aligned surface (every edge on an even pixel) the raw mask (the surface at half scale through each renderer's texture program) and the soft mask are exact, and the final glass is within 1/255. With edges on odd pixels the 2x2 averages of the half-scale mask fall on exact halves, which the two renderers round apart: the raw mask differs by 1/255 in 340 bytes. The threshold pass is a smoothstep only 0.07 wide (low 0.18 to 0.25), which multiplies a 1/255 step by up to 21, so the soft mask differs by up to 12/255 (6/255 for the odd 257x193 window). The final pass normalizes the slope of the soft mask to turn its lens and light its rim; where the soft mask is nearly flat a small change turns that direction, which gives the 104/255 of the odd window without closing, in 179 of 49,601 pixels. The surface of the test sits on that ramp on purpose (alpha 45 beside 61 to 64, the values of the GLES mask tests). The bound of these cases is 1% of the glass in pixels over 1/255; the other cases are bounded by a max error of 2.

The count of bytes that differ by 1/255 is not stable between runs, because the GLES reference is not: over three runs of the liquid and stacked cases the wgpu images were identical, and one GLES image differed by 1/255 in 4,151 bytes between two runs.

A scene test, native_wgpu_renderer_chat_glass_scene_matches_gles, draws the whole GLES scene (crate::scene::elements) and the whole plain scene with an expanded chat over 4 px stripes of the wallpaper: with no report no glass (0/255), with one reported region the region blurs and chatGlassDrawn is 1 in both (1/255), and with the chat_alpha_glass lease the card of the chat buffer blurs and chatAlphaGlass is true in both (1/255). native_wgpu_renderer_glass_program_options_refuse_misuse checks the refusals of the two program options. The full GPU suite of the renderer is in the work log entry of this step.

What stays skipped: the canvas lens (drawn since phase 3 step 3); the black hole (drawn since phase 3 step 4); workspace cards, their shadow and the web planes of workspace transitions; overview planes; the downscale cache of sharp zoom; workspace previews; F9 theme effects.

Nested QA (headless, one output, synthetic profile with one conversation of two synthetic messages, no provider, Canvas, two GNOME Calculator windows). The same steps under both renderers and both window themes: a capture of the desktop, a click in the composer and one typed key to expand the chat (its reply bubble then lies over the = key of a calculator), and a popup over a calculator (the desktop actions panel under glass, the Start menu under office, whose taskbar also has glass). Runs c33d492c (--renderer wgpu, glass), 4d49b5ee (gles, glass), 89ae02e3 (wgpu, office) and 1721a365 (gles, office). The wgpu runs started with "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 6 render formats" and reported alphaGlass, panelAlphaGlass, barBackdropBlur, barMaterial, chatBackdropBlur, chatBubbleGlass and panelBackdropBlur true and chatAlphaGlass true while the chat showed. Both renderers drew the glass of the top bar pill, the bottom bar, the composer box, the chat bubbles, the desktop actions popup, the Office taskbar and the Start menu, with the calculator blurred through them. Over the static calculator key, the reply bubble differs between the two runs by at most 4/255 (mean 0.48) and the Start menu by at most 1/255 (mean 0.04); the bar strip differs by at most 18/255 (mean 0.44), where the animated wallpaper moved between runs. The compositor logs of the wgpu runs had no warning; the GLES glass run logged once "Panel backdrop unavailable; keeping readable web material, Panel outside output", which was not analyzed. Captures, local only and with the account name of the Start menu blurred, in ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-phase3-glass/: 01 to 03 (wgpu, glass), 04 to 06 (GLES, glass), 07 and 08 (wgpu, office), 09 and 10 (GLES, office) and 11-zoom-side-by-side-gles-left-wgpu-right.png. Not run: a nested run with two outputs (the extra output is covered by the parity test only), a change of the CSS bridge values in a run, the cost of the passes on the GPU, and the physical login with this change.

Phase 3 step 3: canvas lens (2026-11-09)

Asked by the owner ("Yes, port the lens"). Under --renderer wgpu the plain scene now draws the canvas lens of the GLES scene (canvas_warp, the cylinder of the protected setting canvasWarp): the same lease, mode and angle (Compositor::warp_frame), the same windows (Compositor::warped_presentations, the runs of canvas items that the lens of the last drawn frame shows), the same groups (at most MAX_GROUPS, a group closes at an item that is not warped and before a guest insertion) and the same flat box (Lens::flat_box). The GLES path is unchanged.

The pass (native/smithay/src/plain_warp.rs). Each group renders its windows flat, with their finish and outline moved by the offset of the flat box (window_finish::relocated_pass, as GLES moves them with shift_finish), into its own Abgr8888 texture of the flat box through its own damage tracker (age 1, transparent clear). The group then draws as one element at the origin of the output view, the size of the view, with the program canvas_warp.wgsl, which maps each output pixel through the cylinder into the flat texture, as canvas_warp.frag did (deleted on 2026-11-11 with the GLES lens, step 7 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md). A group element keeps its identity and commit while its windows damage nothing and the lens is the same, so a still frame damages nothing. Each group pass is a renderer frame and a submission before the output frame on the same queue, as the glass passes, so the output frame keeps one encoder and one submission. The program compiles once per renderer into its user data, only when a frame would draw the lens, as GLES compiles its program.

  • The cylinder math is shared with the bridge: native/wgpu-bridge/src/warp-core.wgsl (warp_flat_uv, warp_outside), included by the bridge's warp.wgsl and by the renderer program. The bridge output is unchanged: the frames of native_wgpu_warp_matches_gles_and_preserves_damage (session,wgpu-effects) hash the same before and after the move.
  • The program samples with repeat (README of the renderer crate, Custom programs), the wrap that GLES leaves on its offscreen textures. At angles whose samples fall within half a texel of the flat box edge, clamping differs from GLES: with repeat: false angle 70 differs by 30/255 in 6,010 bytes in the edge test below; with repeat: true every case is within 1/255. The bridge pass still clamps (ClampToEdge), which was not changed here.
  • Warped windows get no glass of their own, as in GLES. Chat glass and the panels above the canvas see the warped group in their backdrop, since the group is an element below them.

Input and visibility contract. The pointer, the focus and the visibility of canvas windows read the lens of the last drawn frame (canvasWarp.drawn, CanvasWarp::warped), so what the plain scene reports must be what it drew:

  • wgpu_scene::primary_items reports the planned lens and the ids of the warped windows (set_warp_drawn(lens, ids)); a locked frame reports None, as GLES.
  • If the program does not compile, canvasWarp.error is set (CanvasWarp::unavailable) and the frames draw and report flat until the setting goes off, as a GLES compile failure.
  • If a group fails to draw, the warp goes off (CanvasWarp::fail, the error held until the setting goes off) and the whole frame is rebuilt flat and reported flat (set_warp_drawn(None)). This is stricter than GLES, which keeps the groups already drawn warped for that one frame: the plain scene never shows warped pixels over flat input, or the reverse.
  • A failed draw of a group element (its bind group or uniforms) fails the frame, as a draw error of a glass element does.
  • Frames of an extra output no longer touch the warp state (it lives on the primary output).
  • canvas_warp_off, set_warp_drawn(None) and a failure drop the group textures.

The test native_wgpu_renderer_canvas_lens_reports_what_it_drew covers it: a warped frame reports the lens and both windows; a forced group failure draws exactly the flat frame (byte for byte), reports drawn false, the error set, no warped id and no lens, and drops the targets; the error holds until the setting goes off and on; a broken program reports flat with the error; and the lock reports flat. Two non-GPU tests check that the plain scene groups the warped runs and reports the planned lens, and that a press after a plain frame with the lens focuses the window drawn under the pointer.

Capabilities. WGPU_SKIPPED_CAPABILITIES drops canvasWarp, so the core sends the lens lease and the protected settings show the lens under wgpu. Five stay: workspacePreviews, workspacePreviewUnchanged, workspaceWebPlanes, overviewPlanes, wallpaperSink.

Parity (wgpu_renderer_warp_tests.rs, ignored GPU tests, RX 550, RADV, Mesa 26.0.8, GLES scene against the plain scene on the same render node, 800x600 output). The scene has two painted canvas windows with their finish, a translucent chat and the wallpaper. Each case first draws a settle frame (visibility reads the lens of the last frame, so the first frame after a lens change can choose other runs), then compares one frame and asserts that both renderers report the same canvasWarp state and the same warped ids.

Case Max error Bytes that differ
Lens off 0 0
Angle 20 1/255 176
Angle 45 1/255 234
Angle 90 (one window warped; the other lies past the visible flat region) 1/255 183
Camera pan 1/255 341
Zoom 0.6 and 1.7 1/255 144 and 228
Angle 60 under all 8 output transforms 1/255 322 to 324
Partial damage (Normal and _90), then a still frame with no damage in either 1/255 323
Chat glass over the lens (chatGlassDrawn 1 in both) 1/255 724
With an extra output: the primary, the extra output frame 1/255, 0 324, 0
A 1000x760 window past every edge of the flat box, angles 20, 60, 70, 86, 90 1/255 1,605 to 2,423

No case exceeds 1/255. Angles 70 and 86 were added because they sample within half a texel of the flat box edge (0.373 and 0.346 texels), where the wrap mode shows.

What stays skipped: the black hole (drawn since phase 3 step 4); workspace cards, their shadow and the web planes of workspace transitions; overview planes; the downscale cache of sharp zoom; workspace previews; F9 theme effects. The sphere mode is refused by the core in both renderers (phase 4 of inverted-sphere-view.md).

Nested QA (headless, one output, synthetic profile, no provider, Canvas, two GNOME Calculator windows fitted by a Super tap, zoom 0.843, flat rectangles x 130 to 939 and 980 to 1789). Run 2d252d75 with --renderer wgpu --setting canvasWarp=cylinder:45 (start log: "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 6 render formats") and run 5e32336e with --renderer gles, the same steps. Both reported canvasWarp drawn at 45, with no error. A click at (1810, 400), right of the flat rectangle of the right window but on it through the lens, focused the right window in both; a click at (110, 400), left of the flat rectangle of the left window, focused the left one in both; the camera did not move. Then, in the protected settings (Janelas, "Ângulo de visão da lente", shown under wgpu now), 90° was chosen: both reported angle 90 drawn; a click at (40, 400) focused the left window and a click at (1880, 300) the right one in both runs (at 45 the same (40, 400) hits no window in GLES). The compositor logs of both runs had no warning. The frames differ everywhere because the crystal wallpaper animates; the window geometry and its curve match in the zoomed side-by-side images. Captures, local only, in ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-phase3-lens/: wgpu45*.png, wgpu90*.png, wgpu-settings2.png and wgpu-settings3.png (the angle select), gles45*.png, gles90*.png, lens45-zoom-gles-left-wgpu-right.png and lens90-zoom-gles-left-wgpu-right.png. No account name is shown in them. Not run: a scroll over a warped window, a nested run with two outputs (the extra output is covered by the parity test only), the cost of the passes on the GPU, and the physical login with this change.

Phase 3 step 4: black hole (2026-11-09)

Under --renderer wgpu the plain scene now draws the black hole close of the GLES scene (black-hole-close.md): an ordinary application window that closes while the black-hole wallpaper reports its sink flies for 400 ms from its place into the sink, bent by the same shader. The GLES path is unchanged.

Design. native/smithay/src/black_hole.rs now holds the decisions that both renderers share, so the plain scene cannot drift from GLES on what flies and when:

  • sink reads the slot, the lock, the overview, the motion preference, the transition and the lens, and the typed, expiring sink of the core (wallpaper_sink), and says whether to clear the snapshots and retire the flights;
  • track keeps the bounded snapshots of the ordinary application windows that the output shows (snapshot_size: at most 1024x768, at most 8 windows across outputs, refreshed at most at 10 Hz), starts a flight when one of them is gone and lists the snapshots due;
  • flights gives the progress and the place of each flight at this instant.

DownscaleCache of sharp_zoom.rs is generic over the texture type, so the plain scene keeps its own list of views (BlackHole::plain) with WgpuTexture snapshots. The GLES elements now calls the same helpers in the same order; its output is unchanged (the existing GLES black hole tests pass, and the bridge frames hash the same).

native/smithay/src/plain_black_hole.rs renders each due snapshot from wgpu_scene::window_elements (the window with its finish, the reveal ended) into its cache texture, then draws each flight as a ClosingElement: the snapshot texture at the place of the flight with the program black_hole.wgsl overriding the texture program (override_texture_program), and the progress in a 16-byte uniform block. As the TextureShaderElement of GLES, every frame has a new element id, so a flight damages its old and its new place. The element is cut to the output (CropRenderElement). The program compiles once per renderer into its user data, with repeat (the GLES wrap). The bend is shared with the bridge: native/wgpu-bridge/src/black-hole-core.wgsl (black_hole_uv, black_hole_outside, black_hole_fade), included by the bridge's black-hole.wgsl and by the renderer program.

Place in the stack. wgpu_scene has a new Item::Closing: on the primary output right above the topmost application window and below the chat and the panels (after the guest insertion when there is one, else at the end of the windows), on an extra output before its first undeclared window, as the GLES scene inserts them. A non-GPU test checks the order and the presentations against the GLES scene, and that a locked frame has none.

Contract and how it is tested.

  • The snapshot is bounded: snapshot_size and the limits of track, shared with GLES.
  • Only ordinary application windows fly (the filter of track, shared); the shell, panels and declared windows never do.
  • Reduced motion disables it: sink clears and retires (native_wgpu_renderer_black_hole_reduced_motion_draws_none: a close with the motion off draws exactly the frame without the window, 0 bytes differ, and keeps no snapshot).
  • The sink center comes only from the protected wallpaper renderer through the core's typed, expiring wallpaper_sink; the plain scene reads the same Compositor state through sink. No new route, command or capability field.
  • Nothing changes for input: a closing window is already gone from the space, and the element takes no input.
  • Failure: if the program does not compile, the snapshots are cleared and no flight draws (warned once); if a snapshot render fails, that cache is freed and the window closes with nothing drawn (its flight has no snapshot); a later close flies again. native_wgpu_renderer_black_hole_failures_close_without_a_flight covers both, with the snapshot counts, and checks that each failed close draws exactly the frame without the window. A draw error of a ClosingElement fails the frame, as a draw error of the GLES TextureShaderElement does. The black hole has no drawn state that the host or the input reads, so there is nothing else to report.

Capabilities. WGPU_SKIPPED_CAPABILITIES drops wallpaperSink, so the core sends the sink heartbeat under wgpu. Four stay: workspacePreviews, workspacePreviewUnchanged, workspaceWebPlanes, overviewPlanes.

Parity (wgpu_renderer_black_hole_tests.rs, ignored GPU tests, RX 550, RADV, Mesa 26.0.8, GLES scene against the plain scene on the same render node). A Canvas workspace with a 160x100 painted window that stays and one that closes; a test clock holds both scenes at the same progress. Each frame is also drawn whole and compared with the damaged frame in each renderer.

Case Progress (ms) Max error Bytes that differ
Sink inside the window 0, 40, 100, 200, 300, 360, 396 0, 1, 1, 1, 1, 0, 0 /255 0, 98, 69, 17, 2, 0, 0
Sink outside the window 0, 40, 100, 200, 300, 360, 396 0, 1, 1, 1, 1, 0, 0 /255 0, 105, 78, 9, 3, 0, 0
Window partly off screen 0, 40, 100, 200, 300, 360, 396 0, 1, 1, 1, 1, 0, 0 /255 0, 82, 48, 9, 2, 0, 0
All 8 output transforms 0, 100, 300 0, 1, 1 /255 0, 51 to 74, 2 to 3
Extra output 0, 100, 200, 300, 396 0, 1, 1, 1, 0 /255 0, 57, 7, 1, 0
Reduced motion 0 0 0

Damaged against whole frames: 0 in every frame but three, which differ by 1/255 in 10 to 21 bytes under wgpu and 1 to 12 bytes under GLES (the same rounding of the bent edge in both); the tests bound both at 1/255. No case exceeds 1/255.

What stays skipped: workspace cards, their shadow and the web planes of workspace transitions; overview planes; the downscale cache of sharp zoom; workspace previews; F9 theme effects.

Nested QA (headless, one output, synthetic profile, no provider). In each run: the first-run card dismissed, "Buraco negro" chosen in the protected settings (Aparência, Papel de parede), a GNOME Calculator window opened and focused, then closed with Super+Q while a burst of captures ran. Run dfd2cea9 with --renderer wgpu (start log: "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 6 render formats"; wallpaperSink true), run 39157418 with --renderer gles --effects-backend gles (the GLES shader) and run f215fecf with --renderer gles and the default effects backend (the bridge pass). The wgpu run drew the calculator twisting and shrinking into the sink and gone by 0.5 s; the GLES shader run drew the same shapes at the same capture offsets (the first two frames of the zoomed side-by-side match; the third differs by timing). A capture takes about 350 ms and the offsets are not tied to the progress, so the mid-effect frames show only that the effect plays and looks the same; the parity tests are the evidence of equality. The bridge run of the default GLES login drew visibly different shapes at its offsets, with straight right and bottom edges; this step did not change that pass (its frames hash the same). The cause, fixed after the phase 3 review in commit 95d229c6, was the flight element of wgpu_effects::Bridge: with no src, smithay sampled only the top-left corner of the pass output at the size of the flight, instead of scaling the whole output (docs/work-log-2026-11.md). Captures, local only, in ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-phase3-black-hole/: w*.png (wgpu), f*.png (GLES shader), g*.png (GLES with the bridge), side-by-side-gles-left-wgpu-right.png and bridge-gles-left-wgpu-right.png. No account name is shown in them. Not run: a nested run with two outputs (the extra output is covered by the parity test only), the GPU cost of the snapshots, and the physical login with this change.

Phase 3 step 5: workspace effects (2026-11-09)

Under --renderer wgpu the plain scene now draws the workspace effects of the GLES scene: the slide of a workspace selection or a three-finger swipe with the web planes that hold the chat pixels of each workspace, the overview planes behind the shell window, and the workspace previews that the host reads as PPM files. WGPU_SKIPPED_CAPABILITIES is now empty. The GLES path is unchanged.

Design. The decisions stay in scene.rs and both scenes call them, so the plain scene cannot drift from GLES on what a slide, a plane or a preview shows:

  • web_cache_plan says which web planes a frame keeps and which workspace it composes (the shown one, unless a slide drags away from it, whose pixels stay frozen; none in the window overview or a thumbnail flight, or with the motion preference off);
  • live_web_parts gives the chat and the web panels of the shown workspace moved by an offset;
  • slide_viewports gives the offset and the clip of each plane at a progress;
  • workspace_plane_parts gives the windows of a workspace in its part of the slide;
  • workspace_parts gives the scene of a preview or an overview plane (the application windows and the wallpaper, scaled into 384x216).

Each returns windows, placements and clips (scene::WindowPart); the GLES functions now draw these with their elements and the plain scene with its own (wgpu_scene::window_elements and the glass of plain_glass). The stores are generic over the texture through workspace_web::PlaneRenderer (plane_texture, bind_plane and the store of each renderer): WebPlanes<T> keeps a GlesTexture store for GLES (Compositor::workspace_web) and a WgpuTexture store for the plain scene (Compositor::plain_workspace_web), and OverviewPlanes keeps one texture map per renderer (textures, plain) with one shared status (the cards, the clip, the schedule of due and the failure). The preview runs the generic render_pending_with of workspace_preview.rs over capture::CaptureRenderer, the trait of the window capture, so the same request, signature, skip, size, wait and file serve both renderers.

native/smithay/src/plain_workspace.rs holds the plain parts: cache_web composes the web plane by the plan (one renderer frame and submission before the output frame, as the glass passes), transition_elements draws the slide as the GLES transition_elements (the cursor, the bars fixed with their glass, then for each workspace its web plane, else its live web windows when the chat paints that workspace, above its windows, and the bar glass over both planes), and workspace_elements builds the scene of a preview or a plane. wgpu_scene::elements composes the web plane every unlocked frame and, while a slide shows, returns the slide and reports no lens, no closing flight and no chat glass, as the GLES scene. Item::OverviewPlanes puts the planes right after the chat window and its glass, behind it, as the GLES stack; a new PlainElement::Plane draws a plane texture cut to its card. wgpu_output::offscreen_work (the headless backend and the DRM path) processes the preview while the desktop is not hidden, the window capture and the overview planes before the output frame; only F9 theme operations are still refused there. WorkspaceTransitions::set_plain is gone: a selection and a swipe slide under both renderers.

Not ported: the depth cards. The cards with blur, dim and shadow of a workspace transition theme (workspace_depth.rs, depth_transition_elements) draw only when the active theme package has a workspace transition (EffectPipeline::workspace_transition), and the plain scene loads no theme package until the F9 theme effects (the next step). Without a theme the GLES scene draws the flat slide, which is what the plain scene draws, so the cards and their shadow wait for that step; plain_workspace::transition_elements is where a theme would add them. The overview has no shadowed cards of the compositor: its cards are host UI.

Contract and how it is tested.

  • Previews and overview planes are only requested by the protected host (workspace_preview and overview_planes commands of the host connection, unchanged); the plain scene adds no route, command or capability field.
  • The planes never show content while locked: sync_overview_planes clears the cards and both texture maps on a lock and refuses new cards (shared code); a locked plain frame drops every plain web plane (drop_glass_targets) and composes none; the preview is not processed while the desktop is hidden (offscreen_work(.., hiding)), as under GLES. Tests: the overview planes GPU test locks and checks both maps empty and no plane rendered; the slide GPU test locks in the middle of a slide and checks no plain web plane is kept or composed; the preview GPU test checks a request waits while hidden.
  • blocks_pointer and the input during a slide match what is drawn: the slide draws whenever WorkspaceTransitions::frame gives a frame, under both renderers, and under_wgpu_a_workspace_switch_slides_and_holds_the_pointer_as_gles checks that a selection and a swipe hold the pointer under GLES and wgpu alike.
  • The overviewPlanes setting turns the planes off on the host side, which then sends no cards; the compositor draws only cards it has.
  • Failure: a web plane that fails to compose is marked not ready and the slide draws the live web windows of that workspace, as GLES (native_wgpu_renderer_workspace_failures_fall_back, with a test hook that fails the update, against the GLES frame within the glass bound below); an overview plane whose scene or render fails turns the planes off (OverviewPlanes::fail): the snapshot reports failed, no card stays, the frame draws none (0 bytes differ from the overview without planes) and new cards are refused, so the host keeps its image path; a preview whose scene fails reports ready: false and the error, and the next request renders again (native_wgpu_renderer_workspace_preview_matches_gles). A draw error of a plane element fails the frame, as a draw error of the GLES texture element does.

Capabilities. WGPU_SKIPPED_CAPABILITIES drops workspacePreviews, workspacePreviewUnchanged, workspaceWebPlanes and overviewPlanes; the list is empty, and the capability map under wgpu equals the map under GLES.

Parity (wgpu_renderer_workspace_tests.rs, ignored GPU tests, RX 550, RADV, Mesa 26.0.8, GLES scene against the plain scene on the same render node). The desktop: the bottom bar with a translucent pattern and its glass pill, the chat with a translucent card and the marker of its workspace, a busy 360x260 window on each of workspaces 1, 2 and 3, the order 1, 2, 3. Each scene composes its own web planes of workspaces 1 and 2 first. A held slide (hold_for_test, a swipe that drags) gives both scenes the same progress. Each frame after the first of a target redraws only its damage and is also compared with a whole frame of the same state in each renderer.

Case Max error Bytes that differ
Slide 1 to 2 (frozen plane of 1) at 0.1, 0.25, 0.5, 0.75, 0.96 1, 1, 2, 2, 1 /255 1568, 1281, 1735, 1750, 1608
Slide 2 to 1 (plane of 1 composed each frame) at 0.1, 0.25, 0.5, 0.75, 0.96 2, 2, 2, 1, 1 /255 1870, 1750, 1735, 1281, 1675
Swipe 1 to 2, three steps and the commit 1, 1, 2, 2 /255 1630, 1483, 1706, 1706
Slide at 0.4 under all 8 output transforms 1/255 1530 to 1531
Extra output during the slide at 0.3 and 0.7 0 0
Overview without planes 1/255 441
Two planes, then three with a clip, then after a commit 1, 1, 1 /255 2904, 3739, 3502
Three planes under 90 and flipped 180 1/255 3511
Preview of workspace 1 and 2 (384x216 RGB) 1, 0 /255 2, 0
Failed web plane (live web windows) against GLES with its plane 2/255 1737

The 2/255 cases are 1 to 3 pixels each, all in the rows of the bar glass pill (y 591 to 599) where a window edge of a sliding plane passes under it: the two-pass blur of the glass rounds apart by up to 2/255, as in step 2 (the chat glass scene test bounds it at 2). The tests bound each frame at 1/255 except at most 8 bytes at 2/255; damaged against whole frames is within 2/255 in both renderers (the same blur), and 0 or 1 elsewhere.

What stays skipped: the depth cards and their shadow (with the F9 theme effects, the next step, drawn since Phase 3 step 6 below); the downscale cache of sharp zoom.

Nested QA (headless, one output, synthetic profile, no provider). Run 1b13aca3 with --renderer wgpu (start log: "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 6 render formats"; state --full reported workspacePreviews, workspacePreviewUnchanged, workspaceWebPlanes and overviewPlanes true) and run 35a4c179 with --renderer gles, the same steps: the first-run card dismissed, GNOME Calculator on workspace 1, Super+N for workspace 2 with GNOME Text Editor, Super+Left and Super+Right with a burst of three captures after each, then Super+S for the overview. Both switched workspaces and drew the same workspaces after each switch; the slide was not caught mid-way (a capture takes about 350 ms, the slide is shorter), so the parity tests are the evidence of the slide itself. In the overview both reported two live planes (overviewPlanes.cards with empty: false, failed: false) and drew the calculator and the editor in the cards, behind the shell window; the zoomed side-by-side shows the same cards (the wallpaper animates between runs). No compositor log line had an error. The host used the planes, so the nested runs requested no preview; the preview is covered by its parity test only. Captures, local only, in ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-phase3-workspaces/: w*.png (wgpu), g*.png (GLES), overview-cards-zoom-gles-left-wgpu-right.png and workspace2-gles-left-wgpu-right.png. No account name is shown in them. Not run: a nested run with two outputs (the extra output is covered by the parity test only), a touchpad swipe (no gestures in nested QA; the swipe is covered by the parity test), the GPU cost of the planes, and the physical login with this change.

Phase 3 step 6: theme effects (2026-11-09)

Under --renderer wgpu the plain scene now loads theme packages (openspec/specs/themes/spec.md): list, inspect, select, reload, check and disable of the control socket answer as under GLES, the WGSL of a theme is compiled, and the depth cards of a workspace transition and their shadow draw as in the GLES scene. wgpu_output::refuse_gles_only is gone. The GLES path is unchanged.

Design.

  • native/wgpu-renderer/src/pass.rs adds offscreen passes to the renderer: compile_pass takes a whole WGSL module with its own vs and fs and an explicit @group(0) layout (PassBinding: texture, sampler, uniform), and run_pass draws it into the top-left viewport of an offscreen texture, cleared first, in its own encoder and submission before the output frame. A theme shader brings its own vertex stage, so it cannot be a custom program of step 1. Compilation runs in error scopes and builds the Rgba8Unorm pipeline; other formats are made at their first run and cached only when valid. Every misuse (a pass of another renderer, a dma-buf or swizzled texture, a feedback loop, a viewport outside the target, resources that do not match the layout) is an Err. See the renderer README, Offscreen passes.
  • native/smithay/src/theme_requests.rs holds the renderer-free part of the theme runtime, moved from effect_pipeline.rs: the roots, the selected candidate (with the legacy package), the answer to a request (answer_request over a ThemeOperations trait) and the snapshot fields (publish from a ThemeStatus). The GLES pipeline and the plain scene call the same code, so the catalog, the errors, the generations and the effects fields cannot drift.
  • native/smithay/src/plain_theme.rs (Compositor::plain_themes) compiles a theme for the plain scene: the WGSL pair of the workspace transition (card: texture, linear clamp sampler, 64-byte uniform; shadow: 32-byte uniform) and the effect.wgsl of every F9 pass, enabled or not (the F9 ABI v1 layout of openspec/specs/themes/spec.md), before anything is published; select persists the selection only after both compile. It loads lazily at the first offscreen work of an output and answers requests there (wgpu_output::offscreen_work), also while locked, as GLES.
  • native/smithay/src/plain_depth.rs (Compositor::plain_depth) mirrors workspace_depth.rs: the same uniforms (card_uniforms, shadow_uniforms), the same bounds (8,388,608 pixels, three targets, a capacity that grows), the flight that keeps the theme of its first frame and the failure that holds until the end of the transition. The source scene is rendered into a target, the card pass runs horizontally then vertically, the shadow pass into its own target, and the results draw as PlainElement::Plane textures at the rounded places of the GLES texture elements, cropped to the strip, the card above its shadow. The DepthPasses trait has a no-op GLES implementation, so the generic scene tests still compile against GLES.
  • plain_workspace::depth_transition_elements builds the depth frame as the GLES scene::depth_transition_elements: the cursor and the bars with their glass fixed, the planes of each workspace by progress, the wallpaper background card, then the glass. wgpu_scene::elements uses it during a transition when a theme applies, else the flat slide of step 5. A locked frame drops the depth targets with the other plain targets.

What a theme with only GLSL does. There is no GLES under --renderer wgpu, so a theme whose workspace transition or F9 pass has no WGSL is refused by check, select and reload, with "... has only GLSL, which --renderer wgpu cannot compile: add effect.wgsl and shadow.wgsl (openspec/specs/themes/spec.md) or use --renderer gles" (or "Effect {id} ... its effect.wgsl"), and the previous theme and selection stay. A WGSL error refuses the theme as a GLSL error does under GLES, with the prefix of the file. The Studio theme ships every WGSL file, so it loads under both renderers.

Contract and how it is tested. No route, command, capability field or agent reach is added: the theme requests are the existing control socket commands, and WGPU_SKIPPED_CAPABILITIES stays empty. The snapshot effects fields are written by the shared publish; under wgpu overviewF9 reports backend: "wgpu", the WGSL packages and programs, wgpuReady and zero counters. Tests:

  • native_wgpu_renderer_theme_requests_compile_wgsl_only (GPU): Studio selects and reports the transition and the compiled passes; a theme with only GLSL in its transition, and one with an F9 pass without WGSL, fail check and select with the message above and keep Studio and its selection file; a broken WGSL fails with its prefix; list, inspect and disable answer as under GLES; a request queued before a lock is answered while locked.
  • native_wgpu_renderer_workspace_depth_matches_gles (GPU): the parity below, damaged frames against whole frames, and a lock in the middle of the cards that drops the three targets.
  • native_wgpu_renderer_workspace_depth_failure_draws_the_slide (GPU): a failed pass (test hook) draws the flat slide of GLES without a theme, keeps it for the rest of the transition, logs a warning as GLES, and the next transition draws its cards again.
  • Unit tests of plain_depth: the uniforms of the card and the shadow, the rounding of the places (the same as TextureRenderElement::geometry), and the flight and failure rules.
  • GLES unchanged: the bridge and EGL theme GPU tests under session,wgpu-effects (native_wgpu_f9, native_wgpu_studio, native_wgpu_workspace, egl_theme, egl_workspace_theme), 13 passed before (c4464fbe) and after, with the same 449 measurement lines except the time-based native_wgpu_f9_theme_reload_is_atomic_and_pins_programs, which measures black flame at the wall clock: 0 to 2/255 over five runs after and four before, and once 5/255 on the base commit, over its bound of 3. That flake predates this step.

Parity (wgpu_renderer_workspace_tests.rs, RX 550, RADV, Mesa 26.0.8, the desktop of step 5 with the Studio theme of the checkout compiled for both scenes, held flights at the same progress):

Case Max error Bytes that differ
Cards 1 to 2 at 0.1, 0.25, 0.5, 0.75, 0.96 1/255 51425, 62155, 74759, 61865, 71966
Cards 2 to 1 at 0.1, 0.25, 0.5, 0.75, 0.96 1/255 47397, 61865, 74759, 62155, 73769
Swipe 1 to 2, three steps 1/255 46283, 73887, 71966
Cards at 0.4 under all 8 output transforms 1/255 63071 to 63079
Primary output beside an extra output at 0.3 and 0.7 1/255 82363, 86645
Extra output during the cards at 0.3 and 0.7 0 0
Damaged frames against whole frames (both renderers) 0 0
Failed pass: the flat slide, and the next frame, against GLES without a theme 2/255 1737 (1 byte at 2), 1579 (2 bytes at 2)

No byte differs by more than 1/255 in a depth frame. Many bytes differ by one step because the card and the shadow are stored in 8-bit targets and then blended, where the GLES elements round at the same places but in a different order; the test bounds each depth frame at 1/255. The 2/255 bytes of the failure case are the bar glass pill of step 5 (the bounded glass bound).

What stays skipped: the drawing of F9 thumbnails (no product view opens the F9 overview in either renderer, so the F9 passes compile and report but draw nowhere, and their PNG textures are decoded but not uploaded); themes with only GLSL (refused, above); the downscale cache of sharp zoom.

Nested QA (headless, one output, synthetic profile, no provider, Canvas). Run 748fb47a with --renderer wgpu (start log: "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 6 render formats") and run 3ec4d994 with --renderer gles, the same steps: the distributed Studio copied into the private themes root with durationMs raised from 200 to 1500 (the maximum) so a capture lands inside the slide, scripts/smithay-effects.py select studio (status active, the transition wgslCompiled: true, the three F9 passes compiled), GNOME Calculator on workspace 1, Super+N and GNOME Text Editor on workspace 2, then Super+Left with four captures 0.1 to 1.15 s after the key. Both runs drew the depth cards: the shrunken, blurred and dimmed cards with rounded corners and the wallpaper card behind, the same in both at similar progress (the captures are not at the same progress, and the wallpaper animates). A copy of Studio without its WGSL files was refused by check under wgpu with the message above and accepted under GLES. No compositor log line had an error. Captures, local only, in ~/.codex/artifacts/qa/galaxy-shell/2026-11-09-wgpu-renderer-phase3-themes/: w*.png (wgpu), g*.png (GLES), w-burst-sheet.png, g-burst-sheet.png, slide-0.45-gles-left-wgpu-right.png and slide-0.45-zoom-gles-left-wgpu-right.png. No account name is shown in them. Not run: a nested run with two outputs (covered by the parity test), a touchpad swipe (covered by the parity test), the GPU cost of the depth passes, and the physical login with this change.

Phase 4, the switch (2026-11-10)

wgpu is the default renderer. This section is the switch only (phase 4a); the removal of GLES (phase 4b) was built later, in steps 1 to 11 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md (2026-11-10 to 12). The text and the table of this section describe the switch as it was on 2026-11-10: --renderer, AGENT_NATIVE_RENDERER, the file renderer-gles and the build without the feature no longer exist.

Owner decisions of 2026-11-10, in the owner's words:

  1. "Padrão direto". The switch is direct, on the normal login, with no test entry in GDM.
  2. "Não vamos testar GLES mais, vamos se preocupar somente com o wgpu". The performance gates that phase 4 required against GLES (ABBA, p95, p99, interval, CPU, PSS of wgpu-benchmark.md) do not block and are not run.
  3. "Remover tudo do GLES", after a physical login that the owner confirms. Until then GLES stays in the binary as the way out.

How the renderer was chosen after the switch, until step 6 (2026-11-11; since then the build fixes it and the first two rows below no longer exist) (main.rs, Options::parse_with; renderer_choice::Renderer::startup_default), first match wins:

Start Renderer
--renderer gles or --renderer wgpu The one named. wgpu is refused at parse time in a build without wgpu-renderer, and with --nested
--session with AGENT_NATIVE_RENDERER set The one named; a value the build cannot run keeps GLES with a line on stderr
--session or --headless, build with wgpu-renderer wgpu
--session or --headless, build without it GLES, with the warning "this build has no wgpu-renderer feature; compositing with GLES, not the default wgpu renderer" at each start (until 2026-11-11; since step 7 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md the fallback build draws a reduced scene with no effects and writes the one stderr line of renderer_choice::fallback_notice, "this is the fallback build ... with no visual effects")
--nested GLES (Smithay 0.7.0 binds its winit window to EGL and GlesRenderer); since step 3 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md the default is the wgpu window, and --nested --renderer gles opens this one

The login passes no renderer flag (smithay-session.py starts <binary> --session), so it gets wgpu when the preparer built the full features (session,wgpu-renderer) and GLES with the warning when the preparer fell back to session (openspec/specs/project-loading/spec.md, Build features and the fallback). The login never stays without a compositor because of that fallback.

--effects-backend. Removed on 2026-11-10 (openspec/changes/archive/2026-11-10-gles-removal-plan/design.md, step 2): the option is a usage error, the wgpu-effects feature and the effects bridge are deleted, and the snapshot has no effectsBackend key. nested-qa.py no longer takes it.

Recovery and the way back. A start of the wgpu renderer that fails (no Vulkan device for the render node, a failed dma-buf self-test, no render format for DRM) ends the compositor with an error and never falls back to GLES inside that run (drm.rs, wgpu_output.rs). What the login does then, read from project-session.py and smithay-session.py:

  1. The supervisor gets no Wayland socket, run raises, and the dispatcher prints RECOVERY and starts the known-good release (fallbackRoot of project.json) once, with the same profile. If the session was locked it ends the login without the fallback.
  2. Before that start the dispatcher now sets AGENT_NATIVE_RENDERER=gles (project-session.py, and supervised_run of smithay-session.py for --fallback-root). This matters because scripts/install.sh without --fallback-root builds the recovery release from the current commit: a recovery built after the switch has wgpu as its default too and would fail in the same way. A recovery release from before the switch ignores the variable and has only GLES.
  3. If the recovery also fails, the login ends and GDM shows again. The safe mode entry of GDM ("Galaxy Shell (modo seguro)") only turns the overlay of the chat host off; it does not change the renderer.

A start that succeeds but draws wrongly triggers none of this. Until step 6 (2026-11-11; renderer-gles is no longer supported, gpu-api-gl is the way back now and the recovery exports AGENT_NATIVE_GPU_API=gl too, openspec/specs/project-loading/spec.md, Recovery) the way back for the owner, in one sentence: from a text console (Ctrl+Alt+F3, log in), run touch ~/.config/agent-native-os/renderer-gles and log in to Galaxy Shell again; delete the file to return to wgpu. smithay-session.py adds --renderer gles when the file exists and the binary knows the flag (compositor_command, the rule of no-dmabuf). It asks the binary with the environment of the session, and when a rollback file exists and its flag is not applied it writes "Agent Native: rollback file renderer-gles not applied: ..." to the log of the login, with the reason (an older binary that composites with GLES only, or a binary that did not answer --help). A recovery start records rendererAsked: "gles" in project-session.json and supervisor-smithay-recovery.json; it asks for GLES after any failure of the first start, not only a failure of the wgpu renderer. Both this file and the variable of the recovery are read by the dispatch copies, so they work only after scripts/install.sh installed the copies of this commit (openspec/specs/project-loading/spec.md, File origin). A git revert of the switch commit restores the GLES default.

Activation, in steps that stay apart. Publishing and synchronizing the active checkout changes the next login: its prepared binary has wgpu-renderer, so that login composites with wgpu, also with the dispatch copies of before. With those older copies a failed wgpu start still recovers, because the recovery release registered on this machine on 2026-11-10 (releases/20261105-9fdf060dc979) predates the renderer and has only GLES; what does not work yet is the file renderer-gles. To install the dispatch copies, the owner runs, from his own shell and without sudo, on the clean and prepared active checkout:

python3 scripts/prepare-project.py --root "$HOME/projetos/galaxy-shell"
scripts/install.sh --source-root "$HOME/projetos/galaxy-shell" --profile "$HOME/.local/share/agent-native-os/river-shell"

It copies the six dispatch scripts into a new ~/.local/state/agent-native-os/dispatch/<id>/, rewrites project.json and the wrappers in ~/.local/bin (the previous ones are kept in previous-login/), builds a read-only release of the commit as the new recovery (a full compositor build) and prunes older releases; it also runs install-liquid.py and setup-voice.py. It restarts nothing and needs no GDM registration. With --fallback-root <the release of before> it installs the copies and keeps that recovery without building one.

The downscale cache of sharp zoom, ported. The plain scene now draws a canvas window below zoom 0.35 from a cached texture, as the GLES scene (canvasSharpZoom, off by default). SharpZoom::plain is a DownscaleCache<WgpuTexture> beside the GLES cache, cleared with it when the setting goes off and while locked; the CachePasses trait of wgpu_scene.rs renders the textures that are due (sharp_zoom_candidates_plain, within_budget, retain, due: the candidates, the per-frame limits, the refresh interval and the byte budget of GLES) at the places where the GLES scene does, on the primary and on an extra output, and Item::Window.cached marks the windows of a view that draws below the zoom. The texture draws through the window finish (PlainElement::CachedFinished) or as a plane; popups stay live. A failed render warns once and the windows draw live. On DRM the frame timing counts cache_renders; the headless output has no frame timing. Tests: the_plain_scene_marks_the_windows_that_draw_from_the_cache (no GPU) and native_wgpu_renderer_sharp_zoom_cache_matches_gles (GPU, RX 550): two textures and two renders in each renderer, a frame without a commit renders nothing, a commit inside the refresh interval still draws the older texture, zoom 0.5 and the setting off free the cache; max error 0/255 and 0 bytes that differ against GLES, live, cached and after a commit (bound 2/255). Not covered by a parity test: the extra output and a window inside a lens group.

The window-close slot, ported. The window-close effect slot of a theme package (openspec/specs/window-effect-slots/spec.md, openspec/specs/themes/spec.md, Manifest v4) now draws under the plain scene. WindowClose is generic over its program (GlesTexProgram or WgpuPass) and CloseCurves::frame gives both renderers the same values (reserved parameters, every parameter in the byte order of its name, progress, time, inset and size); black_hole::track, flights, View and Entry carry the program type, so one bookkeeping serves both scenes. plain_theme compiles the effect.wgsl of every window-close pass as an offscreen pass with the window-close WGSL ABI v1 (the F9 layout, 96 bytes of uniforms; openspec/specs/themes/spec.md, Window-close WGSL ABI v1) before anything is published. An enabled pass with only GLSL refuses the theme, with a message that names the package and the effect.wgsl to add, and a WGSL error refuses it with the file prefix; a disabled pass without WGSL is skipped, so it does not take the transition of its theme down with it (effect_wgsl, review of 2026-11-10). plain_close.rs draws a flight: CloseTransform::placement gives the rectangle, WgpuRenderer::run_pass runs the pinned pass from the snapshot texture (DownscaleCache::texture) into a target per window that grows with the flight, and the target draws as a plain texture at the rectangle, cut to the output, in the stack where the GLES scene puts the flight (Closings). A rectangle over 8,388,608 pixels or 8192 on a side renders at a lower resolution and stretches. The skips, the precedence of the built-in black hole while the sink is live and the pinned program across a reload are the GLES ones (shared code); a failed pass closes the window with no flight and one warning. capabilities.windowEffectSlots is ["window-close"] under both renderers and effects.windowEffects.close is {id, durationMs}. No new renderer-crate capability: compile_pass and run_pass, and the three example packages ship an effect.wgsl. Tests: the_uniform_block_holds_the_frame_the_event_and_the_parameters_in_name_order, a_large_target_is_bounded_and_a_small_one_is_not and the_example_packages_declare_the_window_close_abi (no GPU), and on the RX 550 (Vulkan, RADV) native_wgpu_renderer_window_close_packages_match_gles, ..._follows_the_slot_rules and native_wgpu_renderer_theme_requests_compile_a_window_close_pass. Parity against the GLES scene, 800x600, at six progress points each (bound in the test): close-dissolve max error 2/255 and at most 75,132 of 1,920,000 bytes differ (bounds 2/255 and 115,000), close-flip 2/255 and 97,017 (bounds 2/255 and 150,000), black-hole-close 1/255 and 398 (bounds 1/255 and 600), the same package toward a live sink 1/255 and 201; 0 bytes differ at progress 0 and after the flight. The differences are the rounding of the sampling and of sin, tan and the hash of the dissolve in the two drivers. Not covered by a parity test: the extra output, and a rectangle over the target bound.

What only GLES draws after the switch. Each was reached with --renderer gles or the file above until step 6 (2026-11-11); now only a build without wgpu-renderer reaches them, until they are ported or removed:

  • The nested window (--nested, and nested-qa.py start --visible).
  • Nothing of the effects bridge: it was removed on 2026-11-10 (step 2), so GLES draws only its GLSL passes.
  • A theme whose workspace transition, F9 pass or enabled window-close pass has only GLSL: refused by check, select and reload (Phase 3 step 6, and The window-close slot, ported; the owner's contract of 2026-11-10 is "Só WGSL"). The one built-in theme, Studio (native/smithay/themes/studio), ships every WGSL file: the workspace pair and the three F9 passes.
  • A machine without Vulkan, or whose self-test fails: at the switch, phase 2b (the dma-buf path of the wgpu GL backend) was not built, so wgpu did not start there and the recovery above ran GLES. Since the same day the path exists (Phase 2b result).
  • Client dma-bufs in Rgb565, NV12 and YUV420 are not announced under wgpu (Phase 2 part A); a client picks another format or wl_shm.

Neither renderer draws the F9 thumbnails: no product view opens the F9 overview.

scripts/nested-qa.py. A headless run passes no renderer flag and so draws with wgpu; start prints renderer and records it in coordination.log. --visible was GLES only at the switch (since step 3 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md --visible --renderer wgpu opens the wgpu window).

No new authority. The renderer stays a startup choice: no IPC command, protected setting, agent tool, MCP entry, scheduled turn, generated HTML or plugin panel changes it, and WGPU_SKIPPED_CAPABILITIES stays empty.

Verification of the switch (2026-11-10). On the tree of commit 91c98100, in an environment without AGENT_NATIVE_*, DISPLAY and WAYLAND_DISPLAY: fmt --check; test with session (911 passed) and with session,wgpu-renderer (934 passed); clippy -D warnings for both; check --features session,wgpu-renderer --tests; the GPU suite native_wgpu_renderer_ on the RX 550 (Vulkan, RADV), 65 passed; the Python suite, 263 tests; npm run format:check, npm run check and npm test (1605 passed, 5 skipped). The GLES GPU suite egl_ (not a gate, and not maintained after the owner decision 2) has 6 failures on this tree and the same 6, plus one that comes and goes, on origin/main 561e25c9 without this change: chat glass regions, the two glass mask scene tests, the bar glass pill, the shell lock panel, the wallpaper of the second output and a window dragged in from another output.

After the fixes of the independent review of that tree (a disabled window-close pass without WGSL, the probe of the rollback files, rendererAsked, the warning of a build without the renderer), the same gates ran again: test 912 and 936 passed, the GPU suite 65 passed, the Python suite 264 tests.

Nested QA (headless, synthetic profiles, no provider; nested proof only). Every default run reported renderer: wgpu and logged "wgpu Vulkan renderer, implicit modifiers, self-test passed, 16 sampled and 6 render formats on /dev/dri/renderD128"; no compositor log of a run had a warning or an error line (one run's check was not observed). On the binary of 2b23323c, runs 648841dc, e05bafa0, eae2bc53 (one output), a6c60b4d (two outputs) and 6088440b (--renderer gles); on the binary of 91c98100, runs e05c1d2f, 98e16f33, d23780cf, cf9c8f56, 4a1bbb4e, 68bc5176 and 038c7da7.

Check One output Two outputs
dma-buf and SHM clients (GNOME Calculator, a GSK_RENDERER=cairo Text Editor) Drawn; clientBufferCommits dma-buf 184, shm 95 Drawn; 239 and 185
Resize (Super and the right button) 960 to 763 wide; again 616 to 726 high Not run
Chat glass and bar glass (theme glass, PNG wallpaper) chatAlphaGlass true, the pill of the top bar blurred outputBarGlass and outputChatGlass of NESTED-2, both drawn
Canvas lens (canvasWarp=cylinder:45) drawn: true, the windows curved Not run
Black hole close (built-in, black-hole wallpaper) The twisted window flies into the hole, on both binaries Not run
Workspace transition with Studio (durationMs 1500 in a private copy) wgslCompiled true, the depth cards drawn Not run
window-close packages close-dissolve, close-flip, black-hole-close Each selected and drawn at its own duration (360, 520, 400 ms): blocks that fall away, a window that turns and fades, a window that bends and shrinks close-dissolve drawn on NESTED-2
A window-close package without effect.wgsl check and select refused with the GLSL message; the previous pass stays -
Capture, and the user screenshot (Shift+Print) Both work Capture of each output works; user screenshot not run
Lock (Super+L) locked, capture refused The same, both outputs
A window on the second output - A client launched there draws

start --renderer gles ran GLES and drew a client, and close-dissolve under GLES showed the same kind of effect as under wgpu. start --visible --renderer wgpu and start --renderer wgpu --effects-backend gles were refused with their messages. With the lens on, a Super and right-button drag resized nothing under wgpu and nothing under GLES; without the lens it resized under wgpu. So that is a behavior of the lens on both renderers, not of the switch, and it was not investigated here. Captures, local only, in ~/.codex/artifacts/qa/galaxy-shell/2026-11-10-wgpu-default/ and its final/ folder; only synthetic data shows in them.

An opaque window was closed too (runs 5c92bdd3 and 12571563, binary of 91c98100): es2gears_wayland, whose content buffer is XRGB2101010 by its WAYLAND_DEBUG log, with close-dissolve and close-flip under wgpu and close-dissolve under GLES. The content stayed visible through the flight, with no transparent hole, and the two renderers showed the same sequence. The GLSL of the packages has a NO_ALPHA branch with no twin in the WGSL; the snapshot that a pass samples is an offscreen texture with alpha in both renderers. An SHM XRGB8888 client was not run (no such client on this machine).

Without proof: the physical login (the DRM path, a VT switch, the cursor plane, the held frame, real performance) on the tree of the switch; unlock, which needs the real password of the user through PAM and was not typed; moving an existing window to the other output; the lens, the black hole, the Studio transition and the user screenshot on two outputs; the sharp zoom cache in a nested run (its parity test ran); a start of the wgpu renderer that fails and the recovery that follows, which only the unit tests of the two session scripts cover; the file renderer-gles at a real login; a machine without Vulkan or with explicit modifiers; and scripts/install.sh, which was not run.

Phase 2b result (2026-11-10)

Step 4 of gles-removal-plan.md (owner decision "Ligar o wgpu sobre OpenGL"). WgpuRenderer::for_render_node_gl(path) gives the dma-buf traits of phase 2 on wgpu's OpenGL backend. The Vulkan path (for_render_node, dma.rs) keeps its behavior on this machine; gpu_api() says which one a renderer has. Tested headless on the render node only. Nothing here ran on a physical output.

What is implemented (native/wgpu-renderer/src/gl.rs, dma_path.rs).

  • Opening: a GBM device on the render node, EGLDisplay, a surfaceless EGLContext (Smithay backend_egl; renderer_gl is not enabled in the crate), then wgpu::hal::gles::Adapter::new_external and the same device limits as the other paths. A software EGL device, a display without EGL_EXT_image_dma_buf_import and a context without GL_OES_EGL_image are refused.
  • ImportDma and ImportDmaWl: create_image_from_dmabuf, a GL texture bound with glEGLImageTargetTexture2DOES, wrapped by texture_from_raw. The drop callback of the hal texture frees the GL texture and the EGLImage. EGL maps the DRM channel order, so the eight formats are stored as Rgba8Unorm or Rgb10a2Unorm with no red-blue swap. One plane only, the plane checked against the buffer size before EGL sees it, the cache per buffer and use, as on Vulkan.
  • Bind<Dmabuf>: the same EGLImage texture as a color target. Frames draw into the buffer; there is no shadow texture and no copy (the copy of the Vulkan path exists for RADV's CMASK).
  • Fence: after the submission an EGL_ANDROID_native_fence_sync fence, flushed and exported as the frame's SYNC_FD. Without the extension the fence is not exportable and waits on the CPU (not tested: this display has it). Implicit sync with clients and KMS is the driver's, as with Smithay's GLES renderer; the sync-file ioctls of the Vulkan path are not used. Renderer::wait of a foreign fence imports it and queues eglWaitSync at once.
  • Context: wgpu-hal never makes an external context current, so the renderer makes its own current at each entry, in the texture drop callback and in fence waits. The rule left to the caller: one thread, and textures dropped on it.
  • Self-test: the same checks, sizes and pass rule. The candidates are the formats the EGL display lists; a format listed with Invalid only also gets the LINEAR-described sample check.

Changes to the shared self-test (selftest.rs). The buffer of a check is exported as implicit only when the format under test is Invalid, and a LINEAR check re-describes the plane whenever the modifier is LINEAR. On the Vulkan implicit path of this machine this is what ran before. On the Vulkan explicit path (never run, no such device here) the old code exported every buffer as implicit and would have failed its own format check; the new code has not run there either: on a GPU with modifiers the Vulkan self-test changed behavior, untested (the decision is selftest::export_as, with a unit test). A failed comparison now also names the first wrong pixel.

Measured on the RX 550 (radeonsi, OpenGL ES 3.2, Mesa 26.0.8; debug test build).

  • Self-test: passed in about 11.2 s in the debug build (not timed in release). The display lists Invalid only. All eight formats sample, implicit and LINEAR. Render targets: Argb8888, Xrgb8888, Abgr8888, Xbgr8888, Abgr2101010 and Argb2101010 (which Vulkan cannot render). Xbgr2101010 and Xrgb2101010 do not render: a frame into them leaves the buffer black, so the self-test lists them to sample only. The start line of a headless run reads "wgpu OpenGL renderer, EGL images, self-test passed, 16 sampled and 6 render formats".
  • Against the Vulkan renderer (native/smithay/src/wgpu_renderer_gl_tests.rs, 10 tests): the 24 client format and layout combinations, 1:1 and cropped, scaled, with alpha and a buffer transform; Bind<Dmabuf> into the six render formats at 301x203, 1920x1080 and 3840x2160, first frame and damage-only frame (nothing changes outside the damage); the 16 plain cases and the frame API; a client that rewrites its buffer; foreign fences in both directions. Maximum error 0/255 and 0 differing bytes in all of them. The Argb2101010 target is compared with the Vulkan Abgr2101010 one.
  • Frame fences: anon_inode:sync_file, signaled within 5 s, six frames. An injected import failure fails the self-test and leaves both format lists empty, and the next self-test passes; an injected submission failure queues nothing. A second EGL context made current in between and a texture that outlives its renderer do not break it.
  • Scenes on both APIs (wgpu_renderer_gl_scene_tests.rs, 6 tests, owner decision "Comparar Vulkan com GL"): window finish (24 frames), glass (54 scenes), workspace slide (26 frames), overview planes and previews (7), window and output captures (5), a linux-dmabuf client window through the surface tree (implicit and LINEAR). 0 differing bytes in all of them.
  • The whole GPU suite native_wgpu_renderer_: 81 passed (65 before, 10 and 6 new).

The bounds of the new tests are therefore 0 bytes with at most 1/255. RADV and radeonsi share Mesa's shader compiler on one GPU, so identical bytes here say nothing about another driver.

Not covered. An EGL display with explicit modifiers; a display without native fences; a machine with no Vulkan; physical scanout (AddFB2, page flip, IN_FENCE_FD from the EGL fence); multi-GPU; performance and the release time of the self-test; a mutation run against the tests.

The compositor selects this path with --gpu-api (auto falls to it from Vulkan); see gles-removal-plan.md, Step 5 result.