*grallocConsumerUsage |= GRALLOC1_CONSUMER_USAGE_HWCOMPOSER;
}
+ if (swapchainImageUsage & VK_SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_ANDROID) {
+ uint64_t front_rendering_usage = 0;
+ u_gralloc_get_front_rendering_usage(device->gralloc, &front_rendering_usage);
+ *grallocProducerUsage |= front_rendering_usage;
+ }
+
return VK_SUCCESS;
}
#endif
props->allowCommandBufferQueryCopies = true;
break;
}
+#ifdef ANDROID
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wswitch"
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID: {
+ VkPhysicalDevicePresentationPropertiesANDROID *props =
+ (VkPhysicalDevicePresentationPropertiesANDROID *)ext;
+ uint64_t front_rendering_usage = 0;
+ struct u_gralloc *gralloc = u_gralloc_create(U_GRALLOC_TYPE_AUTO);
+ if (gralloc != NULL) {
+ u_gralloc_get_front_rendering_usage(gralloc, &front_rendering_usage);
+ u_gralloc_destroy(&gralloc);
+ }
+ props->sharedImage = front_rendering_usage ? VK_TRUE
+ : VK_FALSE;
+ break;
+ }
+#pragma GCC diagnostic pop
+#endif
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT: {
VkPhysicalDeviceDrmPropertiesEXT *props =
(VkPhysicalDeviceDrmPropertiesEXT *)ext;