anv/android: Fix importing hardware buffers with planar formats

Currently, we try to fetch the color aspect of the format and convert that
to an ISL format, which is then used to convert the pixel stride to bytes.
This does not work with planar formats because they don't have a color
aspect, and the planes can be of different sizes anyway, so may not have
the same byte stride. Change to calculate the stride individually for each
plane.

Signed-off-by: Chris Spencer <spencercw@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24388>
This commit is contained in:
Chris Spencer
2023-07-30 09:20:52 +01:00
committed by Marge Bot
parent 203b4054f3
commit 35fddccf3f
3 changed files with 18 additions and 32 deletions

View File

@@ -4456,7 +4456,7 @@ struct anv_image_create_info {
/** These flags will be added to any derived from VkImageCreateInfo. */
isl_surf_usage_flags_t isl_extra_usage_flags;
/** An opt-in stride, should be 0 for implicit layouts */
/** An opt-in stride in pixels, should be 0 for implicit layouts */
uint32_t stride;
/** Whether to allocate private binding */