77 #include "ShaderResources.h" 90 __forceinline Int32 GetMaxCBBindPoint()
const{
return m_MaxCBBindPoint; }
91 __forceinline Int32 GetMaxSRVBindPoint()
const{
return m_MaxSRVBindPoint; }
92 __forceinline Int32 GetMaxSamplerBindPoint()
const{
return m_MaxSamplerBindPoint; }
93 __forceinline Int32 GetMaxUAVBindPoint()
const{
return m_MaxUAVBindPoint; }
95 #ifdef VERIFY_SHADER_BINDINGS 96 void dbgVerifyCommittedResources(ID3D11Buffer* CommittedD3D11CBs[],
97 ID3D11ShaderResourceView* CommittedD3D11SRVs[],
98 ID3D11Resource* CommittedD3D11SRVResources[],
99 ID3D11SamplerState* CommittedD3D11Samplers[],
100 ID3D11UnorderedAccessView* CommittedD3D11UAVs[],
101 ID3D11Resource* CommittedD3D11UAVResources[],
105 const Char *GetShaderName()
const{
return m_ShaderName;}
110 typedef Int8 MaxBindPointType;
112 MaxBindPointType m_MaxCBBindPoint = -1;
113 MaxBindPointType m_MaxSRVBindPoint = -1;
114 MaxBindPointType m_MaxSamplerBindPoint = -1;
115 MaxBindPointType m_MaxUAVBindPoint = -1;
116 Uint8 m_NumStaticSamplers = 0;
118 static constexpr UINT MaxAllowedBindPoint = std::numeric_limits<MaxBindPointType>::max();
119 static_assert(D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT-1 <= MaxAllowedBindPoint,
"Not enough bits to represent max CB slot" );
120 static_assert(D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT-1 <= MaxAllowedBindPoint,
"Not enough bits to represent max SRV slot");
121 static_assert(D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT-1 <= MaxAllowedBindPoint,
"Not enough bits to represent max Sampler slot");
122 static_assert(D3D11_PS_CS_UAV_REGISTER_COUNT-1 <= MaxAllowedBindPoint,
"Not enough bits to represent max UAV slot");
126 const Char* m_ShaderName;
128 typedef std::pair<const D3DShaderResourceAttribs*, RefCntAutoPtr<ISampler> > StaticSamplerAttribs;
129 StaticSamplerAttribs& GetStaticSampler(Uint32 n)
131 VERIFY_EXPR(n < m_NumStaticSamplers);
132 return reinterpret_cast< StaticSamplerAttribs*
>(m_StaticSamplers.get())[n];
136 std::unique_ptr< void, STDDeleterRawMem<void > > m_StaticSamplers;
Shader description.
Definition: Shader.h:152
The class implements a cache that holds resources bound to a specific shader stage.
Definition: ShaderResourceCacheD3D11.h:46
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
Diligent::ShaderResources class.
Definition: ShaderResourcesD3D11.h:83
Implementation of the Diligent::IRenderDeviceD3D11 interface.
Definition: RenderDeviceD3D11Impl.h:38