Nameless Engine
Loading...
Searching...
No Matches
ne::RootSignatureGenerator::RootParameter Class Reference

#include <RootSignatureGenerator.h>

Public Types

enum class  Type { CONSTANTS , CBV , SRV , UAV }
 

Public Member Functions

 RootParameter ()=default
 
 RootParameter (UINT iBindPoint, UINT iSpace, Type type, bool bIsTable=false, UINT iCount=1)
 
CD3DX12_ROOT_PARAMETER generateSingleDescriptorDescription () const
 
CD3DX12_DESCRIPTOR_RANGE generateTableRange () const
 
D3D12_SHADER_VISIBILITY getVisibility () const
 
bool isTable () const
 

Private Attributes

UINT iBindPoint = 0
 
UINT iSpace = 0
 
Type type
 
UINT iCount = 0
 
bool bIsTable = false
 
D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL
 

Detailed Description

Wrapper for D3D root parameter type.

Member Enumeration Documentation

◆ Type

Describes a root parameter type.

Constructor & Destructor Documentation

◆ RootParameter() [1/2]

ne::RootSignatureGenerator::RootParameter::RootParameter ( )
default

Creates uninitialized parameter.

◆ RootParameter() [2/2]

ne::RootSignatureGenerator::RootParameter::RootParameter ( UINT  iBindPoint,
UINT  iSpace,
RootParameter::Type  type,
bool  bIsTable = false,
UINT  iCount = 1 
)

Initializes a root parameter.

Parameters
iBindPointRegister binding index.
iSpaceRegister space.
typeRoot parameter type.
bIsTabletrue to initialize this parameter as descriptor table (even if descriptor count is 1), otherwise false to initialize it as just one descriptor.
iCountIf type is table them defined the number of descriptors this parameter stores, if type is constants then the number of 32 bit constants, otherwise ignored.

Member Function Documentation

◆ generateSingleDescriptorDescription()

CD3DX12_ROOT_PARAMETER ne::RootSignatureGenerator::RootParameter::generateSingleDescriptorDescription ( ) const

Generates root parameter description that describes a single descriptor.

Remarks
Shows error if this parameter was initialized as descriptor table.
Returns
Root parameter description.

◆ generateTableRange()

CD3DX12_DESCRIPTOR_RANGE ne::RootSignatureGenerator::RootParameter::generateTableRange ( ) const

Generates root table range description.

Remarks
Shows error if this parameter was initialized as a single descriptor.
Returns
Root table range description.

◆ getVisibility()

D3D12_SHADER_VISIBILITY ne::RootSignatureGenerator::RootParameter::getVisibility ( ) const

Returns visibility of this parameter.

Returns
Visibility.

◆ isTable()

bool ne::RootSignatureGenerator::RootParameter::isTable ( ) const

Tells whether this parameter describes a descriptor table or just a single view.

Returns
true if generateTableRange should be used, otherwise generateSingleDescriptorDescription.

Member Data Documentation

◆ bIsTable

bool ne::RootSignatureGenerator::RootParameter::bIsTable = false
private

Whether this parameter should be initialized as descriptor table or not.

◆ iBindPoint

UINT ne::RootSignatureGenerator::RootParameter::iBindPoint = 0
private

Binding register index.

◆ iCount

UINT ne::RootSignatureGenerator::RootParameter::iCount = 0
private

If type is table them defined the number of descriptors this parameter stores, if type is constants then the number of 32 bit constants, otherwise ignored.

◆ iSpace

UINT ne::RootSignatureGenerator::RootParameter::iSpace = 0
private

Binding register space.

◆ type

Type ne::RootSignatureGenerator::RootParameter::type
private

Parameter type.

◆ visibility

D3D12_SHADER_VISIBILITY ne::RootSignatureGenerator::RootParameter::visibility = D3D12_SHADER_VISIBILITY_ALL
private

Visibility of this parameter.


The documentation for this class was generated from the following files: