From 996bfb53528aeaaba532413bf1848a0ebc3b03f0 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 13 Dec 2019 10:03:15 -0800 Subject: Unit tests: capturing debug output; fixed minor issue with viewport in Vk backend. --- Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp index 545da3d3..0526f672 100644 --- a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp +++ b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp @@ -107,12 +107,12 @@ void EngineFactoryD3D12Impl::CreateDeviceAndContextsD3D12(const EngineD3D12Creat IRenderDevice** ppDevice, IDeviceContext** ppContexts) { - if (EngineCI.APIVersion != DILIGENT_API_VERSION) - LOG_ERROR_AND_THROW("Diligent Engine runtime (", EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); - if (EngineCI.DebugMessageCallback != nullptr) SetDebugMessageCallback(EngineCI.DebugMessageCallback); + if (EngineCI.APIVersion != DILIGENT_API_VERSION) + LOG_ERROR_AND_THROW("Diligent Engine runtime (", EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); + VERIFY(ppDevice && ppContexts, "Null pointer provided"); if (!ppDevice || !ppContexts) return; @@ -314,12 +314,12 @@ void EngineFactoryD3D12Impl::AttachToD3D12Device(void* pd IRenderDevice** ppDevice, IDeviceContext** ppContexts) { - if (EngineCI.APIVersion != DILIGENT_API_VERSION) - LOG_ERROR_AND_THROW("Diligent Engine runtime (", EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); - if (EngineCI.DebugMessageCallback != nullptr) SetDebugMessageCallback(EngineCI.DebugMessageCallback); + if (EngineCI.APIVersion != DILIGENT_API_VERSION) + LOG_ERROR_AND_THROW("Diligent Engine runtime (", EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); + VERIFY(pd3d12NativeDevice && ppCommandQueues && ppDevice && ppContexts, "Null pointer provided"); if (!pd3d12NativeDevice || !ppCommandQueues || !ppDevice || !ppContexts) return; -- cgit v1.2.3