Skip to content

fix(layers): remove WebGPU custom packing in SolidPolygonLayer - #10803

Merged
Pessimistress merged 2 commits into
masterfrom
x/polygon-fix
Oct 6, 2026
Merged

Pessimistress merged 2 commits into
masterfrom
x/polygon-fix

Conversation

@Pessimistress

@Pessimistress Pessimistress commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

WebGPU special code path bypasses tesselator binary attribute handling for no apparent reason.


Note

Medium Risk
Changes extruded polygon side/wireframe vertex binding on WebGPU and removes custom binary position handling; incorrect stride/offset could break rendering or ring boundaries.

Overview
SolidPolygonLayer on WebGPU now follows the same attribute path as WebGL instead of maintaining a separate packing and tessellator bypass for binary polygon data.

nextVertexPositions is always supplied via shaderAttributes with vertexOffset: 1 (same buffer, stride-based offset), so the dedicated nextVertexPositions attribute and calculateNextPositions CPU copy loop are removed. WebGPU-only widening of binary getPolygon into Float64Array in calculatePositions and the extra buffers clone passed into the tessellator are also dropped—positions again come from the tessellator like other backends.

Tests now assert float32 binary positions are preserved, that current and next position views share one buffer, and that the WebGPU buffer layout uses byte stride for the next vertex rather than a separate array.

Reviewed by Cursor Bugbot for commit 9315470. Bugbot is set up for automated code reviews on this repo. Configure here.

@Pessimistress
Pessimistress requested a review from ibgreen October 6, 2026 16:33

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 387ac6d. Configure here.

@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Simplifies WebGPU buffer handling in polygon rendering.

The PR appears safe to merge based on this review; no new actionable failure was established.

Summary

This PR removes SolidPolygonLayer’s separate WebGPU next-position attribute and uses a one-vertex-offset view of the position buffer for extruded sides and wireframes.

  • Updates the WebGPU binary-polygon test to check the shared buffer and layout offset.

Reviews (2) · Last reviewed commit: "remove nextVertexPosition packer"

@coveralls

coveralls commented Oct 6, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.861% (+0.1%) from 82.715% — x/polygon-fix into master

@Pessimistress
Pessimistress merged commit b04c8f2 into master Oct 6, 2026
8 checks passed
@Pessimistress
Pessimistress deleted the x/polygon-fix branch October 6, 2026 18:03
@chrisgervang chrisgervang mentioned this pull request Oct 7, 2026
53 of 66 tasks
@chrisgervang chrisgervang added this to the v9.4 patch releases milestone Oct 22, 2026
chrisgervang pushed a commit that referenced this pull request Oct 22, 2026
@chrisgervang

Copy link
Copy Markdown
Collaborator

Released in deck.gl 9.4.1. Thanks @Pessimistress!

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