Skip to content

Commit

Permalink
kms: Check the result of the vkCreateDmaBufImageINTEL call
Browse files Browse the repository at this point in the history
Check that the call to vkCreateDmaBufImageINTEL succeeded and throw an
exception otherwise.
  • Loading branch information
afrantzis committed May 30, 2018
1 parent 68b6f23 commit 1ebd493
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ws/kms_window_system.cpp
Expand Up @@ -479,13 +479,19 @@ void KMSWindowSystem::create_vk_images()
VkImage image;
VkDeviceMemory device_memory;

create_dma_buf_image(
VkResult result = create_dma_buf_image(
vulkan->device(),
&create_info,
nullptr,
&device_memory,
&image);

if (result != VK_SUCCESS)
{
vk::throwResultException(static_cast<vk::Result>(result),
"vkCreateDmbBufImageINTEL");
}

vk_images.push_back(
ManagedResource<vk::Image>{
vk::Image{image},
Expand Down

0 comments on commit 1ebd493

Please sign in to comment.