Pipeline state load info. More...
#include <RenderStateNotationLoader.h>
Public Attributes | |
const Char * | Name = nullptr |
Name of the PSO to load. | |
PIPELINE_TYPE | PipelineType = PIPELINE_TYPE_INVALID |
The type of the pipeline state to load, see Diligent::PIPELINE_TYPE. | |
bool | AddToCache = true |
Flag indicating whether to add the pipeline state to the internal cache. | |
bool | LookupInCache = true |
void(* | ModifyPipeline )(PipelineStateCreateInfo &, void *) = nullptr |
void * | pModifyPipelineData = nullptr |
A pointer to the user data to pass to the ModifyPipeline function. | |
void(* | ModifyShader )(ShaderCreateInfo &, SHADER_TYPE, bool &, void *) = nullptr |
void * | pModifyShaderData = nullptr |
A pointer to the user data to pass to the ModifyShader function. | |
void(* | ModifyResourceSignature )(PipelineResourceSignatureDesc &, bool &, void *) = nullptr |
void * | pModifyResourceSignatureData = nullptr |
A pointer to the user data to pass to the ModifyResourceSignature function. | |
void(* | ModifyRenderPass )(RenderPassDesc &, bool &, void *) = nullptr |
void * | pModifyRenderPassData = nullptr |
A pointer to the user data to pass to the ModifyRenderPass function. | |
Pipeline state load info.
bool Diligent::LoadPipelineStateInfo::LookupInCache = true |
Indicates whether to look up the pipeline state and its resources (shaders, resource signatures, render pass) in the cache.
If the pipeline state with the specified name has already been requested, and the AddToCache
flag was set to true
, the pipeline will be returned from the cache, unless the LookupInCache
flag is set to false
.
Disabling cache lookup may be useful when the pipeline with the same name is already in the cache, but the application wants to load a different pipeline with the same name by modifying the pipeline desc.
If LookupInCache
is false
, and AddToCache
is true
, the new pipeline will replace the existing pipeline in the cache, if any.
void(* Diligent::LoadPipelineStateInfo::ModifyPipeline) (PipelineStateCreateInfo &, void *) = nullptr |
An optional function to be called by the render state notation loader 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:
An application may modify shader pointers, resource signature pointers and render pass pointer, but it must ensure that all objects are compatible. The callbacks are executed in the following order:
void(* Diligent::LoadPipelineStateInfo::ModifyRenderPass) (RenderPassDesc &, bool &, void *) = nullptr |
An optional function to be called by the render state notation loader to let the application modify the pipeline render pass descriptor.
The second (bool
) parameter indicates whether the modified render pass object should be added to the internal cache and should be set by the callee.
void(* Diligent::LoadPipelineStateInfo::ModifyResourceSignature) (PipelineResourceSignatureDesc &, bool &, void *) = nullptr |
An optional function to be called by the render state notation loader to let the application modify the pipeline resource signature descriptor.
The second (bool
) parameter indicates whether the modified resource signature object should be added to the internal cache and should be set by the callee.
void(* Diligent::LoadPipelineStateInfo::ModifyShader) (ShaderCreateInfo &, SHADER_TYPE, bool &, void *) = nullptr |
An optional function to be called by the render state notation loader to let the application modify the shader create info.
An application should choose shader stage to modify.
switch (ShaderType) { case SHADER_TYPE_VERTEX: ShaderCI.Macros = MacrosList; break; case ... }
The following members of the structure must not be modified:
The third (bool) parameter indicates whether the modified shader object should be added to the internal cache and should be set by the callee.