mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
v3dv: rework Vulkan 1.2 feature queries
Fill them into a VkPhysicalDeviceVulkan12Features struct like we do for Vulkan 1.1, and then read them from there. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14731>
This commit is contained in:
parent
692e0dfe27
commit
06220a28e7
1 changed files with 22 additions and 20 deletions
|
|
@ -1085,8 +1085,10 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
v3dv_GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features);
|
||||
|
||||
VkPhysicalDeviceVulkan12Features vk12 = {
|
||||
.storageBuffer8BitAccess = true,
|
||||
.hostQueryReset = true,
|
||||
.uniformAndStorageBuffer8BitAccess = true,
|
||||
.uniformBufferStandardLayout = true,
|
||||
.storageBuffer8BitAccess = true,
|
||||
.storagePushConstant8 = true,
|
||||
};
|
||||
|
||||
|
|
@ -1131,13 +1133,6 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR: {
|
||||
VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR *features =
|
||||
(VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR *)ext;
|
||||
features->uniformBufferStandardLayout = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT: {
|
||||
VkPhysicalDevicePrivateDataFeaturesEXT *features =
|
||||
(VkPhysicalDevicePrivateDataFeaturesEXT *)ext;
|
||||
|
|
@ -1180,11 +1175,26 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: {
|
||||
VkPhysicalDeviceHostQueryResetFeatures *features =
|
||||
(void *) ext;
|
||||
/* Vulkan 1.2 */
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: {
|
||||
VkPhysicalDevice8BitStorageFeatures *features = (void *) ext;
|
||||
features->storageBuffer8BitAccess = vk12.storageBuffer8BitAccess;
|
||||
features->uniformAndStorageBuffer8BitAccess =
|
||||
vk12.uniformAndStorageBuffer8BitAccess;
|
||||
features->storagePushConstant8 = vk12.storagePushConstant8;
|
||||
break;
|
||||
}
|
||||
|
||||
features->hostQueryReset = true;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: {
|
||||
VkPhysicalDeviceHostQueryResetFeatures *features = (void *) ext;
|
||||
features->hostQueryReset = vk12.hostQueryReset;
|
||||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR: {
|
||||
VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR *features =
|
||||
(VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR *)ext;
|
||||
features->uniformBufferStandardLayout = vk12.uniformBufferStandardLayout;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1195,14 +1205,6 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
memcpy(features, &vk11, sizeof(VkPhysicalDeviceVulkan11Features));
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: {
|
||||
VkPhysicalDevice8BitStorageFeatures *features = (void *) ext;
|
||||
features->storageBuffer8BitAccess = vk12.storageBuffer8BitAccess;
|
||||
features->uniformAndStorageBuffer8BitAccess =
|
||||
vk12.uniformAndStorageBuffer8BitAccess;
|
||||
features->storagePushConstant8 = vk12.storagePushConstant8;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: {
|
||||
VkPhysicalDevice16BitStorageFeatures *features = (void *) ext;
|
||||
features->storageBuffer16BitAccess = vk11.storageBuffer16BitAccess;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue