Skip to content

feat(geo-layers): support MVTLayer on WebGPU - #10601

Merged
ibgreen merged 3 commits into
masterfrom
codex/mvt-layer-webgpu
Aug 28, 2026
Merged

ibgreen merged 3 commits into
masterfrom
codex/mvt-layer-webgpu

Conversation

@ibgreen

@ibgreen ibgreen commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

Goal

Enable the built-in MVTLayer rendering path on WebGPU, including the default binary tile format, binary: false, tile clipping, highlighting, and polygon holes.

This builds on the investigation in #10564 and #10565 from a fresh branch on current master, while addressing the PathLayer review feedback by keeping binary geometry decoding inside PathTesselator.

Changes

  • Add a private WGSL clip module directly to ScatterplotLayer, PathLayer, and SolidPolygonLayer; ClipExtension only supplies its uniforms on WebGPU, while the WebGL GLSL path remains unchanged.
  • Keep this support targeted to MVT's primitive rendering stack without adding general WGSL hooks, shader-plugin merging, or new extension machinery.
  • Keep binary points within WebGPU's portable vertex-buffer limit by grouping ScatterplotLayer instance attributes.
  • Materialize binary path geometry through PathTesselator for WebGPU and rename the packed parent attribute so clipping correctly treats paths as geometry rather than anchored instances.
  • Preserve uniform derivative control flow in antialiased paths and include billboard offsets in geometry clipping coordinates.
  • Add focused WebGPU validation for binary GeoJSON and clipping, enable the MVT WebGPU render suite, and document the supported default rendering path.
  • Add a WebGPU-specific MVT golden image under platform-overrides/webgpu; the standard 0.99 comparison threshold is unchanged.

Validation

  • npx vitest run --project headless test/modules/extensions/clip.spec.ts test/modules/layers/geojson-layer-webgpu.spec.ts --maxWorkers=1 --fileParallelism=false --testTimeout=60000 — 3 passed
  • npx vitest run --project headless test/modules/geo-layers/mvt-layer.spec.ts — 13 passed
  • Primitive-layer headless regression suites — 6 passed
  • RENDER_TEST_DEVICE=webgpu npx vitest run --project render test/render/test-cases/mvt-layer.spec.ts — 6 passed, 1 backend group skipped
  • RENDER_TEST_DEVICE=webgl npx vitest run --project render test/render/test-cases/mvt-layer.spec.ts — 6 passed, 1 backend group skipped
  • yarn lint — passed
  • yarn build — passed
  • npx tspc --noEmit --project modules/layers/tsconfig.json — passed after moving the clip module private to @deck.gl/layers
  • yarn test-website — passed with existing source-map and Docusaurus SSG warnings
  • Commit hook — 15 tests passed

@greptile-apps

greptile-apps Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR enables the default MVT rendering path on WebGPU while retaining the existing WebGL implementation.

  • Adds a private WGSL clipping module to the point, path, and polygon primitives used by MVTLayer.
  • Materializes binary path geometry for WebGPU and reorganizes ScatterplotLayer instance attributes for portable buffer limits.
  • Enables focused WebGPU validation and render coverage, including polygon holes and tile clipping.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
modules/layers/src/path-layer/path-layer.wgsl.ts Places geometry clipping after analytic derivative calculations and reserves a separate varying location for TripsLayer injection.
modules/layers/src/utils/clip-extension.ts Introduces the private WGSL module implementing instance and geometry clipping for supported primitive layers.
modules/extensions/src/clip/clip-extension.ts Supplies clipping uniforms on WebGPU while preserving the existing GLSL shader-module path on WebGL.
modules/layers/src/path-layer/path-tesselator.ts Materializes packed binary path geometry when running on WebGPU.
modules/layers/src/scatterplot-layer/scatterplot-layer.ts Adds WebGPU clipping support and groups portable instance attributes into a shared buffer.
modules/layers/src/solid-polygon-layer/solid-polygon-layer.wgsl.ts Applies instance or interpolated geometry clipping to WebGPU polygon top and side pipelines.
test/render/test-cases/mvt-layer.spec.ts Enables the existing MVT render cases on both WebGL and WebGPU.

Reviews (3): Last reviewed commit: "fix(layers): preserve TripsLayer WGSL in..." | Re-trigger Greptile

@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: 80cc2f197b

ℹ️ 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".

@coveralls

coveralls commented Aug 27, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.166% (-0.08%) from 82.25% — codex/mvt-layer-webgpu into master

Comment thread modules/core/src/shaderlib/index.ts Resolved

@ibgreen ibgreen left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

commented

@ibgreen
ibgreen merged commit 7e2741b into master Aug 28, 2026
7 checks passed
@ibgreen
ibgreen deleted the codex/mvt-layer-webgpu branch August 28, 2026 10:36
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