summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-09-08 05:00:23 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-09-09 16:18:08 +0000
commit90a707ecb5d7985c261faf1903e849548c046b02 (patch)
tree0d853d782deae54ce7a41924c50b432ac7aa464a /Graphics/GraphicsEngineVulkan
parentAdded DILIGENT_NO_FORMAT_VALIDATION cmake option (diff)
downloadDiligentCore-90a707ecb5d7985c261faf1903e849548c046b02.tar.gz
DiligentCore-90a707ecb5d7985c261faf1903e849548c046b02.zip
A bunch of random updates
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.hpp4
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp3
4 files changed, 6 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp
index 3c0f5feb..5f00317e 100644
--- a/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp
@@ -155,7 +155,7 @@ private:
VulkanUtilities::PipelineWrapper m_Pipeline;
PipelineLayout m_PipelineLayout;
- std::array<Int8, 8> m_ResourceLayoutIndex;
+ std::array<Int8, 8> m_ResourceLayoutIndex = {};
bool m_HasStaticResources = false;
bool m_HasNonStaticResources = false;
};
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.hpp b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.hpp
index 06e86c76..7d66600d 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.hpp
@@ -142,7 +142,7 @@ public:
{
#ifdef VK_NV_mesh_shader
VERIFY_EXPR(m_VkCmdBuffer != VK_NULL_HANDLE);
- VERIFY(m_State.RenderPass != VK_NULL_HANDLE, "vkCmdDrawMeshTasksNV() must be called inside render pass (19.3)");
+ VERIFY(m_State.RenderPass != VK_NULL_HANDLE, "vkCmdDrawMeshTasksNV() must be called inside render pass");
VERIFY(m_State.GraphicsPipeline != VK_NULL_HANDLE, "No graphics pipeline bound");
vkCmdDrawMeshTasksNV(m_VkCmdBuffer, TaskCount, FirstTask);
@@ -155,7 +155,7 @@ public:
{
#ifdef VK_NV_mesh_shader
VERIFY_EXPR(m_VkCmdBuffer != VK_NULL_HANDLE);
- VERIFY(m_State.RenderPass != VK_NULL_HANDLE, "vkCmdDrawMeshTasksNV() must be called inside render pass (19.3)");
+ VERIFY(m_State.RenderPass != VK_NULL_HANDLE, "vkCmdDrawMeshTasksNV() must be called inside render pass");
VERIFY(m_State.GraphicsPipeline != VK_NULL_HANDLE, "No graphics pipeline bound");
vkCmdDrawMeshTasksIndirectNV(m_VkCmdBuffer, Buffer, Offset, DrawCount, Stride);
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp
index 593cc0b3..13f2affe 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp
@@ -43,6 +43,7 @@ namespace Diligent
static VkShaderStageFlagBits ShaderTypeToVkShaderStageFlagBit(SHADER_TYPE ShaderType)
{
+ static_assert(SHADER_TYPE_LAST == SHADER_TYPE_MESH, "Please update the switch below to handle the new shader type");
switch (ShaderType)
{
// clang-format off
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
index 65150c48..b136487f 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
@@ -155,6 +155,8 @@ PipelineStateVkImpl::PipelineStateVkImpl(IReferenceCounters* pRefCoun
TPipelineStateBase{pRefCounters, pDeviceVk, CreateInfo.PSODesc},
m_SRBMemAllocator{GetRawAllocator()}
{
+ m_ResourceLayoutIndex.fill(-1);
+
const auto& LogicalDevice = pDeviceVk->GetLogicalDevice();
// Initialize shader resource layouts
@@ -166,7 +168,6 @@ PipelineStateVkImpl::PipelineStateVkImpl(IReferenceCounters* pRefCoun
m_ShaderResourceLayouts = ALLOCATE(ShaderResLayoutAllocator, "Raw memory for ShaderResourceLayoutVk", ShaderResourceLayoutVk, m_NumShaders * 2);
m_StaticResCaches = ALLOCATE(GetRawAllocator(), "Raw memory for ShaderResourceCacheVk", ShaderResourceCacheVk, m_NumShaders);
m_StaticVarsMgrs = ALLOCATE(GetRawAllocator(), "Raw memory for ShaderVariableManagerVk", ShaderVariableManagerVk, m_NumShaders);
- m_ResourceLayoutIndex.fill(-1);
for (Uint32 s = 0; s < m_NumShaders; ++s)
{