From b40ec57e369ff296e85f3fb2a50dd42208f0ccbe Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 13 Sep 2024 15:48:32 +0200 Subject: [PATCH] panvk: Temporarily disable VK_FORMAT_D32_SFLOAT_S8_UINT on Valhall Valhall doesn't support interleaved D32_S8X24 so let's not advertise this format for now. Ultimately, we want to support it as a multi-plane D32 + S8 format, and we probably want to switch Bifrost to this layout too. Signed-off-by: Boris Brezillon Reviewed-by: Lars-Ivar Hesselberg Simonsen Tested-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Rebecca Mckeever Tested-by: Rebecca Mckeever Reviewed-by: Erik Faye-Lund Part-of: --- src/panfrost/vulkan/panvk_physical_device.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/panfrost/vulkan/panvk_physical_device.c b/src/panfrost/vulkan/panvk_physical_device.c index ae3867d86e9..6bb455a91cd 100644 --- a/src/panfrost/vulkan/panvk_physical_device.c +++ b/src/panfrost/vulkan/panvk_physical_device.c @@ -963,6 +963,18 @@ get_format_properties(struct panvk_physical_device *physical_device, { VkFormatFeatureFlags tex = 0, buffer = 0; enum pipe_format pfmt = vk_format_to_pipe_format(format); + unsigned arch = pan_arch(physical_device->kmod.props.gpu_prod_id); + + /* FIXME: Valhall doesn't support interleaved D32_S8X24. Implement it as + * a multi-plane format, and we probably want to switch Bifrost to this + * layout too, since: + * - it's more cache-friendly (you load more samples on a cache-line if you don't + * have those 24 dummy bits) + * - it takes less memory (you don't lose those 24bits per texel) + * - we can use AFBC + */ + if (arch >= 9 && format == VK_FORMAT_D32_SFLOAT_S8_UINT) + goto end; if (pfmt == PIPE_FORMAT_NONE) goto end;