An object that encodes GPU operations.
A CommandEncoder
can record RenderPass
, ComputePass
, and transfer operations between driver-managed resources like Buffer
and Texture
.
When finished recording, call CommandEncoder.finish
to obtain a CommandBuffer
which may be submitted for execution.
Methods
beginComputePass():ComputePass
Begins recording of a compute pass.
This function returns a ComputePass
object which records a single compute pass.
beginRenderPass(renderPassDescriptor:RenderPassDescriptor):RenderPass
Begins recording of a render pass.
This function returns a RenderPass
object which records a single render pass.
Throws:
UseAfterDestroyException | If the |
---|
copyBufferToBuffer(source:Buffer, sourceOffset:Int, destination:Buffer, destinationOffset:Int, copySize:Int):Void
Copy data from one buffer to another.
Throws:
UseAfterDestroyException | If either |
---|
copyBufferToTexture(source:BufferCopyView, destination:TextureCopyView, copySize:Extent3D):Void
copyTextureToBuffer(source:TextureCopyView, destination:BufferCopyView, copySize:Extent3D):Void
copyTextureToTexture(source:TextureCopyView, destination:TextureCopyView, copySize:Extent3D):Void
Copy data from one texture to another.
Throws:
UseAfterDestroyException | If the |
---|
finish():CommandBuffer
Finishes recording and returns a CommandBuffer
that can be submitted for execution.