4#include "render/general/pipeline/Pipeline.h"
5#include "shader/hlsl/SpecialRootParameterSlot.hpp"
6#include "render/general/resource/frame/FrameResourceManager.h"
7#include "render/directx/resource/DirectXResource.h"
10#include "directx/d3dx12.h"
16 using namespace Microsoft::WRL;
18 class DirectXResource;
19 class DirectXRenderer;
33 ComPtr<ID3D12PipelineState>
pPso;
54 std::array<UINT, static_cast<unsigned int>(SpecialRootParameterSlot::SIZE)>
75 std::unordered_map<UINT, std::unique_ptr<ContinuousDirectXDescriptorRange>>
185 const ComPtr<ID3D12GraphicsCommandList>& pCommandList,
size_t iCurrentFrameResourceIndex)
const {
190 for (
const auto& [iRootParameterIndex, vResourcesToBind] :
193 pCommandList->SetGraphicsRootShaderResourceView(
195 vResourcesToBind[iCurrentFrameResourceIndex]
196 ->getInternalResource()
197 ->GetGPUVirtualAddress());
Definition: DirectXPso.h:22
static std::variant< std::shared_ptr< DirectXPso >, Error > createGraphicsPso(Renderer *pRenderer, PipelineManager *pPipelineManager, std::unique_ptr< PipelineConfiguration > pPipelineConfiguration)
Definition: DirectXPso.cpp:35
virtual std::optional< Error > restoreInternalResources() override
Definition: DirectXPso.cpp:136
std::optional< Error > generateGraphicsPso()
Definition: DirectXPso.cpp:150
static std::variant< std::shared_ptr< DirectXPso >, Error > createComputePso(Renderer *pRenderer, PipelineManager *pPipelineManager, const std::string &sComputeShaderName)
Definition: DirectXPso.cpp:53
std::pair< std::recursive_mutex, InternalResources > mtxInternalResources
Definition: DirectXPso.h:227
std::pair< std::recursive_mutex, InternalResources > * getInternalResources()
Definition: DirectXPso.h:131
std::variant< unsigned int, Error > getRootParameterIndex(const std::string &sShaderResourceName)
Definition: DirectXPso.cpp:70
virtual std::optional< Error > releaseInternalResources() override
Definition: DirectXPso.cpp:85
void bindGlobalShaderResourceViews(const ComPtr< ID3D12GraphicsCommandList > &pCommandList, size_t iCurrentFrameResourceIndex) const
Definition: DirectXPso.h:184
std::optional< Error > generateComputePso()
Definition: DirectXPso.cpp:369
Definition: DirectXRenderer.h:36
Definition: DirectXResource.h:32
static constexpr unsigned int getFrameResourceCount()
Definition: FrameResourceManager.h:74
Definition: PipelineManager.h:98
Definition: Pipeline.h:20
const std::unique_ptr< PipelineConfiguration > pPipelineConfiguration
Definition: Pipeline.h:274
Renderer *const pRenderer
Definition: Pipeline.h:280
PipelineManager *const pPipelineManager
Definition: Pipeline.h:277
Definition: Renderer.h:43
Definition: DirectXPso.h:28
bool bIsReadyForUsage
Definition: DirectXPso.h:79
std::array< UINT, static_cast< unsigned int >(SpecialRootParameterSlot::SIZE)> vSpecialRootParameterIndices
Definition: DirectXPso.h:55
std::unordered_map< UINT, std::unique_ptr< ContinuousDirectXDescriptorRange > > descriptorTablesToBind
Definition: DirectXPso.h:76
std::unordered_map< std::string, UINT > rootParameterIndices
Definition: DirectXPso.h:42
ComPtr< ID3D12RootSignature > pRootSignature
Definition: DirectXPso.h:30
std::unordered_map< UINT, std::array< DirectXResource *, FrameResourceManager::getFrameResourceCount()> > globalShaderResourceSrvs
Definition: DirectXPso.h:68
ComPtr< ID3D12PipelineState > pPso
Definition: DirectXPso.h:33