diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-12-18 07:03:13 +0100 |
|---|---|---|
| committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-12-18 07:17:08 +0100 |
| commit | 6c00151d17050861e76677c219296fb35bf76214 (patch) | |
| tree | a2601650dd6da243df5a4316f3a3b60e585198d3 /src/video_core/vulkan_common/vulkan_device.cpp | |
| parent | 14d2c77f910aad77b408eef130d8212430e7202a (diff) | |
Vulkan: Fix the checks for primitive restart extension.
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.cpp')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 2413e72ba..9862b815b 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -1129,6 +1129,19 @@ std::vector<const char*> Device::LoadExtensions(bool requires_surface) { khr_pipeline_executable_properties = true; } } + if (has_ext_primitive_topology_list_restart) { + VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT primitive_topology_list_restart{}; + primitive_topology_list_restart.sType = + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT; + primitive_topology_list_restart.pNext = nullptr; + features.pNext = &primitive_topology_list_restart; + physical.GetFeatures2KHR(features); + + is_topology_list_restart_supported = + primitive_topology_list_restart.primitiveTopologyListRestart; + is_patch_list_restart_supported = + primitive_topology_list_restart.primitiveTopologyPatchListRestart; + } if (has_khr_image_format_list && has_khr_swapchain_mutable_format) { extensions.push_back(VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME); extensions.push_back(VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME); @@ -1144,18 +1157,6 @@ std::vector<const char*> Device::LoadExtensions(bool requires_surface) { max_push_descriptors = push_descriptor.maxPushDescriptors; } - if (has_ext_primitive_topology_list_restart) { - VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT primitive_topology_list_restart{}; - primitive_topology_list_restart.sType = - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT; - primitive_topology_list_restart.pNext = nullptr; - physical_properties.pNext = &primitive_topology_list_restart; - physical.GetProperties2KHR(physical_properties); - is_topology_list_restart_supported = - primitive_topology_list_restart.primitiveTopologyListRestart; - is_patch_list_restart_supported = - primitive_topology_list_restart.primitiveTopologyPatchListRestart; - } return extensions; } |
