Skip to content

fix(gles): attach depth/stencil to swapchain FBO on surface render pass (#284) - #285

Merged
kolkov merged 1 commit into
mainfrom
fix/284-gles-depth-stencil
Jul 30, 2026
Merged

fix(gles): attach depth/stencil to swapchain FBO on surface render pass (#284)#285
kolkov merged 1 commit into
mainfrom
fix/284-gles-depth-stencil

Conversation

@kolkov

@kolkov kolkov commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bug(gles): depth/stencil not attached to swapchain FBO on surface render pass #284: GLES depth/stencil not attached to swapchain FBO on surface render pass — 3D content invisible
  • Root cause: setupSurfaceTarget() early return skipped depth/stencil attachment
  • Fix: AttachDepthStencilToFBOCommand attaches to currently bound FBO (swapchain FBO is a real GL FBO, not FBO 0)
  • Matches Rust wgpu-hal GLES begin_render_pass which uses same draw_fbo path for surface and offscreen
  • Also bumps gpucontext v0.22.0 → v0.23.0

Test plan

  • go build ./... — native
  • GOOS=js GOARCH=wasm go build . — browser
  • All tests pass
  • golangci-lint — 0 issues
  • gofmt — clean
  • Visual: GOGPU_GRAPHICS_API=gles go run g3d/examples/fullscreen-overlay/ — 3D cube visible (requires g3d)

…ss (#284)

setupSurfaceTarget() had an early return that skipped depth/stencil
attachment. 3D content with depth testing was invisible on GLES while
Vulkan/DX12 worked correctly.

Add AttachDepthStencilToFBOCommand — attaches to currently bound FBO
without referencing colorTexture. Matches Rust wgpu-hal GLES
begin_render_pass which uses draw_fbo for both surface and offscreen.

Also bumps gpucontext v0.22.0 → v0.23.0.

Fixes #284.
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov
kolkov merged commit 49c7c8f into main Jul 30, 2026
15 checks passed
@kolkov
kolkov deleted the fix/284-gles-depth-stencil branch July 30, 2026 07:29
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