dawn.WGPUQueue
export interface WGPUQueue {
/**
* Opaque native handle to this queue.
*/
readonly handle: QueueHandle;
/**
* Submit one or more command buffers for GPU execution.
*
* Commands are executed asynchronously. Use {@link onSubmittedWorkDone} to
* wait for completion.
*
* @param commandBuffers - Array of command buffers to submit
*/
submit(commandBuffers: WGPUCommandBuffer[]): void;
/**
* Write data to a buffer from the CPU.
*
* The data is copied from host memory to the GPU buffer.
* This is a synchronous operation from the CPU perspective.
*
* @param buffer - Destination buffer (must have COPY_DST usage)
* @param bufferOffset - Byte offset in buffer
* @param data - Data to write (ArrayBuffer or typed array)
*/
writeBuffer(buffer: WGPUBuffer, bufferOffset: number, data: ArrayBuffer | ArrayBufferView): void;
/**
* Wait for all submitted work to complete.
*
* @returns Promise that resolves when GPU is idle
*/
onSubmittedWorkDone(): Promise<void>;
}- readonly
handle(QueueHandle) - – Opaque native handle to this queue.
submit((commandBuffers: WGPUCommandBuffer[]) => void)- – Submit one or more command buffers for GPU execution. Commands are executed asynchronously. Use onSubmittedWorkDone to wait for completion.
writeBuffer((buffer: WGPUBuffer, bufferOffset: number, data: ArrayBuffer | ArrayBufferView) => void)- – Write data to a buffer from the CPU. The data is copied from host memory to the GPU buffer. This is a synchronous operation from the CPU perspective.
onSubmittedWorkDone(() => Promise<void>)- – Wait for all submitted work to complete.
GPU command queue.
Submits command buffers and data writes to the GPU for execution.