v3dv/format: no need for GetPhysicalDeviceFormatProperties
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 17 May 2022 23:31:39 +0000 (01:31 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 26 May 2022 21:20:50 +0000 (21:20 +0000)
The common Mesa Vulkan framework already provides a common
implementation based on GetPhysicalDeviceFormatProperties2.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16718>

src/broadcom/vulkan/v3dv_formats.c

index cc48ccf..2e8e266 100644 (file)
@@ -262,14 +262,14 @@ v3dv_buffer_format_supports_features(struct v3dv_device *device,
 }
 
 VKAPI_ATTR void VKAPI_CALL
-v3dv_GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice,
-                                       VkFormat format,
-                                       VkFormatProperties* pFormatProperties)
+v3dv_GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice,
+                                        VkFormat format,
+                                        VkFormatProperties2 *pFormatProperties)
 {
    V3DV_FROM_HANDLE(v3dv_physical_device, pdevice, physicalDevice);
    const struct v3dv_format *v3dv_format = v3dv_X(pdevice, get_format)(format);
 
-   *pFormatProperties = (VkFormatProperties) {
+   pFormatProperties->formatProperties = (VkFormatProperties) {
       .linearTilingFeatures =
          image_format_features(pdevice, format, v3dv_format, VK_IMAGE_TILING_LINEAR),
       .optimalTilingFeatures =
@@ -277,15 +277,6 @@ v3dv_GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice,
       .bufferFeatures =
          buffer_format_features(format, v3dv_format),
    };
-}
-
-VKAPI_ATTR void VKAPI_CALL
-v3dv_GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice,
-                                        VkFormat format,
-                                        VkFormatProperties2 *pFormatProperties)
-{
-   v3dv_GetPhysicalDeviceFormatProperties(physicalDevice, format,
-                                          &pFormatProperties->formatProperties);
 
    vk_foreach_struct(ext, pFormatProperties->pNext) {
       switch ((unsigned)ext->sType) {