29 #include "ShaderResourceBindingD3D12.h" 30 #include "RenderDeviceD3D12.h" 31 #include "ShaderResourceBindingBase.h" 32 #include "ShaderBase.h" 33 #include "ShaderResourceCacheD3D12.h" 34 #include "ShaderResourceLayoutD3D12.h" 39 class FixedBlockMemoryAllocator;
48 virtual void QueryInterface(
const Diligent::INTERFACE_ID &IID, IObject **ppInterface )
override;
56 auto ShaderInd = GetShaderTypeIndex(ResType);
57 auto ResLayoutInd = m_ResourceLayoutIndex[ShaderInd];
58 VERIFY(ResLayoutInd >= 0,
"Shader resource layout is not initialized");
59 VERIFY_EXPR(ResLayoutInd < (Int32)m_NumShaders);
60 return m_pResourceLayouts[ResLayoutInd];
62 ShaderResourceCacheD3D12& GetResourceCache(){
return m_ShaderResourceCache;}
64 #ifdef VERIFY_SHADER_BINDINGS 68 bool StaticResourcesInitialized()
const{
return m_bStaticResourcesInitialized;}
73 ShaderResourceCacheD3D12 m_ShaderResourceCache;
76 Int8 m_ResourceLayoutIndex[6] = {-1, -1, -1, -1, -1, -1};
77 bool m_bStaticResourcesInitialized =
false;
78 Uint32 m_NumShaders = 0;
virtual void BindResources(Uint32 ShaderFlags, IResourceMapping *pResMapping, Uint32 Flags) override
Binds all resource using the resource mapping.
Definition: ShaderResourceBindingD3D12Impl.cpp:73
Implementation of the Diligent::IShaderResourceBindingD3D12 interface.
Definition: ShaderResourceBindingD3D12Impl.h:41
Shader resource variable.
Definition: Shader.h:265
SHADER_TYPE
Describes the shader type.
Definition: Shader.h:46
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
Resouce mapping.
Definition: ResourceMapping.h:80
Implementation of the Diligent::IRenderDeviceD3D12 interface.
Definition: PipelineStateD3D12Impl.h:42
Template class implementing base functionality for a shader resource binding.
Definition: ShaderResourceBindingBase.h:42
virtual IShaderVariable * GetVariable(SHADER_TYPE ShaderType, const char *Name) override
Returns variable.
Definition: ShaderResourceBindingD3D12Impl.cpp:88
Diligent::ShaderResourceLayoutD3D12 class.
Definition: ShaderResourceLayoutD3D12.h:125