summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/driver.cpp
diff options
context:
space:
mode:
author Yiwei Zhang <zzyiwei@google.com> 2018-03-13 17:12:11 -0700
committer Yiwei Zhang <zzyiwei@google.com> 2018-03-13 18:45:09 -0700
commit922b1e377d4247ab40f2c7c0467b3cda60b4fd7c (patch)
tree0c70a123da3d906de30253f094a78ae37cac509c /vulkan/libvulkan/driver.cpp
parent47a855e9b9f40b0c0d35586679434e0c830118e9 (diff)
libvulkan: correctly expose VK_KHR_shared_presentable_image
The current libvulkan still make VK_KHR_shared_presentable_image depends on VK_KHR_get_physical_device_properties2 even with proper VK1.1. This change makes a change in code-generator.tmpl which results in adding vkGetPhysicalDeviceProperties2 into the driver table. Test: dEQP-VK.wsi.android.shared_presentable_image* Bug: b/74605332 Change-Id: I5925dbc438decdc841ed4131c4f3df2a9dd1805a
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
-rw-r--r--vulkan/libvulkan/driver.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp
index dec39e0b0f..8b8b2809fe 100644
--- a/vulkan/libvulkan/driver.cpp
+++ b/vulkan/libvulkan/driver.cpp
@@ -801,7 +801,8 @@ bool QueryPresentationProperties(
const InstanceData& data = GetData(physicalDevice);
// GPDP2 must be present and enabled on the instance.
- if (!data.driver.GetPhysicalDeviceProperties2KHR)
+ if (!data.driver.GetPhysicalDeviceProperties2KHR &&
+ !data.driver.GetPhysicalDeviceProperties2)
return false;
// Request the android-specific presentation properties via GPDP2
@@ -819,8 +820,12 @@ bool QueryPresentationProperties(
presentation_properties->pNext = nullptr;
presentation_properties->sharedImage = VK_FALSE;
- data.driver.GetPhysicalDeviceProperties2KHR(physicalDevice,
- &properties);
+ if (data.driver.GetPhysicalDeviceProperties2KHR) {
+ data.driver.GetPhysicalDeviceProperties2KHR(physicalDevice,
+ &properties);
+ } else {
+ data.driver.GetPhysicalDeviceProperties2(physicalDevice, &properties);
+ }
return true;
}