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>
This commit is contained in:
Tapani Pälli
2019-08-01 13:49:34 +03:00
parent 51c3ab618b
commit aba57b11ee
3 changed files with 88 additions and 22 deletions
+4
View File
@@ -304,5 +304,9 @@ else
libexpat
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
LOCAL_STATIC_LIBRARIES += libgrallocusage
endif
include $(MESA_COMMON_MK)
include $(BUILD_SHARED_LIBRARY)