From 72f4cf530fef18fcc2b343f7edcae9783635143c Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 30 Jan 2021 22:44:40 +0100 Subject: [PATCH] radv: Only support format with a PIPE_FORMAT. Otherwise non-supported format will be mapped to PIPE_FORMAT_NONE and as such get a non-NULL description. Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_formats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 58b68fd0602..26506cd2f58 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -656,7 +656,8 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical bool blendable; bool scaled = false; /* TODO: implement some software emulation of SUBSAMPLED formats. */ - if (!desc || desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) { + if (!desc || vk_format_to_pipe_format(format) == PIPE_FORMAT_NONE || + desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) { out_properties->linearTilingFeatures = linear; out_properties->optimalTilingFeatures = tiled; out_properties->bufferFeatures = buffer;