diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 496d8bf16..1b969f173 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -14748,6 +14748,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -43000,7 +43056,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement; type HTMLOrSVGScriptElement = HTMLScriptElement | SVGScriptElement; @@ -43105,6 +43164,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 740448803..7fdf2f5ea 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -4225,6 +4225,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -12302,7 +12358,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -12352,6 +12411,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index b95dbda9c..5d16841a7 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -3908,6 +3908,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -11972,7 +12028,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -12018,6 +12077,7 @@ type FileSystemHandleKind = "directory" | "file"; type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 780cdca4d..d89a2c4ac 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -14734,6 +14734,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -42974,7 +43030,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement; type HTMLOrSVGScriptElement = HTMLScriptElement | SVGScriptElement; @@ -43079,6 +43138,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index 865ef791a..1b5082520 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -4222,6 +4222,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -12299,7 +12355,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -12349,6 +12408,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index 9c26ed9de..cc8471ea2 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -3905,6 +3905,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -11969,7 +12025,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -12015,6 +12074,7 @@ type FileSystemHandleKind = "directory" | "file"; type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index 0a76e475b..c6d5a1c90 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -4924,6 +4924,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -13976,7 +14032,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -14035,6 +14094,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 218774806..e9edf720d 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -14745,6 +14745,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -42997,7 +43053,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement; type HTMLOrSVGScriptElement = HTMLScriptElement | SVGScriptElement; @@ -43102,6 +43161,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index 865ef791a..1b5082520 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -4222,6 +4222,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -12299,7 +12355,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -12349,6 +12408,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index 9c26ed9de..cc8471ea2 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -3905,6 +3905,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -11969,7 +12025,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -12015,6 +12074,7 @@ type FileSystemHandleKind = "directory" | "file"; type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index 0a76e475b..c6d5a1c90 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -4924,6 +4924,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -13976,7 +14032,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -14035,6 +14094,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index ba9bb5f1e..29eb20940 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -14745,6 +14745,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -42997,7 +43053,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement; type HTMLOrSVGScriptElement = HTMLScriptElement | SVGScriptElement; @@ -43102,6 +43161,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.9/serviceworker.generated.d.ts b/baselines/ts5.9/serviceworker.generated.d.ts index c02b95c3c..448239883 100644 --- a/baselines/ts5.9/serviceworker.generated.d.ts +++ b/baselines/ts5.9/serviceworker.generated.d.ts @@ -4222,6 +4222,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -12299,7 +12355,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -12349,6 +12408,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.9/sharedworker.generated.d.ts b/baselines/ts5.9/sharedworker.generated.d.ts index b09850346..b4ea5754e 100644 --- a/baselines/ts5.9/sharedworker.generated.d.ts +++ b/baselines/ts5.9/sharedworker.generated.d.ts @@ -3905,6 +3905,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -11969,7 +12025,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -12015,6 +12074,7 @@ type FileSystemHandleKind = "directory" | "file"; type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/ts5.9/webworker.generated.d.ts b/baselines/ts5.9/webworker.generated.d.ts index 168c42e64..62f7eb160 100644 --- a/baselines/ts5.9/webworker.generated.d.ts +++ b/baselines/ts5.9/webworker.generated.d.ts @@ -4924,6 +4924,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -13976,7 +14032,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -14035,6 +14094,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 4ecbb4543..2f007cacd 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -4927,6 +4927,62 @@ declare var GPUBindGroupLayout: { new(): GPUBindGroupLayout; }; +/** + * The **`GPUBuffer`** interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** + * The **`mapState`** read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) + */ + readonly mapState: GPUBufferMapState; + /** + * The **`size`** read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) + */ + readonly size: GPUSize64Out; + /** + * The **`usage`** read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) + */ + readonly usage: GPUFlagsConstant; + /** + * The **`destroy()`** method of the GPUBuffer interface destroys the GPUBuffer. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) + */ + destroy(): void; + /** + * The **`getMappedRange()`** method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) + */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** + * The **`mapAsync()`** method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) + */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** + * The **`unmap()`** method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer). + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) + */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + /** * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. * Available only in secure contexts. @@ -13979,7 +14035,10 @@ type GLuint64 = number; type GPUFlagsConstant = number; type GPUIntegerCoordinate = number; type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; @@ -14038,6 +14097,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCompilationMessageType = "error" | "info" | "warning"; type GPUDeviceLostReason = "destroyed" | "unknown"; type GPUPipelineErrorReason = "internal" | "validation"; diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 1aad7b2c0..8b9d4bfef 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -2880,9 +2880,6 @@ "GPUAdapterInfo": { "exposed": "" }, - "GPUBuffer": { - "exposed": "" - }, "GPUCanvasContext": { "exposed": "" },