Mesa (master): radv: Don't allow 3d or 1d depth/stencil textures.

Bas Nieuwenhuizen bnieuwenhuizen at kemper.freedesktop.org
Sun Jan 21 23:16:13 UTC 2018


Module: Mesa
Branch: master
Commit: 4584c4ef049ac604ebbeab56992d569e4d1f8a46
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4584c4ef049ac604ebbeab56992d569e4d1f8a46

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Sun Jan 21 23:39:36 2018 +0100

radv: Don't allow 3d or 1d depth/stencil textures.

addrlib asserts when that happens, and supporting it is not
required so lets not allow this for now.

It also assert on fmask, but we don't have the number of samples here.

CC: <mesa-stable at lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied at redhat.com>

---

 src/amd/vulkan/radv_formats.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index c008c1bae6..19cd2b1a91 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -1063,6 +1063,9 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph
 	if (format_feature_flags == 0)
 		goto unsupported;
 
+	if (info->type != VK_IMAGE_TYPE_2D && vk_format_is_depth_or_stencil(info->format))
+		goto unsupported;
+
 	switch (info->type) {
 	default:
 		unreachable("bad vkimage type\n");




More information about the mesa-commit mailing list