summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-11-03 16:35:12 -0700
committerChad Versace <[email protected]>2017-11-09 16:01:59 -0800
commit3ee7f4bc2f56f7c9c23de52fbe77125deef6be86 (patch)
treeed1625c95d20efe614b8a9cbb5db7ce60960e16c /src/intel
parent891d237667175b91e6c1b1a91be494cd30e6f22c (diff)
anv: Remove anv_physical_device_get_format_properties()
Fold its body into its sole caller, anv_GetPhysicalDeviceFormatProperties(). Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_formats.c36
1 files changed, 13 insertions, 23 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index d662e336d88..25d34fcadc1 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -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(