Skip to content

feat(extensions): support ClipExtension on WebGPU - #10565

Closed
ibgreen-openai wants to merge 1 commit into
codex/webgpu-mvt-prerequisitesfrom
codex/webgpu-mvt-clipping
Closed

feat(extensions): support ClipExtension on WebGPU#10565
ibgreen-openai wants to merge 1 commit into
codex/webgpu-mvt-prerequisitesfrom
codex/webgpu-mvt-clipping

Conversation

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

Goal

Enable the clipping path that MVTLayer needs to render on WebGPU.

This is a stacked follow-up to #10564, which contains the general binary-geometry and WebGPU vertex-buffer fixes. Its base should be changed to master after that prerequisite merges.

Changes

  • add WGSL clip shader hooks to deck.gl's shader assembler
  • merge luma.gl shader plugins through mergeShaders
  • use luma.gl's uniform-only clipShaderPlugin for ClipExtension on WebGPU
  • keep the existing shader-module/injection implementation unchanged on WebGL
  • wire clip hooks into ScatterplotLayer, PathLayer, and SolidPolygonLayer, covering MVTLayer's circle, line, stroke, and fill sublayers
  • enable MVTLayer render tests on WebGPU and document the initial support scope

Validation

  • yarn lint
  • npx vitest run --project headless test/modules/core/utils/shader.spec.ts test/modules/extensions/clip.spec.ts — 3 tests 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
  • commit hook node suites — 15 tests passed
  • yarn build completed both the WebGL-only and WebGPU TypeScript/declaration/package builds; its final lerna run build phase was blocked by an unrelated Nx duplicate-project-name collision among external Codex worktrees

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 82.4%codex/webgpu-mvt-clipping into codex/webgpu-mvt-prerequisites. No base build found for codex/webgpu-mvt-prerequisites.


const SHADER_HOOKS_WGSL = [
// Not yet supported
'vs:CLIP_POSITION(position: ptr<function, vec4<f32>>, geometryCoordinates: vec2<f32>, instanceCoordinates: vec2<f32>)',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why not use the same hook names as WebGL: FILTER_POSITION / FILTER_COLOR? Does it make sense to insert hooks into every layer only for a specific extension?

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.

4 participants