aboutsummaryrefslogtreecommitdiff
path: root/loader
diff options
context:
space:
mode:
authorIan Elliott <ian@lunarg.com>2015-08-21 15:09:33 -0600
committerIan Elliott <ian@lunarg.com>2015-09-04 14:58:09 -0600
commita07819775a66866cb33718ae70d290c477867be6 (patch)
tree37e841421a9f2e4de54dc7912203b737bcfa628d /loader
parent3ead413d3f9328eb7855ea538dc559bb98665608 (diff)
downloadusermoji-a07819775a66866cb33718ae70d290c477867be6.tar.xz
WSI: Convert WSI swapchain extension usage to new KHR style
Diffstat (limited to 'loader')
-rw-r--r--loader/loader.c4
-rw-r--r--loader/loader.h4
-rw-r--r--loader/table_ops.h20
-rwxr-xr-xloader/vk-loader-generate.py10
-rw-r--r--loader/wsi_swapchain.c28
-rw-r--r--loader/wsi_swapchain.h6
6 files changed, 36 insertions, 36 deletions
diff --git a/loader/loader.c b/loader/loader.c
index 87e854d3..0ab7ca30 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -100,7 +100,7 @@ const VkLayerInstanceDispatchTable instance_disp = {
.GetPhysicalDeviceExtensionProperties = loader_GetPhysicalDeviceExtensionProperties,
.GetPhysicalDeviceLayerProperties = loader_GetPhysicalDeviceLayerProperties,
.GetPhysicalDeviceSparseImageFormatProperties = loader_GetPhysicalDeviceSparseImageFormatProperties,
- .GetPhysicalDeviceSurfaceSupportWSI = loader_GetPhysicalDeviceSurfaceSupportWSI,
+ .GetPhysicalDeviceSurfaceSupportKHR = loader_GetPhysicalDeviceSurfaceSupportKHR,
.DbgCreateMsgCallback = loader_DbgCreateMsgCallback,
.DbgDestroyMsgCallback = loader_DbgDestroyMsgCallback,
};
@@ -1036,7 +1036,7 @@ static bool loader_icd_init_entrys(struct loader_icd *icd,
LOOKUP_GIPA(GetPhysicalDeviceSparseImageFormatProperties, true);
LOOKUP_GIPA(DbgCreateMsgCallback, false);
LOOKUP_GIPA(DbgDestroyMsgCallback, false);
- LOOKUP_GIPA(GetPhysicalDeviceSurfaceSupportWSI, false);
+ LOOKUP_GIPA(GetPhysicalDeviceSurfaceSupportKHR, false);
#undef LOOKUP_GIPA
diff --git a/loader/loader.h b/loader/loader.h
index 1e4a3aba..98c57568 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -30,7 +30,7 @@
#include <vulkan.h>
#include <vk_debug_report_lunarg.h>
-#include <vk_wsi_swapchain.h>
+#include <vk_ext_khr_swapchain.h>
#include <vk_layer.h>
#include <vk_icd.h>
#include <assert.h>
@@ -144,7 +144,7 @@ struct loader_icd {
PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties;
PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback;
PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback;
- PFN_vkGetPhysicalDeviceSurfaceSupportWSI GetPhysicalDeviceSurfaceSupportWSI;
+ PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR;
/*
* Fill in the cache of available device extensions from
diff --git a/loader/table_ops.h b/loader/table_ops.h
index 4064178f..75c7b7a4 100644
--- a/loader/table_ops.h
+++ b/loader/table_ops.h
@@ -178,14 +178,14 @@ static inline void loader_init_device_dispatch_table(VkLayerDispatchTable *table
//TODO move into it's own table
//TODO also consider dropping trampoline code for these device level extensions entirely
// then don't need loader to know about these at all but then not queryable via GIPA
- table->AcquireNextImageWSI = (PFN_vkAcquireNextImageWSI) gpa(dev, "vkAcquireNextImageWSI");
- table->CreateSwapChainWSI = (PFN_vkCreateSwapChainWSI) gpa(dev, "vkCreateSwapChainWSI");
- table->DestroySwapChainWSI = (PFN_vkDestroySwapChainWSI) gpa(dev, "vkDestroySwapChainWSI");
- table->GetSurfacePropertiesWSI = (PFN_vkGetSurfacePropertiesWSI) gpa(dev, "vkGetSurfacePropertiesWSI");
- table->GetSurfaceFormatsWSI = (PFN_vkGetSurfaceFormatsWSI) gpa(dev, "vkGetSurfaceFormatsWSI");
- table->GetSurfacePresentModesWSI = (PFN_vkGetSurfacePresentModesWSI) gpa(dev, "vkGetSurfacePresentModesWSI");
- table->GetSwapChainImagesWSI = (PFN_vkGetSwapChainImagesWSI) gpa(dev, "vkGetSwapChainImagesWSI");
- table->QueuePresentWSI = (PFN_vkQueuePresentWSI) gpa(dev, "vkQueuePresentWSI");
+ table->AcquireNextImageKHR = (PFN_vkAcquireNextImageKHR) gpa(dev, "vkAcquireNextImageKHR");
+ table->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(dev, "vkCreateSwapchainKHR");
+ table->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(dev, "vkDestroySwapchainKHR");
+ table->GetSurfacePropertiesKHR = (PFN_vkGetSurfacePropertiesKHR) gpa(dev, "vkGetSurfacePropertiesKHR");
+ table->GetSurfaceFormatsKHR = (PFN_vkGetSurfaceFormatsKHR) gpa(dev, "vkGetSurfaceFormatsKHR");
+ table->GetSurfacePresentModesKHR = (PFN_vkGetSurfacePresentModesKHR) gpa(dev, "vkGetSurfacePresentModesKHR");
+ table->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) gpa(dev, "vkGetSwapchainImagesKHR");
+ table->QueuePresentKHR = (PFN_vkQueuePresentKHR) gpa(dev, "vkQueuePresentKHR");
}
static inline void *loader_lookup_device_dispatch_table(
@@ -547,8 +547,8 @@ static inline void *loader_lookup_instance_dispatch_table(
return (void *) table->GetPhysicalDeviceExtensionProperties;
if (!strcmp(name, "GetPhysicalDeviceLayerProperties"))
return (void *) table->GetPhysicalDeviceLayerProperties;
- if (!strcmp(name, "GetPhysicalDeviceSurfaceSupportWSI"))
- return (void *) table->GetPhysicalDeviceSurfaceSupportWSI;
+ if (!strcmp(name, "GetPhysicalDeviceSurfaceSupportKHR"))
+ return (void *) table->GetPhysicalDeviceSurfaceSupportKHR;
if (!strcmp(name, "DbgCreateMsgCallback"))
return (void *) table->DbgCreateMsgCallback;
if (!strcmp(name, "DbgDestroyMsgCallback"))
diff --git a/loader/vk-loader-generate.py b/loader/vk-loader-generate.py
index eed42dfa..b51c6e4a 100755
--- a/loader/vk-loader-generate.py
+++ b/loader/vk-loader-generate.py
@@ -48,7 +48,7 @@ class Subcommand(object):
def _requires_special_trampoline_code(self, name):
# Dont be cute trying to use a general rule to programmatically populate this list
# it just obsfucates what is going on!
- wsi_creates_dispatchable_object = ["CreateSwapChainWSI"]
+ wsi_creates_dispatchable_object = ["CreateSwapchainKHR"]
creates_dispatchable_object = ["CreateDevice", "GetDeviceQueue", "CreateCommandBuffer"] + wsi_creates_dispatchable_object
if name in creates_dispatchable_object:
return True
@@ -136,13 +136,13 @@ class LoaderEntrypointsSubcommand(Subcommand):
if "Get" in proto.name:
method = "loader_set_dispatch"
- if proto.name == "GetSwapChainInfoWSI":
+ if proto.name == "GetSwapchainInfoKHR":
ptype = proto.params[-3].name
psize = proto.params[-2].name
pdata = proto.params[-1].name
- cond = ("%s == VK_SWAP_CHAIN_INFO_TYPE_PERSISTENT_IMAGES_WSI && "
+ cond = ("%s == VK_SWAP_CHAIN_INFO_TYPE_PERSISTENT_IMAGES_KHR && "
"%s && %s" % (ptype, pdata, cond))
- setup.append("VkSwapChainImageInfoWSI *info = %s;" % pdata)
+ setup.append("VkSwapchainImageInfoKHR *info = %s;" % pdata)
setup.append("size_t count = *%s / sizeof(*info), i;" % psize)
setup.append("for (i = 0; i < count; i++) {")
setup.append(" %s(info[i].image, disp);" % method)
@@ -342,7 +342,7 @@ class WinDefFileSubcommand(Subcommand):
for proto in self.protos:
if self.exports and proto.name not in self.exports:
continue
- if proto.name.endswith("WSI"):
+ if proto.name.endswith("KHR"):
continue
body.append(" vk" + proto.name)
diff --git a/loader/wsi_swapchain.c b/loader/wsi_swapchain.c
index 4860d846..683945e5 100644
--- a/loader/wsi_swapchain.c
+++ b/loader/wsi_swapchain.c
@@ -35,8 +35,8 @@
#include "wsi_swapchain.h"
static const VkExtensionProperties wsi_swapchain_extension_info = {
- .extName = VK_WSI_SWAPCHAIN_EXTENSION_NAME,
- .specVersion = VK_WSI_SWAPCHAIN_REVISION,
+ .extName = VK_EXT_KHR_SWAPCHAIN_EXTENSION_NAME,
+ .specVersion = VK_EXT_KHR_SWAPCHAIN_VERSION,
};
void wsi_swapchain_add_instance_extensions(
@@ -52,7 +52,7 @@ void wsi_swapchain_create_instance(
ptr_instance->wsi_swapchain_enabled = false;
for (uint32_t i = 0; i < pCreateInfo->extensionCount; i++) {
- if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_WSI_SWAPCHAIN_EXTENSION_NAME) == 0) {
+ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_KHR_SWAPCHAIN_EXTENSION_NAME) == 0) {
ptr_instance->wsi_swapchain_enabled = true;
return;
}
@@ -61,19 +61,19 @@ void wsi_swapchain_create_instance(
/*
* This is the trampoline entrypoint
- * for GetPhysicalDeviceSurfaceSupportWSI
+ * for GetPhysicalDeviceSurfaceSupportKHR
*/
-VkResult wsi_swapchain_GetPhysicalDeviceSurfaceSupportWSI(
+VkResult wsi_swapchain_GetPhysicalDeviceSurfaceSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueNodeIndex,
- const VkSurfaceDescriptionWSI* pSurfaceDescription,
+ const VkSurfaceDescriptionKHR* pSurfaceDescription,
VkBool32* pSupported)
{
const VkLayerInstanceDispatchTable *disp;
// TBD/TODO: DO WE NEED TO DO LOCKING FOR THIS FUNCTION?
disp = loader_get_instance_dispatch(physicalDevice);
loader_platform_thread_lock_mutex(&loader_lock);
- VkResult res = disp->GetPhysicalDeviceSurfaceSupportWSI(
+ VkResult res = disp->GetPhysicalDeviceSurfaceSupportKHR(
physicalDevice,
queueNodeIndex,
pSurfaceDescription,
@@ -84,12 +84,12 @@ VkResult wsi_swapchain_GetPhysicalDeviceSurfaceSupportWSI(
/*
* This is the instance chain terminator function
- * for GetPhysicalDeviceSurfaceSupportWSI
+ * for GetPhysicalDeviceSurfaceSupportKHR
*/
-VkResult VKAPI loader_GetPhysicalDeviceSurfaceSupportWSI(
+VkResult VKAPI loader_GetPhysicalDeviceSurfaceSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueNodeIndex,
- const VkSurfaceDescriptionWSI* pSurfaceDescription,
+ const VkSurfaceDescriptionKHR* pSurfaceDescription,
VkBool32* pSupported)
{
uint32_t gpu_index;
@@ -97,8 +97,8 @@ VkResult VKAPI loader_GetPhysicalDeviceSurfaceSupportWSI(
VkResult res = VK_ERROR_UNAVAILABLE;
*pSupported = false;
- if (icd->GetPhysicalDeviceSurfaceSupportWSI) {
- res = icd->GetPhysicalDeviceSurfaceSupportWSI(physicalDevice,
+ if (icd->GetPhysicalDeviceSurfaceSupportKHR) {
+ res = icd->GetPhysicalDeviceSurfaceSupportKHR(physicalDevice,
queueNodeIndex,
pSurfaceDescription,
pSupported);
@@ -116,8 +116,8 @@ void *wsi_swapchain_GetInstanceProcAddr(
return NULL;
}
- if (!strcmp(pName, "vkGetPhysicalDeviceSurfaceSupportWSI")) {
- return (void*) wsi_swapchain_GetPhysicalDeviceSurfaceSupportWSI;
+ if (!strcmp(pName, "vkGetPhysicalDeviceSurfaceSupportKHR")) {
+ return (void*) wsi_swapchain_GetPhysicalDeviceSurfaceSupportKHR;
}
return NULL;
diff --git a/loader/wsi_swapchain.h b/loader/wsi_swapchain.h
index 68dbc961..c0904e93 100644
--- a/loader/wsi_swapchain.h
+++ b/loader/wsi_swapchain.h
@@ -29,7 +29,7 @@
#include "vk_loader_platform.h"
#include "loader.h"
-#include "vk_wsi_swapchain.h"
+#include "vk_ext_khr_swapchain.h"
void wsi_swapchain_add_instance_extensions(
struct loader_extension_list *ext_list);
@@ -42,8 +42,8 @@ void *wsi_swapchain_GetInstanceProcAddr(
struct loader_instance *ptr_instance,
const char* pName);
-VkResult VKAPI loader_GetPhysicalDeviceSurfaceSupportWSI(
+VkResult VKAPI loader_GetPhysicalDeviceSurfaceSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueNodeIndex,
- const VkSurfaceDescriptionWSI* pSurfaceDescription,
+ const VkSurfaceDescriptionKHR* pSurfaceDescription,
VkBool32* pSupported);