summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-07-05 19:18:53 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-07-05 19:18:53 +0000
commita5f7f7836865e02c265704b6b4abf7ab1916962d (patch)
treeec38a386d69d6e8690d532e54aad040ccab23f9e /Graphics/GraphicsEngineVulkan
parentAdded NDC attribs data to DeviceCaps structure (diff)
downloadDiligentCore-a5f7f7836865e02c265704b6b4abf7ab1916962d.tar.gz
DiligentCore-a5f7f7836865e02c265704b6b4abf7ab1916962d.zip
Added shader compiler error reporting in Vulkan
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp13
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDebug.cpp7
3 files changed, 7 insertions, 15 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
index 264f695c..83d1f7d2 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
@@ -44,7 +44,7 @@ ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters, RenderDeviceVkImpl*
m_StaticVarsMgr(*this)
{
auto GLSLSource = BuildGLSLSourceString(CreationAttribs, TargetGLSLCompiler::glslang, "#define TARGET_API_VULKAN 1\n");
- m_SPIRV = GLSLtoSPIRV(m_Desc.ShaderType, GLSLSource.c_str());
+ m_SPIRV = GLSLtoSPIRV(m_Desc.ShaderType, GLSLSource.c_str(), CreationAttribs.ppCompilerOutput);
if(m_SPIRV.empty())
{
LOG_ERROR_AND_THROW("Failed to compile shader");
diff --git a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
index 23da8e2d..0187c5a2 100644
--- a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
@@ -447,23 +447,14 @@ void SwapChainVkImpl::Present(Uint32 SyncInterval)
PresentInfo.pImageIndices = &m_BackBufferIndex;
VkResult Result = VK_SUCCESS;
PresentInfo.pResults = &Result;
- VERIFY(Result == VK_SUCCESS, "Present failed");
-
+
auto *pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
auto vkCmdQueue = pDeviceVk->GetCmdQueue()->GetVkQueue();
vkQueuePresentKHR(vkCmdQueue, &PresentInfo);
+ VERIFY(Result == VK_SUCCESS, "Present failed");
pDeviceVk->FinishFrame();
-#if 0
-#if PLATFORM_UNIVERSAL_WINDOWS
- // A successful Present call for DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL SwapChains unbinds
- // backbuffer 0 from all GPU writeable bind points.
- // We need to rebind all render targets to make sure that
- // the back buffer is not unbound
- pImmediateCtxVk->CommitRenderTargets();
-#endif
-#endif
++m_SemaphoreIndex;
if (m_SemaphoreIndex >= m_SwapChainDesc.BufferCount)
m_SemaphoreIndex = 0;
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDebug.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDebug.cpp
index 3c9fe3b3..8090a410 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDebug.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDebug.cpp
@@ -31,9 +31,10 @@ namespace VulkanUtilities
{
std::stringstream debugMessage;
- // Ignore warning about using RenderPass LOAD_OP_CLEAR:
- // vkCmdClearAttachments() issued on command buffer object 0x... prior to any Draw Cmds. It is recommended you use RenderPass LOAD_OP_CLEAR on Attachments prior to any Draw.
- if ( (flags & VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT) && msgCode == 64)
+ // Ignore the following warnings:
+ // 26: Vertex buffers are bound to command buffer (0x...) but no vertex buffers are attached to this Pipeline State Object
+ // 64: vkCmdClearAttachments() issued on command buffer object 0x... prior to any Draw Cmds. It is recommended you use RenderPass LOAD_OP_CLEAR on Attachments prior to any Draw.
+ if ( (flags & VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT) && (msgCode == 64 || msgCode == 26) )
return VK_FALSE;
debugMessage << "Vulkan debug message";