Skip to content

fix(layers): support binary geometry on WebGPU - #10564

Draft
ibgreen-openai wants to merge 1 commit into
masterfrom
codex/webgpu-mvt-prerequisites
Draft

fix(layers): support binary geometry on WebGPU#10564
ibgreen-openai wants to merge 1 commit into
masterfrom
codex/webgpu-mvt-prerequisites

Conversation

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

Goal

Prepare ScatterplotLayer and PathLayer to render binary geometry reliably on WebGPU. These fixes are prerequisites for enabling binary MVTLayer rendering, but do not add clipping support themselves.

Changes

  • Pack ScatterplotLayer's scalar/color instance attributes into one WebGPU buffer group so binary points remain within WebGPU's vertex-buffer limit.
  • Rename PathLayer's packed WebGPU parent attribute so it is not mistaken for an anchor-position attribute.
  • Build PathLayer's WebGPU neighbor window directly from external binary getPath data, respecting XY/XYZ size, byte stride, and byte offset.
  • Add a focused WebGPU binary GeoJSON regression test covering point and path pipeline validation and non-empty packed path positions.

Validation

  • npx vitest run --project headless test/modules/layers/geojson-layer-webgpu.spec.ts — passed
  • commit hook node tests — 15 passed
  • yarn lint — passed
  • git diff --check — passed
  • yarn build — WebGL-only and WebGPU TypeScript/declaration/package compilation passed; the final unrelated lerna run build wrapper failed to construct its Nx project graph in the isolated worktree

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 82.418% (-0.08%) from 82.497% — codex/webgpu-mvt-prerequisites into master

let sourceStride = 3;
let sourceOffset = 0;

if (binaryPositions && ArrayBuffer.isView(value)) {

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.

Binary attribute is handled in the Tesselator.

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