summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2019-12-13 18:03:15 +0000
committerassiduous <assiduous@diligentgraphics.com>2019-12-13 18:03:15 +0000
commit996bfb53528aeaaba532413bf1848a0ebc3b03f0 (patch)
treecec9681ee72a3f984745227636cabf2bd2f983ab /Graphics/GraphicsEngineVulkan
parentFixed HLSL2GLSLConverterTest.CS_RWTex2D_1 test on 32-bit D3D12 (diff)
downloadDiligentCore-996bfb53528aeaaba532413bf1848a0ebc3b03f0.tar.gz
DiligentCore-996bfb53528aeaaba532413bf1848a0ebc3b03f0.zip
Unit tests: capturing debug output; fixed minor issue with viewport in Vk backend.
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp3
-rw-r--r--Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp6
2 files changed, 9 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
index 86a4bce1..135b5844 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -994,6 +994,9 @@ void DeviceContextVkImpl::SetIndexBuffer(IBuffer* pIndexBuffer, Uint32 ByteOffse
void DeviceContextVkImpl::CommitViewports()
{
+ if (m_NumViewports == 0)
+ return;
+
VkViewport VkViewports[MaxViewports]; // Do not waste time initializing array to zero
for (Uint32 vp = 0; vp < m_NumViewports; ++vp)
{
diff --git a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp
index 0debf7eb..18be491e 100644
--- a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp
@@ -87,6 +87,9 @@ void EngineFactoryVkImpl::CreateDeviceAndContextsVk(const EngineVkCreateInfo& _E
IRenderDevice** ppDevice,
IDeviceContext** ppContexts)
{
+ 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, ")");
@@ -245,6 +248,9 @@ void EngineFactoryVkImpl::AttachToVulkanDevice(std::shared_ptr<VulkanUtilities::
IRenderDevice** ppDevice,
IDeviceContext** ppContexts)
{
+ 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, ")");