aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-11-03 16:26:51 -0700
committerChad Versace <[email protected]>2017-11-09 16:01:59 -0800
commitb3e2ce058071a0e104ccdcbb705de2942360a29a (patch)
tree8cdaae4140080bfa893505efed9da212717d24fd /src/intel
parentcd3fe376e0d18206c430d04d5cc630c72a2e6704 (diff)
anv: Simplify anv_get_image_format_properties()
Now that get_image_format_features() has a VkImageTiling parameter, we can bypass anv_physical_device_get_format_properties() and call get_image_format_features() directly. 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.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index bd34e1ffabb..6ecd32b532e 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -713,30 +713,19 @@ anv_get_image_format_properties(
VkImageFormatProperties *pImageFormatProperties,
VkSamplerYcbcrConversionImageFormatPropertiesKHR *pYcbcrImageFormatProperties)
{
- VkFormatProperties format_props;
VkFormatFeatureFlags format_feature_flags;
VkExtent3D maxExtent;
uint32_t maxMipLevels;
uint32_t maxArraySize;
VkSampleCountFlags sampleCounts = VK_SAMPLE_COUNT_1_BIT;
+ const struct gen_device_info *devinfo = &physical_device->info;
const struct anv_format *format = anv_get_format(info->format);
if (format == NULL)
goto unsupported;
- anv_physical_device_get_format_properties(physical_device, info->format,
- &format_props);
-
- /* Extract the VkFormatFeatureFlags that are relevant for the queried
- * tiling.
- */
- if (info->tiling == VK_IMAGE_TILING_LINEAR) {
- format_feature_flags = format_props.linearTilingFeatures;
- } else if (info->tiling == VK_IMAGE_TILING_OPTIMAL) {
- format_feature_flags = format_props.optimalTilingFeatures;
- } else {
- unreachable("bad VkImageTiling");
- }
+ format_feature_flags = get_image_format_features(devinfo, info->format,
+ format, info->tiling);
switch (info->type) {
default: