Skip to content
Merged

Add GPU #2423

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
vertex: GPUVertexState;
}

interface GPURequestAdapterOptions {
forceFallbackAdapter?: boolean;
powerPreference?: GPUPowerPreference;
}

interface GPUSamplerBindingLayout {
type?: GPUSamplerBindingType;
}
Expand Down Expand Up @@ -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<GPUAdapter | null>;
}

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.
Expand Down Expand Up @@ -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";
Expand Down
38 changes: 38 additions & 0 deletions baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
vertex: GPUVertexState;
}

interface GPURequestAdapterOptions {
forceFallbackAdapter?: boolean;
powerPreference?: GPUPowerPreference;
}

interface GPUSamplerBindingLayout {
type?: GPUSamplerBindingType;
}
Expand Down Expand Up @@ -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<GPUAdapter | null>;
}

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.
Expand Down Expand Up @@ -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";
Expand Down
38 changes: 38 additions & 0 deletions baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
vertex: GPUVertexState;
}

interface GPURequestAdapterOptions {
forceFallbackAdapter?: boolean;
powerPreference?: GPUPowerPreference;
}

interface GPUSamplerBindingLayout {
type?: GPUSamplerBindingType;
}
Expand Down Expand Up @@ -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<GPUAdapter | null>;
}

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.
Expand Down Expand Up @@ -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";
Expand Down
38 changes: 38 additions & 0 deletions baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
vertex: GPUVertexState;
}

interface GPURequestAdapterOptions {
forceFallbackAdapter?: boolean;
powerPreference?: GPUPowerPreference;
}

interface GPUSamplerBindingLayout {
type?: GPUSamplerBindingType;
}
Expand Down Expand Up @@ -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<GPUAdapter | null>;
}

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.
Expand Down Expand Up @@ -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";
Expand Down
38 changes: 38 additions & 0 deletions baselines/ts5.5/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
vertex: GPUVertexState;
}

interface GPURequestAdapterOptions {
forceFallbackAdapter?: boolean;
powerPreference?: GPUPowerPreference;
}

interface GPUSamplerBindingLayout {
type?: GPUSamplerBindingType;
}
Expand Down Expand Up @@ -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<GPUAdapter | null>;
}

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.
Expand Down Expand Up @@ -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";
Expand Down
38 changes: 38 additions & 0 deletions baselines/ts5.5/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,11 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
vertex: GPUVertexState;
}

interface GPURequestAdapterOptions {
forceFallbackAdapter?: boolean;
powerPreference?: GPUPowerPreference;
}

interface GPUSamplerBindingLayout {
type?: GPUSamplerBindingType;
}
Expand Down Expand Up @@ -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<GPUAdapter | null>;
}

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.
Expand Down Expand Up @@ -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";
Expand Down
Loading