D3D12_GRAPHICS_PIPELINE_STATE_DESC structure (d3d12.h)
Describes a graphics pipeline state object.
Syntax
typedef struct D3D12_GRAPHICS_PIPELINE_STATE_DESC {
ID3D12RootSignature *pRootSignature;
D3D12_SHADER_BYTECODE VS;
D3D12_SHADER_BYTECODE PS;
D3D12_SHADER_BYTECODE DS;
D3D12_SHADER_BYTECODE HS;
D3D12_SHADER_BYTECODE GS;
D3D12_STREAM_OUTPUT_DESC StreamOutput;
D3D12_BLEND_DESC BlendState;
UINT SampleMask;
D3D12_RASTERIZER_DESC RasterizerState;
D3D12_DEPTH_STENCIL_DESC DepthStencilState;
D3D12_INPUT_LAYOUT_DESC InputLayout;
D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue;
D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType;
UINT NumRenderTargets;
DXGI_FORMAT RTVFormats[8];
DXGI_FORMAT DSVFormat;
DXGI_SAMPLE_DESC SampleDesc;
UINT NodeMask;
D3D12_CACHED_PIPELINE_STATE CachedPSO;
D3D12_PIPELINE_STATE_FLAGS Flags;
} D3D12_GRAPHICS_PIPELINE_STATE_DESC;
Members
pRootSignature
A pointer to the ID3D12RootSignature object.
VS
A D3D12_SHADER_BYTECODE structure that describes the vertex shader.
PS
A D3D12_SHADER_BYTECODE structure that describes the pixel shader.
DS
A D3D12_SHADER_BYTECODE structure that describes the domain shader.
HS
A D3D12_SHADER_BYTECODE structure that describes the hull shader.
GS
A D3D12_SHADER_BYTECODE structure that describes the geometry shader.
StreamOutput
A D3D12_STREAM_OUTPUT_DESC structure that describes a streaming output buffer.
BlendState
A D3D12_BLEND_DESC structure that describes the blend state.
SampleMask
The sample mask for the blend state.
RasterizerState
A D3D12_RASTERIZER_DESC structure that describes the rasterizer state.
DepthStencilState
A D3D12_DEPTH_STENCIL_DESC structure that describes the depth-stencil state.
InputLayout
A D3D12_INPUT_LAYOUT_DESC structure that describes the input-buffer data for the input-assembler stage.
IBStripCutValue
Specifies the properties of the index buffer in a D3D12_INDEX_BUFFER_STRIP_CUT_VALUE structure.
PrimitiveTopologyType
A D3D12_PRIMITIVE_TOPOLOGY_TYPE-typed value for the type of primitive, and ordering of the primitive data.
NumRenderTargets
The number of render target formats in the RTVFormats member.
RTVFormats[8]
An array of DXGI_FORMAT-typed values for the render target formats.
DSVFormat
A DXGI_FORMAT-typed value for the depth-stencil format.
SampleDesc
A DXGI_SAMPLE_DESC structure that specifies multisampling parameters.
NodeMask
For single GPU operation, set this to zero. If there are multiple GPU nodes, set bits to identify the nodes (the device's physical adapters) for which the graphics pipeline state is to apply. Each bit in the mask corresponds to a single node. Refer to Multi-adapter systems.
CachedPSO
A cached pipeline state object, as a D3D12_CACHED_PIPELINE_STATE structure. pCachedBlob and CachedBlobSizeInBytes may be set to NULL and 0 respectively.
Flags
A D3D12_PIPELINE_STATE_FLAGS enumeration constant such as for "tool debug".
Remarks
This structure is used by the CreateGraphicsPipelineState method.
The runtime validates:
- Whether the linkage between the shader stages is correct.
- If the HS and DS members are specified, the PrimitiveTopologyType member for topology type must be set to D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH.
- Whether sample frequency execution isn't allowed with the center multi-sample anti-aliasing (MSAA) pattern.
- Whether anti-aliasing lines aren't allowed with the center MSAA pattern.
-
If the ForcedSampleCount member of D3D12_RASTERIZER_DESC that RasterizerState specifies isn't zero:
- Depth/stencil must be disabled.
- Pixel shader can't output depth.
- Pixel shader can't run at sample frequency.
- Render target sample count must be 1.
- Whether blend state is compatible with render target formats.
- Whether pixel shader output type is compatible with render target format.
- Whether the sample count and quality are supported for the render target/depth stencil formats.
Requirements
Requirement | Value |
---|---|
Header | d3d12.h |