From 61a90a154db6c4db207094ccc2d7ed6d84cf9e36 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Mon, 16 Jun 2025 19:07:00 -0700 Subject: [PATCH] v3dv: use common vk_android_get_front_buffer_usage helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Alejandro PiƱeiro Part-of: --- src/broadcom/vulkan/v3dv_device.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index 54e1c5a0e28..1e346c36396 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -870,19 +870,6 @@ get_device_properties(const struct v3dv_physical_device *device, VK_SUBGROUP_FEATURE_QUAD_BIT; } -#if DETECT_OS_ANDROID - /* Used to determine the sharedImage prop in - * VkPhysicalDevicePresentationPropertiesANDROID - */ - uint64_t front_rendering_usage = 0; - struct u_gralloc *gralloc = u_gralloc_create(U_GRALLOC_TYPE_AUTO); - if (gralloc != NULL) { - u_gralloc_get_front_rendering_usage(gralloc, &front_rendering_usage); - u_gralloc_destroy(&gralloc); - } - VkBool32 shared_image = front_rendering_usage ? VK_TRUE : VK_FALSE; -#endif - /* FIXME: this will probably require an in-depth review */ *properties = (struct vk_properties) { /* VkPhysicalDeviceProperties, limits and sparse props below */ @@ -1182,7 +1169,7 @@ get_device_properties(const struct v3dv_physical_device *device, #if DETECT_OS_ANDROID /* VkPhysicalDevicePresentationPropertiesANDROID */ - .sharedImage = shared_image, + .sharedImage = !!vk_android_get_front_buffer_usage(), #endif /* VkPhysicalDeviceDrmPropertiesEXT */