diff --git a/src/panfrost/vulkan/panvk_physical_device.c b/src/panfrost/vulkan/panvk_physical_device.c index 747076ac0a2..e9abc9323ba 100644 --- a/src/panfrost/vulkan/panvk_physical_device.c +++ b/src/panfrost/vulkan/panvk_physical_device.c @@ -1129,6 +1129,23 @@ panvk_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator) panvk_arch_dispatch(arch, destroy_device, device, pAllocator); } +static bool +unsupported_yuv_format(enum pipe_format pfmt) +{ + switch (pfmt) { + /* 3-plane YUV 444 and 16-bit 3-plane YUV are not supported natively by + * the HW. + */ + case PIPE_FORMAT_Y8_U8_V8_444_UNORM: + case PIPE_FORMAT_Y16_U16_V16_420_UNORM: + case PIPE_FORMAT_Y16_U16_V16_422_UNORM: + case PIPE_FORMAT_Y16_U16_V16_444_UNORM: + return true; + default: + return false; + } +} + static bool format_is_supported(struct panvk_physical_device *physical_device, const struct panfrost_format fmt, @@ -1137,6 +1154,9 @@ format_is_supported(struct panvk_physical_device *physical_device, if (pfmt == PIPE_FORMAT_NONE) return false; + if (unsupported_yuv_format(pfmt)) + return false; + /* If the format ID is zero, it's not supported. */ if (!fmt.hw) return false;