Skip to content

fix(extensions): omit dash uniforms for offset-only path styles - #10607

Merged
chrisgervang merged 6 commits into
masterfrom
codex/path-style-offset-uniforms
Aug 30, 2026
Merged

fix(extensions): omit dash uniforms for offset-only path styles#10607
chrisgervang merged 6 commits into
masterfrom
codex/path-style-offset-uniforms

Conversation

@chrisgervang

@chrisgervang chrisgervang commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Stack position: Prerequisite for the six PathStyle feature PRs; base master. #10609 is now in master, and this branch has synchronized it through an append-only parent merge. The historical prerequisite commit and merge remain visible in the immutable commit list, while the effective diff contains only the PathStyle uniform change and its regression test.

Goal

Avoid allocating a PathStyle dash uniform block when the extension enables path offsets but not dashing.

Changes

  • Attach pathStyle.uniformTypes only when dashing is enabled.
  • Keep the required block unchanged for dash-enabled PathLayer, ScatterplotLayer, and TextBackgroundLayer variants.
  • Verify offset-only modules omit the unused block.
  • Preserve the existing history while reconciling Fix duplicate typed-array buffer release #10609's merged prerequisite with current master.

Measured resource benefit

Measured in headless Chromium/WebGL2 with one minimal offset-only PathLayer, comparing the direct fix 02744cdb65 with its parent on the same luma.gl 9.4.0-beta.3 build:

Metric Before After Delta
Managed uniform buffers 5 4 -1
Managed uniform-buffer allocation 5,120 B 4,096 B -1,024 B
pathStyleUniforms binding Present Omitted Removed

This saves one GPU buffer object, one binding, and 1 KiB of managed UBO allocation per instantiated offset-only PathLayer model. It also removes the missing-layout warning for pathStyleUniforms. The assembled vertex and fragment shaders are byte-for-byte identical, so this PR does not claim a shader-throughput or steady-state frame-time improvement. Dash-enabled layers retain the block.

Validation

  • yarn vitest run --project headless test/modules/extensions/path.spec.ts.
  • Exact before/after resource inspection and shader-hash comparison.
  • Required GitHub test matrix, Cursor Bugbot, and Greptile are green.

@greptile-apps

greptile-apps Bot commented Aug 29, 2026

Copy link
Copy Markdown

Greptile Summary

The PR conditionally declares PathStyle dash uniform metadata only when dashing is enabled, avoiding an unused uniform block for offset-only paths.

  • Preserves the existing uniform block for dash-enabled layers.
  • Adds regression coverage for dash-enabled and offset-only shader module configurations.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
modules/extensions/src/path-style/path-style-extension.ts Gates PathStyle uniform metadata on the dash option while retaining shader injection for offset-only configurations.
test/modules/extensions/path.spec.ts Verifies dash-enabled modules retain uniform metadata and offset-only modules omit it; the previously flagged callback names are now descriptive.

Reviews (5): Last reviewed commit: "Merge remote-tracking branch 'origin/mas..." | Re-trigger Greptile

Comment thread test/modules/extensions/path.spec.ts
@coveralls

coveralls commented Aug 29, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 82.25% (+0.02%) from 82.234% — codex/path-style-offset-uniforms into master

@chrisgervang

Copy link
Copy Markdown
Collaborator Author

Stack note: this branch contains an append-only merge of prerequisite #10609. GitHub native stacks would not allow retargeting #10607 onto #10609, so both PRs remain based on master; once #10609 lands, #10607's effective diff reduces to the offset-only uniform change and its regression test. No history was rewritten or force-pushed.

@chrisgervang
chrisgervang requested a review from ibgreen August 30, 2026 17:56
@chrisgervang
chrisgervang merged commit 3ebd1cf into master Aug 30, 2026
8 checks passed
@chrisgervang
chrisgervang deleted the codex/path-style-offset-uniforms branch August 30, 2026 18:46
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.

2 participants