Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::IPipelineResourceSignature Struct Referenceabstract

Pipeline resource signature interface. More...

#include <PipelineResourceSignature.h>

Inheritance diagram for Diligent::IPipelineResourceSignature:
Diligent::IDeviceObject Diligent.IObject

Public Member Functions

virtual const PipelineResourceSignatureDesc &DILIGENT_CALL_TYPE GetDesc () const override=0
 Returns the pipeline resource signature description, see Diligent::PipelineResourceSignatureDesc.
 
virtual void DILIGENT_CALL_TYPE CreateShaderResourceBinding (IShaderResourceBinding **ppShaderResourceBinding, Bool InitStaticResources=false)=0
 Creates a shader resource binding object.
 
virtual void DILIGENT_CALL_TYPE BindStaticResources (SHADER_TYPE ShaderStages, IResourceMapping *pResourceMapping, BIND_SHADER_RESOURCES_FLAGS Flags)=0
 Binds static resources for the specified shader stages in the pipeline resource signature.
 
virtual IShaderResourceVariable *DILIGENT_CALL_TYPE GetStaticVariableByName (SHADER_TYPE ShaderType, const Char *Name)=0
 
virtual IShaderResourceVariable *DILIGENT_CALL_TYPE GetStaticVariableByIndex (SHADER_TYPE ShaderType, Uint32 Index)=0
 Returns static shader resource variable by its index.
 
virtual Uint32 DILIGENT_CALL_TYPE GetStaticVariableCount (SHADER_TYPE ShaderType) const =0
 Returns the number of static shader resource variables.
 
virtual void DILIGENT_CALL_TYPE InitializeStaticSRBResources (struct IShaderResourceBinding *pShaderResourceBinding) const =0
 Initializes static resources in the shader binding object.
 
virtual void DILIGENT_CALL_TYPE CopyStaticResources (IPipelineResourceSignature *pDstSignature) const =0
 Copies static resource bindings to the destination signature.
 
virtual Bool DILIGENT_CALL_TYPE IsCompatibleWith (const struct IPipelineResourceSignature *pPRS) const =0
 Returns true if the signature is compatible with another one.
 
- Public Member Functions inherited from Diligent::IDeviceObject
virtual Int32 DILIGENT_CALL_TYPE GetUniqueID () const =0
 Returns unique identifier assigned to an object.
 
virtual void DILIGENT_CALL_TYPE SetUserData (IObject *pUserData)=0
 Stores a pointer to the user-provided data object.
 
virtual IObject *DILIGENT_CALL_TYPE GetUserData () const =0
 Returns a pointer to the user data object previously set with SetUserData() method.
 
- Public Member Functions inherited from Diligent.IObject
virtual void DILIGENT_CALL_TYPE QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface.
 
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef ()=0
 Increments the number of strong references by 1.
 
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release ()=0
 
virtual IReferenceCounters *DILIGENT_CALL_TYPE GetReferenceCounters () const =0
 

Detailed Description

Pipeline resource signature interface.

Member Function Documentation

◆ BindStaticResources()

virtual void DILIGENT_CALL_TYPE Diligent::IPipelineResourceSignature::BindStaticResources ( SHADER_TYPE ShaderStages,
IResourceMapping * pResourceMapping,
BIND_SHADER_RESOURCES_FLAGS Flags )
pure virtual

Binds static resources for the specified shader stages in the pipeline resource signature.

Parameters
[in]ShaderStages- Flags that specify shader stages, for which resources will be bound. Any combination of Diligent::SHADER_TYPE may be used.
[in]pResourceMapping- Pointer to the resource mapping interface.
[in]Flags- Additional flags. See Diligent::BIND_SHADER_RESOURCES_FLAGS.

◆ CopyStaticResources()

virtual void DILIGENT_CALL_TYPE Diligent::IPipelineResourceSignature::CopyStaticResources ( IPipelineResourceSignature * pDstSignature) const
pure virtual

Copies static resource bindings to the destination signature.

Parameters
[in]pDstSignature- Destination pipeline resource signature.
Note
Destination signature must be compatible with this signature.

◆ CreateShaderResourceBinding()

virtual void DILIGENT_CALL_TYPE Diligent::IPipelineResourceSignature::CreateShaderResourceBinding ( IShaderResourceBinding ** ppShaderResourceBinding,
Bool InitStaticResources = false )
pure virtual

Creates a shader resource binding object.

Parameters
[out]ppShaderResourceBinding- Memory location where pointer to the new shader resource binding object is written.
[in]InitStaticResources- If set to true, the method will initialize static resources in the created object, which has the exact same effect as calling IPipelineResourceSignature::InitializeStaticSRBResources().

◆ GetStaticVariableByIndex()

virtual IShaderResourceVariable *DILIGENT_CALL_TYPE Diligent::IPipelineResourceSignature::GetStaticVariableByIndex ( SHADER_TYPE ShaderType,
Uint32 Index )
pure virtual

Returns static shader resource variable by its index.

Parameters
[in]ShaderType- Type of the shader to look up the variable. Must be one of Diligent::SHADER_TYPE.
[in]Index- Shader variable index. The index must be between 0 and the total number of variables returned by GetStaticVariableCount().

If a variable is shared between multiple shader stages, it can be accessed using any of those shader stages. Even though IShaderResourceVariable instances returned by the method may be different for different stages, internally they will reference the same resource.

Only static shader resource variables can be accessed using this method. Mutable and dynamic variables are accessed through Shader Resource Binding object.

The method does not increment the reference counter of the returned interface, and the application must not call Release() unless it explicitly called AddRef().

◆ GetStaticVariableByName()

virtual IShaderResourceVariable *DILIGENT_CALL_TYPE Diligent::IPipelineResourceSignature::GetStaticVariableByName ( SHADER_TYPE ShaderType,
const Char * Name )
pure virtual

Returns static shader resource variable. If the variable is not found, returns nullptr.

Parameters
[in]ShaderType- Type of the shader to look up the variable. Must be one of Diligent::SHADER_TYPE.
[in]Name- Name of the variable.

If a variable is shared between multiple shader stages, it can be accessed using any of those shader stages. Even though IShaderResourceVariable instances returned by the method may be different for different stages, internally they will reference the same resource.

Only static shader resource variables can be accessed using this method. Mutable and dynamic variables are accessed through Shader Resource Binding object.

The method does not increment the reference counter of the returned interface, and the application must not call Release() unless it explicitly called AddRef().

◆ GetStaticVariableCount()

virtual Uint32 DILIGENT_CALL_TYPE Diligent::IPipelineResourceSignature::GetStaticVariableCount ( SHADER_TYPE ShaderType) const
pure virtual

Returns the number of static shader resource variables.

Parameters
[in]ShaderType- Type of the shader.
Remarks
Only static variables (that can be accessed directly through the PSO) are counted. Mutable and dynamic variables are accessed through Shader Resource Binding object.

◆ InitializeStaticSRBResources()

virtual void DILIGENT_CALL_TYPE Diligent::IPipelineResourceSignature::InitializeStaticSRBResources ( struct IShaderResourceBinding * pShaderResourceBinding) const
pure virtual

Initializes static resources in the shader binding object.

If static shader resources were not initialized when the SRB was created, this method must be called to initialize them before the SRB can be used. The method should be called after all static variables have been initialized in the signature.

Parameters
[in]pShaderResourceBinding- Shader resource binding object to initialize. The pipeline resource signature must be compatible with the shader resource binding object.

If static resources have already been initialized in the SRB and the method is called again, it will have no effect and a warning message will be displayed.

◆ IsCompatibleWith()

virtual Bool DILIGENT_CALL_TYPE Diligent::IPipelineResourceSignature::IsCompatibleWith ( const struct IPipelineResourceSignature * pPRS) const
pure virtual

Returns true if the signature is compatible with another one.

Two signatures are compatible if they contain identical resources and immutabke samplers, defined in the same order disregarding their names.