@@ -759,20 +759,32 @@ interface GPUCompilationInfo {
759759 readonly messages : ReadonlyArray < GPUCompilationMessage > ;
760760}
761761
762- /** @category GPU */
763- declare class GPUPipelineError extends DOMException {
764- constructor ( message ?: string , options ?: GPUPipelineErrorInit ) ;
765-
766- readonly reason : GPUPipelineErrorReason ;
762+ /**
763+ * The **`GPUPipelineError`** interface of the WebGPU API describes a pipeline failure.
764+ * Available only in secure contexts.
765+ *
766+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError)
767+ * @category GPU
768+ */
769+ interface GPUPipelineError extends DOMException {
770+ /**
771+ * The **`reason`** read-only property of the GPUPipelineError interface defines the reason the pipeline creation failed in a machine-readable way.
772+ *
773+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason)
774+ */
775+ readonly reason : "validation" | "internal" ;
767776}
768777
769778/** @category GPU */
770- interface GPUPipelineErrorInit {
771- reason : GPUPipelineErrorReason ;
772- }
779+ declare var GPUPipelineError : {
780+ prototype : GPUPipelineError ;
781+ new ( message : string , options : GPUPipelineErrorInit ) : GPUPipelineError ;
782+ } ;
773783
774784/** @category GPU */
775- type GPUPipelineErrorReason = "validation" | "internal" ;
785+ interface GPUPipelineErrorInit {
786+ reason : "validation" | "internal" ;
787+ }
776788
777789/**
778790 * Represents a compiled shader module that can be used to create graphics or compute pipelines.
@@ -1584,25 +1596,55 @@ interface GPUDeviceLostInfo {
15841596 readonly message : string ;
15851597}
15861598
1587- /** @category GPU */
1588- declare class GPUError {
1599+ /**
1600+ * The **`GPUError`** interface of the WebGPU API is the base interface for errors surfaced by GPUDevice.popErrorScope and the GPUDevice.uncapturederror_event event.
1601+ * Available only in secure contexts.
1602+ *
1603+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError)
1604+ * @category GPU
1605+ */
1606+ interface GPUError {
1607+ /**
1608+ * The **`message`** read-only property of the A string.
1609+ * The **`message`** read-only property of the GPUError interface provides a human-readable message that explains why the error occurred.
1610+ *
1611+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message)
1612+ */
15891613 readonly message : string ;
15901614}
15911615
15921616/** @category GPU */
1593- declare class GPUOutOfMemoryError extends GPUError {
1594- constructor ( message : string ) ;
1595- }
1617+ declare var GPUError : {
1618+ prototype : GPUError ;
1619+ new ( ) : GPUError ;
1620+ } ;
15961621
15971622/** @category GPU */
1598- declare class GPUValidationError extends GPUError {
1599- constructor ( message : string ) ;
1600- }
1623+ interface GPUOutOfMemoryError extends GPUError { }
16011624
16021625/** @category GPU */
1603- declare class GPUInternalError extends GPUError {
1604- constructor ( message : string ) ;
1605- }
1626+ declare var GPUOutOfMemoryError : {
1627+ prototype : GPUOutOfMemoryError ;
1628+ new ( message ?: string ) : GPUOutOfMemoryError ;
1629+ } ;
1630+
1631+ /** @category GPU */
1632+ interface GPUValidationError extends GPUError { }
1633+
1634+ /** @category GPU */
1635+ declare var GPUValidationError : {
1636+ prototype : GPUValidationError ;
1637+ new ( message ?: string ) : GPUValidationError ;
1638+ } ;
1639+
1640+ /** @category GPU */
1641+ interface GPUInternalError extends GPUError { }
1642+
1643+ /** @category GPU */
1644+ declare var GPUInternalError : {
1645+ prototype : GPUInternalError ;
1646+ new ( message ?: string ) : GPUInternalError ;
1647+ } ;
16061648
16071649/** @category GPU */
16081650type GPUErrorFilter = "out-of-memory" | "validation" | "internal" ;
0 commit comments