Pipeline state unpack parameters. More...
#include <Dearchiver.h>
Public Attributes | |
const Char * | Name = nullptr |
PIPELINE_TYPE | PipelineType = PIPELINE_TYPE_INVALID |
The type of the pipeline state to unpack, see Diligent::PIPELINE_TYPE. | |
Uint32 | SRBAllocationGranularity = 1 |
Shader resource binding allocation granularity. | |
Uint64 | ImmediateContextMask = 1 |
Defines which immediate contexts are allowed to execute commands that use this pipeline state. | |
IPipelineStateCache * | pCache = nullptr |
Optional PSO cache. | |
void(* | ModifyPipelineStateCreateInfo )(PipelineStateCreateInfo &PipelineCI, void *pUserData) = nullptr |
An optional function to be called by the dearchiver to let the application modify the pipeline state create info. | |
void * | pUserData = nullptr |
A pointer to the user data to pass to the ModifyPipelineStateCreateInfo function. | |
Pipeline state unpack parameters.
Uint64 Diligent.PipelineStateUnpackInfo.ImmediateContextMask = 1 |
Defines which immediate contexts are allowed to execute commands that use this pipeline state.
When ImmediateContextMask contains a bit at position n, the pipeline state may be used in the immediate context with index n directly (see DeviceContextDesc::ContextId). It may also be used in a command list recorded by a deferred context that will be executed through that immediate context.
void(* Diligent.PipelineStateUnpackInfo.ModifyPipelineStateCreateInfo) (PipelineStateCreateInfo &PipelineCI, void *pUserData) = nullptr |
An optional function to be called by the dearchiver to let the application modify the pipeline state create info.
An application should check the pipeline type (PipelineCI.Desc.PipelineType) and cast the reference to the appropriate PSO create info struct, e.g. for PIPELINE_TYPE_GRAPHICS:
auto& GraphicsPipelineCI = static_cast<GraphicsPipelineStateCreateInfo>(PipelineCI);
Modifying graphics pipeline states (e.g. rasterizer, depth-stencil, blend, render target formats, etc.) is the most expected usage of the callback.
The following members of the structure must not be modified:
PipelineCI.PSODesc.PipelineType
PipelineCI.PSODesc.ResourceLayout
PipelineCI.ppResourceSignatures
PipelineCI.ResourceSignaturesCount
An application may modify shader pointers (e.g. GraphicsPipelineCI.pVS), but it must ensure that the shader layout is compatible with the pipeline state, otherwise hard-to-debug errors will occur.
const Char* Diligent.PipelineStateUnpackInfo.Name = nullptr |
Name of the PSO to unpack. If there is only one PSO in the archive, the name may be null.
Uint32 Diligent.PipelineStateUnpackInfo.SRBAllocationGranularity = 1 |
Shader resource binding allocation granularity.
This member defines allocation granularity for internal resources required by the shader resource binding object instances. Has no effect if the PSO is created with explicit pipeline resource signature(s).