From ff0dbf2096148ef7513baa78646809826b7f42b4 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Wed, 29 Jul 2020 11:02:07 -0700 Subject: [PATCH] anv: Pass device to setup_gralloc0_usage for error reporting Otherwise it doesn't compile. Reviewed-by: Eric Engestrom Reviewed-by: Lionel Landwerlin Fixes: aba57b11ee8c6d ("anv: support GetSwapchainGrallocUsage2ANDROID for Android") Part-of: --- src/intel/vulkan/anv_android.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c index 8e6d0b6..a5f5904 100644 --- a/src/intel/vulkan/anv_android.c +++ b/src/intel/vulkan/anv_android.c @@ -572,8 +572,8 @@ format_supported_with_usage(VkDevice device_h, VkFormat format, static VkResult -setup_gralloc0_usage(VkFormat format, VkImageUsageFlags imageUsage, - int *grallocUsage) +setup_gralloc0_usage(struct anv_device *device, VkFormat format, + VkImageUsageFlags imageUsage, int *grallocUsage) { /* WARNING: Android's libvulkan.so hardcodes the VkImageUsageFlags * returned to applications via VkSurfaceCapabilitiesKHR::supportedUsageFlags. @@ -654,7 +654,7 @@ VkResult anv_GetSwapchainGrallocUsage2ANDROID( return result; int32_t grallocUsage = 0; - result = setup_gralloc0_usage(format, imageUsage, &grallocUsage); + result = setup_gralloc0_usage(device, format, imageUsage, &grallocUsage); if (result != VK_SUCCESS) return result; @@ -686,6 +686,7 @@ VkResult anv_GetSwapchainGrallocUsageANDROID( VkImageUsageFlags imageUsage, int* grallocUsage) { + ANV_FROM_HANDLE(anv_device, device, device_h); VkResult result; *grallocUsage = 0; @@ -695,7 +696,7 @@ VkResult anv_GetSwapchainGrallocUsageANDROID( if (result != VK_SUCCESS) return result; - return setup_gralloc0_usage(format, imageUsage, grallocUsage); + return setup_gralloc0_usage(device, format, imageUsage, grallocUsage); } VkResult -- 2.7.4