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

visgl / luma.gl / 16861002932

10 Aug 2025 11:45AM UTC coverage: 51.305% (-22.6%) from 73.868%
16861002932

Pull #2416

github

web-flow
Merge 92c90562d into f90a93cf3
Pull Request #2416: chore: Tests for texture reads

595 of 835 branches covered (71.26%)

Branch coverage included in aggregate %.

66 of 101 new or added lines in 7 files covered. (65.35%)

8541 existing lines in 129 files now uncovered.

18683 of 36740 relevant lines covered (50.85%)

11.74 hits per line

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

35.9
/modules/engine/src/debug/debug-shader-layout.ts
1
// luma.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import type {ShaderLayout} from '@luma.gl/core';
1✔
6

1✔
7
/**
1✔
8
 * Extracts a table suitable for `console.table()` from a shader layout to assist in debugging.
1✔
9
 * @param layout shader layout
1✔
10
 * @param name app should provide the most meaningful name, usually the model or pipeline name / id.
1✔
11
 * @returns
1✔
12
 */
1✔
13
export function getDebugTableForShaderLayout(
1✔
UNCOV
14
  layout: ShaderLayout,
×
UNCOV
15
  name: string
×
UNCOV
16
): Record<string, Record<string, string>> {
×
UNCOV
17
  const table: Record<string, Record<string, string>> = {};
×
UNCOV
18

×
UNCOV
19
  const header = 'Values'; // '`Shader Layout for ${name}`;
×
UNCOV
20

×
UNCOV
21
  if (layout.attributes.length === 0 && !layout.varyings?.length) {
×
22
    return {'No attributes or varyings': {[header]: 'N/A'}};
×
23
  }
×
UNCOV
24

×
UNCOV
25
  for (const attributeDeclaration of layout.attributes) {
×
UNCOV
26
    if (attributeDeclaration) {
×
UNCOV
27
      const glslDeclaration = `${attributeDeclaration.location} ${attributeDeclaration.name}: ${attributeDeclaration.type}`;
×
UNCOV
28
      table[`in ${glslDeclaration}`] = {[header]: attributeDeclaration.stepMode || 'vertex'};
×
UNCOV
29
    }
×
UNCOV
30
  }
×
UNCOV
31

×
UNCOV
32
  for (const varyingDeclaration of layout.varyings || []) {
×
33
    const glslDeclaration = `${varyingDeclaration.location} ${varyingDeclaration.name}`;
×
34
    table[`out ${glslDeclaration}`] = {[header]: JSON.stringify(varyingDeclaration)};
×
35
  }
×
UNCOV
36

×
UNCOV
37
  return table;
×
UNCOV
38
}
×
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