Nameless Engine
Loading...
Searching...
No Matches
ne::DirectXPso::InternalResources Struct Reference

#include <DirectXPso.h>

Public Attributes

ComPtr< ID3D12RootSignature > pRootSignature
 
ComPtr< ID3D12PipelineState > pPso
 
std::unordered_map< std::string, UINT > rootParameterIndices
 
std::array< UINT, static_cast< unsigned int >(SpecialRootParameterSlot::SIZE)> vSpecialRootParameterIndices
 
std::unordered_map< UINT, std::array< DirectXResource *, FrameResourceManager::getFrameResourceCount()> > globalShaderResourceSrvs
 
std::unordered_map< UINT, std::unique_ptr< ContinuousDirectXDescriptorRange > > descriptorTablesToBind
 
bool bIsReadyForUsage = false
 

Detailed Description

Stores internal resources.

Member Data Documentation

◆ bIsReadyForUsage

bool ne::DirectXPso::InternalResources::bIsReadyForUsage = false

Whether fields of this struct are initialized or not.

◆ descriptorTablesToBind

std::unordered_map<UINT, std::unique_ptr<ContinuousDirectXDescriptorRange> > ne::DirectXPso::InternalResources::descriptorTablesToBind

Stores pairs of "root parameter index" - "descriptor table (range) to bind".

Remarks
Shader resources modify this map.

◆ globalShaderResourceSrvs

std::unordered_map< UINT, std::array<DirectXResource*, FrameResourceManager::getFrameResourceCount()> > ne::DirectXPso::InternalResources::globalShaderResourceSrvs

Global bindings that should be binded as SRVs. Stores pairs of "root parameter index" - "resource to bind".

Remarks
It's safe to store raw pointers here because the SRVs should be valid while the pipeline exists and has not re-created its internal resources (when internal resources are re-created these SRVs (resource pointers) are cleared).

◆ pPso

ComPtr<ID3D12PipelineState> ne::DirectXPso::InternalResources::pPso

Created PSO.

◆ pRootSignature

ComPtr<ID3D12RootSignature> ne::DirectXPso::InternalResources::pRootSignature

Root signature, used in PSO.

◆ rootParameterIndices

std::unordered_map<std::string, UINT> ne::DirectXPso::InternalResources::rootParameterIndices

Root parameter indices that was used in creation of pRootSignature.

Stores pairs of shader resource name - root parameter index, allows determining which resource is binded to which root parameter index (by using resource name taken from shader file).

◆ vSpecialRootParameterIndices

std::array<UINT, static_cast<unsigned int>(SpecialRootParameterSlot::SIZE)> ne::DirectXPso::InternalResources::vSpecialRootParameterIndices

Stores indices of some non-user specified root parameters. Duplicates some root parameters and their indices from rootParameterIndices but only stored some special non-user specified root parameter indices.

Remarks
Generally used for fast access (without doing a find in the map) to some root parameter indices.
Example usage: iRootParameterIndex = vIndices[Slot::FRAME_DATA].

The documentation for this struct was generated from the following file: