Mesa (master): anv: Implement VK_KHR_get_surface_capabilities2
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Tue May 16 16:51:49 UTC 2017
Module: Mesa
Branch: master
Commit: b5437fc05c7d8fb3899b073b451c7c658c4dc441
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b5437fc05c7d8fb3899b073b451c7c658c4dc441
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Fri Mar 17 15:07:44 2017 -0700
anv: Implement VK_KHR_get_surface_capabilities2
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
src/intel/vulkan/anv_device.c | 4 ++++
src/intel/vulkan/anv_entrypoints_gen.py | 1 +
src/intel/vulkan/anv_wsi.c | 27 +++++++++++++++++++++++++++
3 files changed, 32 insertions(+)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 35e40301a3..50486b62e1 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 a21228c1c6..2168b7f64f 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 2ab37c30b7..7575f58ff2 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,
More information about the mesa-commit
mailing list