summaryrefslogtreecommitdiffstats
path: root/tools/gfx/vulkan
diff options
context:
space:
mode:
authorskallweitNV <64953474+skallweitNV@users.noreply.github.com>2024-04-05 18:39:06 +0200
committerGitHub <noreply@github.com>2024-04-05 09:39:06 -0700
commitcb87a8f1665198660636188e0861cd41bdaef16c (patch)
treecb624bf81cd2ded457218fe1fa5d60837f5c22c9 /tools/gfx/vulkan
parent94ced35a519294bbfb8e1d6c90aa235dd3878d88 (diff)
gfx vulkan fixes (#3897)
Diffstat (limited to 'tools/gfx/vulkan')
-rw-r--r--tools/gfx/vulkan/vk-helper-functions.cpp1
-rw-r--r--tools/gfx/vulkan/vk-shader-object.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/gfx/vulkan/vk-helper-functions.cpp b/tools/gfx/vulkan/vk-helper-functions.cpp
index fc44256ed..b70ff5e04 100644
--- a/tools/gfx/vulkan/vk-helper-functions.cpp
+++ b/tools/gfx/vulkan/vk-helper-functions.cpp
@@ -301,6 +301,7 @@ VkImageUsageFlagBits _calcImageUsageFlags(ResourceState state)
return VK_IMAGE_USAGE_TRANSFER_DST_BIT;
case ResourceState::Present:
return VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
+ case ResourceState::Undefined:
case ResourceState::General:
return (VkImageUsageFlagBits)0;
default:
diff --git a/tools/gfx/vulkan/vk-shader-object.cpp b/tools/gfx/vulkan/vk-shader-object.cpp
index 77707eac0..37edd8efa 100644
--- a/tools/gfx/vulkan/vk-shader-object.cpp
+++ b/tools/gfx/vulkan/vk-shader-object.cpp
@@ -920,7 +920,7 @@ Result ShaderObjectImpl::bindOrdinaryDataBufferIfNeeded(
// the given `descriptorSet` and update the base range index for
// subsequent binding operations to account for it.
//
- if (m_constantBuffer)
+ if (m_constantBuffer && m_constantBufferSize > 0)
{
auto bufferImpl = static_cast<BufferResourceImpl*>(m_constantBuffer);
writeBufferDescriptor(