anv: support GetSwapchainGrallocUsage2ANDROID for Android
authorTapani Pälli <tapani.palli@intel.com>
Thu, 1 Aug 2019 10:49:34 +0000 (13:49 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 8 Aug 2019 05:08:01 +0000 (05:08 +0000)
commitaba57b11ee8c6d4be225f6e22ae00d96b1833d73
tree2e32b5f4066fed7008783fffd9e6dcb69833dc58
parent51c3ab618be90d59da23d7e3765a45aff50bf398
anv: support GetSwapchainGrallocUsage2ANDROID for Android

New function supports gralloc1 usage flags that get set separately
for producer and consumer. As we still need to support old method too,
let's share common code and use android_convertGralloc0To1Usage helper.
Bump the VK_ANDROID_native_buffer version to indicate support for the
new call.

Changes were tested on Android Celadon P with Basemark GPU and various
Sascha Willems Vulkan demos.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/Android.vulkan.mk
src/intel/vulkan/anv_android.c
src/intel/vulkan/anv_extensions.py