anv/android: disable shared representable image support explicitly
authorTapani Pälli <tapani.palli@intel.com>
Thu, 8 Aug 2019 11:57:14 +0000 (14:57 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Fri, 9 Aug 2019 05:53:54 +0000 (08:53 +0300)
Android 9 loader conditionally advertises VK_KHR_shared_presentable_image
extension based on this property and it looks like it does not
initialize the struct before query.

Pragmas are added to ignore warnings with Android specific structure
types in same manner as commit 8d386e6eef8  did.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_device.c

index 9a5dba040cc74fe21b27daad30f30defcb1c10e7..a41f602f023d2be7c87689b31c956f9e9ed508ea 100644 (file)
@@ -1576,6 +1576,16 @@ void anv_GetPhysicalDeviceProperties2(
          break;
       }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wswitch"
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID: {
+         VkPhysicalDevicePresentationPropertiesANDROID *props =
+            (VkPhysicalDevicePresentationPropertiesANDROID *)ext;
+         props->sharedImage = VK_FALSE;
+         break;
+      }
+#pragma GCC diagnostic pop
+
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: {
          VkPhysicalDeviceProtectedMemoryProperties *props =
             (VkPhysicalDeviceProtectedMemoryProperties *)ext;