Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/rendervulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,18 @@ static VkResult getModifierProps( const VkImageCreateInfo *imageInfo, uint64_t m
.pNext = externalFormatProps,
};

return g_device.vk.GetPhysicalDeviceImageFormatProperties2(g_device.physDev(), &imageFormatInfo, &imageProps);
VkResult res = g_device.vk.GetPhysicalDeviceImageFormatProperties2(g_device.physDev(), &imageFormatInfo, &imageProps);
if ( res != VK_SUCCESS )
return res;

if ( imageInfo->extent.width > imageProps.imageFormatProperties.maxExtent.width ||
imageInfo->extent.height > imageProps.imageFormatProperties.maxExtent.height ||
imageInfo->extent.depth > imageProps.imageFormatProperties.maxExtent.depth )
{
return VK_ERROR_FORMAT_NOT_SUPPORTED;
}

return VK_SUCCESS;
}

static VkImageViewType VulkanImageTypeToViewType(VkImageType type)
Expand Down