29 #include "PipelineStateD3D11.h" 30 #include "RenderDeviceD3D11.h" 31 #include "PipelineStateBase.h" 32 #include "ShaderD3D11Impl.h" 33 #include "AdaptiveFixedBlockAllocator.h" 38 class FixedBlockMemoryAllocator;
48 virtual void QueryInterface(
const Diligent::INTERFACE_ID &IID, IObject **ppInterface )
override final;
73 IMemoryAllocator &GetResourceCacheDataAllocator(Uint32 ActiveShaderInd)
76 auto *pAllocator = m_Allocators.GetResourceCacheDataAllocator(ActiveShaderInd);
79 IMemoryAllocator &GetShaderResLayoutDataAllocators(Uint32 ActiveShaderInd)
82 auto *pAllocator = m_Allocators.GetShaderResLayoutDataAllocator(ActiveShaderInd);
88 CComPtr<ID3D11BlendState> m_pd3d11BlendState;
89 CComPtr<ID3D11RasterizerState> m_pd3d11RasterizerState;
90 CComPtr<ID3D11DepthStencilState> m_pd3d11DepthStencilState;
91 CComPtr<ID3D11InputLayout> m_pd3d11InputLayout;
97 void Init(
size_t NumActiveShaders, Uint32 SRBAllocationGranularity);
98 AdaptiveFixedBlockAllocator* GetShaderResLayoutDataAllocator(Uint32 Ind)
100 VERIFY_EXPR(Ind < _countof(m_pShaderResLayoutDataAllocators));
101 return m_pShaderResLayoutDataAllocators[Ind];
103 AdaptiveFixedBlockAllocator* GetResourceCacheDataAllocator(Uint32 Ind)
105 VERIFY_EXPR(Ind < _countof(m_pResourceCacheDataAllocators));
106 return m_pResourceCacheDataAllocators[Ind];
109 AdaptiveFixedBlockAllocator* m_pShaderResLayoutDataAllocators[5] = {};
110 AdaptiveFixedBlockAllocator* m_pResourceCacheDataAllocators[5] = {};
115 std::unique_ptr<class ShaderResourceBindingD3D11Impl, STDDeleter<ShaderResourceBindingD3D11Impl, FixedBlockMemoryAllocator> > m_pDefaultShaderResBinding;
Shader resource variable.
Definition: Shader.h:265
Template class implementing base functionality for a pipeline state object.
Definition: PipelineStateBase.h:46
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
virtual ID3D11BlendState * GetD3D11BlendState() override final
Implementation of the IPipelineStateD3D11::GetD3D11BlendState() method.
Definition: PipelineStateD3D11Impl.cpp:145
virtual ID3D11GeometryShader * GetD3D11GeometryShader() override final
Returns a pointer to the ID3D11GeometryShader interface of the internal geometry shader object...
Definition: PipelineStateD3D11Impl.cpp:204
virtual ID3D11InputLayout * GetD3D11InputLayout() override final
Returns a pointer to the ID3D11InputLayout interface of the internal Direct3D11 object.
Definition: PipelineStateD3D11Impl.cpp:160
IMemoryAllocator & GetRawAllocator()
Returns raw memory allocator.
Definition: EngineMemory.cpp:46
Resouce mapping.
Definition: ResourceMapping.h:80
Shader resource binding interface.
Definition: ShaderResourceBinding.h:40
virtual ID3D11DepthStencilState * GetD3D11DepthStencilState() override final
Implementation of the IPipelineStateD3D11::GetD3D11DepthStencilState() method.
Definition: PipelineStateD3D11Impl.cpp:155
Implementation of a dummy shader variable that silently ignores all operations.
Definition: ShaderBase.h:146
Implementation of the Diligent::IShaderResourceBindingD3D11 interface.
Definition: ShaderResourceBindingD3D11Impl.h:41
virtual ID3D11RasterizerState * GetD3D11RasterizerState() override final
Implementation of the IPipelineStateD3D11::GetD3D11RasterizerState() method.
Definition: PipelineStateD3D11Impl.cpp:150
Implementation of the Diligent::IPipelineStateD3D11 interface.
Definition: PipelineStateD3D11Impl.h:40
Uint32 m_NumShaders
Number of shaders that this PSO uses.
Definition: PipelineStateBase.h:191
virtual void CreateShaderResourceBinding(IShaderResourceBinding **ppShaderResourceBinding) override final
Creates a shader resource binding object.
Definition: PipelineStateD3D11Impl.cpp:181
Implementation of the Diligent::IRenderDeviceD3D11 interface.
Definition: RenderDeviceD3D11Impl.h:38
virtual ID3D11DomainShader * GetD3D11DomainShader() override final
Returns a pointer to the ID3D11DomainShader interface of the internal domain shader object...
Definition: PipelineStateD3D11Impl.cpp:211
virtual void BindShaderResources(IResourceMapping *pResourceMapping, Uint32 Flags) override final
Binds resources for all shaders in the pipeline state.
Definition: PipelineStateD3D11Impl.cpp:165
virtual ID3D11ComputeShader * GetD3D11ComputeShader() override final
Returns a pointer to the ID3D11ComputeShader interface of the internal compute shader object...
Definition: PipelineStateD3D11Impl.cpp:225
virtual ID3D11HullShader * GetD3D11HullShader() override final
Returns a pointer to the ID3D11HullShader interface of the internal hull shader object.
Definition: PipelineStateD3D11Impl.cpp:218
virtual ID3D11PixelShader * GetD3D11PixelShader() override final
Returns a pointer to the ID3D11PixelShader interface of the internal pixel shader object...
Definition: PipelineStateD3D11Impl.cpp:197
Pipeline state description.
Definition: PipelineState.h:179
virtual ID3D11VertexShader * GetD3D11VertexShader() override final
Returns a pointer to the ID3D11VertexShader interface of the internal vertex shader object...
Definition: PipelineStateD3D11Impl.cpp:190