mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
anv: Pass device to setup_gralloc0_usage for error reporting
Otherwise it doesn't compile.
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: aba57b11ee ("anv: support GetSwapchainGrallocUsage2ANDROID for Android")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6112>
This commit is contained in:
parent
5096ebf954
commit
ff0dbf2096
1 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue