diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index a70dc947a..b9fcd151f 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -1065,6 +1065,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -15092,6 +15097,38 @@ declare var FragmentDirective: { new(): FragmentDirective; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -44259,6 +44296,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 36c786179..8e7fa9238 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -531,6 +531,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -4531,6 +4536,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -13368,6 +13405,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index b8b457f9b..790aeda23 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -475,6 +475,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -4214,6 +4219,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -13053,6 +13090,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 9e783359e..c99a1c61a 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -1062,6 +1062,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -15078,6 +15083,38 @@ declare var FragmentDirective: { new(): FragmentDirective; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -44233,6 +44270,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index 5074ec31d..696f313cf 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -528,6 +528,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -4528,6 +4533,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -13365,6 +13402,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index f9e328e46..103d1ce19 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -472,6 +472,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -4211,6 +4216,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -13050,6 +13087,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index 732ed90f1..a9847a75e 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -619,6 +619,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -5231,6 +5236,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -15052,6 +15089,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index ebf538b0c..fa3c399f4 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -1062,6 +1062,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -15089,6 +15094,38 @@ declare var FragmentDirective: { new(): FragmentDirective; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -44256,6 +44293,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index 5074ec31d..696f313cf 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -528,6 +528,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -4528,6 +4533,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -13365,6 +13402,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index f9e328e46..103d1ce19 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -472,6 +472,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -4211,6 +4216,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -13050,6 +13087,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index 732ed90f1..a9847a75e 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -619,6 +619,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -5231,6 +5236,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -15052,6 +15089,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 4a83d8120..703ee857d 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -1062,6 +1062,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -15089,6 +15094,38 @@ declare var FragmentDirective: { new(): FragmentDirective; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -44256,6 +44293,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.9/serviceworker.generated.d.ts b/baselines/ts5.9/serviceworker.generated.d.ts index 3c52e7a99..01b758eba 100644 --- a/baselines/ts5.9/serviceworker.generated.d.ts +++ b/baselines/ts5.9/serviceworker.generated.d.ts @@ -528,6 +528,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -4528,6 +4533,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -13365,6 +13402,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.9/sharedworker.generated.d.ts b/baselines/ts5.9/sharedworker.generated.d.ts index 7ffc1efc4..af0f54b24 100644 --- a/baselines/ts5.9/sharedworker.generated.d.ts +++ b/baselines/ts5.9/sharedworker.generated.d.ts @@ -472,6 +472,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -4211,6 +4216,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -13050,6 +13087,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/ts5.9/webworker.generated.d.ts b/baselines/ts5.9/webworker.generated.d.ts index 051a7f123..8c1b99157 100644 --- a/baselines/ts5.9/webworker.generated.d.ts +++ b/baselines/ts5.9/webworker.generated.d.ts @@ -619,6 +619,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -5231,6 +5236,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -15052,6 +15089,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index ea365d62b..55abce5d1 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -622,6 +622,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { vertex: GPUVertexState; } +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + interface GPUSamplerBindingLayout { type?: GPUSamplerBindingType; } @@ -5234,6 +5239,38 @@ declare var FormData: { new(): FormData; }; +/** + * The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** + * The **`wgslLanguageFeatures`** read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) + */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** + * The **`getPreferredCanvasFormat()`** method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) + */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** + * The **`requestAdapter()`** method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) + */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + /** * The **`GPUAdapter`** interface of the WebGPU API represents a GPU adapter. From this you can request a GPUDevice, adapter info, features, and limits. * Available only in secure contexts. @@ -15055,6 +15092,7 @@ type GPUIndexFormat = "uint16" | "uint32"; type GPULoadOp = "clear" | "load"; type GPUMipmapFilterMode = "linear" | "nearest"; type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; type GPUQueryType = "occlusion" | "timestamp"; type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 52ad33b7d..28b146460 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -2871,9 +2871,6 @@ // TODO: The following only exists to accept bcd@6.0.24 progressively, // and should be removed. - "GPU": { - "exposed": "" - }, "TrustedHTML": { "exposed": "" }, diff --git a/inputfiles/patches/webgpu.kdl b/inputfiles/patches/webgpu.kdl index 9394976ee..46116711c 100644 --- a/inputfiles/patches/webgpu.kdl +++ b/inputfiles/patches/webgpu.kdl @@ -12,7 +12,8 @@ removals { } dictionary GPURequestAdapterOptions { - member featureLevel // Blink experimental only as of 2024-11 + member featureLevel // Gecko only, Blink experimental only as of 2026-02 + member xrCompatible // WebKit only, Blink experimental only as of 2026-02 } dictionary GPUShaderModuleDescriptor {