mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
anv,hasvk: Use vk_features2_to_features
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
This commit is contained in:
parent
672a06a1b6
commit
4fa2924610
4 changed files with 10 additions and 34 deletions
|
|
@ -164,12 +164,6 @@ anv_ahb_format_for_vk_format(VkFormat vk_format)
|
|||
}
|
||||
}
|
||||
|
||||
static VkFormatFeatureFlags
|
||||
features2_to_features(VkFormatFeatureFlags2 features2)
|
||||
{
|
||||
return features2 & VK_ALL_FORMAT_FEATURE_FLAG_BITS;
|
||||
}
|
||||
|
||||
static VkResult
|
||||
get_ahw_buffer_format_properties2(
|
||||
VkDevice device_h,
|
||||
|
|
@ -271,7 +265,7 @@ anv_GetAndroidHardwareBufferPropertiesANDROID(
|
|||
format_prop->format = format_prop2.format;
|
||||
format_prop->externalFormat = format_prop2.externalFormat;
|
||||
format_prop->formatFeatures =
|
||||
features2_to_features(format_prop2.formatFeatures);
|
||||
vk_format_features2_to_features(format_prop2.formatFeatures);
|
||||
format_prop->samplerYcbcrConversionComponents =
|
||||
format_prop2.samplerYcbcrConversionComponents;
|
||||
format_prop->suggestedYcbcrModel = format_prop2.suggestedYcbcrModel;
|
||||
|
|
|
|||
|
|
@ -865,12 +865,6 @@ get_buffer_format_features2(const struct intel_device_info *devinfo,
|
|||
return flags;
|
||||
}
|
||||
|
||||
static VkFormatFeatureFlags
|
||||
features2_to_features(VkFormatFeatureFlags2 features2)
|
||||
{
|
||||
return features2 & VK_ALL_FORMAT_FEATURE_FLAG_BITS;
|
||||
}
|
||||
|
||||
static void
|
||||
get_drm_format_modifier_properties_list(const struct anv_physical_device *physical_device,
|
||||
VkFormat vk_format,
|
||||
|
|
@ -888,7 +882,7 @@ get_drm_format_modifier_properties_list(const struct anv_physical_device *physic
|
|||
anv_get_image_format_features2(devinfo, vk_format, anv_format,
|
||||
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
|
||||
isl_mod_info);
|
||||
VkFormatFeatureFlags features = features2_to_features(features2);
|
||||
VkFormatFeatureFlags features = vk_format_features2_to_features(features2);
|
||||
if (!features)
|
||||
continue;
|
||||
|
||||
|
|
@ -959,9 +953,9 @@ void anv_GetPhysicalDeviceFormatProperties2(
|
|||
buffer2 = get_buffer_format_features2(devinfo, vk_format, anv_format);
|
||||
|
||||
pFormatProperties->formatProperties = (VkFormatProperties) {
|
||||
.linearTilingFeatures = features2_to_features(linear2),
|
||||
.optimalTilingFeatures = features2_to_features(optimal2),
|
||||
.bufferFeatures = features2_to_features(buffer2),
|
||||
.linearTilingFeatures = vk_format_features2_to_features(linear2),
|
||||
.optimalTilingFeatures = vk_format_features2_to_features(optimal2),
|
||||
.bufferFeatures = vk_format_features2_to_features(buffer2),
|
||||
};
|
||||
|
||||
vk_foreach_struct(ext, pFormatProperties->pNext) {
|
||||
|
|
|
|||
|
|
@ -164,12 +164,6 @@ anv_ahb_format_for_vk_format(VkFormat vk_format)
|
|||
}
|
||||
}
|
||||
|
||||
static VkFormatFeatureFlags
|
||||
features2_to_features(VkFormatFeatureFlags2 features2)
|
||||
{
|
||||
return features2 & VK_ALL_FORMAT_FEATURE_FLAG_BITS;
|
||||
}
|
||||
|
||||
static VkResult
|
||||
get_ahw_buffer_format_properties2(
|
||||
VkDevice device_h,
|
||||
|
|
@ -271,7 +265,7 @@ anv_GetAndroidHardwareBufferPropertiesANDROID(
|
|||
format_prop->format = format_prop2.format;
|
||||
format_prop->externalFormat = format_prop2.externalFormat;
|
||||
format_prop->formatFeatures =
|
||||
features2_to_features(format_prop2.formatFeatures);
|
||||
vk_format_features2_to_features(format_prop2.formatFeatures);
|
||||
format_prop->samplerYcbcrConversionComponents =
|
||||
format_prop2.samplerYcbcrConversionComponents;
|
||||
format_prop->suggestedYcbcrModel = format_prop2.suggestedYcbcrModel;
|
||||
|
|
|
|||
|
|
@ -857,12 +857,6 @@ get_buffer_format_features2(const struct intel_device_info *devinfo,
|
|||
return flags;
|
||||
}
|
||||
|
||||
static VkFormatFeatureFlags
|
||||
features2_to_features(VkFormatFeatureFlags2 features2)
|
||||
{
|
||||
return features2 & VK_ALL_FORMAT_FEATURE_FLAG_BITS;
|
||||
}
|
||||
|
||||
static void
|
||||
get_drm_format_modifier_properties_list(const struct anv_physical_device *physical_device,
|
||||
VkFormat vk_format,
|
||||
|
|
@ -880,7 +874,7 @@ get_drm_format_modifier_properties_list(const struct anv_physical_device *physic
|
|||
anv_get_image_format_features2(devinfo, vk_format, anv_format,
|
||||
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
|
||||
isl_mod_info);
|
||||
VkFormatFeatureFlags features = features2_to_features(features2);
|
||||
VkFormatFeatureFlags features = vk_format_features2_to_features(features2);
|
||||
if (!features)
|
||||
continue;
|
||||
|
||||
|
|
@ -951,9 +945,9 @@ void anv_GetPhysicalDeviceFormatProperties2(
|
|||
buffer2 = get_buffer_format_features2(devinfo, vk_format, anv_format);
|
||||
|
||||
pFormatProperties->formatProperties = (VkFormatProperties) {
|
||||
.linearTilingFeatures = features2_to_features(linear2),
|
||||
.optimalTilingFeatures = features2_to_features(optimal2),
|
||||
.bufferFeatures = features2_to_features(buffer2),
|
||||
.linearTilingFeatures = vk_format_features2_to_features(linear2),
|
||||
.optimalTilingFeatures = vk_format_features2_to_features(optimal2),
|
||||
.bufferFeatures = vk_format_features2_to_features(buffer2),
|
||||
};
|
||||
|
||||
vk_foreach_struct(ext, pFormatProperties->pNext) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue