From ba65a1e36bd828a17422c63529aff3bd5d80f777 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 10 Sep 2018 21:46:14 +0200 Subject: [PATCH] [dxvk] Query new Vertex Attribute Divisor features This was added in revision 3 of the extension. --- src/dxvk/dxvk_adapter.cpp | 5 +++++ src/dxvk/dxvk_device_info.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/dxvk/dxvk_adapter.cpp b/src/dxvk/dxvk_adapter.cpp index fb32d910..133cb5ff 100644 --- a/src/dxvk/dxvk_adapter.cpp +++ b/src/dxvk/dxvk_adapter.cpp @@ -333,6 +333,11 @@ namespace dxvk { m_deviceFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR; m_deviceFeatures.core.pNext = nullptr; + if (m_deviceExtensions.supports(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME) >= 3) { + m_deviceFeatures.extVertexAttributeDivisor.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT; + m_deviceFeatures.extVertexAttributeDivisor.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extVertexAttributeDivisor); + } + m_vki->vkGetPhysicalDeviceFeatures2KHR(m_handle, &m_deviceFeatures.core); } diff --git a/src/dxvk/dxvk_device_info.h b/src/dxvk/dxvk_device_info.h index 620fe220..de85fc5a 100644 --- a/src/dxvk/dxvk_device_info.h +++ b/src/dxvk/dxvk_device_info.h @@ -27,6 +27,7 @@ namespace dxvk { */ struct DxvkDeviceFeatures { VkPhysicalDeviceFeatures2KHR core; + VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT extVertexAttributeDivisor; }; } \ No newline at end of file