Update Vulkan loader to 1.0.39

This commit is contained in:
Dr. Chat 2017-01-26 23:57:54 -06:00
parent 73d3697efc
commit 59c633cad7
18 changed files with 28502 additions and 2913 deletions

View File

@ -1,42 +0,0 @@
/*
*
* Copyright (C) 2015-2016 Valve Corporation
* Copyright (C) 2015-2016 LunarG, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Author: Cody Northrop <cody@lunarg.com>
*
*/
#ifndef ICD_SPV_H
#define ICD_SPV_H
#include <stdint.h>
#define ICD_SPV_MAGIC 0x07230203
#define ICD_SPV_VERSION 99
struct icd_spv_header {
uint32_t magic;
uint32_t version;
uint32_t gen_magic; // Generator's magic number
};
#endif /* ICD_SPV_H */

View File

@ -103,7 +103,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL debug_report_CreateDebugReportCallbackEXT(
VkDebugReportCallbackEXT *pCallback) {
struct loader_instance *inst = loader_get_instance(instance);
loader_platform_thread_lock_mutex(&loader_lock);
VkResult result = inst->disp->CreateDebugReportCallbackEXT(
VkResult result = inst->disp->layer_inst_disp.CreateDebugReportCallbackEXT(
instance, pCreateInfo, pAllocator, pCallback);
loader_platform_thread_unlock_mutex(&loader_lock);
return result;
@ -295,7 +295,8 @@ debug_report_DestroyDebugReportCallbackEXT(
struct loader_instance *inst = loader_get_instance(instance);
loader_platform_thread_lock_mutex(&loader_lock);
inst->disp->DestroyDebugReportCallbackEXT(instance, callback, pAllocator);
inst->disp->layer_inst_disp.DestroyDebugReportCallbackEXT(
instance, callback, pAllocator);
util_DestroyDebugReportCallback(inst, callback, pAllocator);
@ -308,8 +309,9 @@ static VKAPI_ATTR void VKAPI_CALL debug_report_DebugReportMessageEXT(
int32_t msgCode, const char *pLayerPrefix, const char *pMsg) {
struct loader_instance *inst = loader_get_instance(instance);
inst->disp->DebugReportMessageEXT(instance, flags, objType, object,
location, msgCode, pLayerPrefix, pMsg);
inst->disp->layer_inst_disp.DebugReportMessageEXT(
instance, flags, objType, object, location, msgCode, pLayerPrefix,
pMsg);
}
/*
@ -336,8 +338,10 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDebugReportCallback(
pAllocator->pUserData,
inst->total_icd_count * sizeof(VkDebugReportCallbackEXT),
sizeof(void *), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT));
memset(icd_info, 0,
inst->total_icd_count * sizeof(VkDebugReportCallbackEXT));
if (icd_info) {
memset(icd_info, 0,
inst->total_icd_count * sizeof(VkDebugReportCallbackEXT));
}
} else {
#endif
icd_info =
@ -407,7 +411,7 @@ out:
continue;
}
if (icd_info[storage_idx]) {
if (icd_info && icd_info[storage_idx]) {
icd_term->DestroyDebugReportCallbackEXT(
icd_term->instance, icd_info[storage_idx], pAllocator);
}

File diff suppressed because it is too large Load Diff

View File

@ -25,9 +25,258 @@
#include "vk_loader_platform.h"
#include "loader.h"
#include "extensions.h"
#include "table_ops.h"
#include <vulkan/vk_icd.h>
#include "wsi.h"
// Definitions for the VK_KHR_get_physical_device_properties2 extension
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(
VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR *pFeatures) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceFeatures2KHR(unwrapped_phys_dev, pFeatures);
}
VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceFeatures2KHR(
VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR *pFeatures) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->GetPhysicalDeviceFeatures2KHR) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetPhysicalDeviceFeatures2KHR");
}
icd_term->GetPhysicalDeviceFeatures2KHR(phys_dev_term->phys_dev, pFeatures);
}
VKAPI_ATTR void VKAPI_CALL
vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties2KHR *pProperties) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceProperties2KHR(unwrapped_phys_dev, pProperties);
}
VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceProperties2KHR(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties2KHR *pProperties) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->GetPhysicalDeviceProperties2KHR) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetPhysicalDeviceProperties2KHR");
}
icd_term->GetPhysicalDeviceProperties2KHR(phys_dev_term->phys_dev,
pProperties);
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(
VkPhysicalDevice physicalDevice, VkFormat format,
VkFormatProperties2KHR *pFormatProperties) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceFormatProperties2KHR(unwrapped_phys_dev, format,
pFormatProperties);
}
VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceFormatProperties2KHR(
VkPhysicalDevice physicalDevice, VkFormat format,
VkFormatProperties2KHR *pFormatProperties) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->GetPhysicalDeviceFormatProperties2KHR) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetPhysicalDeviceFormatProperties2KHR");
}
icd_term->GetPhysicalDeviceFormatProperties2KHR(phys_dev_term->phys_dev,
format, pFormatProperties);
}
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceImageFormatInfo2KHR *pImageFormatInfo,
VkImageFormatProperties2KHR *pImageFormatProperties) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
return disp->GetPhysicalDeviceImageFormatProperties2KHR(
unwrapped_phys_dev, pImageFormatInfo, pImageFormatProperties);
}
VKAPI_ATTR VkResult VKAPI_CALL
terminator_GetPhysicalDeviceImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceImageFormatInfo2KHR *pImageFormatInfo,
VkImageFormatProperties2KHR *pImageFormatProperties) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->GetPhysicalDeviceImageFormatProperties2KHR) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetPhysicalDeviceImageFormatProperties2KHR");
}
return icd_term->GetPhysicalDeviceImageFormatProperties2KHR(
phys_dev_term->phys_dev, pImageFormatInfo, pImageFormatProperties);
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(
VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount,
VkQueueFamilyProperties2KHR *pQueueFamilyProperties) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceQueueFamilyProperties2KHR(
unwrapped_phys_dev, pQueueFamilyPropertyCount, pQueueFamilyProperties);
}
VKAPI_ATTR void VKAPI_CALL
terminator_GetPhysicalDeviceQueueFamilyProperties2KHR(
VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount,
VkQueueFamilyProperties2KHR *pQueueFamilyProperties) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->GetPhysicalDeviceQueueFamilyProperties2KHR) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetPhysicalDeviceQueueFamilyProperties2KHR");
}
icd_term->GetPhysicalDeviceQueueFamilyProperties2KHR(
phys_dev_term->phys_dev, pQueueFamilyPropertyCount,
pQueueFamilyProperties);
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties2KHR *pMemoryProperties) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceMemoryProperties2KHR(unwrapped_phys_dev,
pMemoryProperties);
}
VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceMemoryProperties2KHR(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties2KHR *pMemoryProperties) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->GetPhysicalDeviceMemoryProperties2KHR) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetPhysicalDeviceMemoryProperties2KHR");
}
icd_term->GetPhysicalDeviceMemoryProperties2KHR(phys_dev_term->phys_dev,
pMemoryProperties);
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo,
uint32_t *pPropertyCount, VkSparseImageFormatProperties2KHR *pProperties) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceSparseImageFormatProperties2KHR(
unwrapped_phys_dev, pFormatInfo, pPropertyCount, pProperties);
}
VKAPI_ATTR void VKAPI_CALL
terminator_GetPhysicalDeviceSparseImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo,
uint32_t *pPropertyCount, VkSparseImageFormatProperties2KHR *pProperties) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->GetPhysicalDeviceSparseImageFormatProperties2KHR) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
}
icd_term->GetPhysicalDeviceSparseImageFormatProperties2KHR(
phys_dev_term->phys_dev, pFormatInfo, pPropertyCount, pProperties);
}
// Definitions for the VK_KHR_maintenance1 extension
VKAPI_ATTR void VKAPI_CALL
vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool,
VkCommandPoolTrimFlagsKHR flags) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
disp->TrimCommandPoolKHR(device, commandPool, flags);
}
// Definitions for the VK_EXT_acquire_xlib_display extension
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
VkPhysicalDevice physicalDevice, Display *dpy, VkDisplayKHR display) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
return disp->AcquireXlibDisplayEXT(unwrapped_phys_dev, dpy, display);
}
VKAPI_ATTR VkResult VKAPI_CALL terminator_AcquireXlibDisplayEXT(
VkPhysicalDevice physicalDevice, Display *dpy, VkDisplayKHR display) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->AcquireXlibDisplayEXT) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkAcquireXlibDisplayEXT");
}
return icd_term->AcquireXlibDisplayEXT(phys_dev_term->phys_dev, dpy,
display);
}
VKAPI_ATTR VkResult VKAPI_CALL
vkGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display *dpy,
RROutput rrOutput, VkDisplayKHR *pDisplay) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
return disp->GetRandROutputDisplayEXT(unwrapped_phys_dev, dpy, rrOutput,
pDisplay);
}
VKAPI_ATTR VkResult VKAPI_CALL terminator_GetRandROutputDisplayEXT(
VkPhysicalDevice physicalDevice, Display *dpy, RROutput rrOutput,
VkDisplayKHR *pDisplay) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->GetRandROutputDisplayEXT) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetRandROutputDisplayEXT");
}
return icd_term->GetRandROutputDisplayEXT(phys_dev_term->phys_dev, dpy,
rrOutput, pDisplay);
}
#endif /* VK_USE_PLATFORM_XLIB_XRANDR_EXT */
// Definitions for the VK_EXT_debug_marker extension commands which
// need to have a terminator function
@ -51,30 +300,33 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectTagEXT(
struct loader_device *dev;
struct loader_icd_term *icd_term =
loader_get_icd_and_device(device, &dev, &icd_index);
// If this is a physical device, we have to replace it with the proper one
// for the next call.
if (pTagInfo->objectType ==
VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)(uintptr_t)pTagInfo->object;
pTagInfo->object = (uint64_t)(uintptr_t)phys_dev_term->phys_dev;
if (NULL != icd_term && NULL != icd_term->DebugMarkerSetObjectTagEXT) {
// If this is a physical device, we have to replace it with the proper
// one for the next call.
if (pTagInfo->objectType ==
VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)(uintptr_t)
pTagInfo->object;
pTagInfo->object = (uint64_t)(uintptr_t)phys_dev_term->phys_dev;
// If this is a KHR_surface, and the ICD has created its own, we have to
// replace it with the proper one for the next call.
} else if (pTagInfo->objectType ==
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
if (NULL != icd_term && NULL != icd_term->CreateSwapchainKHR) {
VkIcdSurface *icd_surface =
(VkIcdSurface *)(uintptr_t)pTagInfo->object;
if (NULL != icd_surface->real_icd_surfaces) {
pTagInfo->object =
(uint64_t)icd_surface->real_icd_surfaces[icd_index];
// If this is a KHR_surface, and the ICD has created its own, we
// have to replace it with the proper one for the next call.
} else if (pTagInfo->objectType ==
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
if (NULL != icd_term && NULL != icd_term->CreateSwapchainKHR) {
VkIcdSurface *icd_surface =
(VkIcdSurface *)(uintptr_t)pTagInfo->object;
if (NULL != icd_surface->real_icd_surfaces) {
pTagInfo->object =
(uint64_t)icd_surface->real_icd_surfaces[icd_index];
}
}
}
return icd_term->DebugMarkerSetObjectTagEXT(device, pTagInfo);
} else {
return VK_SUCCESS;
}
assert(icd_term != NULL && icd_term->DebugMarkerSetObjectTagEXT &&
"loader: null DebugMarkerSetObjectTagEXT ICD pointer");
return icd_term->DebugMarkerSetObjectTagEXT(device, pTagInfo);
}
VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectNameEXT(
@ -97,36 +349,126 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectNameEXT(
struct loader_device *dev;
struct loader_icd_term *icd_term =
loader_get_icd_and_device(device, &dev, &icd_index);
// If this is a physical device, we have to replace it with the proper one
// for the next call.
if (pNameInfo->objectType ==
VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)(uintptr_t)pNameInfo->object;
pNameInfo->object = (uint64_t)(uintptr_t)phys_dev_term->phys_dev;
if (NULL != icd_term && NULL != icd_term->DebugMarkerSetObjectNameEXT) {
// If this is a physical device, we have to replace it with the proper
// one for the next call.
if (pNameInfo->objectType ==
VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)(uintptr_t)
pNameInfo->object;
pNameInfo->object = (uint64_t)(uintptr_t)phys_dev_term->phys_dev;
// If this is a KHR_surface, and the ICD has created its own, we have to
// replace it with the proper one for the next call.
} else if (pNameInfo->objectType ==
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
if (NULL != icd_term && NULL != icd_term->CreateSwapchainKHR) {
VkIcdSurface *icd_surface =
(VkIcdSurface *)(uintptr_t)pNameInfo->object;
if (NULL != icd_surface->real_icd_surfaces) {
pNameInfo->object =
(uint64_t)(
uintptr_t)icd_surface->real_icd_surfaces[icd_index];
// If this is a KHR_surface, and the ICD has created its own, we
// have to replace it with the proper one for the next call.
} else if (pNameInfo->objectType ==
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
if (NULL != icd_term && NULL != icd_term->CreateSwapchainKHR) {
VkIcdSurface *icd_surface =
(VkIcdSurface *)(uintptr_t)pNameInfo->object;
if (NULL != icd_surface->real_icd_surfaces) {
pNameInfo->object =
(uint64_t)(
uintptr_t)icd_surface->real_icd_surfaces[icd_index];
}
}
}
return icd_term->DebugMarkerSetObjectNameEXT(device, pNameInfo);
} else {
return VK_SUCCESS;
}
}
// Definitions for the VK_EXT_direct_mode_display extension
VKAPI_ATTR VkResult VKAPI_CALL
vkReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
return disp->ReleaseDisplayEXT(unwrapped_phys_dev, display);
}
VKAPI_ATTR VkResult VKAPI_CALL terminator_ReleaseDisplayEXT(
VkPhysicalDevice physicalDevice, VkDisplayKHR display) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->ReleaseDisplayEXT) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkReleaseDisplayEXT");
}
return icd_term->ReleaseDisplayEXT(phys_dev_term->phys_dev, display);
}
// Definitions for the VK_EXT_display_surface_counter extension
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT(
VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
VkSurfaceCapabilities2EXT *pSurfaceCapabilities) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
return disp->GetPhysicalDeviceSurfaceCapabilities2EXT(
unwrapped_phys_dev, surface, pSurfaceCapabilities);
}
VKAPI_ATTR VkResult VKAPI_CALL
terminator_GetPhysicalDeviceSurfaceCapabilities2EXT(
VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
VkSurfaceCapabilities2EXT *pSurfaceCapabilities) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL != icd_term) {
if (NULL == icd_term->GetPhysicalDeviceSurfaceCapabilities2EXT) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT,
0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetPhysicalDeviceSurfaceCapabilities2EXT");
}
VkIcdSurface *icd_surface = (VkIcdSurface *)(surface);
uint8_t icd_index = phys_dev_term->icd_index;
if (NULL != icd_surface->real_icd_surfaces) {
if (NULL != (void *)icd_surface->real_icd_surfaces[icd_index]) {
return icd_term->GetPhysicalDeviceSurfaceCapabilities2EXT(
phys_dev_term->phys_dev,
icd_surface->real_icd_surfaces[icd_index],
pSurfaceCapabilities);
}
}
}
assert(icd_term != NULL && icd_term->DebugMarkerSetObjectNameEXT &&
"loader: null DebugMarkerSetObjectNameEXT ICD pointer");
return icd_term->DebugMarkerSetObjectNameEXT(device, pNameInfo);
return icd_term->GetPhysicalDeviceSurfaceCapabilities2EXT(
phys_dev_term->phys_dev, surface, pSurfaceCapabilities);
}
// Definitions for the VK_AMD_draw_indirect_count extension
VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountAMD(
VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
uint32_t stride) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
disp->CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer,
countBufferOffset, maxDrawCount, stride);
}
VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD(
VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
uint32_t stride) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
disp->CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset,
countBuffer, countBufferOffset,
maxDrawCount, stride);
}
// Definitions for the VK_NV_external_memory_capabilities extension
LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
VKAPI_ATTR VkResult VKAPI_CALL
vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type,
VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags,
@ -135,7 +477,7 @@ vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
return disp->GetPhysicalDeviceExternalImageFormatPropertiesNV(
unwrapped_phys_dev, format, type, tiling, usage, flags,
@ -175,27 +517,6 @@ terminator_GetPhysicalDeviceExternalImageFormatPropertiesNV(
externalHandleType, pExternalImageFormatProperties);
}
// Definitions for the VK_AMD_draw_indirect_count extension
VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountAMD(
VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
uint32_t stride) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
disp->CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer,
countBufferOffset, maxDrawCount, stride);
}
VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD(
VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
uint32_t stride) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
disp->CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset,
countBuffer, countBufferOffset,
maxDrawCount, stride);
}
#ifdef VK_USE_PLATFORM_WIN32_KHR
// Definitions for the VK_NV_external_memory_win32 extension
@ -209,12 +530,190 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
#endif // VK_USE_PLATFORM_WIN32_KHR
// GPA helpers for non-KHR extensions
// Definitions for the VK_NVX_device_generated_commands
VKAPI_ATTR void VKAPI_CALL vkCmdProcessCommandsNVX(
VkCommandBuffer commandBuffer,
const VkCmdProcessCommandsInfoNVX *pProcessCommandsInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
disp->CmdProcessCommandsNVX(commandBuffer, pProcessCommandsInfo);
}
VKAPI_ATTR void VKAPI_CALL vkCmdReserveSpaceForCommandsNVX(
VkCommandBuffer commandBuffer,
const VkCmdReserveSpaceForCommandsInfoNVX *pReserveSpaceInfo) {
const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
disp->CmdReserveSpaceForCommandsNVX(commandBuffer, pReserveSpaceInfo);
}
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutNVX(
VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX *pCreateInfo,
const VkAllocationCallbacks *pAllocator,
VkIndirectCommandsLayoutNVX *pIndirectCommandsLayout) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
return disp->CreateIndirectCommandsLayoutNVX(
device, pCreateInfo, pAllocator, pIndirectCommandsLayout);
}
VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutNVX(
VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout,
const VkAllocationCallbacks *pAllocator) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
disp->DestroyIndirectCommandsLayoutNVX(device, indirectCommandsLayout,
pAllocator);
}
VKAPI_ATTR VkResult VKAPI_CALL vkCreateObjectTableNVX(
VkDevice device, const VkObjectTableCreateInfoNVX *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkObjectTableNVX *pObjectTable) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
return disp->CreateObjectTableNVX(device, pCreateInfo, pAllocator,
pObjectTable);
}
VKAPI_ATTR void VKAPI_CALL
vkDestroyObjectTableNVX(VkDevice device, VkObjectTableNVX objectTable,
const VkAllocationCallbacks *pAllocator) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
disp->DestroyObjectTableNVX(device, objectTable, pAllocator);
}
VKAPI_ATTR VkResult VKAPI_CALL vkRegisterObjectsNVX(
VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount,
const VkObjectTableEntryNVX *const *ppObjectTableEntries,
const uint32_t *pObjectIndices) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
return disp->RegisterObjectsNVX(device, objectTable, objectCount,
ppObjectTableEntries, pObjectIndices);
}
VKAPI_ATTR VkResult VKAPI_CALL vkUnregisterObjectsNVX(
VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount,
const VkObjectEntryTypeNVX *pObjectEntryTypes,
const uint32_t *pObjectIndices) {
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
return disp->UnregisterObjectsNVX(device, objectTable, objectCount,
pObjectEntryTypes, pObjectIndices);
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
VkPhysicalDevice physicalDevice,
VkDeviceGeneratedCommandsFeaturesNVX *pFeatures,
VkDeviceGeneratedCommandsLimitsNVX *pLimits) {
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceGeneratedCommandsPropertiesNVX(unwrapped_phys_dev,
pFeatures, pLimits);
}
VKAPI_ATTR void VKAPI_CALL
terminator_GetPhysicalDeviceGeneratedCommandsPropertiesNVX(
VkPhysicalDevice physicalDevice,
VkDeviceGeneratedCommandsFeaturesNVX *pFeatures,
VkDeviceGeneratedCommandsLimitsNVX *pLimits) {
struct loader_physical_device_term *phys_dev_term =
(struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
if (NULL == icd_term->GetPhysicalDeviceGeneratedCommandsPropertiesNVX) {
loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"ICD associated with VkPhysicalDevice does not support "
"vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX");
} else {
icd_term->GetPhysicalDeviceGeneratedCommandsPropertiesNVX(
phys_dev_term->phys_dev, pFeatures, pLimits);
}
}
// GPA helpers for extensions
bool extension_instance_gpa(struct loader_instance *ptr_instance,
const char *name, void **addr) {
*addr = NULL;
// Functions for the VK_KHR_get_physical_device_properties2 extension
if (!strcmp("vkGetPhysicalDeviceFeatures2KHR", name)) {
*addr = (ptr_instance->enabled_known_extensions
.khr_get_physical_device_properties2 == 1)
? (void *)vkGetPhysicalDeviceFeatures2KHR
: NULL;
return true;
}
if (!strcmp("vkGetPhysicalDeviceProperties2KHR", name)) {
*addr = (ptr_instance->enabled_known_extensions
.khr_get_physical_device_properties2 == 1)
? (void *)vkGetPhysicalDeviceProperties2KHR
: NULL;
return true;
}
if (!strcmp("vkGetPhysicalDeviceFormatProperties2KHR", name)) {
*addr = (ptr_instance->enabled_known_extensions
.khr_get_physical_device_properties2 == 1)
? (void *)vkGetPhysicalDeviceFormatProperties2KHR
: NULL;
return true;
}
if (!strcmp("vkGetPhysicalDeviceImageFormatProperties2KHR", name)) {
*addr = (ptr_instance->enabled_known_extensions
.khr_get_physical_device_properties2 == 1)
? (void *)vkGetPhysicalDeviceImageFormatProperties2KHR
: NULL;
return true;
}
if (!strcmp("vkGetPhysicalDeviceQueueFamilyProperties2KHR", name)) {
*addr = (ptr_instance->enabled_known_extensions
.khr_get_physical_device_properties2 == 1)
? (void *)vkGetPhysicalDeviceQueueFamilyProperties2KHR
: NULL;
return true;
}
if (!strcmp("vkGetPhysicalDeviceMemoryProperties2KHR", name)) {
*addr = (ptr_instance->enabled_known_extensions
.khr_get_physical_device_properties2 == 1)
? (void *)vkGetPhysicalDeviceMemoryProperties2KHR
: NULL;
return true;
}
if (!strcmp("vkGetPhysicalDeviceSparseImageFormatProperties2KHR", name)) {
*addr = (ptr_instance->enabled_known_extensions
.khr_get_physical_device_properties2 == 1)
? (void *)vkGetPhysicalDeviceSparseImageFormatProperties2KHR
: NULL;
return true;
}
// Functions for the VK_KHR_maintenance1 extension
if (!strcmp("vkTrimCommandPoolKHR", name)) {
*addr = (void *)vkTrimCommandPoolKHR;
return true;
}
// Functions for the VK_EXT_acquire_xlib_display extension
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
if (!strcmp("vkAcquireXlibDisplayEXT", name)) {
*addr =
(ptr_instance->enabled_known_extensions.ext_acquire_xlib_display ==
1)
? (void *)vkAcquireXlibDisplayEXT
: NULL;
return true;
}
if (!strcmp("vkGetRandROutputDisplayEXT", name)) {
*addr =
(ptr_instance->enabled_known_extensions.ext_acquire_xlib_display ==
1)
? (void *)vkGetRandROutputDisplayEXT
: NULL;
return true;
}
#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
// Definitions for the VK_EXT_debug_marker extension commands which
// need to have a terminator function. Since these are device
// commands, we always need to return a valid value for them.
@ -228,12 +727,23 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance,
return true;
}
// Functions for the VK_NV_external_memory_capabilities extension
// Functions for the VK_EXT_direct_mode_display extension
if (!strcmp("vkGetPhysicalDeviceExternalImageFormatPropertiesNV", name)) {
if (!strcmp("vkReleaseDisplayEXT", name)) {
*addr =
(ptr_instance->enabled_known_extensions.ext_direct_mode_display ==
1)
? (void *)vkReleaseDisplayEXT
: NULL;
return true;
}
// Functions for the VK_EXT_display_surface_counter extension
if (!strcmp("vkGetPhysicalDeviceSurfaceCapabilities2EXT", name)) {
*addr = (ptr_instance->enabled_known_extensions
.nv_external_memory_capabilities == 1)
? (void *)vkGetPhysicalDeviceExternalImageFormatPropertiesNV
.ext_display_surface_counter == 1)
? (void *)vkGetPhysicalDeviceSurfaceCapabilities2EXT
: NULL;
return true;
}
@ -244,16 +754,23 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance,
*addr = (void *)vkCmdDrawIndirectCountAMD;
return true;
}
if (!strcmp("vkCmdDrawIndexedIndirectCountAMD", name)) {
*addr = (void *)vkCmdDrawIndexedIndirectCountAMD;
return true;
}
// Functions for the VK_NV_external_memory_capabilities extension
if (!strcmp("vkGetPhysicalDeviceExternalImageFormatPropertiesNV", name)) {
*addr = (ptr_instance->enabled_known_extensions
.nv_external_memory_capabilities == 1)
? (void *)vkGetPhysicalDeviceExternalImageFormatPropertiesNV
: NULL;
return true;
}
#ifdef VK_USE_PLATFORM_WIN32_KHR
// Functions for the VK_NV_external_memory_win32 extension
if (!strcmp("vkGetMemoryWin32HandleNV", name)) {
*addr = (void *)vkGetMemoryWin32HandleNV;
return true;
@ -261,19 +778,73 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance,
#endif // VK_USE_PLATFORM_WIN32_KHR
// Functions for the VK_NVX_device_generated_commands extension
if (!strcmp("vkCmdProcessCommandsNVX", name)) {
*addr = (void *)vkCmdProcessCommandsNVX;
return true;
}
if (!strcmp("vkCmdReserveSpaceForCommandsNVX", name)) {
*addr = (void *)vkCmdReserveSpaceForCommandsNVX;
return true;
}
if (!strcmp("vkCreateIndirectCommandsLayoutNVX", name)) {
*addr = (void *)vkCreateIndirectCommandsLayoutNVX;
return true;
}
if (!strcmp("vkDestroyIndirectCommandsLayoutNVX", name)) {
*addr = (void *)vkDestroyIndirectCommandsLayoutNVX;
return true;
}
if (!strcmp("vkCreateObjectTableNVX", name)) {
*addr = (void *)vkCreateObjectTableNVX;
return true;
}
if (!strcmp("vkDestroyObjectTableNVX", name)) {
*addr = (void *)vkDestroyObjectTableNVX;
return true;
}
if (!strcmp("vkRegisterObjectsNVX", name)) {
*addr = (void *)vkRegisterObjectsNVX;
return true;
}
if (!strcmp("vkUnregisterObjectsNVX", name)) {
*addr = (void *)vkUnregisterObjectsNVX;
return true;
}
if (!strcmp("vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX", name)) {
*addr = (void *)vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX;
return true;
}
return false;
}
void extensions_create_instance(struct loader_instance *ptr_instance,
const VkInstanceCreateInfo *pCreateInfo) {
ptr_instance->enabled_known_extensions.nv_external_memory_capabilities = 0;
for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i],
VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME) == 0) {
if (0 ==
strcmp(pCreateInfo->ppEnabledExtensionNames[i],
VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) {
ptr_instance->enabled_known_extensions
.khr_get_physical_device_properties2 = 1;
#ifdef VK_USE_PLATFORM_XLIB_KHR
} else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i],
VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME)) {
ptr_instance->enabled_known_extensions.ext_acquire_xlib_display = 1;
#endif
} else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i],
VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME)) {
ptr_instance->enabled_known_extensions.ext_direct_mode_display = 1;
} else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i],
VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME)) {
ptr_instance->enabled_known_extensions.ext_display_surface_counter =
1;
} else if (0 ==
strcmp(pCreateInfo->ppEnabledExtensionNames[i],
VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME)) {
ptr_instance->enabled_known_extensions
.nv_external_memory_capabilities = 1;
return;
}
}
}

View File

@ -28,8 +28,69 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance,
void extensions_create_instance(struct loader_instance *ptr_instance,
const VkInstanceCreateInfo *pCreateInfo);
// Definitions for the VK_EXT_debug_marker extension
// Instance extension terminators for the VK_KHR_get_physical_device_properties2
// extension
VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceFeatures2KHR(
VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR *pFeatures);
VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceProperties2KHR(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties2KHR *pProperties);
VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceFormatProperties2KHR(
VkPhysicalDevice physicalDevice, VkFormat format,
VkFormatProperties2KHR *pFormatProperties);
VKAPI_ATTR VkResult VKAPI_CALL
terminator_GetPhysicalDeviceImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceImageFormatInfo2KHR *pImageFormatInfo,
VkImageFormatProperties2KHR *pImageFormatProperties);
VKAPI_ATTR void VKAPI_CALL
terminator_GetPhysicalDeviceQueueFamilyProperties2KHR(
VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount,
VkQueueFamilyProperties2KHR *pQueueFamilyProperties);
VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceMemoryProperties2KHR(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties2KHR *pMemoryProperties);
VKAPI_ATTR void VKAPI_CALL
terminator_GetPhysicalDeviceSparseImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo,
uint32_t *pPropertyCount, VkSparseImageFormatProperties2KHR *pProperties);
// Instance extension terminators for the VK_EXT_acquire_xlib_display
// extension
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
VKAPI_ATTR VkResult VKAPI_CALL terminator_AcquireXlibDisplayEXT(
VkPhysicalDevice physicalDevice, Display *dpy, VkDisplayKHR display);
VKAPI_ATTR VkResult VKAPI_CALL terminator_GetRandROutputDisplayEXT(
VkPhysicalDevice physicalDevice, Display *dpy, RROutput rrOutput,
VkDisplayKHR *pDisplay);
#endif /* VK_USE_PLATFORM_XLIB_XRANDR_EXT */
// Instance extension terminators for the VK_EXT_direct_mode_display
// extension
VKAPI_ATTR VkResult VKAPI_CALL terminator_ReleaseDisplayEXT(
VkPhysicalDevice physicalDevice, VkDisplayKHR display);
// Instance extension terminators for the VK_EXT_display_surface_counter
// extension
VKAPI_ATTR VkResult VKAPI_CALL
terminator_GetPhysicalDeviceSurfaceCapabilities2EXT(
VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
VkSurfaceCapabilities2EXT *pSurfaceCapabilities);
// Device extension terminators for the VK_NV_external_memory_capabilities
// extension
VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectTagEXT(
VkDevice device, VkDebugMarkerObjectTagInfoEXT *pTagInfo);
@ -37,7 +98,8 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectTagEXT(
VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectNameEXT(
VkDevice device, VkDebugMarkerObjectNameInfoEXT *pNameInfo);
// Definitions for the VK_NV_external_memory_capabilities extension
// Instance extension terminators for the VK_NV_external_memory_capabilities
// extension
VKAPI_ATTR VkResult VKAPI_CALL
terminator_GetPhysicalDeviceExternalImageFormatPropertiesNV(
@ -45,3 +107,11 @@ terminator_GetPhysicalDeviceExternalImageFormatPropertiesNV(
VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags,
VkExternalMemoryHandleTypeFlagsNV externalHandleType,
VkExternalImageFormatPropertiesNV *pExternalImageFormatProperties);
// Instance extension terminators for the VK_NVX_device_generated_commands
// extension
VKAPI_ATTR void VKAPI_CALL
terminator_GetPhysicalDeviceGeneratedCommandsPropertiesNVX(
VkPhysicalDevice physicalDevice,
VkDeviceGeneratedCommandsFeaturesNVX *pFeatures,
VkDeviceGeneratedCommandsLimitsNVX *pLimits);

View File

@ -308,6 +308,11 @@ static inline void *trampolineGetProcAddr(struct loader_instance *inst,
if (extension_instance_gpa(inst, funcName, &addr))
return addr;
// Unknown physical device extensions
if (loader_phys_dev_ext_gpa(inst, funcName, true, &addr, NULL))
return addr;
// Unknown device extensions
addr = loader_dev_ext_gpa(inst, funcName);
return addr;
}
@ -327,36 +332,6 @@ static inline void *globalGetProcAddr(const char *name) {
return NULL;
}
/* These functions require special handling by the loader.
* They are not just generic trampoline code entrypoints.
* Thus GPA must return loader entrypoint for these instead of first function
* in the chain. */
static inline void *loader_non_passthrough_gipa(const char *name) {
if (!name || name[0] != 'v' || name[1] != 'k')
return NULL;
name += 2;
if (!strcmp(name, "CreateInstance"))
return (void *)vkCreateInstance;
if (!strcmp(name, "DestroyInstance"))
return (void *)vkDestroyInstance;
if (!strcmp(name, "GetDeviceProcAddr"))
return (void *)vkGetDeviceProcAddr;
// remove once no longer locks
if (!strcmp(name, "EnumeratePhysicalDevices"))
return (void *)vkEnumeratePhysicalDevices;
if (!strcmp(name, "EnumerateDeviceExtensionProperties"))
return (void *)vkEnumerateDeviceExtensionProperties;
if (!strcmp(name, "EnumerateDeviceLayerProperties"))
return (void *)vkEnumerateDeviceLayerProperties;
if (!strcmp(name, "GetInstanceProcAddr"))
return (void *)vkGetInstanceProcAddr;
if (!strcmp(name, "CreateDevice"))
return (void *)vkCreateDevice;
return NULL;
}
static inline void *loader_non_passthrough_gdpa(const char *name) {
if (!name || name[0] != 'v' || name[1] != 'k')
return NULL;

File diff suppressed because it is too large Load Diff

View File

@ -52,6 +52,13 @@
#define VK_MINOR(version) ((version >> 12) & 0x3ff)
#define VK_PATCH(version) (version & 0xfff)
// This is defined in vk_layer.h, but if there's problems we need to create the define
// here.
#ifndef MAX_NUM_UNKNOWN_EXTS
#define MAX_NUM_UNKNOWN_EXTS 250
#endif
enum layer_type {
VK_LAYER_TYPE_INSTANCE_EXPLICIT = 0x1,
VK_LAYER_TYPE_INSTANCE_IMPLICIT = 0x2,
@ -81,6 +88,11 @@ static const char std_validation_names[7][VK_MAX_EXTENSION_NAME_SIZE] = {
"VK_LAYER_LUNARG_core_validation", "VK_LAYER_LUNARG_swapchain",
"VK_LAYER_GOOGLE_unique_objects"};
struct VkStructureHeader {
VkStructureType sType;
const void* pNext;
};
// form of all dynamic lists/arrays
// only the list element should be changed
struct loader_generic_list {
@ -115,13 +127,17 @@ struct loader_name_value {
struct loader_layer_functions {
char str_gipa[MAX_STRING_SIZE];
char str_gdpa[MAX_STRING_SIZE];
char str_negotiate_interface[MAX_STRING_SIZE];
PFN_vkNegotiateLoaderLayerInterfaceVersion negotiate_layer_interface;
PFN_vkGetInstanceProcAddr get_instance_proc_addr;
PFN_vkGetDeviceProcAddr get_device_proc_addr;
PFN_GetPhysicalDeviceProcAddr get_physical_device_proc_addr;
};
struct loader_layer_properties {
VkLayerProperties info;
enum layer_type type;
uint32_t interface_version; // PFN_vkNegotiateLoaderLayerInterfaceVersion
char lib_name[MAX_STRING_SIZE];
loader_platform_dl_handle lib_handle;
struct loader_layer_functions functions;
@ -143,7 +159,7 @@ struct loader_dispatch_hash_list {
uint32_t *index; // index into the dev_ext dispatch table
};
#define MAX_NUM_DEV_EXTS 250
// loader_dispatch_hash_entry and loader_dev_ext_dispatch_table.dev_ext have
// one to one correspondence; one loader_dispatch_hash_entry for one dev_ext
// dispatch entry.
@ -155,7 +171,7 @@ struct loader_dispatch_hash_entry {
typedef void(VKAPI_PTR *PFN_vkDevExt)(VkDevice device);
struct loader_dev_ext_dispatch_table {
PFN_vkDevExt dev_ext[MAX_NUM_DEV_EXTS];
PFN_vkDevExt dev_ext[MAX_NUM_UNKNOWN_EXTS];
};
struct loader_dev_dispatch_table {
@ -199,19 +215,13 @@ struct loader_icd_term {
PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties;
PFN_vkGetPhysicalDeviceSparseImageFormatProperties
GetPhysicalDeviceSparseImageFormatProperties;
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT;
PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT;
// WSI extensions
PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR;
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
GetPhysicalDeviceSurfaceCapabilitiesKHR;
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR;
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR
GetPhysicalDeviceSurfacePresentModesKHR;
PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV
GetPhysicalDeviceExternalImageFormatPropertiesNV;
#ifdef VK_USE_PLATFORM_WIN32_KHR
PFN_vkCreateWin32SurfaceKHR CreateWin32SurfaceKHR;
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR
@ -249,7 +259,55 @@ struct loader_icd_term {
PFN_vkCreateDisplayPlaneSurfaceKHR CreateDisplayPlaneSurfaceKHR;
PFN_vkDestroySurfaceKHR DestroySurfaceKHR;
PFN_vkCreateSwapchainKHR CreateSwapchainKHR;
PFN_vkCreateSharedSwapchainsKHR CreateSharedSwapchainsKHR;
// KHR_get_physical_device_properties2
PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysicalDeviceFeatures2KHR;
PFN_vkGetPhysicalDeviceProperties2KHR GetPhysicalDeviceProperties2KHR;
PFN_vkGetPhysicalDeviceFormatProperties2KHR
GetPhysicalDeviceFormatProperties2KHR;
PFN_vkGetPhysicalDeviceImageFormatProperties2KHR
GetPhysicalDeviceImageFormatProperties2KHR;
PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR
GetPhysicalDeviceQueueFamilyProperties2KHR;
PFN_vkGetPhysicalDeviceMemoryProperties2KHR
GetPhysicalDeviceMemoryProperties2KHR;
PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR
GetPhysicalDeviceSparseImageFormatProperties2KHR;
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
// EXT_acquire_xlib_display
PFN_vkAcquireXlibDisplayEXT AcquireXlibDisplayEXT;
PFN_vkGetRandROutputDisplayEXT GetRandROutputDisplayEXT;
#endif
// EXT_debug_report
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
// EXT_debug_marker (items needing a trampoline/terminator)
PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT;
PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT;
// EXT_direct_mode_display
PFN_vkReleaseDisplayEXT ReleaseDisplayEXT;
// EXT_display_surface_counter
PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT
GetPhysicalDeviceSurfaceCapabilities2EXT;
// NV_external_memory_capabilities
PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV
GetPhysicalDeviceExternalImageFormatPropertiesNV;
// NVX_device_generated_commands
PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX
GetPhysicalDeviceGeneratedCommandsPropertiesNVX;
struct loader_icd_term *next;
PFN_PhysDevExt phys_dev_ext[MAX_NUM_UNKNOWN_EXTS];
};
// per ICD library structure
@ -261,19 +319,32 @@ struct loader_icd_tramp_list {
union loader_instance_extension_enables {
struct {
uint8_t khr_get_physical_device_properties2 : 1;
uint8_t ext_acquire_xlib_display : 1;
uint8_t ext_debug_report : 1;
uint8_t ext_direct_mode_display : 1;
uint8_t ext_display_surface_counter : 1;
uint8_t nv_external_memory_capabilities : 1;
};
uint64_t padding[4];
};
struct loader_instance_dispatch_table {
VkLayerInstanceDispatchTable layer_inst_disp; // must be first entry in structure
// Physical device functions unknown to the loader
PFN_PhysDevExt phys_dev_ext[MAX_NUM_UNKNOWN_EXTS];
};
// per instance structure
struct loader_instance {
VkLayerInstanceDispatchTable *disp; // must be first entry in structure
struct loader_instance_dispatch_table *disp; // must be first entry in structure
uint32_t total_gpu_count;
struct loader_physical_device_term *phys_devs_term;
struct loader_physical_device_tramp *phys_devs_tramp;
uint32_t phys_dev_count_term;
struct loader_physical_device_term **phys_devs_term;
uint32_t phys_dev_count_tramp;
struct loader_physical_device_tramp **phys_devs_tramp;
struct loader_instance *next;
@ -281,7 +352,8 @@ struct loader_instance {
struct loader_icd_term *icd_terms;
struct loader_icd_tramp_list icd_tramp_list;
struct loader_dispatch_hash_entry disp_hash[MAX_NUM_DEV_EXTS];
struct loader_dispatch_hash_entry dev_ext_disp_hash[MAX_NUM_UNKNOWN_EXTS];
struct loader_dispatch_hash_entry phys_dev_ext_disp_hash[MAX_NUM_UNKNOWN_EXTS];
struct loader_msg_callback_map_entry *icd_msg_callback_map;
@ -337,14 +409,14 @@ struct loader_instance {
/* per enumerated PhysicalDevice structure, used to wrap in trampoline code and
also same structure used to wrap in terminator code */
struct loader_physical_device_tramp {
VkLayerInstanceDispatchTable *disp; // must be first entry in structure
struct loader_instance_dispatch_table *disp; // must be first entry in structure
struct loader_instance *this_instance;
VkPhysicalDevice phys_dev; // object from layers/loader terminator
};
/* per enumerated PhysicalDevice structure, used to wrap in terminator code */
struct loader_physical_device_term {
VkLayerInstanceDispatchTable *disp; // must be first entry in structure
struct loader_instance_dispatch_table *disp; // must be first entry in structure
struct loader_icd_term *this_icd_term;
uint8_t icd_index;
VkPhysicalDevice phys_dev; // object from ICD
@ -360,6 +432,7 @@ struct loader_scanned_icd {
uint32_t api_version;
uint32_t interface_version;
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
PFN_GetPhysicalDeviceProcAddr GetPhysicalDeviceProcAddr;
PFN_vkCreateInstance CreateInstance;
PFN_vkEnumerateInstanceExtensionProperties
EnumerateInstanceExtensionProperties;
@ -390,10 +463,15 @@ loader_get_dev_dispatch(const void *obj) {
}
static inline VkLayerInstanceDispatchTable *
loader_get_instance_dispatch(const void *obj) {
loader_get_instance_layer_dispatch(const void *obj) {
return *((VkLayerInstanceDispatchTable **)obj);
}
static inline struct loader_instance_dispatch_table *
loader_get_instance_dispatch(const void *obj) {
return *((struct loader_instance_dispatch_table **)obj);
}
static inline void loader_init_dispatch(void *obj, const void *data) {
#ifdef DEBUG
assert(valid_loader_magic_value(obj) &&
@ -530,7 +608,10 @@ void loader_init_dispatch_dev_ext(struct loader_instance *inst,
struct loader_device *dev);
void *loader_dev_ext_gpa(struct loader_instance *inst, const char *funcName);
void *loader_get_dev_ext_trampoline(uint32_t index);
void loader_override_terminating_device_proc(struct loader_device *dev);
bool loader_phys_dev_ext_gpa(struct loader_instance *inst, const char *funcName,
bool perform_checking, void **tramp_addr, void **term_addr);
void *loader_get_phys_dev_ext_tramp(uint32_t index);
void *loader_get_phys_dev_ext_termin(uint32_t index);
struct loader_instance *loader_get_instance(const VkInstance instance);
void loader_deactivate_layers(const struct loader_instance *instance,
struct loader_device *device,
@ -576,12 +657,16 @@ loader_create_device_chain(const struct loader_physical_device_tramp *pd,
const VkAllocationCallbacks *pAllocator,
const struct loader_instance *inst,
struct loader_device *dev);
VkResult loader_validate_device_extensions(
struct loader_physical_device_tramp *phys_dev,
const struct loader_layer_list *activated_device_layers,
const struct loader_extension_list *icd_exts,
const VkDeviceCreateInfo *pCreateInfo);
VkResult setupLoaderTrampPhysDevs(VkInstance instance);
VkResult setupLoaderTermPhysDevs(struct loader_instance *inst);
/* instance layer chain termination entrypoint definitions */
VKAPI_ATTR VkResult VKAPI_CALL
terminator_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,

828
third_party/vulkan/loader/phys_dev_ext.c vendored Normal file
View File

@ -0,0 +1,828 @@
/*
*
* Copyright (c) 2016 The Khronos Group Inc.
* Copyright (c) 2016 Valve Corporation
* Copyright (c) 2016 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Author: Mark Young <marky@lunarg.com>
*
*/
// This code is used to enable generic instance extensions which use a physical device
// as the first parameter. If the extension is already known by the loader, it will
// not use this code, but instead use the more direct route. However, if it is
// unknown to the loader, it will use this code. Technically, this is not trampoline
// code since we don't want to optimize it out.
#include "vk_loader_platform.h"
#include "loader.h"
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC optimize(3) // force gcc to use tail-calls
#endif
// Trampoline function macro for unknown physical device extension command.
#define PhysDevExtTramp(num) \
VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp##num( \
VkPhysicalDevice physical_device) { \
const struct loader_instance_dispatch_table *disp; \
disp = loader_get_instance_dispatch(physical_device); \
disp->phys_dev_ext[num]( \
loader_unwrap_physical_device(physical_device)); \
}
// Terminator function macro for unknown physical device extension command.
#define PhysDevExtTermin(num) \
VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin##num( \
VkPhysicalDevice physical_device) { \
struct loader_physical_device_term *phys_dev_term = \
(struct loader_physical_device_term *)physical_device; \
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term; \
struct loader_instance *inst = \
(struct loader_instance *)icd_term->this_instance; \
if (NULL == icd_term->phys_dev_ext[num]) { \
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, \
"Extension %s not supported for this physical device", \
inst->phys_dev_ext_disp_hash[num].func_name); \
} \
icd_term->phys_dev_ext[num](phys_dev_term->phys_dev); \
}
// Instantiations of the trampoline and terminator
PhysDevExtTramp(0) PhysDevExtTermin(0)
PhysDevExtTramp(1) PhysDevExtTermin(1)
PhysDevExtTramp(2) PhysDevExtTermin(2)
PhysDevExtTramp(3) PhysDevExtTermin(3)
PhysDevExtTramp(4) PhysDevExtTermin(4)
PhysDevExtTramp(5) PhysDevExtTermin(5)
PhysDevExtTramp(6) PhysDevExtTermin(6)
PhysDevExtTramp(7) PhysDevExtTermin(7)
PhysDevExtTramp(8) PhysDevExtTermin(8)
PhysDevExtTramp(9) PhysDevExtTermin(9)
PhysDevExtTramp(10) PhysDevExtTermin(10)
PhysDevExtTramp(11) PhysDevExtTermin(11)
PhysDevExtTramp(12) PhysDevExtTermin(12)
PhysDevExtTramp(13) PhysDevExtTermin(13)
PhysDevExtTramp(14) PhysDevExtTermin(14)
PhysDevExtTramp(15) PhysDevExtTermin(15)
PhysDevExtTramp(16) PhysDevExtTermin(16)
PhysDevExtTramp(17) PhysDevExtTermin(17)
PhysDevExtTramp(18) PhysDevExtTermin(18)
PhysDevExtTramp(19) PhysDevExtTermin(19)
PhysDevExtTramp(20) PhysDevExtTermin(20)
PhysDevExtTramp(21) PhysDevExtTermin(21)
PhysDevExtTramp(22) PhysDevExtTermin(22)
PhysDevExtTramp(23) PhysDevExtTermin(23)
PhysDevExtTramp(24) PhysDevExtTermin(24)
PhysDevExtTramp(25) PhysDevExtTermin(25)
PhysDevExtTramp(26) PhysDevExtTermin(26)
PhysDevExtTramp(27) PhysDevExtTermin(27)
PhysDevExtTramp(28) PhysDevExtTermin(28)
PhysDevExtTramp(29) PhysDevExtTermin(29)
PhysDevExtTramp(30) PhysDevExtTermin(30)
PhysDevExtTramp(31) PhysDevExtTermin(31)
PhysDevExtTramp(32) PhysDevExtTermin(32)
PhysDevExtTramp(33) PhysDevExtTermin(33)
PhysDevExtTramp(34) PhysDevExtTermin(34)
PhysDevExtTramp(35) PhysDevExtTermin(35)
PhysDevExtTramp(36) PhysDevExtTermin(36)
PhysDevExtTramp(37) PhysDevExtTermin(37)
PhysDevExtTramp(38) PhysDevExtTermin(38)
PhysDevExtTramp(39) PhysDevExtTermin(39)
PhysDevExtTramp(40) PhysDevExtTermin(40)
PhysDevExtTramp(41) PhysDevExtTermin(41)
PhysDevExtTramp(42) PhysDevExtTermin(42)
PhysDevExtTramp(43) PhysDevExtTermin(43)
PhysDevExtTramp(44) PhysDevExtTermin(44)
PhysDevExtTramp(45) PhysDevExtTermin(45)
PhysDevExtTramp(46) PhysDevExtTermin(46)
PhysDevExtTramp(47) PhysDevExtTermin(47)
PhysDevExtTramp(48) PhysDevExtTermin(48)
PhysDevExtTramp(49) PhysDevExtTermin(49)
PhysDevExtTramp(50) PhysDevExtTermin(50)
PhysDevExtTramp(51) PhysDevExtTermin(51)
PhysDevExtTramp(52) PhysDevExtTermin(52)
PhysDevExtTramp(53) PhysDevExtTermin(53)
PhysDevExtTramp(54) PhysDevExtTermin(54)
PhysDevExtTramp(55) PhysDevExtTermin(55)
PhysDevExtTramp(56) PhysDevExtTermin(56)
PhysDevExtTramp(57) PhysDevExtTermin(57)
PhysDevExtTramp(58) PhysDevExtTermin(58)
PhysDevExtTramp(59) PhysDevExtTermin(59)
PhysDevExtTramp(60) PhysDevExtTermin(60)
PhysDevExtTramp(61) PhysDevExtTermin(61)
PhysDevExtTramp(62) PhysDevExtTermin(62)
PhysDevExtTramp(63) PhysDevExtTermin(63)
PhysDevExtTramp(64) PhysDevExtTermin(64)
PhysDevExtTramp(65) PhysDevExtTermin(65)
PhysDevExtTramp(66) PhysDevExtTermin(66)
PhysDevExtTramp(67) PhysDevExtTermin(67)
PhysDevExtTramp(68) PhysDevExtTermin(68)
PhysDevExtTramp(69) PhysDevExtTermin(69)
PhysDevExtTramp(70) PhysDevExtTermin(70)
PhysDevExtTramp(71) PhysDevExtTermin(71)
PhysDevExtTramp(72) PhysDevExtTermin(72)
PhysDevExtTramp(73) PhysDevExtTermin(73)
PhysDevExtTramp(74) PhysDevExtTermin(74)
PhysDevExtTramp(75) PhysDevExtTermin(75)
PhysDevExtTramp(76) PhysDevExtTermin(76)
PhysDevExtTramp(77) PhysDevExtTermin(77)
PhysDevExtTramp(78) PhysDevExtTermin(78)
PhysDevExtTramp(79) PhysDevExtTermin(79)
PhysDevExtTramp(80) PhysDevExtTermin(80)
PhysDevExtTramp(81) PhysDevExtTermin(81)
PhysDevExtTramp(82) PhysDevExtTermin(82)
PhysDevExtTramp(83) PhysDevExtTermin(83)
PhysDevExtTramp(84) PhysDevExtTermin(84)
PhysDevExtTramp(85) PhysDevExtTermin(85)
PhysDevExtTramp(86) PhysDevExtTermin(86)
PhysDevExtTramp(87) PhysDevExtTermin(87)
PhysDevExtTramp(88) PhysDevExtTermin(88)
PhysDevExtTramp(89) PhysDevExtTermin(89)
PhysDevExtTramp(90) PhysDevExtTermin(90)
PhysDevExtTramp(91) PhysDevExtTermin(91)
PhysDevExtTramp(92) PhysDevExtTermin(92)
PhysDevExtTramp(93) PhysDevExtTermin(93)
PhysDevExtTramp(94) PhysDevExtTermin(94)
PhysDevExtTramp(95) PhysDevExtTermin(95)
PhysDevExtTramp(96) PhysDevExtTermin(96)
PhysDevExtTramp(97) PhysDevExtTermin(97)
PhysDevExtTramp(98) PhysDevExtTermin(98)
PhysDevExtTramp(99) PhysDevExtTermin(99)
PhysDevExtTramp(100) PhysDevExtTermin(100)
PhysDevExtTramp(101) PhysDevExtTermin(101)
PhysDevExtTramp(102) PhysDevExtTermin(102)
PhysDevExtTramp(103) PhysDevExtTermin(103)
PhysDevExtTramp(104) PhysDevExtTermin(104)
PhysDevExtTramp(105) PhysDevExtTermin(105)
PhysDevExtTramp(106) PhysDevExtTermin(106)
PhysDevExtTramp(107) PhysDevExtTermin(107)
PhysDevExtTramp(108) PhysDevExtTermin(108)
PhysDevExtTramp(109) PhysDevExtTermin(109)
PhysDevExtTramp(110) PhysDevExtTermin(110)
PhysDevExtTramp(111) PhysDevExtTermin(111)
PhysDevExtTramp(112) PhysDevExtTermin(112)
PhysDevExtTramp(113) PhysDevExtTermin(113)
PhysDevExtTramp(114) PhysDevExtTermin(114)
PhysDevExtTramp(115) PhysDevExtTermin(115)
PhysDevExtTramp(116) PhysDevExtTermin(116)
PhysDevExtTramp(117) PhysDevExtTermin(117)
PhysDevExtTramp(118) PhysDevExtTermin(118)
PhysDevExtTramp(119) PhysDevExtTermin(119)
PhysDevExtTramp(120) PhysDevExtTermin(120)
PhysDevExtTramp(121) PhysDevExtTermin(121)
PhysDevExtTramp(122) PhysDevExtTermin(122)
PhysDevExtTramp(123) PhysDevExtTermin(123)
PhysDevExtTramp(124) PhysDevExtTermin(124)
PhysDevExtTramp(125) PhysDevExtTermin(125)
PhysDevExtTramp(126) PhysDevExtTermin(126)
PhysDevExtTramp(127) PhysDevExtTermin(127)
PhysDevExtTramp(128) PhysDevExtTermin(128)
PhysDevExtTramp(129) PhysDevExtTermin(129)
PhysDevExtTramp(130) PhysDevExtTermin(130)
PhysDevExtTramp(131) PhysDevExtTermin(131)
PhysDevExtTramp(132) PhysDevExtTermin(132)
PhysDevExtTramp(133) PhysDevExtTermin(133)
PhysDevExtTramp(134) PhysDevExtTermin(134)
PhysDevExtTramp(135) PhysDevExtTermin(135)
PhysDevExtTramp(136) PhysDevExtTermin(136)
PhysDevExtTramp(137) PhysDevExtTermin(137)
PhysDevExtTramp(138) PhysDevExtTermin(138)
PhysDevExtTramp(139) PhysDevExtTermin(139)
PhysDevExtTramp(140) PhysDevExtTermin(140)
PhysDevExtTramp(141) PhysDevExtTermin(141)
PhysDevExtTramp(142) PhysDevExtTermin(142)
PhysDevExtTramp(143) PhysDevExtTermin(143)
PhysDevExtTramp(144) PhysDevExtTermin(144)
PhysDevExtTramp(145) PhysDevExtTermin(145)
PhysDevExtTramp(146) PhysDevExtTermin(146)
PhysDevExtTramp(147) PhysDevExtTermin(147)
PhysDevExtTramp(148) PhysDevExtTermin(148)
PhysDevExtTramp(149) PhysDevExtTermin(149)
PhysDevExtTramp(150) PhysDevExtTermin(150)
PhysDevExtTramp(151) PhysDevExtTermin(151)
PhysDevExtTramp(152) PhysDevExtTermin(152)
PhysDevExtTramp(153) PhysDevExtTermin(153)
PhysDevExtTramp(154) PhysDevExtTermin(154)
PhysDevExtTramp(155) PhysDevExtTermin(155)
PhysDevExtTramp(156) PhysDevExtTermin(156)
PhysDevExtTramp(157) PhysDevExtTermin(157)
PhysDevExtTramp(158) PhysDevExtTermin(158)
PhysDevExtTramp(159) PhysDevExtTermin(159)
PhysDevExtTramp(160) PhysDevExtTermin(160)
PhysDevExtTramp(161) PhysDevExtTermin(161)
PhysDevExtTramp(162) PhysDevExtTermin(162)
PhysDevExtTramp(163) PhysDevExtTermin(163)
PhysDevExtTramp(164) PhysDevExtTermin(164)
PhysDevExtTramp(165) PhysDevExtTermin(165)
PhysDevExtTramp(166) PhysDevExtTermin(166)
PhysDevExtTramp(167) PhysDevExtTermin(167)
PhysDevExtTramp(168) PhysDevExtTermin(168)
PhysDevExtTramp(169) PhysDevExtTermin(169)
PhysDevExtTramp(170) PhysDevExtTermin(170)
PhysDevExtTramp(171) PhysDevExtTermin(171)
PhysDevExtTramp(172) PhysDevExtTermin(172)
PhysDevExtTramp(173) PhysDevExtTermin(173)
PhysDevExtTramp(174) PhysDevExtTermin(174)
PhysDevExtTramp(175) PhysDevExtTermin(175)
PhysDevExtTramp(176) PhysDevExtTermin(176)
PhysDevExtTramp(177) PhysDevExtTermin(177)
PhysDevExtTramp(178) PhysDevExtTermin(178)
PhysDevExtTramp(179) PhysDevExtTermin(179)
PhysDevExtTramp(180) PhysDevExtTermin(180)
PhysDevExtTramp(181) PhysDevExtTermin(181)
PhysDevExtTramp(182) PhysDevExtTermin(182)
PhysDevExtTramp(183) PhysDevExtTermin(183)
PhysDevExtTramp(184) PhysDevExtTermin(184)
PhysDevExtTramp(185) PhysDevExtTermin(185)
PhysDevExtTramp(186) PhysDevExtTermin(186)
PhysDevExtTramp(187) PhysDevExtTermin(187)
PhysDevExtTramp(188) PhysDevExtTermin(188)
PhysDevExtTramp(189) PhysDevExtTermin(189)
PhysDevExtTramp(190) PhysDevExtTermin(190)
PhysDevExtTramp(191) PhysDevExtTermin(191)
PhysDevExtTramp(192) PhysDevExtTermin(192)
PhysDevExtTramp(193) PhysDevExtTermin(193)
PhysDevExtTramp(194) PhysDevExtTermin(194)
PhysDevExtTramp(195) PhysDevExtTermin(195)
PhysDevExtTramp(196) PhysDevExtTermin(196)
PhysDevExtTramp(197) PhysDevExtTermin(197)
PhysDevExtTramp(198) PhysDevExtTermin(198)
PhysDevExtTramp(199) PhysDevExtTermin(199)
PhysDevExtTramp(200) PhysDevExtTermin(200)
PhysDevExtTramp(201) PhysDevExtTermin(201)
PhysDevExtTramp(202) PhysDevExtTermin(202)
PhysDevExtTramp(203) PhysDevExtTermin(203)
PhysDevExtTramp(204) PhysDevExtTermin(204)
PhysDevExtTramp(205) PhysDevExtTermin(205)
PhysDevExtTramp(206) PhysDevExtTermin(206)
PhysDevExtTramp(207) PhysDevExtTermin(207)
PhysDevExtTramp(208) PhysDevExtTermin(208)
PhysDevExtTramp(209) PhysDevExtTermin(209)
PhysDevExtTramp(210) PhysDevExtTermin(210)
PhysDevExtTramp(211) PhysDevExtTermin(211)
PhysDevExtTramp(212) PhysDevExtTermin(212)
PhysDevExtTramp(213) PhysDevExtTermin(213)
PhysDevExtTramp(214) PhysDevExtTermin(214)
PhysDevExtTramp(215) PhysDevExtTermin(215)
PhysDevExtTramp(216) PhysDevExtTermin(216)
PhysDevExtTramp(217) PhysDevExtTermin(217)
PhysDevExtTramp(218) PhysDevExtTermin(218)
PhysDevExtTramp(219) PhysDevExtTermin(219)
PhysDevExtTramp(220) PhysDevExtTermin(220)
PhysDevExtTramp(221) PhysDevExtTermin(221)
PhysDevExtTramp(222) PhysDevExtTermin(222)
PhysDevExtTramp(223) PhysDevExtTermin(223)
PhysDevExtTramp(224) PhysDevExtTermin(224)
PhysDevExtTramp(225) PhysDevExtTermin(225)
PhysDevExtTramp(226) PhysDevExtTermin(226)
PhysDevExtTramp(227) PhysDevExtTermin(227)
PhysDevExtTramp(228) PhysDevExtTermin(228)
PhysDevExtTramp(229) PhysDevExtTermin(229)
PhysDevExtTramp(230) PhysDevExtTermin(230)
PhysDevExtTramp(231) PhysDevExtTermin(231)
PhysDevExtTramp(232) PhysDevExtTermin(232)
PhysDevExtTramp(233) PhysDevExtTermin(233)
PhysDevExtTramp(234) PhysDevExtTermin(234)
PhysDevExtTramp(235) PhysDevExtTermin(235)
PhysDevExtTramp(236) PhysDevExtTermin(236)
PhysDevExtTramp(237) PhysDevExtTermin(237)
PhysDevExtTramp(238) PhysDevExtTermin(238)
PhysDevExtTramp(239) PhysDevExtTermin(239)
PhysDevExtTramp(240) PhysDevExtTermin(240)
PhysDevExtTramp(241) PhysDevExtTermin(241)
PhysDevExtTramp(242) PhysDevExtTermin(242)
PhysDevExtTramp(243) PhysDevExtTermin(243)
PhysDevExtTramp(244) PhysDevExtTermin(244)
PhysDevExtTramp(245) PhysDevExtTermin(245)
PhysDevExtTramp(246) PhysDevExtTermin(246)
PhysDevExtTramp(247) PhysDevExtTermin(247)
PhysDevExtTramp(248) PhysDevExtTermin(248)
PhysDevExtTramp(249) PhysDevExtTermin(249)
void *loader_get_phys_dev_ext_tramp(uint32_t index) {
switch (index) {
#define TRAMP_CASE_HANDLE(num) case num: return vkPhysDevExtTramp##num
TRAMP_CASE_HANDLE(0);
TRAMP_CASE_HANDLE(1);
TRAMP_CASE_HANDLE(2);
TRAMP_CASE_HANDLE(3);
TRAMP_CASE_HANDLE(4);
TRAMP_CASE_HANDLE(5);
TRAMP_CASE_HANDLE(6);
TRAMP_CASE_HANDLE(7);
TRAMP_CASE_HANDLE(8);
TRAMP_CASE_HANDLE(9);
TRAMP_CASE_HANDLE(10);
TRAMP_CASE_HANDLE(11);
TRAMP_CASE_HANDLE(12);
TRAMP_CASE_HANDLE(13);
TRAMP_CASE_HANDLE(14);
TRAMP_CASE_HANDLE(15);
TRAMP_CASE_HANDLE(16);
TRAMP_CASE_HANDLE(17);
TRAMP_CASE_HANDLE(18);
TRAMP_CASE_HANDLE(19);
TRAMP_CASE_HANDLE(20);
TRAMP_CASE_HANDLE(21);
TRAMP_CASE_HANDLE(22);
TRAMP_CASE_HANDLE(23);
TRAMP_CASE_HANDLE(24);
TRAMP_CASE_HANDLE(25);
TRAMP_CASE_HANDLE(26);
TRAMP_CASE_HANDLE(27);
TRAMP_CASE_HANDLE(28);
TRAMP_CASE_HANDLE(29);
TRAMP_CASE_HANDLE(30);
TRAMP_CASE_HANDLE(31);
TRAMP_CASE_HANDLE(32);
TRAMP_CASE_HANDLE(33);
TRAMP_CASE_HANDLE(34);
TRAMP_CASE_HANDLE(35);
TRAMP_CASE_HANDLE(36);
TRAMP_CASE_HANDLE(37);
TRAMP_CASE_HANDLE(38);
TRAMP_CASE_HANDLE(39);
TRAMP_CASE_HANDLE(40);
TRAMP_CASE_HANDLE(41);
TRAMP_CASE_HANDLE(42);
TRAMP_CASE_HANDLE(43);
TRAMP_CASE_HANDLE(44);
TRAMP_CASE_HANDLE(45);
TRAMP_CASE_HANDLE(46);
TRAMP_CASE_HANDLE(47);
TRAMP_CASE_HANDLE(48);
TRAMP_CASE_HANDLE(49);
TRAMP_CASE_HANDLE(50);
TRAMP_CASE_HANDLE(51);
TRAMP_CASE_HANDLE(52);
TRAMP_CASE_HANDLE(53);
TRAMP_CASE_HANDLE(54);
TRAMP_CASE_HANDLE(55);
TRAMP_CASE_HANDLE(56);
TRAMP_CASE_HANDLE(57);
TRAMP_CASE_HANDLE(58);
TRAMP_CASE_HANDLE(59);
TRAMP_CASE_HANDLE(60);
TRAMP_CASE_HANDLE(61);
TRAMP_CASE_HANDLE(62);
TRAMP_CASE_HANDLE(63);
TRAMP_CASE_HANDLE(64);
TRAMP_CASE_HANDLE(65);
TRAMP_CASE_HANDLE(66);
TRAMP_CASE_HANDLE(67);
TRAMP_CASE_HANDLE(68);
TRAMP_CASE_HANDLE(69);
TRAMP_CASE_HANDLE(70);
TRAMP_CASE_HANDLE(71);
TRAMP_CASE_HANDLE(72);
TRAMP_CASE_HANDLE(73);
TRAMP_CASE_HANDLE(74);
TRAMP_CASE_HANDLE(75);
TRAMP_CASE_HANDLE(76);
TRAMP_CASE_HANDLE(77);
TRAMP_CASE_HANDLE(78);
TRAMP_CASE_HANDLE(79);
TRAMP_CASE_HANDLE(80);
TRAMP_CASE_HANDLE(81);
TRAMP_CASE_HANDLE(82);
TRAMP_CASE_HANDLE(83);
TRAMP_CASE_HANDLE(84);
TRAMP_CASE_HANDLE(85);
TRAMP_CASE_HANDLE(86);
TRAMP_CASE_HANDLE(87);
TRAMP_CASE_HANDLE(88);
TRAMP_CASE_HANDLE(89);
TRAMP_CASE_HANDLE(90);
TRAMP_CASE_HANDLE(91);
TRAMP_CASE_HANDLE(92);
TRAMP_CASE_HANDLE(93);
TRAMP_CASE_HANDLE(94);
TRAMP_CASE_HANDLE(95);
TRAMP_CASE_HANDLE(96);
TRAMP_CASE_HANDLE(97);
TRAMP_CASE_HANDLE(98);
TRAMP_CASE_HANDLE(99);
TRAMP_CASE_HANDLE(100);
TRAMP_CASE_HANDLE(101);
TRAMP_CASE_HANDLE(102);
TRAMP_CASE_HANDLE(103);
TRAMP_CASE_HANDLE(104);
TRAMP_CASE_HANDLE(105);
TRAMP_CASE_HANDLE(106);
TRAMP_CASE_HANDLE(107);
TRAMP_CASE_HANDLE(108);
TRAMP_CASE_HANDLE(109);
TRAMP_CASE_HANDLE(110);
TRAMP_CASE_HANDLE(111);
TRAMP_CASE_HANDLE(112);
TRAMP_CASE_HANDLE(113);
TRAMP_CASE_HANDLE(114);
TRAMP_CASE_HANDLE(115);
TRAMP_CASE_HANDLE(116);
TRAMP_CASE_HANDLE(117);
TRAMP_CASE_HANDLE(118);
TRAMP_CASE_HANDLE(119);
TRAMP_CASE_HANDLE(120);
TRAMP_CASE_HANDLE(121);
TRAMP_CASE_HANDLE(122);
TRAMP_CASE_HANDLE(123);
TRAMP_CASE_HANDLE(124);
TRAMP_CASE_HANDLE(125);
TRAMP_CASE_HANDLE(126);
TRAMP_CASE_HANDLE(127);
TRAMP_CASE_HANDLE(128);
TRAMP_CASE_HANDLE(129);
TRAMP_CASE_HANDLE(130);
TRAMP_CASE_HANDLE(131);
TRAMP_CASE_HANDLE(132);
TRAMP_CASE_HANDLE(133);
TRAMP_CASE_HANDLE(134);
TRAMP_CASE_HANDLE(135);
TRAMP_CASE_HANDLE(136);
TRAMP_CASE_HANDLE(137);
TRAMP_CASE_HANDLE(138);
TRAMP_CASE_HANDLE(139);
TRAMP_CASE_HANDLE(140);
TRAMP_CASE_HANDLE(141);
TRAMP_CASE_HANDLE(142);
TRAMP_CASE_HANDLE(143);
TRAMP_CASE_HANDLE(144);
TRAMP_CASE_HANDLE(145);
TRAMP_CASE_HANDLE(146);
TRAMP_CASE_HANDLE(147);
TRAMP_CASE_HANDLE(148);
TRAMP_CASE_HANDLE(149);
TRAMP_CASE_HANDLE(150);
TRAMP_CASE_HANDLE(151);
TRAMP_CASE_HANDLE(152);
TRAMP_CASE_HANDLE(153);
TRAMP_CASE_HANDLE(154);
TRAMP_CASE_HANDLE(155);
TRAMP_CASE_HANDLE(156);
TRAMP_CASE_HANDLE(157);
TRAMP_CASE_HANDLE(158);
TRAMP_CASE_HANDLE(159);
TRAMP_CASE_HANDLE(160);
TRAMP_CASE_HANDLE(161);
TRAMP_CASE_HANDLE(162);
TRAMP_CASE_HANDLE(163);
TRAMP_CASE_HANDLE(164);
TRAMP_CASE_HANDLE(165);
TRAMP_CASE_HANDLE(166);
TRAMP_CASE_HANDLE(167);
TRAMP_CASE_HANDLE(168);
TRAMP_CASE_HANDLE(169);
TRAMP_CASE_HANDLE(170);
TRAMP_CASE_HANDLE(171);
TRAMP_CASE_HANDLE(172);
TRAMP_CASE_HANDLE(173);
TRAMP_CASE_HANDLE(174);
TRAMP_CASE_HANDLE(175);
TRAMP_CASE_HANDLE(176);
TRAMP_CASE_HANDLE(177);
TRAMP_CASE_HANDLE(178);
TRAMP_CASE_HANDLE(179);
TRAMP_CASE_HANDLE(180);
TRAMP_CASE_HANDLE(181);
TRAMP_CASE_HANDLE(182);
TRAMP_CASE_HANDLE(183);
TRAMP_CASE_HANDLE(184);
TRAMP_CASE_HANDLE(185);
TRAMP_CASE_HANDLE(186);
TRAMP_CASE_HANDLE(187);
TRAMP_CASE_HANDLE(188);
TRAMP_CASE_HANDLE(189);
TRAMP_CASE_HANDLE(190);
TRAMP_CASE_HANDLE(191);
TRAMP_CASE_HANDLE(192);
TRAMP_CASE_HANDLE(193);
TRAMP_CASE_HANDLE(194);
TRAMP_CASE_HANDLE(195);
TRAMP_CASE_HANDLE(196);
TRAMP_CASE_HANDLE(197);
TRAMP_CASE_HANDLE(198);
TRAMP_CASE_HANDLE(199);
TRAMP_CASE_HANDLE(200);
TRAMP_CASE_HANDLE(201);
TRAMP_CASE_HANDLE(202);
TRAMP_CASE_HANDLE(203);
TRAMP_CASE_HANDLE(204);
TRAMP_CASE_HANDLE(205);
TRAMP_CASE_HANDLE(206);
TRAMP_CASE_HANDLE(207);
TRAMP_CASE_HANDLE(208);
TRAMP_CASE_HANDLE(209);
TRAMP_CASE_HANDLE(210);
TRAMP_CASE_HANDLE(211);
TRAMP_CASE_HANDLE(212);
TRAMP_CASE_HANDLE(213);
TRAMP_CASE_HANDLE(214);
TRAMP_CASE_HANDLE(215);
TRAMP_CASE_HANDLE(216);
TRAMP_CASE_HANDLE(217);
TRAMP_CASE_HANDLE(218);
TRAMP_CASE_HANDLE(219);
TRAMP_CASE_HANDLE(220);
TRAMP_CASE_HANDLE(221);
TRAMP_CASE_HANDLE(222);
TRAMP_CASE_HANDLE(223);
TRAMP_CASE_HANDLE(224);
TRAMP_CASE_HANDLE(225);
TRAMP_CASE_HANDLE(226);
TRAMP_CASE_HANDLE(227);
TRAMP_CASE_HANDLE(228);
TRAMP_CASE_HANDLE(229);
TRAMP_CASE_HANDLE(230);
TRAMP_CASE_HANDLE(231);
TRAMP_CASE_HANDLE(232);
TRAMP_CASE_HANDLE(233);
TRAMP_CASE_HANDLE(234);
TRAMP_CASE_HANDLE(235);
TRAMP_CASE_HANDLE(236);
TRAMP_CASE_HANDLE(237);
TRAMP_CASE_HANDLE(238);
TRAMP_CASE_HANDLE(239);
TRAMP_CASE_HANDLE(240);
TRAMP_CASE_HANDLE(241);
TRAMP_CASE_HANDLE(242);
TRAMP_CASE_HANDLE(243);
TRAMP_CASE_HANDLE(244);
TRAMP_CASE_HANDLE(245);
TRAMP_CASE_HANDLE(246);
TRAMP_CASE_HANDLE(247);
TRAMP_CASE_HANDLE(248);
TRAMP_CASE_HANDLE(249);
}
return NULL;
}
void *loader_get_phys_dev_ext_termin(uint32_t index) {
switch (index) {
#define TERM_CASE_HANDLE(num) case num: return vkPhysDevExtTermin##num
TERM_CASE_HANDLE(0);
TERM_CASE_HANDLE(1);
TERM_CASE_HANDLE(2);
TERM_CASE_HANDLE(3);
TERM_CASE_HANDLE(4);
TERM_CASE_HANDLE(5);
TERM_CASE_HANDLE(6);
TERM_CASE_HANDLE(7);
TERM_CASE_HANDLE(8);
TERM_CASE_HANDLE(9);
TERM_CASE_HANDLE(10);
TERM_CASE_HANDLE(11);
TERM_CASE_HANDLE(12);
TERM_CASE_HANDLE(13);
TERM_CASE_HANDLE(14);
TERM_CASE_HANDLE(15);
TERM_CASE_HANDLE(16);
TERM_CASE_HANDLE(17);
TERM_CASE_HANDLE(18);
TERM_CASE_HANDLE(19);
TERM_CASE_HANDLE(20);
TERM_CASE_HANDLE(21);
TERM_CASE_HANDLE(22);
TERM_CASE_HANDLE(23);
TERM_CASE_HANDLE(24);
TERM_CASE_HANDLE(25);
TERM_CASE_HANDLE(26);
TERM_CASE_HANDLE(27);
TERM_CASE_HANDLE(28);
TERM_CASE_HANDLE(29);
TERM_CASE_HANDLE(30);
TERM_CASE_HANDLE(31);
TERM_CASE_HANDLE(32);
TERM_CASE_HANDLE(33);
TERM_CASE_HANDLE(34);
TERM_CASE_HANDLE(35);
TERM_CASE_HANDLE(36);
TERM_CASE_HANDLE(37);
TERM_CASE_HANDLE(38);
TERM_CASE_HANDLE(39);
TERM_CASE_HANDLE(40);
TERM_CASE_HANDLE(41);
TERM_CASE_HANDLE(42);
TERM_CASE_HANDLE(43);
TERM_CASE_HANDLE(44);
TERM_CASE_HANDLE(45);
TERM_CASE_HANDLE(46);
TERM_CASE_HANDLE(47);
TERM_CASE_HANDLE(48);
TERM_CASE_HANDLE(49);
TERM_CASE_HANDLE(50);
TERM_CASE_HANDLE(51);
TERM_CASE_HANDLE(52);
TERM_CASE_HANDLE(53);
TERM_CASE_HANDLE(54);
TERM_CASE_HANDLE(55);
TERM_CASE_HANDLE(56);
TERM_CASE_HANDLE(57);
TERM_CASE_HANDLE(58);
TERM_CASE_HANDLE(59);
TERM_CASE_HANDLE(60);
TERM_CASE_HANDLE(61);
TERM_CASE_HANDLE(62);
TERM_CASE_HANDLE(63);
TERM_CASE_HANDLE(64);
TERM_CASE_HANDLE(65);
TERM_CASE_HANDLE(66);
TERM_CASE_HANDLE(67);
TERM_CASE_HANDLE(68);
TERM_CASE_HANDLE(69);
TERM_CASE_HANDLE(70);
TERM_CASE_HANDLE(71);
TERM_CASE_HANDLE(72);
TERM_CASE_HANDLE(73);
TERM_CASE_HANDLE(74);
TERM_CASE_HANDLE(75);
TERM_CASE_HANDLE(76);
TERM_CASE_HANDLE(77);
TERM_CASE_HANDLE(78);
TERM_CASE_HANDLE(79);
TERM_CASE_HANDLE(80);
TERM_CASE_HANDLE(81);
TERM_CASE_HANDLE(82);
TERM_CASE_HANDLE(83);
TERM_CASE_HANDLE(84);
TERM_CASE_HANDLE(85);
TERM_CASE_HANDLE(86);
TERM_CASE_HANDLE(87);
TERM_CASE_HANDLE(88);
TERM_CASE_HANDLE(89);
TERM_CASE_HANDLE(90);
TERM_CASE_HANDLE(91);
TERM_CASE_HANDLE(92);
TERM_CASE_HANDLE(93);
TERM_CASE_HANDLE(94);
TERM_CASE_HANDLE(95);
TERM_CASE_HANDLE(96);
TERM_CASE_HANDLE(97);
TERM_CASE_HANDLE(98);
TERM_CASE_HANDLE(99);
TERM_CASE_HANDLE(100);
TERM_CASE_HANDLE(101);
TERM_CASE_HANDLE(102);
TERM_CASE_HANDLE(103);
TERM_CASE_HANDLE(104);
TERM_CASE_HANDLE(105);
TERM_CASE_HANDLE(106);
TERM_CASE_HANDLE(107);
TERM_CASE_HANDLE(108);
TERM_CASE_HANDLE(109);
TERM_CASE_HANDLE(110);
TERM_CASE_HANDLE(111);
TERM_CASE_HANDLE(112);
TERM_CASE_HANDLE(113);
TERM_CASE_HANDLE(114);
TERM_CASE_HANDLE(115);
TERM_CASE_HANDLE(116);
TERM_CASE_HANDLE(117);
TERM_CASE_HANDLE(118);
TERM_CASE_HANDLE(119);
TERM_CASE_HANDLE(120);
TERM_CASE_HANDLE(121);
TERM_CASE_HANDLE(122);
TERM_CASE_HANDLE(123);
TERM_CASE_HANDLE(124);
TERM_CASE_HANDLE(125);
TERM_CASE_HANDLE(126);
TERM_CASE_HANDLE(127);
TERM_CASE_HANDLE(128);
TERM_CASE_HANDLE(129);
TERM_CASE_HANDLE(130);
TERM_CASE_HANDLE(131);
TERM_CASE_HANDLE(132);
TERM_CASE_HANDLE(133);
TERM_CASE_HANDLE(134);
TERM_CASE_HANDLE(135);
TERM_CASE_HANDLE(136);
TERM_CASE_HANDLE(137);
TERM_CASE_HANDLE(138);
TERM_CASE_HANDLE(139);
TERM_CASE_HANDLE(140);
TERM_CASE_HANDLE(141);
TERM_CASE_HANDLE(142);
TERM_CASE_HANDLE(143);
TERM_CASE_HANDLE(144);
TERM_CASE_HANDLE(145);
TERM_CASE_HANDLE(146);
TERM_CASE_HANDLE(147);
TERM_CASE_HANDLE(148);
TERM_CASE_HANDLE(149);
TERM_CASE_HANDLE(150);
TERM_CASE_HANDLE(151);
TERM_CASE_HANDLE(152);
TERM_CASE_HANDLE(153);
TERM_CASE_HANDLE(154);
TERM_CASE_HANDLE(155);
TERM_CASE_HANDLE(156);
TERM_CASE_HANDLE(157);
TERM_CASE_HANDLE(158);
TERM_CASE_HANDLE(159);
TERM_CASE_HANDLE(160);
TERM_CASE_HANDLE(161);
TERM_CASE_HANDLE(162);
TERM_CASE_HANDLE(163);
TERM_CASE_HANDLE(164);
TERM_CASE_HANDLE(165);
TERM_CASE_HANDLE(166);
TERM_CASE_HANDLE(167);
TERM_CASE_HANDLE(168);
TERM_CASE_HANDLE(169);
TERM_CASE_HANDLE(170);
TERM_CASE_HANDLE(171);
TERM_CASE_HANDLE(172);
TERM_CASE_HANDLE(173);
TERM_CASE_HANDLE(174);
TERM_CASE_HANDLE(175);
TERM_CASE_HANDLE(176);
TERM_CASE_HANDLE(177);
TERM_CASE_HANDLE(178);
TERM_CASE_HANDLE(179);
TERM_CASE_HANDLE(180);
TERM_CASE_HANDLE(181);
TERM_CASE_HANDLE(182);
TERM_CASE_HANDLE(183);
TERM_CASE_HANDLE(184);
TERM_CASE_HANDLE(185);
TERM_CASE_HANDLE(186);
TERM_CASE_HANDLE(187);
TERM_CASE_HANDLE(188);
TERM_CASE_HANDLE(189);
TERM_CASE_HANDLE(190);
TERM_CASE_HANDLE(191);
TERM_CASE_HANDLE(192);
TERM_CASE_HANDLE(193);
TERM_CASE_HANDLE(194);
TERM_CASE_HANDLE(195);
TERM_CASE_HANDLE(196);
TERM_CASE_HANDLE(197);
TERM_CASE_HANDLE(198);
TERM_CASE_HANDLE(199);
TERM_CASE_HANDLE(200);
TERM_CASE_HANDLE(201);
TERM_CASE_HANDLE(202);
TERM_CASE_HANDLE(203);
TERM_CASE_HANDLE(204);
TERM_CASE_HANDLE(205);
TERM_CASE_HANDLE(206);
TERM_CASE_HANDLE(207);
TERM_CASE_HANDLE(208);
TERM_CASE_HANDLE(209);
TERM_CASE_HANDLE(210);
TERM_CASE_HANDLE(211);
TERM_CASE_HANDLE(212);
TERM_CASE_HANDLE(213);
TERM_CASE_HANDLE(214);
TERM_CASE_HANDLE(215);
TERM_CASE_HANDLE(216);
TERM_CASE_HANDLE(217);
TERM_CASE_HANDLE(218);
TERM_CASE_HANDLE(219);
TERM_CASE_HANDLE(220);
TERM_CASE_HANDLE(221);
TERM_CASE_HANDLE(222);
TERM_CASE_HANDLE(223);
TERM_CASE_HANDLE(224);
TERM_CASE_HANDLE(225);
TERM_CASE_HANDLE(226);
TERM_CASE_HANDLE(227);
TERM_CASE_HANDLE(228);
TERM_CASE_HANDLE(229);
TERM_CASE_HANDLE(230);
TERM_CASE_HANDLE(231);
TERM_CASE_HANDLE(232);
TERM_CASE_HANDLE(233);
TERM_CASE_HANDLE(234);
TERM_CASE_HANDLE(235);
TERM_CASE_HANDLE(236);
TERM_CASE_HANDLE(237);
TERM_CASE_HANDLE(238);
TERM_CASE_HANDLE(239);
TERM_CASE_HANDLE(240);
TERM_CASE_HANDLE(241);
TERM_CASE_HANDLE(242);
TERM_CASE_HANDLE(243);
TERM_CASE_HANDLE(244);
TERM_CASE_HANDLE(245);
TERM_CASE_HANDLE(246);
TERM_CASE_HANDLE(247);
TERM_CASE_HANDLE(248);
TERM_CASE_HANDLE(249);
}
return NULL;
}

View File

@ -29,7 +29,7 @@
#include "loader.h"
#include "vk_loader_platform.h"
static VkResult vkDevExtError(VkDevice dev) {
static VkResult VKAPI_CALL vkDevExtError(VkDevice dev) {
struct loader_device *found_dev;
// The device going in is a trampoline device
struct loader_icd_term *icd_term =
@ -46,7 +46,7 @@ static inline void
loader_init_device_dispatch_table(struct loader_dev_dispatch_table *dev_table,
PFN_vkGetDeviceProcAddr gpa, VkDevice dev) {
VkLayerDispatchTable *table = &dev_table->core_dispatch;
for (uint32_t i = 0; i < MAX_NUM_DEV_EXTS; i++)
for (uint32_t i = 0; i < MAX_NUM_UNKNOWN_EXTS; i++)
dev_table->ext_dispatch.dev_ext[i] = (PFN_vkDevExt)vkDevExtError;
table->GetDeviceProcAddr =
@ -269,27 +269,70 @@ static inline void loader_init_device_extension_dispatch_table(
(PFN_vkGetSwapchainImagesKHR)gpa(dev, "vkGetSwapchainImagesKHR");
table->QueuePresentKHR =
(PFN_vkQueuePresentKHR)gpa(dev, "vkQueuePresentKHR");
table->CmdDrawIndirectCountAMD =
(PFN_vkCmdDrawIndirectCountAMD)gpa(dev, "vkCmdDrawIndirectCountAMD");
table->CmdDrawIndexedIndirectCountAMD =
(PFN_vkCmdDrawIndexedIndirectCountAMD)gpa(
dev, "vkCmdDrawIndexedIndirectCountAMD");
#ifdef VK_USE_PLATFORM_WIN32_KHR
table->GetMemoryWin32HandleNV =
(PFN_vkGetMemoryWin32HandleNV)gpa(dev, "vkGetMemoryWin32HandleNV");
#endif // VK_USE_PLATFORM_WIN32_KHR
table->CreateSharedSwapchainsKHR =
(PFN_vkCreateSharedSwapchainsKHR)gpa(dev, "vkCreateSharedSwapchainsKHR");
table->DebugMarkerSetObjectTagEXT =
(PFN_vkDebugMarkerSetObjectTagEXT)gpa(dev, "vkDebugMarkerSetObjectTagEXT");
table->DebugMarkerSetObjectNameEXT =
(PFN_vkDebugMarkerSetObjectNameEXT)gpa(dev, "vkDebugMarkerSetObjectNameEXT");
// KHR_display_swapchain
table->CreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)gpa(
dev, "vkCreateSharedSwapchainsKHR");
// KHR_maintenance1
table->TrimCommandPoolKHR =
(PFN_vkTrimCommandPoolKHR)gpa(dev, "vkTrimCommandPoolKHR");
// EXT_display_control
table->DisplayPowerControlEXT =
(PFN_vkDisplayPowerControlEXT)gpa(dev, "vkDisplayPowerControlEXT");
table->RegisterDeviceEventEXT =
(PFN_vkRegisterDeviceEventEXT)gpa(dev, "vkRegisterDeviceEventEXT");
table->RegisterDisplayEventEXT =
(PFN_vkRegisterDisplayEventEXT)gpa(dev, "vkRegisterDisplayEventEXT");
table->GetSwapchainCounterEXT =
(PFN_vkGetSwapchainCounterEXT)gpa(dev, "vkGetSwapchainCounterEXT");
// EXT_debug_marker
table->DebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)gpa(
dev, "vkDebugMarkerSetObjectTagEXT");
table->DebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)gpa(
dev, "vkDebugMarkerSetObjectNameEXT");
table->CmdDebugMarkerBeginEXT =
(PFN_vkCmdDebugMarkerBeginEXT)gpa(dev, "vkCmdDebugMarkerBeginEXT");
table->CmdDebugMarkerEndEXT =
(PFN_vkCmdDebugMarkerEndEXT)gpa(dev, "vkCmdDebugMarkerEndEXT");
table->CmdDebugMarkerInsertEXT =
(PFN_vkCmdDebugMarkerInsertEXT)gpa(dev, "vkCmdDebugMarkerInsertEXT");
// AMD_draw_indirect_count
table->CmdDrawIndirectCountAMD =
(PFN_vkCmdDrawIndirectCountAMD)gpa(dev, "vkCmdDrawIndirectCountAMD");
table->CmdDrawIndexedIndirectCountAMD =
(PFN_vkCmdDrawIndexedIndirectCountAMD)gpa(
dev, "vkCmdDrawIndexedIndirectCountAMD");
#ifdef VK_USE_PLATFORM_WIN32_KHR
// NV_external_memory_win32
table->GetMemoryWin32HandleNV =
(PFN_vkGetMemoryWin32HandleNV)gpa(dev, "vkGetMemoryWin32HandleNV");
#endif
// NVX_device_generated_commands
table->CmdProcessCommandsNVX =
(PFN_vkCmdProcessCommandsNVX)gpa(dev, "vkCmdProcessCommandsNVX");
table->CmdReserveSpaceForCommandsNVX =
(PFN_vkCmdReserveSpaceForCommandsNVX)gpa(
dev, "vkCmdReserveSpaceForCommandsNVX");
table->CreateIndirectCommandsLayoutNVX =
(PFN_vkCreateIndirectCommandsLayoutNVX)gpa(
dev, "vkCreateIndirectCommandsLayoutNVX");
table->DestroyIndirectCommandsLayoutNVX =
(PFN_vkDestroyIndirectCommandsLayoutNVX)gpa(
dev, "vkDestroyIndirectCommandsLayoutNVX");
table->CreateObjectTableNVX =
(PFN_vkCreateObjectTableNVX)gpa(dev, "vkCreateObjectTableNVX");
table->DestroyObjectTableNVX =
(PFN_vkDestroyObjectTableNVX)gpa(dev, "vkDestroyObjectTableNVX");
table->RegisterObjectsNVX =
(PFN_vkRegisterObjectsNVX)gpa(dev, "vkRegisterObjectsNVX");
table->UnregisterObjectsNVX =
(PFN_vkUnregisterObjectsNVX)gpa(dev, "vkUnregisterObjectsNVX");
}
static inline void *
@ -541,7 +584,6 @@ loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table,
return (void *)table->CmdEndRenderPass;
if (!strcmp(name, "CmdExecuteCommands"))
return (void *)table->CmdExecuteCommands;
if (!strcmp(name, "DestroySwapchainKHR"))
return (void *)table->DestroySwapchainKHR;
if (!strcmp(name, "GetSwapchainImagesKHR"))
@ -559,6 +601,8 @@ loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table,
// object before passing the appropriate info along to the ICD.
if (!strcmp(name, "CreateSwapchainKHR")) {
return (void *)vkCreateSwapchainKHR;
} else if (!strcmp(name, "CreateSharedSwapchainsKHR")) {
return (void *)vkCreateSharedSwapchainsKHR;
} else if (!strcmp(name, "DebugMarkerSetObjectTagEXT")) {
return (void *)vkDebugMarkerSetObjectTagEXT;
} else if (!strcmp(name, "DebugMarkerSetObjectNameEXT")) {
@ -608,16 +652,9 @@ loader_init_instance_core_dispatch_table(VkLayerInstanceDispatchTable *table,
static inline void loader_init_instance_extension_dispatch_table(
VkLayerInstanceDispatchTable *table, PFN_vkGetInstanceProcAddr gpa,
VkInstance inst) {
// WSI extensions
table->DestroySurfaceKHR =
(PFN_vkDestroySurfaceKHR)gpa(inst, "vkDestroySurfaceKHR");
table->CreateDebugReportCallbackEXT =
(PFN_vkCreateDebugReportCallbackEXT)gpa(
inst, "vkCreateDebugReportCallbackEXT");
table->DestroyDebugReportCallbackEXT =
(PFN_vkDestroyDebugReportCallbackEXT)gpa(
inst, "vkDestroyDebugReportCallbackEXT");
table->DebugReportMessageEXT =
(PFN_vkDebugReportMessageEXT)gpa(inst, "vkDebugReportMessageEXT");
table->GetPhysicalDeviceSurfaceSupportKHR =
(PFN_vkGetPhysicalDeviceSurfaceSupportKHR)gpa(
inst, "vkGetPhysicalDeviceSurfaceSupportKHR");
@ -630,9 +667,6 @@ static inline void loader_init_instance_extension_dispatch_table(
table->GetPhysicalDeviceSurfacePresentModesKHR =
(PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)gpa(
inst, "vkGetPhysicalDeviceSurfacePresentModesKHR");
table->GetPhysicalDeviceExternalImageFormatPropertiesNV =
(PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)gpa(
inst, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV");
#ifdef VK_USE_PLATFORM_MIR_KHR
table->CreateMirSurfaceKHR =
(PFN_vkCreateMirSurfaceKHR)gpa(inst, "vkCreateMirSurfaceKHR");
@ -687,6 +721,124 @@ static inline void loader_init_instance_extension_dispatch_table(
table->CreateDisplayPlaneSurfaceKHR =
(PFN_vkCreateDisplayPlaneSurfaceKHR)gpa(
inst, "vkCreateDisplayPlaneSurfaceKHR");
// KHR_get_physical_device_properties2
table->GetPhysicalDeviceFeatures2KHR =
(PFN_vkGetPhysicalDeviceFeatures2KHR)gpa(
inst, "vkGetPhysicalDeviceFeatures2KHR");
table->GetPhysicalDeviceProperties2KHR =
(PFN_vkGetPhysicalDeviceProperties2KHR)gpa(
inst, "vkGetPhysicalDeviceProperties2KHR");
table->GetPhysicalDeviceFormatProperties2KHR =
(PFN_vkGetPhysicalDeviceFormatProperties2KHR)gpa(
inst, "vkGetPhysicalDeviceFormatProperties2KHR");
table->GetPhysicalDeviceImageFormatProperties2KHR =
(PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)gpa(
inst, "vkGetPhysicalDeviceImageFormatProperties2KHR");
table->GetPhysicalDeviceQueueFamilyProperties2KHR =
(PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)gpa(
inst, "vkGetPhysicalDeviceQueueFamilyProperties2KHR");
table->GetPhysicalDeviceMemoryProperties2KHR =
(PFN_vkGetPhysicalDeviceMemoryProperties2KHR)gpa(
inst, "vkGetPhysicalDeviceMemoryProperties2KHR");
table->GetPhysicalDeviceSparseImageFormatProperties2KHR =
(PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)gpa(
inst, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
// EXT_acquire_xlib_display
table->AcquireXlibDisplayEXT =
(PFN_vkAcquireXlibDisplayEXT)gpa(inst, "vkAcquireXlibDisplayEXT");
table->GetRandROutputDisplayEXT =
(PFN_vkGetRandROutputDisplayEXT)gpa(inst, "vkGetRandROutputDisplayEXT");
#endif
// EXT_debug_report
table->CreateDebugReportCallbackEXT =
(PFN_vkCreateDebugReportCallbackEXT)gpa(
inst, "vkCreateDebugReportCallbackEXT");
table->DestroyDebugReportCallbackEXT =
(PFN_vkDestroyDebugReportCallbackEXT)gpa(
inst, "vkDestroyDebugReportCallbackEXT");
table->DebugReportMessageEXT =
(PFN_vkDebugReportMessageEXT)gpa(inst, "vkDebugReportMessageEXT");
// EXT_direct_mode_display
table->ReleaseDisplayEXT =
(PFN_vkReleaseDisplayEXT)gpa(inst, "vkReleaseDisplayEXT");
// EXT_display_surface_counter
table->GetPhysicalDeviceSurfaceCapabilities2EXT =
(PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)gpa(
inst, "vkGetPhysicalDeviceSurfaceCapabilities2EXT");
// NV_external_memory_capabilities
table->GetPhysicalDeviceExternalImageFormatPropertiesNV =
(PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)gpa(
inst, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV");
// NVX_device_generated_commands (physical device command)
table->GetPhysicalDeviceGeneratedCommandsPropertiesNVX =
(PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX)gpa(
inst, "vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX");
}
static inline void *loader_lookup_instance_extension_dispatch_table(
const VkLayerInstanceDispatchTable *table, const char *name,
bool *found_name) {
*found_name = true;
// KHR_get_physical_device_properties2
if (!strcmp(name, "GetPhysicalDeviceFeatures2KHR"))
return (void *)table->GetPhysicalDeviceFeatures2KHR;
if (!strcmp(name, "GetPhysicalDeviceProperties2KHR"))
return (void *)table->GetPhysicalDeviceProperties2KHR;
if (!strcmp(name, "GetPhysicalDeviceFormatProperties2KHR"))
return (void *)table->GetPhysicalDeviceFormatProperties2KHR;
if (!strcmp(name, "GetPhysicalDeviceImageFormatProperties2KHR"))
return (void *)table->GetPhysicalDeviceImageFormatProperties2KHR;
if (!strcmp(name, "GetPhysicalDeviceQueueFamilyProperties2KHR"))
return (void *)table->GetPhysicalDeviceQueueFamilyProperties2KHR;
if (!strcmp(name, "GetPhysicalDeviceMemoryProperties2KHR"))
return (void *)table->GetPhysicalDeviceMemoryProperties2KHR;
if (!strcmp(name, "GetPhysicalDeviceSparseImageFormatProperties2KHR"))
return (void *)table->GetPhysicalDeviceSparseImageFormatProperties2KHR;
// EXT_acquire_xlib_display
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
if (!strcmp(name, "AcquireXlibDisplayEXT"))
return (void *)table->AcquireXlibDisplayEXT;
if (!strcmp(name, "GetRandROutputDisplayEXT"))
return (void *)table->GetRandROutputDisplayEXT;
#endif
// EXT_debug_report
if (!strcmp(name, "CreateDebugReportCallbackEXT"))
return (void *)table->CreateDebugReportCallbackEXT;
if (!strcmp(name, "DestroyDebugReportCallbackEXT"))
return (void *)table->DestroyDebugReportCallbackEXT;
if (!strcmp(name, "DebugReportMessageEXT"))
return (void *)table->DebugReportMessageEXT;
// EXT_direct_mode_display
if (!strcmp(name, "ReleaseDisplayEXT"))
return (void *)table->ReleaseDisplayEXT;
// EXT_display_surface_counter
if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilities2EXT"))
return (void *)table->GetPhysicalDeviceSurfaceCapabilities2EXT;
// NV_external_memory_capabilities
if (!strcmp(name, "GetPhysicalDeviceExternalImageFormatPropertiesNV"))
return (void *)table->GetPhysicalDeviceExternalImageFormatPropertiesNV;
// NVX_device_generated_commands
if (!strcmp(name, "GetPhysicalDeviceGeneratedCommandsPropertiesNVX"))
return (void *)table->GetPhysicalDeviceGeneratedCommandsPropertiesNVX;
*found_name = false;
return NULL;
}
static inline void *
@ -733,8 +885,6 @@ loader_lookup_instance_dispatch_table(const VkLayerInstanceDispatchTable *table,
return (void *)table->GetPhysicalDeviceSurfaceFormatsKHR;
if (!strcmp(name, "GetPhysicalDeviceSurfacePresentModesKHR"))
return (void *)table->GetPhysicalDeviceSurfacePresentModesKHR;
if (!strcmp(name, "GetPhysicalDeviceExternalImageFormatPropertiesNV"))
return (void *)table->GetPhysicalDeviceExternalImageFormatPropertiesNV;
#ifdef VK_USE_PLATFORM_MIR_KHR
if (!strcmp(name, "CreateMirSurfaceKHR"))
return (void *)table->CreateMirSurfaceKHR;
@ -780,13 +930,6 @@ loader_lookup_instance_dispatch_table(const VkLayerInstanceDispatchTable *table,
if (!strcmp(name, "CreateDisplayPlaneSurfaceKHR"))
return (void *)table->CreateDisplayPlaneSurfaceKHR;
if (!strcmp(name, "CreateDebugReportCallbackEXT"))
return (void *)table->CreateDebugReportCallbackEXT;
if (!strcmp(name, "DestroyDebugReportCallbackEXT"))
return (void *)table->DestroyDebugReportCallbackEXT;
if (!strcmp(name, "DebugReportMessageEXT"))
return (void *)table->DebugReportMessageEXT;
*found_name = false;
return NULL;
return loader_lookup_instance_extension_dispatch_table(table, name,
found_name);
}

View File

@ -68,8 +68,7 @@ vkGetInstanceProcAddr(VkInstance instance, const char *pName) {
// extensions.
// Device extensions are returned if a layer or ICD supports the extension.
// Instance extensions are returned if the extension is enabled and the
// loader
// or someone else supports the extension
// loader or someone else supports the extension
return trampolineGetProcAddr(ptr_instance, pName);
}
@ -222,6 +221,7 @@ vkEnumerateInstanceExtensionProperties(const char *pLayerName,
}
out:
loader_destroy_generic_list(NULL,
(struct loader_generic_list *)&local_ext_list);
loader_delete_layer_properties(NULL, &instance_layers);
@ -387,6 +387,9 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
ptr_instance, sizeof(VkLayerInstanceDispatchTable),
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
if (ptr_instance->disp == NULL) {
loader_log(ptr_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"vkCreateInstance: Failed to allocate Instance dispatch"
" table.");
res = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
}
@ -406,6 +409,8 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
&created_instance);
if (res == VK_SUCCESS) {
memset(ptr_instance->enabled_known_extensions.padding, 0, sizeof(uint64_t) * 4);
wsi_create_instance(ptr_instance, &ici);
debug_report_create_instance(ptr_instance, &ici);
extensions_create_instance(ptr_instance, &ici);
@ -481,7 +486,7 @@ LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(
return;
}
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
loader_platform_thread_lock_mutex(&loader_lock);
@ -505,9 +510,15 @@ LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(
loader_deactivate_layers(ptr_instance, NULL,
&ptr_instance->activated_layer_list);
if (ptr_instance->phys_devs_tramp) {
for (uint32_t i = 0; i < ptr_instance->phys_dev_count_tramp; i++) {
loader_instance_heap_free(ptr_instance,
ptr_instance->phys_devs_tramp[i]);
}
loader_instance_heap_free(ptr_instance, ptr_instance->phys_devs_tramp);
}
if (callback_setup) {
util_DestroyDebugReportCallbacks(ptr_instance, pAllocator,
ptr_instance->num_tmp_callbacks,
@ -525,57 +536,59 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount,
VkPhysicalDevice *pPhysicalDevices) {
const VkLayerInstanceDispatchTable *disp;
VkResult res;
VkResult res = VK_SUCCESS;
uint32_t count, i;
struct loader_instance *inst;
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
loader_platform_thread_lock_mutex(&loader_lock);
res = disp->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount,
pPhysicalDevices);
if (res != VK_SUCCESS && res != VK_INCOMPLETE) {
loader_platform_thread_unlock_mutex(&loader_lock);
return res;
}
if (!pPhysicalDevices) {
loader_platform_thread_unlock_mutex(&loader_lock);
return res;
}
// wrap the PhysDev object for loader usage, return wrapped objects
inst = loader_get_instance(instance);
if (!inst) {
loader_platform_thread_unlock_mutex(&loader_lock);
return VK_ERROR_INITIALIZATION_FAILED;
if (NULL == inst) {
res = VK_ERROR_INITIALIZATION_FAILED;
goto out;
}
count = (inst->total_gpu_count < *pPhysicalDeviceCount)
? inst->total_gpu_count
: *pPhysicalDeviceCount;
*pPhysicalDeviceCount = count;
if (NULL == inst->phys_devs_tramp) {
inst->phys_devs_tramp =
(struct loader_physical_device_tramp *)loader_instance_heap_alloc(
inst, inst->total_gpu_count *
sizeof(struct loader_physical_device_tramp),
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
if (pPhysicalDevices == NULL) {
// Call down. At the lower levels, this will setup the terminator
// structures in the loader.
res = disp->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount,
pPhysicalDevices);
if (VK_SUCCESS != res) {
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"vkEnumeratePhysicalDevices: Failed in dispatch call"
" used to determine number of available GPUs");
}
// Goto out, even on success since we don't need to fill in the rest.
goto out;
}
if (NULL == inst->phys_devs_tramp) {
loader_platform_thread_unlock_mutex(&loader_lock);
return VK_ERROR_OUT_OF_HOST_MEMORY;
VkResult setup_res = setupLoaderTrampPhysDevs(instance);
if (setup_res != VK_SUCCESS && setup_res != VK_INCOMPLETE) {
res = setup_res;
goto out;
}
// Wrap the PhysDev object for loader usage, return wrapped objects
if (inst->total_gpu_count > *pPhysicalDeviceCount) {
loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0,
"vkEnumeratePhysicalDevices: Trimming device count down"
" by application request from %d to %d physical devices",
inst->total_gpu_count, *pPhysicalDeviceCount);
count = *pPhysicalDeviceCount;
res = VK_INCOMPLETE;
} else {
count = inst->total_gpu_count;
*pPhysicalDeviceCount = count;
}
for (i = 0; i < count; i++) {
// initialize the loader's physicalDevice object
loader_set_dispatch((void *)&inst->phys_devs_tramp[i], inst->disp);
inst->phys_devs_tramp[i].this_instance = inst;
inst->phys_devs_tramp[i].phys_dev = pPhysicalDevices[i];
// copy wrapped object into Application provided array
pPhysicalDevices[i] = (VkPhysicalDevice)&inst->phys_devs_tramp[i];
pPhysicalDevices[i] = (VkPhysicalDevice)inst->phys_devs_tramp[i];
}
out:
loader_platform_thread_unlock_mutex(&loader_lock);
return res;
}
@ -585,7 +598,7 @@ LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures(
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceFeatures(unwrapped_phys_dev, pFeatures);
}
@ -595,7 +608,7 @@ LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_pd =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceFormatProperties(unwrapped_pd, format, pFormatInfo);
}
@ -607,7 +620,7 @@ vkGetPhysicalDeviceImageFormatProperties(
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
return disp->GetPhysicalDeviceImageFormatProperties(
unwrapped_phys_dev, format, type, tiling, usage, flags,
pImageFormatProperties);
@ -618,7 +631,7 @@ LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceProperties(unwrapped_phys_dev, pProperties);
}
@ -629,7 +642,7 @@ vkGetPhysicalDeviceQueueFamilyProperties(
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceQueueFamilyProperties(
unwrapped_phys_dev, pQueueFamilyPropertyCount, pQueueProperties);
}
@ -640,7 +653,7 @@ LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceMemoryProperties(unwrapped_phys_dev,
pMemoryProperties);
}
@ -667,13 +680,17 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
loader_init_generic_list(inst, (struct loader_generic_list *)&icd_exts,
sizeof(VkExtensionProperties));
if (VK_SUCCESS != res) {
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"vkCreateDevice: Failed to create ICD extension list");
goto out;
}
res = loader_add_device_extensions(
inst, inst->disp->EnumerateDeviceExtensionProperties,
inst, inst->disp->layer_inst_disp.EnumerateDeviceExtensionProperties,
phys_dev->phys_dev, "Unknown", &icd_exts);
if (res != VK_SUCCESS) {
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"vkCreateDevice: Failed to add extensions to list");
goto out;
}
@ -681,6 +698,8 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
res = loader_validate_device_extensions(
phys_dev, &inst->activated_layer_list, &icd_exts, pCreateInfo);
if (res != VK_SUCCESS) {
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"vkCreateDevice: Failed to validate extensions in list");
goto out;
}
@ -697,6 +716,10 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
loader_device_heap_alloc(dev, inst->activated_layer_list.capacity,
VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
if (dev->activated_layer_list.list == NULL) {
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"vkCreateDevice: Failed to allocate activated layer"
"list of size %d.",
inst->activated_layer_list.capacity);
res = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
}
@ -707,6 +730,8 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
res = loader_create_device_chain(phys_dev, pCreateInfo, pAllocator, inst,
dev);
if (res != VK_SUCCESS) {
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"vkCreateDevice: Failed to create device chain.");
goto out;
}
@ -780,7 +805,7 @@ vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
if (pLayerName == NULL || strlen(pLayerName) == 0) {
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
res = disp->EnumerateDeviceExtensionProperties(
phys_dev->phys_dev, NULL, pPropertyCount, pProperties);
} else {
@ -897,8 +922,14 @@ vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice,
sizeof(struct loader_layer_properties);
enabled_layers->list = loader_instance_heap_alloc(inst, enabled_layers->capacity,
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
if (!enabled_layers->list)
if (!enabled_layers->list) {
loader_log(
inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
"vkEnumerateDeviceLayerProperties: Failed to allocate enabled"
"layer list of size %d",
enabled_layers->capacity);
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
uint32_t j = 0;
for (uint32_t i = 0; i < inst->activated_layer_list.count; j++) {
@ -1120,7 +1151,7 @@ vkGetPhysicalDeviceSparseImageFormatProperties(
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
disp->GetPhysicalDeviceSparseImageFormatProperties(
unwrapped_phys_dev, format, type, samples, usage, tiling,

View File

@ -47,7 +47,7 @@
#include <libgen.h>
// VK Library Filenames, Paths, etc.:
#define PATH_SEPERATOR ':'
#define PATH_SEPARATOR ':'
#define DIRECTORY_SYMBOL '/'
#define VULKAN_DIR "/vulkan/"
@ -100,7 +100,9 @@
EXTRA_ILAYERS_DATADIR_INFO
#define DEFAULT_VK_DRIVERS_PATH ""
#if !defined(DEFAULT_VK_LAYERS_PATH)
#define DEFAULT_VK_LAYERS_PATH ""
#endif
#if !defined(LAYERS_SOURCE_PATH)
#define LAYERS_SOURCE_PATH NULL
@ -232,11 +234,10 @@ loader_platform_thread_cond_broadcast(loader_platform_thread_cond *pCond) {
#ifdef __cplusplus
#include <iostream>
#include <string>
using namespace std;
#endif // __cplusplus
// VK Library Filenames, Paths, etc.:
#define PATH_SEPERATOR ';'
#define PATH_SEPARATOR ';'
#define DIRECTORY_SYMBOL '\\'
#define DEFAULT_VK_REGISTRY_HIVE HKEY_LOCAL_MACHINE
#define DEFAULT_VK_DRIVERS_INFO "SOFTWARE\\Khronos\\" API_NAME "\\Drivers"
@ -320,7 +321,8 @@ loader_platform_open_library(const char *libPath) {
}
static char *loader_platform_open_library_error(const char *libPath) {
static char errorMsg[164];
snprintf(errorMsg, 163, "Failed to open dynamic library \"%s\"", libPath);
(void)snprintf(errorMsg, 163, "Failed to open dynamic library \"%s\"",
libPath);
return errorMsg;
}
static void loader_platform_close_library(loader_platform_dl_handle library) {
@ -334,8 +336,8 @@ static void *loader_platform_get_proc_address(loader_platform_dl_handle library,
}
static char *loader_platform_get_proc_address_error(const char *name) {
static char errorMsg[120];
snprintf(errorMsg, 119, "Failed to find function \"%s\" in dynamic library",
name);
(void)snprintf(errorMsg, 119,
"Failed to find function \"%s\" in dynamic library", name);
return errorMsg;
}

View File

@ -152,7 +152,7 @@ LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL
vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
const VkAllocationCallbacks *pAllocator) {
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
disp->DestroySurfaceKHR(instance, surface, pAllocator);
}
@ -173,22 +173,19 @@ terminator_DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
if (icd_term->scanned_icd->interface_version >=
ICD_VER_SUPPORTS_ICD_SURFACE_KHR) {
if (NULL != icd_term->DestroySurfaceKHR &&
NULL !=
(void *)(uintptr_t)
icd_surface->real_icd_surfaces[i]) {
(VkSurfaceKHR)NULL !=
icd_surface->real_icd_surfaces[i]) {
icd_term->DestroySurfaceKHR(
icd_term->instance,
icd_surface->real_icd_surfaces[i], pAllocator);
icd_surface->real_icd_surfaces[i] =
(VkSurfaceKHR)(uintptr_t)NULL;
icd_surface->real_icd_surfaces[i] = (VkSurfaceKHR)NULL;
}
} else {
// The real_icd_surface for any ICD not supporting the
// proper interface version should be NULL. If not, then
// we have a problem.
assert(
NULL ==
(void *)(uintptr_t)icd_surface->real_icd_surfaces[i]);
assert((VkSurfaceKHR)NULL ==
icd_surface->real_icd_surfaces[i]);
}
}
loader_instance_heap_free(ptr_instance,
@ -208,7 +205,7 @@ vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice,
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->GetPhysicalDeviceSurfaceSupportKHR(
unwrapped_phys_dev, queueFamilyIndex, surface, pSupported);
return res;
@ -243,9 +240,8 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSurfaceSupportKHR(
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)surface;
if (NULL != icd_surface->real_icd_surfaces &&
NULL !=
(void *)(uintptr_t)
icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
(VkSurfaceKHR)NULL !=
icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
return icd_term->GetPhysicalDeviceSurfaceSupportKHR(
phys_dev_term->phys_dev, queueFamilyIndex,
icd_surface->real_icd_surfaces[phys_dev_term->icd_index],
@ -265,7 +261,7 @@ vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
const VkLayerInstanceDispatchTable *disp;
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->GetPhysicalDeviceSurfaceCapabilitiesKHR(
unwrapped_phys_dev, surface, pSurfaceCapabilities);
return res;
@ -300,9 +296,8 @@ terminator_GetPhysicalDeviceSurfaceCapabilitiesKHR(
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)surface;
if (NULL != icd_surface->real_icd_surfaces &&
NULL !=
(void *)(uintptr_t)
icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
(VkSurfaceKHR)NULL !=
icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
return icd_term->GetPhysicalDeviceSurfaceCapabilitiesKHR(
phys_dev_term->phys_dev,
icd_surface->real_icd_surfaces[phys_dev_term->icd_index],
@ -322,7 +317,7 @@ vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice,
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->GetPhysicalDeviceSurfaceFormatsKHR(
unwrapped_phys_dev, surface, pSurfaceFormatCount, pSurfaceFormats);
return res;
@ -357,9 +352,8 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSurfaceFormatsKHR(
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)surface;
if (NULL != icd_surface->real_icd_surfaces &&
NULL !=
(void *)(uintptr_t)
icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
(VkSurfaceKHR)NULL !=
icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
return icd_term->GetPhysicalDeviceSurfaceFormatsKHR(
phys_dev_term->phys_dev,
icd_surface->real_icd_surfaces[phys_dev_term->icd_index],
@ -379,7 +373,7 @@ vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice,
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->GetPhysicalDeviceSurfacePresentModesKHR(
unwrapped_phys_dev, surface, pPresentModeCount, pPresentModes);
return res;
@ -414,9 +408,8 @@ terminator_GetPhysicalDeviceSurfacePresentModesKHR(
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)surface;
if (NULL != icd_surface->real_icd_surfaces &&
NULL !=
(void *)(uintptr_t)
icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
(VkSurfaceKHR)NULL !=
icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
return icd_term->GetPhysicalDeviceSurfacePresentModesKHR(
phys_dev_term->phys_dev,
icd_surface->real_icd_surfaces[phys_dev_term->icd_index],
@ -450,8 +443,8 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_vkCreateSwapchainKHR(
VkIcdSurface *icd_surface =
(VkIcdSurface *)(uintptr_t)pCreateInfo->surface;
if (NULL != icd_surface->real_icd_surfaces) {
if (NULL !=
(void *)(uintptr_t)icd_surface->real_icd_surfaces[icd_index]) {
if ((VkSurfaceKHR)NULL !=
icd_surface->real_icd_surfaces[icd_index]) {
// We found the ICD, and there is an ICD KHR surface
// associated with it, so copy the CreateInfo struct
// and point it at the ICD's surface.
@ -519,8 +512,7 @@ vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) {
static VkIcdSurface *AllocateIcdSurfaceStruct(struct loader_instance *instance,
size_t base_size,
size_t platform_size,
bool create_icd_surfs) {
size_t platform_size) {
// Next, if so, proceed with the implementation of this function:
VkIcdSurface *pIcdSurface = loader_instance_heap_alloc(
instance, sizeof(VkIcdSurface), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
@ -533,19 +525,15 @@ static VkIcdSurface *AllocateIcdSurfaceStruct(struct loader_instance *instance,
(uint8_t *)(&pIcdSurface->base_size) - (uint8_t *)pIcdSurface);
pIcdSurface->entire_size = sizeof(VkIcdSurface);
if (create_icd_surfs) {
pIcdSurface->real_icd_surfaces = loader_instance_heap_alloc(
instance, sizeof(VkSurfaceKHR) * instance->total_icd_count,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
if (pIcdSurface->real_icd_surfaces == NULL) {
loader_instance_heap_free(instance, pIcdSurface);
pIcdSurface = NULL;
} else {
memset(pIcdSurface->real_icd_surfaces, 0,
sizeof(VkSurfaceKHR) * instance->total_icd_count);
}
pIcdSurface->real_icd_surfaces = loader_instance_heap_alloc(
instance, sizeof(VkSurfaceKHR) * instance->total_icd_count,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
if (pIcdSurface->real_icd_surfaces == NULL) {
loader_instance_heap_free(instance, pIcdSurface);
pIcdSurface = NULL;
} else {
pIcdSurface->real_icd_surfaces = NULL;
memset(pIcdSurface->real_icd_surfaces, 0,
sizeof(VkSurfaceKHR) * instance->total_icd_count);
}
}
return pIcdSurface;
@ -560,7 +548,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
VkResult res;
res = disp->CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator,
@ -591,7 +579,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateWin32SurfaceKHR(
// Next, if so, proceed with the implementation of this function:
pIcdSurface = AllocateIcdSurfaceStruct(ptr_instance,
sizeof(pIcdSurface->win_surf.base),
sizeof(pIcdSurface->win_surf), true);
sizeof(pIcdSurface->win_surf));
if (pIcdSurface == NULL) {
vkRes = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
@ -626,7 +614,7 @@ out:
i = 0;
for (struct loader_icd_term *icd_term = ptr_instance->icd_terms;
icd_term != NULL; icd_term = icd_term->next, i++) {
if (NULL != (void *)pIcdSurface->real_icd_surfaces[i] &&
if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] &&
NULL != icd_term->DestroySurfaceKHR) {
icd_term->DestroySurfaceKHR(
icd_term->instance, pIcdSurface->real_icd_surfaces[i],
@ -650,7 +638,7 @@ vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice,
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkBool32 res = disp->GetPhysicalDeviceWin32PresentationSupportKHR(
unwrapped_phys_dev, queueFamilyIndex);
return res;
@ -694,7 +682,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
VkInstance instance, const VkMirSurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
VkResult res;
res =
@ -723,7 +711,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateMirSurfaceKHR(
// Next, if so, proceed with the implementation of this function:
pIcdSurface = AllocateIcdSurfaceStruct(ptr_instance,
sizeof(pIcdSurface->mir_surf.base),
sizeof(pIcdSurface->mir_surf), true);
sizeof(pIcdSurface->mir_surf));
if (pIcdSurface == NULL) {
vkRes = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
@ -758,7 +746,7 @@ out:
i = 0;
for (struct loader_icd_term *icd_term = ptr_instance->icd_terms;
icd_term != NULL; icd_term = icd_term->next, i++) {
if (NULL != pIcdSurface->real_icd_surfaces[i] &&
if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] &&
NULL != icd_term->DestroySurfaceKHR) {
icd_term->DestroySurfaceKHR(
icd_term->instance, pIcdSurface->real_icd_surfaces[i],
@ -783,7 +771,7 @@ vkGetPhysicalDeviceMirPresentationSupportKHR(VkPhysicalDevice physicalDevice,
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkBool32 res = disp->GetPhysicalDeviceMirPresentationSupportKHR(
unwrapped_phys_dev, queueFamilyIndex, connection);
return res;
@ -830,7 +818,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
VkInstance instance, const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
VkResult res;
res = disp->CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator,
@ -859,7 +847,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateWaylandSurfaceKHR(
// Next, if so, proceed with the implementation of this function:
pIcdSurface = AllocateIcdSurfaceStruct(
ptr_instance, sizeof(pIcdSurface->wayland_surf.base),
sizeof(pIcdSurface->wayland_surf), true);
sizeof(pIcdSurface->wayland_surf));
if (pIcdSurface == NULL) {
vkRes = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
@ -894,7 +882,7 @@ out:
i = 0;
for (struct loader_icd_term *icd_term = ptr_instance->icd_terms;
icd_term != NULL; icd_term = icd_term->next, i++) {
if (NULL != pIcdSurface->real_icd_surfaces[i] &&
if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] &&
NULL != icd_term->DestroySurfaceKHR) {
icd_term->DestroySurfaceKHR(
icd_term->instance, pIcdSurface->real_icd_surfaces[i],
@ -919,7 +907,7 @@ vkGetPhysicalDeviceWaylandPresentationSupportKHR(
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkBool32 res = disp->GetPhysicalDeviceWaylandPresentationSupportKHR(
unwrapped_phys_dev, queueFamilyIndex, display);
return res;
@ -965,7 +953,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
VkInstance instance, const VkXcbSurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
VkResult res;
res =
@ -994,7 +982,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateXcbSurfaceKHR(
// Next, if so, proceed with the implementation of this function:
pIcdSurface = AllocateIcdSurfaceStruct(ptr_instance,
sizeof(pIcdSurface->xcb_surf.base),
sizeof(pIcdSurface->xcb_surf), true);
sizeof(pIcdSurface->xcb_surf));
if (pIcdSurface == NULL) {
vkRes = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
@ -1020,7 +1008,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateXcbSurfaceKHR(
}
}
*pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
*pSurface = (VkSurfaceKHR)pIcdSurface;
out:
@ -1029,8 +1017,7 @@ out:
i = 0;
for (struct loader_icd_term *icd_term = ptr_instance->icd_terms;
icd_term != NULL; icd_term = icd_term->next, i++) {
if (NULL !=
(void *)(uintptr_t)pIcdSurface->real_icd_surfaces[i] &&
if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] &&
NULL != icd_term->DestroySurfaceKHR) {
icd_term->DestroySurfaceKHR(
icd_term->instance, pIcdSurface->real_icd_surfaces[i],
@ -1056,7 +1043,7 @@ vkGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice,
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkBool32 res = disp->GetPhysicalDeviceXcbPresentationSupportKHR(
unwrapped_phys_dev, queueFamilyIndex, connection, visual_id);
return res;
@ -1102,7 +1089,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
VkInstance instance, const VkXlibSurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
VkResult res;
res =
@ -1131,7 +1118,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateXlibSurfaceKHR(
// Next, if so, proceed with the implementation of this function:
pIcdSurface = AllocateIcdSurfaceStruct(
ptr_instance, sizeof(pIcdSurface->xlib_surf.base),
sizeof(pIcdSurface->xlib_surf), true);
sizeof(pIcdSurface->xlib_surf));
if (pIcdSurface == NULL) {
vkRes = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
@ -1157,7 +1144,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateXlibSurfaceKHR(
}
}
*pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
*pSurface = (VkSurfaceKHR)pIcdSurface;
out:
@ -1166,8 +1153,7 @@ out:
i = 0;
for (struct loader_icd_term *icd_term = ptr_instance->icd_terms;
icd_term != NULL; icd_term = icd_term->next, i++) {
if (NULL !=
(void *)(uintptr_t)pIcdSurface->real_icd_surfaces[i] &&
if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] &&
NULL != icd_term->DestroySurfaceKHR) {
icd_term->DestroySurfaceKHR(
icd_term->instance, pIcdSurface->real_icd_surfaces[i],
@ -1192,7 +1178,7 @@ vkGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice,
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkBool32 res = disp->GetPhysicalDeviceXlibPresentationSupportKHR(
unwrapped_phys_dev, queueFamilyIndex, dpy, visualID);
return res;
@ -1238,7 +1224,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
VkInstance instance, ANativeWindow *window,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
VkResult res;
res = disp->CreateAndroidSurfaceKHR(instance, window, pAllocator, pSurface);
@ -1285,7 +1271,7 @@ vkGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice,
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->GetPhysicalDeviceDisplayPropertiesKHR(
unwrapped_phys_dev, pPropertyCount, pProperties);
return res;
@ -1323,7 +1309,7 @@ vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->GetPhysicalDeviceDisplayPlanePropertiesKHR(
unwrapped_phys_dev, pPropertyCount, pProperties);
return res;
@ -1365,7 +1351,7 @@ vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice,
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->GetDisplayPlaneSupportedDisplaysKHR(
unwrapped_phys_dev, planeIndex, pDisplayCount, pDisplays);
return res;
@ -1402,7 +1388,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModePropertiesKHR(
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->GetDisplayModePropertiesKHR(
unwrapped_phys_dev, display, pPropertyCount, pProperties);
return res;
@ -1440,7 +1426,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayModeKHR(
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->CreateDisplayModeKHR(unwrapped_phys_dev, display,
pCreateInfo, pAllocator, pMode);
return res;
@ -1478,7 +1464,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilitiesKHR(
VkPhysicalDevice unwrapped_phys_dev =
loader_unwrap_physical_device(physicalDevice);
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(physicalDevice);
disp = loader_get_instance_layer_dispatch(physicalDevice);
VkResult res = disp->GetDisplayPlaneCapabilitiesKHR(
unwrapped_phys_dev, mode, planeIndex, pCapabilities);
return res;
@ -1513,7 +1499,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR(
VkInstance instance, const VkDisplaySurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
const VkLayerInstanceDispatchTable *disp;
disp = loader_get_instance_dispatch(instance);
disp = loader_get_instance_layer_dispatch(instance);
VkResult res;
res = disp->CreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator,
@ -1537,11 +1523,10 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDisplayPlaneSurfaceKHR(
goto out;
}
// The VK_KHR_display path will continue to use the old path (hence the
// false as the last parameter).
// Next, if so, proceed with the implementation of this function:
pIcdSurface =
AllocateIcdSurfaceStruct(inst, sizeof(pIcdSurface->display_surf.base),
sizeof(pIcdSurface->display_surf), false);
sizeof(pIcdSurface->display_surf));
if (pIcdSurface == NULL) {
vkRes = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
@ -1572,7 +1557,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDisplayPlaneSurfaceKHR(
}
}
*pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
*pSurface = (VkSurfaceKHR)pIcdSurface;
out:
@ -1581,8 +1566,7 @@ out:
i = 0;
for (struct loader_icd_term *icd_term = inst->icd_terms;
icd_term != NULL; icd_term = icd_term->next, i++) {
if (NULL !=
(void *)(uintptr_t)pIcdSurface->real_icd_surfaces[i] &&
if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] &&
NULL != icd_term->DestroySurfaceKHR) {
icd_term->DestroySurfaceKHR(
icd_term->instance, pIcdSurface->real_icd_surfaces[i],
@ -1597,8 +1581,8 @@ out:
return vkRes;
}
// This is the trampoline entrypoint
// for CreateSharedSwapchainsKHR
// EXT_display_swapchain Extension command
LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR(
VkDevice device, uint32_t swapchainCount,
const VkSwapchainCreateInfoKHR *pCreateInfos,
@ -1609,6 +1593,47 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR(
pAllocator, pSwapchains);
}
VKAPI_ATTR VkResult VKAPI_CALL terminator_vkCreateSharedSwapchainsKHR(
VkDevice device, uint32_t swapchainCount,
const VkSwapchainCreateInfoKHR *pCreateInfos,
const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchains) {
uint32_t icd_index = 0;
struct loader_device *dev;
struct loader_icd_term *icd_term =
loader_get_icd_and_device(device, &dev, &icd_index);
if (NULL != icd_term && NULL != icd_term->CreateSharedSwapchainsKHR) {
VkIcdSurface *icd_surface =
(VkIcdSurface *)(uintptr_t)pCreateInfos->surface;
if (NULL != icd_surface->real_icd_surfaces) {
if ((VkSurfaceKHR)NULL !=
icd_surface->real_icd_surfaces[icd_index]) {
// We found the ICD, and there is an ICD KHR surface
// associated with it, so copy the CreateInfo struct
// and point it at the ICD's surface.
VkSwapchainCreateInfoKHR *pCreateCopy =
loader_stack_alloc(sizeof(VkSwapchainCreateInfoKHR) *
swapchainCount);
if (NULL == pCreateCopy) {
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
memcpy(pCreateCopy, pCreateInfos,
sizeof(VkSwapchainCreateInfoKHR) * swapchainCount);
for (uint32_t sc = 0; sc < swapchainCount; sc++) {
pCreateCopy[sc].surface =
icd_surface->real_icd_surfaces[icd_index];
}
return icd_term->CreateSharedSwapchainsKHR(
device, swapchainCount, pCreateCopy, pAllocator,
pSwapchains);
}
}
return icd_term->CreateSharedSwapchainsKHR(device, swapchainCount,
pCreateInfos, pAllocator,
pSwapchains);
}
return VK_SUCCESS;
}
bool wsi_swapchain_instance_gpa(struct loader_instance *ptr_instance,
const char *name, void **addr) {
*addr = NULL;

View File

@ -169,4 +169,9 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDisplayPlaneSurfaceKHR(
VkInstance instance, const VkDisplaySurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
VKAPI_ATTR VkResult VKAPI_CALL terminator_vkCreateSharedSwapchainsKHR(
VkDevice device, uint32_t swapchainCount,
const VkSwapchainCreateInfoKHR *pCreateInfos,
const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchains);
#endif /* WSI_H */

View File

@ -25,12 +25,26 @@
#include "vulkan.h"
/*
* Loader-ICD version negotiation API
*/
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 3
// Loader-ICD version negotiation API. Versions add the following features:
// Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr
// or vk_icdNegotiateLoaderICDInterfaceVersion.
// Version 1 - Add support for vk_icdGetInstanceProcAddr.
// Version 2 - Add Loader/ICD Interface version negotiation
// via vk_icdNegotiateLoaderICDInterfaceVersion.
// Version 3 - Add ICD creation/destruction of KHR_surface objects.
// Version 4 - Add unknown physical device extension qyering via
// vk_icdGetPhysicalDeviceProcAddr.
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 4
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion);
// This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this
// flie directly, it won't be found.
#ifndef PFN_GetPhysicalDeviceProcAddr
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
#endif
/*
* The ICD must reserve space for a pointer for the loader's dispatch
* table, at the start of <each object>.

View File

@ -35,6 +35,41 @@
#define VK_LAYER_EXPORT
#endif
#define MAX_NUM_UNKNOWN_EXTS 250
// Loader-Layer version negotiation API. Versions add the following features:
// Versions 0/1 - Initial. Doesn't support vk_layerGetPhysicalDeviceProcAddr
// or vk_icdNegotiateLoaderLayerInterfaceVersion.
// Version 2 - Add support for vk_layerGetPhysicalDeviceProcAddr and
// vk_icdNegotiateLoaderLayerInterfaceVersion.
#define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2
#define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1
// Internal function
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
// Version negotiation values
typedef enum VkNegotiateLayerStructType {
LAYER_NEGOTIATE_UNINTIALIZED = 0,
LAYER_NEGOTIATE_INTERFACE_STRUCT = 1,
} VkNegotiateLayerStructType;
// Version negotiation structures
typedef struct VkNegotiateLayerInterface {
VkNegotiateLayerStructType sType;
void *pNext;
uint32_t loaderLayerInterfaceVersion;
PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr;
PFN_GetPhysicalDeviceProcAddr pfnGetPhysicalDeviceProcAddr;
} VkNegotiateLayerInterface;
// Version negotiation functions
typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderLayerInterfaceVersion)(VkNegotiateLayerInterface *pVersionStruct);
// Function prototype for unknown physical device extension command
typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device, ...);
typedef struct VkLayerDispatchTable_ {
PFN_vkGetDeviceProcAddr GetDeviceProcAddr;
PFN_vkDestroyDevice DestroyDevice;
@ -173,10 +208,27 @@ typedef struct VkLayerDispatchTable_ {
PFN_vkCmdDebugMarkerBeginEXT CmdDebugMarkerBeginEXT;
PFN_vkCmdDebugMarkerEndEXT CmdDebugMarkerEndEXT;
PFN_vkCmdDebugMarkerInsertEXT CmdDebugMarkerInsertEXT;
// KHR_maintenance1
PFN_vkTrimCommandPoolKHR TrimCommandPoolKHR;
// EXT_display_control
PFN_vkDisplayPowerControlEXT DisplayPowerControlEXT;
PFN_vkRegisterDeviceEventEXT RegisterDeviceEventEXT;
PFN_vkRegisterDisplayEventEXT RegisterDisplayEventEXT;
PFN_vkGetSwapchainCounterEXT GetSwapchainCounterEXT;
// NVX_device_generated_commands
PFN_vkCmdProcessCommandsNVX CmdProcessCommandsNVX;
PFN_vkCmdReserveSpaceForCommandsNVX CmdReserveSpaceForCommandsNVX;
PFN_vkCreateIndirectCommandsLayoutNVX CreateIndirectCommandsLayoutNVX;
PFN_vkDestroyIndirectCommandsLayoutNVX DestroyIndirectCommandsLayoutNVX;
PFN_vkCreateObjectTableNVX CreateObjectTableNVX;
PFN_vkDestroyObjectTableNVX DestroyObjectTableNVX;
PFN_vkRegisterObjectsNVX RegisterObjectsNVX;
PFN_vkUnregisterObjectsNVX UnregisterObjectsNVX;
} VkLayerDispatchTable;
typedef struct VkLayerInstanceDispatchTable_ {
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
PFN_GetPhysicalDeviceProcAddr GetPhysicalDeviceProcAddr;
PFN_vkDestroyInstance DestroyInstance;
PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices;
PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
@ -198,9 +250,6 @@ typedef struct VkLayerInstanceDispatchTable_ {
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR;
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR
GetPhysicalDeviceSurfacePresentModesKHR;
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
#ifdef VK_USE_PLATFORM_MIR_KHR
PFN_vkCreateMirSurfaceKHR CreateMirSurfaceKHR;
PFN_vkGetPhysicalDeviceMirPresentationSupportKHR
@ -243,8 +292,39 @@ typedef struct VkLayerInstanceDispatchTable_ {
GetDisplayPlaneCapabilitiesKHR;
PFN_vkCreateDisplayPlaneSurfaceKHR
CreateDisplayPlaneSurfaceKHR;
// KHR_get_physical_device_properties2
PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysicalDeviceFeatures2KHR;
PFN_vkGetPhysicalDeviceProperties2KHR GetPhysicalDeviceProperties2KHR;
PFN_vkGetPhysicalDeviceFormatProperties2KHR
GetPhysicalDeviceFormatProperties2KHR;
PFN_vkGetPhysicalDeviceImageFormatProperties2KHR
GetPhysicalDeviceImageFormatProperties2KHR;
PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR
GetPhysicalDeviceQueueFamilyProperties2KHR;
PFN_vkGetPhysicalDeviceMemoryProperties2KHR
GetPhysicalDeviceMemoryProperties2KHR;
PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR
GetPhysicalDeviceSparseImageFormatProperties2KHR;
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
// EXT_acquire_xlib_display
PFN_vkAcquireXlibDisplayEXT AcquireXlibDisplayEXT;
PFN_vkGetRandROutputDisplayEXT GetRandROutputDisplayEXT;
#endif
// EXT_debug_report
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
// EXT_direct_mode_display
PFN_vkReleaseDisplayEXT ReleaseDisplayEXT;
// EXT_display_surface_counter
PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT
GetPhysicalDeviceSurfaceCapabilities2EXT;
// NV_external_memory_capabilities
PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV
GetPhysicalDeviceExternalImageFormatPropertiesNV;
// NVX_device_generated_commands (phys dev commands)
PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX
GetPhysicalDeviceGeneratedCommandsPropertiesNVX;
} VkLayerInstanceDispatchTable;
// ------------------------------------------------------------------------------------------------
@ -263,6 +343,7 @@ typedef enum VkLayerFunction_ {
typedef struct VkLayerInstanceLink_ {
struct VkLayerInstanceLink_ *pNext;
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
PFN_GetPhysicalDeviceProcAddr pfnNextGetPhysicalDeviceProcAddr;
} VkLayerInstanceLink;
/*

View File

@ -6,7 +6,7 @@ extern "C" {
#endif
/*
** Copyright (c) 2015-2016 The Khronos Group Inc.
** Copyright (c) 2015-2017 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
@ -43,7 +43,7 @@ extern "C" {
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
// Version of this file
#define VK_HEADER_VERSION 34
#define VK_HEADER_VERSION 39
#define VK_NULL_HANDLE 0
@ -145,6 +145,7 @@ typedef enum VkResult {
VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
VK_ERROR_INVALID_SHADER_NV = -1000012000,
VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000,
VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL,
VK_RESULT_END_RANGE = VK_INCOMPLETE,
VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1),
@ -225,7 +226,28 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000,
VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
@ -834,6 +856,8 @@ typedef enum VkFormatFeatureFlagBits {
VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkFormatFeatureFlagBits;
typedef VkFlags VkFormatFeatureFlags;
@ -857,6 +881,7 @@ typedef enum VkImageCreateFlagBits {
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008,
VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010,
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkImageCreateFlagBits;
typedef VkFlags VkImageCreateFlags;
@ -918,6 +943,7 @@ typedef enum VkPipelineStageFlagBits {
VK_PIPELINE_STAGE_HOST_BIT = 0x00004000,
VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000,
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000,
VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkPipelineStageFlagBits;
typedef VkFlags VkPipelineStageFlags;
@ -1092,6 +1118,8 @@ typedef enum VkAccessFlagBits {
VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkAccessFlagBits;
typedef VkFlags VkAccessFlags;
@ -3197,6 +3225,18 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
typedef enum VkColorSpaceKHR {
VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104001,
VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104002,
VK_COLOR_SPACE_SCRGB_LINEAR_EXT = 1000104003,
VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT = 1000104004,
VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104005,
VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104006,
VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104007,
VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104008,
VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104009,
VK_COLOR_SPACE_BT2020_NONLINEAR_EXT = 1000104010,
VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + 1),
@ -3732,10 +3772,140 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
#define VK_KHR_get_physical_device_properties2 1
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
typedef struct VkPhysicalDeviceFeatures2KHR {
VkStructureType sType;
void* pNext;
VkPhysicalDeviceFeatures features;
} VkPhysicalDeviceFeatures2KHR;
typedef struct VkPhysicalDeviceProperties2KHR {
VkStructureType sType;
void* pNext;
VkPhysicalDeviceProperties properties;
} VkPhysicalDeviceProperties2KHR;
typedef struct VkFormatProperties2KHR {
VkStructureType sType;
void* pNext;
VkFormatProperties formatProperties;
} VkFormatProperties2KHR;
typedef struct VkImageFormatProperties2KHR {
VkStructureType sType;
void* pNext;
VkImageFormatProperties imageFormatProperties;
} VkImageFormatProperties2KHR;
typedef struct VkPhysicalDeviceImageFormatInfo2KHR {
VkStructureType sType;
const void* pNext;
VkFormat format;
VkImageType type;
VkImageTiling tiling;
VkImageUsageFlags usage;
VkImageCreateFlags flags;
} VkPhysicalDeviceImageFormatInfo2KHR;
typedef struct VkQueueFamilyProperties2KHR {
VkStructureType sType;
void* pNext;
VkQueueFamilyProperties queueFamilyProperties;
} VkQueueFamilyProperties2KHR;
typedef struct VkPhysicalDeviceMemoryProperties2KHR {
VkStructureType sType;
void* pNext;
VkPhysicalDeviceMemoryProperties memoryProperties;
} VkPhysicalDeviceMemoryProperties2KHR;
typedef struct VkSparseImageFormatProperties2KHR {
VkStructureType sType;
void* pNext;
VkSparseImageFormatProperties properties;
} VkSparseImageFormatProperties2KHR;
typedef struct VkPhysicalDeviceSparseImageFormatInfo2KHR {
VkStructureType sType;
const void* pNext;
VkFormat format;
VkImageType type;
VkSampleCountFlagBits samples;
VkImageUsageFlags usage;
VkImageTiling tiling;
} VkPhysicalDeviceSparseImageFormatInfo2KHR;
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR* pFeatures);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2KHR* pProperties);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2KHR* pFormatProperties);
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, VkImageFormatProperties2KHR* pImageFormatProperties);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2KHR* pProperties);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures2KHR* pFeatures);
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties2KHR* pProperties);
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkFormatProperties2KHR* pFormatProperties);
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
VkImageFormatProperties2KHR* pImageFormatProperties);
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties);
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
uint32_t* pPropertyCount,
VkSparseImageFormatProperties2KHR* pProperties);
#endif
#define VK_KHR_shader_draw_parameters 1
#define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
#define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
#define VK_KHR_maintenance1 1
#define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
#define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
typedef VkFlags VkCommandPoolTrimFlagsKHR;
typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR(
VkDevice device,
VkCommandPool commandPool,
VkCommandPoolTrimFlagsKHR flags);
#endif
#define VK_EXT_debug_report 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 3
#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 4
#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
#define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
@ -3770,9 +3940,13 @@ typedef enum VkDebugReportObjectTypeEXT {
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
VK_DEBUG_REPORT_OBJECT_TYPE_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,
VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT,
VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1),
VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT,
VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1),
VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
} VkDebugReportObjectTypeEXT;
@ -4154,6 +4328,434 @@ typedef struct VkValidationFlagsEXT {
#ifdef VK_USE_PLATFORM_VI_NN
#define VK_NN_vi_surface 1
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
typedef VkFlags VkViSurfaceCreateFlagsNN;
typedef struct VkViSurfaceCreateInfoNN {
VkStructureType sType;
const void* pNext;
VkViSurfaceCreateFlagsNN flags;
void* window;
} VkViSurfaceCreateInfoNN;
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
VkInstance instance,
const VkViSurfaceCreateInfoNN* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#endif /* VK_USE_PLATFORM_VI_NN */
#define VK_EXT_shader_subgroup_ballot 1
#define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
#define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
#define VK_EXT_shader_subgroup_vote 1
#define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
#define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
#define VK_NVX_device_generated_commands 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX)
#define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1
#define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
typedef enum VkIndirectCommandsTokenTypeNVX {
VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0,
VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1,
VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2,
VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3,
VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4,
VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5,
VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6,
VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_BEGIN_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_END_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX,
VK_INDIRECT_COMMANDS_TOKEN_TYPE_RANGE_SIZE_NVX = (VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX - VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX + 1),
VK_INDIRECT_COMMANDS_TOKEN_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF
} VkIndirectCommandsTokenTypeNVX;
typedef enum VkObjectEntryTypeNVX {
VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0,
VK_OBJECT_ENTRY_PIPELINE_NVX = 1,
VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2,
VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3,
VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4,
VK_OBJECT_ENTRY_TYPE_BEGIN_RANGE_NVX = VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX,
VK_OBJECT_ENTRY_TYPE_END_RANGE_NVX = VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX,
VK_OBJECT_ENTRY_TYPE_RANGE_SIZE_NVX = (VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX - VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX + 1),
VK_OBJECT_ENTRY_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF
} VkObjectEntryTypeNVX;
typedef enum VkIndirectCommandsLayoutUsageFlagBitsNVX {
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF
} VkIndirectCommandsLayoutUsageFlagBitsNVX;
typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNVX;
typedef enum VkObjectEntryUsageFlagBitsNVX {
VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
VK_OBJECT_ENTRY_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF
} VkObjectEntryUsageFlagBitsNVX;
typedef VkFlags VkObjectEntryUsageFlagsNVX;
typedef struct VkDeviceGeneratedCommandsFeaturesNVX {
VkStructureType sType;
const void* pNext;
VkBool32 computeBindingPointSupport;
} VkDeviceGeneratedCommandsFeaturesNVX;
typedef struct VkDeviceGeneratedCommandsLimitsNVX {
VkStructureType sType;
const void* pNext;
uint32_t maxIndirectCommandsLayoutTokenCount;
uint32_t maxObjectEntryCounts;
uint32_t minSequenceCountBufferOffsetAlignment;
uint32_t minSequenceIndexBufferOffsetAlignment;
uint32_t minCommandsTokenBufferOffsetAlignment;
} VkDeviceGeneratedCommandsLimitsNVX;
typedef struct VkIndirectCommandsTokenNVX {
VkIndirectCommandsTokenTypeNVX tokenType;
VkBuffer buffer;
VkDeviceSize offset;
} VkIndirectCommandsTokenNVX;
typedef struct VkIndirectCommandsLayoutTokenNVX {
VkIndirectCommandsTokenTypeNVX tokenType;
uint32_t bindingUnit;
uint32_t dynamicCount;
uint32_t divisor;
} VkIndirectCommandsLayoutTokenNVX;
typedef struct VkIndirectCommandsLayoutCreateInfoNVX {
VkStructureType sType;
const void* pNext;
VkPipelineBindPoint pipelineBindPoint;
VkIndirectCommandsLayoutUsageFlagsNVX flags;
uint32_t tokenCount;
const VkIndirectCommandsLayoutTokenNVX* pTokens;
} VkIndirectCommandsLayoutCreateInfoNVX;
typedef struct VkCmdProcessCommandsInfoNVX {
VkStructureType sType;
const void* pNext;
VkObjectTableNVX objectTable;
VkIndirectCommandsLayoutNVX indirectCommandsLayout;
uint32_t indirectCommandsTokenCount;
const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens;
uint32_t maxSequencesCount;
VkCommandBuffer targetCommandBuffer;
VkBuffer sequencesCountBuffer;
VkDeviceSize sequencesCountOffset;
VkBuffer sequencesIndexBuffer;
VkDeviceSize sequencesIndexOffset;
} VkCmdProcessCommandsInfoNVX;
typedef struct VkCmdReserveSpaceForCommandsInfoNVX {
VkStructureType sType;
const void* pNext;
VkObjectTableNVX objectTable;
VkIndirectCommandsLayoutNVX indirectCommandsLayout;
uint32_t maxSequencesCount;
} VkCmdReserveSpaceForCommandsInfoNVX;
typedef struct VkObjectTableCreateInfoNVX {
VkStructureType sType;
const void* pNext;
uint32_t objectCount;
const VkObjectEntryTypeNVX* pObjectEntryTypes;
const uint32_t* pObjectEntryCounts;
const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags;
uint32_t maxUniformBuffersPerDescriptor;
uint32_t maxStorageBuffersPerDescriptor;
uint32_t maxStorageImagesPerDescriptor;
uint32_t maxSampledImagesPerDescriptor;
uint32_t maxPipelineLayouts;
} VkObjectTableCreateInfoNVX;
typedef struct VkObjectTableEntryNVX {
VkObjectEntryTypeNVX type;
VkObjectEntryUsageFlagsNVX flags;
} VkObjectTableEntryNVX;
typedef struct VkObjectTablePipelineEntryNVX {
VkObjectEntryTypeNVX type;
VkObjectEntryUsageFlagsNVX flags;
VkPipeline pipeline;
} VkObjectTablePipelineEntryNVX;
typedef struct VkObjectTableDescriptorSetEntryNVX {
VkObjectEntryTypeNVX type;
VkObjectEntryUsageFlagsNVX flags;
VkPipelineLayout pipelineLayout;
VkDescriptorSet descriptorSet;
} VkObjectTableDescriptorSetEntryNVX;
typedef struct VkObjectTableVertexBufferEntryNVX {
VkObjectEntryTypeNVX type;
VkObjectEntryUsageFlagsNVX flags;
VkBuffer buffer;
} VkObjectTableVertexBufferEntryNVX;
typedef struct VkObjectTableIndexBufferEntryNVX {
VkObjectEntryTypeNVX type;
VkObjectEntryUsageFlagsNVX flags;
VkBuffer buffer;
VkIndexType indexType;
} VkObjectTableIndexBufferEntryNVX;
typedef struct VkObjectTablePushConstantEntryNVX {
VkObjectEntryTypeNVX type;
VkObjectEntryUsageFlagsNVX flags;
VkPipelineLayout pipelineLayout;
VkShaderStageFlags stageFlags;
} VkObjectTablePushConstantEntryNVX;
typedef void (VKAPI_PTR *PFN_vkCmdProcessCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo);
typedef void (VKAPI_PTR *PFN_vkCmdReserveSpaceForCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo);
typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutNVX)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout);
typedef void (VKAPI_PTR *PFN_vkDestroyIndirectCommandsLayoutNVX)(VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout, const VkAllocationCallbacks* pAllocator);
typedef VkResult (VKAPI_PTR *PFN_vkCreateObjectTableNVX)(VkDevice device, const VkObjectTableCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkObjectTableNVX* pObjectTable);
typedef void (VKAPI_PTR *PFN_vkDestroyObjectTableNVX)(VkDevice device, VkObjectTableNVX objectTable, const VkAllocationCallbacks* pAllocator);
typedef VkResult (VKAPI_PTR *PFN_vkRegisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices);
typedef VkResult (VKAPI_PTR *PFN_vkUnregisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX)(VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, VkDeviceGeneratedCommandsLimitsNVX* pLimits);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkCmdProcessCommandsNVX(
VkCommandBuffer commandBuffer,
const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo);
VKAPI_ATTR void VKAPI_CALL vkCmdReserveSpaceForCommandsNVX(
VkCommandBuffer commandBuffer,
const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutNVX(
VkDevice device,
const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout);
VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutNVX(
VkDevice device,
VkIndirectCommandsLayoutNVX indirectCommandsLayout,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL vkCreateObjectTableNVX(
VkDevice device,
const VkObjectTableCreateInfoNVX* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkObjectTableNVX* pObjectTable);
VKAPI_ATTR void VKAPI_CALL vkDestroyObjectTableNVX(
VkDevice device,
VkObjectTableNVX objectTable,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL vkRegisterObjectsNVX(
VkDevice device,
VkObjectTableNVX objectTable,
uint32_t objectCount,
const VkObjectTableEntryNVX* const* ppObjectTableEntries,
const uint32_t* pObjectIndices);
VKAPI_ATTR VkResult VKAPI_CALL vkUnregisterObjectsNVX(
VkDevice device,
VkObjectTableNVX objectTable,
uint32_t objectCount,
const VkObjectEntryTypeNVX* pObjectEntryTypes,
const uint32_t* pObjectIndices);
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
VkPhysicalDevice physicalDevice,
VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
VkDeviceGeneratedCommandsLimitsNVX* pLimits);
#endif
#define VK_EXT_direct_mode_display 1
#define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
#define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
typedef VkResult (VKAPI_PTR *PFN_vkReleaseDisplayEXT)(VkPhysicalDevice physicalDevice, VkDisplayKHR display);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT(
VkPhysicalDevice physicalDevice,
VkDisplayKHR display);
#endif
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
#define VK_EXT_acquire_xlib_display 1
#include <X11/extensions/Xrandr.h>
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
VkDisplayKHR display);
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
RROutput rrOutput,
VkDisplayKHR* pDisplay);
#endif
#endif /* VK_USE_PLATFORM_XLIB_XRANDR_EXT */
#define VK_EXT_display_surface_counter 1
#define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
#define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
typedef enum VkSurfaceCounterFlagBitsEXT {
VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
} VkSurfaceCounterFlagBitsEXT;
typedef VkFlags VkSurfaceCounterFlagsEXT;
typedef struct VkSurfaceCapabilities2EXT {
VkStructureType sType;
void* pNext;
uint32_t minImageCount;
uint32_t maxImageCount;
VkExtent2D currentExtent;
VkExtent2D minImageExtent;
VkExtent2D maxImageExtent;
uint32_t maxImageArrayLayers;
VkSurfaceTransformFlagsKHR supportedTransforms;
VkSurfaceTransformFlagBitsKHR currentTransform;
VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
VkImageUsageFlags supportedUsageFlags;
VkSurfaceCounterFlagsEXT supportedSurfaceCounters;
} VkSurfaceCapabilities2EXT;
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
#endif
#define VK_EXT_display_control 1
#define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
#define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control"
typedef enum VkDisplayPowerStateEXT {
VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
VK_DISPLAY_POWER_STATE_ON_EXT = 2,
VK_DISPLAY_POWER_STATE_BEGIN_RANGE_EXT = VK_DISPLAY_POWER_STATE_OFF_EXT,
VK_DISPLAY_POWER_STATE_END_RANGE_EXT = VK_DISPLAY_POWER_STATE_ON_EXT,
VK_DISPLAY_POWER_STATE_RANGE_SIZE_EXT = (VK_DISPLAY_POWER_STATE_ON_EXT - VK_DISPLAY_POWER_STATE_OFF_EXT + 1),
VK_DISPLAY_POWER_STATE_MAX_ENUM_EXT = 0x7FFFFFFF
} VkDisplayPowerStateEXT;
typedef enum VkDeviceEventTypeEXT {
VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
VK_DEVICE_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT,
VK_DEVICE_EVENT_TYPE_END_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT,
VK_DEVICE_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT - VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT + 1),
VK_DEVICE_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
} VkDeviceEventTypeEXT;
typedef enum VkDisplayEventTypeEXT {
VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
VK_DISPLAY_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT,
VK_DISPLAY_EVENT_TYPE_END_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT,
VK_DISPLAY_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT - VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT + 1),
VK_DISPLAY_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
} VkDisplayEventTypeEXT;
typedef struct VkDisplayPowerInfoEXT {
VkStructureType sType;
const void* pNext;
VkDisplayPowerStateEXT powerState;
} VkDisplayPowerInfoEXT;
typedef struct VkDeviceEventInfoEXT {
VkStructureType sType;
const void* pNext;
VkDeviceEventTypeEXT deviceEvent;
} VkDeviceEventInfoEXT;
typedef struct VkDisplayEventInfoEXT {
VkStructureType sType;
const void* pNext;
VkDisplayEventTypeEXT displayEvent;
} VkDisplayEventInfoEXT;
typedef struct VkSwapchainCounterCreateInfoEXT {
VkStructureType sType;
const void* pNext;
VkSurfaceCounterFlagsEXT surfaceCounters;
} VkSwapchainCounterCreateInfoEXT;
typedef VkResult (VKAPI_PTR *PFN_vkDisplayPowerControlEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
typedef VkResult (VKAPI_PTR *PFN_vkRegisterDeviceEventEXT)(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
typedef VkResult (VKAPI_PTR *PFN_vkRegisterDisplayEventEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainCounterEXT)(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkDisplayPowerControlEXT(
VkDevice device,
VkDisplayKHR display,
const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDeviceEventEXT(
VkDevice device,
const VkDeviceEventInfoEXT* pDeviceEventInfo,
const VkAllocationCallbacks* pAllocator,
VkFence* pFence);
VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDisplayEventEXT(
VkDevice device,
VkDisplayKHR display,
const VkDisplayEventInfoEXT* pDisplayEventInfo,
const VkAllocationCallbacks* pAllocator,
VkFence* pFence);
VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT(
VkDevice device,
VkSwapchainKHR swapchain,
VkSurfaceCounterFlagBitsEXT counter,
uint64_t* pCounterValue);
#endif
#define VK_EXT_swapchain_colorspace 1
#define VK_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 1
#define VK_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
#ifdef __cplusplus
}
#endif

23487
third_party/vulkan/vulkan.hpp vendored Normal file

File diff suppressed because it is too large Load Diff