Skip to content

Commit

Permalink
vk: Move driver properties to properties section from features section
Browse files Browse the repository at this point in the history
  • Loading branch information
kd-11 committed Feb 16, 2024
1 parent 1867f9a commit 7abc5f3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions rpcs3/Emu/RSX/VK/vkutils/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ namespace vk
features2.pNext = &shader_support_info;
}

if (device_extensions.is_supported(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME))
{
driver_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR;
driver_properties.pNext = features2.pNext;
features2.pNext = &driver_properties;
}

if (device_extensions.is_supported(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME))
{
descriptor_indexing_info.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT;
Expand Down Expand Up @@ -127,6 +120,8 @@ namespace vk
}

supported_extensions instance_extensions(supported_extensions::instance);
supported_extensions device_extensions(supported_extensions::device, nullptr, dev);

if (!instance_extensions.is_supported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME))
{
vkGetPhysicalDeviceProperties(dev, &props);
Expand All @@ -146,6 +141,13 @@ namespace vk
properties2.pNext = &descriptor_indexing_props;
}

if (device_extensions.is_supported(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME))
{
driver_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR;
driver_properties.pNext = properties2.pNext;
properties2.pNext = &driver_properties;
}

auto _vkGetPhysicalDeviceProperties2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(vkGetInstanceProcAddr(parent, "vkGetPhysicalDeviceProperties2KHR"));
ensure(_vkGetPhysicalDeviceProperties2KHR);

Expand Down

0 comments on commit 7abc5f3

Please sign in to comment.