GPURenderPassEncoder

  • GPUCommandEncoder.beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder

    GPURenderPassDescriptor

    • label: USVString
    • colorAttachments: sequence<GPURenderPassColorAttachment>required
    • depthStencilAttachment: GPURenderPassDepthStencilAttachment
    • occlusionQuerySet: GPUQuerySet
    • timestampWrites: GPURenderPassTimestampWrites= []
    • maxDrawCount: GPUSize64= 50000000

    GPURenderPassColorAttachment

    GPUColor

    typedef GPUColor = sequence<double> | GPUColorDict

    GPUColorDict

    • r: doublerequired
    • g: doublerequired
    • b: doublerequired
    • a: doublerequired

    GPULoadOp

    'load', 'clear'

    GPUStoreOp

    'store', 'discard'

    GPURenderPassDepthStencilAttachment

    • view: GPUTextureViewrequired
    • depthClearValue: float= 0
    • depthLoadOp: GPULoadOp
    • depthStoreOp: GPUStoreOp
    • depthReadOnly: boolean
    • stencilClearValue: GPUStencilValue= 0
    • stencilLoadOp: GPULoadOp
    • stencilStoreOp: GPUStoreOp
    • stencilReadOnly: boolean

    GPUStencilValue

    typedef GPUStencilValue = unsigned long

    GPURenderPassTimestampWrites

    typedef GPURenderPassTimestampWrites = sequence<GPURenderPassTimestampWrite>

    GPURenderPassTimestampWrite

    • querySet: GPUQuerySetrequired
    • queryIndex: GPUSize32required
    • location: GPURenderPassTimestampLocationrequired

    GPUSize32

    typedef GPUSize32 = unsigned long

    GPURenderPassTimestampLocation

    'beginning', 'end'

    GPUSize64

    typedef GPUSize64 = unsigned long long
  • label: USVString
  • setPipeline(pipeline: GPURenderPipeline): void

    GPURenderPipeline

  • setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, 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

    GPUIndexFormat

    'uint16', 'uint32'

    GPUSize64

    typedef GPUSize64 = unsigned long long
  • setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer, offset: GPUSize64, size: GPUSize64): void

    GPUIndex32

    typedef GPUIndex32 = unsigned long

    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 long
  • draw(vertexCount: GPUSize32, instanceCount: GPUSize32, firstVertex: GPUSize32, firstInstance: GPUSize32): void

    GPUSize32

    typedef GPUSize32 = unsigned long
  • drawIndexed(indexCount: GPUSize32, instanceCount: GPUSize32, firstIndex: GPUSize32, baseVertex: GPUSignedOffset32, firstInstance: GPUSize32): void

    GPUSize32

    typedef GPUSize32 = unsigned long

    GPUSignedOffset32

    typedef GPUSignedOffset32 = long
  • drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: 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 long
  • drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: 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 long
  • setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup, dynamicOffsets: sequence<GPUBufferDynamicOffset>): void

    GPUIndex32

    typedef GPUIndex32 = unsigned long

    GPUBindGroup

    • label: USVString

    GPUBufferDynamicOffset

    typedef GPUBufferDynamicOffset = unsigned long
  • setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void

    GPUIndex32

    typedef GPUIndex32 = unsigned long

    GPUBindGroup

    • label: USVString

    GPUSize64

    typedef GPUSize64 = unsigned long long

    GPUSize32

    typedef GPUSize32 = unsigned long
  • pushDebugGroup(groupLabel: USVString): void
  • popDebugGroup(): void
  • insertDebugMarker(markerLabel: USVString): void
  • setViewport(x: float, y: float, width: float, height: float, minDepth: float, maxDepth: float): void
  • setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void

    GPUIntegerCoordinate

    typedef GPUIntegerCoordinate = unsigned long
  • setBlendConstant(color: GPUColor): void

    GPUColor

    typedef GPUColor = sequence<double> | GPUColorDict

    GPUColorDict

    • r: doublerequired
    • g: doublerequired
    • b: doublerequired
    • a: doublerequired
  • setStencilReference(reference: GPUStencilValue): void

    GPUStencilValue

    typedef GPUStencilValue = unsigned long
  • beginOcclusionQuery(queryIndex: GPUSize32): void

    GPUSize32

    typedef GPUSize32 = unsigned long
  • endOcclusionQuery(): void
  • executeBundles(bundles: sequence<GPURenderBundle>): void

    GPURenderBundle

    • label: USVString
  • end(): void