GPUCommandEncoder
GPUDevice.createCommandEncoder(descriptor: GPUCommandEncoderDescriptor): GPUCommandEncoder
GPUCommandEncoderDescriptor
- label: USVString
- label: USVString
- pushDebugGroup(groupLabel: USVString): void
- popDebugGroup(): void
- insertDebugMarker(markerLabel: USVString): void
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder
GPURenderPassDescriptor
- label: USVString
- colorAttachments: sequence<GPURenderPassColorAttachment>required
- depthStencilAttachment: GPURenderPassDepthStencilAttachment
- occlusionQuerySet: GPUQuerySet
- timestampWrites: GPURenderPassTimestampWrites= []
- maxDrawCount: GPUSize64= 50000000
GPURenderPassColorAttachment
- resolveTarget: GPUTextureView
- clearValue: GPUColor
- loadOp: GPULoadOprequired
- storeOp: GPUStoreOprequired
GPUColor
typedef GPUColor = sequence<double> | GPUColorDictGPUColorDict
- r: doublerequired
- g: doublerequired
- b: doublerequired
- a: doublerequired
GPULoadOp
'load', 'clear'GPUStoreOp
'store', 'discard'GPURenderPassDepthStencilAttachment
- depthClearValue: float= 0
- depthLoadOp: GPULoadOp
- depthStoreOp: GPUStoreOp
- depthReadOnly: boolean
- stencilClearValue: GPUStencilValue= 0
- stencilLoadOp: GPULoadOp
- stencilStoreOp: GPUStoreOp
- stencilReadOnly: boolean
GPUStencilValue
typedef GPUStencilValue = unsigned longGPURenderPassTimestampWrites
typedef GPURenderPassTimestampWrites = sequence<GPURenderPassTimestampWrite>GPURenderPassTimestampWrite
- queryIndex: GPUSize32required
- location: GPURenderPassTimestampLocationrequired
GPUSize32
typedef GPUSize32 = unsigned longGPURenderPassTimestampLocation
'beginning', 'end'GPUSize64
typedef GPUSize64 = unsigned long longbeginComputePass(descriptor: GPUComputePassDescriptor): GPUComputePassEncoder
GPUComputePassDescriptor
- label: USVString
- timestampWrites: GPUComputePassTimestampWrites= []
GPUComputePassTimestampWrites
typedef GPUComputePassTimestampWrites = sequence<GPUComputePassTimestampWrite>GPUComputePassTimestampWrite
- queryIndex: GPUSize32required
- location: GPUComputePassTimestampLocationrequired
GPUSize32
typedef GPUSize32 = unsigned longGPUComputePassTimestampLocation
'beginning', 'end'copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void
GPUBuffer
- label: USVString
- size: GPUSize64
- usage: GPUBufferUsageFlags
- mapAsync(mode: GPUMapModeFlags, offset: GPUSize64, size: GPUSize64): Promise<void>
- getMappedRange(offset: GPUSize64, size: GPUSize64): ArrayBuffer
- unmap(): void
- destroy(): void
GPUSize64
typedef GPUSize64 = unsigned long longcopyBufferToTexture(source: GPUImageCopyBuffer, destination: GPUImageCopyTexture, copySize: GPUExtent3D): void
GPUImageCopyBuffer
- offset: GPUSize64= 0
- bytesPerRow: GPUSize32
- rowsPerImage: GPUSize32
GPUSize64
typedef GPUSize64 = unsigned long longGPUSize32
typedef GPUSize32 = unsigned longGPUImageCopyTexture
- mipLevel: GPUIntegerCoordinate= 0
- origin: GPUOrigin3D= { … }
- aspect: GPUTextureAspect= 'all'
GPUIntegerCoordinate
typedef GPUIntegerCoordinate = unsigned longGPUOrigin3D
typedef GPUOrigin3D = sequence<GPUIntegerCoordinate> | GPUOrigin3DDictGPUOrigin3DDict
- x: GPUIntegerCoordinate= 0
- y: GPUIntegerCoordinate= 0
- z: GPUIntegerCoordinate= 0
GPUTextureAspect
'all', 'stencil-only', 'depth-only'GPUExtent3D
typedef GPUExtent3D = sequence<GPUIntegerCoordinate> | GPUExtent3DDictGPUExtent3DDict
- width: GPUIntegerCoordinaterequired
- height: GPUIntegerCoordinate= 1
- depthOrArrayLayers: GPUIntegerCoordinate= 1
copyTextureToBuffer(source: GPUImageCopyTexture, destination: GPUImageCopyBuffer, copySize: GPUExtent3D): void
GPUImageCopyTexture
- mipLevel: GPUIntegerCoordinate= 0
- origin: GPUOrigin3D= { … }
- aspect: GPUTextureAspect= 'all'
GPUIntegerCoordinate
typedef GPUIntegerCoordinate = unsigned longGPUOrigin3D
typedef GPUOrigin3D = sequence<GPUIntegerCoordinate> | GPUOrigin3DDictGPUOrigin3DDict
- x: GPUIntegerCoordinate= 0
- y: GPUIntegerCoordinate= 0
- z: GPUIntegerCoordinate= 0
GPUTextureAspect
'all', 'stencil-only', 'depth-only'GPUImageCopyBuffer
- offset: GPUSize64= 0
- bytesPerRow: GPUSize32
- rowsPerImage: GPUSize32
GPUSize64
typedef GPUSize64 = unsigned long longGPUSize32
typedef GPUSize32 = unsigned longGPUExtent3D
typedef GPUExtent3D = sequence<GPUIntegerCoordinate> | GPUExtent3DDictGPUExtent3DDict
- width: GPUIntegerCoordinaterequired
- height: GPUIntegerCoordinate= 1
- depthOrArrayLayers: GPUIntegerCoordinate= 1
copyTextureToTexture(source: GPUImageCopyTexture, destination: GPUImageCopyTexture, copySize: GPUExtent3D): void
GPUImageCopyTexture
- mipLevel: GPUIntegerCoordinate= 0
- origin: GPUOrigin3D= { … }
- aspect: GPUTextureAspect= 'all'
GPUIntegerCoordinate
typedef GPUIntegerCoordinate = unsigned longGPUOrigin3D
typedef GPUOrigin3D = sequence<GPUIntegerCoordinate> | GPUOrigin3DDictGPUOrigin3DDict
- x: GPUIntegerCoordinate= 0
- y: GPUIntegerCoordinate= 0
- z: GPUIntegerCoordinate= 0
GPUTextureAspect
'all', 'stencil-only', 'depth-only'GPUExtent3D
typedef GPUExtent3D = sequence<GPUIntegerCoordinate> | GPUExtent3DDictGPUExtent3DDict
- width: GPUIntegerCoordinaterequired
- height: GPUIntegerCoordinate= 1
- depthOrArrayLayers: GPUIntegerCoordinate= 1
clearBuffer(buffer: GPUBuffer, offset: GPUSize64, size: GPUSize64): void
GPUBuffer
- label: USVString
- size: GPUSize64
- usage: GPUBufferUsageFlags
- mapAsync(mode: GPUMapModeFlags, offset: GPUSize64, size: GPUSize64): Promise<void>
- getMappedRange(offset: GPUSize64, size: GPUSize64): ArrayBuffer
- unmap(): void
- destroy(): void
GPUSize64
typedef GPUSize64 = unsigned long longwriteTimestamp(querySet: GPUQuerySet, queryIndex: GPUSize32): void
GPUQuerySet
- label: USVString
- type: GPUQueryType
- count: GPUSize32
- destroy(): void
GPUSize32
typedef GPUSize32 = unsigned longresolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void
GPUQuerySet
- label: USVString
- type: GPUQueryType
- count: GPUSize32
- destroy(): void
GPUSize32
typedef GPUSize32 = unsigned longGPUBuffer
- label: USVString
- size: GPUSize64
- usage: GPUBufferUsageFlags
- mapAsync(mode: GPUMapModeFlags, offset: GPUSize64, size: GPUSize64): Promise<void>
- getMappedRange(offset: GPUSize64, size: GPUSize64): ArrayBuffer
- unmap(): void
- destroy(): void
GPUSize64
typedef GPUSize64 = unsigned long longfinish(descriptor: GPUCommandBufferDescriptor): GPUCommandBuffer
GPUCommandBufferDescriptor
- label: USVString