Harden Vulkan setup for discrete GPUs
This commit is contained in:
@@ -266,6 +266,22 @@ void V210ComputeDecoder::createFeedResources(
|
||||
<< " flags=0x" << std::hex << feed.v210MemoryProperties
|
||||
<< std::dec << std::endl;
|
||||
|
||||
VkFormatProperties outputFormatProperties{};
|
||||
vkGetPhysicalDeviceFormatProperties(
|
||||
physicalDevice,
|
||||
VK_FORMAT_R8G8B8A8_UNORM,
|
||||
&outputFormatProperties);
|
||||
const VkFormatFeatureFlags requiredOutputFeatures =
|
||||
VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT |
|
||||
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
|
||||
if ((outputFormatProperties.optimalTilingFeatures &
|
||||
requiredOutputFeatures) != requiredOutputFeatures)
|
||||
{
|
||||
throw std::runtime_error(
|
||||
"VK_FORMAT_R8G8B8A8_UNORM does not support sampled "
|
||||
"storage images on this GPU");
|
||||
}
|
||||
|
||||
createImage(
|
||||
m_device,
|
||||
physicalDevice,
|
||||
|
||||
Reference in New Issue
Block a user