GPUQueue
The GPUQueue interface of the WebGPU API controls execution of encoded commands on the GPU.
Available only in secure contexts.
Extends
Methods
copyExternalImageToTexture()
Call Signature
copyExternalImageToTexture(
source,
destination,
copySize
): void;
The copyExternalImageToTexture() method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
Parameters
| Parameter | Type |
|---|---|
source | GPUCopyExternalImageSourceInfo |
destination | GPUCopyExternalImageDestInfo |
copySize | GPUExtent3D |
Returns
void
Call Signature
copyExternalImageToTexture(
source,
destination,
copySize
): void;
The copyExternalImageToTexture() method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
Parameters
| Parameter | Type |
|---|---|
source | GPUCopyExternalImageSourceInfo |
destination | GPUCopyExternalImageDestInfo |
copySize | Iterable<number> |
Returns
void
onSubmittedWorkDone()
onSubmittedWorkDone(): Promise<void>;
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()
Call Signature
submit(commandBuffers): 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
| Parameter | Type |
|---|---|
commandBuffers | GPUCommandBuffer[] |
Returns
void
Call Signature
submit(commandBuffers): 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
| Parameter | Type |
|---|---|
commandBuffers | Iterable<GPUCommandBuffer> |
Returns
void
writeBuffer()
writeBuffer(
buffer,
bufferOffset,
data,
dataOffset?,
size?
): void;
The writeBuffer() method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
Parameters
| Parameter | Type |
|---|---|
buffer | GPUBuffer |
bufferOffset | number |
data | AllowSharedBufferSource |
dataOffset? | number |
size? | number |
Returns
void
writeTexture()
Call Signature
writeTexture(
destination,
data,
dataLayout,
size
): void;
The writeTexture() method of the GPUQueue interface writes a provided data source into a given GPUTexture.
Parameters
| Parameter | Type |
|---|---|
destination | GPUTexelCopyTextureInfo |
data | AllowSharedBufferSource |
dataLayout | GPUTexelCopyBufferLayout |
size | GPUExtent3D |
Returns
void
Call Signature
writeTexture(
destination,
data,
dataLayout,
size
): void;
The writeTexture() method of the GPUQueue interface writes a provided data source into a given GPUTexture.
Parameters
| Parameter | Type |
|---|---|
destination | GPUTexelCopyTextureInfo |
data | AllowSharedBufferSource |
dataLayout | GPUTexelCopyBufferLayout |
size | Iterable<number> |
Returns
void
Properties
label
label: string;