Skip to content

Move the renderer into its own crate - #26

Merged
CPritch merged 1 commit into
mainfrom
render-crate
Oct 10, 2026
Merged

CPritch merged 1 commit into
mainfrom
render-crate

Conversation

@CPritch

@CPritch CPritch commented Oct 10, 2026

Copy link
Copy Markdown
Owner

shiftpaper-render now holds the renderer, the depth map code and the shader, with no Wayland code, so other front ends can use it.

  • The caller creates the wgpu instance and adapter and picks the output format. shiftpaperd keeps Vulkan and Bgra8UnormSrgb
  • Depth goes to the GPU as R16Float instead of R16Unorm, and the device asks for downlevel limits, so the renderer also runs on GLES and on GPUs without 16-bit normalised textures
  • The files moved with git mv, so their history carries over
  • CI checks, lints and tests the new crate, and checks it builds for aarch64-linux-android. Both PKGBUILDs test it too

Format, clippy and tests pass locally. The daemon hasn't been run on the desktop with R16Float depth yet.

shiftpaper-render holds the renderer, the depth map code and the shader,
with no Wayland code, so other front ends can draw with it. The caller
now creates the wgpu instance and adapter and picks the output format,
which lets each platform choose the backends and formats it offers.

Depth maps go to the GPU as R16Float instead of R16Unorm, which is
optional on phones, and the device asks for downlevel limits, so the
renderer also runs on GLES. CI checks the crate builds for Android.
@CPritch
CPritch merged commit c95d10a into main Oct 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant