Mesa (master): radv: Restrict YUVY formats to 1 layer.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 2 00:41:38 UTC 2019
Module: Mesa
Branch: master
Commit: 0c99b5ace888d1bb81d8f334e4ea019547fe69c4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c99b5ace888d1bb81d8f334e4ea019547fe69c4
Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date: Mon Apr 29 22:35:34 2019 +0200
radv: Restrict YUVY formats to 1 layer.
Fixes: 8bb3cec7c9b "radv: Expose VK_EXT_ycbcr_image_arrays."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_formats.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index 74c39dc66c4..bee1c57e610 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -1094,6 +1094,7 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph
uint32_t maxMipLevels;
uint32_t maxArraySize;
VkSampleCountFlags sampleCounts = VK_SAMPLE_COUNT_1_BIT;
+ const struct vk_format_description *desc = vk_format_description(info->format);
radv_physical_device_get_format_properties(physical_device, info->format,
&format_props);
@@ -1137,6 +1138,12 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph
break;
}
+ if (desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) {
+ /* Might be able to support but the entire format support is
+ * messy, so taking the lazy way out. */
+ maxArraySize = 1;
+ }
+
if (info->tiling == VK_IMAGE_TILING_OPTIMAL &&
info->type == VK_IMAGE_TYPE_2D &&
(format_feature_flags & (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
More information about the mesa-commit
mailing list