Engine creation information. More...
#include <GraphicsTypes.h>
Public Member Functions | |
void | SetValidationLevel (VALIDATION_LEVEL Level) |
Sets the validation options corresponding to the specified level, see Diligent::VALIDATION_LEVEL. | |
Public Attributes | |
Int32 | EngineAPIVersion = DILIGENT_API_VERSION |
Engine API version number. | |
Uint32 | AdapterId = DEFAULT_ADAPTER_ID |
Version | GraphicsAPIVersion = {} |
Minimum required graphics API version (feature level for Direct3D). | |
const ImmediateContextCreateInfo * | pImmediateContextInfo = nullptr |
Uint32 | NumImmediateContexts = 0 |
The number of immediate contexts in pImmediateContextInfo array. | |
Uint32 | NumDeferredContexts = 0 |
The number of deferred contexts to create when initializing the engine. | |
DeviceFeatures | Features |
Requested device features. | |
Bool | EnableValidation = false |
VALIDATION_FLAGS | ValidationFlags = VALIDATION_FLAG_NONE |
Validation options, see Diligent::VALIDATION_FLAGS. | |
struct IMemoryAllocator * | pRawMemAllocator = nullptr |
IThreadPool * | pAsyncShaderCompilationThreadPool = nullptr |
Uint32 | NumAsyncShaderCompilationThreads = 0xFFFFFFFFu |
When AsyncShaderCompilation is enabled, the maximum number of threads that can be used to compile shaders. | |
const OpenXRAttribs * | pXRAttribs = nullptr |
Engine creation information.
Uint32 Diligent::EngineCreateInfo::AdapterId = DEFAULT_ADAPTER_ID |
Id of the hardware adapter the engine should use. Call IEngineFactory::EnumerateAdapters() to get the list of available adapters.
Bool Diligent::EngineCreateInfo::EnableValidation = false |
Enable backend-specific validation (e.g. use Direct3D11 debug device, enable Direct3D12 debug layer, enable Vulkan validation layers, create debug OpenGL context, etc.). The validation is enabled by default in Debug/Development builds and disabled in release builds.
DeviceFeatures Diligent::EngineCreateInfo::Features |
Requested device features.
If a feature is requested to be enabled, but is not supported by the device/driver/platform, the engine will fail to initialize.
If a feature is requested to be optional, the engine will attempt to enable the feature. If the feature is not supported by the device/driver/platform, the engine will successfully be initialized, but the feature will be disabled. The actual feature state can be queried from DeviceCaps structure.
Applications can query available device features for each graphics adapter with IEngineFactory::EnumerateAdapters().
Uint32 Diligent::EngineCreateInfo::NumAsyncShaderCompilationThreads = 0xFFFFFFFFu |
When AsyncShaderCompilation
is enabled, the maximum number of threads that can be used to compile shaders.
If AsyncShaderCompilation device feature is enabled and pAsyncShaderCompilationThreadPool is null, this value is used to define the number of threads in the default thread pool. If the value is 0xFFFFFFFF, the number of threads will be determined automatically.
If pAsyncShaderCompilationThreadPool is not null, the value is ignored as the user-provided thread pool is used instead.
In OpenGL backend, the thread pool is not used and the value is passed to glMaxShaderCompilerThreadsKHR() function.
Uint32 Diligent::EngineCreateInfo::NumDeferredContexts = 0 |
The number of deferred contexts to create when initializing the engine.
If non-zero number is given, pointers to the contexts are written to ppContexts array by the engine factory functions (IEngineFactoryD3D11::CreateDeviceAndContextsD3D11, IEngineFactoryD3D12::CreateDeviceAndContextsD3D12, and IEngineFactoryVk::CreateDeviceAndContextsVk) starting at position max(1, NumImmediateContexts)
.
Uint32 Diligent::EngineCreateInfo::NumImmediateContexts = 0 |
The number of immediate contexts in pImmediateContextInfo array.
IThreadPool* Diligent::EngineCreateInfo::pAsyncShaderCompilationThreadPool = nullptr |
An optional thread pool for asynchronous shader and pipeline state compilation.
When AsyncShaderCompilation device feature is enabled, the engine will use the provided thread pool to compile shaders and pipeline states asynchronously. If the thread pool is not provided, the engine will create a default thread pool.
const ImmediateContextCreateInfo* Diligent::EngineCreateInfo::pImmediateContextInfo = nullptr |
A pointer to the array of NumImmediateContexts structs describing immediate device contexts to create. See Diligent::ImmediateContextCreateInfo. Every immediate device contexts encompasses a command queue of a specific type. It may record commands directly or execute command lists recorded by deferred contexts.
If not specified, single graphics context will be created.
Recommended configuration:
struct IMemoryAllocator* Diligent::EngineCreateInfo::pRawMemAllocator = nullptr |
Pointer to the raw memory allocator that will be used for all memory allocation/deallocation operations in the engine
const OpenXRAttribs* Diligent::EngineCreateInfo::pXRAttribs = nullptr |
An optional pointer to the OpenXR attributes, must be set if OpenXR is used. See Diligent::OpenXRAttribs.