Nameless Engine
Loading...
Searching...
No Matches
ne::RootSignatureGenerator::Generated Struct Reference

#include <RootSignatureGenerator.h>

Public Attributes

ComPtr< ID3D12RootSignature > pRootSignature
 
std::unordered_map< std::string, UINT > rootParameterIndices
 
std::array< UINT, static_cast< unsigned int >(SpecialRootParameterSlot::SIZE)> vSpecialRootParameterIndices
 
std::unordered_map< std::string, size_t > rootConstantOffsets
 

Detailed Description

Contains data that was generated during the process of merging two root signatures.

Member Data Documentation

◆ pRootSignature

ComPtr<ID3D12RootSignature> ne::RootSignatureGenerator::Generated::pRootSignature

Merged (new) root signature.

◆ rootConstantOffsets

std::unordered_map<std::string, size_t> ne::RootSignatureGenerator::Generated::rootConstantOffsets

Stores pairs of "name of field defined in HLSL in RootConstants cbuffer" (all with uint type) and "offset from the beginning of the struct (in `uint`s not bytes)".

Remarks
May be empty if constants are not used.
If a non uint fields is found an error is returned instead.

◆ rootParameterIndices

std::unordered_map<std::string, UINT> ne::RootSignatureGenerator::Generated::rootParameterIndices

New root parameters map of pRootSignature.

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

◆ vSpecialRootParameterIndices

std::array<UINT, static_cast<unsigned int>(SpecialRootParameterSlot::SIZE)> ne::RootSignatureGenerator::Generated::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: