diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-03-05 06:38:04 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-03-05 06:38:04 +0000 |
| commit | f551f6353eaf4efe9b7f26d48822b96ebb0706a0 (patch) | |
| tree | 8d9f6fdb24bcacbdbc04d29f02fbe0a8a7b1f7c3 /Graphics/GraphicsEngine | |
| parent | Completed D3D12 back-end refactor to comply with the new API (diff) | |
| download | DiligentCore-f551f6353eaf4efe9b7f26d48822b96ebb0706a0.tar.gz DiligentCore-f551f6353eaf4efe9b7f26d48822b96ebb0706a0.zip | |
Updated D3D11, D3D12, and Vk EngineFactory headers & structures
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/interface/GraphicsTypes.h | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index d402fb18..2cc9024b 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1242,7 +1242,7 @@ namespace Diligent }; /// Engine creation attibutes - struct EngineCreationAttribs + struct EngineCreateInfo { /// Pointer to the raw memory allocator that will be used for all memory allocation/deallocation /// operations in the engine @@ -1252,8 +1252,47 @@ namespace Diligent DebugMessageCallbackType DebugMessageCallback = nullptr; }; + + /// Debug flags that can be specified when creating Direct3D11-based engine implementation. + /// + /// \sa CreateDeviceAndContextsD3D11Type, CreateSwapChainD3D11Type, LoadGraphicsEngineD3D11 + enum class EngineD3D11DebugFlags : Uint32 + { + /// Before executing draw/dispatch command, verify that + /// all required shader resources are bound to the device context + VerifyCommittedShaderResources = 0x01, + + /// Verify that all committed cotext resources are relevant, + /// i.e. they are consistent with the committed resource cache. + /// This is very expensive operation and should generally not be + /// necessary. + VerifyCommittedResourceRelevance = 0x02 + }; + + /// Attributes specific to D3D11 engine + struct EngineD3D11CreateInfo : public EngineCreateInfo + { + static constexpr Uint32 DefaultAdapterId = 0xFFFFFFFF; + + /// Id of the hardware adapter the engine should be initialized on + Uint32 AdapterId = DefaultAdapterId; + + /// Debug flags. See Diligent::EngineD3D11DebugFlags for a list of allowed values. + /// + /// \sa CreateDeviceAndContextsD3D11Type, CreateSwapChainD3D11Type, LoadGraphicsEngineD3D11 + Uint32 DebugFlags; + + EngineD3D11CreateInfo() : + DebugFlags(0) + { +#ifdef _DEBUG + DebugFlags = static_cast<Uint32>(EngineD3D11DebugFlags::VerifyCommittedShaderResources); +#endif + } + }; + /// Attributes specific to D3D12 engine - struct EngineD3D12Attribs : public EngineCreationAttribs + struct EngineD3D12CreateInfo : public EngineCreateInfo { static constexpr Uint32 DefaultAdapterId = 0xFFFFFFFF; @@ -1310,7 +1349,7 @@ namespace Diligent }; /// Attributes specific to Vulkan engine - struct EngineVkAttribs : public EngineCreationAttribs + struct EngineVkCreateInfo : public EngineCreateInfo { /// Enable validation layers. Validation is always enabled in Debug mode bool EnableValidation = false; |
