return 0u;
}
-bool ValidateAHardwareBuffer(vk::VkFormat format, deUint32 requiredAhbUsage, const vk::InstanceDriver& vki, const vk::VkDevice& device) {
+bool ValidateAHardwareBuffer(vk::VkFormat format, deUint32 requiredAhbUsage, const vk::DeviceDriver& vkd, const vk::VkDevice& device) {
AHardwareBuffer_Desc hbufferdesc =
{
64u,
if (!hbuffer)
return false;
+ NativeHandle nativeHandle;
+ nativeHandle = vk::pt::AndroidHardwareBufferPtr(hbuffer);
+
vk::VkAndroidHardwareBufferFormatPropertiesANDROID formatProperties =
{
vk::VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID,
0u,
0u
};
- vk::GetAndroidHardwareBufferPropertiesANDROIDFunc func =
- (vk::GetAndroidHardwareBufferPropertiesANDROIDFunc)vki.getDeviceProcAddr(device, "vkGetAndroidHardwareBufferPropertiesANDROID");
- VK_CHECK(func(device, vk::pt::AndroidHardwareBufferPtr(hbuffer), &bufferProperties));
+ VK_CHECK(vkd.getAndroidHardwareBufferPropertiesANDROID(device, vk::pt::AndroidHardwareBufferPtr(hbuffer), &bufferProperties));
TCU_CHECK(formatProperties.format != vk::VK_FORMAT_UNDEFINED);
TCU_CHECK(formatProperties.format == format);
TCU_CHECK(formatProperties.externalFormat != 0u);
continue;
// Only test a combination if AHardwareBuffer can be successfully allocated for it.
- if (!ValidateAHardwareBuffer(format, requiredAhbUsage, vki, *device))
+ if (!ValidateAHardwareBuffer(format, requiredAhbUsage, vkd, *device))
continue;
const vk::VkPhysicalDeviceExternalImageFormatInfo externalInfo =