// the ICDs.
#define ICD_VER_SUPPORTS_ICD_SURFACE_KHR 3
-static const VkExtensionProperties wsi_surface_extension_info = {
- .extensionName = VK_KHR_SURFACE_EXTENSION_NAME,
- .specVersion = VK_KHR_SURFACE_SPEC_VERSION,
-};
-
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static const VkExtensionProperties wsi_win32_surface_extension_info = {
- .extensionName = VK_KHR_WIN32_SURFACE_EXTENSION_NAME,
- .specVersion = VK_KHR_WIN32_SURFACE_SPEC_VERSION,
-};
-#endif // VK_USE_PLATFORM_WIN32_KHR
-
-#ifdef VK_USE_PLATFORM_MIR_KHR
-static const VkExtensionProperties wsi_mir_surface_extension_info = {
- .extensionName = VK_KHR_MIR_SURFACE_EXTENSION_NAME,
- .specVersion = VK_KHR_MIR_SURFACE_SPEC_VERSION,
-};
-#endif // VK_USE_PLATFORM_MIR_KHR
-
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
-static const VkExtensionProperties wsi_wayland_surface_extension_info = {
- .extensionName = VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
- .specVersion = VK_KHR_WAYLAND_SURFACE_SPEC_VERSION,
-};
-#endif // VK_USE_PLATFORM_WAYLAND_KHR
-
-#ifdef VK_USE_PLATFORM_XCB_KHR
-static const VkExtensionProperties wsi_xcb_surface_extension_info = {
- .extensionName = VK_KHR_XCB_SURFACE_EXTENSION_NAME,
- .specVersion = VK_KHR_XCB_SURFACE_SPEC_VERSION,
-};
-#endif // VK_USE_PLATFORM_XCB_KHR
-
-#ifdef VK_USE_PLATFORM_XLIB_KHR
-static const VkExtensionProperties wsi_xlib_surface_extension_info = {
- .extensionName = VK_KHR_XLIB_SURFACE_EXTENSION_NAME,
- .specVersion = VK_KHR_XLIB_SURFACE_SPEC_VERSION,
-};
-#endif // VK_USE_PLATFORM_XLIB_KHR
-
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
-static const VkExtensionProperties wsi_android_surface_extension_info = {
- .extensionName = VK_KHR_ANDROID_SURFACE_EXTENSION_NAME,
- .specVersion = VK_KHR_ANDROID_SURFACE_REVISION,
-};
-#endif // VK_USE_PLATFORM_ANDROID_KHR
-
void wsi_create_instance(struct loader_instance *ptr_instance,
const VkInstanceCreateInfo *pCreateInfo) {
ptr_instance->wsi_surface_enabled = false;
VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
VkResult vkRes = VK_SUCCESS;
+ VkIcdSurface *pIcdSurface = NULL;
// Initialize pSurface to NULL just to be safe.
*pSurface = VK_NULL_HANDLE;
// First, check to ensure the appropriate extension was enabled:
}
// Next, if so, proceed with the implementation of this function:
- VkIcdSurface *pIcdSurface = AllocateIcdSurfaceStruct(
+ pIcdSurface = AllocateIcdSurfaceStruct(
ptr_instance, sizeof(pIcdSurface->win_surf.base),
sizeof(pIcdSurface->win_surf), true);
if (pIcdSurface == NULL) {
VkInstance instance, const VkMirSurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
VkResult vkRes = VK_SUCCESS;
+ VkIcdSurface *pIcdSurface = NULL;
// First, check to ensure the appropriate extension was enabled:
struct loader_instance *ptr_instance = loader_get_instance(instance);
if (!ptr_instance->wsi_mir_surface_enabled) {
}
// Next, if so, proceed with the implementation of this function:
- VkIcdSurface *pIcdSurface = AllocateIcdSurfaceStruct(
+ pIcdSurface = AllocateIcdSurfaceStruct(
ptr_instance, sizeof(pIcdSurface->mir_surf.base),
sizeof(pIcdSurface->mir_surf), true);
if (pIcdSurface == NULL) {
VkInstance instance, const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
VkResult vkRes = VK_SUCCESS;
+ VkIcdSurface *pIcdSurface = NULL;
// First, check to ensure the appropriate extension was enabled:
struct loader_instance *ptr_instance = loader_get_instance(instance);
if (!ptr_instance->wsi_wayland_surface_enabled) {
}
// Next, if so, proceed with the implementation of this function:
- VkIcdSurface *pIcdSurface = AllocateIcdSurfaceStruct(
+ pIcdSurface = AllocateIcdSurfaceStruct(
ptr_instance, sizeof(pIcdSurface->wayland_surf.base),
sizeof(pIcdSurface->wayland_surf), true);
if (pIcdSurface == NULL) {
VkInstance instance, const VkXcbSurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
VkResult vkRes = VK_SUCCESS;
+ VkIcdSurface *pIcdSurface = NULL;
// First, check to ensure the appropriate extension was enabled:
struct loader_instance *ptr_instance = loader_get_instance(instance);
if (!ptr_instance->wsi_xcb_surface_enabled) {
}
// Next, if so, proceed with the implementation of this function:
- VkIcdSurface *pIcdSurface = AllocateIcdSurfaceStruct(
+ pIcdSurface = AllocateIcdSurfaceStruct(
ptr_instance, sizeof(pIcdSurface->xcb_surf.base),
sizeof(pIcdSurface->xcb_surf), true);
if (pIcdSurface == NULL) {
VkInstance instance, const VkXlibSurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
VkResult vkRes = VK_SUCCESS;
+ VkIcdSurface *pIcdSurface = NULL;
// First, check to ensure the appropriate extension was enabled:
struct loader_instance *ptr_instance = loader_get_instance(instance);
if (!ptr_instance->wsi_xlib_surface_enabled) {
}
// Next, if so, proceed with the implementation of this function:
- VkIcdSurface *pIcdSurface = AllocateIcdSurfaceStruct(
+ pIcdSurface = AllocateIcdSurfaceStruct(
ptr_instance, sizeof(pIcdSurface->xlib_surf.base),
sizeof(pIcdSurface->xlib_surf), true);
if (pIcdSurface == NULL) {