fix(aggregation-layers): init geometry.uv in Heatmap/ScreenGrid fragment shaders (#10300)#10448
fix(aggregation-layers): init geometry.uv in Heatmap/ScreenGrid fragment shaders (#10300)#10448sergey-sotnikov wants to merge 2 commits into
Conversation
|
Was this actually confirmed to fix the compile error on the reported Adreno device, or only inferred from the vertex-shader init pattern? We have existing render golden-image tests covering both layers (test/render/test-cases/heatmap-layer.js, test/render/test-cases/screen-grid-layer.js), including Could you please run them (or an a similar test) on your Adreno device and provide screenshots of the before and after? The big risk when accepting these device-specific changes are that they may fix this device, but may break another. The programming pattern is also not standardized across the project, so it's possible for a regression to occur and we don't have the ability to catch it. |
Closes #10300
Background
HeatmapLayer and ScreenGridLayer fail to compile their fragment shaders on Chrome/Android with Adreno GPUs ("Fragment shader is not compiled", empty info log) — see #10300. Works in Firefox (non-ANGLE) and on desktop.
Root cause:
weights-fs.glsl.tsandscreen-grid-layer-fragment.glsl.tscallDECKGL_FILTER_COLOR(color, geometry)but never initialize the globalgeometry(FragmentGeometry). Every other layer fragment setsgeometry.uv = ...before the hook call (see column-layer / solid-polygon-layer). Passing an uninitialized struct into a function is translated by ANGLE into code the Adreno driver's compiler silently rejects (chrome://gpu shows thedontInitializeUninitializedLocalsAdreno workaround active).Tested on Xiaomi Redmi Note 13 (Adreno 710), Chrome + Brave.
Change List
geometry.uv = vec2(0.);at the top ofmain()inweights-fs.glsl.tsgeometry.uv = vec2(0.);at the top ofmain()inscreen-grid-layer-fragment.glsl.ts