From 8dc635ae72031d34bd36ed80874c568d6d43d587 Mon Sep 17 00:00:00 2001 From: skallweitNV <64953474+skallweitNV@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:33:37 +0100 Subject: 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 --- tools/gfx/vulkan/vk-buffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/gfx/vulkan/vk-buffer.cpp') 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; } -- cgit v1.2.3