@luma.gl/webgpu 9.0.0-alpha.50 → 9.0.0-alpha.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luma.gl/webgpu",
3
- "version": "9.0.0-alpha.50",
3
+ "version": "9.0.0-alpha.52",
4
4
  "description": "WebGPU adapter for the luma.gl API",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,9 +37,9 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@babel/runtime": "^7.0.0",
40
- "@luma.gl/core": "9.0.0-alpha.50",
40
+ "@luma.gl/core": "9.0.0-alpha.52",
41
41
  "@probe.gl/env": "^4.0.2",
42
42
  "@webgpu/types": "^0.1.34"
43
43
  },
44
- "gitHead": "83899806fcfab67f97cc8b308f81e4844a05ca05"
44
+ "gitHead": "41fa29f78dc260e5ef4c6a48e657fb5d23c96e8f"
45
45
  }
@@ -31,7 +31,7 @@ export class WebGPUShader extends Shader {
31
31
  async _checkCompilationError(errorScope: Promise<GPUError | null>): Promise<void> {
32
32
  const error = await errorScope as GPUValidationError;
33
33
  if (error) {
34
- const shaderLog = await this.compilationInfo();
34
+ const shaderLog = await this.getCompilationInfo();
35
35
  log.error(`Shader compilation error: ${error.message}`, shaderLog)();
36
36
  // Note: Even though this error is asynchronous and thrown after the constructor completes,
37
37
  // it will result in a useful stack trace leading back to the constructor
@@ -40,9 +40,18 @@ export class WebGPUShader extends Shader {
40
40
  }
41
41
 
42
42
  override destroy(): void {
43
+ // Note: WebGPU does not offer a method to destroy shaders
43
44
  // this.handle.destroy();
44
45
  }
45
46
 
47
+ /** Returns compilation info for this shader */
48
+ async getCompilationInfo(): Promise<readonly CompilerMessage[]> {
49
+ const compilationInfo = await this.handle.getCompilationInfo();
50
+ return compilationInfo.messages;
51
+ }
52
+
53
+ // PRIVATE METHODS
54
+
46
55
  protected createHandle(): GPUShaderModule {
47
56
  const {source, stage} = this.props;
48
57
 
@@ -66,10 +75,4 @@ export class WebGPUShader extends Shader {
66
75
  throw new Error(language);
67
76
  }
68
77
  }
69
-
70
- /** Returns compilation info for this shader */
71
- async compilationInfo(): Promise<readonly CompilerMessage[]> {
72
- const compilationInfo = await this.handle.getCompilationInfo();
73
- return compilationInfo.messages;
74
- }
75
78
  }