aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-03-17 15:07:44 -0700
committerJason Ekstrand <[email protected]>2017-05-16 08:38:46 -0700
commitb5437fc05c7d8fb3899b073b451c7c658c4dc441 (patch)
tree4456ad49bbf6633cc66b144cd32fabb0d4f344f4 /src
parent59f75dc2a4c4e5d46f43fa1b1104466d4574aa02 (diff)
anv: Implement VK_KHR_get_surface_capabilities2
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_device.c4
-rw-r--r--src/intel/vulkan/anv_entrypoints_gen.py1
-rw-r--r--src/intel/vulkan/anv_wsi.c27
3 files changed, 32 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 35e40301a31..50486b62e1d 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -306,6 +306,10 @@ static const VkExtensionProperties global_extensions[] = {
.specVersion = 1,
},
{
+ .extensionName = VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME,
+ .specVersion = 1,
+ },
+ {
.extensionName = VK_KHR_SURFACE_EXTENSION_NAME,
.specVersion = 25,
},
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index a21228c1c64..2168b7f64f0 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -35,6 +35,7 @@ MAX_API_VERSION = 1.0
SUPPORTED_EXTENSIONS = [
'VK_KHR_descriptor_update_template',
'VK_KHR_get_physical_device_properties2',
+ 'VK_KHR_get_surface_capabilities2',
'VK_KHR_incremental_present',
'VK_KHR_maintenance1',
'VK_KHR_push_descriptor',
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index 2ab37c30b70..7575f58ff24 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -112,6 +112,19 @@ VkResult anv_GetPhysicalDeviceSurfaceCapabilitiesKHR(
return iface->get_capabilities(surface, pSurfaceCapabilities);
}
+VkResult anv_GetPhysicalDeviceSurfaceCapabilities2KHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
+ VkSurfaceCapabilities2KHR* pSurfaceCapabilities)
+{
+ ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
+ ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, pSurfaceInfo->surface);
+ struct wsi_interface *iface = device->wsi_device.wsi[surface->platform];
+
+ return iface->get_capabilities2(surface, pSurfaceInfo->pNext,
+ pSurfaceCapabilities);
+}
+
VkResult anv_GetPhysicalDeviceSurfaceFormatsKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR _surface,
@@ -126,6 +139,20 @@ VkResult anv_GetPhysicalDeviceSurfaceFormatsKHR(
pSurfaceFormats);
}
+VkResult anv_GetPhysicalDeviceSurfaceFormats2KHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
+ uint32_t* pSurfaceFormatCount,
+ VkSurfaceFormat2KHR* pSurfaceFormats)
+{
+ ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
+ ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, pSurfaceInfo->surface);
+ struct wsi_interface *iface = device->wsi_device.wsi[surface->platform];
+
+ return iface->get_formats2(surface, &device->wsi_device, pSurfaceInfo->pNext,
+ pSurfaceFormatCount, pSurfaceFormats);
+}
+
VkResult anv_GetPhysicalDeviceSurfacePresentModesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR _surface,