Skip to content

Commit a49dcf8

Browse files
authored
Add GPUCompilationInfo (#2374)
Co-authored-by: saschanaz <[email protected]>
1 parent 35a90c9 commit a49dcf8

17 files changed

+1136
-6
lines changed

baselines/dom.generated.d.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14762,6 +14762,76 @@ declare var GPUCommandBuffer: {
1476214762
new(): GPUCommandBuffer;
1476314763
};
1476414764

14765+
/**
14766+
* The **`GPUCompilationInfo`** interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code.
14767+
* Available only in secure contexts.
14768+
*
14769+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo)
14770+
*/
14771+
interface GPUCompilationInfo {
14772+
/**
14773+
* The **`messages`** read-only property of the GPUCompilationInfo interface is an array of GPUCompilationMessage objects, each one containing the details of an individual shader compilation message. Messages can be informational, warnings, or errors.
14774+
*
14775+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages)
14776+
*/
14777+
readonly messages: ReadonlyArray<GPUCompilationMessage>;
14778+
}
14779+
14780+
declare var GPUCompilationInfo: {
14781+
prototype: GPUCompilationInfo;
14782+
new(): GPUCompilationInfo;
14783+
};
14784+
14785+
/**
14786+
* The **`GPUCompilationMessage`** interface of the WebGPU API represents a single informational, warning, or error message generated by the GPU shader module compiler.
14787+
* Available only in secure contexts.
14788+
*
14789+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage)
14790+
*/
14791+
interface GPUCompilationMessage {
14792+
/**
14793+
* The **`length`** read-only property of the GPUCompilationMessage interface is a number representing the length of the substring that the message corresponds to.
14794+
*
14795+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length)
14796+
*/
14797+
readonly length: number;
14798+
/**
14799+
* The **`lineNum`** read-only property of the GPUCompilationMessage interface is a number representing the line number in the shader code that the message corresponds to.
14800+
*
14801+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum)
14802+
*/
14803+
readonly lineNum: number;
14804+
/**
14805+
* The **`linePos`** read-only property of the GPUCompilationMessage interface is a number representing the position in the code line that the message corresponds to. This could be an exact point, or the start of the relevant substring.
14806+
*
14807+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos)
14808+
*/
14809+
readonly linePos: number;
14810+
/**
14811+
* The **`message`** read-only property of the GPUCompilationMessage interface is a string representing human-readable message text.
14812+
*
14813+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message)
14814+
*/
14815+
readonly message: string;
14816+
/**
14817+
* The **`offset`** read-only property of the GPUCompilationMessage interface is a number representing the offset from the start of the shader code to the exact point, or the start of the relevant substring, that the message corresponds to.
14818+
*
14819+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset)
14820+
*/
14821+
readonly offset: number;
14822+
/**
14823+
* The **`type`** read-only property of the GPUCompilationMessage interface is an enumerated value representing the type of the message. Each type represents a different severity level.
14824+
*
14825+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type)
14826+
*/
14827+
readonly type: GPUCompilationMessageType;
14828+
}
14829+
14830+
declare var GPUCompilationMessage: {
14831+
prototype: GPUCompilationMessage;
14832+
new(): GPUCompilationMessage;
14833+
};
14834+
1476514835
/**
1476614836
* The **`GPUComputePipeline`** interface of the WebGPU API represents a pipeline that controls the compute shader stage and can be used in a GPUComputePassEncoder.
1476714837
* Available only in secure contexts.
@@ -43015,6 +43085,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
4301543085
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
4301643086
type FontFaceSetLoadStatus = "loaded" | "loading";
4301743087
type FullscreenNavigationUI = "auto" | "hide" | "show";
43088+
type GPUCompilationMessageType = "error" | "info" | "warning";
4301843089
type GPUDeviceLostReason = "destroyed" | "unknown";
4301943090
type GPUPipelineErrorReason = "internal" | "validation";
4302043091
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";

baselines/serviceworker.generated.d.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4239,6 +4239,76 @@ declare var GPUCommandBuffer: {
42394239
new(): GPUCommandBuffer;
42404240
};
42414241

4242+
/**
4243+
* The **`GPUCompilationInfo`** interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code.
4244+
* Available only in secure contexts.
4245+
*
4246+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo)
4247+
*/
4248+
interface GPUCompilationInfo {
4249+
/**
4250+
* The **`messages`** read-only property of the GPUCompilationInfo interface is an array of GPUCompilationMessage objects, each one containing the details of an individual shader compilation message. Messages can be informational, warnings, or errors.
4251+
*
4252+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages)
4253+
*/
4254+
readonly messages: ReadonlyArray<GPUCompilationMessage>;
4255+
}
4256+
4257+
declare var GPUCompilationInfo: {
4258+
prototype: GPUCompilationInfo;
4259+
new(): GPUCompilationInfo;
4260+
};
4261+
4262+
/**
4263+
* The **`GPUCompilationMessage`** interface of the WebGPU API represents a single informational, warning, or error message generated by the GPU shader module compiler.
4264+
* Available only in secure contexts.
4265+
*
4266+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage)
4267+
*/
4268+
interface GPUCompilationMessage {
4269+
/**
4270+
* The **`length`** read-only property of the GPUCompilationMessage interface is a number representing the length of the substring that the message corresponds to.
4271+
*
4272+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length)
4273+
*/
4274+
readonly length: number;
4275+
/**
4276+
* The **`lineNum`** read-only property of the GPUCompilationMessage interface is a number representing the line number in the shader code that the message corresponds to.
4277+
*
4278+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum)
4279+
*/
4280+
readonly lineNum: number;
4281+
/**
4282+
* The **`linePos`** read-only property of the GPUCompilationMessage interface is a number representing the position in the code line that the message corresponds to. This could be an exact point, or the start of the relevant substring.
4283+
*
4284+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos)
4285+
*/
4286+
readonly linePos: number;
4287+
/**
4288+
* The **`message`** read-only property of the GPUCompilationMessage interface is a string representing human-readable message text.
4289+
*
4290+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message)
4291+
*/
4292+
readonly message: string;
4293+
/**
4294+
* The **`offset`** read-only property of the GPUCompilationMessage interface is a number representing the offset from the start of the shader code to the exact point, or the start of the relevant substring, that the message corresponds to.
4295+
*
4296+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset)
4297+
*/
4298+
readonly offset: number;
4299+
/**
4300+
* The **`type`** read-only property of the GPUCompilationMessage interface is an enumerated value representing the type of the message. Each type represents a different severity level.
4301+
*
4302+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type)
4303+
*/
4304+
readonly type: GPUCompilationMessageType;
4305+
}
4306+
4307+
declare var GPUCompilationMessage: {
4308+
prototype: GPUCompilationMessage;
4309+
new(): GPUCompilationMessage;
4310+
};
4311+
42424312
/**
42434313
* The **`GPUComputePipeline`** interface of the WebGPU API represents a pipeline that controls the compute shader stage and can be used in a GPUComputePassEncoder.
42444314
* Available only in secure contexts.
@@ -12262,6 +12332,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
1226212332
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
1226312333
type FontFaceSetLoadStatus = "loaded" | "loading";
1226412334
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
12335+
type GPUCompilationMessageType = "error" | "info" | "warning";
1226512336
type GPUDeviceLostReason = "destroyed" | "unknown";
1226612337
type GPUPipelineErrorReason = "internal" | "validation";
1226712338
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";

baselines/sharedworker.generated.d.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3922,6 +3922,76 @@ declare var GPUCommandBuffer: {
39223922
new(): GPUCommandBuffer;
39233923
};
39243924

3925+
/**
3926+
* The **`GPUCompilationInfo`** interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code.
3927+
* Available only in secure contexts.
3928+
*
3929+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo)
3930+
*/
3931+
interface GPUCompilationInfo {
3932+
/**
3933+
* The **`messages`** read-only property of the GPUCompilationInfo interface is an array of GPUCompilationMessage objects, each one containing the details of an individual shader compilation message. Messages can be informational, warnings, or errors.
3934+
*
3935+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages)
3936+
*/
3937+
readonly messages: ReadonlyArray<GPUCompilationMessage>;
3938+
}
3939+
3940+
declare var GPUCompilationInfo: {
3941+
prototype: GPUCompilationInfo;
3942+
new(): GPUCompilationInfo;
3943+
};
3944+
3945+
/**
3946+
* The **`GPUCompilationMessage`** interface of the WebGPU API represents a single informational, warning, or error message generated by the GPU shader module compiler.
3947+
* Available only in secure contexts.
3948+
*
3949+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage)
3950+
*/
3951+
interface GPUCompilationMessage {
3952+
/**
3953+
* The **`length`** read-only property of the GPUCompilationMessage interface is a number representing the length of the substring that the message corresponds to.
3954+
*
3955+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length)
3956+
*/
3957+
readonly length: number;
3958+
/**
3959+
* The **`lineNum`** read-only property of the GPUCompilationMessage interface is a number representing the line number in the shader code that the message corresponds to.
3960+
*
3961+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum)
3962+
*/
3963+
readonly lineNum: number;
3964+
/**
3965+
* The **`linePos`** read-only property of the GPUCompilationMessage interface is a number representing the position in the code line that the message corresponds to. This could be an exact point, or the start of the relevant substring.
3966+
*
3967+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos)
3968+
*/
3969+
readonly linePos: number;
3970+
/**
3971+
* The **`message`** read-only property of the GPUCompilationMessage interface is a string representing human-readable message text.
3972+
*
3973+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message)
3974+
*/
3975+
readonly message: string;
3976+
/**
3977+
* The **`offset`** read-only property of the GPUCompilationMessage interface is a number representing the offset from the start of the shader code to the exact point, or the start of the relevant substring, that the message corresponds to.
3978+
*
3979+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset)
3980+
*/
3981+
readonly offset: number;
3982+
/**
3983+
* The **`type`** read-only property of the GPUCompilationMessage interface is an enumerated value representing the type of the message. Each type represents a different severity level.
3984+
*
3985+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type)
3986+
*/
3987+
readonly type: GPUCompilationMessageType;
3988+
}
3989+
3990+
declare var GPUCompilationMessage: {
3991+
prototype: GPUCompilationMessage;
3992+
new(): GPUCompilationMessage;
3993+
};
3994+
39253995
/**
39263996
* The **`GPUComputePipeline`** interface of the WebGPU API represents a pipeline that controls the compute shader stage and can be used in a GPUComputePassEncoder.
39273997
* Available only in secure contexts.
@@ -11928,6 +11998,7 @@ type FileSystemHandleKind = "directory" | "file";
1192811998
type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
1192911999
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
1193012000
type FontFaceSetLoadStatus = "loaded" | "loading";
12001+
type GPUCompilationMessageType = "error" | "info" | "warning";
1193112002
type GPUDeviceLostReason = "destroyed" | "unknown";
1193212003
type GPUPipelineErrorReason = "internal" | "validation";
1193312004
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";

baselines/ts5.5/dom.generated.d.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14748,6 +14748,76 @@ declare var GPUCommandBuffer: {
1474814748
new(): GPUCommandBuffer;
1474914749
};
1475014750

14751+
/**
14752+
* The **`GPUCompilationInfo`** interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code.
14753+
* Available only in secure contexts.
14754+
*
14755+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo)
14756+
*/
14757+
interface GPUCompilationInfo {
14758+
/**
14759+
* The **`messages`** read-only property of the GPUCompilationInfo interface is an array of GPUCompilationMessage objects, each one containing the details of an individual shader compilation message. Messages can be informational, warnings, or errors.
14760+
*
14761+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages)
14762+
*/
14763+
readonly messages: ReadonlyArray<GPUCompilationMessage>;
14764+
}
14765+
14766+
declare var GPUCompilationInfo: {
14767+
prototype: GPUCompilationInfo;
14768+
new(): GPUCompilationInfo;
14769+
};
14770+
14771+
/**
14772+
* The **`GPUCompilationMessage`** interface of the WebGPU API represents a single informational, warning, or error message generated by the GPU shader module compiler.
14773+
* Available only in secure contexts.
14774+
*
14775+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage)
14776+
*/
14777+
interface GPUCompilationMessage {
14778+
/**
14779+
* The **`length`** read-only property of the GPUCompilationMessage interface is a number representing the length of the substring that the message corresponds to.
14780+
*
14781+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length)
14782+
*/
14783+
readonly length: number;
14784+
/**
14785+
* The **`lineNum`** read-only property of the GPUCompilationMessage interface is a number representing the line number in the shader code that the message corresponds to.
14786+
*
14787+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum)
14788+
*/
14789+
readonly lineNum: number;
14790+
/**
14791+
* The **`linePos`** read-only property of the GPUCompilationMessage interface is a number representing the position in the code line that the message corresponds to. This could be an exact point, or the start of the relevant substring.
14792+
*
14793+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos)
14794+
*/
14795+
readonly linePos: number;
14796+
/**
14797+
* The **`message`** read-only property of the GPUCompilationMessage interface is a string representing human-readable message text.
14798+
*
14799+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message)
14800+
*/
14801+
readonly message: string;
14802+
/**
14803+
* The **`offset`** read-only property of the GPUCompilationMessage interface is a number representing the offset from the start of the shader code to the exact point, or the start of the relevant substring, that the message corresponds to.
14804+
*
14805+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset)
14806+
*/
14807+
readonly offset: number;
14808+
/**
14809+
* The **`type`** read-only property of the GPUCompilationMessage interface is an enumerated value representing the type of the message. Each type represents a different severity level.
14810+
*
14811+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type)
14812+
*/
14813+
readonly type: GPUCompilationMessageType;
14814+
}
14815+
14816+
declare var GPUCompilationMessage: {
14817+
prototype: GPUCompilationMessage;
14818+
new(): GPUCompilationMessage;
14819+
};
14820+
1475114821
/**
1475214822
* The **`GPUComputePipeline`** interface of the WebGPU API represents a pipeline that controls the compute shader stage and can be used in a GPUComputePassEncoder.
1475314823
* Available only in secure contexts.
@@ -42989,6 +43059,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
4298943059
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
4299043060
type FontFaceSetLoadStatus = "loaded" | "loading";
4299143061
type FullscreenNavigationUI = "auto" | "hide" | "show";
43062+
type GPUCompilationMessageType = "error" | "info" | "warning";
4299243063
type GPUDeviceLostReason = "destroyed" | "unknown";
4299343064
type GPUPipelineErrorReason = "internal" | "validation";
4299443065
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";

0 commit comments

Comments
 (0)