anv/image: Replace bo_is_owned with from_gralloc (v2)
authorChad Versace <chad@kiwitree.net>
Fri, 5 Feb 2021 20:07:07 +0000 (12:07 -0800)
committerchadversary <chad@kiwitree.net>
Tue, 9 Mar 2021 18:42:20 +0000 (18:42 +0000)
commite7844c552ca7bf82556408a3c7c13afe4f2dd70b
treeff66788598cfd3d297c62857c3c902d0f8ec56cb
parent5945d7d2e9debfa8b46af6072598f886b4adbb75
anv/image: Replace bo_is_owned with from_gralloc (v2)

The name anv_image_plane::bo_is_owned will be made ambiguous by the
implementation of VK_EXT_image_drm_format_modifier, which may bind the
plane to multiple bo's.

Also, bo_is_owned was set if and only if the image was imported from
gralloc, and it was set only on the first plane. Therefore, let's rename
the field to from_gralloc, and move it to the toplevel of anv_image.

v2: Fix build in anv_android.c.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097>
src/intel/vulkan/anv_android.c
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_private.h