anv/android: support creating images from external format
authorTapani Pälli <tapani.palli@intel.com>
Thu, 8 Nov 2018 08:37:12 +0000 (10:37 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 19 Dec 2018 07:38:41 +0000 (09:38 +0200)
commitf1654fa7e313a97e8849973b6877700bbdb2ce06
treefb41b0cc479b352eac8abaa42178dccb01d5e08f
parent517103abf1c2ba6c540ae4f5fb1d10874e5568f6
anv/android: support creating images from external format

Since we don't know the exact format at creation time, some initialization
is done only when bound with memory in vkBindImageMemory.

v2: demand dedicated allocation in vkGetImageMemoryRequirements2 if
    image has external format

v3: refactor prepare_ahw_image, support vkBindImageMemory2,
    calculate stride correctly for rgb(x) surfaces, rename as
    'resolve_ahw_image'

v4: rebase to b43f955037c changes
v5: add some assertions to verify input correctness (Lionel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_android.c
src/intel/vulkan/anv_android.h
src/intel/vulkan/anv_android_stubs.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_private.h