From 495156079c1a0d7933283a18e4a571d7cf959bdc Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Thu, 26 Jun 2025 22:06:54 -0700 Subject: [PATCH] vulkan/android: fix to not append GRALLOC_USAGE_HW_COMPOSER bit The composer usage bit is automatically added by the surface consumer side when the consumer is SurfaceFlinger. e.g. if the swapchain is connected with a media encoder surface, the consumer side would append encoder usage bit instead. Fixes: c406d538585 ("vulkan/android: Add common vkGetSwapchainGrallocUsage{2}ANDROID") Reviewed-by: Chia-I Wu Part-of: --- src/vulkan/runtime/vk_android.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vulkan/runtime/vk_android.c b/src/vulkan/runtime/vk_android.c index 59ce7effdc0..530ea5d75ad 100644 --- a/src/vulkan/runtime/vk_android.c +++ b/src/vulkan/runtime/vk_android.c @@ -207,8 +207,6 @@ setup_gralloc0_usage(struct vk_device *device, VkFormat format, imageUsage); } - *grallocUsage |= GRALLOC_USAGE_HW_COMPOSER; - if (*grallocUsage == 0) return VK_ERROR_FORMAT_NOT_SUPPORTED;