# D3D12 Pipeline State

class `renderdoc.``D3D12State`

  The full current D3D12 pipeline state.

  `computeShader`

    A `D3D12Shader` describing the compute shader stage.

  `domainShader`

    A `D3D12Shader` describing the domain shader stage.

  `geometryShader`

    A `D3D12Shader` describing the geometry shader stage.

  `hullShader`

    A `D3D12Shader` describing the hull shader stage.

  `inputAssembly`

    A `D3D12InputAssembly` describing the input assembly pipeline stage.

  `outputMerger`

    A `D3D12OM` describing the output merger pipeline stage.

  `pipelineResourceId`

    The `ResourceId` of the pipeline state object.

  `pixelShader`

    A `D3D12Shader` describing the pixel shader stage.

  `rasterizer`

    A `D3D12Rasterizer` describing the rasterizer pipeline stage.

  `resourceStates`

    A list of `D3D12ResourceData` entries, one for each resource.

  `rootSignatureResourceId`

    The `ResourceId` of the root signature object.

  `streamOut`

    A `D3D12StreamOut` describing the stream-out pipeline stage.

  `vertexShader`

    A `D3D12Shader` describing the vertex shader stage.

class `renderdoc.``D3D12Layout`

  Describes a single D3D12 input layout element for one vertex input.

  `TightlyPacked`

    Value for `byteOffset` that indicates this element is tightly packed.

  `byteOffset`

    The byte offset from the start of the vertex data in the vertex buffer from `inputSlot`.

    If the value is `TightlyPacked` then the element is packed tightly after the previous element, or 0 if this is the first element.

  `format`

    The `ResourceFormat` describing how the input data is interpreted.

  `inputSlot`

    The vertex buffer input slot where the data is sourced from.

  `instanceDataStepRate`

    If `perInstance` is `True` then this is how many times each instance data is used before advancing to the next instance.

    E.g. if this value is two, then two instances will be drawn with the first instance data, then two with the next instance data.

  `perInstance`

    `True` if the vertex data is instance-rate.

  `semanticIndex`

    The semantic index for this input.

  `semanticName`

    The semantic name for this input.

class `renderdoc.``D3D12VertexBuffer`

  Describes a single D3D12 vertex buffer binding.

  `byteOffset`

    The byte offset from the start of the buffer to the beginning of the vertex data.

  `byteSize`

    The number of bytes available in this vertex buffer.

  `byteStride`

    The byte stride between the start of one set of vertex data and the next.

  `resourceId`

    The `ResourceId` of the buffer bound to this slot.

class `renderdoc.``D3D12IndexBuffer`

  Describes the D3D12 index buffer binding.

  `byteOffset`

    The byte offset from the start of the buffer to the beginning of the index data.

  `byteSize`

    The number of bytes available in this index buffer.

  `resourceId`

    The `ResourceId` of the index buffer.

class `renderdoc.``D3D12InputAssembly`

  Describes the input assembler state in the PSO.

  `indexBuffer`

    The `D3D12IndexBuffer` describing the index buffer.

  `indexStripCutValue`

    The index value to use for cutting strips. Either `0`, `0xffff` or `0xffffffff`. If the value is 0, strip cutting is disabled.

  `layouts`

    A list of `D3D12Layout` describing the input layout elements in this layout.

  `vertexBuffers`

    A list of `D3D12VertexBuffer` with the vertex buffers that are bound.

class `renderdoc.``D3D12View`

  Describes the details of a D3D12 resource view - any one of UAV, SRV, RTV or DSV.

  `bufferFlags`

    The `D3DBufferViewFlags` set for the buffer.

  `bufferStructCount`

    If the view has a hidden counter, this stores the current value of the counter.

  `counterByteOffset`

    The byte offset in `counterResourceId` where the counter is stored.

  `counterResourceId`

    The `ResourceId` of the resource where the hidden buffer counter is stored.

  `elementByteSize`

    The byte size of a single element in the view. Either the byte size of `viewFormat`, or the structured buffer element size, as appropriate.

  `firstElement`

    Valid for buffers - the first element to be used in the view.

  `firstMip`

    Valid for textures - the highest mip that is available through the view.

  `firstSlice`

    Valid for texture arrays or 3D textures - the first slice available through the view.

  `immediate`

    `True` if this view is a root parameter (i.e. not in a table).

  `minLODClamp`

    The minimum mip-level clamp applied when sampling this texture.

  `numElements`

    Valid for buffers - the number of elements to be used in the view.

  `numMips`

    Valid for textures - the number of mip levels in the view.

  `numSlices`

    Valid for texture arrays or 3D textures - the number of slices in the view.

  `resourceId`

    The `ResourceId` of the underlying resource the view refers to.

  `rootElement`

    The index in the original root signature that this descriptor came from.

  `swizzle`

    Four `TextureSwizzle` elements indicating the swizzle applied to this texture.

  `tableIndex`

    The index in the the parent descriptor table where this descriptor came from.

  `type`

    The `TextureType` of the view type.

  `viewFormat`

    The `ResourceFormat` that the view uses.

class `renderdoc.``D3D12Sampler`

  Describes the details of a sampler descriptor.

  `UseBorder`()

    Check if the border color is used in this D3D12 sampler.

    Returns: | `True` if the border color is used, `False` otherwise.
    Return type: | `bool`

  `addressU`

    The `AddressMode` in the U direction.

  `addressV`

    The `AddressMode` in the V direction.

  `addressW`

    The `AddressMode` in the W direction.

  `borderColor`

    The RGBA border color.

  `compareFunction`

    The `CompareFunction` for comparison samplers.

  `filter`

    The `TextureFilter` describing the filtering mode.

  `immediate`

    `True` if this view is a static sampler (i.e. not in a table).

  `maxAnisotropy`

    The maximum anisotropic filtering level to use.

  `maxLOD`

    The maximum mip level that can be used.

  `minLOD`

    The minimum mip level that can be used.

  `mipLODBias`

    A bias to apply to the calculated mip level before sampling.

  `rootElement`

    The index in the original root signature that this descriptor came from.

  `tableIndex`

    The index in the the parent descriptor table where this descriptor came from.

class `renderdoc.``D3D12ConstantBuffer`

  Describes the details of a constant buffer view descriptor.

  `byteOffset`

    The byte offset where the buffer view starts in the underlying buffer.

  `byteSize`

    How many bytes are in this constant buffer view.

  `immediate`

    `True` if this view is a root constant (i.e. not in a table).

  `resourceId`

    The `ResourceId` of the underlying buffer resource.

  `rootElement`

    The index in the original root signature that this descriptor came from.

  `rootValues`

    If `immediate` is `True` and this is a root constant, this contains a list of `int` values with the root values set.

  `tableIndex`

    The index in the the parent descriptor table where this descriptor came from.

class `renderdoc.``D3D12RegisterSpace`

  Contains all of the registers in a single register space mapped to by a root signature.

  `constantBuffers`

    List of `D3D12ConstantBuffer` containing the constant buffers.

  `samplers`

    List of `D3D12Sampler` containing the samplers.

  `spaceIndex`

    The index of this space, since space indices can be sparse

  `srvs`

    List of `D3D12View` containing the SRVs.

  `uavs`

    List of `D3D12View` containing the UAVs.

class `renderdoc.``D3D12Shader`

  Describes a D3D12 shader stage.

  `FindSpace`(spaceIndex)

    Return the index in the `spaces` array of a given register space.

    Returns: | The index if the space exists, or `-1` if it doesn’t.
    Return type: | `int`

  `bindpointMapping`

    A `ShaderBindpointMapping` to match `reflection` with the bindpoint mapping data.

  `reflection`

    A `ShaderReflection` describing the reflection data for this shader.

  `resourceId`

    The `ResourceId` of the shader object itself.

  `spaces`

    A list of `D3D12RegisterSpace` with the register spaces for this stage.

  `stage`

    A `ShaderStage` identifying which stage this shader is bound to.

class `renderdoc.``D3D12StreamOutBind`

  Describes a binding on the D3D12 stream-out stage.

  `byteOffset`

    The byte offset in `resourceId` where the buffer view starts in the underlying buffer.

  `byteSize`

    How many bytes are in this stream-out buffer view.

  `resourceId`

    The `ResourceId` of the buffer.

  `writtenCountByteOffset`

    The byte offset in `writtenCountResourceId` where the stream-out count will be written.

  `writtenCountResourceId`

    The `ResourceId` of the buffer where the written count will be stored.

class `renderdoc.``D3D12StreamOut`

  Describes the stream-out state in the PSO.

  `outputs`

    A list of `D3D12SOBind` with the bound buffers.

class `renderdoc.``D3D12RasterizerState`

  Describes the rasterizer state in the PSO.

  `antialiasedLines`

    `True` if lines should be anti-aliased. Ignored if `multisampleEnable` is `False`.

  `conservativeRasterization`

    The current `ConservativeRaster` mode.

  `cullMode`

    The polygon `CullMode`.

  `depthBias`

    The fixed depth bias value to apply to z-values.

  `depthBiasClamp`

    The clamp value for calculated depth bias from `depthBias` and `slopeScaledDepthBias`

  `depthClip`

    `True` if pixels outside of the near and far depth planes should be clipped.

  `fillMode`

    The polygon `FillMode`.

  `forcedSampleCount`

    A sample count to force rasterization to when UAV rendering or rasterizing, or 0 to not force any sample count.

  `frontCCW`

    `True` if counter-clockwise polygons are front-facing. `False` if clockwise polygons are front-facing.

  `multisampleEnable`

    `True` if the quadrilateral MSAA algorithm should be used on MSAA targets.

  `slopeScaledDepthBias`

    The slope-scaled depth bias value to apply to z-values.

class `renderdoc.``D3D12Rasterizer`

  Describes the rasterization state of the D3D12 pipeline.

  `sampleMask`

    The mask determining which samples are written to.

  `scissors`

    A list of `Scissor` with the bound scissor regions.

  `state`

    A `D3D12RasterizerState` with the details of the rasterization state.

  `viewports`

    A list of `Viewport` with the bound viewports.

class `renderdoc.``D3D12DepthStencilState`

  Describes the state of the depth-stencil state in the PSO.

  `backFace`

    A `StencilFace` describing what happens for back-facing polygons.

  `depthBoundsEnable`

    `True` if depth bounds tests should be applied.

  `depthEnable`

    `True` if depth testing should be performed.

  `depthFunction`

    The `CompareFunction` to use for testing depth values.

  `depthWrites`

    `True` if depth values should be written to the depth target.

  `frontFace`

    A `StencilFace` describing what happens for front-facing polygons.

  `maxDepthBounds`

    The far plane bounding value.

  `minDepthBounds`

    The near plane bounding value.

  `stencilEnable`

    `True` if stencil operations should be performed.

class `renderdoc.``D3D12BlendState`

  Describes the blend state in the PSO.

  `alphaToCoverage`

    `True` if alpha-to-coverage should be used when blending to an MSAA target.

  `blendFactor`

    The constant blend factor to use in blend equations.

  `blends`

    A list of `ColorBlend` describing the blend operations for each target.

  `independentBlend`

    `True` if independent blending for each target should be used.

    `False` if the first blend should be applied to all targets.

class `renderdoc.``D3D12OM`

  Describes the current state of the output-merger stage of the D3D12 pipeline.

  `blendState`

    A `D3D12BlendState` with the details of the blend state.

  `depthReadOnly`

    `True` if depth access to the depth-stencil target is read-only.

  `depthStencilState`

    A `D3D12DepthStencilState` with the details of the depth-stencil state.

  `depthTarget`

    A `D3D12View` with details of the bound depth-stencil target.

  `multiSampleCount`

    The sample count used for rendering.

  `multiSampleQuality`

    The MSAA quality level used for rendering.

  `renderTargets`

    A list of `D3D12View` describing the bound render targets.

  `stencilReadOnly`

    `True` if stenncil access to the depth-stencil target is read-only.

class `renderdoc.``D3D12ResourceState`

  Describes the current state that a sub-resource is in.

  `name`

    A human-readable name for the current state.

class `renderdoc.``D3D12ResourceData`

  Contains the current state of a given resource.

  `resourceId`

    The `ResourceId` of the resource.

  `states`

    A list of `D3D12ResourceState` entries, one for each subresource.