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)>
88 std::unordered_map<UINT, std::shared_ptr<ContinuousDirectXDescriptorRange>>
190 const ComPtr<ID3D12GraphicsCommandList>& pCommandList,
size_t iCurrentFrameResourceIndex)
const {
195 for (
const auto& [iRootParameterIndex, vResourcesToBind] :
197 pCommandList->SetGraphicsRootConstantBufferView(
199 vResourcesToBind[iCurrentFrameResourceIndex]
200 ->getInternalResource()
201 ->GetGPUVirtualAddress());
205 for (
const auto& [iRootParameterIndex, vResourcesToBind] :
208 pCommandList->SetGraphicsRootShaderResourceView(
210 vResourcesToBind[iCurrentFrameResourceIndex]
211 ->getInternalResource()
212 ->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
std::optional< Error > generateGraphicsPso()
Definition: DirectXPso.cpp:146
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:242
std::pair< std::recursive_mutex, InternalResources > * getInternalResources()
Definition: DirectXPso.h:144
std::variant< unsigned int, Error > getRootParameterIndex(const std::string &sShaderResourceName)
Definition: DirectXPso.cpp:70
void bindGlobalShaderResourceViews(const ComPtr< ID3D12GraphicsCommandList > &pCommandList, size_t iCurrentFrameResourceIndex) const
Definition: DirectXPso.h:189
virtual std::optional< Error > recreateInternalResources() override
Definition: DirectXPso.cpp:85
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:54
Definition: Pipeline.h:20
const std::unique_ptr< PipelineConfiguration > pPipelineConfiguration
Definition: Pipeline.h:266
Renderer *const pRenderer
Definition: Pipeline.h:272
PipelineManager *const pPipelineManager
Definition: Pipeline.h:269
Definition: Renderer.h:43
Definition: DirectXPso.h:28
bool bIsReadyForUsage
Definition: DirectXPso.h:92
std::unordered_map< UINT, std::shared_ptr< ContinuousDirectXDescriptorRange > > descriptorRangesToBind
Definition: DirectXPso.h:89
std::array< UINT, static_cast< unsigned int >(SpecialRootParameterSlot::SIZE)> vSpecialRootParameterIndices
Definition: DirectXPso.h:55
std::unordered_map< std::string, UINT > rootParameterIndices
Definition: DirectXPso.h:42
std::unordered_map< UINT, std::array< DirectXResource *, FrameResourceManager::getFrameResourceCount()> > globalShaderResourceCbvs
Definition: DirectXPso.h:70
ComPtr< ID3D12RootSignature > pRootSignature
Definition: DirectXPso.h:30
std::unordered_map< UINT, std::array< DirectXResource *, FrameResourceManager::getFrameResourceCount()> > globalShaderResourceSrvs
Definition: DirectXPso.h:81
ComPtr< ID3D12PipelineState > pPso
Definition: DirectXPso.h:33