#include <root_signature.h>
Wraps the ID3D12RootSignature object.
This class makes it easy for you to create RootSignatures by cutting out a lot of the fuss from setting up all the different root parameters and also wrapping the logic for finalizing the root signature. When you want to create a RootSignature, start by calling RootSignature::Create() with the number of root parameters and static samplers that you want. Then continue to initialize all the root parameters by using the [] operator to access each RootParameter. After that, continue to initialize the static samplers that you want to use by calling RootSignature::InitStaticSampler(). After all that is set and done, finalize the RootSignature by calling RootSignature::Finalize(). Your RootSignature is now ready for use.
blowbox::RootSignature::RootSignature |
( |
| ) |
|
blowbox::RootSignature::~RootSignature |
( |
| ) |
|
void blowbox::RootSignature::ConfirmInitializedParameter |
( |
| ) |
|
|
protected |
void blowbox::RootSignature::Create |
( |
UINT |
num_root_parameters, |
|
|
UINT |
num_static_samplers |
|
) |
| |
Creates all the underlying root parameters and static samplers, so that you can access them with the [] operator.
- Parameters
-
[in] | num_root_parameters | The number of root parameters that should be in this RootSignature. |
[in] | num_static_samplers | The number of static samplers that should be in this RootSignature. |
void blowbox::RootSignature::Finalize |
( |
const WString & |
name, |
|
|
D3D12_ROOT_SIGNATURE_FLAGS |
flags = D3D12_ROOT_SIGNATURE_FLAG_NONE |
|
) |
| |
Finalizes the RootSignature. It will validate all RootParameters and construct the final ID3D12RootSignature.
- Parameters
-
ID3D12RootSignature* blowbox::RootSignature::Get |
( |
| ) |
const |
|
inline |
- Returns
- The underlying ID3D12RootSignature.
void blowbox::RootSignature::InitStaticSampler |
( |
const D3D12_STATIC_SAMPLER_DESC & |
static_sampler_desc, |
|
|
D3D12_SHADER_VISIBILITY |
visibility = D3D12_SHADER_VISIBILITY_ALL |
|
) |
| |
Init a static sampler with a given static sampler desc.
- Parameters
-
[in] | static_sampler_desc | The static sampler desc |
[in] | visibility | The shader stages in which this sampler is visible. |
void blowbox::RootSignature::InitStaticSampler |
( |
UINT |
shader_register, |
|
|
const D3D12_SAMPLER_DESC & |
sampler_desc, |
|
|
D3D12_SHADER_VISIBILITY |
visibility = D3D12_SHADER_VISIBILITY_ALL |
|
) |
| |
Init a static sampler with a given NON-static sampler desc.
- Parameters
-
[in] | shader_register | The shader register where this sampler should appear in the shaders. |
[in] | sampler_desc | The NON-static sampler desc |
[in] | visibility | The shader stages in which this sampler is visible. |
blowbox::RootSignature::operator ID3D12RootSignature * |
( |
| ) |
const |
|
inline |
Implicit casting to ID3D12RootSignature.
ID3D12RootSignature* blowbox::RootSignature::operator-> |
( |
| ) |
const |
|
inline |
Overload the pointer operator to access the underlying ID3D12RootSignature.
const RootParameter & blowbox::RootSignature::operator[] |
( |
UINT |
i | ) |
const |
bool blowbox::RootSignature::finalized_ |
|
private |
UINT blowbox::RootSignature::num_initialized_root_parameters_ |
|
private |
The number of currently initialized RootParameters.
UINT blowbox::RootSignature::num_initialized_static_samplers_ |
|
private |
The number of currently initialized static samplers.
UINT blowbox::RootSignature::num_root_parameters_ |
|
private |
UINT blowbox::RootSignature::num_static_samplers_ |
|
private |
RootParameter blowbox::RootSignature::root_parameters_[ROOT_SIGNATURE_MAX_PARAMETERS] |
|
private |
ID3D12RootSignature* blowbox::RootSignature::root_signature_ |
|
private |
The underlying ID3D12RootSignature.
D3D12_STATIC_SAMPLER_DESC blowbox::RootSignature::static_samplers_[ROOT_SIGNATURE_MAX_STATIC_SAMPLERS] |
|
private |
The documentation for this class was generated from the following files:
- C:/Projects/blowbox-2017/src/renderer/root_signature.h
- C:/Projects/blowbox-2017/src/renderer/root_signature.cc