anv: Remove anv_physical_device_get_format_properties()
authorChad Versace <chadversary@chromium.org>
Fri, 3 Nov 2017 23:35:12 +0000 (16:35 -0700)
committerChad Versace <chadversary@chromium.org>
Fri, 10 Nov 2017 00:01:59 +0000 (16:01 -0800)
Fold its body into its sole caller,
anv_GetPhysicalDeviceFormatProperties().

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_formats.c

index d662e336d888d0dc48e22b06aadd3a4a83484f41..25d34fcadc1bd7beb4198487155dde64279f82aa 100644 (file)
@@ -651,35 +651,25 @@ get_buffer_format_features(const struct gen_device_info *devinfo,
    return flags;
 }
 
-static void
-anv_physical_device_get_format_properties(struct anv_physical_device *physical_device,
-                                          VkFormat vk_format,
-                                          VkFormatProperties *out_properties)
-{
-   const struct gen_device_info *devinfo = &physical_device->info;
-   const struct anv_format *anv_format = anv_get_format(vk_format);
-
-   out_properties->linearTilingFeatures =
-      get_image_format_features(devinfo, vk_format, anv_format,
-                                VK_IMAGE_TILING_LINEAR);
-   out_properties->optimalTilingFeatures =
-      get_image_format_features(devinfo, vk_format, anv_format,
-                                VK_IMAGE_TILING_OPTIMAL);
-   out_properties->bufferFeatures =
-      get_buffer_format_features(devinfo, vk_format, anv_format);
-}
-
 void anv_GetPhysicalDeviceFormatProperties(
     VkPhysicalDevice                            physicalDevice,
-    VkFormat                                    format,
+    VkFormat                                    vk_format,
     VkFormatProperties*                         pFormatProperties)
 {
    ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice);
+   const struct gen_device_info *devinfo = &physical_device->info;
+   const struct anv_format *anv_format = anv_get_format(vk_format);
 
-   anv_physical_device_get_format_properties(
-               physical_device,
-               format,
-               pFormatProperties);
+   *pFormatProperties = (VkFormatProperties) {
+      .linearTilingFeatures =
+         get_image_format_features(devinfo, vk_format, anv_format,
+                                   VK_IMAGE_TILING_LINEAR),
+      .optimalTilingFeatures =
+         get_image_format_features(devinfo, vk_format, anv_format,
+                                   VK_IMAGE_TILING_OPTIMAL),
+      .bufferFeatures =
+         get_buffer_format_features(devinfo, vk_format, anv_format),
+   };
 }
 
 void anv_GetPhysicalDeviceFormatProperties2KHR(