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

visgl / luma.gl / 17192022436

24 Aug 2025 06:02PM UTC coverage: 62.079% (-13.2%) from 75.234%
17192022436

Pull #2437

github

web-flow
Merge 562c391b0 into 8314ecefa
Pull Request #2437: test(engine): add ShaderPassRenderer test

956 of 1559 branches covered (61.32%)

Branch coverage included in aggregate %.

491 of 666 new or added lines in 7 files covered. (73.72%)

5291 existing lines in 117 files now uncovered.

23238 of 37414 relevant lines covered (62.11%)

3.53 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