Skip to content

EasyGPU 0.2.0 — Real wgpu-py Backend

Latest

Choose a tag to compare

@EagleEatApple EagleEatApple released this 10 Oct 01:43

Real backend release — WgpuPyGPU behind the stable GPU Protocol, with
offscreen render targets that render headlessly on lavapipe and WARP.

Added

  • WgpuPyGPU (easygpu.wgpu_backend): delegates the existing GPU Protocol
    to wgpu-py. Adapter/device/queue creation (EASYGPU_SOFTWARE=1 forces a
    software adapter), buffers with synchronous readback, shader modules,
    render/compute pipelines with auto layouts, textures/views/samplers, bind
    groups, full render-pass and compute-pass encoding, submit,
    write_buffer/write_texture, copy_texture_to_buffer.
    WgpuPyGPU.from_wgpu_device() adopts an existing wgpu device;
    WgpuPyGPU.underlying_device exposes it.
  • easygpu.gpu.WGPU_BACKEND_UNSUPPORTED: a frozenset[str] naming every
    Protocol method WgpuPyGPU does not yet implement (14 in 0.2.0).
  • easygpu.testing: assertion helpers over FakeGPU.calls —
    assert_call_order, assert_no_call, diff_against, call_names.
  • easygpu.offscreen: OffscreenTarget, offscreen_target(), and
    readback_rgba8() — real pipelines render into textures and pull pixels
    back (headless CI green on Linux/lavapipe and Windows/WARP).
  • easygpu.wgpu_translate: pure descriptor/enum translation (18 enum tables).
  • Optional wgpu extra (pip install easygpu[wgpu]); plain import easygpu
    stays zero-dependency.
  • 3 offscreen examples: triangle_offscreen, textured_cube_offscreen,
    compute_boids_offscreen — dual-engine tested (FakeGPU recording + live
    wgpu pixels).

Changed

  • __version__ → 0.2.0; import warning now nudges installing the wgpu extra.
  • RenderPassColorAttachment.view accepts int handles, TextureView, or an
    OffscreenTarget.
  • Pipeline color targets must declare a format (as WebGPU requires).

Fixed

  • Basic vertex + textured fragment shaders (both fn main) now build as
    separate modules to satisfy WGSL redefinition rules on the real backend.

Install

pip install "easygpu[wgpu]"

What does NOT work in 0.2.0

  • No swapchain / window output (offscreen targets work — use OffscreenTarget)
  • No dynamic-offset bind groups
  • No numpy integration (raw bytes / struct.pack)
  • generate_mipmap on the real backend (staged for 0.3.0)

See the CHANGELOG
for the full list.