1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 16:24:12 +01:00

[dxvk] Don't enable VK_KHR_get_physical_device_properties2

Core in Vulkan 1.1.
This commit is contained in:
Philip Rebohle 2020-01-16 19:59:56 +01:00 committed by Philip Rebohle
parent 6690a31d8d
commit 252ec9406d
5 changed files with 22 additions and 29 deletions

View File

@ -32,11 +32,11 @@ namespace dxvk {
memBudget.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT;
memBudget.pNext = nullptr;
VkPhysicalDeviceMemoryProperties2KHR memProps = { };
memProps.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR;
VkPhysicalDeviceMemoryProperties2 memProps = { };
memProps.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2;
memProps.pNext = m_hasMemoryBudget ? &memBudget : nullptr;
m_vki->vkGetPhysicalDeviceMemoryProperties2KHR(m_handle, &memProps);
m_vki->vkGetPhysicalDeviceMemoryProperties2(m_handle, &memProps);
DxvkAdapterMemoryInfo info = { };
info.heapCount = memProps.memoryProperties.memoryHeapCount;
@ -472,19 +472,17 @@ namespace dxvk {
void DxvkAdapter::queryDeviceInfo() {
m_deviceInfo = DxvkDeviceInfo();
m_deviceInfo.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR;
m_deviceInfo.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
m_deviceInfo.core.pNext = nullptr;
// Query info now so that we have basic device properties available
m_vki->vkGetPhysicalDeviceProperties2KHR(m_handle, &m_deviceInfo.core);
m_vki->vkGetPhysicalDeviceProperties2(m_handle, &m_deviceInfo.core);
if (m_deviceInfo.core.properties.apiVersion >= VK_MAKE_VERSION(1, 1, 0)) {
m_deviceInfo.coreDeviceId.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES;
m_deviceInfo.coreDeviceId.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.coreDeviceId);
m_deviceInfo.coreDeviceId.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES;
m_deviceInfo.coreDeviceId.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.coreDeviceId);
m_deviceInfo.coreSubgroup.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES;
m_deviceInfo.coreSubgroup.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.coreSubgroup);
}
m_deviceInfo.coreSubgroup.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES;
m_deviceInfo.coreSubgroup.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.coreSubgroup);
if (m_deviceExtensions.supports(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME)) {
m_deviceInfo.extTransformFeedback.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT;
@ -507,7 +505,7 @@ namespace dxvk {
}
// Query full device properties for all enabled extensions
m_vki->vkGetPhysicalDeviceProperties2KHR(m_handle, &m_deviceInfo.core);
m_vki->vkGetPhysicalDeviceProperties2(m_handle, &m_deviceInfo.core);
// Nvidia reports the driver version in a slightly different format
if (DxvkGpuVendor(m_deviceInfo.core.properties.vendorID) == DxvkGpuVendor::Nvidia) {
@ -521,7 +519,7 @@ namespace dxvk {
void DxvkAdapter::queryDeviceFeatures() {
m_deviceFeatures = DxvkDeviceFeatures();
m_deviceFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
m_deviceFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
m_deviceFeatures.core.pNext = nullptr;
if (m_deviceExtensions.supports(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME)) {
@ -559,7 +557,7 @@ namespace dxvk {
m_deviceFeatures.extVertexAttributeDivisor.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.extVertexAttributeDivisor);
}
m_vki->vkGetPhysicalDeviceFeatures2KHR(m_handle, &m_deviceFeatures.core);
m_vki->vkGetPhysicalDeviceFeatures2(m_handle, &m_deviceFeatures.core);
}

View File

@ -13,7 +13,7 @@ namespace dxvk {
* so before using them, check whether they are supported.
*/
struct DxvkDeviceInfo {
VkPhysicalDeviceProperties2KHR core;
VkPhysicalDeviceProperties2 core;
VkPhysicalDeviceIDProperties coreDeviceId;
VkPhysicalDeviceSubgroupProperties coreSubgroup;
VkPhysicalDeviceTransformFeedbackPropertiesEXT extTransformFeedback;
@ -31,7 +31,7 @@ namespace dxvk {
* extended features will be marked as unsupported.
*/
struct DxvkDeviceFeatures {
VkPhysicalDeviceFeatures2KHR core;
VkPhysicalDeviceFeatures2 core;
VkPhysicalDeviceConditionalRenderingFeaturesEXT extConditionalRendering;
VkPhysicalDeviceDepthClipEnableFeaturesEXT extDepthClipEnable;
VkPhysicalDeviceHostQueryResetFeaturesEXT extHostQueryReset;

View File

@ -293,7 +293,6 @@ namespace dxvk {
* used by DXVK if supported by the implementation.
*/
struct DxvkInstanceExtensions {
DxvkExt khrGetPhysicalDeviceProperties2 = { VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, DxvkExtMode::Required };
DxvkExt khrGetSurfaceCapabilities2 = { VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME, DxvkExtMode::Optional };
DxvkExt khrSurface = { VK_KHR_SURFACE_EXTENSION_NAME, DxvkExtMode::Required };
};

View File

@ -87,8 +87,7 @@ namespace dxvk {
VkInstance DxvkInstance::createInstance() {
DxvkInstanceExtensions insExtensions;
std::array<DxvkExt*, 3> insExtensionList = {{
&insExtensions.khrGetPhysicalDeviceProperties2,
std::array<DxvkExt*, 2> insExtensionList = {{
&insExtensions.khrGetSurfaceCapabilities2,
&insExtensions.khrSurface,
}};

View File

@ -82,22 +82,19 @@ namespace dxvk::vk {
VULKAN_FN(vkEnumerateDeviceExtensionProperties);
VULKAN_FN(vkEnumeratePhysicalDevices);
VULKAN_FN(vkGetPhysicalDeviceFeatures);
VULKAN_FN(vkGetPhysicalDeviceFeatures2);
VULKAN_FN(vkGetPhysicalDeviceFormatProperties);
VULKAN_FN(vkGetPhysicalDeviceFormatProperties2);
VULKAN_FN(vkGetPhysicalDeviceProperties2);
VULKAN_FN(vkGetPhysicalDeviceImageFormatProperties);
VULKAN_FN(vkGetPhysicalDeviceImageFormatProperties2);
VULKAN_FN(vkGetPhysicalDeviceMemoryProperties);
VULKAN_FN(vkGetPhysicalDeviceMemoryProperties2);
VULKAN_FN(vkGetPhysicalDeviceProperties);
VULKAN_FN(vkGetPhysicalDeviceQueueFamilyProperties);
VULKAN_FN(vkGetPhysicalDeviceQueueFamilyProperties2);
VULKAN_FN(vkGetPhysicalDeviceSparseImageFormatProperties);
#ifdef VK_KHR_get_physical_device_properties2
VULKAN_FN(vkGetPhysicalDeviceFeatures2KHR);
VULKAN_FN(vkGetPhysicalDeviceProperties2KHR);
VULKAN_FN(vkGetPhysicalDeviceFormatProperties2KHR);
VULKAN_FN(vkGetPhysicalDeviceImageFormatProperties2KHR);
VULKAN_FN(vkGetPhysicalDeviceQueueFamilyProperties2KHR);
VULKAN_FN(vkGetPhysicalDeviceMemoryProperties2KHR);
VULKAN_FN(vkGetPhysicalDeviceSparseImageFormatProperties2KHR);
#endif
VULKAN_FN(vkGetPhysicalDeviceSparseImageFormatProperties2);
#ifdef VK_KHR_get_surface_capabilities2
VULKAN_FN(vkGetPhysicalDeviceSurfaceCapabilities2KHR);