Harden Vulkan setup for discrete GPUs

This commit is contained in:
Johanness
2026-05-24 00:15:55 +03:00
parent 8ef858e3c8
commit d7d0785c66
3 changed files with 49 additions and 8 deletions
+16
View File
@@ -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,