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

visgl / luma.gl / 23384903092

21 Mar 2026 05:30PM UTC coverage: 72.417% (+9.3%) from 63.136%
23384903092

push

github

web-flow
feat(devtool); Enable LLMs to automatically test website, package for devtools upstream (#2557)

4103 of 6350 branches covered (64.61%)

Branch coverage included in aggregate %.

215 of 271 new or added lines in 13 files covered. (79.34%)

45 existing lines in 6 files now uncovered.

9124 of 11915 relevant lines covered (76.58%)

277.34 hits per line

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

62.5
/modules/webgl/src/adapter/resources/webgl-command-encoder.ts
1
// luma.gl
2
// SPDX-License-Identifier: MIT
3
// Copyright (c) vis.gl contributors
4

5
import {CommandBufferProps, CommandEncoder, CommandEncoderProps} from '@luma.gl/core';
6
import type {
7
  RenderPassProps,
8
  ComputePass,
9
  ComputePassProps,
10
  QuerySet,
11
  Buffer,
12
  CopyBufferToBufferOptions,
13
  CopyBufferToTextureOptions,
14
  CopyTextureToBufferOptions,
15
  CopyTextureToTextureOptions
16
  // ClearTextureOptions,
17
  // TextureReadOptions,
18
} from '@luma.gl/core';
19

20
import {WEBGLCommandBuffer} from './webgl-command-buffer';
21
import {WEBGLRenderPass} from './webgl-render-pass';
22
import {WebGLDevice} from '../webgl-device';
23
import {WEBGLQuerySet} from './webgl-query-set';
24

25
export class WEBGLCommandEncoder extends CommandEncoder {
26
  readonly device: WebGLDevice;
27
  readonly handle = null;
165✔
28

29
  readonly commandBuffer: WEBGLCommandBuffer;
30

31
  constructor(device: WebGLDevice, props: CommandEncoderProps) {
32
    super(device, props);
165✔
33
    this.device = device;
165✔
34
    this.commandBuffer = new WEBGLCommandBuffer(device, {
165✔
35
      id: `${this.props.id}-command-buffer`
36
    });
37
  }
38

39
  override destroy(): void {
40
    this.destroyResource();
109✔
41
  }
42

43
  override finish(props?: CommandBufferProps): WEBGLCommandBuffer {
44
    if (props?.id && this.commandBuffer.id !== props.id) {
53!
45
      this.commandBuffer.id = props.id;
×
46
      this.commandBuffer.props.id = props.id;
×
47
    }
48
    this.destroy();
53✔
49
    return this.commandBuffer;
53✔
50
  }
51

52
  beginRenderPass(props: RenderPassProps = {}): WEBGLRenderPass {
52✔
53
    return new WEBGLRenderPass(this.device, this._applyTimeProfilingToPassProps(props));
52✔
54
  }
55

56
  beginComputePass(props: ComputePassProps = {}): ComputePass {
×
57
    throw new Error('ComputePass not supported in WebGL');
×
58
  }
59

60
  copyBufferToBuffer(options: CopyBufferToBufferOptions): void {
UNCOV
61
    this.commandBuffer.commands.push({name: 'copy-buffer-to-buffer', options});
×
62
  }
63

64
  copyBufferToTexture(options: CopyBufferToTextureOptions) {
65
    this.commandBuffer.commands.push({name: 'copy-buffer-to-texture', options});
×
66
  }
67

68
  copyTextureToBuffer(options: CopyTextureToBufferOptions): void {
69
    this.commandBuffer.commands.push({name: 'copy-texture-to-buffer', options});
3✔
70
  }
71

72
  copyTextureToTexture(options: CopyTextureToTextureOptions): void {
UNCOV
73
    this.commandBuffer.commands.push({name: 'copy-texture-to-texture', options});
×
74
  }
75

76
  // clearTexture(options: ClearTextureOptions): void {
77
  //   this.commandBuffer.commands.push({name: 'copy-texture-to-texture', options});
78
  // }
79

80
  override pushDebugGroup(groupLabel: string): void {}
81
  override popDebugGroup() {}
82

83
  override insertDebugMarker(markerLabel: string): void {}
84

85
  override resolveQuerySet(
86
    querySet: QuerySet,
87
    destination: Buffer,
88
    options?: {
89
      firstQuery?: number;
90
      queryCount?: number;
91
      destinationOffset?: number;
92
    }
93
  ): void {}
94

95
  writeTimestamp(querySet: QuerySet, queryIndex: number): void {
96
    const webglQuerySet = querySet as WEBGLQuerySet;
6✔
97
    webglQuerySet.writeTimestamp(queryIndex);
6✔
98
  }
99
}
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