The Ahb test doesn't check if the vulkan extension
VK_ANDROID_external_memory_android_hardware_buffer is supported and
called AHB function directly, then it crashes when the extension is not
supported.
This patch will let the test first check if this extension is supported.
Affects:
dEQP-VK.draw.ahb.*
Components: Vulkan
VK-GL-CTS issue: 2915
Change-Id: Id470caef3e034f10d08cfa3bad6e9ec705104b53
if (!ahbApi)
TCU_THROW(NotSupportedError, "Android Hardware Buffer not supported");
+ m_context.requireDeviceFunctionality("VK_ANDROID_external_memory_android_hardware_buffer");
+
deUint64 requiredAhbUsage = ahbApi->vkUsageToAhbUsage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
pt::AndroidHardwareBufferPtr ahb = ahbApi->allocate(WIDTH, HEIGHT, targetImageCreateInfo.arrayLayers, ahbApi->vkFormatToAhbFormat(colorAttachmentFormat), requiredAhbUsage);