Enable Android-O AHB support in Android-P build
authorDaniel Koch <dkoch@nvidia.com>
Wed, 3 Oct 2018 20:20:42 +0000 (16:20 -0400)
committerDaniel Koch <dkoch@nvidia.com>
Wed, 3 Oct 2018 20:20:42 +0000 (16:20 -0400)
If built with --native-api=28, support running on both
Android-O and Android-P (with out this change these tests
report unsupported on Android-O).

Builds with --native-api=26 should be unaffected (that is
they will continue to work on Android-O and assert on Android-P).

VK-GL-CTS issue: 1402

Component: Vulkan
Affects: dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.*

Change-Id: Icf40b3dd35ba2744aa2e8d13c9ccfd4d9e3ba0e9

external/vulkancts/modules/vulkan/vktExternalMemoryUtil.cpp

index fcd3abf..85f085f 100644 (file)
@@ -1465,8 +1465,8 @@ AndroidHardwareBufferExternalApi* AndroidHardwareBufferExternalApi::getInstance(
                static AndroidHardwareBufferExternalApi28 api28Instance;
                return &api28Instance;
        }
-       else
-#  elif defined(__ANDROID_API_O__) && (DE_ANDROID_API >= __ANDROID_API_O__)
+#  endif
+#  if defined(__ANDROID_API_O__) && (DE_ANDROID_API >= __ANDROID_API_O__)
        if (sdkVersion >= __ANDROID_API_O__ )
        {
                static AndroidHardwareBufferExternalApi26 api26Instance;