Shader resource binding interface. More...
#include <ShaderResourceBinding.h>
Public Member Functions | |
virtual struct IPipelineResourceSignature *DILIGENT_CALL_TYPE | GetPipelineResourceSignature () const =0 |
virtual void DILIGENT_CALL_TYPE | BindResources (SHADER_TYPE ShaderStages, IResourceMapping *pResMapping, BIND_SHADER_RESOURCES_FLAGS Flags)=0 |
Binds SRB resources using the resource mapping. | |
virtual SHADER_RESOURCE_VARIABLE_TYPE_FLAGS DILIGENT_CALL_TYPE | CheckResources (SHADER_TYPE ShaderStages, IResourceMapping *pResMapping, BIND_SHADER_RESOURCES_FLAGS Flags) const =0 |
Checks currently bound resources, see remarks. | |
virtual IShaderResourceVariable *DILIGENT_CALL_TYPE | GetVariableByName (SHADER_TYPE ShaderType, const Char *Name)=0 |
Returns the variable by its name. | |
virtual Uint32 DILIGENT_CALL_TYPE | GetVariableCount (SHADER_TYPE ShaderType) const =0 |
Returns the total variable count for the specific shader stage. | |
virtual IShaderResourceVariable *DILIGENT_CALL_TYPE | GetVariableByIndex (SHADER_TYPE ShaderType, Uint32 Index)=0 |
Returns the variable by its index. | |
virtual Bool DILIGENT_CALL_TYPE | StaticResourcesInitialized () const =0 |
Returns true if static resources have been initialized in this SRB. | |
![]() | |
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 |
Shader resource binding interface.
|
pure virtual |
Binds SRB resources using the resource mapping.
[in] | ShaderStages | - Flags that specify shader stages, for which resources will be bound. Any combination of Diligent::SHADER_TYPE may be used. |
[in] | pResMapping | - Shader resource mapping where required resources will be looked up. |
[in] | Flags | - Additional flags. See Diligent::BIND_SHADER_RESOURCES_FLAGS. |
|
pure virtual |
Checks currently bound resources, see remarks.
[in] | ShaderStages | - Flags that specify shader stages, for which to check resources. Any combination of Diligent::SHADER_TYPE may be used. |
[in] | pResMapping | - Optional shader resource mapping where resources will be looked up. May be null. |
[in] | Flags | - Additional flags, see remarks. |
This method may be used to perform various checks of the currently bound resources:
|
pure virtual |
Returns a pointer to the pipeline resource signature object that defines the layout of this shader resource binding object. The method does NOT increment the reference counter of the returned object, so Release() must not be called.
|
pure virtual |
Returns the variable by its index.
[in] | ShaderType | - Type of the shader to look up the variable. Must be one of Diligent::SHADER_TYPE. |
[in] | Index | - Variable index. The index must be between 0 and the total number of variables in this shader stage as returned by IShaderResourceBinding::GetVariableCount(). |
Only mutable and dynamic variables can be accessed through this method. Static variables are accessed through the Shader object.
|
pure virtual |
Returns the variable by its name.
[in] | ShaderType | - Type of the shader to look up the variable. Must be one of Diligent::SHADER_TYPE. |
[in] | Name | - Variable name. |
|
pure virtual |
Returns the total variable count for the specific shader stage.
[in] | ShaderType | - Type of the shader. |
The method only counts mutable and dynamic variables that can be accessed through the Shader Resource Binding object. Static variables are accessed through the Shader object.