Repository navigation
feat(geo-layers): support Tile3DLayer on WebGPU - #10600
Conversation
Greptile SummaryThe PR enables Tile3DLayer's I3S mesh path on WebGPU by selecting the backend-specific texture binding and expands WebGPU draw coverage and documentation.
Confidence Score: 4/5The 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
|
| 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
Reviews (1): Last reviewed commit: "feat(geo-layers): support Tile3DLayer on..." | Re-trigger Greptile
| await webgpuDevice.handle.queue.onSubmittedWorkDone(); | ||
| expect(errors).toEqual([]); |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
💡 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".
| await webgpuDevice.handle.queue.onSubmittedWorkDone(); | ||
| expect(errors).toEqual([]); |
There was a problem hiding this comment.
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 👍 / 👎.
Background
Tile3DLayeralready delegates point-cloud and glTF tile content to WebGPU-capable layers, but its I3S mesh path still supplied the WebGL-onlysamplerbinding name. Model initialization succeeded, while the first WebGPU draw failed bind-group validation becausesimpleMeshTextureand its paired sampler were missing.Change List
simpleMeshTextureon WebGPU while preserving the existingsamplerbinding on WebGL.Tile3DLayeras 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 dotRENDER_TEST_DEVICE=webgpu node_modules/.bin/ocular-test render -t "simple-mesh-layer-cartesian|scenegraph-layer-duck-pbr|pointcloud-meter" --reporter dotyarn lintyarn buildyarn test-website(passes with existing source-map, HTML-minifier, and broken-anchor warnings)