GPUQueue

The GPUQueue interface of the WebGPU API controls execution of encoded commands on the GPU. Available only in secure contexts.

MDN Reference

Properties

Link copied to clipboard

Functions

Link copied to clipboard

The copyExternalImageToTexture() method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.

Link copied to clipboard
inline suspend fun GPUQueue.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.

Link copied to clipboard

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.

Link copied to clipboard
fun submit(commandBuffers: ReadonlyArray<GPUCommandBuffer>)

The submit() method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.

Link copied to clipboard
fun writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset: GPUSize64 = definedExternally, size: GPUSize64 = definedExternally)

The writeBuffer() method of the GPUQueue interface writes a provided data source into a given GPUBuffer.

Link copied to clipboard

The writeTexture() method of the GPUQueue interface writes a provided data source into a given GPUTexture.