Repository navigation
refactor: remove WebGL constant imports and direct runtime GL calls - #11276
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
❌ 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 d2cae3f. Configure here.
| const device: Device = deck.device; | ||
| device.withParametersWebGL({}, () => { | ||
| const arrayBuffer = device.getParametersWebGL(gl.ARRAY_BUFFER_BINDING); | ||
| device.withParametersWebGL({[gl.ARRAY_BUFFER_BINDING]: arrayBuffer}, () => { |
There was a problem hiding this comment.
Google Maps array buffer not restored
High Severity
The interleaved overlay no longer rebinds Google's ARRAY_BUFFER after Deck renders. withParametersWebGL does not track ARRAY_BUFFER_BINDING, so the previous explicit restore is dropped and Google Maps keeps Deck's last buffer bound.
Reviewed by Cursor Bugbot for commit d2cae3f. Configure here.
| }; | ||
|
|
||
| const textureToScreenPass = device.beginRenderPass({ | ||
| framebuffer: screenFboAdapter as any, |
There was a problem hiding this comment.
ArcGIS overlay restores wrong framebuffer
High Severity
After compositing onto the map, withParametersWebGL restores the offscreen Deck framebuffer that deck.redraw left bound, instead of leaving ArcGIS's screen framebuffer bound. The previous path rebound the captured screen FBO and reset per-FBO drawBuffers.
Reviewed by Cursor Bugbot for commit d2cae3f. Configure here.
| ); | ||
| if (declaration && !getAttributeShaderTypeInfo(declaration.type).integer) { | ||
| attributes = {...attributes, [name]: new Float32Array(value)}; | ||
| } |
There was a problem hiding this comment.
Integer constants skip float conversion
Medium Severity
Integer-backed constant attributes convert to floats only when pipeline already exists. setConstantAttributes often runs before the first draw, so a missing pipeline leaves Int32Array/Uint32Array values on float shader inputs.
Reviewed by Cursor Bugbot for commit d2cae3f. Configure here.
chrisgervang
left a comment
There was a problem hiding this comment.
Reviewed d2cae3f after merge; follow-ups below.
No P1s.
Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.
Generated by Claude Code
| `@luma.gl/core/webgpu`. WebGL debugging tools move to | ||
| `@luma.gl/core/webgl-debug`. Use string-valued GPU parameters in deck.gl. |
There was a problem hiding this comment.
P2: The v10 note no longer says where GL moved. luma.gl v10 drops @luma.gl/constants and ships @luma.gl/core/webgl-constants, so GL imports break with no pointer here.
- luma.gl v10.0.0-beta.2 exports
./webgl-constants, and its upgrade guide maps the old path to it.
Could we keep the move next to the string-parameter advice?
| `@luma.gl/core/webgpu`. WebGL debugging tools move to | |
| `@luma.gl/core/webgl-debug`. Use string-valued GPU parameters in deck.gl. | |
| `@luma.gl/core/webgpu`. WebGL constants and debugging tools move to | |
| `@luma.gl/core/webgl-constants` and `@luma.gl/core/webgl-debug`. Prefer string-valued GPU parameters in deck.gl. |
Generated by Claude Code


Background
Deck.gl runtime still imports WebGL enums and makes native calls in map adapters. luma.gl exposes device operations and shader metadata for these paths.
Change List
Lint, package type checks, website build, and focused Chromium tests passed. The grid test that failed in the commit hook passed on rerun. The broader browser run reported Heatmap failures.
Note
Low Risk
Refactors WebGL constant imports and context state management to use luma device APIs and context references without changing functional rendering behavior.
Overview
Removes remaining dependencies on
@luma.gl/core/webgl-constantsand legacy WebGL constant imports across core modules, examples, and test suites. Where constants are still required, code now references properties directly on the active WebGL context (gl.*), standardBufferusage flags, or portable string parameters such ascullModeandfeedbackBufferMode.Updates runtime map integration in the ArcGIS and Google Maps overlays to manage rendering parameters through
luma.gldevice APIs (withDeviceParametersandwithParametersWebGL) instead of raw GL state calls. Additionally,GPUVectorModelnow determines constant attribute conversions using public pipeline shader layout metadata viagetAttributeShaderTypeInfo.Reviewed by Cursor Bugbot for commit d2cae3f. Bugbot is set up for automated code reviews on this repo. Configure here.