Diligent::EngineD3D12CreateInfo struct

Attributes specific to D3D12 engine.

Contents

Base classes

struct EngineCreateInfo
Engine creation attibutes.

Public variables

const char* D3D12DllName
Name of the D3D12 DLL to load. Ignored on UWP.
Uint32 AdapterId
Id of the hardware adapter the engine should be initialized on.
DIRECT3D_FEATURE_LEVEL MinimumFeatureLevel
Minimum required Direct3D feature level.
bool EnableDebugLayer
Enable Direct3D12 debug layer.
bool EnableGPUBasedValidation
Enable validation on the GPU timeline. See https://docs.microsoft.com/en-us/windows/win32/direct3d12/using-d3d12-debug-layer-gpu-based-validation This flag only has effect if EnableDebugLayer is true.
bool BreakOnError
Whether to break execution when D3D12 debug layer detects an error. This flag only has effect if EnableDebugLayer is true.
bool BreakOnCorruption
Whether to break execution when D3D12 debug layer detects a memory corruption. This flag only has effect if EnableDebugLayer is true.
Uint32 CPUDescriptorHeapAllocationSize
Size of the CPU descriptor heap allocations for different heap types.
Uint32 GPUDescriptorHeapSize
The size of the GPU descriptor heap region designated to static/mutable shader resource variables. Every Shader Resource Binding object allocates one descriptor per any static/mutable shader resource variable (every array element counts) when the object is created. All required descriptors are allocated in one continuous chunk. GPUDescriptorHeapSize defines the total number of all descriptors that can be allocated across all SRB objects. Note that due to heap fragmentation, releaseing two chunks of sizes N and M does not necessarily make the chunk of size N+M available.
Uint32 GPUDescriptorHeapDynamicSize
The size of the GPU descriptor heap region designated to dynamic shader resource variables. Every Shader Resource Binding object allocates one descriptor per any dynamic shader resource variable (every array element counts) every time the object is commited via IDeviceContext::CommitShaderResources. All used dynamic descriptors are discarded at the end of the frame and recycled when they are no longer used by the GPU. GPUDescriptorHeapDynamicSize defines the total number of descriptors that can be used for dynamic variables across all SRBs and all frames currently in flight. Note that in Direct3D12, the size of sampler descriptor heap is limited by 2048. Since Diligent Engine allocates single heap for all variable types, GPUDescriptorHeapSize[1] + GPUDescriptorHeapDynamicSize[1] must not exceed 2048.
Uint32 DynamicDescriptorAllocationChunkSize
The size of the chunk that dynamic descriptor allocations manager requests from the main GPU descriptor heap. The total number of dynamic descriptors avaialble across all frames in flight is defined by GPUDescriptorHeapDynamicSize. Every device context allocates dynamic descriptors in two stages: it first requests a chunk from the global heap, and the performs linear suballocations from this chunk in a lock-free manner. The size of this chunk is defined by DynamicDescriptorAllocationChunkSize, thus there will be total GPUDescriptorHeapDynamicSize/DynamicDescriptorAllocationChunkSize chunks in the heap of each type.
Uint32 DynamicHeapPageSize
A device context uses dynamic heap when it needs to allocate temporary CPU-accessible memory to update a resource via IDeviceContext::UpdateBuffer() or IDeviceContext::UpdateTexture(), or to map dynamic resources. Device contexts first request a chunk of memory from global dynamic resource manager and then suballocate from this chunk in a lock-free fashion. DynamicHeapPageSize defines the size of this chunk.
Uint32 NumDynamicHeapPagesToReserve
Number of dynamic heap pages that will be reserved by the global dynamic heap manager to avoid page creation at run time.
Uint32 QueryPoolSizes
Query pool size for each query type.
const char* pDxCompilerPath
Path to DirectX Shader Compiler, which is required to use Shader Model 6.0+ features. By default, the engine will search for "dxcompiler.dll".

Variable documentation

bool Diligent::EngineD3D12CreateInfo::EnableGPUBasedValidation

Enable validation on the GPU timeline. See https://docs.microsoft.com/en-us/windows/win32/direct3d12/using-d3d12-debug-layer-gpu-based-validation This flag only has effect if EnableDebugLayer is true.