Skip to content

Commit aed67a4

Browse files
committed
fix(webgpu): correctly expose GPUCompilationInfo & GPUCompilationMessage
1 parent ded2647 commit aed67a4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

cli/tsc/dts/lib.deno_webgpu.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,15 +747,17 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
747747
type GPUCompilationMessageType = "error" | "warning" | "info";
748748

749749
/** @category GPU */
750-
interface GPUCompilationMessage {
750+
declare class GPUCompilationMessage {
751751
readonly message: string;
752752
readonly type: GPUCompilationMessageType;
753753
readonly lineNum: number;
754754
readonly linePos: number;
755+
readonly offset: number;
756+
readonly length: number;
755757
}
756758

757759
/** @category GPU */
758-
interface GPUCompilationInfo {
760+
declare class GPUCompilationInfo {
759761
readonly messages: ReadonlyArray<GPUCompilationMessage>;
760762
}
761763

runtime/js/98_global_scope_shared.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ const windowOrWorkerGlobalScope = {
190190
(webgpu) => webgpu.GPUCommandEncoder,
191191
loadWebGPU,
192192
),
193+
GPUCompilationInfo: core.propNonEnumerableLazyLoaded(
194+
(webgpu) => webgpu.GPUCompilationInfo,
195+
loadWebGPU,
196+
),
197+
GPUCompilationMessage: core.propNonEnumerableLazyLoaded(
198+
(webgpu) => webgpu.GPUCompilationMessage,
199+
loadWebGPU,
200+
),
193201
GPUComputePassEncoder: core.propNonEnumerableLazyLoaded(
194202
(webgpu) => webgpu.GPUComputePassEncoder,
195203
loadWebGPU,

0 commit comments

Comments
 (0)