From: Kristian H. Kristensen Date: Wed, 29 Jul 2020 18:02:07 +0000 (-0700) Subject: anv: Pass device to setup_gralloc0_usage for error reporting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff0dbf2096148ef7513baa78646809826b7f42b4;p=mesa.git 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: --- diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c index 8e6d0b65ea1..a5f5904d06b 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