Skip to content

Commit

Permalink
Renderer: Add workaround for older Vulkan SDKs
Browse files Browse the repository at this point in the history
  • Loading branch information
redstrate committed May 27, 2024
1 parent 6ae749a commit ac16e73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions renderer/src/rendermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,20 @@ RenderManager::RenderManager(GameData *data)
enabledFeatures.shaderCullDistance = VK_TRUE;
enabledFeatures.fillModeNonSolid = VK_TRUE;

// TODO: Update the Flatpak Vulkan SDK to support this
#if defined(VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME)
VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR localReadFeaturesKhr{};
localReadFeaturesKhr.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR;
localReadFeaturesKhr.dynamicRenderingLocalRead = VK_TRUE;
#endif

VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT unusedAttachmentsFeaturesExt{};
unusedAttachmentsFeaturesExt.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT;
unusedAttachmentsFeaturesExt.dynamicRenderingUnusedAttachments = VK_TRUE;

#if defined(VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME)
unusedAttachmentsFeaturesExt.pNext = &localReadFeaturesKhr;
#endif

VkPhysicalDeviceVulkan11Features enabled11Features{};
enabled11Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES;
Expand Down

0 comments on commit ac16e73

Please sign in to comment.