Efficiently creates a graphics Pipeline State object that is derived from another Pipeline State object.
public:
HRESULT CreateDerivedGraphicsPipelineStateX(
ID3D12PipelineState *pSrcPipelineState,
UINT NumDescs,
const D3D12XBOX_DERIVED_GRAPHICS_STATE_DESC *pDescs,
REFIID riid,
void **ppDerivedPipelineState
)
pSrcPipelineState
Type: ID3D12PipelineState *
[in] The source pipeline state, as a pointer to ID3D12PipelineState.
NumDescs
Type: UINT
[in] The number of D3D12XBOX_DERIVED_GRAPHICS_STATE_DESC structures in pDescs.
pDescs
Type: D3D12XBOX_DERIVED_GRAPHICS_STATE_DESC *
[in] The descriptions, as an array of D3D12XBOX_DERIVED_GRAPHICS_STATE_DESC structures.
riid
Type: REFIID
[in] The globally unique identifier (GUID) for the pipeline state interface (ID3D12PipelineState). The REFIID, or GUID, of the interface to the pipeline state can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D12PipelineState) will get the GUID of the interface to a pipeline state. An input parameter.
ppDerivedPipelineState
Type: void **
[out] The resulting derived graphics Pipeline State object.
Type: HRESULT
One of the Direct3D 12 return codes.
This method provides an efficient means of creating a graphics Pipeline State object that is derived from another Pipeline State object. The new derived object is created using the source object’s state as the base state while allowing depth/stencil, rasterizer, and/or blend state to be changed.
This method can be useful when not all permutations of Pipeline State object state can reasonably be known and created offline using ID3D12Device::DeserializeGraphicsPipelineStateX, as CreateDerivedGraphicsPipelineStateX allows for efficient run-time creation with classes of arbitrary state. CreateDerivedGraphicsPipelineStateX is lightweight both in terms of CPU and memory.
Individual state groupings (such as blend or rasterizer state) may be changed. Any state not overridden will be set to the same values as the source Pipeline State object. NumDescs describes the count of state groupings to change. Type identifies the type of each state grouping.
Caller Responsibilities:
CreateDerivedGraphicsPipelineStateX guarantees that no shader recompilation or patching will be done as part of the creation process.
Header: Declared in d3d12_x.h.
Library: Use d3d12_x.lib.