From 9b51b78ff88c90d630abc599687772f3e470c697 Mon Sep 17 00:00:00 2001 From: shaoboyan Date: Tue, 2 Dec 2025 11:09:35 +0800 Subject: [PATCH] Add immediates related changes in types Immediates PR: https://github.com/gpuweb/gpuweb/pull/5423 --- dist/index.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/dist/index.d.ts b/dist/index.d.ts index 96161574..7565bb16 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1098,6 +1098,11 @@ interface GPUPipelineLayoutDescriptor | null | undefined >; + + /** + * The size in bytes of the immediate data range. + */ + immediateSize?: GPUSize32; } interface GPUPrimitiveState { @@ -1924,6 +1929,21 @@ interface GPUBindingCommandsMixin { dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32 ): undefined; + /** + * Sets immediate data for subsequent render or compute commands + * @param rangeOffset - Offset in bytes into the immediate data range to begin writing at. + * @param data - Data to write into the immediate data range. + * @param dataOffset - Offset into `data` to begin writing from. Given in elements if + * `data` is a `TypedArray` and bytes otherwise. Defaults to 0. + * @param size - Size of content to write from `data` to `buffer`. Given in elements if + * `data` is a `TypedArray` and bytes otherwise. + */ + setImmediates( + rangeOffset: GPUSize32, + data: GPUAllowSharedBufferSource, + dataOffset?: GPUSize64, + size?: GPUSize64 + ): undefined; } interface GPUCommandsMixin {} @@ -3174,6 +3194,8 @@ interface GPUSupportedLimits { readonly maxComputeWorkgroupSizeY: number; readonly maxComputeWorkgroupSizeZ: number; readonly maxComputeWorkgroupsPerDimension: number; + /** **PROPOSED** in [Immediates](https://github.com/gpuweb/gpuweb/pull/5423). */ + readonly maxImmediateSize: number; /** **PROPOSED** in [Compatibility Mode](https://github.com/gpuweb/gpuweb/blob/main/proposals/compatibility-mode.md). */ readonly maxStorageBuffersInVertexStage?: number; /** **PROPOSED** in [Compatibility Mode](https://github.com/gpuweb/gpuweb/blob/main/proposals/compatibility-mode.md). */