Pipeline resource signature interface. More...
#include <PipelineResourceSignature.h>
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. | |
![]() | |
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. | |
![]() | |
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 |
Pipeline resource signature interface.
|
pure virtual |
Binds static resources for the specified shader stages in the pipeline resource signature.
[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. |
|
pure virtual |
Copies static resource bindings to the destination signature.
[in] | pDstSignature | - Destination pipeline resource signature. |
|
pure virtual |
Creates a shader resource binding object.
[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(). |
|
pure virtual |
Returns static shader resource variable by its index.
[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().
|
pure virtual |
Returns static shader resource variable. If the variable is not found, returns nullptr.
[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().
|
pure virtual |
Returns the number of static shader resource variables.
[in] | ShaderType | - Type of the shader. |
|
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.
[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.
|
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.