summaryrefslogtreecommitdiffstats
path: root/tools/gfx/vulkan/vk-buffer.cpp
diff options
context:
space:
mode:
authorskallweitNV <64953474+skallweitNV@users.noreply.github.com>2024-03-12 18:33:37 +0100
committerGitHub <noreply@github.com>2024-03-12 10:33:37 -0700
commit8dc635ae72031d34bd36ed80874c568d6d43d587 (patch)
treee8b896b863f92bc6fa6bd3c81dd2a1c20058c233 /tools/gfx/vulkan/vk-buffer.cpp
parent1c4e1acdd48779b94c1008ba2456c63975e5fb7d (diff)
gfx: return error when vulkan fails to create buffer/pipeline (#3741)
* return buffer creation errors in vulkan * return pipeline creation errors in vulkan --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/gfx/vulkan/vk-buffer.cpp')
-rw-r--r--tools/gfx/vulkan/vk-buffer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/gfx/vulkan/vk-buffer.cpp b/tools/gfx/vulkan/vk-buffer.cpp
index 32c14bcb9..721886d9f 100644
--- a/tools/gfx/vulkan/vk-buffer.cpp
+++ b/tools/gfx/vulkan/vk-buffer.cpp
@@ -41,7 +41,7 @@ Result VKBufferHandleRAII::init(
bufferCreateInfo.pNext = &externalMemoryBufferCreateInfo;
}
- SLANG_VK_CHECK(api.vkCreateBuffer(api.m_device, &bufferCreateInfo, nullptr, &m_buffer));
+ SLANG_VK_RETURN_ON_FAIL(api.vkCreateBuffer(api.m_device, &bufferCreateInfo, nullptr, &m_buffer));
VkMemoryRequirements memoryReqs = {};
api.vkGetBufferMemoryRequirements(api.m_device, m_buffer, &memoryReqs);
@@ -87,8 +87,8 @@ Result VKBufferHandleRAII::init(
allocateInfo.pNext = &flagInfo;
}
- SLANG_VK_CHECK(api.vkAllocateMemory(api.m_device, &allocateInfo, nullptr, &m_memory));
- SLANG_VK_CHECK(api.vkBindBufferMemory(api.m_device, m_buffer, m_memory, 0));
+ SLANG_VK_RETURN_ON_FAIL(api.vkAllocateMemory(api.m_device, &allocateInfo, nullptr, &m_memory));
+ SLANG_VK_RETURN_ON_FAIL(api.vkBindBufferMemory(api.m_device, m_buffer, m_memory, 0));
return SLANG_OK;
}