Interface GPUQueue
__brand: "GPUQueue";
label: string;
copyExternalImageToTexture(source: GPUImageCopyExternalImage, destination: GPUImageCopyTextureTagged, copySize: GPUExtent3DStrict): undefined;
onSubmittedWorkDone(): Promise<undefined>;
submit(commandBuffers: Iterable<GPUCommandBuffer, any, any>): undefined;
writeBuffer(buffer: GPUBuffer, bufferOffset: number, data: SharedArrayBuffer | BufferSource, dataOffset?: number, size?: number): undefined;
writeTexture(destination: GPUImageCopyTexture, data: SharedArrayBuffer | BufferSource, dataLayout: GPUImageDataLayout, size: GPUExtent3DStrict): undefined;
}
Hierarchy
- GPUObjectBase
- GPUQueue (view full)
Index
Properties
Methods
Methods
copyExternalImageToTexture
- copy
External (source, destination, copySize): undefinedImage To Texture Issues a copy operation of the contents of a platform image/canvas into the destination texture. This operation performs [[#color-space-conversions|color encoding]] into the destination encoding according to the parameters of GPUImageCopyTextureTagged. Copying into a
-srgb
texture results in the same texture bytes, not the same decoded values, as copying into the corresponding non--srgb
format. Thus, after a copy operation, sampling the destination texture has different results depending on whether its format is-srgb
, all else unchanged.Parameters
- source: GPUImageCopyExternalImage
source image and origin to copy to
destination
. - destination: GPUImageCopyTextureTagged
The texture subresource and origin to write to, and its encoding metadata.
- copySize: GPUExtent3DStrict
Extents of the content to write from
source
todestination
.
Returns undefined
- source: GPUImageCopyExternalImage
onSubmittedWorkDone
- on
Submitted (): Promise<undefined>Work Done Returns a Promise that resolves once this queue finishes processing all the work submitted up to this moment. Resolution of this Promise implies the completion of GPUBuffer#mapAsync calls made prior to that call, on GPUBuffers last used exclusively on that queue.
Returns Promise<undefined>
submit
- submit(commandBuffers): undefined
Schedules the execution of the command buffers by the GPU on this queue. Submitted command buffers cannot be used again.
commandBuffers
:Parameters
- commandBuffers: Iterable<GPUCommandBuffer, any, any>
Returns undefined
writeBuffer
- write
Buffer (buffer, bufferOffset, data, dataOffset?, size?): undefined Issues a write operation of the provided data into a GPUBuffer.
Parameters
- buffer: GPUBuffer
The buffer to write to.
- bufferOffset: number
Offset in bytes into
buffer
to begin writing at. - data: SharedArrayBuffer | BufferSource
Data to write into
buffer
. Optional
dataOffset: numberOffset in into
data
to begin writing from. Given in elements ifdata
is aTypedArray
and bytes otherwise.Optional
size: numberSize of content to write from
data
tobuffer
. Given in elements ifdata
is aTypedArray
and bytes otherwise.
Returns undefined
- buffer: GPUBuffer
writeTexture
- write
Texture (destination, data, dataLayout, size): undefined Issues a write operation of the provided data into a GPUTexture.
Parameters
- destination: GPUImageCopyTexture
The texture subresource and origin to write to.
- data: SharedArrayBuffer | BufferSource
Data to write into
destination
. - dataLayout: GPUImageDataLayout
Layout of the content in
data
. - size: GPUExtent3DStrict
Extents of the content to write from
data
todestination
.
Returns undefined
- destination: GPUImageCopyTexture
Nominal type branding. https://github.com/microsoft/TypeScript/pull/33038