GPURenderPipelineDescriptor

  • label: USVString
  • layout: GPUPipelineLayout | GPUAutoLayoutModerequired

    GPUPipelineLayout

    • label: USVString

    GPUAutoLayoutMode

    'auto'
  • vertex: GPUVertexStaterequired

    GPUVertexState

    • module: GPUShaderModulerequired
    • entryPoint: USVStringrequired
    • constants: record<USVString, GPUPipelineConstantValue>
    • buffers: sequence<GPUVertexBufferLayout>= []

    GPUPipelineConstantValue

    typedef GPUPipelineConstantValue = double

    GPUVertexBufferLayout

    • arrayStride: GPUSize64required
    • stepMode: GPUVertexStepMode= 'vertex'
    • attributes: sequence<GPUVertexAttribute>required

    GPUSize64

    typedef GPUSize64 = unsigned long long

    GPUVertexStepMode

    'vertex', 'instance'

    GPUVertexAttribute

    • format: GPUVertexFormatrequired
    • offset: GPUSize64required
    • shaderLocation: GPUIndex32required

    GPUVertexFormat

    'uint8x2', 'uint8x4', 'sint8x2', 'sint8x4', 'unorm8x2', 'unorm8x4', 'snorm8x2', 'snorm8x4', 'uint16x2', 'uint16x4', 'sint16x2', 'sint16x4', 'unorm16x2', 'unorm16x4', 'snorm16x2', 'snorm16x4', 'float16x2', 'float16x4', 'float32', 'float32x2', 'float32x3', 'float32x4', 'uint32', 'uint32x2', 'uint32x3', 'uint32x4', 'sint32', 'sint32x2', 'sint32x3', 'sint32x4'

    GPUIndex32

    typedef GPUIndex32 = unsigned long
  • primitive: GPUPrimitiveState= { … }

    GPUPrimitiveState

    • topology: GPUPrimitiveTopology= 'triangle-list'
    • stripIndexFormat: GPUIndexFormat
    • frontFace: GPUFrontFace= 'ccw'
    • cullMode: GPUCullMode= 'none'
    • unclippedDepth: boolean

    GPUPrimitiveTopology

    'point-list', 'line-list', 'line-strip', 'triangle-list', 'triangle-strip'

    GPUIndexFormat

    'uint16', 'uint32'

    GPUFrontFace

    'ccw', 'cw'

    GPUCullMode

    'none', 'front', 'back'
  • depthStencil: GPUDepthStencilState

    GPUDepthStencilState

    • format: GPUTextureFormatrequired
    • depthWriteEnabled: boolean
    • depthCompare: GPUCompareFunction= 'always'
    • stencilFront: GPUStencilFaceState= { … }
    • stencilBack: GPUStencilFaceState= { … }
    • stencilReadMask: GPUStencilValue= 0xFFFFFFFF
    • stencilWriteMask: GPUStencilValue= 0xFFFFFFFF
    • depthBias: GPUDepthBias= 0
    • depthBiasSlopeScale: float= 0
    • depthBiasClamp: float= 0

    GPUTextureFormat

    'r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16uint', 'rgba16sint', 'rgba16float', 'rgba32uint', 'rgba32sint', 'rgba32float', 'stencil8', 'depth16unorm', 'depth24plus', 'depth24plus-stencil8', 'depth32float', 'depth32float-stencil8', 'bc1-rgba-unorm', 'bc1-rgba-unorm-srgb', 'bc2-rgba-unorm', 'bc2-rgba-unorm-srgb', 'bc3-rgba-unorm', 'bc3-rgba-unorm-srgb', 'bc4-r-unorm', 'bc4-r-snorm', 'bc5-rg-unorm', 'bc5-rg-snorm', 'bc6h-rgb-ufloat', 'bc6h-rgb-float', 'bc7-rgba-unorm', 'bc7-rgba-unorm-srgb', 'etc2-rgb8unorm', 'etc2-rgb8unorm-srgb', 'etc2-rgb8a1unorm', 'etc2-rgb8a1unorm-srgb', 'etc2-rgba8unorm', 'etc2-rgba8unorm-srgb', 'eac-r11unorm', 'eac-r11snorm', 'eac-rg11unorm', 'eac-rg11snorm', 'astc-4x4-unorm', 'astc-4x4-unorm-srgb', 'astc-5x4-unorm', 'astc-5x4-unorm-srgb', 'astc-5x5-unorm', 'astc-5x5-unorm-srgb', 'astc-6x5-unorm', 'astc-6x5-unorm-srgb', 'astc-6x6-unorm', 'astc-6x6-unorm-srgb', 'astc-8x5-unorm', 'astc-8x5-unorm-srgb', 'astc-8x6-unorm', 'astc-8x6-unorm-srgb', 'astc-8x8-unorm', 'astc-8x8-unorm-srgb', 'astc-10x5-unorm', 'astc-10x5-unorm-srgb', 'astc-10x6-unorm', 'astc-10x6-unorm-srgb', 'astc-10x8-unorm', 'astc-10x8-unorm-srgb', 'astc-10x10-unorm', 'astc-10x10-unorm-srgb', 'astc-12x10-unorm', 'astc-12x10-unorm-srgb', 'astc-12x12-unorm', 'astc-12x12-unorm-srgb'

    GPUCompareFunction

    'never', 'less', 'equal', 'less-equal', 'greater', 'not-equal', 'greater-equal', 'always'

    GPUStencilFaceState

    • compare: GPUCompareFunction= 'always'
    • failOp: GPUStencilOperation= 'keep'
    • depthFailOp: GPUStencilOperation= 'keep'
    • passOp: GPUStencilOperation= 'keep'

    GPUStencilOperation

    'keep', 'zero', 'replace', 'invert', 'increment-clamp', 'decrement-clamp', 'increment-wrap', 'decrement-wrap'

    GPUStencilValue

    typedef GPUStencilValue = unsigned long

    GPUDepthBias

    typedef GPUDepthBias = long
  • multisample: GPUMultisampleState= { … }

    GPUMultisampleState

    • count: GPUSize32= 1
    • mask: GPUSampleMask= 0xFFFFFFFF
    • alphaToCoverageEnabled: boolean

    GPUSize32

    typedef GPUSize32 = unsigned long

    GPUSampleMask

    typedef GPUSampleMask = unsigned long
  • fragment: GPUFragmentState

    GPUFragmentState

    • module: GPUShaderModulerequired
    • entryPoint: USVStringrequired
    • constants: record<USVString, GPUPipelineConstantValue>
    • targets: sequence<GPUColorTargetState>required

    GPUPipelineConstantValue

    typedef GPUPipelineConstantValue = double

    GPUColorTargetState

    • format: GPUTextureFormatrequired
    • blend: GPUBlendState
    • writeMask: GPUColorWriteFlags= 0xF

    GPUTextureFormat

    'r8unorm', 'r8snorm', 'r8uint', 'r8sint', 'r16uint', 'r16sint', 'r16float', 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint', 'r32uint', 'r32sint', 'r32float', 'rg16uint', 'rg16sint', 'rg16float', 'rgba8unorm', 'rgba8unorm-srgb', 'rgba8snorm', 'rgba8uint', 'rgba8sint', 'bgra8unorm', 'bgra8unorm-srgb', 'rgb9e5ufloat', 'rgb10a2unorm', 'rg11b10ufloat', 'rg32uint', 'rg32sint', 'rg32float', 'rgba16uint', 'rgba16sint', 'rgba16float', 'rgba32uint', 'rgba32sint', 'rgba32float', 'stencil8', 'depth16unorm', 'depth24plus', 'depth24plus-stencil8', 'depth32float', 'depth32float-stencil8', 'bc1-rgba-unorm', 'bc1-rgba-unorm-srgb', 'bc2-rgba-unorm', 'bc2-rgba-unorm-srgb', 'bc3-rgba-unorm', 'bc3-rgba-unorm-srgb', 'bc4-r-unorm', 'bc4-r-snorm', 'bc5-rg-unorm', 'bc5-rg-snorm', 'bc6h-rgb-ufloat', 'bc6h-rgb-float', 'bc7-rgba-unorm', 'bc7-rgba-unorm-srgb', 'etc2-rgb8unorm', 'etc2-rgb8unorm-srgb', 'etc2-rgb8a1unorm', 'etc2-rgb8a1unorm-srgb', 'etc2-rgba8unorm', 'etc2-rgba8unorm-srgb', 'eac-r11unorm', 'eac-r11snorm', 'eac-rg11unorm', 'eac-rg11snorm', 'astc-4x4-unorm', 'astc-4x4-unorm-srgb', 'astc-5x4-unorm', 'astc-5x4-unorm-srgb', 'astc-5x5-unorm', 'astc-5x5-unorm-srgb', 'astc-6x5-unorm', 'astc-6x5-unorm-srgb', 'astc-6x6-unorm', 'astc-6x6-unorm-srgb', 'astc-8x5-unorm', 'astc-8x5-unorm-srgb', 'astc-8x6-unorm', 'astc-8x6-unorm-srgb', 'astc-8x8-unorm', 'astc-8x8-unorm-srgb', 'astc-10x5-unorm', 'astc-10x5-unorm-srgb', 'astc-10x6-unorm', 'astc-10x6-unorm-srgb', 'astc-10x8-unorm', 'astc-10x8-unorm-srgb', 'astc-10x10-unorm', 'astc-10x10-unorm-srgb', 'astc-12x10-unorm', 'astc-12x10-unorm-srgb', 'astc-12x12-unorm', 'astc-12x12-unorm-srgb'

    GPUBlendState

    • color: GPUBlendComponentrequired
    • alpha: GPUBlendComponentrequired

    GPUBlendComponent

    • operation: GPUBlendOperation= 'add'
    • srcFactor: GPUBlendFactor= 'one'
    • dstFactor: GPUBlendFactor= 'zero'

    GPUBlendOperation

    'add', 'subtract', 'reverse-subtract', 'min', 'max'

    GPUBlendFactor

    'zero', 'one', 'src', 'one-minus-src', 'src-alpha', 'one-minus-src-alpha', 'dst', 'one-minus-dst', 'dst-alpha', 'one-minus-dst-alpha', 'src-alpha-saturated', 'constant', 'one-minus-constant'

    GPUColorWriteFlags