release: v0.30.30 — memory leak fix + validation precedence (#291) - #292
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
andypeng2015
pushed a commit
to andypeng2015/wgpu
that referenced
this pull request
Aug 25, 2026
….2) (gogpu#201) Comprehensive VK_ERROR_SURFACE_LOST_KHR handling in Vulkan HAL — Rust wgpu-hal parity (native.rs acquire/present/createSwapchain). Defensive sc.handle==0 guard in present(). Triggered by Wayland SIGSEGV investigation (gogpu#292, two users: Intel ANV + AMD RADV). Deps: goffi v0.5.2 → v0.5.3.
andypeng2015
pushed a commit
to andypeng2015/wgpu
that referenced
this pull request
Aug 25, 2026
…0.29.3) (gogpu#202) * feat: Wayland present for Software (wl_shm) + GLES (wl_egl_window) (ADR-042, gogpu#292) Software: blit_wayland.go — wl_shm double-buffered SHM presentation. Auto-detects Wayland vs X11. Loads libwayland-client.so independently. BGRA = ARGB8888 on LE (no conversion). memfd_create + mmap + attach/commit. GLES: egl/wayland_egl.go — wl_egl_window_create/destroy/resize from libwayland-egl.so. resource_linux.go creates EGL window surface via wl_egl_window on Wayland. Proper cleanup order per Wayland spec. * fix(hal): enterprise Wayland SHM + EGL present (ADR-042, gogpu#292) Software SHM: wl_buffer.release listener (Qt6 pattern), cached CIFs (zero alloc/frame), damage_buffer opcode 9 (HiDPI correct), fixed damage arg count, dedicated attach/damage/commit helpers. GLES EGL: eglCreatePlatformWindowSurface (EGL 1.5) with runtime detection + EGL 1.4 fallback (Rust wgpu-hal parity). Research: WAYLAND-SHM-EGL-ENTERPRISE-RESEARCH.md (Qt6, Rust wgpu-hal, CSD comparison). ADR-042-WAYLAND-SHM-EGL-PRESENT.md. * fix(software): triple-buffer, safe detection, eager wlShm init Triple-buffering (3 buffers, Qt6 pattern) eliminates frame skips on slow compositors. isWaylandDisplay via WAYLAND_DISPLAY env var (not unsafe fd probe). Eager obtainWlShm removes roundtrip from hot path. Removed 23 lines of dead code (unused symbols/CIFs). * fix(software): variadic ABI fix + partial copy (ADR-043) PrepareVariadicCallInterface for all wl_proxy_marshal calls — correct ARM64 AAPCS64 variadic ABI via goffi v0.5.2+ (7 CIFs, nfixedargs 2-4). Row-based partial copy in waylandPresentDamage — copies only damaged regions instead of full framebuffer. needsFullCopy flag ensures first frame after buffer allocation is always full copy. 1080p small damage: 332µs → 1.6µs (208× speedup). * docs: update CHANGELOG, ROADMAP for v0.29.3 CHANGELOG: enterprise Wayland SHM + EGL (ADR-042/043) — triple-buffer, release listener, variadic ABI, partial copy, EGL 1.5. ROADMAP: v0.29.3, Wayland SHM/EGL marked done, backend table updated. * fix(gles): SSBO binding, primitive topology, instanced rendering (Rust parity) Three critical GLES bugs fixed: 1. Storage buffers bound as GL_SHADER_STORAGE_BUFFER (was GL_UNIFORM_BUFFER) — compute shaders now work (Rust command.rs:731-746) 2. Draw commands use pipeline topology (was hardcoded GL_TRIANGLES) — PointList/LineList/LineStrip/TriangleStrip all correct 3. glVertexAttribDivisor for per-instance vertex attributes — instanced rendering works (Rust queue.rs:1372) Verified: particles example renders 4096 compute-driven particles on GLES. * fix(software): go vet unsafe.Pointer in cString FFI helper
andypeng2015
pushed a commit
to andypeng2015/wgpu
that referenced
this pull request
Aug 25, 2026
…ogpu#292) obtainWlShm() called wl_display_roundtrip() on the render thread during first present, concurrent with main thread event dispatch. Two concurrent dispatches on same wl_display corrupt proxy state → SIGSEGV at offset 0x18 (wl_proxy.display NULL). Moved detection + wl_shm binding to Configure() on the main thread, before the event loop starts. Enterprise references unanimously do this during init: GLFW (glfwInit, wl_init.c:568), SDL3 (SDL_Init, SDL_waylandvideo.c:1548), Qt6 (QWaylandDisplay, qwaylanddisplay.cpp:531 — explicit comment), winit (EventLoop::new, event_loop/mod.rs:92).
andypeng2015
pushed a commit
to andypeng2015/wgpu
that referenced
this pull request
Aug 25, 2026
…ogpu#292) obtainWlShm() created wl_registry and wl_shm via raw wl_display, placing them on DEFAULT queue. gogpu dispatches only appQueue (ADR-041) — DEFAULT queue never dispatched. Fix: wl_proxy_create_wrapper + wl_proxy_set_queue so all child proxies inherit shmQueue (Qt6 ephemeral wrapper pattern). Uses wl_display_roundtrip_queue instead of wl_display_roundtrip. Also fixes proxy leaks (registry + wl_shm now destroyed in cleanup) and removes manual wl_proxy_set_queue on buffers (queue inheritance automatic via libwayland proxy_create, wayland-client.c:492).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PATCH release. Memory leak fix from @samyfodil: validation maps pinned resources per frame. Deadlock regression test from #290.