Repository navigation
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 existingGPUProtocol
to wgpu-py. Adapter/device/queue creation (EASYGPU_SOFTWARE=1forces 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_deviceexposes it.easygpu.gpu.WGPU_BACKEND_UNSUPPORTED: afrozenset[str]naming every
Protocol methodWgpuPyGPUdoes not yet implement (14 in 0.2.0).easygpu.testing: assertion helpers overFakeGPU.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
wgpuextra (pip install easygpu[wgpu]); plainimport 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 thewgpuextra.RenderPassColorAttachment.viewaccepts 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_mipmapon the real backend (staged for 0.3.0)
See the CHANGELOG
for the full list.