• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

keplergl / kepler.gl / 23948930176

03 Apr 2026 02:04PM UTC coverage: 60.018% (-1.7%) from 61.699%
23948930176

Pull #3271

github

web-flow
Merge 194def22d into bc59e880b
Pull Request #3271: chore: deck.gl 9.2 upgrade & loaders.gl, luma.gl upgrades

6517 of 12945 branches covered (50.34%)

Branch coverage included in aggregate %.

310 of 960 new or added lines in 57 files covered. (32.29%)

122 existing lines in 17 files now uncovered.

13299 of 20072 relevant lines covered (66.26%)

78.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.06
/src/deckgl-layers/src/raster/pipeline-validation-patch.ts
1
// SPDX-License-Identifier: MIT
2
// Copyright contributors to the kepler.gl project
3

4
/**
5
 * Patch luma.gl 9's WEBGLRenderPipeline to tolerate mixed-sampler-type
6
 * validation errors in _getLinkStatus().
7
 *
8
 * WebGL2's validateProgram checks that sampler uniforms of different types
9
 * (sampler2D, usampler2D, isampler2D) are not assigned to the same texture
10
 * unit. Before any draw call the default texture unit for all samplers is 0,
11
 * so programs that mix sampler types (e.g. raster band data as usampler2D +
12
 * colormap as sampler2D) always fail validation even though the program linked
13
 * successfully and will work correctly once texture units are assigned at draw
14
 * time.
15
 *
16
 * luma.gl calls validateProgram inside _getLinkStatus() immediately after
17
 * linkProgram, before any texture units can be assigned. This patch keeps the
18
 * full validateProgram call but ignores only the known false-positive about
19
 * mixed sampler types. All other validation errors are still reported.
20
 */
21

22
// @ts-ignore WEBGLRenderPipeline resolution depends on moduleResolution setting
23
import {WEBGLRenderPipeline} from '@luma.gl/webgl';
24

25
const MIXED_SAMPLER_RE = /different type[s]? use the same sampler location/i;
13✔
26

27
let _patched = false;
13✔
28

29
export function patchPipelineValidation(): void {
NEW
30
  if (_patched) return;
×
NEW
31
  _patched = true;
×
32

NEW
33
  if (!WEBGLRenderPipeline?.prototype?._getLinkStatus) {
×
NEW
34
    return;
×
35
  }
36

NEW
37
  WEBGLRenderPipeline.prototype._getLinkStatus = function (
×
38
    this: WEBGLRenderPipeline & {linkStatus: string}
39
  ) {
NEW
40
    const {gl} = this.device;
×
NEW
41
    const linked = gl.getProgramParameter(this.handle, 0x8b82 /* LINK_STATUS */);
×
NEW
42
    if (!linked) {
×
NEW
43
      this.linkStatus = 'error';
×
NEW
44
      return 'link-error';
×
45
    }
46

NEW
47
    gl.validateProgram(this.handle);
×
NEW
48
    const validated = gl.getProgramParameter(this.handle, 0x8b83 /* VALIDATE_STATUS */);
×
NEW
49
    if (!validated) {
×
NEW
50
      const infoLog = gl.getProgramInfoLog(this.handle) || '';
×
NEW
51
      if (!MIXED_SAMPLER_RE.test(infoLog)) {
×
NEW
52
        this.linkStatus = 'error';
×
NEW
53
        return 'validation-error';
×
54
      }
55
    }
56

NEW
57
    this.linkStatus = 'success';
×
NEW
58
    return 'success';
×
59
  };
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc