v0.28.4: macOS blit + GLES Rust parity + GPU dispatch validation#188
Merged
Conversation
… (Rust parity) Timestamp queries: glGenQueries/glQueryCounter/glGetQueryObjectui64v. GPU fence: glFenceSync/glClientWaitSync replaces atomic-only fake fence. CopyBufferToTexture: GL_PIXEL_UNPACK_BUFFER + glTexSubImage2D (PBO path). CopyTextureToTexture: FBO attach + glCopyTexSubImage2D. Verified against Rust wgpu-hal/gles: device.rs, command.rs, queue.rs, fence.rs. 886 LOC added, 0 lint (Windows + Linux), all tests pass.
Pre-dispatch compute shader validates workgroup counts against maxComputeWorkgroupsPerDimension. Invalid counts → (0,0,0) output. Prevents GPU hang/TDR from corrupted indirect buffers. Architecture matches Rust wgpu-core indirect_validation/dispatch.rs: - WGSL shader with baked limit constant - Two bind group layout (dst+params reused, src per-dispatch) - Graceful fallback if pipeline creation fails - Pass end/begin for barriers + state restore 537 LOC (371 impl + 166 test), 10 tests pass.
GL version/extension probing, 10+ WebGPU features from extensions, 30+ limits from GL queries, texture format capabilities per-format, downlevel flags, device type + vendor ID inference. capabilities.go (813 LOC) shared between Windows WGL and Linux EGL. 58 unit tests: version parsing, GLSL version, device type inference, vendor ID, extension set, version comparison. Replaces hardcoded defaults with real GL introspection. Verified against Rust wgpu-hal/gles/adapter.rs (1325 LOC).
CHANGELOG: 6 fixes (GLES fence, copies, timestamps, adapter caps, GPU dispatch indirect validation). All matched to Rust wgpu reference. ROADMAP: v0.28.5, GLES backend status updated.
errcheck: check DataProviderRelease/ImageRelease/SetDevice returns. nestif: restructure init() with early return. revive: eliminate 10 redundant if-return patterns. staticcheck: use embedded field directly (s.objc not s.platformBlit.objc). unconvert: remove 13 unnecessary unsafe.Pointer() wrappings. unused: remove cifMetalRegionMake2D, unused objc fields. 0 lint issues on Windows + Linux + macOS.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Summary
Everything since v0.28.3 in one release:
macOS software blit (PR #187, @k-chimi)
GLES Phase 1: timestamps + fence + copies (886 LOC)
glFenceSync/glClientWaitSyncreplaces atomic-only fake fenceCopyBufferToTexturevia PBO,CopyTextureToTexturevia FBOglQueryCounterGLES Phase 2: adapter capabilities (1148 LOC)
GPU dispatch indirect validation (769 LOC)
Test plan
golangci-lint0 issues — Windows, Linux, macOS