| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 1 | // | 
|  | 2 | // File: vk_layer.h | 
|  | 3 | // | 
|  | 4 | /* | 
|  | 5 | * Copyright (c) 2015-2016 The Khronos Group Inc. | 
|  | 6 | * Copyright (c) 2015-2016 Valve Corporation | 
|  | 7 | * Copyright (c) 2015-2016 LunarG, Inc. | 
|  | 8 | * | 
|  | 9 | * Permission is hereby granted, free of charge, to any person obtaining a copy | 
|  | 10 | * of this software and/or associated documentation files (the "Materials"), to | 
|  | 11 | * deal in the Materials without restriction, including without limitation the | 
|  | 12 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | 
|  | 13 | * sell copies of the Materials, and to permit persons to whom the Materials are | 
|  | 14 | * furnished to do so, subject to the following conditions: | 
|  | 15 | * | 
|  | 16 | * The above copyright notice(s) and this permission notice shall be included in | 
|  | 17 | * all copies or substantial portions of the Materials. | 
|  | 18 | * | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 19 | * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 
|  | 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 
|  | 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | 
|  | 22 | * | 
|  | 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | 
|  | 24 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | 
|  | 25 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE | 
|  | 26 | * USE OR OTHER DEALINGS IN THE MATERIALS. | 
|  | 27 | * | 
|  | 28 | */ | 
|  | 29 |  | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 30 | /* Need to define dispatch table | 
|  | 31 | * Core struct can then have ptr to dispatch table at the top | 
|  | 32 | * Along with object ptrs for current and next OBJ | 
|  | 33 | */ | 
|  | 34 | #pragma once | 
|  | 35 |  | 
| Karl Schultz | 1aec29c | 2016-02-10 15:41:43 -0700 | [diff] [blame] | 36 | #include "vulkan.h" | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 37 | #if defined(__GNUC__) && __GNUC__ >= 4 | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 38 | #define VK_LAYER_EXPORT __attribute__((visibility("default"))) | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 39 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 40 | #define VK_LAYER_EXPORT __attribute__((visibility("default"))) | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 41 | #else | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 42 | #define VK_LAYER_EXPORT | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 43 | #endif | 
|  | 44 |  | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 45 | typedef struct VkLayerDispatchTable_ { | 
| Jon Ashburn | 8d1b0b5 | 2015-05-18 13:20:15 -0600 | [diff] [blame] | 46 | PFN_vkGetDeviceProcAddr GetDeviceProcAddr; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 47 | PFN_vkDestroyDevice DestroyDevice; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 48 | PFN_vkGetDeviceQueue GetDeviceQueue; | 
|  | 49 | PFN_vkQueueSubmit QueueSubmit; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 50 | PFN_vkQueueWaitIdle QueueWaitIdle; | 
|  | 51 | PFN_vkDeviceWaitIdle DeviceWaitIdle; | 
| Chia-I Wu | 3432a0c | 2015-10-27 18:04:07 +0800 | [diff] [blame] | 52 | PFN_vkAllocateMemory AllocateMemory; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 53 | PFN_vkFreeMemory FreeMemory; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 54 | PFN_vkMapMemory MapMemory; | 
|  | 55 | PFN_vkUnmapMemory UnmapMemory; | 
| Courtney Goeltzenleuchter | f69f8a2 | 2015-04-29 17:16:21 -0600 | [diff] [blame] | 56 | PFN_vkFlushMappedMemoryRanges FlushMappedMemoryRanges; | 
|  | 57 | PFN_vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges; | 
| Courtney Goeltzenleuchter | fb71f22 | 2015-07-09 21:57:28 -0600 | [diff] [blame] | 58 | PFN_vkGetDeviceMemoryCommitment GetDeviceMemoryCommitment; | 
| Mark Lobodzinski | 16e8bef | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 59 | PFN_vkGetImageSparseMemoryRequirements GetImageSparseMemoryRequirements; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 60 | PFN_vkGetImageMemoryRequirements GetImageMemoryRequirements; | 
|  | 61 | PFN_vkGetBufferMemoryRequirements GetBufferMemoryRequirements; | 
|  | 62 | PFN_vkBindImageMemory BindImageMemory; | 
|  | 63 | PFN_vkBindBufferMemory BindBufferMemory; | 
| Chia-I Wu | 1ff4c3d | 2015-10-26 16:55:27 +0800 | [diff] [blame] | 64 | PFN_vkQueueBindSparse QueueBindSparse; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 65 | PFN_vkCreateFence CreateFence; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 66 | PFN_vkDestroyFence DestroyFence; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 67 | PFN_vkGetFenceStatus GetFenceStatus; | 
|  | 68 | PFN_vkResetFences ResetFences; | 
|  | 69 | PFN_vkWaitForFences WaitForFences; | 
|  | 70 | PFN_vkCreateSemaphore CreateSemaphore; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 71 | PFN_vkDestroySemaphore DestroySemaphore; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 72 | PFN_vkCreateEvent CreateEvent; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 73 | PFN_vkDestroyEvent DestroyEvent; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 74 | PFN_vkGetEventStatus GetEventStatus; | 
|  | 75 | PFN_vkSetEvent SetEvent; | 
|  | 76 | PFN_vkResetEvent ResetEvent; | 
|  | 77 | PFN_vkCreateQueryPool CreateQueryPool; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 78 | PFN_vkDestroyQueryPool DestroyQueryPool; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 79 | PFN_vkGetQueryPoolResults GetQueryPoolResults; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 80 | PFN_vkCreateBuffer CreateBuffer; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 81 | PFN_vkDestroyBuffer DestroyBuffer; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 82 | PFN_vkCreateBufferView CreateBufferView; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 83 | PFN_vkDestroyBufferView DestroyBufferView; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 84 | PFN_vkCreateImage CreateImage; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 85 | PFN_vkDestroyImage DestroyImage; | 
| Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 86 | PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 87 | PFN_vkCreateImageView CreateImageView; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 88 | PFN_vkDestroyImageView DestroyImageView; | 
| Courtney Goeltzenleuchter | 2d2cb68 | 2015-06-24 18:24:19 -0600 | [diff] [blame] | 89 | PFN_vkCreateShaderModule CreateShaderModule; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 90 | PFN_vkDestroyShaderModule DestroyShaderModule; | 
| Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 91 | PFN_vkCreatePipelineCache CreatePipelineCache; | 
|  | 92 | PFN_vkDestroyPipelineCache DestroyPipelineCache; | 
| Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 93 | PFN_vkGetPipelineCacheData GetPipelineCacheData; | 
|  | 94 | PFN_vkMergePipelineCaches MergePipelineCaches; | 
|  | 95 | PFN_vkCreateGraphicsPipelines CreateGraphicsPipelines; | 
|  | 96 | PFN_vkCreateComputePipelines CreateComputePipelines; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 97 | PFN_vkDestroyPipeline DestroyPipeline; | 
| Mark Lobodzinski | 0fadf5f | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 98 | PFN_vkCreatePipelineLayout CreatePipelineLayout; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 99 | PFN_vkDestroyPipelineLayout DestroyPipelineLayout; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 100 | PFN_vkCreateSampler CreateSampler; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 101 | PFN_vkDestroySampler DestroySampler; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 102 | PFN_vkCreateDescriptorSetLayout CreateDescriptorSetLayout; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 103 | PFN_vkDestroyDescriptorSetLayout DestroyDescriptorSetLayout; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 104 | PFN_vkCreateDescriptorPool CreateDescriptorPool; | 
| Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 105 | PFN_vkDestroyDescriptorPool DestroyDescriptorPool; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 106 | PFN_vkResetDescriptorPool ResetDescriptorPool; | 
| Chia-I Wu | 3432a0c | 2015-10-27 18:04:07 +0800 | [diff] [blame] | 107 | PFN_vkAllocateDescriptorSets AllocateDescriptorSets; | 
| Tony Barbour | 34ec692 | 2015-07-10 10:50:45 -0600 | [diff] [blame] | 108 | PFN_vkFreeDescriptorSets FreeDescriptorSets; | 
| Chia-I Wu | 9d00ed7 | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 109 | PFN_vkUpdateDescriptorSets UpdateDescriptorSets; | 
| Jon Ashburn | 42540ef | 2015-07-23 18:48:20 -0600 | [diff] [blame] | 110 | PFN_vkCreateFramebuffer CreateFramebuffer; | 
|  | 111 | PFN_vkDestroyFramebuffer DestroyFramebuffer; | 
|  | 112 | PFN_vkCreateRenderPass CreateRenderPass; | 
|  | 113 | PFN_vkDestroyRenderPass DestroyRenderPass; | 
|  | 114 | PFN_vkGetRenderAreaGranularity GetRenderAreaGranularity; | 
| Cody Northrop | e62183e | 2015-07-09 18:08:05 -0600 | [diff] [blame] | 115 | PFN_vkCreateCommandPool CreateCommandPool; | 
|  | 116 | PFN_vkDestroyCommandPool DestroyCommandPool; | 
|  | 117 | PFN_vkResetCommandPool ResetCommandPool; | 
| Chia-I Wu | 3432a0c | 2015-10-27 18:04:07 +0800 | [diff] [blame] | 118 | PFN_vkAllocateCommandBuffers AllocateCommandBuffers; | 
| Courtney Goeltzenleuchter | bee18a9 | 2015-10-23 14:21:05 -0600 | [diff] [blame] | 119 | PFN_vkFreeCommandBuffers FreeCommandBuffers; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 120 | PFN_vkBeginCommandBuffer BeginCommandBuffer; | 
|  | 121 | PFN_vkEndCommandBuffer EndCommandBuffer; | 
|  | 122 | PFN_vkResetCommandBuffer ResetCommandBuffer; | 
|  | 123 | PFN_vkCmdBindPipeline CmdBindPipeline; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 124 | PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets; | 
| Courtney Goeltzenleuchter | f68ad72 | 2015-04-16 13:38:46 -0600 | [diff] [blame] | 125 | PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 126 | PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer; | 
| Courtney Goeltzenleuchter | 49c7308 | 2015-09-17 15:06:17 -0600 | [diff] [blame] | 127 | PFN_vkCmdSetViewport CmdSetViewport; | 
| Courtney Goeltzenleuchter | 078f817 | 2015-09-21 11:44:06 -0600 | [diff] [blame] | 128 | PFN_vkCmdSetScissor CmdSetScissor; | 
| Courtney Goeltzenleuchter | 49c7308 | 2015-09-17 15:06:17 -0600 | [diff] [blame] | 129 | PFN_vkCmdSetLineWidth CmdSetLineWidth; | 
|  | 130 | PFN_vkCmdSetDepthBias CmdSetDepthBias; | 
|  | 131 | PFN_vkCmdSetBlendConstants CmdSetBlendConstants; | 
|  | 132 | PFN_vkCmdSetDepthBounds CmdSetDepthBounds; | 
|  | 133 | PFN_vkCmdSetStencilCompareMask CmdSetStencilCompareMask; | 
|  | 134 | PFN_vkCmdSetStencilWriteMask CmdSetStencilWriteMask; | 
|  | 135 | PFN_vkCmdSetStencilReference CmdSetStencilReference; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 136 | PFN_vkCmdDraw CmdDraw; | 
|  | 137 | PFN_vkCmdDrawIndexed CmdDrawIndexed; | 
|  | 138 | PFN_vkCmdDrawIndirect CmdDrawIndirect; | 
|  | 139 | PFN_vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect; | 
|  | 140 | PFN_vkCmdDispatch CmdDispatch; | 
|  | 141 | PFN_vkCmdDispatchIndirect CmdDispatchIndirect; | 
|  | 142 | PFN_vkCmdCopyBuffer CmdCopyBuffer; | 
|  | 143 | PFN_vkCmdCopyImage CmdCopyImage; | 
|  | 144 | PFN_vkCmdBlitImage CmdBlitImage; | 
|  | 145 | PFN_vkCmdCopyBufferToImage CmdCopyBufferToImage; | 
|  | 146 | PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 147 | PFN_vkCmdUpdateBuffer CmdUpdateBuffer; | 
|  | 148 | PFN_vkCmdFillBuffer CmdFillBuffer; | 
|  | 149 | PFN_vkCmdClearColorImage CmdClearColorImage; | 
| Chris Forbes | d9be82b | 2015-06-22 17:21:59 +1200 | [diff] [blame] | 150 | PFN_vkCmdClearDepthStencilImage CmdClearDepthStencilImage; | 
| Courtney Goeltzenleuchter | c9323e0 | 2015-10-15 16:51:05 -0600 | [diff] [blame] | 151 | PFN_vkCmdClearAttachments CmdClearAttachments; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 152 | PFN_vkCmdResolveImage CmdResolveImage; | 
|  | 153 | PFN_vkCmdSetEvent CmdSetEvent; | 
|  | 154 | PFN_vkCmdResetEvent CmdResetEvent; | 
|  | 155 | PFN_vkCmdWaitEvents CmdWaitEvents; | 
|  | 156 | PFN_vkCmdPipelineBarrier CmdPipelineBarrier; | 
|  | 157 | PFN_vkCmdBeginQuery CmdBeginQuery; | 
|  | 158 | PFN_vkCmdEndQuery CmdEndQuery; | 
|  | 159 | PFN_vkCmdResetQueryPool CmdResetQueryPool; | 
|  | 160 | PFN_vkCmdWriteTimestamp CmdWriteTimestamp; | 
| Courtney Goeltzenleuchter | 1dbc8e2 | 2015-04-15 18:21:13 -0600 | [diff] [blame] | 161 | PFN_vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults; | 
| Jon Ashburn | 42540ef | 2015-07-23 18:48:20 -0600 | [diff] [blame] | 162 | PFN_vkCmdPushConstants CmdPushConstants; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 163 | PFN_vkCmdBeginRenderPass CmdBeginRenderPass; | 
| Chia-I Wu | 08accc6 | 2015-07-07 11:50:03 +0800 | [diff] [blame] | 164 | PFN_vkCmdNextSubpass CmdNextSubpass; | 
| Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 165 | PFN_vkCmdEndRenderPass CmdEndRenderPass; | 
| Chia-I Wu | 0b50a1c | 2015-06-26 15:34:39 +0800 | [diff] [blame] | 166 | PFN_vkCmdExecuteCommands CmdExecuteCommands; | 
| Ian Elliott | 7e40db9 | 2015-08-21 15:09:33 -0600 | [diff] [blame] | 167 | PFN_vkCreateSwapchainKHR CreateSwapchainKHR; | 
|  | 168 | PFN_vkDestroySwapchainKHR DestroySwapchainKHR; | 
|  | 169 | PFN_vkGetSwapchainImagesKHR GetSwapchainImagesKHR; | 
|  | 170 | PFN_vkAcquireNextImageKHR AcquireNextImageKHR; | 
|  | 171 | PFN_vkQueuePresentKHR QueuePresentKHR; | 
| Jon Ashburn | bacb0f5 | 2015-04-06 10:58:22 -0600 | [diff] [blame] | 172 | } VkLayerDispatchTable; | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 173 |  | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 174 | typedef struct VkLayerInstanceDispatchTable_ { | 
| Jon Ashburn | fbb4e25 | 2015-05-04 16:27:53 -0600 | [diff] [blame] | 175 | PFN_vkGetInstanceProcAddr GetInstanceProcAddr; | 
| Jon Ashburn | fbb4e25 | 2015-05-04 16:27:53 -0600 | [diff] [blame] | 176 | PFN_vkDestroyInstance DestroyInstance; | 
|  | 177 | PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices; | 
| Chris Forbes | bc0bb77 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 178 | PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 179 | PFN_vkGetPhysicalDeviceImageFormatProperties | 
|  | 180 | GetPhysicalDeviceImageFormatProperties; | 
| Courtney Goeltzenleuchter | 2caec86 | 2015-07-12 12:52:09 -0600 | [diff] [blame] | 181 | PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 182 | PFN_vkGetPhysicalDeviceSparseImageFormatProperties | 
|  | 183 | GetPhysicalDeviceSparseImageFormatProperties; | 
| Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 184 | PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 185 | PFN_vkGetPhysicalDeviceQueueFamilyProperties | 
|  | 186 | GetPhysicalDeviceQueueFamilyProperties; | 
| Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 187 | PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties; | 
| Courtney Goeltzenleuchter | 35985f6 | 2015-09-14 17:22:16 -0600 | [diff] [blame] | 188 | PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties; | 
|  | 189 | PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties; | 
| Jon Ashburn | 2a1ec50 | 2015-11-23 18:55:15 -0700 | [diff] [blame] | 190 | PFN_vkDestroySurfaceKHR DestroySurfaceKHR; | 
| Ian Elliott | 7e40db9 | 2015-08-21 15:09:33 -0600 | [diff] [blame] | 191 | PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 192 | PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR | 
|  | 193 | GetPhysicalDeviceSurfaceCapabilitiesKHR; | 
| Ian Elliott | 33ed848 | 2015-11-18 15:20:45 -0700 | [diff] [blame] | 194 | PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 195 | PFN_vkGetPhysicalDeviceSurfacePresentModesKHR | 
|  | 196 | GetPhysicalDeviceSurfacePresentModesKHR; | 
| Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 197 | PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT; | 
|  | 198 | PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT; | 
|  | 199 | PFN_vkDebugReportMessageEXT DebugReportMessageEXT; | 
| Ian Elliott | db4300a | 2015-11-23 10:17:23 -0700 | [diff] [blame] | 200 | #ifdef VK_USE_PLATFORM_MIR_KHR | 
|  | 201 | PFN_vkCreateMirSurfaceKHR CreateMirSurfaceKHR; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 202 | PFN_vkGetPhysicalDeviceMirPresentationSupportKHR | 
|  | 203 | GetPhysicalDeviceMirPresentationSupportKHR; | 
| Ian Elliott | db4300a | 2015-11-23 10:17:23 -0700 | [diff] [blame] | 204 | #endif | 
|  | 205 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR | 
|  | 206 | PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 207 | PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR | 
|  | 208 | GetPhysicalDeviceWaylandPresentationSupportKHR; | 
| Ian Elliott | db4300a | 2015-11-23 10:17:23 -0700 | [diff] [blame] | 209 | #endif | 
|  | 210 | #ifdef VK_USE_PLATFORM_WIN32_KHR | 
|  | 211 | PFN_vkCreateWin32SurfaceKHR CreateWin32SurfaceKHR; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 212 | PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR | 
|  | 213 | GetPhysicalDeviceWin32PresentationSupportKHR; | 
| Ian Elliott | db4300a | 2015-11-23 10:17:23 -0700 | [diff] [blame] | 214 | #endif | 
|  | 215 | #ifdef VK_USE_PLATFORM_XCB_KHR | 
|  | 216 | PFN_vkCreateXcbSurfaceKHR CreateXcbSurfaceKHR; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 217 | PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR | 
|  | 218 | GetPhysicalDeviceXcbPresentationSupportKHR; | 
| Ian Elliott | db4300a | 2015-11-23 10:17:23 -0700 | [diff] [blame] | 219 | #endif | 
|  | 220 | #ifdef VK_USE_PLATFORM_XLIB_KHR | 
|  | 221 | PFN_vkCreateXlibSurfaceKHR CreateXlibSurfaceKHR; | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 222 | PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR | 
|  | 223 | GetPhysicalDeviceXlibPresentationSupportKHR; | 
| Ian Elliott | db4300a | 2015-11-23 10:17:23 -0700 | [diff] [blame] | 224 | #endif | 
| Mark Lobodzinski | a8a5f85 | 2015-12-10 16:25:21 -0700 | [diff] [blame] | 225 | #ifdef VK_USE_PLATFORM_ANDROID_KHR | 
|  | 226 | PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurfaceKHR; | 
|  | 227 | #endif | 
| Jon Ashburn | c7d3e73 | 2016-03-08 09:30:30 -0700 | [diff] [blame] | 228 | PFN_vkGetPhysicalDeviceDisplayPropertiesKHR | 
|  | 229 | GetPhysicalDeviceDisplayPropertiesKHR; | 
|  | 230 | PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR | 
|  | 231 | GetPhysicalDeviceDisplayPlanePropertiesKHR; | 
|  | 232 | PFN_vkGetDisplayPlaneSupportedDisplaysKHR | 
|  | 233 | GetDisplayPlaneSupportedDisplaysKHR; | 
|  | 234 | PFN_vkGetDisplayModePropertiesKHR | 
|  | 235 | GetDisplayModePropertiesKHR; | 
|  | 236 | PFN_vkCreateDisplayModeKHR | 
|  | 237 | CreateDisplayModeKHR; | 
|  | 238 | PFN_vkGetDisplayPlaneCapabilitiesKHR | 
|  | 239 | GetDisplayPlaneCapabilitiesKHR; | 
|  | 240 | PFN_vkCreateDisplayPlaneSurfaceKHR | 
|  | 241 | CreateDisplayPlaneSurfaceKHR; | 
| Jon Ashburn | fbb4e25 | 2015-05-04 16:27:53 -0600 | [diff] [blame] | 242 | } VkLayerInstanceDispatchTable; | 
|  | 243 |  | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 244 | // LL node for tree of dbg callback functions | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 245 | typedef struct VkLayerDbgFunctionNode_ { | 
| Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 246 | VkDebugReportCallbackEXT msgCallback; | 
|  | 247 | PFN_vkDebugReportCallbackEXT pfnMsgCallback; | 
| Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 248 | VkFlags msgFlags; | 
| Courtney Goeltzenleuchter | 23cc913 | 2016-01-18 17:42:08 -0700 | [diff] [blame] | 249 | void *pUserData; | 
| Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 250 | struct VkLayerDbgFunctionNode_ *pNext; | 
|  | 251 | } VkLayerDbgFunctionNode; | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 252 |  | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 253 | typedef enum VkLayerDbgAction_ { | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 254 | VK_DBG_LAYER_ACTION_IGNORE = 0x0, | 
|  | 255 | VK_DBG_LAYER_ACTION_CALLBACK = 0x1, | 
|  | 256 | VK_DBG_LAYER_ACTION_LOG_MSG = 0x2, | 
| Courtney Goeltzenleuchter | 5907ac4 | 2015-10-05 14:41:34 -0600 | [diff] [blame] | 257 | VK_DBG_LAYER_ACTION_BREAK = 0x4, | 
|  | 258 | VK_DBG_LAYER_ACTION_DEBUG_OUTPUT = 0x8, | 
| Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 259 | } VkLayerDbgAction; | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 260 |  | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 261 | // ------------------------------------------------------------------------------------------------ | 
| Courtney Goeltzenleuchter | 8286acc | 2016-01-08 11:40:27 -0700 | [diff] [blame] | 262 | // CreateInstance and CreateDevice support structures | 
| Courtney Goeltzenleuchter | 00150eb | 2016-01-08 12:18:43 -0700 | [diff] [blame] | 263 |  | 
| Jon Ashburn | c3c5877 | 2016-03-29 11:16:01 -0600 | [diff] [blame^] | 264 | /* Sub type of structure for instance and device loader ext of CreateInfo. | 
|  | 265 | * When sType == VK_STRUCTURE_TYPE_LAYER_INSTANCE_CREATE_INFO | 
|  | 266 | * or sType == VK_STRUCTURE_TYPE_LAYER_DEVICE_CREATE_INFO | 
|  | 267 | * then VkLayerFunction indicates struct type pointed to by pNext | 
|  | 268 | */ | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 269 | typedef enum VkLayerFunction_ { | 
| Courtney Goeltzenleuchter | 00150eb | 2016-01-08 12:18:43 -0700 | [diff] [blame] | 270 | VK_LAYER_LINK_INFO = 0, | 
| Jon Ashburn | c3c5877 | 2016-03-29 11:16:01 -0600 | [diff] [blame^] | 271 | VK_LAYER_DEVICE_INFO = 1, | 
|  | 272 | VK_LOADER_DISPATCH_CALLBACK = 2 | 
| Courtney Goeltzenleuchter | 00150eb | 2016-01-08 12:18:43 -0700 | [diff] [blame] | 273 | } VkLayerFunction; | 
|  | 274 |  | 
| Courtney Goeltzenleuchter | 8286acc | 2016-01-08 11:40:27 -0700 | [diff] [blame] | 275 | typedef struct VkLayerInstanceLink_ { | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 276 | struct VkLayerInstanceLink_ *pNext; | 
| Courtney Goeltzenleuchter | 8286acc | 2016-01-08 11:40:27 -0700 | [diff] [blame] | 277 | PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; | 
|  | 278 | } VkLayerInstanceLink; | 
|  | 279 |  | 
| Courtney Goeltzenleuchter | 00150eb | 2016-01-08 12:18:43 -0700 | [diff] [blame] | 280 | /* | 
|  | 281 | * When creating the device chain the loader needs to pass | 
|  | 282 | * down information about it's device structure needed at | 
|  | 283 | * the end of the chain. Passing the data via the | 
|  | 284 | * VkLayerDeviceInfo avoids issues with finding the | 
|  | 285 | * exact instance being used. | 
|  | 286 | */ | 
|  | 287 | typedef struct VkLayerDeviceInfo_ { | 
|  | 288 | void *device_info; | 
|  | 289 | PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; | 
|  | 290 | } VkLayerDeviceInfo; | 
|  | 291 |  | 
| Jon Ashburn | c3c5877 | 2016-03-29 11:16:01 -0600 | [diff] [blame^] | 292 | typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance, | 
|  | 293 | void *object); | 
|  | 294 |  | 
| Courtney Goeltzenleuchter | 8286acc | 2016-01-08 11:40:27 -0700 | [diff] [blame] | 295 | typedef struct { | 
|  | 296 | VkStructureType sType; // VK_STRUCTURE_TYPE_LAYER_INSTANCE_CREATE_INFO | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 297 | const void *pNext; | 
| Courtney Goeltzenleuchter | 00150eb | 2016-01-08 12:18:43 -0700 | [diff] [blame] | 298 | VkLayerFunction function; | 
|  | 299 | union { | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 300 | VkLayerInstanceLink *pLayerInfo; | 
| Jon Ashburn | c3c5877 | 2016-03-29 11:16:01 -0600 | [diff] [blame^] | 301 | PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData; | 
| Courtney Goeltzenleuchter | 00150eb | 2016-01-08 12:18:43 -0700 | [diff] [blame] | 302 | } u; | 
| Courtney Goeltzenleuchter | 8286acc | 2016-01-08 11:40:27 -0700 | [diff] [blame] | 303 | } VkLayerInstanceCreateInfo; | 
|  | 304 |  | 
|  | 305 | typedef struct VkLayerDeviceLink_ { | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 306 | struct VkLayerDeviceLink_ *pNext; | 
| Courtney Goeltzenleuchter | 8286acc | 2016-01-08 11:40:27 -0700 | [diff] [blame] | 307 | PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; | 
|  | 308 | PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr; | 
|  | 309 | } VkLayerDeviceLink; | 
|  | 310 |  | 
|  | 311 | typedef struct { | 
|  | 312 | VkStructureType sType; // VK_STRUCTURE_TYPE_LAYER_DEVICE_CREATE_INFO | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 313 | const void *pNext; | 
| Courtney Goeltzenleuchter | 00150eb | 2016-01-08 12:18:43 -0700 | [diff] [blame] | 314 | VkLayerFunction function; | 
|  | 315 | union { | 
| Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 316 | VkLayerDeviceLink *pLayerInfo; | 
| Courtney Goeltzenleuchter | 00150eb | 2016-01-08 12:18:43 -0700 | [diff] [blame] | 317 | VkLayerDeviceInfo deviceInfo; | 
|  | 318 | } u; | 
| Courtney Goeltzenleuchter | 8286acc | 2016-01-08 11:40:27 -0700 | [diff] [blame] | 319 | } VkLayerDeviceCreateInfo; | 
|  | 320 |  | 
|  | 321 | // ------------------------------------------------------------------------------------------------ | 
| Courtney Goeltzenleuchter | 64d1a71 | 2015-04-08 18:04:29 -0600 | [diff] [blame] | 322 | // API functions |