Class GPUCommandEncoder
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The GPUCommandEncoder interface of the {{domxref("WebGPU API", "WebGPU API", "", "nocode")}} represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
[Value("GPUCommandEncoder")]
public class GPUCommandEncoder
- Inheritance
-
GPUCommandEncoder
- Inherited Members
Remarks
A GPUCommandEncoder object instance is created via the CreateCommandEncoder(GPUCommandEncoderDescriptor) property.
-The WebGPU API
Constructors
GPUCommandEncoder()
public GPUCommandEncoder()
Methods
BeginComputePass(GPUComputePassDescriptor)
The beginComputePass() method of the
GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
[Value("beginComputePass")]
public GPUComputePassEncoder BeginComputePass(GPUComputePassDescriptor descriptor = null)
Parameters
descriptorGPUComputePassDescriptor
Returns
- GPUComputePassEncoder
A GPUComputePassEncoder object instance.
Remarks
BeginRenderPass(GPURenderPassDescriptor)
The beginRenderPass() method of the
GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
[Value("beginRenderPass")]
public GPURenderPassEncoder BeginRenderPass(GPURenderPassDescriptor descriptor)
Parameters
descriptorGPURenderPassDescriptor
Returns
- GPURenderPassEncoder
A GPURenderPassEncoder object instance.
Remarks
ClearBuffer(GPUBuffer, ulong, ulong)
The clearBuffer() method of the
GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
[Value("clearBuffer")]
public GlobalObject.Undefined ClearBuffer(GPUBuffer buffer, ulong offset = 0, ulong size = 0)
Parameters
Returns
Remarks
CopyBufferToBuffer(GPUBuffer, ulong, GPUBuffer, ulong, ulong)
The copyBufferToBuffer() method of the
GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
[Value("copyBufferToBuffer")]
public GlobalObject.Undefined CopyBufferToBuffer(GPUBuffer source, ulong sourceOffset, GPUBuffer destination, ulong destinationOffset, ulong size)
Parameters
Returns
Remarks
CopyBufferToTexture(GPUTexelCopyBufferInfo, GPUTexelCopyTextureInfo, Union222)
The copyBufferToTexture() method of the
GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
[Value("copyBufferToTexture")]
public GlobalObject.Undefined CopyBufferToTexture(GPUTexelCopyBufferInfo source, GPUTexelCopyTextureInfo destination, Union222 copySize)
Parameters
sourceGPUTexelCopyBufferInfodestinationGPUTexelCopyTextureInfocopySizeUnion222
Returns
Remarks
CopyTextureToBuffer(GPUTexelCopyTextureInfo, GPUTexelCopyBufferInfo, Union222)
The copyTextureToBuffer() method of the
GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
[Value("copyTextureToBuffer")]
public GlobalObject.Undefined CopyTextureToBuffer(GPUTexelCopyTextureInfo source, GPUTexelCopyBufferInfo destination, Union222 copySize)
Parameters
sourceGPUTexelCopyTextureInfodestinationGPUTexelCopyBufferInfocopySizeUnion222
Returns
Remarks
CopyTextureToTexture(GPUTexelCopyTextureInfo, GPUTexelCopyTextureInfo, Union222)
The copyTextureToTexture() method of the
GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
[Value("copyTextureToTexture")]
public GlobalObject.Undefined CopyTextureToTexture(GPUTexelCopyTextureInfo source, GPUTexelCopyTextureInfo destination, Union222 copySize)
Parameters
sourceGPUTexelCopyTextureInfodestinationGPUTexelCopyTextureInfocopySizeUnion222
Returns
Remarks
Finish(GPUCommandBufferDescriptor)
The finish() method of the
GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
[Value("finish")]
public GPUCommandBuffer Finish(GPUCommandBufferDescriptor descriptor = null)
Parameters
descriptorGPUCommandBufferDescriptor
Returns
- GPUCommandBuffer
A GPUCommandBuffer object instance.
Remarks
ResolveQuerySet(GPUQuerySet, ulong, ulong, GPUBuffer, ulong)
The resolveQuerySet() method of the
GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
[Value("resolveQuerySet")]
public GlobalObject.Undefined ResolveQuerySet(GPUQuerySet querySet, ulong firstQuery, ulong queryCount, GPUBuffer destination, ulong destinationOffset)
Parameters
querySetGPUQuerySetfirstQueryulongqueryCountulongdestinationGPUBufferdestinationOffsetulong