Interface GPUQueue
label: string;
copyExternalImageToTexture(
source: GPUCopyExternalImageSourceInfo,
destination: GPUCopyExternalImageDestInfo,
copySize: GPUExtent3D,
): void;
copyExternalImageToTexture(
source: GPUCopyExternalImageSourceInfo,
destination: GPUCopyExternalImageDestInfo,
copySize: Iterable<number>,
): void;
onSubmittedWorkDone(): Promise<void>;
submit(commandBuffers: GPUCommandBuffer[]): void;
submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
writeBuffer(
buffer: GPUBuffer,
bufferOffset: number,
data: AllowSharedBufferSource,
dataOffset?: number,
size?: number,
): void;
writeTexture(
destination: GPUTexelCopyTextureInfo,
data: AllowSharedBufferSource,
dataLayout: GPUTexelCopyBufferLayout,
size: GPUExtent3D,
): void;
writeTexture(
destination: GPUTexelCopyTextureInfo,
data: AllowSharedBufferSource,
dataLayout: GPUTexelCopyBufferLayout,
size: Iterable<number>,
): void;
}
Hierarchy (View Summary)
- GPUObjectBase
- GPUQueue
Methods
copyExternalImageToTexture
-
copyExternalImageToTexture(
source: GPUCopyExternalImageSourceInfo,
destination: GPUCopyExternalImageDestInfo,
copySize: GPUExtent3D,
): voidThe
copyExternalImageToTexture()method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.Parameters
- source: GPUCopyExternalImageSourceInfo
- destination: GPUCopyExternalImageDestInfo
- copySize: GPUExtent3D
Returns void
-
copyExternalImageToTexture(
source: GPUCopyExternalImageSourceInfo,
destination: GPUCopyExternalImageDestInfo,
copySize: Iterable<number>,
): voidThe
copyExternalImageToTexture()method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.Parameters
- source: GPUCopyExternalImageSourceInfo
- destination: GPUCopyExternalImageDestInfo
- copySize: Iterable<number>
Returns void
onSubmittedWorkDone
-
The
onSubmittedWorkDone()method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed.Returns Promise<void>
submit
-
The
submit()method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.Parameters
- commandBuffers: GPUCommandBuffer[]
Returns void
-
The
submit()method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.Parameters
- commandBuffers: Iterable<GPUCommandBuffer>
Returns void
writeBuffer
-
writeBuffer(
buffer: GPUBuffer,
bufferOffset: number,
data: AllowSharedBufferSource,
dataOffset?: number,
size?: number,
): voidThe
writeBuffer()method of the GPUQueue interface writes a provided data source into a given GPUBuffer.Parameters
- buffer: GPUBuffer
- bufferOffset: number
- data: AllowSharedBufferSource
OptionaldataOffset: numberOptionalsize: number
Returns void
writeTexture
-
writeTexture(
destination: GPUTexelCopyTextureInfo,
data: AllowSharedBufferSource,
dataLayout: GPUTexelCopyBufferLayout,
size: GPUExtent3D,
): voidThe
writeTexture()method of the GPUQueue interface writes a provided data source into a given GPUTexture.Parameters
- destination: GPUTexelCopyTextureInfo
- data: AllowSharedBufferSource
- dataLayout: GPUTexelCopyBufferLayout
- size: GPUExtent3D
Returns void
-
writeTexture(
destination: GPUTexelCopyTextureInfo,
data: AllowSharedBufferSource,
dataLayout: GPUTexelCopyBufferLayout,
size: Iterable<number>,
): voidThe
writeTexture()method of the GPUQueue interface writes a provided data source into a given GPUTexture.Parameters
- destination: GPUTexelCopyTextureInfo
- data: AllowSharedBufferSource
- dataLayout: GPUTexelCopyBufferLayout
- size: Iterable<number>
Returns void
The
GPUQueueinterface of the WebGPU API controls execution of encoded commands on the GPU. Available only in secure contexts.MDN Reference