Skip to content

feat(geo-layers): support Tile3DLayer on WebGPU - #10600

Merged
ibgreen merged 1 commit into
masterfrom
codex/tile3d-webgpu-investigation
Aug 27, 2026
Merged

ibgreen merged 1 commit into
masterfrom
codex/tile3d-webgpu-investigation

Conversation

@ibgreen

@ibgreen ibgreen commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Background

Tile3DLayer already delegates point-cloud and glTF tile content to WebGPU-capable layers, but its I3S mesh path still supplied the WebGL-only sampler binding name. Model initialization succeeded, while the first WebGPU draw failed bind-group validation because simpleMeshTexture and its paired sampler were missing.

Change List

  • Bind the I3S mesh base-color texture through simpleMeshTexture on WebGPU while preserving the existing sampler binding on WebGL.
  • Upgrade the mesh WebGPU test from model initialization to real submitted draws, with and without feature IDs, and assert the backend-specific texture binding.
  • Add an end-to-end WebGPU test that loads the local B3DM tileset and waits for a glTF tile to draw.
  • Document Tile3DLayer as supported on WebGPU in v9.4 and include it in the release notes.

Validation

  • node_modules/.bin/ocular-test headless -t "Tile3DLayer mesh sublayer draws|Tile3DLayer loads and draws b3dm" --reporter dot
  • RENDER_TEST_DEVICE=webgpu node_modules/.bin/ocular-test render -t "simple-mesh-layer-cartesian|scenegraph-layer-duck-pbr|pointcloud-meter" --reporter dot
  • yarn lint
  • yarn build
  • yarn test-website (passes with existing source-map, HTML-minifier, and broken-anchor warnings)
  • Commit hooks: lint/lockfile validation and Node tests

@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown

Greptile Summary

The PR enables Tile3DLayer's I3S mesh path on WebGPU by selecting the backend-specific texture binding and expands WebGPU draw coverage and documentation.

  • Uses simpleMeshTexture for WebGPU while preserving the existing WebGL sampler binding.
  • Reworks the MeshLayer WebGPU test to instantiate Deck and submit rendering work.
  • Adds an end-to-end WebGPU B3DM/ScenegraphLayer test.
  • Marks Tile3DLayer as supported in the WebGPU guide and v9.4 release notes.

Confidence Score: 4/5

The implementation appears safe to merge, with a non-blocking gap in how the new MeshLayer test observes asynchronous WebGPU validation failures.

The backend binding names agree with their shader contracts and the integration test requires an actual first draw, but the focused regression test should restore an explicit validation error scope so bind-group failures cannot escape its assertions.

Files Needing Attention: test/modules/geo-layers/mesh-layer.spec.ts

Important Files Changed

Filename Overview
modules/geo-layers/src/mesh-layer/mesh-layer.ts Selects the texture binding name expected by each backend while retaining the fallback texture and hasTexture behavior.
test/modules/geo-layers/mesh-layer.spec.ts Adds submitted-draw coverage and binding assertions, but no longer explicitly captures WebGPU validation errors.
test/modules/geo-layers/tile-3d-layer/tile-3d-layer.spec.ts Adds an end-to-end WebGPU B3DM test whose completion predicate requires ScenegraphLayer's first-draw signal.
docs/developer-guide/webgpu.md Marks Tile3DLayer and its supported content paths as WebGPU-compatible.
docs/whats-new.md Adds Tile3DLayer to the v9.4 WebGPU support release notes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Tile3DLayer I3S mesh] --> B[MeshLayer]
  B --> C{Device backend}
  C -->|WebGPU| D[simpleMeshTexture binding]
  C -->|WebGL| E[sampler binding]
  D --> F[Mesh draw]
  E --> F
Loading

Reviews (1): Last reviewed commit: "feat(geo-layers): support Tile3DLayer on..." | Re-trigger Greptile

Comment on lines +107 to +108
await webgpuDevice.handle.queue.onSubmittedWorkDone();
expect(errors).toEqual([]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Validation errors escape coverage

The test waits for queue completion and checks Deck's onError collection, but it does not use a WebGPU validation error scope. A binding or pipeline validation regression can therefore remain unobserved, weakening coverage of the exact draw failure this test is intended to prevent.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 731d149f85

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +107 to +108
await webgpuDevice.handle.queue.onSubmittedWorkDone();
expect(errors).toEqual([]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the WebGPU validation error scope

Awaiting queue.onSubmittedWorkDone() only waits for submitted work; it does not route asynchronous WebGPU validation failures into Deck's onError, so errors can remain empty even when the draw produces the bind-group validation error this test is intended to detect. The previous test used pushErrorScope('validation')/popErrorScope(), and the new end-to-end test has the same omission; wrap each Deck construction/draw and assert that the popped validation error is null.

Useful? React with 👍 / 👎.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 82.231% (-0.02%) from 82.25% — codex/tile3d-webgpu-investigation into master

@ibgreen
ibgreen merged commit d2a3819 into master Aug 27, 2026
7 checks passed
@ibgreen
ibgreen deleted the codex/tile3d-webgpu-investigation branch August 27, 2026 22: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.

3 participants