mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 03:18:08 +02:00
anv: fix ANB gralloc usage query to not append display usage bits
The consumer of the Android surface may or may not be display. e.g. it can also be a media encoder. When BufferQueue makes the allocation, it takes the gralloc usage bits from both the client API (EGL/Vulkan) and the consumer side. Cc: mesa-stable Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
This commit is contained in:
parent
fb77881262
commit
8f4c938c1e
1 changed files with 0 additions and 20 deletions
|
|
@ -514,26 +514,6 @@ setup_gralloc0_usage(struct anv_device *device, VkFormat format,
|
|||
"swapchain", imageUsage);
|
||||
}
|
||||
|
||||
/* The below formats support GRALLOC_USAGE_HW_FB (that is, display
|
||||
* scanout). This short list of formats is univserally supported on Intel
|
||||
* but is incomplete. The full set of supported formats is dependent on
|
||||
* kernel and hardware.
|
||||
*
|
||||
* FINISHME: Advertise all display-supported formats.
|
||||
*/
|
||||
switch (format) {
|
||||
case VK_FORMAT_B8G8R8A8_UNORM:
|
||||
case VK_FORMAT_R5G6B5_UNORM_PACK16:
|
||||
case VK_FORMAT_R8G8B8A8_UNORM:
|
||||
case VK_FORMAT_R8G8B8A8_SRGB:
|
||||
*grallocUsage |= GRALLOC_USAGE_HW_FB |
|
||||
GRALLOC_USAGE_HW_COMPOSER |
|
||||
GRALLOC_USAGE_EXTERNAL_DISP;
|
||||
break;
|
||||
default:
|
||||
mesa_logw("%s: unsupported format=%d", __func__, format);
|
||||
}
|
||||
|
||||
if (*grallocUsage == 0)
|
||||
return VK_ERROR_FORMAT_NOT_SUPPORTED;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue