include: Update copyright and apply clang-format (no logic changes)
This commit is contained in:
parent
8fcaf5fa29
commit
e9e45c6f5e
1 changed files with 67 additions and 31 deletions
|
|
@ -1,3 +1,36 @@
|
||||||
|
//
|
||||||
|
// File: vk_layer.h
|
||||||
|
//
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||||
|
* 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/or associated documentation files (the "Materials"), to
|
||||||
|
* deal in the Materials without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
* sell copies of the Materials, and to permit persons to whom the Materials are
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice(s) and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* The Materials are Confidential Information as defined by the Khronos
|
||||||
|
* Membership Agreement until designated non-confidential by Khronos, at which
|
||||||
|
* point this condition clause shall be removed.
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE 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 MATERIALS OR THE
|
||||||
|
* USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
/* Need to define dispatch table
|
/* Need to define dispatch table
|
||||||
* Core struct can then have ptr to dispatch table at the top
|
* Core struct can then have ptr to dispatch table at the top
|
||||||
* Along with object ptrs for current and next OBJ
|
* Along with object ptrs for current and next OBJ
|
||||||
|
|
@ -15,10 +48,7 @@
|
||||||
#define VK_LAYER_EXPORT
|
#define VK_LAYER_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef struct VkLayerDispatchTable_ {
|
||||||
|
|
||||||
typedef struct VkLayerDispatchTable_
|
|
||||||
{
|
|
||||||
PFN_vkGetDeviceProcAddr GetDeviceProcAddr;
|
PFN_vkGetDeviceProcAddr GetDeviceProcAddr;
|
||||||
PFN_vkDestroyDevice DestroyDevice;
|
PFN_vkDestroyDevice DestroyDevice;
|
||||||
PFN_vkGetDeviceQueue GetDeviceQueue;
|
PFN_vkGetDeviceQueue GetDeviceQueue;
|
||||||
|
|
@ -147,47 +177,56 @@ typedef struct VkLayerDispatchTable_
|
||||||
PFN_vkQueuePresentKHR QueuePresentKHR;
|
PFN_vkQueuePresentKHR QueuePresentKHR;
|
||||||
} VkLayerDispatchTable;
|
} VkLayerDispatchTable;
|
||||||
|
|
||||||
typedef struct VkLayerInstanceDispatchTable_
|
typedef struct VkLayerInstanceDispatchTable_ {
|
||||||
{
|
|
||||||
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
|
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
|
||||||
PFN_vkDestroyInstance DestroyInstance;
|
PFN_vkDestroyInstance DestroyInstance;
|
||||||
PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices;
|
PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices;
|
||||||
PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
|
PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
|
||||||
PFN_vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties;
|
PFN_vkGetPhysicalDeviceImageFormatProperties
|
||||||
|
GetPhysicalDeviceImageFormatProperties;
|
||||||
PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties;
|
PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties;
|
||||||
PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties;
|
PFN_vkGetPhysicalDeviceSparseImageFormatProperties
|
||||||
|
GetPhysicalDeviceSparseImageFormatProperties;
|
||||||
PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties;
|
PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties;
|
||||||
PFN_vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties;
|
PFN_vkGetPhysicalDeviceQueueFamilyProperties
|
||||||
|
GetPhysicalDeviceQueueFamilyProperties;
|
||||||
PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties;
|
PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties;
|
||||||
PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties;
|
PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties;
|
||||||
PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties;
|
PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties;
|
||||||
PFN_vkDestroySurfaceKHR DestroySurfaceKHR;
|
PFN_vkDestroySurfaceKHR DestroySurfaceKHR;
|
||||||
PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR;
|
PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR;
|
||||||
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR;
|
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
|
||||||
|
GetPhysicalDeviceSurfaceCapabilitiesKHR;
|
||||||
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR;
|
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR;
|
||||||
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR GetPhysicalDeviceSurfacePresentModesKHR;
|
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR
|
||||||
|
GetPhysicalDeviceSurfacePresentModesKHR;
|
||||||
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
|
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
|
||||||
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
|
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
|
||||||
PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
|
PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
|
||||||
#ifdef VK_USE_PLATFORM_MIR_KHR
|
#ifdef VK_USE_PLATFORM_MIR_KHR
|
||||||
PFN_vkCreateMirSurfaceKHR CreateMirSurfaceKHR;
|
PFN_vkCreateMirSurfaceKHR CreateMirSurfaceKHR;
|
||||||
PFN_vkGetPhysicalDeviceMirPresentationSupportKHR GetPhysicalDeviceMirPresentationSupportKHR;
|
PFN_vkGetPhysicalDeviceMirPresentationSupportKHR
|
||||||
|
GetPhysicalDeviceMirPresentationSupportKHR;
|
||||||
#endif
|
#endif
|
||||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||||
PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR;
|
PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR;
|
||||||
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR GetPhysicalDeviceWaylandPresentationSupportKHR;
|
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR
|
||||||
|
GetPhysicalDeviceWaylandPresentationSupportKHR;
|
||||||
#endif
|
#endif
|
||||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||||
PFN_vkCreateWin32SurfaceKHR CreateWin32SurfaceKHR;
|
PFN_vkCreateWin32SurfaceKHR CreateWin32SurfaceKHR;
|
||||||
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR GetPhysicalDeviceWin32PresentationSupportKHR;
|
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR
|
||||||
|
GetPhysicalDeviceWin32PresentationSupportKHR;
|
||||||
#endif
|
#endif
|
||||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||||
PFN_vkCreateXcbSurfaceKHR CreateXcbSurfaceKHR;
|
PFN_vkCreateXcbSurfaceKHR CreateXcbSurfaceKHR;
|
||||||
PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR GetPhysicalDeviceXcbPresentationSupportKHR;
|
PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR
|
||||||
|
GetPhysicalDeviceXcbPresentationSupportKHR;
|
||||||
#endif
|
#endif
|
||||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||||
PFN_vkCreateXlibSurfaceKHR CreateXlibSurfaceKHR;
|
PFN_vkCreateXlibSurfaceKHR CreateXlibSurfaceKHR;
|
||||||
PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR GetPhysicalDeviceXlibPresentationSupportKHR;
|
PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR
|
||||||
|
GetPhysicalDeviceXlibPresentationSupportKHR;
|
||||||
#endif
|
#endif
|
||||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||||
PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurfaceKHR;
|
PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurfaceKHR;
|
||||||
|
|
@ -195,8 +234,7 @@ typedef struct VkLayerInstanceDispatchTable_
|
||||||
} VkLayerInstanceDispatchTable;
|
} VkLayerInstanceDispatchTable;
|
||||||
|
|
||||||
// LL node for tree of dbg callback functions
|
// LL node for tree of dbg callback functions
|
||||||
typedef struct VkLayerDbgFunctionNode_
|
typedef struct VkLayerDbgFunctionNode_ {
|
||||||
{
|
|
||||||
VkDebugReportCallbackEXT msgCallback;
|
VkDebugReportCallbackEXT msgCallback;
|
||||||
PFN_vkDebugReportCallbackEXT pfnMsgCallback;
|
PFN_vkDebugReportCallbackEXT pfnMsgCallback;
|
||||||
VkFlags msgFlags;
|
VkFlags msgFlags;
|
||||||
|
|
@ -204,8 +242,7 @@ typedef struct VkLayerDbgFunctionNode_
|
||||||
struct VkLayerDbgFunctionNode_ *pNext;
|
struct VkLayerDbgFunctionNode_ *pNext;
|
||||||
} VkLayerDbgFunctionNode;
|
} VkLayerDbgFunctionNode;
|
||||||
|
|
||||||
typedef enum VkLayerDbgAction_
|
typedef enum VkLayerDbgAction_ {
|
||||||
{
|
|
||||||
VK_DBG_LAYER_ACTION_IGNORE = 0x0,
|
VK_DBG_LAYER_ACTION_IGNORE = 0x0,
|
||||||
VK_DBG_LAYER_ACTION_CALLBACK = 0x1,
|
VK_DBG_LAYER_ACTION_CALLBACK = 0x1,
|
||||||
VK_DBG_LAYER_ACTION_LOG_MSG = 0x2,
|
VK_DBG_LAYER_ACTION_LOG_MSG = 0x2,
|
||||||
|
|
@ -216,8 +253,7 @@ typedef enum VkLayerDbgAction_
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// CreateInstance and CreateDevice support structures
|
// CreateInstance and CreateDevice support structures
|
||||||
|
|
||||||
typedef enum VkLayerFunction_
|
typedef enum VkLayerFunction_ {
|
||||||
{
|
|
||||||
VK_LAYER_LINK_INFO = 0,
|
VK_LAYER_LINK_INFO = 0,
|
||||||
VK_LAYER_DEVICE_INFO = 1,
|
VK_LAYER_DEVICE_INFO = 1,
|
||||||
VK_LAYER_INSTANCE_INFO = 2
|
VK_LAYER_INSTANCE_INFO = 2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue