Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | ** Copyright (c) 2015-2018 The Khronos Group Inc. |
| 3 | ** |
| 4 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | ** you may not use this file except in compliance with the License. |
| 6 | ** You may obtain a copy of the License at |
| 7 | ** |
| 8 | ** http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | ** |
| 10 | ** Unless required by applicable law or agreed to in writing, software |
| 11 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | ** See the License for the specific language governing permissions and |
| 14 | ** limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | ** This header is generated from the Khronos Vulkan XML API Registry. |
| 19 | ** |
| 20 | */ |
| 21 | |
| 22 | #include "mock_icd.h" |
| 23 | #include <stdlib.h> |
Petr Kraus | a7aff24 | 2020-04-08 20:57:14 +0200 | [diff] [blame] | 24 | #include <algorithm> |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 25 | #include <array> |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 26 | #include <vector> |
| 27 | #include "vk_typemap_helper.h" |
| 28 | namespace vkmock { |
| 29 | |
| 30 | |
| 31 | using std::unordered_map; |
| 32 | |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 33 | static constexpr uint32_t icd_physical_device_count = 1; |
Tobin Ehlis | 9d7880c | 2020-06-04 21:31:45 -0600 | [diff] [blame] | 34 | static constexpr uint32_t kSupportedVulkanAPIVersion = VK_API_VERSION_1_1; |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 35 | static unordered_map<VkInstance, std::array<VkPhysicalDevice, icd_physical_device_count>> physical_device_map; |
| 36 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 37 | // Map device memory handle to any mapped allocations that we'll need to free on unmap |
| 38 | static unordered_map<VkDeviceMemory, std::vector<void*>> mapped_memory_map; |
| 39 | |
Tobin Ehlis | ae67871 | 2020-04-08 16:07:25 -0600 | [diff] [blame] | 40 | // Map device memory allocation handle to the size |
| 41 | static unordered_map<VkDeviceMemory, VkDeviceSize> allocated_memory_size_map; |
| 42 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 43 | static unordered_map<VkDevice, unordered_map<uint32_t, unordered_map<uint32_t, VkQueue>>> queue_map; |
| 44 | static unordered_map<VkDevice, unordered_map<VkBuffer, VkBufferCreateInfo>> buffer_map; |
locke-lunarg | 454ab25 | 2020-04-15 22:49:19 -0600 | [diff] [blame] | 45 | static unordered_map<VkDevice, unordered_map<VkImage, VkDeviceSize>> image_memory_size_map; |
nyorain | 00b06c3 | 2022-01-21 16:06:11 +0100 | [diff] [blame] | 46 | static unordered_map<VkCommandPool, std::vector<VkCommandBuffer>> command_pool_buffer_map; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 47 | |
Petr Kraus | 490e393 | 2020-04-08 21:47:25 +0200 | [diff] [blame] | 48 | static constexpr uint32_t icd_swapchain_image_count = 1; |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 49 | static unordered_map<VkSwapchainKHR, VkImage[icd_swapchain_image_count]> swapchain_image_map; |
Petr Kraus | 490e393 | 2020-04-08 21:47:25 +0200 | [diff] [blame] | 50 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 51 | // TODO: Would like to codegen this but limits aren't in XML |
| 52 | static VkPhysicalDeviceLimits SetLimits(VkPhysicalDeviceLimits *limits) { |
| 53 | limits->maxImageDimension1D = 4096; |
| 54 | limits->maxImageDimension2D = 4096; |
| 55 | limits->maxImageDimension3D = 256; |
| 56 | limits->maxImageDimensionCube = 4096; |
| 57 | limits->maxImageArrayLayers = 256; |
| 58 | limits->maxTexelBufferElements = 65536; |
| 59 | limits->maxUniformBufferRange = 16384; |
| 60 | limits->maxStorageBufferRange = 134217728; |
| 61 | limits->maxPushConstantsSize = 128; |
| 62 | limits->maxMemoryAllocationCount = 4096; |
| 63 | limits->maxSamplerAllocationCount = 4000; |
| 64 | limits->bufferImageGranularity = 1; |
| 65 | limits->sparseAddressSpaceSize = 2147483648; |
| 66 | limits->maxBoundDescriptorSets = 4; |
| 67 | limits->maxPerStageDescriptorSamplers = 16; |
| 68 | limits->maxPerStageDescriptorUniformBuffers = 12; |
| 69 | limits->maxPerStageDescriptorStorageBuffers = 4; |
| 70 | limits->maxPerStageDescriptorSampledImages = 16; |
| 71 | limits->maxPerStageDescriptorStorageImages = 4; |
| 72 | limits->maxPerStageDescriptorInputAttachments = 4; |
Mike Schuchardt | c60f790 | 2019-09-12 11:28:15 -0700 | [diff] [blame] | 73 | limits->maxPerStageResources = 128; |
| 74 | limits->maxDescriptorSetSamplers = 96; |
| 75 | limits->maxDescriptorSetUniformBuffers = 72; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 76 | limits->maxDescriptorSetUniformBuffersDynamic = 8; |
Mike Schuchardt | c60f790 | 2019-09-12 11:28:15 -0700 | [diff] [blame] | 77 | limits->maxDescriptorSetStorageBuffers = 24; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 78 | limits->maxDescriptorSetStorageBuffersDynamic = 4; |
Mike Schuchardt | c60f790 | 2019-09-12 11:28:15 -0700 | [diff] [blame] | 79 | limits->maxDescriptorSetSampledImages = 96; |
| 80 | limits->maxDescriptorSetStorageImages = 24; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 81 | limits->maxDescriptorSetInputAttachments = 4; |
| 82 | limits->maxVertexInputAttributes = 16; |
| 83 | limits->maxVertexInputBindings = 16; |
| 84 | limits->maxVertexInputAttributeOffset = 2047; |
| 85 | limits->maxVertexInputBindingStride = 2048; |
| 86 | limits->maxVertexOutputComponents = 64; |
| 87 | limits->maxTessellationGenerationLevel = 64; |
| 88 | limits->maxTessellationPatchSize = 32; |
| 89 | limits->maxTessellationControlPerVertexInputComponents = 64; |
| 90 | limits->maxTessellationControlPerVertexOutputComponents = 64; |
| 91 | limits->maxTessellationControlPerPatchOutputComponents = 120; |
| 92 | limits->maxTessellationControlTotalOutputComponents = 2048; |
| 93 | limits->maxTessellationEvaluationInputComponents = 64; |
| 94 | limits->maxTessellationEvaluationOutputComponents = 64; |
| 95 | limits->maxGeometryShaderInvocations = 32; |
| 96 | limits->maxGeometryInputComponents = 64; |
| 97 | limits->maxGeometryOutputComponents = 64; |
| 98 | limits->maxGeometryOutputVertices = 256; |
| 99 | limits->maxGeometryTotalOutputComponents = 1024; |
| 100 | limits->maxFragmentInputComponents = 64; |
| 101 | limits->maxFragmentOutputAttachments = 4; |
| 102 | limits->maxFragmentDualSrcAttachments = 1; |
| 103 | limits->maxFragmentCombinedOutputResources = 4; |
| 104 | limits->maxComputeSharedMemorySize = 16384; |
| 105 | limits->maxComputeWorkGroupCount[0] = 65535; |
| 106 | limits->maxComputeWorkGroupCount[1] = 65535; |
| 107 | limits->maxComputeWorkGroupCount[2] = 65535; |
| 108 | limits->maxComputeWorkGroupInvocations = 128; |
| 109 | limits->maxComputeWorkGroupSize[0] = 128; |
| 110 | limits->maxComputeWorkGroupSize[1] = 128; |
| 111 | limits->maxComputeWorkGroupSize[2] = 64; |
| 112 | limits->subPixelPrecisionBits = 4; |
| 113 | limits->subTexelPrecisionBits = 4; |
| 114 | limits->mipmapPrecisionBits = 4; |
Mike Schuchardt | c60f790 | 2019-09-12 11:28:15 -0700 | [diff] [blame] | 115 | limits->maxDrawIndexedIndexValue = UINT32_MAX; |
| 116 | limits->maxDrawIndirectCount = UINT16_MAX; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 117 | limits->maxSamplerLodBias = 2.0f; |
| 118 | limits->maxSamplerAnisotropy = 16; |
| 119 | limits->maxViewports = 16; |
| 120 | limits->maxViewportDimensions[0] = 4096; |
| 121 | limits->maxViewportDimensions[1] = 4096; |
| 122 | limits->viewportBoundsRange[0] = -8192; |
| 123 | limits->viewportBoundsRange[1] = 8191; |
| 124 | limits->viewportSubPixelBits = 0; |
| 125 | limits->minMemoryMapAlignment = 64; |
| 126 | limits->minTexelBufferOffsetAlignment = 16; |
| 127 | limits->minUniformBufferOffsetAlignment = 16; |
| 128 | limits->minStorageBufferOffsetAlignment = 16; |
| 129 | limits->minTexelOffset = -8; |
| 130 | limits->maxTexelOffset = 7; |
| 131 | limits->minTexelGatherOffset = -8; |
| 132 | limits->maxTexelGatherOffset = 7; |
| 133 | limits->minInterpolationOffset = 0.0f; |
| 134 | limits->maxInterpolationOffset = 0.5f; |
| 135 | limits->subPixelInterpolationOffsetBits = 4; |
| 136 | limits->maxFramebufferWidth = 4096; |
| 137 | limits->maxFramebufferHeight = 4096; |
| 138 | limits->maxFramebufferLayers = 256; |
| 139 | limits->framebufferColorSampleCounts = 0x7F; |
| 140 | limits->framebufferDepthSampleCounts = 0x7F; |
| 141 | limits->framebufferStencilSampleCounts = 0x7F; |
| 142 | limits->framebufferNoAttachmentsSampleCounts = 0x7F; |
| 143 | limits->maxColorAttachments = 4; |
| 144 | limits->sampledImageColorSampleCounts = 0x7F; |
| 145 | limits->sampledImageIntegerSampleCounts = 0x7F; |
| 146 | limits->sampledImageDepthSampleCounts = 0x7F; |
| 147 | limits->sampledImageStencilSampleCounts = 0x7F; |
| 148 | limits->storageImageSampleCounts = 0x7F; |
| 149 | limits->maxSampleMaskWords = 1; |
| 150 | limits->timestampComputeAndGraphics = VK_TRUE; |
| 151 | limits->timestampPeriod = 1; |
| 152 | limits->maxClipDistances = 8; |
| 153 | limits->maxCullDistances = 8; |
| 154 | limits->maxCombinedClipAndCullDistances = 8; |
| 155 | limits->discreteQueuePriorities = 2; |
| 156 | limits->pointSizeRange[0] = 1.0f; |
| 157 | limits->pointSizeRange[1] = 64.0f; |
| 158 | limits->lineWidthRange[0] = 1.0f; |
| 159 | limits->lineWidthRange[1] = 8.0f; |
| 160 | limits->pointSizeGranularity = 1.0f; |
| 161 | limits->lineWidthGranularity = 1.0f; |
| 162 | limits->strictLines = VK_TRUE; |
| 163 | limits->standardSampleLocations = VK_TRUE; |
| 164 | limits->optimalBufferCopyOffsetAlignment = 1; |
| 165 | limits->optimalBufferCopyRowPitchAlignment = 1; |
| 166 | limits->nonCoherentAtomSize = 256; |
| 167 | |
| 168 | return *limits; |
| 169 | } |
| 170 | |
| 171 | void SetBoolArrayTrue(VkBool32* bool_array, uint32_t num_bools) |
| 172 | { |
| 173 | for (uint32_t i = 0; i < num_bools; ++i) { |
| 174 | bool_array[i] = VK_TRUE; |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | |
| 179 | |
| 180 | static VKAPI_ATTR VkResult VKAPI_CALL CreateInstance( |
| 181 | const VkInstanceCreateInfo* pCreateInfo, |
| 182 | const VkAllocationCallbacks* pAllocator, |
| 183 | VkInstance* pInstance) |
| 184 | { |
| 185 | |
| 186 | // TODO: If loader ver <=4 ICD must fail with VK_ERROR_INCOMPATIBLE_DRIVER for all vkCreateInstance calls with |
| 187 | // apiVersion set to > Vulkan 1.0 because the loader is still at interface version <= 4. Otherwise, the |
| 188 | // ICD should behave as normal. |
| 189 | if (loader_interface_version <= 4) { |
| 190 | return VK_ERROR_INCOMPATIBLE_DRIVER; |
| 191 | } |
| 192 | *pInstance = (VkInstance)CreateDispObjHandle(); |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 193 | for (auto& physical_device : physical_device_map[*pInstance]) |
| 194 | physical_device = (VkPhysicalDevice)CreateDispObjHandle(); |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 195 | // TODO: If emulating specific device caps, will need to add intelligence here |
| 196 | return VK_SUCCESS; |
| 197 | } |
| 198 | |
| 199 | static VKAPI_ATTR void VKAPI_CALL DestroyInstance( |
| 200 | VkInstance instance, |
| 201 | const VkAllocationCallbacks* pAllocator) |
| 202 | { |
| 203 | |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 204 | if (instance) { |
| 205 | for (const auto physical_device : physical_device_map.at(instance)) |
| 206 | DestroyDispObjHandle((void*)physical_device); |
| 207 | physical_device_map.erase(instance); |
| 208 | DestroyDispObjHandle((void*)instance); |
| 209 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 210 | } |
| 211 | |
| 212 | static VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices( |
| 213 | VkInstance instance, |
| 214 | uint32_t* pPhysicalDeviceCount, |
| 215 | VkPhysicalDevice* pPhysicalDevices) |
| 216 | { |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 217 | VkResult result_code = VK_SUCCESS; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 218 | if (pPhysicalDevices) { |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 219 | const auto return_count = (std::min)(*pPhysicalDeviceCount, icd_physical_device_count); |
| 220 | for (uint32_t i = 0; i < return_count; ++i) pPhysicalDevices[i] = physical_device_map.at(instance)[i]; |
| 221 | if (return_count < icd_physical_device_count) result_code = VK_INCOMPLETE; |
| 222 | *pPhysicalDeviceCount = return_count; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 223 | } else { |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 224 | *pPhysicalDeviceCount = icd_physical_device_count; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 225 | } |
Petr Kraus | 0d4857e | 2020-04-15 00:29:33 +0200 | [diff] [blame] | 226 | return result_code; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 227 | } |
| 228 | |
| 229 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures( |
| 230 | VkPhysicalDevice physicalDevice, |
| 231 | VkPhysicalDeviceFeatures* pFeatures) |
| 232 | { |
| 233 | uint32_t num_bools = sizeof(VkPhysicalDeviceFeatures) / sizeof(VkBool32); |
| 234 | VkBool32 *bool_array = &pFeatures->robustBufferAccess; |
| 235 | SetBoolArrayTrue(bool_array, num_bools); |
| 236 | } |
| 237 | |
| 238 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties( |
| 239 | VkPhysicalDevice physicalDevice, |
| 240 | VkFormat format, |
| 241 | VkFormatProperties* pFormatProperties) |
| 242 | { |
| 243 | if (VK_FORMAT_UNDEFINED == format) { |
| 244 | *pFormatProperties = { 0x0, 0x0, 0x0 }; |
| 245 | } else { |
Tobin Ehlis | 1d17650 | 2020-09-25 16:03:40 -0600 | [diff] [blame] | 246 | // Default to a color format, skip DS bit |
| 247 | *pFormatProperties = { 0x00FFFDFF, 0x00FFFDFF, 0x00FFFDFF }; |
| 248 | switch (format) { |
| 249 | case VK_FORMAT_D16_UNORM: |
| 250 | case VK_FORMAT_X8_D24_UNORM_PACK32: |
| 251 | case VK_FORMAT_D32_SFLOAT: |
| 252 | case VK_FORMAT_S8_UINT: |
| 253 | case VK_FORMAT_D16_UNORM_S8_UINT: |
| 254 | case VK_FORMAT_D24_UNORM_S8_UINT: |
| 255 | case VK_FORMAT_D32_SFLOAT_S8_UINT: |
| 256 | // Don't set color bits for DS formats |
| 257 | *pFormatProperties = { 0x00FFFE7F, 0x00FFFE7F, 0x00FFFE7F }; |
| 258 | break; |
| 259 | default: |
| 260 | break; |
| 261 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 262 | } |
| 263 | } |
| 264 | |
| 265 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties( |
| 266 | VkPhysicalDevice physicalDevice, |
| 267 | VkFormat format, |
| 268 | VkImageType type, |
| 269 | VkImageTiling tiling, |
| 270 | VkImageUsageFlags usage, |
| 271 | VkImageCreateFlags flags, |
| 272 | VkImageFormatProperties* pImageFormatProperties) |
| 273 | { |
| 274 | // A hardcoded unsupported format |
| 275 | if (format == VK_FORMAT_E5B9G9R9_UFLOAT_PACK32) { |
| 276 | return VK_ERROR_FORMAT_NOT_SUPPORTED; |
| 277 | } |
| 278 | |
| 279 | // TODO: Just hard-coding some values for now |
| 280 | // TODO: If tiling is linear, limit the mips, levels, & sample count |
| 281 | if (VK_IMAGE_TILING_LINEAR == tiling) { |
| 282 | *pImageFormatProperties = { { 4096, 4096, 256 }, 1, 1, VK_SAMPLE_COUNT_1_BIT, 4294967296 }; |
| 283 | } else { |
| 284 | // We hard-code support for all sample counts except 64 bits. |
| 285 | *pImageFormatProperties = { { 4096, 4096, 256 }, 12, 256, 0x7F & ~VK_SAMPLE_COUNT_64_BIT, 4294967296 }; |
| 286 | } |
| 287 | return VK_SUCCESS; |
| 288 | } |
| 289 | |
| 290 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties( |
| 291 | VkPhysicalDevice physicalDevice, |
| 292 | VkPhysicalDeviceProperties* pProperties) |
| 293 | { |
| 294 | // TODO: Just hard-coding some values for now |
Tobin Ehlis | 9d7880c | 2020-06-04 21:31:45 -0600 | [diff] [blame] | 295 | pProperties->apiVersion = kSupportedVulkanAPIVersion; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 296 | pProperties->driverVersion = 1; |
| 297 | pProperties->vendorID = 0xba5eba11; |
| 298 | pProperties->deviceID = 0xf005ba11; |
| 299 | pProperties->deviceType = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU; |
| 300 | //std::string devName = "Vulkan Mock Device"; |
| 301 | strcpy(pProperties->deviceName, "Vulkan Mock Device"); |
| 302 | pProperties->pipelineCacheUUID[0] = 18; |
| 303 | pProperties->limits = SetLimits(&pProperties->limits); |
| 304 | pProperties->sparseProperties = { VK_TRUE, VK_TRUE, VK_TRUE, VK_TRUE, VK_TRUE }; |
| 305 | } |
| 306 | |
| 307 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties( |
| 308 | VkPhysicalDevice physicalDevice, |
| 309 | uint32_t* pQueueFamilyPropertyCount, |
| 310 | VkQueueFamilyProperties* pQueueFamilyProperties) |
| 311 | { |
| 312 | if (!pQueueFamilyProperties) { |
| 313 | *pQueueFamilyPropertyCount = 1; |
| 314 | } else { |
| 315 | if (*pQueueFamilyPropertyCount) { |
| 316 | pQueueFamilyProperties[0].queueFlags = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT | VK_QUEUE_SPARSE_BINDING_BIT; |
| 317 | pQueueFamilyProperties[0].queueCount = 1; |
| 318 | pQueueFamilyProperties[0].timestampValidBits = 0; |
| 319 | pQueueFamilyProperties[0].minImageTransferGranularity = {1,1,1}; |
| 320 | } |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties( |
| 325 | VkPhysicalDevice physicalDevice, |
| 326 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) |
| 327 | { |
| 328 | pMemoryProperties->memoryTypeCount = 2; |
| 329 | pMemoryProperties->memoryTypes[0].propertyFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; |
| 330 | pMemoryProperties->memoryTypes[0].heapIndex = 0; |
| 331 | pMemoryProperties->memoryTypes[1].propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; |
| 332 | pMemoryProperties->memoryTypes[1].heapIndex = 1; |
| 333 | pMemoryProperties->memoryHeapCount = 2; |
| 334 | pMemoryProperties->memoryHeaps[0].flags = 0; |
| 335 | pMemoryProperties->memoryHeaps[0].size = 8000000000; |
| 336 | pMemoryProperties->memoryHeaps[1].flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT; |
| 337 | pMemoryProperties->memoryHeaps[1].size = 8000000000; |
| 338 | } |
| 339 | |
| 340 | static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr( |
| 341 | VkInstance instance, |
| 342 | const char* pName) |
| 343 | { |
| 344 | |
| 345 | if (!negotiate_loader_icd_interface_called) { |
| 346 | loader_interface_version = 0; |
| 347 | } |
| 348 | const auto &item = name_to_funcptr_map.find(pName); |
| 349 | if (item != name_to_funcptr_map.end()) { |
| 350 | return reinterpret_cast<PFN_vkVoidFunction>(item->second); |
| 351 | } |
| 352 | // Mock should intercept all functions so if we get here just return null |
| 353 | return nullptr; |
| 354 | } |
| 355 | |
| 356 | static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr( |
| 357 | VkDevice device, |
| 358 | const char* pName) |
| 359 | { |
| 360 | |
| 361 | return GetInstanceProcAddr(nullptr, pName); |
| 362 | } |
| 363 | |
| 364 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDevice( |
| 365 | VkPhysicalDevice physicalDevice, |
| 366 | const VkDeviceCreateInfo* pCreateInfo, |
| 367 | const VkAllocationCallbacks* pAllocator, |
| 368 | VkDevice* pDevice) |
| 369 | { |
| 370 | |
| 371 | *pDevice = (VkDevice)CreateDispObjHandle(); |
| 372 | // TODO: If emulating specific device caps, will need to add intelligence here |
| 373 | return VK_SUCCESS; |
| 374 | } |
| 375 | |
| 376 | static VKAPI_ATTR void VKAPI_CALL DestroyDevice( |
| 377 | VkDevice device, |
| 378 | const VkAllocationCallbacks* pAllocator) |
| 379 | { |
| 380 | |
| 381 | unique_lock_t lock(global_lock); |
| 382 | // First destroy sub-device objects |
| 383 | // Destroy Queues |
nyorain | b69bea3 | 2022-01-21 16:09:49 +0100 | [diff] [blame] | 384 | for (auto queue_family_map_pair : queue_map[device]) { |
| 385 | for (auto index_queue_pair : queue_map[device][queue_family_map_pair.first]) { |
| 386 | DestroyDispObjHandle((void*)index_queue_pair.second); |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 387 | } |
| 388 | } |
nyorain | b69bea3 | 2022-01-21 16:09:49 +0100 | [diff] [blame] | 389 | |
| 390 | queue_map.erase(device); |
locke-lunarg | 454ab25 | 2020-04-15 22:49:19 -0600 | [diff] [blame] | 391 | buffer_map.erase(device); |
| 392 | image_memory_size_map.erase(device); |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 393 | // Now destroy device |
| 394 | DestroyDispObjHandle((void*)device); |
| 395 | // TODO: If emulating specific device caps, will need to add intelligence here |
| 396 | } |
| 397 | |
| 398 | static VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceExtensionProperties( |
| 399 | const char* pLayerName, |
| 400 | uint32_t* pPropertyCount, |
| 401 | VkExtensionProperties* pProperties) |
| 402 | { |
| 403 | |
| 404 | // If requesting number of extensions, return that |
| 405 | if (!pLayerName) { |
| 406 | if (!pProperties) { |
| 407 | *pPropertyCount = (uint32_t)instance_extension_map.size(); |
| 408 | } else { |
| 409 | uint32_t i = 0; |
| 410 | for (const auto &name_ver_pair : instance_extension_map) { |
| 411 | if (i == *pPropertyCount) { |
| 412 | break; |
| 413 | } |
| 414 | std::strncpy(pProperties[i].extensionName, name_ver_pair.first.c_str(), sizeof(pProperties[i].extensionName)); |
| 415 | pProperties[i].extensionName[sizeof(pProperties[i].extensionName) - 1] = 0; |
| 416 | pProperties[i].specVersion = name_ver_pair.second; |
| 417 | ++i; |
| 418 | } |
| 419 | if (i != instance_extension_map.size()) { |
| 420 | return VK_INCOMPLETE; |
| 421 | } |
| 422 | } |
| 423 | } |
| 424 | // If requesting extension properties, fill in data struct for number of extensions |
| 425 | return VK_SUCCESS; |
| 426 | } |
| 427 | |
| 428 | static VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties( |
| 429 | VkPhysicalDevice physicalDevice, |
| 430 | const char* pLayerName, |
| 431 | uint32_t* pPropertyCount, |
| 432 | VkExtensionProperties* pProperties) |
| 433 | { |
| 434 | |
| 435 | // If requesting number of extensions, return that |
| 436 | if (!pLayerName) { |
| 437 | if (!pProperties) { |
| 438 | *pPropertyCount = (uint32_t)device_extension_map.size(); |
| 439 | } else { |
| 440 | uint32_t i = 0; |
| 441 | for (const auto &name_ver_pair : device_extension_map) { |
| 442 | if (i == *pPropertyCount) { |
| 443 | break; |
| 444 | } |
| 445 | std::strncpy(pProperties[i].extensionName, name_ver_pair.first.c_str(), sizeof(pProperties[i].extensionName)); |
| 446 | pProperties[i].extensionName[sizeof(pProperties[i].extensionName) - 1] = 0; |
| 447 | pProperties[i].specVersion = name_ver_pair.second; |
| 448 | ++i; |
| 449 | } |
| 450 | if (i != device_extension_map.size()) { |
| 451 | return VK_INCOMPLETE; |
| 452 | } |
| 453 | } |
| 454 | } |
| 455 | // If requesting extension properties, fill in data struct for number of extensions |
| 456 | return VK_SUCCESS; |
| 457 | } |
| 458 | |
| 459 | static VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties( |
| 460 | uint32_t* pPropertyCount, |
| 461 | VkLayerProperties* pProperties) |
| 462 | { |
| 463 | |
| 464 | return VK_SUCCESS; |
| 465 | } |
| 466 | |
| 467 | static VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceLayerProperties( |
| 468 | VkPhysicalDevice physicalDevice, |
| 469 | uint32_t* pPropertyCount, |
| 470 | VkLayerProperties* pProperties) |
| 471 | { |
| 472 | |
| 473 | return VK_SUCCESS; |
| 474 | } |
| 475 | |
| 476 | static VKAPI_ATTR void VKAPI_CALL GetDeviceQueue( |
| 477 | VkDevice device, |
| 478 | uint32_t queueFamilyIndex, |
| 479 | uint32_t queueIndex, |
| 480 | VkQueue* pQueue) |
| 481 | { |
| 482 | unique_lock_t lock(global_lock); |
| 483 | auto queue = queue_map[device][queueFamilyIndex][queueIndex]; |
| 484 | if (queue) { |
| 485 | *pQueue = queue; |
| 486 | } else { |
| 487 | *pQueue = queue_map[device][queueFamilyIndex][queueIndex] = (VkQueue)CreateDispObjHandle(); |
| 488 | } |
| 489 | // TODO: If emulating specific device caps, will need to add intelligence here |
| 490 | return; |
| 491 | } |
| 492 | |
| 493 | static VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit( |
| 494 | VkQueue queue, |
| 495 | uint32_t submitCount, |
| 496 | const VkSubmitInfo* pSubmits, |
| 497 | VkFence fence) |
| 498 | { |
| 499 | //Not a CREATE or DESTROY function |
| 500 | return VK_SUCCESS; |
| 501 | } |
| 502 | |
| 503 | static VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle( |
| 504 | VkQueue queue) |
| 505 | { |
| 506 | //Not a CREATE or DESTROY function |
| 507 | return VK_SUCCESS; |
| 508 | } |
| 509 | |
| 510 | static VKAPI_ATTR VkResult VKAPI_CALL DeviceWaitIdle( |
| 511 | VkDevice device) |
| 512 | { |
| 513 | //Not a CREATE or DESTROY function |
| 514 | return VK_SUCCESS; |
| 515 | } |
| 516 | |
| 517 | static VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory( |
| 518 | VkDevice device, |
| 519 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 520 | const VkAllocationCallbacks* pAllocator, |
| 521 | VkDeviceMemory* pMemory) |
| 522 | { |
| 523 | unique_lock_t lock(global_lock); |
Tobin Ehlis | ae67871 | 2020-04-08 16:07:25 -0600 | [diff] [blame] | 524 | allocated_memory_size_map[(VkDeviceMemory)global_unique_handle] = pAllocateInfo->allocationSize; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 525 | *pMemory = (VkDeviceMemory)global_unique_handle++; |
| 526 | return VK_SUCCESS; |
| 527 | } |
| 528 | |
| 529 | static VKAPI_ATTR void VKAPI_CALL FreeMemory( |
| 530 | VkDevice device, |
| 531 | VkDeviceMemory memory, |
| 532 | const VkAllocationCallbacks* pAllocator) |
| 533 | { |
| 534 | //Destroy object |
Tobin Ehlis | ae67871 | 2020-04-08 16:07:25 -0600 | [diff] [blame] | 535 | allocated_memory_size_map.erase(memory); |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 536 | } |
| 537 | |
| 538 | static VKAPI_ATTR VkResult VKAPI_CALL MapMemory( |
| 539 | VkDevice device, |
| 540 | VkDeviceMemory memory, |
| 541 | VkDeviceSize offset, |
| 542 | VkDeviceSize size, |
| 543 | VkMemoryMapFlags flags, |
| 544 | void** ppData) |
| 545 | { |
| 546 | unique_lock_t lock(global_lock); |
Tobin Ehlis | ae67871 | 2020-04-08 16:07:25 -0600 | [diff] [blame] | 547 | if (VK_WHOLE_SIZE == size) { |
| 548 | if (allocated_memory_size_map.count(memory) != 0) |
| 549 | size = allocated_memory_size_map[memory] - offset; |
| 550 | else |
| 551 | size = 0x10000; |
| 552 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 553 | void* map_addr = malloc((size_t)size); |
| 554 | mapped_memory_map[memory].push_back(map_addr); |
| 555 | *ppData = map_addr; |
| 556 | return VK_SUCCESS; |
| 557 | } |
| 558 | |
| 559 | static VKAPI_ATTR void VKAPI_CALL UnmapMemory( |
| 560 | VkDevice device, |
| 561 | VkDeviceMemory memory) |
| 562 | { |
| 563 | unique_lock_t lock(global_lock); |
| 564 | for (auto map_addr : mapped_memory_map[memory]) { |
| 565 | free(map_addr); |
| 566 | } |
| 567 | mapped_memory_map.erase(memory); |
| 568 | } |
| 569 | |
| 570 | static VKAPI_ATTR VkResult VKAPI_CALL FlushMappedMemoryRanges( |
| 571 | VkDevice device, |
| 572 | uint32_t memoryRangeCount, |
| 573 | const VkMappedMemoryRange* pMemoryRanges) |
| 574 | { |
| 575 | //Not a CREATE or DESTROY function |
| 576 | return VK_SUCCESS; |
| 577 | } |
| 578 | |
| 579 | static VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges( |
| 580 | VkDevice device, |
| 581 | uint32_t memoryRangeCount, |
| 582 | const VkMappedMemoryRange* pMemoryRanges) |
| 583 | { |
| 584 | //Not a CREATE or DESTROY function |
| 585 | return VK_SUCCESS; |
| 586 | } |
| 587 | |
| 588 | static VKAPI_ATTR void VKAPI_CALL GetDeviceMemoryCommitment( |
| 589 | VkDevice device, |
| 590 | VkDeviceMemory memory, |
| 591 | VkDeviceSize* pCommittedMemoryInBytes) |
| 592 | { |
| 593 | //Not a CREATE or DESTROY function |
| 594 | } |
| 595 | |
| 596 | static VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory( |
| 597 | VkDevice device, |
| 598 | VkBuffer buffer, |
| 599 | VkDeviceMemory memory, |
| 600 | VkDeviceSize memoryOffset) |
| 601 | { |
| 602 | //Not a CREATE or DESTROY function |
| 603 | return VK_SUCCESS; |
| 604 | } |
| 605 | |
| 606 | static VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory( |
| 607 | VkDevice device, |
| 608 | VkImage image, |
| 609 | VkDeviceMemory memory, |
| 610 | VkDeviceSize memoryOffset) |
| 611 | { |
| 612 | //Not a CREATE or DESTROY function |
| 613 | return VK_SUCCESS; |
| 614 | } |
| 615 | |
| 616 | static VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements( |
| 617 | VkDevice device, |
| 618 | VkBuffer buffer, |
| 619 | VkMemoryRequirements* pMemoryRequirements) |
| 620 | { |
| 621 | // TODO: Just hard-coding reqs for now |
| 622 | pMemoryRequirements->size = 4096; |
| 623 | pMemoryRequirements->alignment = 1; |
| 624 | pMemoryRequirements->memoryTypeBits = 0xFFFF; |
| 625 | // Return a better size based on the buffer size from the create info. |
| 626 | auto d_iter = buffer_map.find(device); |
| 627 | if (d_iter != buffer_map.end()) { |
| 628 | auto iter = d_iter->second.find(buffer); |
| 629 | if (iter != d_iter->second.end()) { |
| 630 | pMemoryRequirements->size = ((iter->second.size + 4095) / 4096) * 4096; |
| 631 | } |
| 632 | } |
| 633 | } |
| 634 | |
| 635 | static VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements( |
| 636 | VkDevice device, |
| 637 | VkImage image, |
| 638 | VkMemoryRequirements* pMemoryRequirements) |
| 639 | { |
locke-lunarg | 454ab25 | 2020-04-15 22:49:19 -0600 | [diff] [blame] | 640 | pMemoryRequirements->size = 0; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 641 | pMemoryRequirements->alignment = 1; |
| 642 | |
locke-lunarg | 454ab25 | 2020-04-15 22:49:19 -0600 | [diff] [blame] | 643 | auto d_iter = image_memory_size_map.find(device); |
| 644 | if(d_iter != image_memory_size_map.end()){ |
| 645 | auto iter = d_iter->second.find(image); |
| 646 | if (iter != d_iter->second.end()) { |
| 647 | pMemoryRequirements->size = iter->second; |
| 648 | } |
| 649 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 650 | // Here we hard-code that the memory type at index 3 doesn't support this image. |
| 651 | pMemoryRequirements->memoryTypeBits = 0xFFFF & ~(0x1 << 3); |
| 652 | } |
| 653 | |
| 654 | static VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements( |
| 655 | VkDevice device, |
| 656 | VkImage image, |
| 657 | uint32_t* pSparseMemoryRequirementCount, |
| 658 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) |
| 659 | { |
| 660 | //Not a CREATE or DESTROY function |
| 661 | } |
| 662 | |
| 663 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties( |
| 664 | VkPhysicalDevice physicalDevice, |
| 665 | VkFormat format, |
| 666 | VkImageType type, |
| 667 | VkSampleCountFlagBits samples, |
| 668 | VkImageUsageFlags usage, |
| 669 | VkImageTiling tiling, |
| 670 | uint32_t* pPropertyCount, |
| 671 | VkSparseImageFormatProperties* pProperties) |
| 672 | { |
| 673 | //Not a CREATE or DESTROY function |
| 674 | } |
| 675 | |
| 676 | static VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse( |
| 677 | VkQueue queue, |
| 678 | uint32_t bindInfoCount, |
| 679 | const VkBindSparseInfo* pBindInfo, |
| 680 | VkFence fence) |
| 681 | { |
| 682 | //Not a CREATE or DESTROY function |
| 683 | return VK_SUCCESS; |
| 684 | } |
| 685 | |
| 686 | static VKAPI_ATTR VkResult VKAPI_CALL CreateFence( |
| 687 | VkDevice device, |
| 688 | const VkFenceCreateInfo* pCreateInfo, |
| 689 | const VkAllocationCallbacks* pAllocator, |
| 690 | VkFence* pFence) |
| 691 | { |
| 692 | unique_lock_t lock(global_lock); |
| 693 | *pFence = (VkFence)global_unique_handle++; |
| 694 | return VK_SUCCESS; |
| 695 | } |
| 696 | |
| 697 | static VKAPI_ATTR void VKAPI_CALL DestroyFence( |
| 698 | VkDevice device, |
| 699 | VkFence fence, |
| 700 | const VkAllocationCallbacks* pAllocator) |
| 701 | { |
| 702 | //Destroy object |
| 703 | } |
| 704 | |
| 705 | static VKAPI_ATTR VkResult VKAPI_CALL ResetFences( |
| 706 | VkDevice device, |
| 707 | uint32_t fenceCount, |
| 708 | const VkFence* pFences) |
| 709 | { |
| 710 | //Not a CREATE or DESTROY function |
| 711 | return VK_SUCCESS; |
| 712 | } |
| 713 | |
| 714 | static VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus( |
| 715 | VkDevice device, |
| 716 | VkFence fence) |
| 717 | { |
| 718 | //Not a CREATE or DESTROY function |
| 719 | return VK_SUCCESS; |
| 720 | } |
| 721 | |
| 722 | static VKAPI_ATTR VkResult VKAPI_CALL WaitForFences( |
| 723 | VkDevice device, |
| 724 | uint32_t fenceCount, |
| 725 | const VkFence* pFences, |
| 726 | VkBool32 waitAll, |
| 727 | uint64_t timeout) |
| 728 | { |
| 729 | //Not a CREATE or DESTROY function |
| 730 | return VK_SUCCESS; |
| 731 | } |
| 732 | |
| 733 | static VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore( |
| 734 | VkDevice device, |
| 735 | const VkSemaphoreCreateInfo* pCreateInfo, |
| 736 | const VkAllocationCallbacks* pAllocator, |
| 737 | VkSemaphore* pSemaphore) |
| 738 | { |
| 739 | unique_lock_t lock(global_lock); |
| 740 | *pSemaphore = (VkSemaphore)global_unique_handle++; |
| 741 | return VK_SUCCESS; |
| 742 | } |
| 743 | |
| 744 | static VKAPI_ATTR void VKAPI_CALL DestroySemaphore( |
| 745 | VkDevice device, |
| 746 | VkSemaphore semaphore, |
| 747 | const VkAllocationCallbacks* pAllocator) |
| 748 | { |
| 749 | //Destroy object |
| 750 | } |
| 751 | |
| 752 | static VKAPI_ATTR VkResult VKAPI_CALL CreateEvent( |
| 753 | VkDevice device, |
| 754 | const VkEventCreateInfo* pCreateInfo, |
| 755 | const VkAllocationCallbacks* pAllocator, |
| 756 | VkEvent* pEvent) |
| 757 | { |
| 758 | unique_lock_t lock(global_lock); |
| 759 | *pEvent = (VkEvent)global_unique_handle++; |
| 760 | return VK_SUCCESS; |
| 761 | } |
| 762 | |
| 763 | static VKAPI_ATTR void VKAPI_CALL DestroyEvent( |
| 764 | VkDevice device, |
| 765 | VkEvent event, |
| 766 | const VkAllocationCallbacks* pAllocator) |
| 767 | { |
| 768 | //Destroy object |
| 769 | } |
| 770 | |
| 771 | static VKAPI_ATTR VkResult VKAPI_CALL GetEventStatus( |
| 772 | VkDevice device, |
| 773 | VkEvent event) |
| 774 | { |
| 775 | //Not a CREATE or DESTROY function |
| 776 | return VK_EVENT_SET; |
| 777 | } |
| 778 | |
| 779 | static VKAPI_ATTR VkResult VKAPI_CALL SetEvent( |
| 780 | VkDevice device, |
| 781 | VkEvent event) |
| 782 | { |
| 783 | //Not a CREATE or DESTROY function |
| 784 | return VK_SUCCESS; |
| 785 | } |
| 786 | |
| 787 | static VKAPI_ATTR VkResult VKAPI_CALL ResetEvent( |
| 788 | VkDevice device, |
| 789 | VkEvent event) |
| 790 | { |
| 791 | //Not a CREATE or DESTROY function |
| 792 | return VK_SUCCESS; |
| 793 | } |
| 794 | |
| 795 | static VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool( |
| 796 | VkDevice device, |
| 797 | const VkQueryPoolCreateInfo* pCreateInfo, |
| 798 | const VkAllocationCallbacks* pAllocator, |
| 799 | VkQueryPool* pQueryPool) |
| 800 | { |
| 801 | unique_lock_t lock(global_lock); |
| 802 | *pQueryPool = (VkQueryPool)global_unique_handle++; |
| 803 | return VK_SUCCESS; |
| 804 | } |
| 805 | |
| 806 | static VKAPI_ATTR void VKAPI_CALL DestroyQueryPool( |
| 807 | VkDevice device, |
| 808 | VkQueryPool queryPool, |
| 809 | const VkAllocationCallbacks* pAllocator) |
| 810 | { |
| 811 | //Destroy object |
| 812 | } |
| 813 | |
| 814 | static VKAPI_ATTR VkResult VKAPI_CALL GetQueryPoolResults( |
| 815 | VkDevice device, |
| 816 | VkQueryPool queryPool, |
| 817 | uint32_t firstQuery, |
| 818 | uint32_t queryCount, |
| 819 | size_t dataSize, |
| 820 | void* pData, |
| 821 | VkDeviceSize stride, |
| 822 | VkQueryResultFlags flags) |
| 823 | { |
| 824 | //Not a CREATE or DESTROY function |
| 825 | return VK_SUCCESS; |
| 826 | } |
| 827 | |
| 828 | static VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer( |
| 829 | VkDevice device, |
| 830 | const VkBufferCreateInfo* pCreateInfo, |
| 831 | const VkAllocationCallbacks* pAllocator, |
| 832 | VkBuffer* pBuffer) |
| 833 | { |
| 834 | unique_lock_t lock(global_lock); |
| 835 | *pBuffer = (VkBuffer)global_unique_handle++; |
| 836 | buffer_map[device][*pBuffer] = *pCreateInfo; |
| 837 | return VK_SUCCESS; |
| 838 | } |
| 839 | |
| 840 | static VKAPI_ATTR void VKAPI_CALL DestroyBuffer( |
| 841 | VkDevice device, |
| 842 | VkBuffer buffer, |
| 843 | const VkAllocationCallbacks* pAllocator) |
| 844 | { |
| 845 | unique_lock_t lock(global_lock); |
| 846 | buffer_map[device].erase(buffer); |
| 847 | } |
| 848 | |
| 849 | static VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView( |
| 850 | VkDevice device, |
| 851 | const VkBufferViewCreateInfo* pCreateInfo, |
| 852 | const VkAllocationCallbacks* pAllocator, |
| 853 | VkBufferView* pView) |
| 854 | { |
| 855 | unique_lock_t lock(global_lock); |
| 856 | *pView = (VkBufferView)global_unique_handle++; |
| 857 | return VK_SUCCESS; |
| 858 | } |
| 859 | |
| 860 | static VKAPI_ATTR void VKAPI_CALL DestroyBufferView( |
| 861 | VkDevice device, |
| 862 | VkBufferView bufferView, |
| 863 | const VkAllocationCallbacks* pAllocator) |
| 864 | { |
| 865 | //Destroy object |
| 866 | } |
| 867 | |
| 868 | static VKAPI_ATTR VkResult VKAPI_CALL CreateImage( |
| 869 | VkDevice device, |
| 870 | const VkImageCreateInfo* pCreateInfo, |
| 871 | const VkAllocationCallbacks* pAllocator, |
| 872 | VkImage* pImage) |
| 873 | { |
| 874 | unique_lock_t lock(global_lock); |
| 875 | *pImage = (VkImage)global_unique_handle++; |
locke-lunarg | 8824107 | 2020-04-16 18:17:48 -0600 | [diff] [blame] | 876 | // TODO: A pixel size is 32 bytes. This accounts for the largest possible pixel size of any format. It could be changed to more accurate size if need be. |
locke-lunarg | 454ab25 | 2020-04-15 22:49:19 -0600 | [diff] [blame] | 877 | image_memory_size_map[device][*pImage] = pCreateInfo->extent.width * pCreateInfo->extent.height * pCreateInfo->extent.depth * |
locke-lunarg | 8824107 | 2020-04-16 18:17:48 -0600 | [diff] [blame] | 878 | 32 * pCreateInfo->arrayLayers * (pCreateInfo->mipLevels > 1 ? 2 : 1); |
locke-lunarg | 454ab25 | 2020-04-15 22:49:19 -0600 | [diff] [blame] | 879 | // plane count |
| 880 | switch (pCreateInfo->format) { |
| 881 | case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: |
| 882 | case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM: |
| 883 | case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM: |
| 884 | case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: |
| 885 | case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: |
| 886 | case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: |
| 887 | case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: |
| 888 | case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: |
| 889 | case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: |
| 890 | case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM: |
| 891 | case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM: |
| 892 | case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM: |
| 893 | image_memory_size_map[device][*pImage] *= 3; |
| 894 | break; |
| 895 | case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: |
| 896 | case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM: |
| 897 | case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: |
| 898 | case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: |
| 899 | case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: |
| 900 | case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: |
| 901 | case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM: |
| 902 | case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM: |
| 903 | image_memory_size_map[device][*pImage] *= 2; |
| 904 | break; |
| 905 | default: |
| 906 | break; |
| 907 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 908 | return VK_SUCCESS; |
| 909 | } |
| 910 | |
| 911 | static VKAPI_ATTR void VKAPI_CALL DestroyImage( |
| 912 | VkDevice device, |
| 913 | VkImage image, |
| 914 | const VkAllocationCallbacks* pAllocator) |
| 915 | { |
locke-lunarg | 454ab25 | 2020-04-15 22:49:19 -0600 | [diff] [blame] | 916 | unique_lock_t lock(global_lock); |
| 917 | image_memory_size_map[device].erase(image); |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 918 | } |
| 919 | |
| 920 | static VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout( |
| 921 | VkDevice device, |
| 922 | VkImage image, |
| 923 | const VkImageSubresource* pSubresource, |
| 924 | VkSubresourceLayout* pLayout) |
| 925 | { |
Petr Kraus | 490e393 | 2020-04-08 21:47:25 +0200 | [diff] [blame] | 926 | // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 927 | *pLayout = VkSubresourceLayout(); // Default constructor zero values. |
| 928 | } |
| 929 | |
| 930 | static VKAPI_ATTR VkResult VKAPI_CALL CreateImageView( |
| 931 | VkDevice device, |
| 932 | const VkImageViewCreateInfo* pCreateInfo, |
| 933 | const VkAllocationCallbacks* pAllocator, |
| 934 | VkImageView* pView) |
| 935 | { |
| 936 | unique_lock_t lock(global_lock); |
| 937 | *pView = (VkImageView)global_unique_handle++; |
| 938 | return VK_SUCCESS; |
| 939 | } |
| 940 | |
| 941 | static VKAPI_ATTR void VKAPI_CALL DestroyImageView( |
| 942 | VkDevice device, |
| 943 | VkImageView imageView, |
| 944 | const VkAllocationCallbacks* pAllocator) |
| 945 | { |
| 946 | //Destroy object |
| 947 | } |
| 948 | |
| 949 | static VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule( |
| 950 | VkDevice device, |
| 951 | const VkShaderModuleCreateInfo* pCreateInfo, |
| 952 | const VkAllocationCallbacks* pAllocator, |
| 953 | VkShaderModule* pShaderModule) |
| 954 | { |
| 955 | unique_lock_t lock(global_lock); |
| 956 | *pShaderModule = (VkShaderModule)global_unique_handle++; |
| 957 | return VK_SUCCESS; |
| 958 | } |
| 959 | |
| 960 | static VKAPI_ATTR void VKAPI_CALL DestroyShaderModule( |
| 961 | VkDevice device, |
| 962 | VkShaderModule shaderModule, |
| 963 | const VkAllocationCallbacks* pAllocator) |
| 964 | { |
| 965 | //Destroy object |
| 966 | } |
| 967 | |
| 968 | static VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineCache( |
| 969 | VkDevice device, |
| 970 | const VkPipelineCacheCreateInfo* pCreateInfo, |
| 971 | const VkAllocationCallbacks* pAllocator, |
| 972 | VkPipelineCache* pPipelineCache) |
| 973 | { |
| 974 | unique_lock_t lock(global_lock); |
| 975 | *pPipelineCache = (VkPipelineCache)global_unique_handle++; |
| 976 | return VK_SUCCESS; |
| 977 | } |
| 978 | |
| 979 | static VKAPI_ATTR void VKAPI_CALL DestroyPipelineCache( |
| 980 | VkDevice device, |
| 981 | VkPipelineCache pipelineCache, |
| 982 | const VkAllocationCallbacks* pAllocator) |
| 983 | { |
| 984 | //Destroy object |
| 985 | } |
| 986 | |
| 987 | static VKAPI_ATTR VkResult VKAPI_CALL GetPipelineCacheData( |
| 988 | VkDevice device, |
| 989 | VkPipelineCache pipelineCache, |
| 990 | size_t* pDataSize, |
| 991 | void* pData) |
| 992 | { |
| 993 | //Not a CREATE or DESTROY function |
| 994 | return VK_SUCCESS; |
| 995 | } |
| 996 | |
| 997 | static VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches( |
| 998 | VkDevice device, |
| 999 | VkPipelineCache dstCache, |
| 1000 | uint32_t srcCacheCount, |
| 1001 | const VkPipelineCache* pSrcCaches) |
| 1002 | { |
| 1003 | //Not a CREATE or DESTROY function |
| 1004 | return VK_SUCCESS; |
| 1005 | } |
| 1006 | |
| 1007 | static VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines( |
| 1008 | VkDevice device, |
| 1009 | VkPipelineCache pipelineCache, |
| 1010 | uint32_t createInfoCount, |
| 1011 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
| 1012 | const VkAllocationCallbacks* pAllocator, |
| 1013 | VkPipeline* pPipelines) |
| 1014 | { |
| 1015 | unique_lock_t lock(global_lock); |
| 1016 | for (uint32_t i = 0; i < createInfoCount; ++i) { |
| 1017 | pPipelines[i] = (VkPipeline)global_unique_handle++; |
| 1018 | } |
| 1019 | return VK_SUCCESS; |
| 1020 | } |
| 1021 | |
| 1022 | static VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines( |
| 1023 | VkDevice device, |
| 1024 | VkPipelineCache pipelineCache, |
| 1025 | uint32_t createInfoCount, |
| 1026 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 1027 | const VkAllocationCallbacks* pAllocator, |
| 1028 | VkPipeline* pPipelines) |
| 1029 | { |
| 1030 | unique_lock_t lock(global_lock); |
| 1031 | for (uint32_t i = 0; i < createInfoCount; ++i) { |
| 1032 | pPipelines[i] = (VkPipeline)global_unique_handle++; |
| 1033 | } |
| 1034 | return VK_SUCCESS; |
| 1035 | } |
| 1036 | |
| 1037 | static VKAPI_ATTR void VKAPI_CALL DestroyPipeline( |
| 1038 | VkDevice device, |
| 1039 | VkPipeline pipeline, |
| 1040 | const VkAllocationCallbacks* pAllocator) |
| 1041 | { |
| 1042 | //Destroy object |
| 1043 | } |
| 1044 | |
| 1045 | static VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout( |
| 1046 | VkDevice device, |
| 1047 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 1048 | const VkAllocationCallbacks* pAllocator, |
| 1049 | VkPipelineLayout* pPipelineLayout) |
| 1050 | { |
| 1051 | unique_lock_t lock(global_lock); |
| 1052 | *pPipelineLayout = (VkPipelineLayout)global_unique_handle++; |
| 1053 | return VK_SUCCESS; |
| 1054 | } |
| 1055 | |
| 1056 | static VKAPI_ATTR void VKAPI_CALL DestroyPipelineLayout( |
| 1057 | VkDevice device, |
| 1058 | VkPipelineLayout pipelineLayout, |
| 1059 | const VkAllocationCallbacks* pAllocator) |
| 1060 | { |
| 1061 | //Destroy object |
| 1062 | } |
| 1063 | |
| 1064 | static VKAPI_ATTR VkResult VKAPI_CALL CreateSampler( |
| 1065 | VkDevice device, |
| 1066 | const VkSamplerCreateInfo* pCreateInfo, |
| 1067 | const VkAllocationCallbacks* pAllocator, |
| 1068 | VkSampler* pSampler) |
| 1069 | { |
| 1070 | unique_lock_t lock(global_lock); |
| 1071 | *pSampler = (VkSampler)global_unique_handle++; |
| 1072 | return VK_SUCCESS; |
| 1073 | } |
| 1074 | |
| 1075 | static VKAPI_ATTR void VKAPI_CALL DestroySampler( |
| 1076 | VkDevice device, |
| 1077 | VkSampler sampler, |
| 1078 | const VkAllocationCallbacks* pAllocator) |
| 1079 | { |
| 1080 | //Destroy object |
| 1081 | } |
| 1082 | |
| 1083 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout( |
| 1084 | VkDevice device, |
| 1085 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 1086 | const VkAllocationCallbacks* pAllocator, |
| 1087 | VkDescriptorSetLayout* pSetLayout) |
| 1088 | { |
| 1089 | unique_lock_t lock(global_lock); |
| 1090 | *pSetLayout = (VkDescriptorSetLayout)global_unique_handle++; |
| 1091 | return VK_SUCCESS; |
| 1092 | } |
| 1093 | |
| 1094 | static VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout( |
| 1095 | VkDevice device, |
| 1096 | VkDescriptorSetLayout descriptorSetLayout, |
| 1097 | const VkAllocationCallbacks* pAllocator) |
| 1098 | { |
| 1099 | //Destroy object |
| 1100 | } |
| 1101 | |
| 1102 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool( |
| 1103 | VkDevice device, |
| 1104 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
| 1105 | const VkAllocationCallbacks* pAllocator, |
| 1106 | VkDescriptorPool* pDescriptorPool) |
| 1107 | { |
| 1108 | unique_lock_t lock(global_lock); |
| 1109 | *pDescriptorPool = (VkDescriptorPool)global_unique_handle++; |
| 1110 | return VK_SUCCESS; |
| 1111 | } |
| 1112 | |
| 1113 | static VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool( |
| 1114 | VkDevice device, |
| 1115 | VkDescriptorPool descriptorPool, |
| 1116 | const VkAllocationCallbacks* pAllocator) |
| 1117 | { |
| 1118 | //Destroy object |
| 1119 | } |
| 1120 | |
| 1121 | static VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool( |
| 1122 | VkDevice device, |
| 1123 | VkDescriptorPool descriptorPool, |
| 1124 | VkDescriptorPoolResetFlags flags) |
| 1125 | { |
| 1126 | //Not a CREATE or DESTROY function |
| 1127 | return VK_SUCCESS; |
| 1128 | } |
| 1129 | |
| 1130 | static VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets( |
| 1131 | VkDevice device, |
| 1132 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
| 1133 | VkDescriptorSet* pDescriptorSets) |
| 1134 | { |
| 1135 | unique_lock_t lock(global_lock); |
| 1136 | for (uint32_t i = 0; i < pAllocateInfo->descriptorSetCount; ++i) { |
| 1137 | pDescriptorSets[i] = (VkDescriptorSet)global_unique_handle++; |
| 1138 | } |
| 1139 | return VK_SUCCESS; |
| 1140 | } |
| 1141 | |
| 1142 | static VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets( |
| 1143 | VkDevice device, |
| 1144 | VkDescriptorPool descriptorPool, |
| 1145 | uint32_t descriptorSetCount, |
| 1146 | const VkDescriptorSet* pDescriptorSets) |
| 1147 | { |
| 1148 | //Destroy object |
| 1149 | return VK_SUCCESS; |
| 1150 | } |
| 1151 | |
| 1152 | static VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets( |
| 1153 | VkDevice device, |
| 1154 | uint32_t descriptorWriteCount, |
| 1155 | const VkWriteDescriptorSet* pDescriptorWrites, |
| 1156 | uint32_t descriptorCopyCount, |
| 1157 | const VkCopyDescriptorSet* pDescriptorCopies) |
| 1158 | { |
| 1159 | //Not a CREATE or DESTROY function |
| 1160 | } |
| 1161 | |
| 1162 | static VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer( |
| 1163 | VkDevice device, |
| 1164 | const VkFramebufferCreateInfo* pCreateInfo, |
| 1165 | const VkAllocationCallbacks* pAllocator, |
| 1166 | VkFramebuffer* pFramebuffer) |
| 1167 | { |
| 1168 | unique_lock_t lock(global_lock); |
| 1169 | *pFramebuffer = (VkFramebuffer)global_unique_handle++; |
| 1170 | return VK_SUCCESS; |
| 1171 | } |
| 1172 | |
| 1173 | static VKAPI_ATTR void VKAPI_CALL DestroyFramebuffer( |
| 1174 | VkDevice device, |
| 1175 | VkFramebuffer framebuffer, |
| 1176 | const VkAllocationCallbacks* pAllocator) |
| 1177 | { |
| 1178 | //Destroy object |
| 1179 | } |
| 1180 | |
| 1181 | static VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass( |
| 1182 | VkDevice device, |
| 1183 | const VkRenderPassCreateInfo* pCreateInfo, |
| 1184 | const VkAllocationCallbacks* pAllocator, |
| 1185 | VkRenderPass* pRenderPass) |
| 1186 | { |
| 1187 | unique_lock_t lock(global_lock); |
| 1188 | *pRenderPass = (VkRenderPass)global_unique_handle++; |
| 1189 | return VK_SUCCESS; |
| 1190 | } |
| 1191 | |
| 1192 | static VKAPI_ATTR void VKAPI_CALL DestroyRenderPass( |
| 1193 | VkDevice device, |
| 1194 | VkRenderPass renderPass, |
| 1195 | const VkAllocationCallbacks* pAllocator) |
| 1196 | { |
| 1197 | //Destroy object |
| 1198 | } |
| 1199 | |
| 1200 | static VKAPI_ATTR void VKAPI_CALL GetRenderAreaGranularity( |
| 1201 | VkDevice device, |
| 1202 | VkRenderPass renderPass, |
| 1203 | VkExtent2D* pGranularity) |
| 1204 | { |
| 1205 | //Not a CREATE or DESTROY function |
| 1206 | } |
| 1207 | |
| 1208 | static VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool( |
| 1209 | VkDevice device, |
| 1210 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 1211 | const VkAllocationCallbacks* pAllocator, |
| 1212 | VkCommandPool* pCommandPool) |
| 1213 | { |
| 1214 | unique_lock_t lock(global_lock); |
| 1215 | *pCommandPool = (VkCommandPool)global_unique_handle++; |
| 1216 | return VK_SUCCESS; |
| 1217 | } |
| 1218 | |
| 1219 | static VKAPI_ATTR void VKAPI_CALL DestroyCommandPool( |
| 1220 | VkDevice device, |
| 1221 | VkCommandPool commandPool, |
| 1222 | const VkAllocationCallbacks* pAllocator) |
| 1223 | { |
nyorain | 00b06c3 | 2022-01-21 16:06:11 +0100 | [diff] [blame] | 1224 | |
| 1225 | // destroy command buffers for this pool |
| 1226 | unique_lock_t lock(global_lock); |
| 1227 | auto it = command_pool_buffer_map.find(commandPool); |
| 1228 | if (it != command_pool_buffer_map.end()) { |
| 1229 | for (auto& cb : it->second) { |
| 1230 | DestroyDispObjHandle((void*) cb); |
| 1231 | } |
| 1232 | command_pool_buffer_map.erase(it); |
| 1233 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 1234 | } |
| 1235 | |
| 1236 | static VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool( |
| 1237 | VkDevice device, |
| 1238 | VkCommandPool commandPool, |
| 1239 | VkCommandPoolResetFlags flags) |
| 1240 | { |
| 1241 | //Not a CREATE or DESTROY function |
| 1242 | return VK_SUCCESS; |
| 1243 | } |
| 1244 | |
| 1245 | static VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers( |
| 1246 | VkDevice device, |
| 1247 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 1248 | VkCommandBuffer* pCommandBuffers) |
| 1249 | { |
nyorain | 00b06c3 | 2022-01-21 16:06:11 +0100 | [diff] [blame] | 1250 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 1251 | unique_lock_t lock(global_lock); |
| 1252 | for (uint32_t i = 0; i < pAllocateInfo->commandBufferCount; ++i) { |
| 1253 | pCommandBuffers[i] = (VkCommandBuffer)CreateDispObjHandle(); |
nyorain | 00b06c3 | 2022-01-21 16:06:11 +0100 | [diff] [blame] | 1254 | command_pool_buffer_map[pAllocateInfo->commandPool].push_back(pCommandBuffers[i]); |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 1255 | } |
| 1256 | return VK_SUCCESS; |
| 1257 | } |
| 1258 | |
| 1259 | static VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers( |
| 1260 | VkDevice device, |
| 1261 | VkCommandPool commandPool, |
| 1262 | uint32_t commandBufferCount, |
| 1263 | const VkCommandBuffer* pCommandBuffers) |
| 1264 | { |
nyorain | 6c1bb94 | 2022-01-21 15:47:40 +0100 | [diff] [blame] | 1265 | |
nyorain | 00b06c3 | 2022-01-21 16:06:11 +0100 | [diff] [blame] | 1266 | unique_lock_t lock(global_lock); |
| 1267 | for (auto i = 0u; i < commandBufferCount; ++i) { |
| 1268 | if (!pCommandBuffers[i]) { |
| 1269 | continue; |
| 1270 | } |
| 1271 | |
| 1272 | for (auto& pair : command_pool_buffer_map) { |
| 1273 | auto& cbs = pair.second; |
| 1274 | auto it = std::find(cbs.begin(), cbs.end(), pCommandBuffers[i]); |
| 1275 | if (it != cbs.end()) { |
| 1276 | cbs.erase(it); |
| 1277 | } |
| 1278 | } |
Charles Giessen | 576ce7a | 2022-04-13 14:42:25 -0600 | [diff] [blame] | 1279 | |
nyorain | 00b06c3 | 2022-01-21 16:06:11 +0100 | [diff] [blame] | 1280 | DestroyDispObjHandle((void*) pCommandBuffers[i]); |
| 1281 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 1282 | } |
| 1283 | |
| 1284 | static VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer( |
| 1285 | VkCommandBuffer commandBuffer, |
| 1286 | const VkCommandBufferBeginInfo* pBeginInfo) |
| 1287 | { |
| 1288 | //Not a CREATE or DESTROY function |
| 1289 | return VK_SUCCESS; |
| 1290 | } |
| 1291 | |
| 1292 | static VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer( |
| 1293 | VkCommandBuffer commandBuffer) |
| 1294 | { |
| 1295 | //Not a CREATE or DESTROY function |
| 1296 | return VK_SUCCESS; |
| 1297 | } |
| 1298 | |
| 1299 | static VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer( |
| 1300 | VkCommandBuffer commandBuffer, |
| 1301 | VkCommandBufferResetFlags flags) |
| 1302 | { |
| 1303 | //Not a CREATE or DESTROY function |
| 1304 | return VK_SUCCESS; |
| 1305 | } |
| 1306 | |
| 1307 | static VKAPI_ATTR void VKAPI_CALL CmdBindPipeline( |
| 1308 | VkCommandBuffer commandBuffer, |
| 1309 | VkPipelineBindPoint pipelineBindPoint, |
| 1310 | VkPipeline pipeline) |
| 1311 | { |
| 1312 | //Not a CREATE or DESTROY function |
| 1313 | } |
| 1314 | |
| 1315 | static VKAPI_ATTR void VKAPI_CALL CmdSetViewport( |
| 1316 | VkCommandBuffer commandBuffer, |
| 1317 | uint32_t firstViewport, |
| 1318 | uint32_t viewportCount, |
| 1319 | const VkViewport* pViewports) |
| 1320 | { |
| 1321 | //Not a CREATE or DESTROY function |
| 1322 | } |
| 1323 | |
| 1324 | static VKAPI_ATTR void VKAPI_CALL CmdSetScissor( |
| 1325 | VkCommandBuffer commandBuffer, |
| 1326 | uint32_t firstScissor, |
| 1327 | uint32_t scissorCount, |
| 1328 | const VkRect2D* pScissors) |
| 1329 | { |
| 1330 | //Not a CREATE or DESTROY function |
| 1331 | } |
| 1332 | |
| 1333 | static VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth( |
| 1334 | VkCommandBuffer commandBuffer, |
| 1335 | float lineWidth) |
| 1336 | { |
| 1337 | //Not a CREATE or DESTROY function |
| 1338 | } |
| 1339 | |
| 1340 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias( |
| 1341 | VkCommandBuffer commandBuffer, |
| 1342 | float depthBiasConstantFactor, |
| 1343 | float depthBiasClamp, |
| 1344 | float depthBiasSlopeFactor) |
| 1345 | { |
| 1346 | //Not a CREATE or DESTROY function |
| 1347 | } |
| 1348 | |
| 1349 | static VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants( |
| 1350 | VkCommandBuffer commandBuffer, |
| 1351 | const float blendConstants[4]) |
| 1352 | { |
| 1353 | //Not a CREATE or DESTROY function |
| 1354 | } |
| 1355 | |
| 1356 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds( |
| 1357 | VkCommandBuffer commandBuffer, |
| 1358 | float minDepthBounds, |
| 1359 | float maxDepthBounds) |
| 1360 | { |
| 1361 | //Not a CREATE or DESTROY function |
| 1362 | } |
| 1363 | |
| 1364 | static VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask( |
| 1365 | VkCommandBuffer commandBuffer, |
| 1366 | VkStencilFaceFlags faceMask, |
| 1367 | uint32_t compareMask) |
| 1368 | { |
| 1369 | //Not a CREATE or DESTROY function |
| 1370 | } |
| 1371 | |
| 1372 | static VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask( |
| 1373 | VkCommandBuffer commandBuffer, |
| 1374 | VkStencilFaceFlags faceMask, |
| 1375 | uint32_t writeMask) |
| 1376 | { |
| 1377 | //Not a CREATE or DESTROY function |
| 1378 | } |
| 1379 | |
| 1380 | static VKAPI_ATTR void VKAPI_CALL CmdSetStencilReference( |
| 1381 | VkCommandBuffer commandBuffer, |
| 1382 | VkStencilFaceFlags faceMask, |
| 1383 | uint32_t reference) |
| 1384 | { |
| 1385 | //Not a CREATE or DESTROY function |
| 1386 | } |
| 1387 | |
| 1388 | static VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets( |
| 1389 | VkCommandBuffer commandBuffer, |
| 1390 | VkPipelineBindPoint pipelineBindPoint, |
| 1391 | VkPipelineLayout layout, |
| 1392 | uint32_t firstSet, |
| 1393 | uint32_t descriptorSetCount, |
| 1394 | const VkDescriptorSet* pDescriptorSets, |
| 1395 | uint32_t dynamicOffsetCount, |
| 1396 | const uint32_t* pDynamicOffsets) |
| 1397 | { |
| 1398 | //Not a CREATE or DESTROY function |
| 1399 | } |
| 1400 | |
| 1401 | static VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer( |
| 1402 | VkCommandBuffer commandBuffer, |
| 1403 | VkBuffer buffer, |
| 1404 | VkDeviceSize offset, |
| 1405 | VkIndexType indexType) |
| 1406 | { |
| 1407 | //Not a CREATE or DESTROY function |
| 1408 | } |
| 1409 | |
| 1410 | static VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers( |
| 1411 | VkCommandBuffer commandBuffer, |
| 1412 | uint32_t firstBinding, |
| 1413 | uint32_t bindingCount, |
| 1414 | const VkBuffer* pBuffers, |
| 1415 | const VkDeviceSize* pOffsets) |
| 1416 | { |
| 1417 | //Not a CREATE or DESTROY function |
| 1418 | } |
| 1419 | |
| 1420 | static VKAPI_ATTR void VKAPI_CALL CmdDraw( |
| 1421 | VkCommandBuffer commandBuffer, |
| 1422 | uint32_t vertexCount, |
| 1423 | uint32_t instanceCount, |
| 1424 | uint32_t firstVertex, |
| 1425 | uint32_t firstInstance) |
| 1426 | { |
| 1427 | //Not a CREATE or DESTROY function |
| 1428 | } |
| 1429 | |
| 1430 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndexed( |
| 1431 | VkCommandBuffer commandBuffer, |
| 1432 | uint32_t indexCount, |
| 1433 | uint32_t instanceCount, |
| 1434 | uint32_t firstIndex, |
| 1435 | int32_t vertexOffset, |
| 1436 | uint32_t firstInstance) |
| 1437 | { |
| 1438 | //Not a CREATE or DESTROY function |
| 1439 | } |
| 1440 | |
| 1441 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndirect( |
| 1442 | VkCommandBuffer commandBuffer, |
| 1443 | VkBuffer buffer, |
| 1444 | VkDeviceSize offset, |
| 1445 | uint32_t drawCount, |
| 1446 | uint32_t stride) |
| 1447 | { |
| 1448 | //Not a CREATE or DESTROY function |
| 1449 | } |
| 1450 | |
| 1451 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirect( |
| 1452 | VkCommandBuffer commandBuffer, |
| 1453 | VkBuffer buffer, |
| 1454 | VkDeviceSize offset, |
| 1455 | uint32_t drawCount, |
| 1456 | uint32_t stride) |
| 1457 | { |
| 1458 | //Not a CREATE or DESTROY function |
| 1459 | } |
| 1460 | |
| 1461 | static VKAPI_ATTR void VKAPI_CALL CmdDispatch( |
| 1462 | VkCommandBuffer commandBuffer, |
| 1463 | uint32_t groupCountX, |
| 1464 | uint32_t groupCountY, |
| 1465 | uint32_t groupCountZ) |
| 1466 | { |
| 1467 | //Not a CREATE or DESTROY function |
| 1468 | } |
| 1469 | |
| 1470 | static VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect( |
| 1471 | VkCommandBuffer commandBuffer, |
| 1472 | VkBuffer buffer, |
| 1473 | VkDeviceSize offset) |
| 1474 | { |
| 1475 | //Not a CREATE or DESTROY function |
| 1476 | } |
| 1477 | |
| 1478 | static VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer( |
| 1479 | VkCommandBuffer commandBuffer, |
| 1480 | VkBuffer srcBuffer, |
| 1481 | VkBuffer dstBuffer, |
| 1482 | uint32_t regionCount, |
| 1483 | const VkBufferCopy* pRegions) |
| 1484 | { |
| 1485 | //Not a CREATE or DESTROY function |
| 1486 | } |
| 1487 | |
| 1488 | static VKAPI_ATTR void VKAPI_CALL CmdCopyImage( |
| 1489 | VkCommandBuffer commandBuffer, |
| 1490 | VkImage srcImage, |
| 1491 | VkImageLayout srcImageLayout, |
| 1492 | VkImage dstImage, |
| 1493 | VkImageLayout dstImageLayout, |
| 1494 | uint32_t regionCount, |
| 1495 | const VkImageCopy* pRegions) |
| 1496 | { |
| 1497 | //Not a CREATE or DESTROY function |
| 1498 | } |
| 1499 | |
| 1500 | static VKAPI_ATTR void VKAPI_CALL CmdBlitImage( |
| 1501 | VkCommandBuffer commandBuffer, |
| 1502 | VkImage srcImage, |
| 1503 | VkImageLayout srcImageLayout, |
| 1504 | VkImage dstImage, |
| 1505 | VkImageLayout dstImageLayout, |
| 1506 | uint32_t regionCount, |
| 1507 | const VkImageBlit* pRegions, |
| 1508 | VkFilter filter) |
| 1509 | { |
| 1510 | //Not a CREATE or DESTROY function |
| 1511 | } |
| 1512 | |
| 1513 | static VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage( |
| 1514 | VkCommandBuffer commandBuffer, |
| 1515 | VkBuffer srcBuffer, |
| 1516 | VkImage dstImage, |
| 1517 | VkImageLayout dstImageLayout, |
| 1518 | uint32_t regionCount, |
| 1519 | const VkBufferImageCopy* pRegions) |
| 1520 | { |
| 1521 | //Not a CREATE or DESTROY function |
| 1522 | } |
| 1523 | |
| 1524 | static VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer( |
| 1525 | VkCommandBuffer commandBuffer, |
| 1526 | VkImage srcImage, |
| 1527 | VkImageLayout srcImageLayout, |
| 1528 | VkBuffer dstBuffer, |
| 1529 | uint32_t regionCount, |
| 1530 | const VkBufferImageCopy* pRegions) |
| 1531 | { |
| 1532 | //Not a CREATE or DESTROY function |
| 1533 | } |
| 1534 | |
| 1535 | static VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer( |
| 1536 | VkCommandBuffer commandBuffer, |
| 1537 | VkBuffer dstBuffer, |
| 1538 | VkDeviceSize dstOffset, |
| 1539 | VkDeviceSize dataSize, |
| 1540 | const void* pData) |
| 1541 | { |
| 1542 | //Not a CREATE or DESTROY function |
| 1543 | } |
| 1544 | |
| 1545 | static VKAPI_ATTR void VKAPI_CALL CmdFillBuffer( |
| 1546 | VkCommandBuffer commandBuffer, |
| 1547 | VkBuffer dstBuffer, |
| 1548 | VkDeviceSize dstOffset, |
| 1549 | VkDeviceSize size, |
| 1550 | uint32_t data) |
| 1551 | { |
| 1552 | //Not a CREATE or DESTROY function |
| 1553 | } |
| 1554 | |
| 1555 | static VKAPI_ATTR void VKAPI_CALL CmdClearColorImage( |
| 1556 | VkCommandBuffer commandBuffer, |
| 1557 | VkImage image, |
| 1558 | VkImageLayout imageLayout, |
| 1559 | const VkClearColorValue* pColor, |
| 1560 | uint32_t rangeCount, |
| 1561 | const VkImageSubresourceRange* pRanges) |
| 1562 | { |
| 1563 | //Not a CREATE or DESTROY function |
| 1564 | } |
| 1565 | |
| 1566 | static VKAPI_ATTR void VKAPI_CALL CmdClearDepthStencilImage( |
| 1567 | VkCommandBuffer commandBuffer, |
| 1568 | VkImage image, |
| 1569 | VkImageLayout imageLayout, |
| 1570 | const VkClearDepthStencilValue* pDepthStencil, |
| 1571 | uint32_t rangeCount, |
| 1572 | const VkImageSubresourceRange* pRanges) |
| 1573 | { |
| 1574 | //Not a CREATE or DESTROY function |
| 1575 | } |
| 1576 | |
| 1577 | static VKAPI_ATTR void VKAPI_CALL CmdClearAttachments( |
| 1578 | VkCommandBuffer commandBuffer, |
| 1579 | uint32_t attachmentCount, |
| 1580 | const VkClearAttachment* pAttachments, |
| 1581 | uint32_t rectCount, |
| 1582 | const VkClearRect* pRects) |
| 1583 | { |
| 1584 | //Not a CREATE or DESTROY function |
| 1585 | } |
| 1586 | |
| 1587 | static VKAPI_ATTR void VKAPI_CALL CmdResolveImage( |
| 1588 | VkCommandBuffer commandBuffer, |
| 1589 | VkImage srcImage, |
| 1590 | VkImageLayout srcImageLayout, |
| 1591 | VkImage dstImage, |
| 1592 | VkImageLayout dstImageLayout, |
| 1593 | uint32_t regionCount, |
| 1594 | const VkImageResolve* pRegions) |
| 1595 | { |
| 1596 | //Not a CREATE or DESTROY function |
| 1597 | } |
| 1598 | |
| 1599 | static VKAPI_ATTR void VKAPI_CALL CmdSetEvent( |
| 1600 | VkCommandBuffer commandBuffer, |
| 1601 | VkEvent event, |
| 1602 | VkPipelineStageFlags stageMask) |
| 1603 | { |
| 1604 | //Not a CREATE or DESTROY function |
| 1605 | } |
| 1606 | |
| 1607 | static VKAPI_ATTR void VKAPI_CALL CmdResetEvent( |
| 1608 | VkCommandBuffer commandBuffer, |
| 1609 | VkEvent event, |
| 1610 | VkPipelineStageFlags stageMask) |
| 1611 | { |
| 1612 | //Not a CREATE or DESTROY function |
| 1613 | } |
| 1614 | |
| 1615 | static VKAPI_ATTR void VKAPI_CALL CmdWaitEvents( |
| 1616 | VkCommandBuffer commandBuffer, |
| 1617 | uint32_t eventCount, |
| 1618 | const VkEvent* pEvents, |
| 1619 | VkPipelineStageFlags srcStageMask, |
| 1620 | VkPipelineStageFlags dstStageMask, |
| 1621 | uint32_t memoryBarrierCount, |
| 1622 | const VkMemoryBarrier* pMemoryBarriers, |
| 1623 | uint32_t bufferMemoryBarrierCount, |
| 1624 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 1625 | uint32_t imageMemoryBarrierCount, |
| 1626 | const VkImageMemoryBarrier* pImageMemoryBarriers) |
| 1627 | { |
| 1628 | //Not a CREATE or DESTROY function |
| 1629 | } |
| 1630 | |
| 1631 | static VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier( |
| 1632 | VkCommandBuffer commandBuffer, |
| 1633 | VkPipelineStageFlags srcStageMask, |
| 1634 | VkPipelineStageFlags dstStageMask, |
| 1635 | VkDependencyFlags dependencyFlags, |
| 1636 | uint32_t memoryBarrierCount, |
| 1637 | const VkMemoryBarrier* pMemoryBarriers, |
| 1638 | uint32_t bufferMemoryBarrierCount, |
| 1639 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 1640 | uint32_t imageMemoryBarrierCount, |
| 1641 | const VkImageMemoryBarrier* pImageMemoryBarriers) |
| 1642 | { |
| 1643 | //Not a CREATE or DESTROY function |
| 1644 | } |
| 1645 | |
| 1646 | static VKAPI_ATTR void VKAPI_CALL CmdBeginQuery( |
| 1647 | VkCommandBuffer commandBuffer, |
| 1648 | VkQueryPool queryPool, |
| 1649 | uint32_t query, |
| 1650 | VkQueryControlFlags flags) |
| 1651 | { |
| 1652 | //Not a CREATE or DESTROY function |
| 1653 | } |
| 1654 | |
| 1655 | static VKAPI_ATTR void VKAPI_CALL CmdEndQuery( |
| 1656 | VkCommandBuffer commandBuffer, |
| 1657 | VkQueryPool queryPool, |
| 1658 | uint32_t query) |
| 1659 | { |
| 1660 | //Not a CREATE or DESTROY function |
| 1661 | } |
| 1662 | |
| 1663 | static VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool( |
| 1664 | VkCommandBuffer commandBuffer, |
| 1665 | VkQueryPool queryPool, |
| 1666 | uint32_t firstQuery, |
| 1667 | uint32_t queryCount) |
| 1668 | { |
| 1669 | //Not a CREATE or DESTROY function |
| 1670 | } |
| 1671 | |
| 1672 | static VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp( |
| 1673 | VkCommandBuffer commandBuffer, |
| 1674 | VkPipelineStageFlagBits pipelineStage, |
| 1675 | VkQueryPool queryPool, |
| 1676 | uint32_t query) |
| 1677 | { |
| 1678 | //Not a CREATE or DESTROY function |
| 1679 | } |
| 1680 | |
| 1681 | static VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults( |
| 1682 | VkCommandBuffer commandBuffer, |
| 1683 | VkQueryPool queryPool, |
| 1684 | uint32_t firstQuery, |
| 1685 | uint32_t queryCount, |
| 1686 | VkBuffer dstBuffer, |
| 1687 | VkDeviceSize dstOffset, |
| 1688 | VkDeviceSize stride, |
| 1689 | VkQueryResultFlags flags) |
| 1690 | { |
| 1691 | //Not a CREATE or DESTROY function |
| 1692 | } |
| 1693 | |
| 1694 | static VKAPI_ATTR void VKAPI_CALL CmdPushConstants( |
| 1695 | VkCommandBuffer commandBuffer, |
| 1696 | VkPipelineLayout layout, |
| 1697 | VkShaderStageFlags stageFlags, |
| 1698 | uint32_t offset, |
| 1699 | uint32_t size, |
| 1700 | const void* pValues) |
| 1701 | { |
| 1702 | //Not a CREATE or DESTROY function |
| 1703 | } |
| 1704 | |
| 1705 | static VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass( |
| 1706 | VkCommandBuffer commandBuffer, |
| 1707 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 1708 | VkSubpassContents contents) |
| 1709 | { |
| 1710 | //Not a CREATE or DESTROY function |
| 1711 | } |
| 1712 | |
| 1713 | static VKAPI_ATTR void VKAPI_CALL CmdNextSubpass( |
| 1714 | VkCommandBuffer commandBuffer, |
| 1715 | VkSubpassContents contents) |
| 1716 | { |
| 1717 | //Not a CREATE or DESTROY function |
| 1718 | } |
| 1719 | |
| 1720 | static VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass( |
| 1721 | VkCommandBuffer commandBuffer) |
| 1722 | { |
| 1723 | //Not a CREATE or DESTROY function |
| 1724 | } |
| 1725 | |
| 1726 | static VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands( |
| 1727 | VkCommandBuffer commandBuffer, |
| 1728 | uint32_t commandBufferCount, |
| 1729 | const VkCommandBuffer* pCommandBuffers) |
| 1730 | { |
| 1731 | //Not a CREATE or DESTROY function |
| 1732 | } |
| 1733 | |
| 1734 | |
| 1735 | static VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceVersion( |
| 1736 | uint32_t* pApiVersion) |
| 1737 | { |
Tobin Ehlis | 5b40c4a | 2020-06-04 15:54:56 -0600 | [diff] [blame] | 1738 | |
Tobin Ehlis | 9d7880c | 2020-06-04 21:31:45 -0600 | [diff] [blame] | 1739 | *pApiVersion = kSupportedVulkanAPIVersion; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 1740 | return VK_SUCCESS; |
| 1741 | } |
| 1742 | |
| 1743 | static VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2( |
| 1744 | VkDevice device, |
| 1745 | uint32_t bindInfoCount, |
| 1746 | const VkBindBufferMemoryInfo* pBindInfos) |
| 1747 | { |
| 1748 | //Not a CREATE or DESTROY function |
| 1749 | return VK_SUCCESS; |
| 1750 | } |
| 1751 | |
| 1752 | static VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2( |
| 1753 | VkDevice device, |
| 1754 | uint32_t bindInfoCount, |
| 1755 | const VkBindImageMemoryInfo* pBindInfos) |
| 1756 | { |
| 1757 | //Not a CREATE or DESTROY function |
| 1758 | return VK_SUCCESS; |
| 1759 | } |
| 1760 | |
| 1761 | static VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeatures( |
| 1762 | VkDevice device, |
| 1763 | uint32_t heapIndex, |
| 1764 | uint32_t localDeviceIndex, |
| 1765 | uint32_t remoteDeviceIndex, |
| 1766 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) |
| 1767 | { |
| 1768 | //Not a CREATE or DESTROY function |
| 1769 | } |
| 1770 | |
| 1771 | static VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMask( |
| 1772 | VkCommandBuffer commandBuffer, |
| 1773 | uint32_t deviceMask) |
| 1774 | { |
| 1775 | //Not a CREATE or DESTROY function |
| 1776 | } |
| 1777 | |
| 1778 | static VKAPI_ATTR void VKAPI_CALL CmdDispatchBase( |
| 1779 | VkCommandBuffer commandBuffer, |
| 1780 | uint32_t baseGroupX, |
| 1781 | uint32_t baseGroupY, |
| 1782 | uint32_t baseGroupZ, |
| 1783 | uint32_t groupCountX, |
| 1784 | uint32_t groupCountY, |
| 1785 | uint32_t groupCountZ) |
| 1786 | { |
| 1787 | //Not a CREATE or DESTROY function |
| 1788 | } |
| 1789 | |
| 1790 | static VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroups( |
| 1791 | VkInstance instance, |
| 1792 | uint32_t* pPhysicalDeviceGroupCount, |
| 1793 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) |
| 1794 | { |
| 1795 | //Not a CREATE or DESTROY function |
| 1796 | return VK_SUCCESS; |
| 1797 | } |
| 1798 | |
| 1799 | static VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2( |
| 1800 | VkDevice device, |
| 1801 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 1802 | VkMemoryRequirements2* pMemoryRequirements) |
| 1803 | { |
| 1804 | GetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); |
| 1805 | } |
| 1806 | |
| 1807 | static VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2( |
| 1808 | VkDevice device, |
| 1809 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 1810 | VkMemoryRequirements2* pMemoryRequirements) |
| 1811 | { |
| 1812 | GetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); |
| 1813 | } |
| 1814 | |
| 1815 | static VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2( |
| 1816 | VkDevice device, |
| 1817 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 1818 | uint32_t* pSparseMemoryRequirementCount, |
| 1819 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 1820 | { |
| 1821 | //Not a CREATE or DESTROY function |
| 1822 | } |
| 1823 | |
| 1824 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2( |
| 1825 | VkPhysicalDevice physicalDevice, |
| 1826 | VkPhysicalDeviceFeatures2* pFeatures) |
| 1827 | { |
| 1828 | GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); |
| 1829 | } |
| 1830 | |
| 1831 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2( |
| 1832 | VkPhysicalDevice physicalDevice, |
| 1833 | VkPhysicalDeviceProperties2* pProperties) |
| 1834 | { |
| 1835 | GetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); |
| 1836 | } |
| 1837 | |
| 1838 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2( |
| 1839 | VkPhysicalDevice physicalDevice, |
| 1840 | VkFormat format, |
| 1841 | VkFormatProperties2* pFormatProperties) |
| 1842 | { |
| 1843 | GetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties); |
| 1844 | } |
| 1845 | |
| 1846 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2( |
| 1847 | VkPhysicalDevice physicalDevice, |
| 1848 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 1849 | VkImageFormatProperties2* pImageFormatProperties) |
| 1850 | { |
| 1851 | return GetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, pImageFormatProperties); |
| 1852 | } |
| 1853 | |
| 1854 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2( |
| 1855 | VkPhysicalDevice physicalDevice, |
| 1856 | uint32_t* pQueueFamilyPropertyCount, |
| 1857 | VkQueueFamilyProperties2* pQueueFamilyProperties) |
| 1858 | { |
| 1859 | GetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); |
| 1860 | } |
| 1861 | |
| 1862 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2( |
| 1863 | VkPhysicalDevice physicalDevice, |
| 1864 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) |
| 1865 | { |
| 1866 | GetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties); |
| 1867 | } |
| 1868 | |
| 1869 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2( |
| 1870 | VkPhysicalDevice physicalDevice, |
| 1871 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 1872 | uint32_t* pPropertyCount, |
| 1873 | VkSparseImageFormatProperties2* pProperties) |
| 1874 | { |
| 1875 | //Not a CREATE or DESTROY function |
| 1876 | } |
| 1877 | |
| 1878 | static VKAPI_ATTR void VKAPI_CALL TrimCommandPool( |
| 1879 | VkDevice device, |
| 1880 | VkCommandPool commandPool, |
| 1881 | VkCommandPoolTrimFlags flags) |
| 1882 | { |
| 1883 | //Not a CREATE or DESTROY function |
| 1884 | } |
| 1885 | |
| 1886 | static VKAPI_ATTR void VKAPI_CALL GetDeviceQueue2( |
| 1887 | VkDevice device, |
| 1888 | const VkDeviceQueueInfo2* pQueueInfo, |
| 1889 | VkQueue* pQueue) |
| 1890 | { |
| 1891 | GetDeviceQueue(device, pQueueInfo->queueFamilyIndex, pQueueInfo->queueIndex, pQueue); |
| 1892 | // TODO: Add further support for GetDeviceQueue2 features |
| 1893 | } |
| 1894 | |
| 1895 | static VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversion( |
| 1896 | VkDevice device, |
| 1897 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 1898 | const VkAllocationCallbacks* pAllocator, |
| 1899 | VkSamplerYcbcrConversion* pYcbcrConversion) |
| 1900 | { |
| 1901 | unique_lock_t lock(global_lock); |
| 1902 | *pYcbcrConversion = (VkSamplerYcbcrConversion)global_unique_handle++; |
| 1903 | return VK_SUCCESS; |
| 1904 | } |
| 1905 | |
| 1906 | static VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversion( |
| 1907 | VkDevice device, |
| 1908 | VkSamplerYcbcrConversion ycbcrConversion, |
| 1909 | const VkAllocationCallbacks* pAllocator) |
| 1910 | { |
| 1911 | //Destroy object |
| 1912 | } |
| 1913 | |
| 1914 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplate( |
| 1915 | VkDevice device, |
| 1916 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 1917 | const VkAllocationCallbacks* pAllocator, |
| 1918 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) |
| 1919 | { |
| 1920 | unique_lock_t lock(global_lock); |
| 1921 | *pDescriptorUpdateTemplate = (VkDescriptorUpdateTemplate)global_unique_handle++; |
| 1922 | return VK_SUCCESS; |
| 1923 | } |
| 1924 | |
| 1925 | static VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplate( |
| 1926 | VkDevice device, |
| 1927 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 1928 | const VkAllocationCallbacks* pAllocator) |
| 1929 | { |
| 1930 | //Destroy object |
| 1931 | } |
| 1932 | |
| 1933 | static VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplate( |
| 1934 | VkDevice device, |
| 1935 | VkDescriptorSet descriptorSet, |
| 1936 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 1937 | const void* pData) |
| 1938 | { |
| 1939 | //Not a CREATE or DESTROY function |
| 1940 | } |
| 1941 | |
| 1942 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferProperties( |
| 1943 | VkPhysicalDevice physicalDevice, |
| 1944 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 1945 | VkExternalBufferProperties* pExternalBufferProperties) |
| 1946 | { |
| 1947 | // Hard-code support for all handle types and features |
| 1948 | pExternalBufferProperties->externalMemoryProperties.externalMemoryFeatures = 0x7; |
| 1949 | pExternalBufferProperties->externalMemoryProperties.exportFromImportedHandleTypes = 0x1FF; |
| 1950 | pExternalBufferProperties->externalMemoryProperties.compatibleHandleTypes = 0x1FF; |
| 1951 | } |
| 1952 | |
| 1953 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFenceProperties( |
| 1954 | VkPhysicalDevice physicalDevice, |
| 1955 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 1956 | VkExternalFenceProperties* pExternalFenceProperties) |
| 1957 | { |
| 1958 | // Hard-code support for all handle types and features |
| 1959 | pExternalFenceProperties->exportFromImportedHandleTypes = 0xF; |
| 1960 | pExternalFenceProperties->compatibleHandleTypes = 0xF; |
| 1961 | pExternalFenceProperties->externalFenceFeatures = 0x3; |
| 1962 | } |
| 1963 | |
| 1964 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphoreProperties( |
| 1965 | VkPhysicalDevice physicalDevice, |
| 1966 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 1967 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) |
| 1968 | { |
| 1969 | // Hard code support for all handle types and features |
| 1970 | pExternalSemaphoreProperties->exportFromImportedHandleTypes = 0x1F; |
| 1971 | pExternalSemaphoreProperties->compatibleHandleTypes = 0x1F; |
| 1972 | pExternalSemaphoreProperties->externalSemaphoreFeatures = 0x3; |
| 1973 | } |
| 1974 | |
| 1975 | static VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupport( |
| 1976 | VkDevice device, |
| 1977 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 1978 | VkDescriptorSetLayoutSupport* pSupport) |
| 1979 | { |
| 1980 | //Not a CREATE or DESTROY function |
| 1981 | } |
| 1982 | |
| 1983 | |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 1984 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCount( |
| 1985 | VkCommandBuffer commandBuffer, |
| 1986 | VkBuffer buffer, |
| 1987 | VkDeviceSize offset, |
| 1988 | VkBuffer countBuffer, |
| 1989 | VkDeviceSize countBufferOffset, |
| 1990 | uint32_t maxDrawCount, |
| 1991 | uint32_t stride) |
| 1992 | { |
| 1993 | //Not a CREATE or DESTROY function |
| 1994 | } |
| 1995 | |
| 1996 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCount( |
| 1997 | VkCommandBuffer commandBuffer, |
| 1998 | VkBuffer buffer, |
| 1999 | VkDeviceSize offset, |
| 2000 | VkBuffer countBuffer, |
| 2001 | VkDeviceSize countBufferOffset, |
| 2002 | uint32_t maxDrawCount, |
| 2003 | uint32_t stride) |
| 2004 | { |
| 2005 | //Not a CREATE or DESTROY function |
| 2006 | } |
| 2007 | |
| 2008 | static VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2( |
| 2009 | VkDevice device, |
| 2010 | const VkRenderPassCreateInfo2* pCreateInfo, |
| 2011 | const VkAllocationCallbacks* pAllocator, |
| 2012 | VkRenderPass* pRenderPass) |
| 2013 | { |
| 2014 | unique_lock_t lock(global_lock); |
| 2015 | *pRenderPass = (VkRenderPass)global_unique_handle++; |
| 2016 | return VK_SUCCESS; |
| 2017 | } |
| 2018 | |
| 2019 | static VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2( |
| 2020 | VkCommandBuffer commandBuffer, |
| 2021 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 2022 | const VkSubpassBeginInfo* pSubpassBeginInfo) |
| 2023 | { |
| 2024 | //Not a CREATE or DESTROY function |
| 2025 | } |
| 2026 | |
| 2027 | static VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2( |
| 2028 | VkCommandBuffer commandBuffer, |
| 2029 | const VkSubpassBeginInfo* pSubpassBeginInfo, |
| 2030 | const VkSubpassEndInfo* pSubpassEndInfo) |
| 2031 | { |
| 2032 | //Not a CREATE or DESTROY function |
| 2033 | } |
| 2034 | |
| 2035 | static VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2( |
| 2036 | VkCommandBuffer commandBuffer, |
| 2037 | const VkSubpassEndInfo* pSubpassEndInfo) |
| 2038 | { |
| 2039 | //Not a CREATE or DESTROY function |
| 2040 | } |
| 2041 | |
| 2042 | static VKAPI_ATTR void VKAPI_CALL ResetQueryPool( |
| 2043 | VkDevice device, |
| 2044 | VkQueryPool queryPool, |
| 2045 | uint32_t firstQuery, |
| 2046 | uint32_t queryCount) |
| 2047 | { |
| 2048 | //Not a CREATE or DESTROY function |
| 2049 | } |
| 2050 | |
| 2051 | static VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValue( |
| 2052 | VkDevice device, |
| 2053 | VkSemaphore semaphore, |
| 2054 | uint64_t* pValue) |
| 2055 | { |
| 2056 | //Not a CREATE or DESTROY function |
| 2057 | return VK_SUCCESS; |
| 2058 | } |
| 2059 | |
| 2060 | static VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphores( |
| 2061 | VkDevice device, |
| 2062 | const VkSemaphoreWaitInfo* pWaitInfo, |
| 2063 | uint64_t timeout) |
| 2064 | { |
| 2065 | //Not a CREATE or DESTROY function |
| 2066 | return VK_SUCCESS; |
| 2067 | } |
| 2068 | |
| 2069 | static VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphore( |
| 2070 | VkDevice device, |
| 2071 | const VkSemaphoreSignalInfo* pSignalInfo) |
| 2072 | { |
| 2073 | //Not a CREATE or DESTROY function |
| 2074 | return VK_SUCCESS; |
| 2075 | } |
| 2076 | |
| 2077 | static VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddress( |
| 2078 | VkDevice device, |
| 2079 | const VkBufferDeviceAddressInfo* pInfo) |
| 2080 | { |
| 2081 | //Not a CREATE or DESTROY function |
| 2082 | return VK_SUCCESS; |
| 2083 | } |
| 2084 | |
| 2085 | static VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddress( |
| 2086 | VkDevice device, |
| 2087 | const VkBufferDeviceAddressInfo* pInfo) |
| 2088 | { |
| 2089 | //Not a CREATE or DESTROY function |
| 2090 | return VK_SUCCESS; |
| 2091 | } |
| 2092 | |
| 2093 | static VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddress( |
| 2094 | VkDevice device, |
| 2095 | const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) |
| 2096 | { |
| 2097 | //Not a CREATE or DESTROY function |
| 2098 | return VK_SUCCESS; |
| 2099 | } |
| 2100 | |
| 2101 | |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 2102 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolProperties( |
| 2103 | VkPhysicalDevice physicalDevice, |
| 2104 | uint32_t* pToolCount, |
| 2105 | VkPhysicalDeviceToolProperties* pToolProperties) |
| 2106 | { |
| 2107 | //Not a CREATE or DESTROY function |
| 2108 | return VK_SUCCESS; |
| 2109 | } |
| 2110 | |
| 2111 | static VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlot( |
| 2112 | VkDevice device, |
| 2113 | const VkPrivateDataSlotCreateInfo* pCreateInfo, |
| 2114 | const VkAllocationCallbacks* pAllocator, |
| 2115 | VkPrivateDataSlot* pPrivateDataSlot) |
| 2116 | { |
| 2117 | unique_lock_t lock(global_lock); |
| 2118 | *pPrivateDataSlot = (VkPrivateDataSlot)global_unique_handle++; |
| 2119 | return VK_SUCCESS; |
| 2120 | } |
| 2121 | |
| 2122 | static VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlot( |
| 2123 | VkDevice device, |
| 2124 | VkPrivateDataSlot privateDataSlot, |
| 2125 | const VkAllocationCallbacks* pAllocator) |
| 2126 | { |
| 2127 | //Destroy object |
| 2128 | } |
| 2129 | |
| 2130 | static VKAPI_ATTR VkResult VKAPI_CALL SetPrivateData( |
| 2131 | VkDevice device, |
| 2132 | VkObjectType objectType, |
| 2133 | uint64_t objectHandle, |
| 2134 | VkPrivateDataSlot privateDataSlot, |
| 2135 | uint64_t data) |
| 2136 | { |
| 2137 | //Not a CREATE or DESTROY function |
| 2138 | return VK_SUCCESS; |
| 2139 | } |
| 2140 | |
| 2141 | static VKAPI_ATTR void VKAPI_CALL GetPrivateData( |
| 2142 | VkDevice device, |
| 2143 | VkObjectType objectType, |
| 2144 | uint64_t objectHandle, |
| 2145 | VkPrivateDataSlot privateDataSlot, |
| 2146 | uint64_t* pData) |
| 2147 | { |
| 2148 | //Not a CREATE or DESTROY function |
| 2149 | } |
| 2150 | |
| 2151 | static VKAPI_ATTR void VKAPI_CALL CmdSetEvent2( |
| 2152 | VkCommandBuffer commandBuffer, |
| 2153 | VkEvent event, |
| 2154 | const VkDependencyInfo* pDependencyInfo) |
| 2155 | { |
| 2156 | //Not a CREATE or DESTROY function |
| 2157 | } |
| 2158 | |
| 2159 | static VKAPI_ATTR void VKAPI_CALL CmdResetEvent2( |
| 2160 | VkCommandBuffer commandBuffer, |
| 2161 | VkEvent event, |
| 2162 | VkPipelineStageFlags2 stageMask) |
| 2163 | { |
| 2164 | //Not a CREATE or DESTROY function |
| 2165 | } |
| 2166 | |
| 2167 | static VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2( |
| 2168 | VkCommandBuffer commandBuffer, |
| 2169 | uint32_t eventCount, |
| 2170 | const VkEvent* pEvents, |
| 2171 | const VkDependencyInfo* pDependencyInfos) |
| 2172 | { |
| 2173 | //Not a CREATE or DESTROY function |
| 2174 | } |
| 2175 | |
| 2176 | static VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2( |
| 2177 | VkCommandBuffer commandBuffer, |
| 2178 | const VkDependencyInfo* pDependencyInfo) |
| 2179 | { |
| 2180 | //Not a CREATE or DESTROY function |
| 2181 | } |
| 2182 | |
| 2183 | static VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2( |
| 2184 | VkCommandBuffer commandBuffer, |
| 2185 | VkPipelineStageFlags2 stage, |
| 2186 | VkQueryPool queryPool, |
| 2187 | uint32_t query) |
| 2188 | { |
| 2189 | //Not a CREATE or DESTROY function |
| 2190 | } |
| 2191 | |
| 2192 | static VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2( |
| 2193 | VkQueue queue, |
| 2194 | uint32_t submitCount, |
| 2195 | const VkSubmitInfo2* pSubmits, |
| 2196 | VkFence fence) |
| 2197 | { |
| 2198 | //Not a CREATE or DESTROY function |
| 2199 | return VK_SUCCESS; |
| 2200 | } |
| 2201 | |
| 2202 | static VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2( |
| 2203 | VkCommandBuffer commandBuffer, |
| 2204 | const VkCopyBufferInfo2* pCopyBufferInfo) |
| 2205 | { |
| 2206 | //Not a CREATE or DESTROY function |
| 2207 | } |
| 2208 | |
| 2209 | static VKAPI_ATTR void VKAPI_CALL CmdCopyImage2( |
| 2210 | VkCommandBuffer commandBuffer, |
| 2211 | const VkCopyImageInfo2* pCopyImageInfo) |
| 2212 | { |
| 2213 | //Not a CREATE or DESTROY function |
| 2214 | } |
| 2215 | |
| 2216 | static VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2( |
| 2217 | VkCommandBuffer commandBuffer, |
| 2218 | const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) |
| 2219 | { |
| 2220 | //Not a CREATE or DESTROY function |
| 2221 | } |
| 2222 | |
| 2223 | static VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2( |
| 2224 | VkCommandBuffer commandBuffer, |
| 2225 | const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) |
| 2226 | { |
| 2227 | //Not a CREATE or DESTROY function |
| 2228 | } |
| 2229 | |
| 2230 | static VKAPI_ATTR void VKAPI_CALL CmdBlitImage2( |
| 2231 | VkCommandBuffer commandBuffer, |
| 2232 | const VkBlitImageInfo2* pBlitImageInfo) |
| 2233 | { |
| 2234 | //Not a CREATE or DESTROY function |
| 2235 | } |
| 2236 | |
| 2237 | static VKAPI_ATTR void VKAPI_CALL CmdResolveImage2( |
| 2238 | VkCommandBuffer commandBuffer, |
| 2239 | const VkResolveImageInfo2* pResolveImageInfo) |
| 2240 | { |
| 2241 | //Not a CREATE or DESTROY function |
| 2242 | } |
| 2243 | |
| 2244 | static VKAPI_ATTR void VKAPI_CALL CmdBeginRendering( |
| 2245 | VkCommandBuffer commandBuffer, |
| 2246 | const VkRenderingInfo* pRenderingInfo) |
| 2247 | { |
| 2248 | //Not a CREATE or DESTROY function |
| 2249 | } |
| 2250 | |
| 2251 | static VKAPI_ATTR void VKAPI_CALL CmdEndRendering( |
| 2252 | VkCommandBuffer commandBuffer) |
| 2253 | { |
| 2254 | //Not a CREATE or DESTROY function |
| 2255 | } |
| 2256 | |
| 2257 | static VKAPI_ATTR void VKAPI_CALL CmdSetCullMode( |
| 2258 | VkCommandBuffer commandBuffer, |
| 2259 | VkCullModeFlags cullMode) |
| 2260 | { |
| 2261 | //Not a CREATE or DESTROY function |
| 2262 | } |
| 2263 | |
| 2264 | static VKAPI_ATTR void VKAPI_CALL CmdSetFrontFace( |
| 2265 | VkCommandBuffer commandBuffer, |
| 2266 | VkFrontFace frontFace) |
| 2267 | { |
| 2268 | //Not a CREATE or DESTROY function |
| 2269 | } |
| 2270 | |
| 2271 | static VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopology( |
| 2272 | VkCommandBuffer commandBuffer, |
| 2273 | VkPrimitiveTopology primitiveTopology) |
| 2274 | { |
| 2275 | //Not a CREATE or DESTROY function |
| 2276 | } |
| 2277 | |
| 2278 | static VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCount( |
| 2279 | VkCommandBuffer commandBuffer, |
| 2280 | uint32_t viewportCount, |
| 2281 | const VkViewport* pViewports) |
| 2282 | { |
| 2283 | //Not a CREATE or DESTROY function |
| 2284 | } |
| 2285 | |
| 2286 | static VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCount( |
| 2287 | VkCommandBuffer commandBuffer, |
| 2288 | uint32_t scissorCount, |
| 2289 | const VkRect2D* pScissors) |
| 2290 | { |
| 2291 | //Not a CREATE or DESTROY function |
| 2292 | } |
| 2293 | |
| 2294 | static VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2( |
| 2295 | VkCommandBuffer commandBuffer, |
| 2296 | uint32_t firstBinding, |
| 2297 | uint32_t bindingCount, |
| 2298 | const VkBuffer* pBuffers, |
| 2299 | const VkDeviceSize* pOffsets, |
| 2300 | const VkDeviceSize* pSizes, |
| 2301 | const VkDeviceSize* pStrides) |
| 2302 | { |
| 2303 | //Not a CREATE or DESTROY function |
| 2304 | } |
| 2305 | |
| 2306 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnable( |
| 2307 | VkCommandBuffer commandBuffer, |
| 2308 | VkBool32 depthTestEnable) |
| 2309 | { |
| 2310 | //Not a CREATE or DESTROY function |
| 2311 | } |
| 2312 | |
| 2313 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnable( |
| 2314 | VkCommandBuffer commandBuffer, |
| 2315 | VkBool32 depthWriteEnable) |
| 2316 | { |
| 2317 | //Not a CREATE or DESTROY function |
| 2318 | } |
| 2319 | |
| 2320 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOp( |
| 2321 | VkCommandBuffer commandBuffer, |
| 2322 | VkCompareOp depthCompareOp) |
| 2323 | { |
| 2324 | //Not a CREATE or DESTROY function |
| 2325 | } |
| 2326 | |
| 2327 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnable( |
| 2328 | VkCommandBuffer commandBuffer, |
| 2329 | VkBool32 depthBoundsTestEnable) |
| 2330 | { |
| 2331 | //Not a CREATE or DESTROY function |
| 2332 | } |
| 2333 | |
| 2334 | static VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnable( |
| 2335 | VkCommandBuffer commandBuffer, |
| 2336 | VkBool32 stencilTestEnable) |
| 2337 | { |
| 2338 | //Not a CREATE or DESTROY function |
| 2339 | } |
| 2340 | |
| 2341 | static VKAPI_ATTR void VKAPI_CALL CmdSetStencilOp( |
| 2342 | VkCommandBuffer commandBuffer, |
| 2343 | VkStencilFaceFlags faceMask, |
| 2344 | VkStencilOp failOp, |
| 2345 | VkStencilOp passOp, |
| 2346 | VkStencilOp depthFailOp, |
| 2347 | VkCompareOp compareOp) |
| 2348 | { |
| 2349 | //Not a CREATE or DESTROY function |
| 2350 | } |
| 2351 | |
| 2352 | static VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnable( |
| 2353 | VkCommandBuffer commandBuffer, |
| 2354 | VkBool32 rasterizerDiscardEnable) |
| 2355 | { |
| 2356 | //Not a CREATE or DESTROY function |
| 2357 | } |
| 2358 | |
| 2359 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnable( |
| 2360 | VkCommandBuffer commandBuffer, |
| 2361 | VkBool32 depthBiasEnable) |
| 2362 | { |
| 2363 | //Not a CREATE or DESTROY function |
| 2364 | } |
| 2365 | |
| 2366 | static VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnable( |
| 2367 | VkCommandBuffer commandBuffer, |
| 2368 | VkBool32 primitiveRestartEnable) |
| 2369 | { |
| 2370 | //Not a CREATE or DESTROY function |
| 2371 | } |
| 2372 | |
| 2373 | static VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirements( |
| 2374 | VkDevice device, |
| 2375 | const VkDeviceBufferMemoryRequirements* pInfo, |
| 2376 | VkMemoryRequirements2* pMemoryRequirements) |
| 2377 | { |
| 2378 | //Not a CREATE or DESTROY function |
| 2379 | } |
| 2380 | |
| 2381 | static VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirements( |
| 2382 | VkDevice device, |
| 2383 | const VkDeviceImageMemoryRequirements* pInfo, |
| 2384 | VkMemoryRequirements2* pMemoryRequirements) |
| 2385 | { |
| 2386 | //Not a CREATE or DESTROY function |
| 2387 | } |
| 2388 | |
| 2389 | static VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirements( |
| 2390 | VkDevice device, |
| 2391 | const VkDeviceImageMemoryRequirements* pInfo, |
| 2392 | uint32_t* pSparseMemoryRequirementCount, |
| 2393 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 2394 | { |
| 2395 | //Not a CREATE or DESTROY function |
| 2396 | } |
| 2397 | |
| 2398 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2399 | static VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR( |
| 2400 | VkInstance instance, |
| 2401 | VkSurfaceKHR surface, |
| 2402 | const VkAllocationCallbacks* pAllocator) |
| 2403 | { |
| 2404 | //Destroy object |
| 2405 | } |
| 2406 | |
| 2407 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR( |
| 2408 | VkPhysicalDevice physicalDevice, |
| 2409 | uint32_t queueFamilyIndex, |
| 2410 | VkSurfaceKHR surface, |
| 2411 | VkBool32* pSupported) |
| 2412 | { |
| 2413 | // Currently say that all surface/queue combos are supported |
| 2414 | *pSupported = VK_TRUE; |
| 2415 | return VK_SUCCESS; |
| 2416 | } |
| 2417 | |
| 2418 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 2419 | VkPhysicalDevice physicalDevice, |
| 2420 | VkSurfaceKHR surface, |
| 2421 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) |
| 2422 | { |
| 2423 | // In general just say max supported is available for requested surface |
| 2424 | pSurfaceCapabilities->minImageCount = 1; |
| 2425 | pSurfaceCapabilities->maxImageCount = 0; |
| 2426 | pSurfaceCapabilities->currentExtent.width = 0xFFFFFFFF; |
| 2427 | pSurfaceCapabilities->currentExtent.height = 0xFFFFFFFF; |
| 2428 | pSurfaceCapabilities->minImageExtent.width = 1; |
| 2429 | pSurfaceCapabilities->minImageExtent.height = 1; |
Jamie Madill | dda8dab | 2020-08-16 22:43:50 -0400 | [diff] [blame] | 2430 | pSurfaceCapabilities->maxImageExtent.width = 0xFFFF; |
| 2431 | pSurfaceCapabilities->maxImageExtent.height = 0xFFFF; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2432 | pSurfaceCapabilities->maxImageArrayLayers = 128; |
| 2433 | pSurfaceCapabilities->supportedTransforms = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR | |
| 2434 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR | |
| 2435 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR | |
| 2436 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR | |
| 2437 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR | |
| 2438 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR | |
| 2439 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR | |
| 2440 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR | |
| 2441 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR; |
| 2442 | pSurfaceCapabilities->currentTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; |
| 2443 | pSurfaceCapabilities->supportedCompositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR | |
| 2444 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR | |
| 2445 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR | |
| 2446 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR; |
| 2447 | pSurfaceCapabilities->supportedUsageFlags = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | |
| 2448 | VK_IMAGE_USAGE_TRANSFER_DST_BIT | |
| 2449 | VK_IMAGE_USAGE_SAMPLED_BIT | |
| 2450 | VK_IMAGE_USAGE_STORAGE_BIT | |
| 2451 | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | |
| 2452 | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | |
| 2453 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | |
| 2454 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT; |
| 2455 | return VK_SUCCESS; |
| 2456 | } |
| 2457 | |
| 2458 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR( |
| 2459 | VkPhysicalDevice physicalDevice, |
| 2460 | VkSurfaceKHR surface, |
| 2461 | uint32_t* pSurfaceFormatCount, |
| 2462 | VkSurfaceFormatKHR* pSurfaceFormats) |
| 2463 | { |
| 2464 | // Currently always say that RGBA8 & BGRA8 are supported |
| 2465 | if (!pSurfaceFormats) { |
| 2466 | *pSurfaceFormatCount = 2; |
| 2467 | } else { |
Charles Giessen | 576ce7a | 2022-04-13 14:42:25 -0600 | [diff] [blame] | 2468 | if (*pSurfaceFormatCount >= 2) { |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2469 | pSurfaceFormats[1].format = VK_FORMAT_R8G8B8A8_UNORM; |
| 2470 | pSurfaceFormats[1].colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; |
Charles Giessen | 576ce7a | 2022-04-13 14:42:25 -0600 | [diff] [blame] | 2471 | } |
| 2472 | if (*pSurfaceFormatCount >= 1) { |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2473 | pSurfaceFormats[0].format = VK_FORMAT_B8G8R8A8_UNORM; |
| 2474 | pSurfaceFormats[0].colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2475 | } |
| 2476 | } |
| 2477 | return VK_SUCCESS; |
| 2478 | } |
| 2479 | |
| 2480 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR( |
| 2481 | VkPhysicalDevice physicalDevice, |
| 2482 | VkSurfaceKHR surface, |
| 2483 | uint32_t* pPresentModeCount, |
| 2484 | VkPresentModeKHR* pPresentModes) |
| 2485 | { |
| 2486 | // Currently always say that all present modes are supported |
| 2487 | if (!pPresentModes) { |
| 2488 | *pPresentModeCount = 6; |
| 2489 | } else { |
Charles Giessen | 576ce7a | 2022-04-13 14:42:25 -0600 | [diff] [blame] | 2490 | if (*pPresentModeCount >= 6) pPresentModes[5] = VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR; |
| 2491 | if (*pPresentModeCount >= 5) pPresentModes[4] = VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR; |
| 2492 | if (*pPresentModeCount >= 4) pPresentModes[3] = VK_PRESENT_MODE_FIFO_RELAXED_KHR; |
| 2493 | if (*pPresentModeCount >= 3) pPresentModes[2] = VK_PRESENT_MODE_FIFO_KHR; |
| 2494 | if (*pPresentModeCount >= 2) pPresentModes[1] = VK_PRESENT_MODE_MAILBOX_KHR; |
| 2495 | if (*pPresentModeCount >= 1) pPresentModes[0] = VK_PRESENT_MODE_IMMEDIATE_KHR; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2496 | } |
| 2497 | return VK_SUCCESS; |
| 2498 | } |
| 2499 | |
| 2500 | |
| 2501 | static VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR( |
| 2502 | VkDevice device, |
| 2503 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
| 2504 | const VkAllocationCallbacks* pAllocator, |
| 2505 | VkSwapchainKHR* pSwapchain) |
| 2506 | { |
| 2507 | unique_lock_t lock(global_lock); |
| 2508 | *pSwapchain = (VkSwapchainKHR)global_unique_handle++; |
Petr Kraus | 490e393 | 2020-04-08 21:47:25 +0200 | [diff] [blame] | 2509 | for(uint32_t i = 0; i < icd_swapchain_image_count; ++i){ |
| 2510 | swapchain_image_map[*pSwapchain][i] = (VkImage)global_unique_handle++; |
| 2511 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2512 | return VK_SUCCESS; |
| 2513 | } |
| 2514 | |
| 2515 | static VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR( |
| 2516 | VkDevice device, |
| 2517 | VkSwapchainKHR swapchain, |
| 2518 | const VkAllocationCallbacks* pAllocator) |
| 2519 | { |
Petr Kraus | 490e393 | 2020-04-08 21:47:25 +0200 | [diff] [blame] | 2520 | unique_lock_t lock(global_lock); |
| 2521 | swapchain_image_map.clear(); |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2522 | } |
| 2523 | |
| 2524 | static VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR( |
| 2525 | VkDevice device, |
| 2526 | VkSwapchainKHR swapchain, |
| 2527 | uint32_t* pSwapchainImageCount, |
| 2528 | VkImage* pSwapchainImages) |
| 2529 | { |
| 2530 | if (!pSwapchainImages) { |
Petr Kraus | 490e393 | 2020-04-08 21:47:25 +0200 | [diff] [blame] | 2531 | *pSwapchainImageCount = icd_swapchain_image_count; |
Petr Kraus | a7aff24 | 2020-04-08 20:57:14 +0200 | [diff] [blame] | 2532 | } else { |
| 2533 | unique_lock_t lock(global_lock); |
Petr Kraus | 490e393 | 2020-04-08 21:47:25 +0200 | [diff] [blame] | 2534 | for (uint32_t img_i = 0; img_i < (std::min)(*pSwapchainImageCount, icd_swapchain_image_count); ++img_i){ |
| 2535 | pSwapchainImages[img_i] = swapchain_image_map.at(swapchain)[img_i]; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2536 | } |
Petr Kraus | a7aff24 | 2020-04-08 20:57:14 +0200 | [diff] [blame] | 2537 | |
Petr Kraus | 490e393 | 2020-04-08 21:47:25 +0200 | [diff] [blame] | 2538 | if (*pSwapchainImageCount < icd_swapchain_image_count) return VK_INCOMPLETE; |
| 2539 | else if (*pSwapchainImageCount > icd_swapchain_image_count) *pSwapchainImageCount = icd_swapchain_image_count; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2540 | } |
| 2541 | return VK_SUCCESS; |
| 2542 | } |
| 2543 | |
| 2544 | static VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR( |
| 2545 | VkDevice device, |
| 2546 | VkSwapchainKHR swapchain, |
| 2547 | uint64_t timeout, |
| 2548 | VkSemaphore semaphore, |
| 2549 | VkFence fence, |
| 2550 | uint32_t* pImageIndex) |
| 2551 | { |
Petr Kraus | c4a09f6 | 2020-04-08 22:10:07 +0200 | [diff] [blame] | 2552 | *pImageIndex = 0; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2553 | return VK_SUCCESS; |
| 2554 | } |
| 2555 | |
| 2556 | static VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR( |
| 2557 | VkQueue queue, |
| 2558 | const VkPresentInfoKHR* pPresentInfo) |
| 2559 | { |
| 2560 | //Not a CREATE or DESTROY function |
| 2561 | return VK_SUCCESS; |
| 2562 | } |
| 2563 | |
| 2564 | static VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupPresentCapabilitiesKHR( |
| 2565 | VkDevice device, |
| 2566 | VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) |
| 2567 | { |
| 2568 | //Not a CREATE or DESTROY function |
| 2569 | return VK_SUCCESS; |
| 2570 | } |
| 2571 | |
| 2572 | static VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModesKHR( |
| 2573 | VkDevice device, |
| 2574 | VkSurfaceKHR surface, |
| 2575 | VkDeviceGroupPresentModeFlagsKHR* pModes) |
| 2576 | { |
| 2577 | //Not a CREATE or DESTROY function |
| 2578 | return VK_SUCCESS; |
| 2579 | } |
| 2580 | |
| 2581 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDevicePresentRectanglesKHR( |
| 2582 | VkPhysicalDevice physicalDevice, |
| 2583 | VkSurfaceKHR surface, |
| 2584 | uint32_t* pRectCount, |
| 2585 | VkRect2D* pRects) |
| 2586 | { |
| 2587 | //Not a CREATE or DESTROY function |
| 2588 | return VK_SUCCESS; |
| 2589 | } |
| 2590 | |
| 2591 | static VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImage2KHR( |
| 2592 | VkDevice device, |
| 2593 | const VkAcquireNextImageInfoKHR* pAcquireInfo, |
| 2594 | uint32_t* pImageIndex) |
| 2595 | { |
Petr Kraus | c4a09f6 | 2020-04-08 22:10:07 +0200 | [diff] [blame] | 2596 | *pImageIndex = 0; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2597 | return VK_SUCCESS; |
| 2598 | } |
| 2599 | |
| 2600 | |
| 2601 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR( |
| 2602 | VkPhysicalDevice physicalDevice, |
| 2603 | uint32_t* pPropertyCount, |
| 2604 | VkDisplayPropertiesKHR* pProperties) |
| 2605 | { |
| 2606 | //Not a CREATE or DESTROY function |
| 2607 | return VK_SUCCESS; |
| 2608 | } |
| 2609 | |
| 2610 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 2611 | VkPhysicalDevice physicalDevice, |
| 2612 | uint32_t* pPropertyCount, |
| 2613 | VkDisplayPlanePropertiesKHR* pProperties) |
| 2614 | { |
| 2615 | //Not a CREATE or DESTROY function |
| 2616 | return VK_SUCCESS; |
| 2617 | } |
| 2618 | |
| 2619 | static VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR( |
| 2620 | VkPhysicalDevice physicalDevice, |
| 2621 | uint32_t planeIndex, |
| 2622 | uint32_t* pDisplayCount, |
| 2623 | VkDisplayKHR* pDisplays) |
| 2624 | { |
| 2625 | //Not a CREATE or DESTROY function |
| 2626 | return VK_SUCCESS; |
| 2627 | } |
| 2628 | |
| 2629 | static VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR( |
| 2630 | VkPhysicalDevice physicalDevice, |
| 2631 | VkDisplayKHR display, |
| 2632 | uint32_t* pPropertyCount, |
| 2633 | VkDisplayModePropertiesKHR* pProperties) |
| 2634 | { |
| 2635 | //Not a CREATE or DESTROY function |
| 2636 | return VK_SUCCESS; |
| 2637 | } |
| 2638 | |
| 2639 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayModeKHR( |
| 2640 | VkPhysicalDevice physicalDevice, |
| 2641 | VkDisplayKHR display, |
| 2642 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
| 2643 | const VkAllocationCallbacks* pAllocator, |
| 2644 | VkDisplayModeKHR* pMode) |
| 2645 | { |
| 2646 | unique_lock_t lock(global_lock); |
| 2647 | *pMode = (VkDisplayModeKHR)global_unique_handle++; |
| 2648 | return VK_SUCCESS; |
| 2649 | } |
| 2650 | |
| 2651 | static VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR( |
| 2652 | VkPhysicalDevice physicalDevice, |
| 2653 | VkDisplayModeKHR mode, |
| 2654 | uint32_t planeIndex, |
| 2655 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) |
| 2656 | { |
| 2657 | //Not a CREATE or DESTROY function |
| 2658 | return VK_SUCCESS; |
| 2659 | } |
| 2660 | |
| 2661 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR( |
| 2662 | VkInstance instance, |
| 2663 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
| 2664 | const VkAllocationCallbacks* pAllocator, |
| 2665 | VkSurfaceKHR* pSurface) |
| 2666 | { |
| 2667 | unique_lock_t lock(global_lock); |
| 2668 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 2669 | return VK_SUCCESS; |
| 2670 | } |
| 2671 | |
| 2672 | |
| 2673 | static VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR( |
| 2674 | VkDevice device, |
| 2675 | uint32_t swapchainCount, |
| 2676 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 2677 | const VkAllocationCallbacks* pAllocator, |
| 2678 | VkSwapchainKHR* pSwapchains) |
| 2679 | { |
| 2680 | unique_lock_t lock(global_lock); |
| 2681 | for (uint32_t i = 0; i < swapchainCount; ++i) { |
| 2682 | pSwapchains[i] = (VkSwapchainKHR)global_unique_handle++; |
| 2683 | } |
| 2684 | return VK_SUCCESS; |
| 2685 | } |
| 2686 | |
| 2687 | #ifdef VK_USE_PLATFORM_XLIB_KHR |
| 2688 | |
| 2689 | static VKAPI_ATTR VkResult VKAPI_CALL CreateXlibSurfaceKHR( |
| 2690 | VkInstance instance, |
| 2691 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
| 2692 | const VkAllocationCallbacks* pAllocator, |
| 2693 | VkSurfaceKHR* pSurface) |
| 2694 | { |
| 2695 | unique_lock_t lock(global_lock); |
| 2696 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 2697 | return VK_SUCCESS; |
| 2698 | } |
| 2699 | |
| 2700 | static VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXlibPresentationSupportKHR( |
| 2701 | VkPhysicalDevice physicalDevice, |
| 2702 | uint32_t queueFamilyIndex, |
| 2703 | Display* dpy, |
| 2704 | VisualID visualID) |
| 2705 | { |
| 2706 | //Not a CREATE or DESTROY function |
| 2707 | return VK_SUCCESS; |
| 2708 | } |
| 2709 | #endif /* VK_USE_PLATFORM_XLIB_KHR */ |
| 2710 | |
| 2711 | #ifdef VK_USE_PLATFORM_XCB_KHR |
| 2712 | |
| 2713 | static VKAPI_ATTR VkResult VKAPI_CALL CreateXcbSurfaceKHR( |
| 2714 | VkInstance instance, |
| 2715 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
| 2716 | const VkAllocationCallbacks* pAllocator, |
| 2717 | VkSurfaceKHR* pSurface) |
| 2718 | { |
| 2719 | unique_lock_t lock(global_lock); |
| 2720 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 2721 | return VK_SUCCESS; |
| 2722 | } |
| 2723 | |
| 2724 | static VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXcbPresentationSupportKHR( |
| 2725 | VkPhysicalDevice physicalDevice, |
| 2726 | uint32_t queueFamilyIndex, |
| 2727 | xcb_connection_t* connection, |
| 2728 | xcb_visualid_t visual_id) |
| 2729 | { |
| 2730 | //Not a CREATE or DESTROY function |
| 2731 | return VK_SUCCESS; |
| 2732 | } |
| 2733 | #endif /* VK_USE_PLATFORM_XCB_KHR */ |
| 2734 | |
| 2735 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR |
| 2736 | |
| 2737 | static VKAPI_ATTR VkResult VKAPI_CALL CreateWaylandSurfaceKHR( |
| 2738 | VkInstance instance, |
| 2739 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
| 2740 | const VkAllocationCallbacks* pAllocator, |
| 2741 | VkSurfaceKHR* pSurface) |
| 2742 | { |
| 2743 | unique_lock_t lock(global_lock); |
| 2744 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 2745 | return VK_SUCCESS; |
| 2746 | } |
| 2747 | |
| 2748 | static VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWaylandPresentationSupportKHR( |
| 2749 | VkPhysicalDevice physicalDevice, |
| 2750 | uint32_t queueFamilyIndex, |
| 2751 | struct wl_display* display) |
| 2752 | { |
| 2753 | //Not a CREATE or DESTROY function |
| 2754 | return VK_SUCCESS; |
| 2755 | } |
| 2756 | #endif /* VK_USE_PLATFORM_WAYLAND_KHR */ |
| 2757 | |
| 2758 | #ifdef VK_USE_PLATFORM_ANDROID_KHR |
| 2759 | |
| 2760 | static VKAPI_ATTR VkResult VKAPI_CALL CreateAndroidSurfaceKHR( |
| 2761 | VkInstance instance, |
| 2762 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
| 2763 | const VkAllocationCallbacks* pAllocator, |
| 2764 | VkSurfaceKHR* pSurface) |
| 2765 | { |
| 2766 | unique_lock_t lock(global_lock); |
| 2767 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 2768 | return VK_SUCCESS; |
| 2769 | } |
| 2770 | #endif /* VK_USE_PLATFORM_ANDROID_KHR */ |
| 2771 | |
| 2772 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 2773 | |
| 2774 | static VKAPI_ATTR VkResult VKAPI_CALL CreateWin32SurfaceKHR( |
| 2775 | VkInstance instance, |
| 2776 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
| 2777 | const VkAllocationCallbacks* pAllocator, |
| 2778 | VkSurfaceKHR* pSurface) |
| 2779 | { |
| 2780 | unique_lock_t lock(global_lock); |
| 2781 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 2782 | return VK_SUCCESS; |
| 2783 | } |
| 2784 | |
| 2785 | static VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWin32PresentationSupportKHR( |
| 2786 | VkPhysicalDevice physicalDevice, |
| 2787 | uint32_t queueFamilyIndex) |
| 2788 | { |
| 2789 | //Not a CREATE or DESTROY function |
| 2790 | return VK_SUCCESS; |
| 2791 | } |
| 2792 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 2793 | |
| 2794 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 2795 | #ifdef VK_ENABLE_BETA_EXTENSIONS |
| 2796 | |
| 2797 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoCapabilitiesKHR( |
| 2798 | VkPhysicalDevice physicalDevice, |
Mike Schuchardt | 4390261 | 2022-08-18 13:06:08 -0700 | [diff] [blame] | 2799 | const VkVideoProfileInfoKHR* pVideoProfile, |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 2800 | VkVideoCapabilitiesKHR* pCapabilities) |
| 2801 | { |
| 2802 | //Not a CREATE or DESTROY function |
| 2803 | return VK_SUCCESS; |
| 2804 | } |
| 2805 | |
| 2806 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoFormatPropertiesKHR( |
| 2807 | VkPhysicalDevice physicalDevice, |
| 2808 | const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, |
| 2809 | uint32_t* pVideoFormatPropertyCount, |
| 2810 | VkVideoFormatPropertiesKHR* pVideoFormatProperties) |
| 2811 | { |
| 2812 | //Not a CREATE or DESTROY function |
| 2813 | return VK_SUCCESS; |
| 2814 | } |
| 2815 | |
| 2816 | static VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionKHR( |
| 2817 | VkDevice device, |
| 2818 | const VkVideoSessionCreateInfoKHR* pCreateInfo, |
| 2819 | const VkAllocationCallbacks* pAllocator, |
| 2820 | VkVideoSessionKHR* pVideoSession) |
| 2821 | { |
| 2822 | unique_lock_t lock(global_lock); |
| 2823 | *pVideoSession = (VkVideoSessionKHR)global_unique_handle++; |
| 2824 | return VK_SUCCESS; |
| 2825 | } |
| 2826 | |
| 2827 | static VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionKHR( |
| 2828 | VkDevice device, |
| 2829 | VkVideoSessionKHR videoSession, |
| 2830 | const VkAllocationCallbacks* pAllocator) |
| 2831 | { |
| 2832 | //Destroy object |
| 2833 | } |
| 2834 | |
| 2835 | static VKAPI_ATTR VkResult VKAPI_CALL GetVideoSessionMemoryRequirementsKHR( |
| 2836 | VkDevice device, |
| 2837 | VkVideoSessionKHR videoSession, |
Mike Schuchardt | 4390261 | 2022-08-18 13:06:08 -0700 | [diff] [blame] | 2838 | uint32_t* pMemoryRequirementsCount, |
| 2839 | VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 2840 | { |
| 2841 | //Not a CREATE or DESTROY function |
| 2842 | return VK_SUCCESS; |
| 2843 | } |
| 2844 | |
| 2845 | static VKAPI_ATTR VkResult VKAPI_CALL BindVideoSessionMemoryKHR( |
| 2846 | VkDevice device, |
| 2847 | VkVideoSessionKHR videoSession, |
Mike Schuchardt | 4390261 | 2022-08-18 13:06:08 -0700 | [diff] [blame] | 2848 | uint32_t bindSessionMemoryInfoCount, |
| 2849 | const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 2850 | { |
| 2851 | //Not a CREATE or DESTROY function |
| 2852 | return VK_SUCCESS; |
| 2853 | } |
| 2854 | |
| 2855 | static VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionParametersKHR( |
| 2856 | VkDevice device, |
| 2857 | const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, |
| 2858 | const VkAllocationCallbacks* pAllocator, |
| 2859 | VkVideoSessionParametersKHR* pVideoSessionParameters) |
| 2860 | { |
| 2861 | unique_lock_t lock(global_lock); |
| 2862 | *pVideoSessionParameters = (VkVideoSessionParametersKHR)global_unique_handle++; |
| 2863 | return VK_SUCCESS; |
| 2864 | } |
| 2865 | |
| 2866 | static VKAPI_ATTR VkResult VKAPI_CALL UpdateVideoSessionParametersKHR( |
| 2867 | VkDevice device, |
| 2868 | VkVideoSessionParametersKHR videoSessionParameters, |
| 2869 | const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) |
| 2870 | { |
| 2871 | //Not a CREATE or DESTROY function |
| 2872 | return VK_SUCCESS; |
| 2873 | } |
| 2874 | |
| 2875 | static VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionParametersKHR( |
| 2876 | VkDevice device, |
| 2877 | VkVideoSessionParametersKHR videoSessionParameters, |
| 2878 | const VkAllocationCallbacks* pAllocator) |
| 2879 | { |
| 2880 | //Destroy object |
| 2881 | } |
| 2882 | |
| 2883 | static VKAPI_ATTR void VKAPI_CALL CmdBeginVideoCodingKHR( |
| 2884 | VkCommandBuffer commandBuffer, |
| 2885 | const VkVideoBeginCodingInfoKHR* pBeginInfo) |
| 2886 | { |
| 2887 | //Not a CREATE or DESTROY function |
| 2888 | } |
| 2889 | |
| 2890 | static VKAPI_ATTR void VKAPI_CALL CmdEndVideoCodingKHR( |
| 2891 | VkCommandBuffer commandBuffer, |
| 2892 | const VkVideoEndCodingInfoKHR* pEndCodingInfo) |
| 2893 | { |
| 2894 | //Not a CREATE or DESTROY function |
| 2895 | } |
| 2896 | |
| 2897 | static VKAPI_ATTR void VKAPI_CALL CmdControlVideoCodingKHR( |
| 2898 | VkCommandBuffer commandBuffer, |
| 2899 | const VkVideoCodingControlInfoKHR* pCodingControlInfo) |
| 2900 | { |
| 2901 | //Not a CREATE or DESTROY function |
| 2902 | } |
| 2903 | #endif /* VK_ENABLE_BETA_EXTENSIONS */ |
| 2904 | |
| 2905 | #ifdef VK_ENABLE_BETA_EXTENSIONS |
| 2906 | |
| 2907 | static VKAPI_ATTR void VKAPI_CALL CmdDecodeVideoKHR( |
| 2908 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | facac95 | 2022-09-22 11:00:42 -0700 | [diff] [blame] | 2909 | const VkVideoDecodeInfoKHR* pDecodeInfo) |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 2910 | { |
| 2911 | //Not a CREATE or DESTROY function |
| 2912 | } |
| 2913 | #endif /* VK_ENABLE_BETA_EXTENSIONS */ |
| 2914 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2915 | |
Mike Schuchardt | aa16057 | 2021-11-03 09:23:42 -0700 | [diff] [blame] | 2916 | static VKAPI_ATTR void VKAPI_CALL CmdBeginRenderingKHR( |
| 2917 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 2918 | const VkRenderingInfo* pRenderingInfo) |
Mike Schuchardt | aa16057 | 2021-11-03 09:23:42 -0700 | [diff] [blame] | 2919 | { |
| 2920 | //Not a CREATE or DESTROY function |
| 2921 | } |
| 2922 | |
| 2923 | static VKAPI_ATTR void VKAPI_CALL CmdEndRenderingKHR( |
| 2924 | VkCommandBuffer commandBuffer) |
| 2925 | { |
| 2926 | //Not a CREATE or DESTROY function |
| 2927 | } |
| 2928 | |
| 2929 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 2930 | |
| 2931 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2KHR( |
| 2932 | VkPhysicalDevice physicalDevice, |
| 2933 | VkPhysicalDeviceFeatures2* pFeatures) |
| 2934 | { |
| 2935 | GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features); |
| 2936 | uint32_t num_bools = 0; // Count number of VkBool32s in extension structs |
| 2937 | VkBool32* feat_bools = nullptr; |
| 2938 | const auto *desc_idx_features = lvl_find_in_chain<VkPhysicalDeviceDescriptorIndexingFeaturesEXT>(pFeatures->pNext); |
| 2939 | if (desc_idx_features) { |
| 2940 | const auto bool_size = sizeof(VkPhysicalDeviceDescriptorIndexingFeaturesEXT) - offsetof(VkPhysicalDeviceDescriptorIndexingFeaturesEXT, shaderInputAttachmentArrayDynamicIndexing); |
| 2941 | num_bools = bool_size/sizeof(VkBool32); |
| 2942 | feat_bools = (VkBool32*)&desc_idx_features->shaderInputAttachmentArrayDynamicIndexing; |
| 2943 | SetBoolArrayTrue(feat_bools, num_bools); |
| 2944 | } |
| 2945 | const auto *blendop_features = lvl_find_in_chain<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT>(pFeatures->pNext); |
| 2946 | if (blendop_features) { |
| 2947 | const auto bool_size = sizeof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT) - offsetof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, advancedBlendCoherentOperations); |
| 2948 | num_bools = bool_size/sizeof(VkBool32); |
| 2949 | feat_bools = (VkBool32*)&blendop_features->advancedBlendCoherentOperations; |
| 2950 | SetBoolArrayTrue(feat_bools, num_bools); |
| 2951 | } |
| 2952 | } |
| 2953 | |
| 2954 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2KHR( |
| 2955 | VkPhysicalDevice physicalDevice, |
| 2956 | VkPhysicalDeviceProperties2* pProperties) |
| 2957 | { |
| 2958 | GetPhysicalDeviceProperties(physicalDevice, &pProperties->properties); |
| 2959 | const auto *desc_idx_props = lvl_find_in_chain<VkPhysicalDeviceDescriptorIndexingPropertiesEXT>(pProperties->pNext); |
| 2960 | if (desc_idx_props) { |
| 2961 | VkPhysicalDeviceDescriptorIndexingPropertiesEXT* write_props = (VkPhysicalDeviceDescriptorIndexingPropertiesEXT*)desc_idx_props; |
| 2962 | write_props->maxUpdateAfterBindDescriptorsInAllPools = 500000; |
| 2963 | write_props->shaderUniformBufferArrayNonUniformIndexingNative = false; |
| 2964 | write_props->shaderSampledImageArrayNonUniformIndexingNative = false; |
| 2965 | write_props->shaderStorageBufferArrayNonUniformIndexingNative = false; |
| 2966 | write_props->shaderStorageImageArrayNonUniformIndexingNative = false; |
| 2967 | write_props->shaderInputAttachmentArrayNonUniformIndexingNative = false; |
| 2968 | write_props->robustBufferAccessUpdateAfterBind = true; |
| 2969 | write_props->quadDivergentImplicitLod = true; |
| 2970 | write_props->maxPerStageDescriptorUpdateAfterBindSamplers = 500000; |
| 2971 | write_props->maxPerStageDescriptorUpdateAfterBindUniformBuffers = 500000; |
| 2972 | write_props->maxPerStageDescriptorUpdateAfterBindStorageBuffers = 500000; |
| 2973 | write_props->maxPerStageDescriptorUpdateAfterBindSampledImages = 500000; |
| 2974 | write_props->maxPerStageDescriptorUpdateAfterBindStorageImages = 500000; |
| 2975 | write_props->maxPerStageDescriptorUpdateAfterBindInputAttachments = 500000; |
| 2976 | write_props->maxPerStageUpdateAfterBindResources = 500000; |
| 2977 | write_props->maxDescriptorSetUpdateAfterBindSamplers = 500000; |
| 2978 | write_props->maxDescriptorSetUpdateAfterBindUniformBuffers = 96; |
| 2979 | write_props->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = 8; |
| 2980 | write_props->maxDescriptorSetUpdateAfterBindStorageBuffers = 500000; |
| 2981 | write_props->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = 4; |
| 2982 | write_props->maxDescriptorSetUpdateAfterBindSampledImages = 500000; |
| 2983 | write_props->maxDescriptorSetUpdateAfterBindStorageImages = 500000; |
| 2984 | write_props->maxDescriptorSetUpdateAfterBindInputAttachments = 500000; |
| 2985 | } |
| 2986 | |
| 2987 | const auto *push_descriptor_props = lvl_find_in_chain<VkPhysicalDevicePushDescriptorPropertiesKHR>(pProperties->pNext); |
| 2988 | if (push_descriptor_props) { |
| 2989 | VkPhysicalDevicePushDescriptorPropertiesKHR* write_props = (VkPhysicalDevicePushDescriptorPropertiesKHR*)push_descriptor_props; |
| 2990 | write_props->maxPushDescriptors = 256; |
| 2991 | } |
| 2992 | |
| 2993 | const auto *depth_stencil_resolve_props = lvl_find_in_chain<VkPhysicalDeviceDepthStencilResolvePropertiesKHR>(pProperties->pNext); |
| 2994 | if (depth_stencil_resolve_props) { |
| 2995 | VkPhysicalDeviceDepthStencilResolvePropertiesKHR* write_props = (VkPhysicalDeviceDepthStencilResolvePropertiesKHR*)depth_stencil_resolve_props; |
| 2996 | write_props->supportedDepthResolveModes = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR; |
| 2997 | write_props->supportedStencilResolveModes = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR; |
| 2998 | } |
janharaldfredriksen-arm | 96e7986 | 2020-07-15 17:29:59 +0200 | [diff] [blame] | 2999 | |
| 3000 | const auto *fragment_density_map2_props = lvl_find_in_chain<VkPhysicalDeviceFragmentDensityMap2PropertiesEXT>(pProperties->pNext); |
| 3001 | if (fragment_density_map2_props) { |
| 3002 | VkPhysicalDeviceFragmentDensityMap2PropertiesEXT* write_props = (VkPhysicalDeviceFragmentDensityMap2PropertiesEXT*)fragment_density_map2_props; |
| 3003 | write_props->subsampledLoads = VK_FALSE; |
| 3004 | write_props->subsampledCoarseReconstructionEarlyAccess = VK_FALSE; |
| 3005 | write_props->maxSubsampledArrayLayers = 2; |
| 3006 | write_props->maxDescriptorSetSubsampledSamplers = 1; |
| 3007 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3008 | } |
| 3009 | |
| 3010 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2KHR( |
| 3011 | VkPhysicalDevice physicalDevice, |
| 3012 | VkFormat format, |
| 3013 | VkFormatProperties2* pFormatProperties) |
| 3014 | { |
| 3015 | GetPhysicalDeviceFormatProperties(physicalDevice, format, &pFormatProperties->formatProperties); |
Lionel Landwerlin | d3cdb64 | 2021-12-09 17:43:51 +0200 | [diff] [blame] | 3016 | VkFormatProperties3KHR *props_3 = lvl_find_mod_in_chain<VkFormatProperties3KHR>(pFormatProperties->pNext); |
| 3017 | if (props_3) { |
| 3018 | props_3->linearTilingFeatures = pFormatProperties->formatProperties.linearTilingFeatures; |
| 3019 | props_3->optimalTilingFeatures = pFormatProperties->formatProperties.optimalTilingFeatures; |
| 3020 | props_3->bufferFeatures = pFormatProperties->formatProperties.bufferFeatures; |
| 3021 | } |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3022 | } |
| 3023 | |
| 3024 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2KHR( |
| 3025 | VkPhysicalDevice physicalDevice, |
| 3026 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 3027 | VkImageFormatProperties2* pImageFormatProperties) |
| 3028 | { |
| 3029 | GetPhysicalDeviceImageFormatProperties(physicalDevice, pImageFormatInfo->format, pImageFormatInfo->type, pImageFormatInfo->tiling, pImageFormatInfo->usage, pImageFormatInfo->flags, &pImageFormatProperties->imageFormatProperties); |
| 3030 | return VK_SUCCESS; |
| 3031 | } |
| 3032 | |
| 3033 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR( |
| 3034 | VkPhysicalDevice physicalDevice, |
| 3035 | uint32_t* pQueueFamilyPropertyCount, |
| 3036 | VkQueueFamilyProperties2* pQueueFamilyProperties) |
| 3037 | { |
| 3038 | if (pQueueFamilyPropertyCount && pQueueFamilyProperties) { |
| 3039 | GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, &pQueueFamilyProperties->queueFamilyProperties); |
| 3040 | } else { |
| 3041 | GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, nullptr); |
| 3042 | } |
| 3043 | } |
| 3044 | |
| 3045 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2KHR( |
| 3046 | VkPhysicalDevice physicalDevice, |
| 3047 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) |
| 3048 | { |
| 3049 | GetPhysicalDeviceMemoryProperties(physicalDevice, &pMemoryProperties->memoryProperties); |
| 3050 | } |
| 3051 | |
| 3052 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 3053 | VkPhysicalDevice physicalDevice, |
| 3054 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 3055 | uint32_t* pPropertyCount, |
| 3056 | VkSparseImageFormatProperties2* pProperties) |
| 3057 | { |
| 3058 | //Not a CREATE or DESTROY function |
| 3059 | } |
| 3060 | |
| 3061 | |
| 3062 | static VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeaturesKHR( |
| 3063 | VkDevice device, |
| 3064 | uint32_t heapIndex, |
| 3065 | uint32_t localDeviceIndex, |
| 3066 | uint32_t remoteDeviceIndex, |
| 3067 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) |
| 3068 | { |
| 3069 | //Not a CREATE or DESTROY function |
| 3070 | } |
| 3071 | |
| 3072 | static VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMaskKHR( |
| 3073 | VkCommandBuffer commandBuffer, |
| 3074 | uint32_t deviceMask) |
| 3075 | { |
| 3076 | //Not a CREATE or DESTROY function |
| 3077 | } |
| 3078 | |
| 3079 | static VKAPI_ATTR void VKAPI_CALL CmdDispatchBaseKHR( |
| 3080 | VkCommandBuffer commandBuffer, |
| 3081 | uint32_t baseGroupX, |
| 3082 | uint32_t baseGroupY, |
| 3083 | uint32_t baseGroupZ, |
| 3084 | uint32_t groupCountX, |
| 3085 | uint32_t groupCountY, |
| 3086 | uint32_t groupCountZ) |
| 3087 | { |
| 3088 | //Not a CREATE or DESTROY function |
| 3089 | } |
| 3090 | |
| 3091 | |
| 3092 | |
| 3093 | static VKAPI_ATTR void VKAPI_CALL TrimCommandPoolKHR( |
| 3094 | VkDevice device, |
| 3095 | VkCommandPool commandPool, |
| 3096 | VkCommandPoolTrimFlags flags) |
| 3097 | { |
| 3098 | //Not a CREATE or DESTROY function |
| 3099 | } |
| 3100 | |
| 3101 | |
| 3102 | static VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroupsKHR( |
| 3103 | VkInstance instance, |
| 3104 | uint32_t* pPhysicalDeviceGroupCount, |
| 3105 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) |
| 3106 | { |
| 3107 | //Not a CREATE or DESTROY function |
| 3108 | return VK_SUCCESS; |
| 3109 | } |
| 3110 | |
| 3111 | |
| 3112 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferPropertiesKHR( |
| 3113 | VkPhysicalDevice physicalDevice, |
| 3114 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 3115 | VkExternalBufferProperties* pExternalBufferProperties) |
| 3116 | { |
| 3117 | GetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); |
| 3118 | } |
| 3119 | |
| 3120 | |
| 3121 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 3122 | |
| 3123 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleKHR( |
| 3124 | VkDevice device, |
| 3125 | const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 3126 | HANDLE* pHandle) |
| 3127 | { |
| 3128 | //Not a CREATE or DESTROY function |
| 3129 | return VK_SUCCESS; |
| 3130 | } |
| 3131 | |
| 3132 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandlePropertiesKHR( |
| 3133 | VkDevice device, |
| 3134 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 3135 | HANDLE handle, |
| 3136 | VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) |
| 3137 | { |
| 3138 | //Not a CREATE or DESTROY function |
| 3139 | return VK_SUCCESS; |
| 3140 | } |
| 3141 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 3142 | |
| 3143 | |
| 3144 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdKHR( |
| 3145 | VkDevice device, |
| 3146 | const VkMemoryGetFdInfoKHR* pGetFdInfo, |
| 3147 | int* pFd) |
| 3148 | { |
| 3149 | //Not a CREATE or DESTROY function |
| 3150 | return VK_SUCCESS; |
| 3151 | } |
| 3152 | |
| 3153 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdPropertiesKHR( |
| 3154 | VkDevice device, |
| 3155 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 3156 | int fd, |
| 3157 | VkMemoryFdPropertiesKHR* pMemoryFdProperties) |
| 3158 | { |
| 3159 | //Not a CREATE or DESTROY function |
| 3160 | return VK_SUCCESS; |
| 3161 | } |
| 3162 | |
| 3163 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 3164 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 3165 | |
| 3166 | |
| 3167 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphorePropertiesKHR( |
| 3168 | VkPhysicalDevice physicalDevice, |
| 3169 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 3170 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) |
| 3171 | { |
| 3172 | GetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); |
| 3173 | } |
| 3174 | |
| 3175 | |
| 3176 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 3177 | |
| 3178 | static VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreWin32HandleKHR( |
| 3179 | VkDevice device, |
| 3180 | const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) |
| 3181 | { |
| 3182 | //Not a CREATE or DESTROY function |
| 3183 | return VK_SUCCESS; |
| 3184 | } |
| 3185 | |
| 3186 | static VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR( |
| 3187 | VkDevice device, |
| 3188 | const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 3189 | HANDLE* pHandle) |
| 3190 | { |
| 3191 | //Not a CREATE or DESTROY function |
| 3192 | return VK_SUCCESS; |
| 3193 | } |
| 3194 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 3195 | |
| 3196 | |
| 3197 | static VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreFdKHR( |
| 3198 | VkDevice device, |
| 3199 | const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) |
| 3200 | { |
| 3201 | //Not a CREATE or DESTROY function |
| 3202 | return VK_SUCCESS; |
| 3203 | } |
| 3204 | |
| 3205 | static VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreFdKHR( |
| 3206 | VkDevice device, |
| 3207 | const VkSemaphoreGetFdInfoKHR* pGetFdInfo, |
| 3208 | int* pFd) |
| 3209 | { |
| 3210 | //Not a CREATE or DESTROY function |
| 3211 | return VK_SUCCESS; |
| 3212 | } |
| 3213 | |
| 3214 | |
| 3215 | static VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR( |
| 3216 | VkCommandBuffer commandBuffer, |
| 3217 | VkPipelineBindPoint pipelineBindPoint, |
| 3218 | VkPipelineLayout layout, |
| 3219 | uint32_t set, |
| 3220 | uint32_t descriptorWriteCount, |
| 3221 | const VkWriteDescriptorSet* pDescriptorWrites) |
| 3222 | { |
| 3223 | //Not a CREATE or DESTROY function |
| 3224 | } |
| 3225 | |
| 3226 | static VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplateKHR( |
| 3227 | VkCommandBuffer commandBuffer, |
| 3228 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 3229 | VkPipelineLayout layout, |
| 3230 | uint32_t set, |
| 3231 | const void* pData) |
| 3232 | { |
| 3233 | //Not a CREATE or DESTROY function |
| 3234 | } |
| 3235 | |
| 3236 | |
| 3237 | |
| 3238 | |
| 3239 | |
| 3240 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplateKHR( |
| 3241 | VkDevice device, |
| 3242 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 3243 | const VkAllocationCallbacks* pAllocator, |
| 3244 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) |
| 3245 | { |
| 3246 | unique_lock_t lock(global_lock); |
| 3247 | *pDescriptorUpdateTemplate = (VkDescriptorUpdateTemplate)global_unique_handle++; |
| 3248 | return VK_SUCCESS; |
| 3249 | } |
| 3250 | |
| 3251 | static VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplateKHR( |
| 3252 | VkDevice device, |
| 3253 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 3254 | const VkAllocationCallbacks* pAllocator) |
| 3255 | { |
| 3256 | //Destroy object |
| 3257 | } |
| 3258 | |
| 3259 | static VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplateKHR( |
| 3260 | VkDevice device, |
| 3261 | VkDescriptorSet descriptorSet, |
| 3262 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 3263 | const void* pData) |
| 3264 | { |
| 3265 | //Not a CREATE or DESTROY function |
| 3266 | } |
| 3267 | |
| 3268 | |
| 3269 | |
| 3270 | static VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2KHR( |
| 3271 | VkDevice device, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 3272 | const VkRenderPassCreateInfo2* pCreateInfo, |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3273 | const VkAllocationCallbacks* pAllocator, |
| 3274 | VkRenderPass* pRenderPass) |
| 3275 | { |
| 3276 | unique_lock_t lock(global_lock); |
| 3277 | *pRenderPass = (VkRenderPass)global_unique_handle++; |
| 3278 | return VK_SUCCESS; |
| 3279 | } |
| 3280 | |
| 3281 | static VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2KHR( |
| 3282 | VkCommandBuffer commandBuffer, |
| 3283 | const VkRenderPassBeginInfo* pRenderPassBegin, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 3284 | const VkSubpassBeginInfo* pSubpassBeginInfo) |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3285 | { |
| 3286 | //Not a CREATE or DESTROY function |
| 3287 | } |
| 3288 | |
| 3289 | static VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2KHR( |
| 3290 | VkCommandBuffer commandBuffer, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 3291 | const VkSubpassBeginInfo* pSubpassBeginInfo, |
| 3292 | const VkSubpassEndInfo* pSubpassEndInfo) |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3293 | { |
| 3294 | //Not a CREATE or DESTROY function |
| 3295 | } |
| 3296 | |
| 3297 | static VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2KHR( |
| 3298 | VkCommandBuffer commandBuffer, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 3299 | const VkSubpassEndInfo* pSubpassEndInfo) |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3300 | { |
| 3301 | //Not a CREATE or DESTROY function |
| 3302 | } |
| 3303 | |
| 3304 | |
| 3305 | static VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainStatusKHR( |
| 3306 | VkDevice device, |
| 3307 | VkSwapchainKHR swapchain) |
| 3308 | { |
| 3309 | //Not a CREATE or DESTROY function |
| 3310 | return VK_SUCCESS; |
| 3311 | } |
| 3312 | |
| 3313 | |
| 3314 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFencePropertiesKHR( |
| 3315 | VkPhysicalDevice physicalDevice, |
| 3316 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 3317 | VkExternalFenceProperties* pExternalFenceProperties) |
| 3318 | { |
| 3319 | GetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); |
| 3320 | } |
| 3321 | |
| 3322 | |
| 3323 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 3324 | |
| 3325 | static VKAPI_ATTR VkResult VKAPI_CALL ImportFenceWin32HandleKHR( |
| 3326 | VkDevice device, |
| 3327 | const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) |
| 3328 | { |
| 3329 | //Not a CREATE or DESTROY function |
| 3330 | return VK_SUCCESS; |
| 3331 | } |
| 3332 | |
| 3333 | static VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR( |
| 3334 | VkDevice device, |
| 3335 | const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 3336 | HANDLE* pHandle) |
| 3337 | { |
| 3338 | //Not a CREATE or DESTROY function |
| 3339 | return VK_SUCCESS; |
| 3340 | } |
| 3341 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 3342 | |
| 3343 | |
| 3344 | static VKAPI_ATTR VkResult VKAPI_CALL ImportFenceFdKHR( |
| 3345 | VkDevice device, |
| 3346 | const VkImportFenceFdInfoKHR* pImportFenceFdInfo) |
| 3347 | { |
| 3348 | //Not a CREATE or DESTROY function |
| 3349 | return VK_SUCCESS; |
| 3350 | } |
| 3351 | |
| 3352 | static VKAPI_ATTR VkResult VKAPI_CALL GetFenceFdKHR( |
| 3353 | VkDevice device, |
| 3354 | const VkFenceGetFdInfoKHR* pGetFdInfo, |
| 3355 | int* pFd) |
| 3356 | { |
| 3357 | //Not a CREATE or DESTROY function |
| 3358 | return VK_SUCCESS; |
| 3359 | } |
| 3360 | |
| 3361 | |
Shannon McPherson | 39b3005 | 2019-11-20 14:53:01 -0700 | [diff] [blame] | 3362 | static VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( |
| 3363 | VkPhysicalDevice physicalDevice, |
| 3364 | uint32_t queueFamilyIndex, |
| 3365 | uint32_t* pCounterCount, |
| 3366 | VkPerformanceCounterKHR* pCounters, |
| 3367 | VkPerformanceCounterDescriptionKHR* pCounterDescriptions) |
| 3368 | { |
| 3369 | //Not a CREATE or DESTROY function |
| 3370 | return VK_SUCCESS; |
| 3371 | } |
| 3372 | |
| 3373 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( |
| 3374 | VkPhysicalDevice physicalDevice, |
| 3375 | const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, |
| 3376 | uint32_t* pNumPasses) |
| 3377 | { |
| 3378 | //Not a CREATE or DESTROY function |
| 3379 | } |
| 3380 | |
| 3381 | static VKAPI_ATTR VkResult VKAPI_CALL AcquireProfilingLockKHR( |
| 3382 | VkDevice device, |
| 3383 | const VkAcquireProfilingLockInfoKHR* pInfo) |
| 3384 | { |
| 3385 | //Not a CREATE or DESTROY function |
| 3386 | return VK_SUCCESS; |
| 3387 | } |
| 3388 | |
| 3389 | static VKAPI_ATTR void VKAPI_CALL ReleaseProfilingLockKHR( |
| 3390 | VkDevice device) |
| 3391 | { |
| 3392 | //Not a CREATE or DESTROY function |
| 3393 | } |
| 3394 | |
| 3395 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3396 | |
| 3397 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2KHR( |
| 3398 | VkPhysicalDevice physicalDevice, |
| 3399 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 3400 | VkSurfaceCapabilities2KHR* pSurfaceCapabilities) |
| 3401 | { |
| 3402 | GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, pSurfaceInfo->surface, &pSurfaceCapabilities->surfaceCapabilities); |
| 3403 | return VK_SUCCESS; |
| 3404 | } |
| 3405 | |
| 3406 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormats2KHR( |
| 3407 | VkPhysicalDevice physicalDevice, |
| 3408 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 3409 | uint32_t* pSurfaceFormatCount, |
| 3410 | VkSurfaceFormat2KHR* pSurfaceFormats) |
| 3411 | { |
| 3412 | // Currently always say that RGBA8 & BGRA8 are supported |
| 3413 | if (!pSurfaceFormats) { |
| 3414 | *pSurfaceFormatCount = 2; |
| 3415 | } else { |
Charles Giessen | 576ce7a | 2022-04-13 14:42:25 -0600 | [diff] [blame] | 3416 | if (*pSurfaceFormatCount >= 2) { |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3417 | pSurfaceFormats[1].pNext = nullptr; |
| 3418 | pSurfaceFormats[1].surfaceFormat.format = VK_FORMAT_R8G8B8A8_UNORM; |
| 3419 | pSurfaceFormats[1].surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; |
Charles Giessen | 576ce7a | 2022-04-13 14:42:25 -0600 | [diff] [blame] | 3420 | } |
| 3421 | if (*pSurfaceFormatCount >= 1) { |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3422 | pSurfaceFormats[1].pNext = nullptr; |
| 3423 | pSurfaceFormats[0].surfaceFormat.format = VK_FORMAT_B8G8R8A8_UNORM; |
| 3424 | pSurfaceFormats[0].surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3425 | } |
| 3426 | } |
| 3427 | return VK_SUCCESS; |
| 3428 | } |
| 3429 | |
| 3430 | |
| 3431 | |
| 3432 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayProperties2KHR( |
| 3433 | VkPhysicalDevice physicalDevice, |
| 3434 | uint32_t* pPropertyCount, |
| 3435 | VkDisplayProperties2KHR* pProperties) |
| 3436 | { |
| 3437 | //Not a CREATE or DESTROY function |
| 3438 | return VK_SUCCESS; |
| 3439 | } |
| 3440 | |
| 3441 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlaneProperties2KHR( |
| 3442 | VkPhysicalDevice physicalDevice, |
| 3443 | uint32_t* pPropertyCount, |
| 3444 | VkDisplayPlaneProperties2KHR* pProperties) |
| 3445 | { |
| 3446 | //Not a CREATE or DESTROY function |
| 3447 | return VK_SUCCESS; |
| 3448 | } |
| 3449 | |
| 3450 | static VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModeProperties2KHR( |
| 3451 | VkPhysicalDevice physicalDevice, |
| 3452 | VkDisplayKHR display, |
| 3453 | uint32_t* pPropertyCount, |
| 3454 | VkDisplayModeProperties2KHR* pProperties) |
| 3455 | { |
| 3456 | //Not a CREATE or DESTROY function |
| 3457 | return VK_SUCCESS; |
| 3458 | } |
| 3459 | |
| 3460 | static VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilities2KHR( |
| 3461 | VkPhysicalDevice physicalDevice, |
| 3462 | const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, |
| 3463 | VkDisplayPlaneCapabilities2KHR* pCapabilities) |
| 3464 | { |
| 3465 | //Not a CREATE or DESTROY function |
| 3466 | return VK_SUCCESS; |
| 3467 | } |
| 3468 | |
| 3469 | |
| 3470 | |
| 3471 | |
| 3472 | |
| 3473 | static VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2KHR( |
| 3474 | VkDevice device, |
| 3475 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 3476 | VkMemoryRequirements2* pMemoryRequirements) |
| 3477 | { |
| 3478 | GetImageMemoryRequirements(device, pInfo->image, &pMemoryRequirements->memoryRequirements); |
| 3479 | } |
| 3480 | |
| 3481 | static VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2KHR( |
| 3482 | VkDevice device, |
| 3483 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 3484 | VkMemoryRequirements2* pMemoryRequirements) |
| 3485 | { |
| 3486 | GetBufferMemoryRequirements(device, pInfo->buffer, &pMemoryRequirements->memoryRequirements); |
| 3487 | } |
| 3488 | |
| 3489 | static VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2KHR( |
| 3490 | VkDevice device, |
| 3491 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 3492 | uint32_t* pSparseMemoryRequirementCount, |
| 3493 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 3494 | { |
| 3495 | //Not a CREATE or DESTROY function |
| 3496 | } |
| 3497 | |
| 3498 | |
| 3499 | |
| 3500 | static VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversionKHR( |
| 3501 | VkDevice device, |
| 3502 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 3503 | const VkAllocationCallbacks* pAllocator, |
| 3504 | VkSamplerYcbcrConversion* pYcbcrConversion) |
| 3505 | { |
| 3506 | unique_lock_t lock(global_lock); |
| 3507 | *pYcbcrConversion = (VkSamplerYcbcrConversion)global_unique_handle++; |
| 3508 | return VK_SUCCESS; |
| 3509 | } |
| 3510 | |
| 3511 | static VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversionKHR( |
| 3512 | VkDevice device, |
| 3513 | VkSamplerYcbcrConversion ycbcrConversion, |
| 3514 | const VkAllocationCallbacks* pAllocator) |
| 3515 | { |
| 3516 | //Destroy object |
| 3517 | } |
| 3518 | |
| 3519 | |
| 3520 | static VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHR( |
| 3521 | VkDevice device, |
| 3522 | uint32_t bindInfoCount, |
| 3523 | const VkBindBufferMemoryInfo* pBindInfos) |
| 3524 | { |
| 3525 | //Not a CREATE or DESTROY function |
| 3526 | return VK_SUCCESS; |
| 3527 | } |
| 3528 | |
| 3529 | static VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHR( |
| 3530 | VkDevice device, |
| 3531 | uint32_t bindInfoCount, |
| 3532 | const VkBindImageMemoryInfo* pBindInfos) |
| 3533 | { |
| 3534 | //Not a CREATE or DESTROY function |
| 3535 | return VK_SUCCESS; |
| 3536 | } |
| 3537 | |
Shannon McPherson | e7fcc14 | 2020-09-22 10:55:55 -0600 | [diff] [blame] | 3538 | #ifdef VK_ENABLE_BETA_EXTENSIONS |
| 3539 | #endif /* VK_ENABLE_BETA_EXTENSIONS */ |
| 3540 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3541 | |
| 3542 | static VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupportKHR( |
| 3543 | VkDevice device, |
| 3544 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 3545 | VkDescriptorSetLayoutSupport* pSupport) |
| 3546 | { |
| 3547 | //Not a CREATE or DESTROY function |
| 3548 | } |
| 3549 | |
| 3550 | |
| 3551 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountKHR( |
| 3552 | VkCommandBuffer commandBuffer, |
| 3553 | VkBuffer buffer, |
| 3554 | VkDeviceSize offset, |
| 3555 | VkBuffer countBuffer, |
| 3556 | VkDeviceSize countBufferOffset, |
| 3557 | uint32_t maxDrawCount, |
| 3558 | uint32_t stride) |
| 3559 | { |
| 3560 | //Not a CREATE or DESTROY function |
| 3561 | } |
| 3562 | |
| 3563 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountKHR( |
| 3564 | VkCommandBuffer commandBuffer, |
| 3565 | VkBuffer buffer, |
| 3566 | VkDeviceSize offset, |
| 3567 | VkBuffer countBuffer, |
| 3568 | VkDeviceSize countBufferOffset, |
| 3569 | uint32_t maxDrawCount, |
| 3570 | uint32_t stride) |
| 3571 | { |
| 3572 | //Not a CREATE or DESTROY function |
| 3573 | } |
| 3574 | |
| 3575 | |
| 3576 | |
| 3577 | |
| 3578 | |
| 3579 | |
| 3580 | |
| 3581 | |
| 3582 | |
| 3583 | |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3584 | |
Shannon McPherson | 119e7c3 | 2019-10-15 11:45:18 -0600 | [diff] [blame] | 3585 | static VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValueKHR( |
| 3586 | VkDevice device, |
| 3587 | VkSemaphore semaphore, |
| 3588 | uint64_t* pValue) |
| 3589 | { |
| 3590 | //Not a CREATE or DESTROY function |
| 3591 | return VK_SUCCESS; |
| 3592 | } |
| 3593 | |
| 3594 | static VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphoresKHR( |
| 3595 | VkDevice device, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 3596 | const VkSemaphoreWaitInfo* pWaitInfo, |
Shannon McPherson | 119e7c3 | 2019-10-15 11:45:18 -0600 | [diff] [blame] | 3597 | uint64_t timeout) |
| 3598 | { |
| 3599 | //Not a CREATE or DESTROY function |
| 3600 | return VK_SUCCESS; |
| 3601 | } |
| 3602 | |
| 3603 | static VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphoreKHR( |
| 3604 | VkDevice device, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 3605 | const VkSemaphoreSignalInfo* pSignalInfo) |
Shannon McPherson | 119e7c3 | 2019-10-15 11:45:18 -0600 | [diff] [blame] | 3606 | { |
| 3607 | //Not a CREATE or DESTROY function |
| 3608 | return VK_SUCCESS; |
| 3609 | } |
| 3610 | |
| 3611 | |
| 3612 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3613 | |
Shannon McPherson | 3f747ee | 2020-10-29 10:20:18 -0600 | [diff] [blame] | 3614 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceFragmentShadingRatesKHR( |
| 3615 | VkPhysicalDevice physicalDevice, |
| 3616 | uint32_t* pFragmentShadingRateCount, |
| 3617 | VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) |
| 3618 | { |
| 3619 | //Not a CREATE or DESTROY function |
| 3620 | return VK_SUCCESS; |
| 3621 | } |
| 3622 | |
| 3623 | static VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateKHR( |
| 3624 | VkCommandBuffer commandBuffer, |
| 3625 | const VkExtent2D* pFragmentSize, |
| 3626 | const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) |
| 3627 | { |
| 3628 | //Not a CREATE or DESTROY function |
| 3629 | } |
| 3630 | |
| 3631 | |
| 3632 | |
Shannon McPherson | 40cd216 | 2019-09-17 13:41:26 -0600 | [diff] [blame] | 3633 | |
Shannon McPherson | 5824344 | 2019-10-22 16:25:01 -0600 | [diff] [blame] | 3634 | |
Mike Schuchardt | 8d582b0 | 2021-07-20 10:20:43 -0700 | [diff] [blame] | 3635 | static VKAPI_ATTR VkResult VKAPI_CALL WaitForPresentKHR( |
| 3636 | VkDevice device, |
| 3637 | VkSwapchainKHR swapchain, |
| 3638 | uint64_t presentId, |
| 3639 | uint64_t timeout) |
| 3640 | { |
| 3641 | //Not a CREATE or DESTROY function |
| 3642 | return VK_SUCCESS; |
| 3643 | } |
| 3644 | |
| 3645 | |
Shannon McPherson | f094f02 | 2019-11-05 16:08:07 -0700 | [diff] [blame] | 3646 | |
Mark Lobodzinski | 48bf8e7 | 2019-12-10 15:00:23 -0700 | [diff] [blame] | 3647 | static VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressKHR( |
| 3648 | VkDevice device, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 3649 | const VkBufferDeviceAddressInfo* pInfo) |
Mark Lobodzinski | 48bf8e7 | 2019-12-10 15:00:23 -0700 | [diff] [blame] | 3650 | { |
| 3651 | //Not a CREATE or DESTROY function |
| 3652 | return VK_SUCCESS; |
| 3653 | } |
| 3654 | |
| 3655 | static VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddressKHR( |
| 3656 | VkDevice device, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 3657 | const VkBufferDeviceAddressInfo* pInfo) |
Mark Lobodzinski | 48bf8e7 | 2019-12-10 15:00:23 -0700 | [diff] [blame] | 3658 | { |
| 3659 | //Not a CREATE or DESTROY function |
| 3660 | return VK_SUCCESS; |
| 3661 | } |
| 3662 | |
| 3663 | static VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddressKHR( |
| 3664 | VkDevice device, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 3665 | const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) |
Mark Lobodzinski | 48bf8e7 | 2019-12-10 15:00:23 -0700 | [diff] [blame] | 3666 | { |
| 3667 | //Not a CREATE or DESTROY function |
| 3668 | return VK_SUCCESS; |
| 3669 | } |
| 3670 | |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 3671 | |
| 3672 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDeferredOperationKHR( |
| 3673 | VkDevice device, |
| 3674 | const VkAllocationCallbacks* pAllocator, |
| 3675 | VkDeferredOperationKHR* pDeferredOperation) |
| 3676 | { |
| 3677 | unique_lock_t lock(global_lock); |
| 3678 | *pDeferredOperation = (VkDeferredOperationKHR)global_unique_handle++; |
| 3679 | return VK_SUCCESS; |
| 3680 | } |
| 3681 | |
| 3682 | static VKAPI_ATTR void VKAPI_CALL DestroyDeferredOperationKHR( |
| 3683 | VkDevice device, |
| 3684 | VkDeferredOperationKHR operation, |
| 3685 | const VkAllocationCallbacks* pAllocator) |
| 3686 | { |
| 3687 | //Destroy object |
| 3688 | } |
| 3689 | |
| 3690 | static VKAPI_ATTR uint32_t VKAPI_CALL GetDeferredOperationMaxConcurrencyKHR( |
| 3691 | VkDevice device, |
| 3692 | VkDeferredOperationKHR operation) |
| 3693 | { |
| 3694 | //Not a CREATE or DESTROY function |
| 3695 | return VK_SUCCESS; |
| 3696 | } |
| 3697 | |
| 3698 | static VKAPI_ATTR VkResult VKAPI_CALL GetDeferredOperationResultKHR( |
| 3699 | VkDevice device, |
| 3700 | VkDeferredOperationKHR operation) |
| 3701 | { |
| 3702 | //Not a CREATE or DESTROY function |
| 3703 | return VK_SUCCESS; |
| 3704 | } |
| 3705 | |
| 3706 | static VKAPI_ATTR VkResult VKAPI_CALL DeferredOperationJoinKHR( |
| 3707 | VkDevice device, |
| 3708 | VkDeferredOperationKHR operation) |
| 3709 | { |
| 3710 | //Not a CREATE or DESTROY function |
| 3711 | return VK_SUCCESS; |
| 3712 | } |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 3713 | |
Mark Lobodzinski | 48bf8e7 | 2019-12-10 15:00:23 -0700 | [diff] [blame] | 3714 | |
Shannon McPherson | 650eea7 | 2019-08-12 10:39:11 -0600 | [diff] [blame] | 3715 | static VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutablePropertiesKHR( |
| 3716 | VkDevice device, |
| 3717 | const VkPipelineInfoKHR* pPipelineInfo, |
| 3718 | uint32_t* pExecutableCount, |
| 3719 | VkPipelineExecutablePropertiesKHR* pProperties) |
| 3720 | { |
| 3721 | //Not a CREATE or DESTROY function |
| 3722 | return VK_SUCCESS; |
| 3723 | } |
| 3724 | |
| 3725 | static VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableStatisticsKHR( |
| 3726 | VkDevice device, |
| 3727 | const VkPipelineExecutableInfoKHR* pExecutableInfo, |
| 3728 | uint32_t* pStatisticCount, |
| 3729 | VkPipelineExecutableStatisticKHR* pStatistics) |
| 3730 | { |
| 3731 | //Not a CREATE or DESTROY function |
| 3732 | return VK_SUCCESS; |
| 3733 | } |
| 3734 | |
| 3735 | static VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentationsKHR( |
| 3736 | VkDevice device, |
| 3737 | const VkPipelineExecutableInfoKHR* pExecutableInfo, |
| 3738 | uint32_t* pInternalRepresentationCount, |
| 3739 | VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) |
| 3740 | { |
| 3741 | //Not a CREATE or DESTROY function |
| 3742 | return VK_SUCCESS; |
| 3743 | } |
| 3744 | |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 3745 | |
Shannon McPherson | 650eea7 | 2019-08-12 10:39:11 -0600 | [diff] [blame] | 3746 | |
Mike Schuchardt | 8d582b0 | 2021-07-20 10:20:43 -0700 | [diff] [blame] | 3747 | |
Mike Schuchardt | 6c444b2 | 2021-08-30 09:19:23 -0700 | [diff] [blame] | 3748 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 3749 | #ifdef VK_ENABLE_BETA_EXTENSIONS |
| 3750 | |
| 3751 | static VKAPI_ATTR void VKAPI_CALL CmdEncodeVideoKHR( |
| 3752 | VkCommandBuffer commandBuffer, |
| 3753 | const VkVideoEncodeInfoKHR* pEncodeInfo) |
| 3754 | { |
| 3755 | //Not a CREATE or DESTROY function |
| 3756 | } |
| 3757 | #endif /* VK_ENABLE_BETA_EXTENSIONS */ |
| 3758 | |
Shannon McPherson | 16cf559 | 2020-02-18 11:01:48 -0700 | [diff] [blame] | 3759 | |
Mike Schuchardt | 88ea55d | 2021-02-16 09:20:12 -0800 | [diff] [blame] | 3760 | static VKAPI_ATTR void VKAPI_CALL CmdSetEvent2KHR( |
| 3761 | VkCommandBuffer commandBuffer, |
| 3762 | VkEvent event, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3763 | const VkDependencyInfo* pDependencyInfo) |
Mike Schuchardt | 88ea55d | 2021-02-16 09:20:12 -0800 | [diff] [blame] | 3764 | { |
| 3765 | //Not a CREATE or DESTROY function |
| 3766 | } |
| 3767 | |
| 3768 | static VKAPI_ATTR void VKAPI_CALL CmdResetEvent2KHR( |
| 3769 | VkCommandBuffer commandBuffer, |
| 3770 | VkEvent event, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3771 | VkPipelineStageFlags2 stageMask) |
Mike Schuchardt | 88ea55d | 2021-02-16 09:20:12 -0800 | [diff] [blame] | 3772 | { |
| 3773 | //Not a CREATE or DESTROY function |
| 3774 | } |
| 3775 | |
| 3776 | static VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2KHR( |
| 3777 | VkCommandBuffer commandBuffer, |
| 3778 | uint32_t eventCount, |
| 3779 | const VkEvent* pEvents, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3780 | const VkDependencyInfo* pDependencyInfos) |
Mike Schuchardt | 88ea55d | 2021-02-16 09:20:12 -0800 | [diff] [blame] | 3781 | { |
| 3782 | //Not a CREATE or DESTROY function |
| 3783 | } |
| 3784 | |
| 3785 | static VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2KHR( |
| 3786 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3787 | const VkDependencyInfo* pDependencyInfo) |
Mike Schuchardt | 88ea55d | 2021-02-16 09:20:12 -0800 | [diff] [blame] | 3788 | { |
| 3789 | //Not a CREATE or DESTROY function |
| 3790 | } |
| 3791 | |
| 3792 | static VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2KHR( |
| 3793 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3794 | VkPipelineStageFlags2 stage, |
Mike Schuchardt | 88ea55d | 2021-02-16 09:20:12 -0800 | [diff] [blame] | 3795 | VkQueryPool queryPool, |
| 3796 | uint32_t query) |
| 3797 | { |
| 3798 | //Not a CREATE or DESTROY function |
| 3799 | } |
| 3800 | |
| 3801 | static VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2KHR( |
| 3802 | VkQueue queue, |
| 3803 | uint32_t submitCount, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3804 | const VkSubmitInfo2* pSubmits, |
Mike Schuchardt | 88ea55d | 2021-02-16 09:20:12 -0800 | [diff] [blame] | 3805 | VkFence fence) |
| 3806 | { |
| 3807 | //Not a CREATE or DESTROY function |
| 3808 | return VK_SUCCESS; |
| 3809 | } |
| 3810 | |
| 3811 | static VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarker2AMD( |
| 3812 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3813 | VkPipelineStageFlags2 stage, |
Mike Schuchardt | 88ea55d | 2021-02-16 09:20:12 -0800 | [diff] [blame] | 3814 | VkBuffer dstBuffer, |
| 3815 | VkDeviceSize dstOffset, |
| 3816 | uint32_t marker) |
| 3817 | { |
| 3818 | //Not a CREATE or DESTROY function |
| 3819 | } |
| 3820 | |
| 3821 | static VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointData2NV( |
| 3822 | VkQueue queue, |
| 3823 | uint32_t* pCheckpointDataCount, |
| 3824 | VkCheckpointData2NV* pCheckpointData) |
| 3825 | { |
| 3826 | //Not a CREATE or DESTROY function |
| 3827 | } |
| 3828 | |
| 3829 | |
Shannon McPherson | 6952dfc | 2021-02-09 10:19:34 -0700 | [diff] [blame] | 3830 | |
| 3831 | |
Mike Schuchardt | 1021540 | 2021-06-07 13:44:49 -0700 | [diff] [blame] | 3832 | |
Mike Schuchardt | 6be9971 | 2022-05-24 10:45:39 -0700 | [diff] [blame] | 3833 | |
Shannon McPherson | e7fcc14 | 2020-09-22 10:55:55 -0600 | [diff] [blame] | 3834 | static VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2KHR( |
| 3835 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3836 | const VkCopyBufferInfo2* pCopyBufferInfo) |
Shannon McPherson | e7fcc14 | 2020-09-22 10:55:55 -0600 | [diff] [blame] | 3837 | { |
| 3838 | //Not a CREATE or DESTROY function |
| 3839 | } |
| 3840 | |
| 3841 | static VKAPI_ATTR void VKAPI_CALL CmdCopyImage2KHR( |
| 3842 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3843 | const VkCopyImageInfo2* pCopyImageInfo) |
Shannon McPherson | e7fcc14 | 2020-09-22 10:55:55 -0600 | [diff] [blame] | 3844 | { |
| 3845 | //Not a CREATE or DESTROY function |
| 3846 | } |
| 3847 | |
| 3848 | static VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2KHR( |
| 3849 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3850 | const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) |
Shannon McPherson | e7fcc14 | 2020-09-22 10:55:55 -0600 | [diff] [blame] | 3851 | { |
| 3852 | //Not a CREATE or DESTROY function |
| 3853 | } |
| 3854 | |
| 3855 | static VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2KHR( |
| 3856 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3857 | const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) |
Shannon McPherson | e7fcc14 | 2020-09-22 10:55:55 -0600 | [diff] [blame] | 3858 | { |
| 3859 | //Not a CREATE or DESTROY function |
| 3860 | } |
| 3861 | |
| 3862 | static VKAPI_ATTR void VKAPI_CALL CmdBlitImage2KHR( |
| 3863 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3864 | const VkBlitImageInfo2* pBlitImageInfo) |
Shannon McPherson | e7fcc14 | 2020-09-22 10:55:55 -0600 | [diff] [blame] | 3865 | { |
| 3866 | //Not a CREATE or DESTROY function |
| 3867 | } |
| 3868 | |
| 3869 | static VKAPI_ATTR void VKAPI_CALL CmdResolveImage2KHR( |
| 3870 | VkCommandBuffer commandBuffer, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3871 | const VkResolveImageInfo2* pResolveImageInfo) |
Shannon McPherson | e7fcc14 | 2020-09-22 10:55:55 -0600 | [diff] [blame] | 3872 | { |
| 3873 | //Not a CREATE or DESTROY function |
| 3874 | } |
| 3875 | |
| 3876 | |
Mike Schuchardt | 6ca4355 | 2021-10-05 11:21:19 -0700 | [diff] [blame] | 3877 | |
Mike Schuchardt | fe50678 | 2022-05-11 10:32:40 -0700 | [diff] [blame] | 3878 | static VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirect2KHR( |
| 3879 | VkCommandBuffer commandBuffer, |
| 3880 | VkDeviceAddress indirectDeviceAddress) |
| 3881 | { |
| 3882 | //Not a CREATE or DESTROY function |
| 3883 | } |
| 3884 | |
| 3885 | |
Mike Schuchardt | 99500ce | 2022-03-15 12:07:50 -0700 | [diff] [blame] | 3886 | |
Mike Schuchardt | 6ca4355 | 2021-10-05 11:21:19 -0700 | [diff] [blame] | 3887 | static VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirementsKHR( |
| 3888 | VkDevice device, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3889 | const VkDeviceBufferMemoryRequirements* pInfo, |
Mike Schuchardt | 6ca4355 | 2021-10-05 11:21:19 -0700 | [diff] [blame] | 3890 | VkMemoryRequirements2* pMemoryRequirements) |
| 3891 | { |
| 3892 | //Not a CREATE or DESTROY function |
| 3893 | } |
| 3894 | |
| 3895 | static VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirementsKHR( |
| 3896 | VkDevice device, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3897 | const VkDeviceImageMemoryRequirements* pInfo, |
Mike Schuchardt | 6ca4355 | 2021-10-05 11:21:19 -0700 | [diff] [blame] | 3898 | VkMemoryRequirements2* pMemoryRequirements) |
| 3899 | { |
| 3900 | //Not a CREATE or DESTROY function |
| 3901 | } |
| 3902 | |
| 3903 | static VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirementsKHR( |
| 3904 | VkDevice device, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 3905 | const VkDeviceImageMemoryRequirements* pInfo, |
Mike Schuchardt | 6ca4355 | 2021-10-05 11:21:19 -0700 | [diff] [blame] | 3906 | uint32_t* pSparseMemoryRequirementCount, |
| 3907 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 3908 | { |
| 3909 | //Not a CREATE or DESTROY function |
| 3910 | } |
| 3911 | |
| 3912 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 3913 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT( |
| 3914 | VkInstance instance, |
| 3915 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 3916 | const VkAllocationCallbacks* pAllocator, |
| 3917 | VkDebugReportCallbackEXT* pCallback) |
| 3918 | { |
| 3919 | unique_lock_t lock(global_lock); |
| 3920 | *pCallback = (VkDebugReportCallbackEXT)global_unique_handle++; |
| 3921 | return VK_SUCCESS; |
| 3922 | } |
| 3923 | |
| 3924 | static VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT( |
| 3925 | VkInstance instance, |
| 3926 | VkDebugReportCallbackEXT callback, |
| 3927 | const VkAllocationCallbacks* pAllocator) |
| 3928 | { |
| 3929 | //Destroy object |
| 3930 | } |
| 3931 | |
| 3932 | static VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT( |
| 3933 | VkInstance instance, |
| 3934 | VkDebugReportFlagsEXT flags, |
| 3935 | VkDebugReportObjectTypeEXT objectType, |
| 3936 | uint64_t object, |
| 3937 | size_t location, |
| 3938 | int32_t messageCode, |
| 3939 | const char* pLayerPrefix, |
| 3940 | const char* pMessage) |
| 3941 | { |
| 3942 | //Not a CREATE or DESTROY function |
| 3943 | } |
| 3944 | |
| 3945 | |
| 3946 | |
| 3947 | |
| 3948 | |
| 3949 | |
| 3950 | |
| 3951 | |
| 3952 | static VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT( |
| 3953 | VkDevice device, |
| 3954 | const VkDebugMarkerObjectTagInfoEXT* pTagInfo) |
| 3955 | { |
| 3956 | //Not a CREATE or DESTROY function |
| 3957 | return VK_SUCCESS; |
| 3958 | } |
| 3959 | |
| 3960 | static VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT( |
| 3961 | VkDevice device, |
| 3962 | const VkDebugMarkerObjectNameInfoEXT* pNameInfo) |
| 3963 | { |
| 3964 | //Not a CREATE or DESTROY function |
| 3965 | return VK_SUCCESS; |
| 3966 | } |
| 3967 | |
| 3968 | static VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT( |
| 3969 | VkCommandBuffer commandBuffer, |
| 3970 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) |
| 3971 | { |
| 3972 | //Not a CREATE or DESTROY function |
| 3973 | } |
| 3974 | |
| 3975 | static VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT( |
| 3976 | VkCommandBuffer commandBuffer) |
| 3977 | { |
| 3978 | //Not a CREATE or DESTROY function |
| 3979 | } |
| 3980 | |
| 3981 | static VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT( |
| 3982 | VkCommandBuffer commandBuffer, |
| 3983 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) |
| 3984 | { |
| 3985 | //Not a CREATE or DESTROY function |
| 3986 | } |
| 3987 | |
| 3988 | |
| 3989 | |
| 3990 | |
| 3991 | static VKAPI_ATTR void VKAPI_CALL CmdBindTransformFeedbackBuffersEXT( |
| 3992 | VkCommandBuffer commandBuffer, |
| 3993 | uint32_t firstBinding, |
| 3994 | uint32_t bindingCount, |
| 3995 | const VkBuffer* pBuffers, |
| 3996 | const VkDeviceSize* pOffsets, |
| 3997 | const VkDeviceSize* pSizes) |
| 3998 | { |
| 3999 | //Not a CREATE or DESTROY function |
| 4000 | } |
| 4001 | |
| 4002 | static VKAPI_ATTR void VKAPI_CALL CmdBeginTransformFeedbackEXT( |
| 4003 | VkCommandBuffer commandBuffer, |
| 4004 | uint32_t firstCounterBuffer, |
| 4005 | uint32_t counterBufferCount, |
| 4006 | const VkBuffer* pCounterBuffers, |
| 4007 | const VkDeviceSize* pCounterBufferOffsets) |
| 4008 | { |
| 4009 | //Not a CREATE or DESTROY function |
| 4010 | } |
| 4011 | |
| 4012 | static VKAPI_ATTR void VKAPI_CALL CmdEndTransformFeedbackEXT( |
| 4013 | VkCommandBuffer commandBuffer, |
| 4014 | uint32_t firstCounterBuffer, |
| 4015 | uint32_t counterBufferCount, |
| 4016 | const VkBuffer* pCounterBuffers, |
| 4017 | const VkDeviceSize* pCounterBufferOffsets) |
| 4018 | { |
| 4019 | //Not a CREATE or DESTROY function |
| 4020 | } |
| 4021 | |
| 4022 | static VKAPI_ATTR void VKAPI_CALL CmdBeginQueryIndexedEXT( |
| 4023 | VkCommandBuffer commandBuffer, |
| 4024 | VkQueryPool queryPool, |
| 4025 | uint32_t query, |
| 4026 | VkQueryControlFlags flags, |
| 4027 | uint32_t index) |
| 4028 | { |
| 4029 | //Not a CREATE or DESTROY function |
| 4030 | } |
| 4031 | |
| 4032 | static VKAPI_ATTR void VKAPI_CALL CmdEndQueryIndexedEXT( |
| 4033 | VkCommandBuffer commandBuffer, |
| 4034 | VkQueryPool queryPool, |
| 4035 | uint32_t query, |
| 4036 | uint32_t index) |
| 4037 | { |
| 4038 | //Not a CREATE or DESTROY function |
| 4039 | } |
| 4040 | |
| 4041 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectByteCountEXT( |
| 4042 | VkCommandBuffer commandBuffer, |
| 4043 | uint32_t instanceCount, |
| 4044 | uint32_t firstInstance, |
| 4045 | VkBuffer counterBuffer, |
| 4046 | VkDeviceSize counterBufferOffset, |
| 4047 | uint32_t counterOffset, |
| 4048 | uint32_t vertexStride) |
| 4049 | { |
| 4050 | //Not a CREATE or DESTROY function |
| 4051 | } |
| 4052 | |
| 4053 | |
Mike Schuchardt | c251814 | 2021-05-11 11:47:39 -0700 | [diff] [blame] | 4054 | static VKAPI_ATTR VkResult VKAPI_CALL CreateCuModuleNVX( |
| 4055 | VkDevice device, |
| 4056 | const VkCuModuleCreateInfoNVX* pCreateInfo, |
| 4057 | const VkAllocationCallbacks* pAllocator, |
| 4058 | VkCuModuleNVX* pModule) |
| 4059 | { |
| 4060 | unique_lock_t lock(global_lock); |
| 4061 | *pModule = (VkCuModuleNVX)global_unique_handle++; |
| 4062 | return VK_SUCCESS; |
| 4063 | } |
| 4064 | |
| 4065 | static VKAPI_ATTR VkResult VKAPI_CALL CreateCuFunctionNVX( |
| 4066 | VkDevice device, |
| 4067 | const VkCuFunctionCreateInfoNVX* pCreateInfo, |
| 4068 | const VkAllocationCallbacks* pAllocator, |
| 4069 | VkCuFunctionNVX* pFunction) |
| 4070 | { |
| 4071 | unique_lock_t lock(global_lock); |
| 4072 | *pFunction = (VkCuFunctionNVX)global_unique_handle++; |
| 4073 | return VK_SUCCESS; |
| 4074 | } |
| 4075 | |
| 4076 | static VKAPI_ATTR void VKAPI_CALL DestroyCuModuleNVX( |
| 4077 | VkDevice device, |
| 4078 | VkCuModuleNVX module, |
| 4079 | const VkAllocationCallbacks* pAllocator) |
| 4080 | { |
| 4081 | //Destroy object |
| 4082 | } |
| 4083 | |
| 4084 | static VKAPI_ATTR void VKAPI_CALL DestroyCuFunctionNVX( |
| 4085 | VkDevice device, |
| 4086 | VkCuFunctionNVX function, |
| 4087 | const VkAllocationCallbacks* pAllocator) |
| 4088 | { |
| 4089 | //Destroy object |
| 4090 | } |
| 4091 | |
| 4092 | static VKAPI_ATTR void VKAPI_CALL CmdCuLaunchKernelNVX( |
| 4093 | VkCommandBuffer commandBuffer, |
| 4094 | const VkCuLaunchInfoNVX* pLaunchInfo) |
| 4095 | { |
| 4096 | //Not a CREATE or DESTROY function |
| 4097 | } |
| 4098 | |
| 4099 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4100 | static VKAPI_ATTR uint32_t VKAPI_CALL GetImageViewHandleNVX( |
| 4101 | VkDevice device, |
| 4102 | const VkImageViewHandleInfoNVX* pInfo) |
| 4103 | { |
| 4104 | //Not a CREATE or DESTROY function |
| 4105 | return VK_SUCCESS; |
| 4106 | } |
| 4107 | |
Shannon McPherson | ae0f0ea | 2020-04-10 16:14:29 -0600 | [diff] [blame] | 4108 | static VKAPI_ATTR VkResult VKAPI_CALL GetImageViewAddressNVX( |
| 4109 | VkDevice device, |
| 4110 | VkImageView imageView, |
| 4111 | VkImageViewAddressPropertiesNVX* pProperties) |
| 4112 | { |
| 4113 | //Not a CREATE or DESTROY function |
| 4114 | return VK_SUCCESS; |
| 4115 | } |
| 4116 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4117 | |
| 4118 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountAMD( |
| 4119 | VkCommandBuffer commandBuffer, |
| 4120 | VkBuffer buffer, |
| 4121 | VkDeviceSize offset, |
| 4122 | VkBuffer countBuffer, |
| 4123 | VkDeviceSize countBufferOffset, |
| 4124 | uint32_t maxDrawCount, |
| 4125 | uint32_t stride) |
| 4126 | { |
| 4127 | //Not a CREATE or DESTROY function |
| 4128 | } |
| 4129 | |
| 4130 | static VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD( |
| 4131 | VkCommandBuffer commandBuffer, |
| 4132 | VkBuffer buffer, |
| 4133 | VkDeviceSize offset, |
| 4134 | VkBuffer countBuffer, |
| 4135 | VkDeviceSize countBufferOffset, |
| 4136 | uint32_t maxDrawCount, |
| 4137 | uint32_t stride) |
| 4138 | { |
| 4139 | //Not a CREATE or DESTROY function |
| 4140 | } |
| 4141 | |
| 4142 | |
| 4143 | |
| 4144 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 4145 | #ifdef VK_ENABLE_BETA_EXTENSIONS |
| 4146 | #endif /* VK_ENABLE_BETA_EXTENSIONS */ |
| 4147 | |
| 4148 | #ifdef VK_ENABLE_BETA_EXTENSIONS |
| 4149 | #endif /* VK_ENABLE_BETA_EXTENSIONS */ |
| 4150 | |
Mike Schuchardt | 7001f2e | 2021-10-14 10:13:58 -0700 | [diff] [blame] | 4151 | #ifdef VK_ENABLE_BETA_EXTENSIONS |
| 4152 | #endif /* VK_ENABLE_BETA_EXTENSIONS */ |
| 4153 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4154 | |
| 4155 | |
| 4156 | static VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD( |
| 4157 | VkDevice device, |
| 4158 | VkPipeline pipeline, |
| 4159 | VkShaderStageFlagBits shaderStage, |
| 4160 | VkShaderInfoTypeAMD infoType, |
| 4161 | size_t* pInfoSize, |
| 4162 | void* pInfo) |
| 4163 | { |
| 4164 | //Not a CREATE or DESTROY function |
| 4165 | return VK_SUCCESS; |
| 4166 | } |
| 4167 | |
| 4168 | |
| 4169 | #ifdef VK_USE_PLATFORM_GGP |
| 4170 | |
| 4171 | static VKAPI_ATTR VkResult VKAPI_CALL CreateStreamDescriptorSurfaceGGP( |
| 4172 | VkInstance instance, |
| 4173 | const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, |
| 4174 | const VkAllocationCallbacks* pAllocator, |
| 4175 | VkSurfaceKHR* pSurface) |
| 4176 | { |
| 4177 | unique_lock_t lock(global_lock); |
| 4178 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 4179 | return VK_SUCCESS; |
| 4180 | } |
| 4181 | #endif /* VK_USE_PLATFORM_GGP */ |
| 4182 | |
| 4183 | |
| 4184 | |
| 4185 | |
| 4186 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 4187 | VkPhysicalDevice physicalDevice, |
| 4188 | VkFormat format, |
| 4189 | VkImageType type, |
| 4190 | VkImageTiling tiling, |
| 4191 | VkImageUsageFlags usage, |
| 4192 | VkImageCreateFlags flags, |
| 4193 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 4194 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) |
| 4195 | { |
| 4196 | //Not a CREATE or DESTROY function |
| 4197 | return VK_SUCCESS; |
| 4198 | } |
| 4199 | |
| 4200 | |
| 4201 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 4202 | |
| 4203 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV( |
| 4204 | VkDevice device, |
| 4205 | VkDeviceMemory memory, |
| 4206 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 4207 | HANDLE* pHandle) |
| 4208 | { |
| 4209 | //Not a CREATE or DESTROY function |
| 4210 | return VK_SUCCESS; |
| 4211 | } |
| 4212 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 4213 | |
| 4214 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 4215 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 4216 | |
| 4217 | |
| 4218 | #ifdef VK_USE_PLATFORM_VI_NN |
| 4219 | |
| 4220 | static VKAPI_ATTR VkResult VKAPI_CALL CreateViSurfaceNN( |
| 4221 | VkInstance instance, |
| 4222 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 4223 | const VkAllocationCallbacks* pAllocator, |
| 4224 | VkSurfaceKHR* pSurface) |
| 4225 | { |
| 4226 | unique_lock_t lock(global_lock); |
| 4227 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 4228 | return VK_SUCCESS; |
| 4229 | } |
| 4230 | #endif /* VK_USE_PLATFORM_VI_NN */ |
| 4231 | |
| 4232 | |
| 4233 | |
| 4234 | |
| 4235 | |
Shannon McPherson | 650eea7 | 2019-08-12 10:39:11 -0600 | [diff] [blame] | 4236 | |
Mike Schuchardt | 8b603f8 | 2022-07-14 09:22:33 -0700 | [diff] [blame] | 4237 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4238 | static VKAPI_ATTR void VKAPI_CALL CmdBeginConditionalRenderingEXT( |
| 4239 | VkCommandBuffer commandBuffer, |
| 4240 | const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) |
| 4241 | { |
| 4242 | //Not a CREATE or DESTROY function |
| 4243 | } |
| 4244 | |
| 4245 | static VKAPI_ATTR void VKAPI_CALL CmdEndConditionalRenderingEXT( |
| 4246 | VkCommandBuffer commandBuffer) |
| 4247 | { |
| 4248 | //Not a CREATE or DESTROY function |
| 4249 | } |
| 4250 | |
| 4251 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4252 | static VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingNV( |
| 4253 | VkCommandBuffer commandBuffer, |
| 4254 | uint32_t firstViewport, |
| 4255 | uint32_t viewportCount, |
| 4256 | const VkViewportWScalingNV* pViewportWScalings) |
| 4257 | { |
| 4258 | //Not a CREATE or DESTROY function |
| 4259 | } |
| 4260 | |
| 4261 | |
| 4262 | static VKAPI_ATTR VkResult VKAPI_CALL ReleaseDisplayEXT( |
| 4263 | VkPhysicalDevice physicalDevice, |
| 4264 | VkDisplayKHR display) |
| 4265 | { |
| 4266 | //Not a CREATE or DESTROY function |
| 4267 | return VK_SUCCESS; |
| 4268 | } |
| 4269 | |
| 4270 | #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT |
| 4271 | |
| 4272 | static VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT( |
| 4273 | VkPhysicalDevice physicalDevice, |
| 4274 | Display* dpy, |
| 4275 | VkDisplayKHR display) |
| 4276 | { |
| 4277 | //Not a CREATE or DESTROY function |
| 4278 | return VK_SUCCESS; |
| 4279 | } |
| 4280 | |
| 4281 | static VKAPI_ATTR VkResult VKAPI_CALL GetRandROutputDisplayEXT( |
| 4282 | VkPhysicalDevice physicalDevice, |
| 4283 | Display* dpy, |
| 4284 | RROutput rrOutput, |
| 4285 | VkDisplayKHR* pDisplay) |
| 4286 | { |
| 4287 | //Not a CREATE or DESTROY function |
| 4288 | return VK_SUCCESS; |
| 4289 | } |
| 4290 | #endif /* VK_USE_PLATFORM_XLIB_XRANDR_EXT */ |
| 4291 | |
| 4292 | |
| 4293 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2EXT( |
| 4294 | VkPhysicalDevice physicalDevice, |
| 4295 | VkSurfaceKHR surface, |
| 4296 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) |
| 4297 | { |
| 4298 | //Not a CREATE or DESTROY function |
| 4299 | return VK_SUCCESS; |
| 4300 | } |
| 4301 | |
| 4302 | |
| 4303 | static VKAPI_ATTR VkResult VKAPI_CALL DisplayPowerControlEXT( |
| 4304 | VkDevice device, |
| 4305 | VkDisplayKHR display, |
| 4306 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) |
| 4307 | { |
| 4308 | //Not a CREATE or DESTROY function |
| 4309 | return VK_SUCCESS; |
| 4310 | } |
| 4311 | |
| 4312 | static VKAPI_ATTR VkResult VKAPI_CALL RegisterDeviceEventEXT( |
| 4313 | VkDevice device, |
| 4314 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 4315 | const VkAllocationCallbacks* pAllocator, |
| 4316 | VkFence* pFence) |
| 4317 | { |
| 4318 | //Not a CREATE or DESTROY function |
| 4319 | return VK_SUCCESS; |
| 4320 | } |
| 4321 | |
| 4322 | static VKAPI_ATTR VkResult VKAPI_CALL RegisterDisplayEventEXT( |
| 4323 | VkDevice device, |
| 4324 | VkDisplayKHR display, |
| 4325 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 4326 | const VkAllocationCallbacks* pAllocator, |
| 4327 | VkFence* pFence) |
| 4328 | { |
| 4329 | //Not a CREATE or DESTROY function |
| 4330 | return VK_SUCCESS; |
| 4331 | } |
| 4332 | |
| 4333 | static VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainCounterEXT( |
| 4334 | VkDevice device, |
| 4335 | VkSwapchainKHR swapchain, |
| 4336 | VkSurfaceCounterFlagBitsEXT counter, |
| 4337 | uint64_t* pCounterValue) |
| 4338 | { |
| 4339 | //Not a CREATE or DESTROY function |
| 4340 | return VK_SUCCESS; |
| 4341 | } |
| 4342 | |
| 4343 | |
| 4344 | static VKAPI_ATTR VkResult VKAPI_CALL GetRefreshCycleDurationGOOGLE( |
| 4345 | VkDevice device, |
| 4346 | VkSwapchainKHR swapchain, |
| 4347 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) |
| 4348 | { |
| 4349 | //Not a CREATE or DESTROY function |
| 4350 | return VK_SUCCESS; |
| 4351 | } |
| 4352 | |
| 4353 | static VKAPI_ATTR VkResult VKAPI_CALL GetPastPresentationTimingGOOGLE( |
| 4354 | VkDevice device, |
| 4355 | VkSwapchainKHR swapchain, |
| 4356 | uint32_t* pPresentationTimingCount, |
| 4357 | VkPastPresentationTimingGOOGLE* pPresentationTimings) |
| 4358 | { |
| 4359 | //Not a CREATE or DESTROY function |
| 4360 | return VK_SUCCESS; |
| 4361 | } |
| 4362 | |
| 4363 | |
| 4364 | |
| 4365 | |
| 4366 | |
| 4367 | |
| 4368 | |
| 4369 | static VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEXT( |
| 4370 | VkCommandBuffer commandBuffer, |
| 4371 | uint32_t firstDiscardRectangle, |
| 4372 | uint32_t discardRectangleCount, |
| 4373 | const VkRect2D* pDiscardRectangles) |
| 4374 | { |
| 4375 | //Not a CREATE or DESTROY function |
| 4376 | } |
| 4377 | |
| 4378 | |
| 4379 | |
| 4380 | |
| 4381 | |
| 4382 | static VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT( |
| 4383 | VkDevice device, |
| 4384 | uint32_t swapchainCount, |
| 4385 | const VkSwapchainKHR* pSwapchains, |
| 4386 | const VkHdrMetadataEXT* pMetadata) |
| 4387 | { |
| 4388 | //Not a CREATE or DESTROY function |
| 4389 | } |
| 4390 | |
| 4391 | #ifdef VK_USE_PLATFORM_IOS_MVK |
| 4392 | |
| 4393 | static VKAPI_ATTR VkResult VKAPI_CALL CreateIOSSurfaceMVK( |
| 4394 | VkInstance instance, |
| 4395 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 4396 | const VkAllocationCallbacks* pAllocator, |
| 4397 | VkSurfaceKHR* pSurface) |
| 4398 | { |
| 4399 | unique_lock_t lock(global_lock); |
| 4400 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 4401 | return VK_SUCCESS; |
| 4402 | } |
| 4403 | #endif /* VK_USE_PLATFORM_IOS_MVK */ |
| 4404 | |
| 4405 | #ifdef VK_USE_PLATFORM_MACOS_MVK |
| 4406 | |
| 4407 | static VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK( |
| 4408 | VkInstance instance, |
| 4409 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 4410 | const VkAllocationCallbacks* pAllocator, |
| 4411 | VkSurfaceKHR* pSurface) |
| 4412 | { |
| 4413 | unique_lock_t lock(global_lock); |
| 4414 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 4415 | return VK_SUCCESS; |
| 4416 | } |
| 4417 | #endif /* VK_USE_PLATFORM_MACOS_MVK */ |
| 4418 | |
| 4419 | |
| 4420 | |
| 4421 | |
| 4422 | static VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectNameEXT( |
| 4423 | VkDevice device, |
| 4424 | const VkDebugUtilsObjectNameInfoEXT* pNameInfo) |
| 4425 | { |
| 4426 | //Not a CREATE or DESTROY function |
| 4427 | return VK_SUCCESS; |
| 4428 | } |
| 4429 | |
| 4430 | static VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectTagEXT( |
| 4431 | VkDevice device, |
| 4432 | const VkDebugUtilsObjectTagInfoEXT* pTagInfo) |
| 4433 | { |
| 4434 | //Not a CREATE or DESTROY function |
| 4435 | return VK_SUCCESS; |
| 4436 | } |
| 4437 | |
| 4438 | static VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT( |
| 4439 | VkQueue queue, |
| 4440 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 4441 | { |
| 4442 | //Not a CREATE or DESTROY function |
| 4443 | } |
| 4444 | |
| 4445 | static VKAPI_ATTR void VKAPI_CALL QueueEndDebugUtilsLabelEXT( |
| 4446 | VkQueue queue) |
| 4447 | { |
| 4448 | //Not a CREATE or DESTROY function |
| 4449 | } |
| 4450 | |
| 4451 | static VKAPI_ATTR void VKAPI_CALL QueueInsertDebugUtilsLabelEXT( |
| 4452 | VkQueue queue, |
| 4453 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 4454 | { |
| 4455 | //Not a CREATE or DESTROY function |
| 4456 | } |
| 4457 | |
| 4458 | static VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT( |
| 4459 | VkCommandBuffer commandBuffer, |
| 4460 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 4461 | { |
| 4462 | //Not a CREATE or DESTROY function |
| 4463 | } |
| 4464 | |
| 4465 | static VKAPI_ATTR void VKAPI_CALL CmdEndDebugUtilsLabelEXT( |
| 4466 | VkCommandBuffer commandBuffer) |
| 4467 | { |
| 4468 | //Not a CREATE or DESTROY function |
| 4469 | } |
| 4470 | |
| 4471 | static VKAPI_ATTR void VKAPI_CALL CmdInsertDebugUtilsLabelEXT( |
| 4472 | VkCommandBuffer commandBuffer, |
| 4473 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 4474 | { |
| 4475 | //Not a CREATE or DESTROY function |
| 4476 | } |
| 4477 | |
| 4478 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDebugUtilsMessengerEXT( |
| 4479 | VkInstance instance, |
| 4480 | const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, |
| 4481 | const VkAllocationCallbacks* pAllocator, |
| 4482 | VkDebugUtilsMessengerEXT* pMessenger) |
| 4483 | { |
| 4484 | unique_lock_t lock(global_lock); |
| 4485 | *pMessenger = (VkDebugUtilsMessengerEXT)global_unique_handle++; |
| 4486 | return VK_SUCCESS; |
| 4487 | } |
| 4488 | |
| 4489 | static VKAPI_ATTR void VKAPI_CALL DestroyDebugUtilsMessengerEXT( |
| 4490 | VkInstance instance, |
| 4491 | VkDebugUtilsMessengerEXT messenger, |
| 4492 | const VkAllocationCallbacks* pAllocator) |
| 4493 | { |
| 4494 | //Destroy object |
| 4495 | } |
| 4496 | |
| 4497 | static VKAPI_ATTR void VKAPI_CALL SubmitDebugUtilsMessageEXT( |
| 4498 | VkInstance instance, |
| 4499 | VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, |
| 4500 | VkDebugUtilsMessageTypeFlagsEXT messageTypes, |
| 4501 | const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) |
| 4502 | { |
| 4503 | //Not a CREATE or DESTROY function |
| 4504 | } |
| 4505 | |
| 4506 | #ifdef VK_USE_PLATFORM_ANDROID_KHR |
| 4507 | |
| 4508 | static VKAPI_ATTR VkResult VKAPI_CALL GetAndroidHardwareBufferPropertiesANDROID( |
| 4509 | VkDevice device, |
| 4510 | const struct AHardwareBuffer* buffer, |
| 4511 | VkAndroidHardwareBufferPropertiesANDROID* pProperties) |
| 4512 | { |
| 4513 | //Not a CREATE or DESTROY function |
| 4514 | return VK_SUCCESS; |
| 4515 | } |
| 4516 | |
| 4517 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryAndroidHardwareBufferANDROID( |
| 4518 | VkDevice device, |
| 4519 | const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, |
| 4520 | struct AHardwareBuffer** pBuffer) |
| 4521 | { |
| 4522 | //Not a CREATE or DESTROY function |
| 4523 | return VK_SUCCESS; |
| 4524 | } |
| 4525 | #endif /* VK_USE_PLATFORM_ANDROID_KHR */ |
| 4526 | |
| 4527 | |
| 4528 | |
| 4529 | |
| 4530 | |
| 4531 | |
| 4532 | |
| 4533 | |
| 4534 | static VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT( |
| 4535 | VkCommandBuffer commandBuffer, |
| 4536 | const VkSampleLocationsInfoEXT* pSampleLocationsInfo) |
| 4537 | { |
| 4538 | //Not a CREATE or DESTROY function |
| 4539 | } |
| 4540 | |
| 4541 | static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMultisamplePropertiesEXT( |
| 4542 | VkPhysicalDevice physicalDevice, |
| 4543 | VkSampleCountFlagBits samples, |
| 4544 | VkMultisamplePropertiesEXT* pMultisampleProperties) |
| 4545 | { |
| 4546 | //Not a CREATE or DESTROY function |
| 4547 | } |
| 4548 | |
| 4549 | |
| 4550 | |
| 4551 | |
| 4552 | |
| 4553 | |
| 4554 | |
| 4555 | |
| 4556 | static VKAPI_ATTR VkResult VKAPI_CALL GetImageDrmFormatModifierPropertiesEXT( |
| 4557 | VkDevice device, |
| 4558 | VkImage image, |
| 4559 | VkImageDrmFormatModifierPropertiesEXT* pProperties) |
| 4560 | { |
| 4561 | //Not a CREATE or DESTROY function |
| 4562 | return VK_SUCCESS; |
| 4563 | } |
| 4564 | |
| 4565 | |
| 4566 | static VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT( |
| 4567 | VkDevice device, |
| 4568 | const VkValidationCacheCreateInfoEXT* pCreateInfo, |
| 4569 | const VkAllocationCallbacks* pAllocator, |
| 4570 | VkValidationCacheEXT* pValidationCache) |
| 4571 | { |
| 4572 | unique_lock_t lock(global_lock); |
| 4573 | *pValidationCache = (VkValidationCacheEXT)global_unique_handle++; |
| 4574 | return VK_SUCCESS; |
| 4575 | } |
| 4576 | |
| 4577 | static VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT( |
| 4578 | VkDevice device, |
| 4579 | VkValidationCacheEXT validationCache, |
| 4580 | const VkAllocationCallbacks* pAllocator) |
| 4581 | { |
| 4582 | //Destroy object |
| 4583 | } |
| 4584 | |
| 4585 | static VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT( |
| 4586 | VkDevice device, |
| 4587 | VkValidationCacheEXT dstCache, |
| 4588 | uint32_t srcCacheCount, |
| 4589 | const VkValidationCacheEXT* pSrcCaches) |
| 4590 | { |
| 4591 | //Not a CREATE or DESTROY function |
| 4592 | return VK_SUCCESS; |
| 4593 | } |
| 4594 | |
| 4595 | static VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT( |
| 4596 | VkDevice device, |
| 4597 | VkValidationCacheEXT validationCache, |
| 4598 | size_t* pDataSize, |
| 4599 | void* pData) |
| 4600 | { |
| 4601 | //Not a CREATE or DESTROY function |
| 4602 | return VK_SUCCESS; |
| 4603 | } |
| 4604 | |
| 4605 | |
| 4606 | |
| 4607 | |
| 4608 | static VKAPI_ATTR void VKAPI_CALL CmdBindShadingRateImageNV( |
| 4609 | VkCommandBuffer commandBuffer, |
| 4610 | VkImageView imageView, |
| 4611 | VkImageLayout imageLayout) |
| 4612 | { |
| 4613 | //Not a CREATE or DESTROY function |
| 4614 | } |
| 4615 | |
| 4616 | static VKAPI_ATTR void VKAPI_CALL CmdSetViewportShadingRatePaletteNV( |
| 4617 | VkCommandBuffer commandBuffer, |
| 4618 | uint32_t firstViewport, |
| 4619 | uint32_t viewportCount, |
| 4620 | const VkShadingRatePaletteNV* pShadingRatePalettes) |
| 4621 | { |
| 4622 | //Not a CREATE or DESTROY function |
| 4623 | } |
| 4624 | |
| 4625 | static VKAPI_ATTR void VKAPI_CALL CmdSetCoarseSampleOrderNV( |
| 4626 | VkCommandBuffer commandBuffer, |
| 4627 | VkCoarseSampleOrderTypeNV sampleOrderType, |
| 4628 | uint32_t customSampleOrderCount, |
| 4629 | const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) |
| 4630 | { |
| 4631 | //Not a CREATE or DESTROY function |
| 4632 | } |
| 4633 | |
| 4634 | |
| 4635 | static VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureNV( |
| 4636 | VkDevice device, |
| 4637 | const VkAccelerationStructureCreateInfoNV* pCreateInfo, |
| 4638 | const VkAllocationCallbacks* pAllocator, |
| 4639 | VkAccelerationStructureNV* pAccelerationStructure) |
| 4640 | { |
| 4641 | unique_lock_t lock(global_lock); |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 4642 | *pAccelerationStructure = (VkAccelerationStructureNV)global_unique_handle++; |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4643 | return VK_SUCCESS; |
| 4644 | } |
| 4645 | |
| 4646 | static VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureNV( |
| 4647 | VkDevice device, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 4648 | VkAccelerationStructureNV accelerationStructure, |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4649 | const VkAllocationCallbacks* pAllocator) |
| 4650 | { |
| 4651 | //Destroy object |
| 4652 | } |
| 4653 | |
| 4654 | static VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureMemoryRequirementsNV( |
| 4655 | VkDevice device, |
| 4656 | const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, |
| 4657 | VkMemoryRequirements2KHR* pMemoryRequirements) |
| 4658 | { |
| 4659 | //Not a CREATE or DESTROY function |
| 4660 | } |
| 4661 | |
| 4662 | static VKAPI_ATTR VkResult VKAPI_CALL BindAccelerationStructureMemoryNV( |
| 4663 | VkDevice device, |
| 4664 | uint32_t bindInfoCount, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 4665 | const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4666 | { |
| 4667 | //Not a CREATE or DESTROY function |
| 4668 | return VK_SUCCESS; |
| 4669 | } |
| 4670 | |
| 4671 | static VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructureNV( |
| 4672 | VkCommandBuffer commandBuffer, |
| 4673 | const VkAccelerationStructureInfoNV* pInfo, |
| 4674 | VkBuffer instanceData, |
| 4675 | VkDeviceSize instanceOffset, |
| 4676 | VkBool32 update, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 4677 | VkAccelerationStructureNV dst, |
| 4678 | VkAccelerationStructureNV src, |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4679 | VkBuffer scratch, |
| 4680 | VkDeviceSize scratchOffset) |
| 4681 | { |
| 4682 | //Not a CREATE or DESTROY function |
| 4683 | } |
| 4684 | |
| 4685 | static VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureNV( |
| 4686 | VkCommandBuffer commandBuffer, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 4687 | VkAccelerationStructureNV dst, |
| 4688 | VkAccelerationStructureNV src, |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 4689 | VkCopyAccelerationStructureModeKHR mode) |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4690 | { |
| 4691 | //Not a CREATE or DESTROY function |
| 4692 | } |
| 4693 | |
| 4694 | static VKAPI_ATTR void VKAPI_CALL CmdTraceRaysNV( |
| 4695 | VkCommandBuffer commandBuffer, |
| 4696 | VkBuffer raygenShaderBindingTableBuffer, |
| 4697 | VkDeviceSize raygenShaderBindingOffset, |
| 4698 | VkBuffer missShaderBindingTableBuffer, |
| 4699 | VkDeviceSize missShaderBindingOffset, |
| 4700 | VkDeviceSize missShaderBindingStride, |
| 4701 | VkBuffer hitShaderBindingTableBuffer, |
| 4702 | VkDeviceSize hitShaderBindingOffset, |
| 4703 | VkDeviceSize hitShaderBindingStride, |
| 4704 | VkBuffer callableShaderBindingTableBuffer, |
| 4705 | VkDeviceSize callableShaderBindingOffset, |
| 4706 | VkDeviceSize callableShaderBindingStride, |
| 4707 | uint32_t width, |
| 4708 | uint32_t height, |
| 4709 | uint32_t depth) |
| 4710 | { |
| 4711 | //Not a CREATE or DESTROY function |
| 4712 | } |
| 4713 | |
| 4714 | static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNV( |
| 4715 | VkDevice device, |
| 4716 | VkPipelineCache pipelineCache, |
| 4717 | uint32_t createInfoCount, |
| 4718 | const VkRayTracingPipelineCreateInfoNV* pCreateInfos, |
| 4719 | const VkAllocationCallbacks* pAllocator, |
| 4720 | VkPipeline* pPipelines) |
| 4721 | { |
| 4722 | unique_lock_t lock(global_lock); |
| 4723 | for (uint32_t i = 0; i < createInfoCount; ++i) { |
| 4724 | pPipelines[i] = (VkPipeline)global_unique_handle++; |
| 4725 | } |
| 4726 | return VK_SUCCESS; |
| 4727 | } |
| 4728 | |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 4729 | static VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesKHR( |
| 4730 | VkDevice device, |
| 4731 | VkPipeline pipeline, |
| 4732 | uint32_t firstGroup, |
| 4733 | uint32_t groupCount, |
| 4734 | size_t dataSize, |
| 4735 | void* pData) |
| 4736 | { |
| 4737 | //Not a CREATE or DESTROY function |
| 4738 | return VK_SUCCESS; |
| 4739 | } |
| 4740 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4741 | static VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesNV( |
| 4742 | VkDevice device, |
| 4743 | VkPipeline pipeline, |
| 4744 | uint32_t firstGroup, |
| 4745 | uint32_t groupCount, |
| 4746 | size_t dataSize, |
| 4747 | void* pData) |
| 4748 | { |
| 4749 | //Not a CREATE or DESTROY function |
| 4750 | return VK_SUCCESS; |
| 4751 | } |
| 4752 | |
| 4753 | static VKAPI_ATTR VkResult VKAPI_CALL GetAccelerationStructureHandleNV( |
| 4754 | VkDevice device, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 4755 | VkAccelerationStructureNV accelerationStructure, |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4756 | size_t dataSize, |
| 4757 | void* pData) |
| 4758 | { |
| 4759 | //Not a CREATE or DESTROY function |
| 4760 | return VK_SUCCESS; |
| 4761 | } |
| 4762 | |
| 4763 | static VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesNV( |
| 4764 | VkCommandBuffer commandBuffer, |
| 4765 | uint32_t accelerationStructureCount, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 4766 | const VkAccelerationStructureNV* pAccelerationStructures, |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4767 | VkQueryType queryType, |
| 4768 | VkQueryPool queryPool, |
| 4769 | uint32_t firstQuery) |
| 4770 | { |
| 4771 | //Not a CREATE or DESTROY function |
| 4772 | } |
| 4773 | |
| 4774 | static VKAPI_ATTR VkResult VKAPI_CALL CompileDeferredNV( |
| 4775 | VkDevice device, |
| 4776 | VkPipeline pipeline, |
| 4777 | uint32_t shader) |
| 4778 | { |
| 4779 | //Not a CREATE or DESTROY function |
| 4780 | return VK_SUCCESS; |
| 4781 | } |
| 4782 | |
| 4783 | |
| 4784 | |
| 4785 | |
| 4786 | |
Mike Schuchardt | 7bcbfd3 | 2020-05-07 15:33:52 -0700 | [diff] [blame] | 4787 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4788 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT( |
| 4789 | VkDevice device, |
| 4790 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 4791 | const void* pHostPointer, |
| 4792 | VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) |
| 4793 | { |
| 4794 | //Not a CREATE or DESTROY function |
| 4795 | return VK_SUCCESS; |
| 4796 | } |
| 4797 | |
| 4798 | |
| 4799 | static VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD( |
| 4800 | VkCommandBuffer commandBuffer, |
| 4801 | VkPipelineStageFlagBits pipelineStage, |
| 4802 | VkBuffer dstBuffer, |
| 4803 | VkDeviceSize dstOffset, |
| 4804 | uint32_t marker) |
| 4805 | { |
| 4806 | //Not a CREATE or DESTROY function |
| 4807 | } |
| 4808 | |
| 4809 | |
Shannon McPherson | 650eea7 | 2019-08-12 10:39:11 -0600 | [diff] [blame] | 4810 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4811 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsEXT( |
| 4812 | VkPhysicalDevice physicalDevice, |
| 4813 | uint32_t* pTimeDomainCount, |
| 4814 | VkTimeDomainEXT* pTimeDomains) |
| 4815 | { |
| 4816 | //Not a CREATE or DESTROY function |
| 4817 | return VK_SUCCESS; |
| 4818 | } |
| 4819 | |
| 4820 | static VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsEXT( |
| 4821 | VkDevice device, |
| 4822 | uint32_t timestampCount, |
| 4823 | const VkCalibratedTimestampInfoEXT* pTimestampInfos, |
| 4824 | uint64_t* pTimestamps, |
| 4825 | uint64_t* pMaxDeviation) |
| 4826 | { |
| 4827 | //Not a CREATE or DESTROY function |
| 4828 | return VK_SUCCESS; |
| 4829 | } |
| 4830 | |
| 4831 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 4832 | #ifdef VK_ENABLE_BETA_EXTENSIONS |
| 4833 | #endif /* VK_ENABLE_BETA_EXTENSIONS */ |
| 4834 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 4835 | |
| 4836 | |
| 4837 | #ifdef VK_USE_PLATFORM_GGP |
| 4838 | #endif /* VK_USE_PLATFORM_GGP */ |
| 4839 | |
| 4840 | |
| 4841 | |
| 4842 | |
| 4843 | |
| 4844 | static VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksNV( |
| 4845 | VkCommandBuffer commandBuffer, |
| 4846 | uint32_t taskCount, |
| 4847 | uint32_t firstTask) |
| 4848 | { |
| 4849 | //Not a CREATE or DESTROY function |
| 4850 | } |
| 4851 | |
| 4852 | static VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectNV( |
| 4853 | VkCommandBuffer commandBuffer, |
| 4854 | VkBuffer buffer, |
| 4855 | VkDeviceSize offset, |
| 4856 | uint32_t drawCount, |
| 4857 | uint32_t stride) |
| 4858 | { |
| 4859 | //Not a CREATE or DESTROY function |
| 4860 | } |
| 4861 | |
| 4862 | static VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountNV( |
| 4863 | VkCommandBuffer commandBuffer, |
| 4864 | VkBuffer buffer, |
| 4865 | VkDeviceSize offset, |
| 4866 | VkBuffer countBuffer, |
| 4867 | VkDeviceSize countBufferOffset, |
| 4868 | uint32_t maxDrawCount, |
| 4869 | uint32_t stride) |
| 4870 | { |
| 4871 | //Not a CREATE or DESTROY function |
| 4872 | } |
| 4873 | |
| 4874 | |
| 4875 | |
| 4876 | |
| 4877 | static VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorNV( |
| 4878 | VkCommandBuffer commandBuffer, |
| 4879 | uint32_t firstExclusiveScissor, |
| 4880 | uint32_t exclusiveScissorCount, |
| 4881 | const VkRect2D* pExclusiveScissors) |
| 4882 | { |
| 4883 | //Not a CREATE or DESTROY function |
| 4884 | } |
| 4885 | |
| 4886 | |
| 4887 | static VKAPI_ATTR void VKAPI_CALL CmdSetCheckpointNV( |
| 4888 | VkCommandBuffer commandBuffer, |
| 4889 | const void* pCheckpointMarker) |
| 4890 | { |
| 4891 | //Not a CREATE or DESTROY function |
| 4892 | } |
| 4893 | |
| 4894 | static VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointDataNV( |
| 4895 | VkQueue queue, |
| 4896 | uint32_t* pCheckpointDataCount, |
| 4897 | VkCheckpointDataNV* pCheckpointData) |
| 4898 | { |
| 4899 | //Not a CREATE or DESTROY function |
| 4900 | } |
| 4901 | |
| 4902 | |
| 4903 | |
| 4904 | static VKAPI_ATTR VkResult VKAPI_CALL InitializePerformanceApiINTEL( |
| 4905 | VkDevice device, |
| 4906 | const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) |
| 4907 | { |
| 4908 | //Not a CREATE or DESTROY function |
| 4909 | return VK_SUCCESS; |
| 4910 | } |
| 4911 | |
| 4912 | static VKAPI_ATTR void VKAPI_CALL UninitializePerformanceApiINTEL( |
| 4913 | VkDevice device) |
| 4914 | { |
| 4915 | //Not a CREATE or DESTROY function |
| 4916 | } |
| 4917 | |
| 4918 | static VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceMarkerINTEL( |
| 4919 | VkCommandBuffer commandBuffer, |
| 4920 | const VkPerformanceMarkerInfoINTEL* pMarkerInfo) |
| 4921 | { |
| 4922 | //Not a CREATE or DESTROY function |
| 4923 | return VK_SUCCESS; |
| 4924 | } |
| 4925 | |
| 4926 | static VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceStreamMarkerINTEL( |
| 4927 | VkCommandBuffer commandBuffer, |
| 4928 | const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) |
| 4929 | { |
| 4930 | //Not a CREATE or DESTROY function |
| 4931 | return VK_SUCCESS; |
| 4932 | } |
| 4933 | |
| 4934 | static VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceOverrideINTEL( |
| 4935 | VkCommandBuffer commandBuffer, |
| 4936 | const VkPerformanceOverrideInfoINTEL* pOverrideInfo) |
| 4937 | { |
| 4938 | //Not a CREATE or DESTROY function |
| 4939 | return VK_SUCCESS; |
| 4940 | } |
| 4941 | |
| 4942 | static VKAPI_ATTR VkResult VKAPI_CALL AcquirePerformanceConfigurationINTEL( |
| 4943 | VkDevice device, |
| 4944 | const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, |
| 4945 | VkPerformanceConfigurationINTEL* pConfiguration) |
| 4946 | { |
| 4947 | //Not a CREATE or DESTROY function |
| 4948 | return VK_SUCCESS; |
| 4949 | } |
| 4950 | |
| 4951 | static VKAPI_ATTR VkResult VKAPI_CALL ReleasePerformanceConfigurationINTEL( |
| 4952 | VkDevice device, |
| 4953 | VkPerformanceConfigurationINTEL configuration) |
| 4954 | { |
| 4955 | //Not a CREATE or DESTROY function |
| 4956 | return VK_SUCCESS; |
| 4957 | } |
| 4958 | |
| 4959 | static VKAPI_ATTR VkResult VKAPI_CALL QueueSetPerformanceConfigurationINTEL( |
| 4960 | VkQueue queue, |
| 4961 | VkPerformanceConfigurationINTEL configuration) |
| 4962 | { |
| 4963 | //Not a CREATE or DESTROY function |
| 4964 | return VK_SUCCESS; |
| 4965 | } |
| 4966 | |
| 4967 | static VKAPI_ATTR VkResult VKAPI_CALL GetPerformanceParameterINTEL( |
| 4968 | VkDevice device, |
| 4969 | VkPerformanceParameterTypeINTEL parameter, |
| 4970 | VkPerformanceValueINTEL* pValue) |
| 4971 | { |
| 4972 | //Not a CREATE or DESTROY function |
| 4973 | return VK_SUCCESS; |
| 4974 | } |
| 4975 | |
| 4976 | |
| 4977 | |
| 4978 | static VKAPI_ATTR void VKAPI_CALL SetLocalDimmingAMD( |
| 4979 | VkDevice device, |
| 4980 | VkSwapchainKHR swapChain, |
| 4981 | VkBool32 localDimmingEnable) |
| 4982 | { |
| 4983 | //Not a CREATE or DESTROY function |
| 4984 | } |
| 4985 | |
| 4986 | #ifdef VK_USE_PLATFORM_FUCHSIA |
| 4987 | |
| 4988 | static VKAPI_ATTR VkResult VKAPI_CALL CreateImagePipeSurfaceFUCHSIA( |
| 4989 | VkInstance instance, |
| 4990 | const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, |
| 4991 | const VkAllocationCallbacks* pAllocator, |
| 4992 | VkSurfaceKHR* pSurface) |
| 4993 | { |
| 4994 | unique_lock_t lock(global_lock); |
| 4995 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 4996 | return VK_SUCCESS; |
| 4997 | } |
| 4998 | #endif /* VK_USE_PLATFORM_FUCHSIA */ |
| 4999 | |
| 5000 | #ifdef VK_USE_PLATFORM_METAL_EXT |
| 5001 | |
| 5002 | static VKAPI_ATTR VkResult VKAPI_CALL CreateMetalSurfaceEXT( |
| 5003 | VkInstance instance, |
| 5004 | const VkMetalSurfaceCreateInfoEXT* pCreateInfo, |
| 5005 | const VkAllocationCallbacks* pAllocator, |
| 5006 | VkSurfaceKHR* pSurface) |
| 5007 | { |
| 5008 | unique_lock_t lock(global_lock); |
| 5009 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 5010 | return VK_SUCCESS; |
| 5011 | } |
| 5012 | #endif /* VK_USE_PLATFORM_METAL_EXT */ |
| 5013 | |
| 5014 | |
| 5015 | |
| 5016 | |
| 5017 | |
| 5018 | |
| 5019 | |
| 5020 | |
| 5021 | |
Shannon McPherson | 650eea7 | 2019-08-12 10:39:11 -0600 | [diff] [blame] | 5022 | |
| 5023 | |
Shannon McPherson | bcabc20 | 2019-08-27 10:23:12 -0600 | [diff] [blame] | 5024 | |
Shannon McPherson | 1abaced | 2020-10-06 10:59:49 -0600 | [diff] [blame] | 5025 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 5026 | static VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressEXT( |
| 5027 | VkDevice device, |
Charles Giessen | 2891eff | 2020-01-15 11:40:22 -0700 | [diff] [blame] | 5028 | const VkBufferDeviceAddressInfo* pInfo) |
Mark Lobodzinski | 48bf8e7 | 2019-12-10 15:00:23 -0700 | [diff] [blame] | 5029 | { |
| 5030 | //Not a CREATE or DESTROY function |
| 5031 | return VK_SUCCESS; |
| 5032 | } |
| 5033 | |
| 5034 | |
| 5035 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT( |
| 5036 | VkPhysicalDevice physicalDevice, |
| 5037 | uint32_t* pToolCount, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 5038 | VkPhysicalDeviceToolProperties* pToolProperties) |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 5039 | { |
| 5040 | //Not a CREATE or DESTROY function |
| 5041 | return VK_SUCCESS; |
| 5042 | } |
| 5043 | |
| 5044 | |
| 5045 | |
| 5046 | |
| 5047 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesNV( |
| 5048 | VkPhysicalDevice physicalDevice, |
| 5049 | uint32_t* pPropertyCount, |
| 5050 | VkCooperativeMatrixPropertiesNV* pProperties) |
| 5051 | { |
| 5052 | //Not a CREATE or DESTROY function |
| 5053 | return VK_SUCCESS; |
| 5054 | } |
| 5055 | |
| 5056 | |
| 5057 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( |
| 5058 | VkPhysicalDevice physicalDevice, |
| 5059 | uint32_t* pCombinationCount, |
| 5060 | VkFramebufferMixedSamplesCombinationNV* pCombinations) |
| 5061 | { |
| 5062 | //Not a CREATE or DESTROY function |
| 5063 | return VK_SUCCESS; |
| 5064 | } |
| 5065 | |
| 5066 | |
| 5067 | |
Mike Schuchardt | 4ee5f2a | 2021-04-28 09:28:42 -0700 | [diff] [blame] | 5068 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 5069 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 5070 | |
| 5071 | static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModes2EXT( |
| 5072 | VkPhysicalDevice physicalDevice, |
| 5073 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 5074 | uint32_t* pPresentModeCount, |
| 5075 | VkPresentModeKHR* pPresentModes) |
| 5076 | { |
| 5077 | //Not a CREATE or DESTROY function |
| 5078 | return VK_SUCCESS; |
| 5079 | } |
| 5080 | |
| 5081 | static VKAPI_ATTR VkResult VKAPI_CALL AcquireFullScreenExclusiveModeEXT( |
| 5082 | VkDevice device, |
| 5083 | VkSwapchainKHR swapchain) |
| 5084 | { |
| 5085 | //Not a CREATE or DESTROY function |
| 5086 | return VK_SUCCESS; |
| 5087 | } |
| 5088 | |
| 5089 | static VKAPI_ATTR VkResult VKAPI_CALL ReleaseFullScreenExclusiveModeEXT( |
| 5090 | VkDevice device, |
| 5091 | VkSwapchainKHR swapchain) |
| 5092 | { |
| 5093 | //Not a CREATE or DESTROY function |
| 5094 | return VK_SUCCESS; |
| 5095 | } |
| 5096 | |
| 5097 | static VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModes2EXT( |
| 5098 | VkDevice device, |
| 5099 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 5100 | VkDeviceGroupPresentModeFlagsKHR* pModes) |
| 5101 | { |
| 5102 | //Not a CREATE or DESTROY function |
| 5103 | return VK_SUCCESS; |
| 5104 | } |
| 5105 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 5106 | |
| 5107 | |
| 5108 | static VKAPI_ATTR VkResult VKAPI_CALL CreateHeadlessSurfaceEXT( |
| 5109 | VkInstance instance, |
| 5110 | const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, |
| 5111 | const VkAllocationCallbacks* pAllocator, |
| 5112 | VkSurfaceKHR* pSurface) |
| 5113 | { |
| 5114 | unique_lock_t lock(global_lock); |
| 5115 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 5116 | return VK_SUCCESS; |
| 5117 | } |
| 5118 | |
| 5119 | |
Shannon McPherson | 650eea7 | 2019-08-12 10:39:11 -0600 | [diff] [blame] | 5120 | static VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEXT( |
| 5121 | VkCommandBuffer commandBuffer, |
| 5122 | uint32_t lineStippleFactor, |
| 5123 | uint16_t lineStipplePattern) |
| 5124 | { |
| 5125 | //Not a CREATE or DESTROY function |
| 5126 | } |
| 5127 | |
| 5128 | |
Shannon McPherson | 3b36fdc | 2020-07-20 14:47:26 -0600 | [diff] [blame] | 5129 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 5130 | static VKAPI_ATTR void VKAPI_CALL ResetQueryPoolEXT( |
| 5131 | VkDevice device, |
| 5132 | VkQueryPool queryPool, |
| 5133 | uint32_t firstQuery, |
| 5134 | uint32_t queryCount) |
| 5135 | { |
| 5136 | //Not a CREATE or DESTROY function |
| 5137 | } |
| 5138 | |
| 5139 | |
| 5140 | |
Shannon McPherson | ff825d9 | 2020-06-24 15:20:01 -0600 | [diff] [blame] | 5141 | static VKAPI_ATTR void VKAPI_CALL CmdSetCullModeEXT( |
| 5142 | VkCommandBuffer commandBuffer, |
| 5143 | VkCullModeFlags cullMode) |
| 5144 | { |
| 5145 | //Not a CREATE or DESTROY function |
| 5146 | } |
| 5147 | |
| 5148 | static VKAPI_ATTR void VKAPI_CALL CmdSetFrontFaceEXT( |
| 5149 | VkCommandBuffer commandBuffer, |
| 5150 | VkFrontFace frontFace) |
| 5151 | { |
| 5152 | //Not a CREATE or DESTROY function |
| 5153 | } |
| 5154 | |
| 5155 | static VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopologyEXT( |
| 5156 | VkCommandBuffer commandBuffer, |
| 5157 | VkPrimitiveTopology primitiveTopology) |
| 5158 | { |
| 5159 | //Not a CREATE or DESTROY function |
| 5160 | } |
| 5161 | |
| 5162 | static VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCountEXT( |
| 5163 | VkCommandBuffer commandBuffer, |
| 5164 | uint32_t viewportCount, |
| 5165 | const VkViewport* pViewports) |
| 5166 | { |
| 5167 | //Not a CREATE or DESTROY function |
| 5168 | } |
| 5169 | |
| 5170 | static VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCountEXT( |
| 5171 | VkCommandBuffer commandBuffer, |
| 5172 | uint32_t scissorCount, |
| 5173 | const VkRect2D* pScissors) |
| 5174 | { |
| 5175 | //Not a CREATE or DESTROY function |
| 5176 | } |
| 5177 | |
| 5178 | static VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2EXT( |
| 5179 | VkCommandBuffer commandBuffer, |
| 5180 | uint32_t firstBinding, |
| 5181 | uint32_t bindingCount, |
| 5182 | const VkBuffer* pBuffers, |
| 5183 | const VkDeviceSize* pOffsets, |
| 5184 | const VkDeviceSize* pSizes, |
| 5185 | const VkDeviceSize* pStrides) |
| 5186 | { |
| 5187 | //Not a CREATE or DESTROY function |
| 5188 | } |
| 5189 | |
| 5190 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnableEXT( |
| 5191 | VkCommandBuffer commandBuffer, |
| 5192 | VkBool32 depthTestEnable) |
| 5193 | { |
| 5194 | //Not a CREATE or DESTROY function |
| 5195 | } |
| 5196 | |
| 5197 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnableEXT( |
| 5198 | VkCommandBuffer commandBuffer, |
| 5199 | VkBool32 depthWriteEnable) |
| 5200 | { |
| 5201 | //Not a CREATE or DESTROY function |
| 5202 | } |
| 5203 | |
| 5204 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOpEXT( |
| 5205 | VkCommandBuffer commandBuffer, |
| 5206 | VkCompareOp depthCompareOp) |
| 5207 | { |
| 5208 | //Not a CREATE or DESTROY function |
| 5209 | } |
| 5210 | |
| 5211 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnableEXT( |
| 5212 | VkCommandBuffer commandBuffer, |
| 5213 | VkBool32 depthBoundsTestEnable) |
| 5214 | { |
| 5215 | //Not a CREATE or DESTROY function |
| 5216 | } |
| 5217 | |
| 5218 | static VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnableEXT( |
| 5219 | VkCommandBuffer commandBuffer, |
| 5220 | VkBool32 stencilTestEnable) |
| 5221 | { |
| 5222 | //Not a CREATE or DESTROY function |
| 5223 | } |
| 5224 | |
| 5225 | static VKAPI_ATTR void VKAPI_CALL CmdSetStencilOpEXT( |
| 5226 | VkCommandBuffer commandBuffer, |
| 5227 | VkStencilFaceFlags faceMask, |
| 5228 | VkStencilOp failOp, |
| 5229 | VkStencilOp passOp, |
| 5230 | VkStencilOp depthFailOp, |
| 5231 | VkCompareOp compareOp) |
| 5232 | { |
| 5233 | //Not a CREATE or DESTROY function |
| 5234 | } |
| 5235 | |
| 5236 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 5237 | |
Mike Schuchardt | 8d582b0 | 2021-07-20 10:20:43 -0700 | [diff] [blame] | 5238 | |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5239 | static VKAPI_ATTR void VKAPI_CALL GetGeneratedCommandsMemoryRequirementsNV( |
| 5240 | VkDevice device, |
| 5241 | const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, |
| 5242 | VkMemoryRequirements2* pMemoryRequirements) |
| 5243 | { |
| 5244 | //Not a CREATE or DESTROY function |
| 5245 | } |
| 5246 | |
| 5247 | static VKAPI_ATTR void VKAPI_CALL CmdPreprocessGeneratedCommandsNV( |
| 5248 | VkCommandBuffer commandBuffer, |
| 5249 | const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) |
| 5250 | { |
| 5251 | //Not a CREATE or DESTROY function |
| 5252 | } |
| 5253 | |
| 5254 | static VKAPI_ATTR void VKAPI_CALL CmdExecuteGeneratedCommandsNV( |
| 5255 | VkCommandBuffer commandBuffer, |
| 5256 | VkBool32 isPreprocessed, |
| 5257 | const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) |
| 5258 | { |
| 5259 | //Not a CREATE or DESTROY function |
| 5260 | } |
| 5261 | |
| 5262 | static VKAPI_ATTR void VKAPI_CALL CmdBindPipelineShaderGroupNV( |
| 5263 | VkCommandBuffer commandBuffer, |
| 5264 | VkPipelineBindPoint pipelineBindPoint, |
| 5265 | VkPipeline pipeline, |
| 5266 | uint32_t groupIndex) |
| 5267 | { |
| 5268 | //Not a CREATE or DESTROY function |
| 5269 | } |
| 5270 | |
| 5271 | static VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNV( |
| 5272 | VkDevice device, |
| 5273 | const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, |
| 5274 | const VkAllocationCallbacks* pAllocator, |
| 5275 | VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) |
| 5276 | { |
| 5277 | unique_lock_t lock(global_lock); |
| 5278 | *pIndirectCommandsLayout = (VkIndirectCommandsLayoutNV)global_unique_handle++; |
| 5279 | return VK_SUCCESS; |
| 5280 | } |
| 5281 | |
| 5282 | static VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNV( |
| 5283 | VkDevice device, |
| 5284 | VkIndirectCommandsLayoutNV indirectCommandsLayout, |
| 5285 | const VkAllocationCallbacks* pAllocator) |
| 5286 | { |
| 5287 | //Destroy object |
| 5288 | } |
| 5289 | |
| 5290 | |
| 5291 | |
| 5292 | |
| 5293 | |
| 5294 | |
Mike Schuchardt | dbd221b | 2021-06-21 10:10:48 -0700 | [diff] [blame] | 5295 | static VKAPI_ATTR VkResult VKAPI_CALL AcquireDrmDisplayEXT( |
| 5296 | VkPhysicalDevice physicalDevice, |
| 5297 | int32_t drmFd, |
| 5298 | VkDisplayKHR display) |
| 5299 | { |
| 5300 | //Not a CREATE or DESTROY function |
| 5301 | return VK_SUCCESS; |
| 5302 | } |
| 5303 | |
| 5304 | static VKAPI_ATTR VkResult VKAPI_CALL GetDrmDisplayEXT( |
| 5305 | VkPhysicalDevice physicalDevice, |
| 5306 | int32_t drmFd, |
| 5307 | uint32_t connectorId, |
| 5308 | VkDisplayKHR* display) |
| 5309 | { |
| 5310 | //Not a CREATE or DESTROY function |
| 5311 | return VK_SUCCESS; |
| 5312 | } |
| 5313 | |
| 5314 | |
Shannon McPherson | ae0f0ea | 2020-04-10 16:14:29 -0600 | [diff] [blame] | 5315 | |
Shannon McPherson | 1abaced | 2020-10-06 10:59:49 -0600 | [diff] [blame] | 5316 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 5317 | |
Mike Schuchardt | 7bcbfd3 | 2020-05-07 15:33:52 -0700 | [diff] [blame] | 5318 | static VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlotEXT( |
| 5319 | VkDevice device, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 5320 | const VkPrivateDataSlotCreateInfo* pCreateInfo, |
Mike Schuchardt | 7bcbfd3 | 2020-05-07 15:33:52 -0700 | [diff] [blame] | 5321 | const VkAllocationCallbacks* pAllocator, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 5322 | VkPrivateDataSlot* pPrivateDataSlot) |
Mike Schuchardt | 7bcbfd3 | 2020-05-07 15:33:52 -0700 | [diff] [blame] | 5323 | { |
| 5324 | unique_lock_t lock(global_lock); |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 5325 | *pPrivateDataSlot = (VkPrivateDataSlot)global_unique_handle++; |
Mike Schuchardt | 7bcbfd3 | 2020-05-07 15:33:52 -0700 | [diff] [blame] | 5326 | return VK_SUCCESS; |
| 5327 | } |
| 5328 | |
| 5329 | static VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlotEXT( |
| 5330 | VkDevice device, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 5331 | VkPrivateDataSlot privateDataSlot, |
Mike Schuchardt | 7bcbfd3 | 2020-05-07 15:33:52 -0700 | [diff] [blame] | 5332 | const VkAllocationCallbacks* pAllocator) |
| 5333 | { |
| 5334 | //Destroy object |
| 5335 | } |
| 5336 | |
| 5337 | static VKAPI_ATTR VkResult VKAPI_CALL SetPrivateDataEXT( |
| 5338 | VkDevice device, |
| 5339 | VkObjectType objectType, |
| 5340 | uint64_t objectHandle, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 5341 | VkPrivateDataSlot privateDataSlot, |
Mike Schuchardt | 7bcbfd3 | 2020-05-07 15:33:52 -0700 | [diff] [blame] | 5342 | uint64_t data) |
| 5343 | { |
| 5344 | //Not a CREATE or DESTROY function |
| 5345 | return VK_SUCCESS; |
| 5346 | } |
| 5347 | |
| 5348 | static VKAPI_ATTR void VKAPI_CALL GetPrivateDataEXT( |
| 5349 | VkDevice device, |
| 5350 | VkObjectType objectType, |
| 5351 | uint64_t objectHandle, |
Mike Schuchardt | 5ac40c6 | 2022-01-25 10:38:49 -0800 | [diff] [blame] | 5352 | VkPrivateDataSlot privateDataSlot, |
Mike Schuchardt | 7bcbfd3 | 2020-05-07 15:33:52 -0700 | [diff] [blame] | 5353 | uint64_t* pData) |
| 5354 | { |
| 5355 | //Not a CREATE or DESTROY function |
| 5356 | } |
| 5357 | |
| 5358 | |
| 5359 | |
| 5360 | |
Mike Schuchardt | 2661f65 | 2022-06-13 12:55:10 -0700 | [diff] [blame] | 5361 | #ifdef VK_USE_PLATFORM_METAL_EXT |
| 5362 | |
| 5363 | static VKAPI_ATTR void VKAPI_CALL ExportMetalObjectsEXT( |
| 5364 | VkDevice device, |
| 5365 | VkExportMetalObjectsInfoEXT* pMetalObjectsInfo) |
| 5366 | { |
| 5367 | //Not a CREATE or DESTROY function |
| 5368 | } |
| 5369 | #endif /* VK_USE_PLATFORM_METAL_EXT */ |
| 5370 | |
Shannon McPherson | 68bfbc2 | 2020-07-06 11:29:34 -0600 | [diff] [blame] | 5371 | |
Mike Schuchardt | 0265f2e | 2022-04-01 11:04:00 -0700 | [diff] [blame] | 5372 | |
Mike Schuchardt | a9bee4c | 2022-05-17 08:44:30 -0700 | [diff] [blame] | 5373 | |
Shannon McPherson | 900e174 | 2020-11-11 19:15:39 -0700 | [diff] [blame] | 5374 | static VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateEnumNV( |
| 5375 | VkCommandBuffer commandBuffer, |
| 5376 | VkFragmentShadingRateNV shadingRate, |
| 5377 | const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) |
| 5378 | { |
| 5379 | //Not a CREATE or DESTROY function |
| 5380 | } |
| 5381 | |
| 5382 | |
Shannon McPherson | 3b36fdc | 2020-07-20 14:47:26 -0600 | [diff] [blame] | 5383 | |
Shannon McPherson | eceb318 | 2020-08-17 21:43:44 -0600 | [diff] [blame] | 5384 | |
Shannon McPherson | bd0ebb6 | 2020-11-04 15:41:43 -0700 | [diff] [blame] | 5385 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 5386 | |
Mike Schuchardt | dbd221b | 2021-06-21 10:10:48 -0700 | [diff] [blame] | 5387 | |
Mike Schuchardt | fe50678 | 2022-05-11 10:32:40 -0700 | [diff] [blame] | 5388 | static VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2EXT( |
| 5389 | VkDevice device, |
| 5390 | VkImage image, |
| 5391 | const VkImageSubresource2EXT* pSubresource, |
| 5392 | VkSubresourceLayout2EXT* pLayout) |
| 5393 | { |
| 5394 | //Not a CREATE or DESTROY function |
| 5395 | } |
| 5396 | |
| 5397 | |
Mike Schuchardt | 6ca4355 | 2021-10-05 11:21:19 -0700 | [diff] [blame] | 5398 | |
Mike Schuchardt | ed290a0 | 2021-11-29 10:18:41 -0800 | [diff] [blame] | 5399 | |
Mike Schuchardt | 497f232 | 2022-08-04 13:33:13 -0700 | [diff] [blame] | 5400 | |
Shannon McPherson | 4cc0932 | 2020-12-22 16:27:35 -0700 | [diff] [blame] | 5401 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 5402 | |
| 5403 | static VKAPI_ATTR VkResult VKAPI_CALL AcquireWinrtDisplayNV( |
| 5404 | VkPhysicalDevice physicalDevice, |
| 5405 | VkDisplayKHR display) |
| 5406 | { |
| 5407 | //Not a CREATE or DESTROY function |
| 5408 | return VK_SUCCESS; |
| 5409 | } |
| 5410 | |
| 5411 | static VKAPI_ATTR VkResult VKAPI_CALL GetWinrtDisplayNV( |
| 5412 | VkPhysicalDevice physicalDevice, |
| 5413 | uint32_t deviceRelativeId, |
| 5414 | VkDisplayKHR* pDisplay) |
| 5415 | { |
| 5416 | //Not a CREATE or DESTROY function |
| 5417 | return VK_SUCCESS; |
| 5418 | } |
| 5419 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 5420 | |
Shannon McPherson | 68bfbc2 | 2020-07-06 11:29:34 -0600 | [diff] [blame] | 5421 | #ifdef VK_USE_PLATFORM_DIRECTFB_EXT |
| 5422 | |
| 5423 | static VKAPI_ATTR VkResult VKAPI_CALL CreateDirectFBSurfaceEXT( |
| 5424 | VkInstance instance, |
| 5425 | const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, |
| 5426 | const VkAllocationCallbacks* pAllocator, |
| 5427 | VkSurfaceKHR* pSurface) |
| 5428 | { |
| 5429 | unique_lock_t lock(global_lock); |
| 5430 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 5431 | return VK_SUCCESS; |
| 5432 | } |
| 5433 | |
| 5434 | static VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceDirectFBPresentationSupportEXT( |
| 5435 | VkPhysicalDevice physicalDevice, |
| 5436 | uint32_t queueFamilyIndex, |
| 5437 | IDirectFB* dfb) |
| 5438 | { |
| 5439 | //Not a CREATE or DESTROY function |
| 5440 | return VK_SUCCESS; |
| 5441 | } |
| 5442 | #endif /* VK_USE_PLATFORM_DIRECTFB_EXT */ |
| 5443 | |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5444 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 5445 | |
| 5446 | static VKAPI_ATTR void VKAPI_CALL CmdSetVertexInputEXT( |
| 5447 | VkCommandBuffer commandBuffer, |
| 5448 | uint32_t vertexBindingDescriptionCount, |
| 5449 | const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, |
| 5450 | uint32_t vertexAttributeDescriptionCount, |
| 5451 | const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) |
| 5452 | { |
| 5453 | //Not a CREATE or DESTROY function |
| 5454 | } |
| 5455 | |
Mike Schuchardt | dbd221b | 2021-06-21 10:10:48 -0700 | [diff] [blame] | 5456 | |
Mike Schuchardt | 6c444b2 | 2021-08-30 09:19:23 -0700 | [diff] [blame] | 5457 | |
Mike Schuchardt | ed290a0 | 2021-11-29 10:18:41 -0800 | [diff] [blame] | 5458 | |
Mike Schuchardt | 1d3ce71 | 2021-03-23 16:46:37 -0700 | [diff] [blame] | 5459 | #ifdef VK_USE_PLATFORM_FUCHSIA |
| 5460 | |
| 5461 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandleFUCHSIA( |
| 5462 | VkDevice device, |
| 5463 | const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, |
| 5464 | zx_handle_t* pZirconHandle) |
| 5465 | { |
| 5466 | //Not a CREATE or DESTROY function |
| 5467 | return VK_SUCCESS; |
| 5468 | } |
| 5469 | |
| 5470 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandlePropertiesFUCHSIA( |
| 5471 | VkDevice device, |
| 5472 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 5473 | zx_handle_t zirconHandle, |
| 5474 | VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties) |
| 5475 | { |
| 5476 | //Not a CREATE or DESTROY function |
| 5477 | return VK_SUCCESS; |
| 5478 | } |
| 5479 | #endif /* VK_USE_PLATFORM_FUCHSIA */ |
| 5480 | |
| 5481 | #ifdef VK_USE_PLATFORM_FUCHSIA |
| 5482 | |
| 5483 | static VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreZirconHandleFUCHSIA( |
| 5484 | VkDevice device, |
| 5485 | const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) |
| 5486 | { |
| 5487 | //Not a CREATE or DESTROY function |
| 5488 | return VK_SUCCESS; |
| 5489 | } |
| 5490 | |
| 5491 | static VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreZirconHandleFUCHSIA( |
| 5492 | VkDevice device, |
| 5493 | const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, |
| 5494 | zx_handle_t* pZirconHandle) |
| 5495 | { |
| 5496 | //Not a CREATE or DESTROY function |
| 5497 | return VK_SUCCESS; |
| 5498 | } |
| 5499 | #endif /* VK_USE_PLATFORM_FUCHSIA */ |
| 5500 | |
Mike Schuchardt | 56f25d9 | 2021-09-28 09:48:35 -0700 | [diff] [blame] | 5501 | #ifdef VK_USE_PLATFORM_FUCHSIA |
| 5502 | |
| 5503 | static VKAPI_ATTR VkResult VKAPI_CALL CreateBufferCollectionFUCHSIA( |
| 5504 | VkDevice device, |
| 5505 | const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, |
| 5506 | const VkAllocationCallbacks* pAllocator, |
| 5507 | VkBufferCollectionFUCHSIA* pCollection) |
| 5508 | { |
| 5509 | unique_lock_t lock(global_lock); |
| 5510 | *pCollection = (VkBufferCollectionFUCHSIA)global_unique_handle++; |
| 5511 | return VK_SUCCESS; |
| 5512 | } |
| 5513 | |
| 5514 | static VKAPI_ATTR VkResult VKAPI_CALL SetBufferCollectionImageConstraintsFUCHSIA( |
| 5515 | VkDevice device, |
| 5516 | VkBufferCollectionFUCHSIA collection, |
| 5517 | const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo) |
| 5518 | { |
| 5519 | //Not a CREATE or DESTROY function |
| 5520 | return VK_SUCCESS; |
| 5521 | } |
| 5522 | |
| 5523 | static VKAPI_ATTR VkResult VKAPI_CALL SetBufferCollectionBufferConstraintsFUCHSIA( |
| 5524 | VkDevice device, |
| 5525 | VkBufferCollectionFUCHSIA collection, |
| 5526 | const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo) |
| 5527 | { |
| 5528 | //Not a CREATE or DESTROY function |
| 5529 | return VK_SUCCESS; |
| 5530 | } |
| 5531 | |
| 5532 | static VKAPI_ATTR void VKAPI_CALL DestroyBufferCollectionFUCHSIA( |
| 5533 | VkDevice device, |
| 5534 | VkBufferCollectionFUCHSIA collection, |
| 5535 | const VkAllocationCallbacks* pAllocator) |
| 5536 | { |
| 5537 | //Destroy object |
| 5538 | } |
| 5539 | |
| 5540 | static VKAPI_ATTR VkResult VKAPI_CALL GetBufferCollectionPropertiesFUCHSIA( |
| 5541 | VkDevice device, |
| 5542 | VkBufferCollectionFUCHSIA collection, |
| 5543 | VkBufferCollectionPropertiesFUCHSIA* pProperties) |
| 5544 | { |
| 5545 | //Not a CREATE or DESTROY function |
| 5546 | return VK_SUCCESS; |
| 5547 | } |
| 5548 | #endif /* VK_USE_PLATFORM_FUCHSIA */ |
| 5549 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 5550 | |
Mike Schuchardt | ab751c3 | 2021-07-21 10:26:41 -0700 | [diff] [blame] | 5551 | static VKAPI_ATTR VkResult VKAPI_CALL GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( |
| 5552 | VkDevice device, |
| 5553 | VkRenderPass renderpass, |
| 5554 | VkExtent2D* pMaxWorkgroupSize) |
| 5555 | { |
| 5556 | //Not a CREATE or DESTROY function |
| 5557 | return VK_SUCCESS; |
| 5558 | } |
| 5559 | |
| 5560 | static VKAPI_ATTR void VKAPI_CALL CmdSubpassShadingHUAWEI( |
| 5561 | VkCommandBuffer commandBuffer) |
| 5562 | { |
| 5563 | //Not a CREATE or DESTROY function |
| 5564 | } |
| 5565 | |
| 5566 | |
Mike Schuchardt | 8d582b0 | 2021-07-20 10:20:43 -0700 | [diff] [blame] | 5567 | static VKAPI_ATTR void VKAPI_CALL CmdBindInvocationMaskHUAWEI( |
| 5568 | VkCommandBuffer commandBuffer, |
| 5569 | VkImageView imageView, |
| 5570 | VkImageLayout imageLayout) |
| 5571 | { |
| 5572 | //Not a CREATE or DESTROY function |
| 5573 | } |
| 5574 | |
| 5575 | |
Mike Schuchardt | 697cc6c | 2021-07-06 13:22:55 -0700 | [diff] [blame] | 5576 | static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryRemoteAddressNV( |
| 5577 | VkDevice device, |
Mike Schuchardt | 8d582b0 | 2021-07-20 10:20:43 -0700 | [diff] [blame] | 5578 | const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, |
Mike Schuchardt | 697cc6c | 2021-07-06 13:22:55 -0700 | [diff] [blame] | 5579 | VkRemoteAddressNV* pAddress) |
| 5580 | { |
| 5581 | //Not a CREATE or DESTROY function |
| 5582 | return VK_SUCCESS; |
| 5583 | } |
| 5584 | |
| 5585 | |
Mike Schuchardt | fe50678 | 2022-05-11 10:32:40 -0700 | [diff] [blame] | 5586 | static VKAPI_ATTR VkResult VKAPI_CALL GetPipelinePropertiesEXT( |
| 5587 | VkDevice device, |
| 5588 | const VkPipelineInfoEXT* pPipelineInfo, |
| 5589 | VkBaseOutStructure* pPipelineProperties) |
| 5590 | { |
| 5591 | //Not a CREATE or DESTROY function |
| 5592 | return VK_SUCCESS; |
| 5593 | } |
| 5594 | |
| 5595 | |
Mike Schuchardt | 1987cb2 | 2022-06-30 12:30:53 -0700 | [diff] [blame] | 5596 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 5597 | static VKAPI_ATTR void VKAPI_CALL CmdSetPatchControlPointsEXT( |
| 5598 | VkCommandBuffer commandBuffer, |
| 5599 | uint32_t patchControlPoints) |
| 5600 | { |
| 5601 | //Not a CREATE or DESTROY function |
| 5602 | } |
| 5603 | |
| 5604 | static VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnableEXT( |
| 5605 | VkCommandBuffer commandBuffer, |
| 5606 | VkBool32 rasterizerDiscardEnable) |
| 5607 | { |
| 5608 | //Not a CREATE or DESTROY function |
| 5609 | } |
| 5610 | |
| 5611 | static VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnableEXT( |
| 5612 | VkCommandBuffer commandBuffer, |
| 5613 | VkBool32 depthBiasEnable) |
| 5614 | { |
| 5615 | //Not a CREATE or DESTROY function |
| 5616 | } |
| 5617 | |
| 5618 | static VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEXT( |
| 5619 | VkCommandBuffer commandBuffer, |
| 5620 | VkLogicOp logicOp) |
| 5621 | { |
| 5622 | //Not a CREATE or DESTROY function |
| 5623 | } |
| 5624 | |
| 5625 | static VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnableEXT( |
| 5626 | VkCommandBuffer commandBuffer, |
| 5627 | VkBool32 primitiveRestartEnable) |
| 5628 | { |
| 5629 | //Not a CREATE or DESTROY function |
| 5630 | } |
| 5631 | |
Shannon McPherson | 461b33c | 2021-03-02 15:45:13 -0700 | [diff] [blame] | 5632 | #ifdef VK_USE_PLATFORM_SCREEN_QNX |
| 5633 | |
| 5634 | static VKAPI_ATTR VkResult VKAPI_CALL CreateScreenSurfaceQNX( |
| 5635 | VkInstance instance, |
| 5636 | const VkScreenSurfaceCreateInfoQNX* pCreateInfo, |
| 5637 | const VkAllocationCallbacks* pAllocator, |
| 5638 | VkSurfaceKHR* pSurface) |
| 5639 | { |
| 5640 | unique_lock_t lock(global_lock); |
| 5641 | *pSurface = (VkSurfaceKHR)global_unique_handle++; |
| 5642 | return VK_SUCCESS; |
| 5643 | } |
| 5644 | |
| 5645 | static VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceScreenPresentationSupportQNX( |
| 5646 | VkPhysicalDevice physicalDevice, |
| 5647 | uint32_t queueFamilyIndex, |
| 5648 | struct _screen_window* window) |
| 5649 | { |
| 5650 | //Not a CREATE or DESTROY function |
| 5651 | return VK_SUCCESS; |
| 5652 | } |
| 5653 | #endif /* VK_USE_PLATFORM_SCREEN_QNX */ |
| 5654 | |
Shannon McPherson | 4cc0932 | 2020-12-22 16:27:35 -0700 | [diff] [blame] | 5655 | |
Mike Schuchardt | eb3d67b | 2021-04-19 08:30:33 -0700 | [diff] [blame] | 5656 | static VKAPI_ATTR void VKAPI_CALL CmdSetColorWriteEnableEXT( |
| 5657 | VkCommandBuffer commandBuffer, |
| 5658 | uint32_t attachmentCount, |
| 5659 | const VkBool32* pColorWriteEnables) |
| 5660 | { |
| 5661 | //Not a CREATE or DESTROY function |
| 5662 | } |
| 5663 | |
| 5664 | |
Mike Schuchardt | 1021540 | 2021-06-07 13:44:49 -0700 | [diff] [blame] | 5665 | |
Mike Schuchardt | 11c35e2 | 2021-11-16 11:02:56 -0800 | [diff] [blame] | 5666 | |
Mike Schuchardt | 0265f2e | 2022-04-01 11:04:00 -0700 | [diff] [blame] | 5667 | |
Mike Schuchardt | dbd221b | 2021-06-21 10:10:48 -0700 | [diff] [blame] | 5668 | static VKAPI_ATTR void VKAPI_CALL CmdDrawMultiEXT( |
| 5669 | VkCommandBuffer commandBuffer, |
| 5670 | uint32_t drawCount, |
| 5671 | const VkMultiDrawInfoEXT* pVertexInfo, |
| 5672 | uint32_t instanceCount, |
| 5673 | uint32_t firstInstance, |
| 5674 | uint32_t stride) |
| 5675 | { |
| 5676 | //Not a CREATE or DESTROY function |
| 5677 | } |
| 5678 | |
| 5679 | static VKAPI_ATTR void VKAPI_CALL CmdDrawMultiIndexedEXT( |
| 5680 | VkCommandBuffer commandBuffer, |
| 5681 | uint32_t drawCount, |
| 5682 | const VkMultiDrawIndexedInfoEXT* pIndexInfo, |
| 5683 | uint32_t instanceCount, |
| 5684 | uint32_t firstInstance, |
| 5685 | uint32_t stride, |
| 5686 | const int32_t* pVertexOffset) |
| 5687 | { |
| 5688 | //Not a CREATE or DESTROY function |
| 5689 | } |
| 5690 | |
| 5691 | |
Mike Schuchardt | 415320f | 2021-08-10 12:44:35 -0700 | [diff] [blame] | 5692 | |
Mike Schuchardt | 7001f2e | 2021-10-14 10:13:58 -0700 | [diff] [blame] | 5693 | |
Mike Schuchardt | fc0b3f0 | 2022-04-05 10:29:34 -0700 | [diff] [blame] | 5694 | |
Mike Schuchardt | f4974cc | 2021-09-08 15:24:35 -0700 | [diff] [blame] | 5695 | static VKAPI_ATTR void VKAPI_CALL SetDeviceMemoryPriorityEXT( |
| 5696 | VkDevice device, |
| 5697 | VkDeviceMemory memory, |
| 5698 | float priority) |
| 5699 | { |
| 5700 | //Not a CREATE or DESTROY function |
| 5701 | } |
| 5702 | |
| 5703 | |
Mike Schuchardt | 795bad2 | 2022-03-08 10:33:43 -0800 | [diff] [blame] | 5704 | static VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutHostMappingInfoVALVE( |
| 5705 | VkDevice device, |
| 5706 | const VkDescriptorSetBindingReferenceVALVE* pBindingReference, |
| 5707 | VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping) |
| 5708 | { |
| 5709 | //Not a CREATE or DESTROY function |
| 5710 | } |
| 5711 | |
| 5712 | static VKAPI_ATTR void VKAPI_CALL GetDescriptorSetHostMappingVALVE( |
| 5713 | VkDevice device, |
| 5714 | VkDescriptorSet descriptorSet, |
| 5715 | void** ppData) |
| 5716 | { |
| 5717 | //Not a CREATE or DESTROY function |
| 5718 | } |
| 5719 | |
| 5720 | |
Mike Schuchardt | d15ff77 | 2022-01-04 10:12:40 -0800 | [diff] [blame] | 5721 | |
| 5722 | |
| 5723 | |
Mike Schuchardt | fe50678 | 2022-05-11 10:32:40 -0700 | [diff] [blame] | 5724 | |
| 5725 | |
Mike Schuchardt | 2661f65 | 2022-06-13 12:55:10 -0700 | [diff] [blame] | 5726 | |
Mike Schuchardt | 53b6183 | 2022-07-21 10:08:24 -0700 | [diff] [blame] | 5727 | |
Mike Schuchardt | 088cfe8 | 2022-09-01 09:31:34 -0700 | [diff] [blame] | 5728 | |
Mike Schuchardt | 1987cb2 | 2022-06-30 12:30:53 -0700 | [diff] [blame] | 5729 | static VKAPI_ATTR void VKAPI_CALL GetShaderModuleIdentifierEXT( |
| 5730 | VkDevice device, |
| 5731 | VkShaderModule shaderModule, |
| 5732 | VkShaderModuleIdentifierEXT* pIdentifier) |
| 5733 | { |
| 5734 | //Not a CREATE or DESTROY function |
| 5735 | } |
| 5736 | |
| 5737 | static VKAPI_ATTR void VKAPI_CALL GetShaderModuleCreateInfoIdentifierEXT( |
| 5738 | VkDevice device, |
| 5739 | const VkShaderModuleCreateInfo* pCreateInfo, |
| 5740 | VkShaderModuleIdentifierEXT* pIdentifier) |
| 5741 | { |
| 5742 | //Not a CREATE or DESTROY function |
| 5743 | } |
| 5744 | |
| 5745 | |
Mike Schuchardt | 4390261 | 2022-08-18 13:06:08 -0700 | [diff] [blame] | 5746 | |
Mike Schuchardt | f7dff1f | 2022-09-08 10:04:50 -0700 | [diff] [blame] | 5747 | |
Mike Schuchardt | 53b6183 | 2022-07-21 10:08:24 -0700 | [diff] [blame] | 5748 | static VKAPI_ATTR VkResult VKAPI_CALL GetFramebufferTilePropertiesQCOM( |
| 5749 | VkDevice device, |
| 5750 | VkFramebuffer framebuffer, |
| 5751 | uint32_t* pPropertiesCount, |
| 5752 | VkTilePropertiesQCOM* pProperties) |
| 5753 | { |
| 5754 | //Not a CREATE or DESTROY function |
| 5755 | return VK_SUCCESS; |
| 5756 | } |
| 5757 | |
| 5758 | static VKAPI_ATTR VkResult VKAPI_CALL GetDynamicRenderingTilePropertiesQCOM( |
| 5759 | VkDevice device, |
| 5760 | const VkRenderingInfo* pRenderingInfo, |
| 5761 | VkTilePropertiesQCOM* pProperties) |
| 5762 | { |
| 5763 | //Not a CREATE or DESTROY function |
| 5764 | return VK_SUCCESS; |
| 5765 | } |
| 5766 | |
| 5767 | |
Mike Schuchardt | 497f232 | 2022-08-04 13:33:13 -0700 | [diff] [blame] | 5768 | |
Mike Schuchardt | 5b4f221 | 2022-09-15 09:20:35 -0700 | [diff] [blame] | 5769 | |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5770 | static VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureKHR( |
| 5771 | VkDevice device, |
| 5772 | const VkAccelerationStructureCreateInfoKHR* pCreateInfo, |
| 5773 | const VkAllocationCallbacks* pAllocator, |
| 5774 | VkAccelerationStructureKHR* pAccelerationStructure) |
| 5775 | { |
| 5776 | unique_lock_t lock(global_lock); |
| 5777 | *pAccelerationStructure = (VkAccelerationStructureKHR)global_unique_handle++; |
| 5778 | return VK_SUCCESS; |
| 5779 | } |
| 5780 | |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5781 | static VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureKHR( |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5782 | VkDevice device, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5783 | VkAccelerationStructureKHR accelerationStructure, |
| 5784 | const VkAllocationCallbacks* pAllocator) |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5785 | { |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5786 | //Destroy object |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5787 | } |
| 5788 | |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5789 | static VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresKHR( |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5790 | VkCommandBuffer commandBuffer, |
| 5791 | uint32_t infoCount, |
| 5792 | const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5793 | const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5794 | { |
| 5795 | //Not a CREATE or DESTROY function |
| 5796 | } |
| 5797 | |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5798 | static VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresIndirectKHR( |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5799 | VkCommandBuffer commandBuffer, |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5800 | uint32_t infoCount, |
| 5801 | const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5802 | const VkDeviceAddress* pIndirectDeviceAddresses, |
| 5803 | const uint32_t* pIndirectStrides, |
| 5804 | const uint32_t* const* ppMaxPrimitiveCounts) |
| 5805 | { |
| 5806 | //Not a CREATE or DESTROY function |
| 5807 | } |
| 5808 | |
| 5809 | static VKAPI_ATTR VkResult VKAPI_CALL BuildAccelerationStructuresKHR( |
| 5810 | VkDevice device, |
| 5811 | VkDeferredOperationKHR deferredOperation, |
| 5812 | uint32_t infoCount, |
| 5813 | const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, |
| 5814 | const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5815 | { |
| 5816 | //Not a CREATE or DESTROY function |
| 5817 | return VK_SUCCESS; |
| 5818 | } |
| 5819 | |
| 5820 | static VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureKHR( |
| 5821 | VkDevice device, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5822 | VkDeferredOperationKHR deferredOperation, |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5823 | const VkCopyAccelerationStructureInfoKHR* pInfo) |
| 5824 | { |
| 5825 | //Not a CREATE or DESTROY function |
| 5826 | return VK_SUCCESS; |
| 5827 | } |
| 5828 | |
| 5829 | static VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureToMemoryKHR( |
| 5830 | VkDevice device, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5831 | VkDeferredOperationKHR deferredOperation, |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5832 | const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) |
| 5833 | { |
| 5834 | //Not a CREATE or DESTROY function |
| 5835 | return VK_SUCCESS; |
| 5836 | } |
| 5837 | |
| 5838 | static VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToAccelerationStructureKHR( |
| 5839 | VkDevice device, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5840 | VkDeferredOperationKHR deferredOperation, |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5841 | const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) |
| 5842 | { |
| 5843 | //Not a CREATE or DESTROY function |
| 5844 | return VK_SUCCESS; |
| 5845 | } |
| 5846 | |
| 5847 | static VKAPI_ATTR VkResult VKAPI_CALL WriteAccelerationStructuresPropertiesKHR( |
| 5848 | VkDevice device, |
| 5849 | uint32_t accelerationStructureCount, |
| 5850 | const VkAccelerationStructureKHR* pAccelerationStructures, |
| 5851 | VkQueryType queryType, |
| 5852 | size_t dataSize, |
| 5853 | void* pData, |
| 5854 | size_t stride) |
| 5855 | { |
| 5856 | //Not a CREATE or DESTROY function |
| 5857 | return VK_SUCCESS; |
| 5858 | } |
| 5859 | |
| 5860 | static VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureKHR( |
| 5861 | VkCommandBuffer commandBuffer, |
| 5862 | const VkCopyAccelerationStructureInfoKHR* pInfo) |
| 5863 | { |
| 5864 | //Not a CREATE or DESTROY function |
| 5865 | } |
| 5866 | |
| 5867 | static VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureToMemoryKHR( |
| 5868 | VkCommandBuffer commandBuffer, |
| 5869 | const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) |
| 5870 | { |
| 5871 | //Not a CREATE or DESTROY function |
| 5872 | } |
| 5873 | |
| 5874 | static VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToAccelerationStructureKHR( |
| 5875 | VkCommandBuffer commandBuffer, |
| 5876 | const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) |
| 5877 | { |
| 5878 | //Not a CREATE or DESTROY function |
| 5879 | } |
| 5880 | |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5881 | static VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetAccelerationStructureDeviceAddressKHR( |
| 5882 | VkDevice device, |
| 5883 | const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) |
| 5884 | { |
| 5885 | //Not a CREATE or DESTROY function |
| 5886 | return VK_SUCCESS; |
| 5887 | } |
| 5888 | |
| 5889 | static VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesKHR( |
| 5890 | VkCommandBuffer commandBuffer, |
| 5891 | uint32_t accelerationStructureCount, |
| 5892 | const VkAccelerationStructureKHR* pAccelerationStructures, |
| 5893 | VkQueryType queryType, |
| 5894 | VkQueryPool queryPool, |
| 5895 | uint32_t firstQuery) |
| 5896 | { |
| 5897 | //Not a CREATE or DESTROY function |
| 5898 | } |
| 5899 | |
| 5900 | static VKAPI_ATTR void VKAPI_CALL GetDeviceAccelerationStructureCompatibilityKHR( |
| 5901 | VkDevice device, |
| 5902 | const VkAccelerationStructureVersionInfoKHR* pVersionInfo, |
| 5903 | VkAccelerationStructureCompatibilityKHR* pCompatibility) |
| 5904 | { |
| 5905 | //Not a CREATE or DESTROY function |
| 5906 | } |
| 5907 | |
| 5908 | static VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureBuildSizesKHR( |
| 5909 | VkDevice device, |
| 5910 | VkAccelerationStructureBuildTypeKHR buildType, |
| 5911 | const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, |
| 5912 | const uint32_t* pMaxPrimitiveCounts, |
| 5913 | VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo) |
| 5914 | { |
| 5915 | //Not a CREATE or DESTROY function |
| 5916 | } |
| 5917 | |
| 5918 | |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5919 | static VKAPI_ATTR void VKAPI_CALL CmdTraceRaysKHR( |
| 5920 | VkCommandBuffer commandBuffer, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5921 | const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, |
| 5922 | const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, |
| 5923 | const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, |
| 5924 | const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5925 | uint32_t width, |
| 5926 | uint32_t height, |
| 5927 | uint32_t depth) |
| 5928 | { |
| 5929 | //Not a CREATE or DESTROY function |
| 5930 | } |
| 5931 | |
| 5932 | static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR( |
| 5933 | VkDevice device, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5934 | VkDeferredOperationKHR deferredOperation, |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5935 | VkPipelineCache pipelineCache, |
| 5936 | uint32_t createInfoCount, |
| 5937 | const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, |
| 5938 | const VkAllocationCallbacks* pAllocator, |
| 5939 | VkPipeline* pPipelines) |
| 5940 | { |
| 5941 | unique_lock_t lock(global_lock); |
| 5942 | for (uint32_t i = 0; i < createInfoCount; ++i) { |
| 5943 | pPipelines[i] = (VkPipeline)global_unique_handle++; |
| 5944 | } |
| 5945 | return VK_SUCCESS; |
| 5946 | } |
| 5947 | |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5948 | static VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingCaptureReplayShaderGroupHandlesKHR( |
| 5949 | VkDevice device, |
| 5950 | VkPipeline pipeline, |
| 5951 | uint32_t firstGroup, |
| 5952 | uint32_t groupCount, |
| 5953 | size_t dataSize, |
| 5954 | void* pData) |
| 5955 | { |
| 5956 | //Not a CREATE or DESTROY function |
| 5957 | return VK_SUCCESS; |
| 5958 | } |
| 5959 | |
| 5960 | static VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirectKHR( |
| 5961 | VkCommandBuffer commandBuffer, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5962 | const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, |
| 5963 | const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, |
| 5964 | const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, |
| 5965 | const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, |
| 5966 | VkDeviceAddress indirectDeviceAddress) |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5967 | { |
| 5968 | //Not a CREATE or DESTROY function |
| 5969 | } |
| 5970 | |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5971 | static VKAPI_ATTR VkDeviceSize VKAPI_CALL GetRayTracingShaderGroupStackSizeKHR( |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5972 | VkDevice device, |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5973 | VkPipeline pipeline, |
| 5974 | uint32_t group, |
| 5975 | VkShaderGroupShaderKHR groupShader) |
Shannon McPherson | f881e61 | 2020-03-19 13:49:18 -0600 | [diff] [blame] | 5976 | { |
| 5977 | //Not a CREATE or DESTROY function |
| 5978 | return VK_SUCCESS; |
| 5979 | } |
Shannon McPherson | 0387f63 | 2020-11-23 08:48:45 -0700 | [diff] [blame] | 5980 | |
| 5981 | static VKAPI_ATTR void VKAPI_CALL CmdSetRayTracingPipelineStackSizeKHR( |
| 5982 | VkCommandBuffer commandBuffer, |
| 5983 | uint32_t pipelineStackSize) |
| 5984 | { |
| 5985 | //Not a CREATE or DESTROY function |
| 5986 | } |
| 5987 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 5988 | |
Shannon McPherson | 650eea7 | 2019-08-12 10:39:11 -0600 | [diff] [blame] | 5989 | |
Mike Schuchardt | 088cfe8 | 2022-09-01 09:31:34 -0700 | [diff] [blame] | 5990 | static VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksEXT( |
| 5991 | VkCommandBuffer commandBuffer, |
| 5992 | uint32_t groupCountX, |
| 5993 | uint32_t groupCountY, |
| 5994 | uint32_t groupCountZ) |
| 5995 | { |
| 5996 | //Not a CREATE or DESTROY function |
| 5997 | } |
| 5998 | |
| 5999 | static VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectEXT( |
| 6000 | VkCommandBuffer commandBuffer, |
| 6001 | VkBuffer buffer, |
| 6002 | VkDeviceSize offset, |
| 6003 | uint32_t drawCount, |
| 6004 | uint32_t stride) |
| 6005 | { |
| 6006 | //Not a CREATE or DESTROY function |
| 6007 | } |
| 6008 | |
| 6009 | static VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountEXT( |
| 6010 | VkCommandBuffer commandBuffer, |
| 6011 | VkBuffer buffer, |
| 6012 | VkDeviceSize offset, |
| 6013 | VkBuffer countBuffer, |
| 6014 | VkDeviceSize countBufferOffset, |
| 6015 | uint32_t maxDrawCount, |
| 6016 | uint32_t stride) |
| 6017 | { |
| 6018 | //Not a CREATE or DESTROY function |
| 6019 | } |
| 6020 | |
| 6021 | |
Shannon McPherson | 40cd216 | 2019-09-17 13:41:26 -0600 | [diff] [blame] | 6022 | |
Mike Schuchardt | 103ba3f | 2019-07-22 16:58:50 -0700 | [diff] [blame] | 6023 | static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) { |
| 6024 | // TODO: This function should only care about physical device functions and return nullptr for other functions |
| 6025 | const auto &item = name_to_funcptr_map.find(funcName); |
| 6026 | if (item != name_to_funcptr_map.end()) { |
| 6027 | return reinterpret_cast<PFN_vkVoidFunction>(item->second); |
| 6028 | } |
| 6029 | // Mock should intercept all functions so if we get here just return null |
| 6030 | return nullptr; |
| 6031 | } |
| 6032 | |
| 6033 | } // namespace vkmock |
| 6034 | |
| 6035 | #if defined(__GNUC__) && __GNUC__ >= 4 |
| 6036 | #define EXPORT __attribute__((visibility("default"))) |
| 6037 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) |
| 6038 | #define EXPORT __attribute__((visibility("default"))) |
| 6039 | #else |
| 6040 | #define EXPORT |
| 6041 | #endif |
| 6042 | |
| 6043 | extern "C" { |
| 6044 | |
| 6045 | EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName) { |
| 6046 | if (!vkmock::negotiate_loader_icd_interface_called) { |
| 6047 | vkmock::loader_interface_version = 1; |
| 6048 | } |
| 6049 | return vkmock::GetInstanceProcAddr(instance, pName); |
| 6050 | } |
| 6051 | |
| 6052 | EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char* pName) { |
| 6053 | return vkmock::GetPhysicalDeviceProcAddr(instance, pName); |
| 6054 | } |
| 6055 | |
| 6056 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion) { |
| 6057 | vkmock::negotiate_loader_icd_interface_called = true; |
| 6058 | vkmock::loader_interface_version = *pSupportedVersion; |
| 6059 | if (*pSupportedVersion > vkmock::SUPPORTED_LOADER_ICD_INTERFACE_VERSION) { |
| 6060 | *pSupportedVersion = vkmock::SUPPORTED_LOADER_ICD_INTERFACE_VERSION; |
| 6061 | } |
| 6062 | return VK_SUCCESS; |
| 6063 | } |
| 6064 | |
| 6065 | |
| 6066 | EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR( |
| 6067 | VkInstance instance, |
| 6068 | VkSurfaceKHR surface, |
| 6069 | const VkAllocationCallbacks* pAllocator) |
| 6070 | { |
| 6071 | vkmock::DestroySurfaceKHR(instance, surface, pAllocator); |
| 6072 | } |
| 6073 | |
| 6074 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR( |
| 6075 | VkPhysicalDevice physicalDevice, |
| 6076 | uint32_t queueFamilyIndex, |
| 6077 | VkSurfaceKHR surface, |
| 6078 | VkBool32* pSupported) |
| 6079 | { |
| 6080 | return vkmock::GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); |
| 6081 | } |
| 6082 | |
| 6083 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 6084 | VkPhysicalDevice physicalDevice, |
| 6085 | VkSurfaceKHR surface, |
| 6086 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) |
| 6087 | { |
| 6088 | return vkmock::GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); |
| 6089 | } |
| 6090 | |
| 6091 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 6092 | VkPhysicalDevice physicalDevice, |
| 6093 | VkSurfaceKHR surface, |
| 6094 | uint32_t* pSurfaceFormatCount, |
| 6095 | VkSurfaceFormatKHR* pSurfaceFormats) |
| 6096 | { |
| 6097 | return vkmock::GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); |
| 6098 | } |
| 6099 | |
| 6100 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 6101 | VkPhysicalDevice physicalDevice, |
| 6102 | VkSurfaceKHR surface, |
| 6103 | uint32_t* pPresentModeCount, |
| 6104 | VkPresentModeKHR* pPresentModes) |
| 6105 | { |
| 6106 | return vkmock::GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes); |
| 6107 | } |
| 6108 | |
| 6109 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR( |
| 6110 | VkInstance instance, |
| 6111 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
| 6112 | const VkAllocationCallbacks* pAllocator, |
| 6113 | VkSurfaceKHR* pSurface) |
| 6114 | { |
| 6115 | return vkmock::CreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); |
| 6116 | } |
| 6117 | |
| 6118 | #ifdef VK_USE_PLATFORM_XLIB_KHR |
| 6119 | |
| 6120 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR( |
| 6121 | VkInstance instance, |
| 6122 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
| 6123 | const VkAllocationCallbacks* pAllocator, |
| 6124 | VkSurfaceKHR* pSurface) |
| 6125 | { |
| 6126 | return vkmock::CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); |
| 6127 | } |
| 6128 | #endif /* VK_USE_PLATFORM_XLIB_KHR */ |
| 6129 | |
| 6130 | #ifdef VK_USE_PLATFORM_XCB_KHR |
| 6131 | |
| 6132 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR( |
| 6133 | VkInstance instance, |
| 6134 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
| 6135 | const VkAllocationCallbacks* pAllocator, |
| 6136 | VkSurfaceKHR* pSurface) |
| 6137 | { |
| 6138 | return vkmock::CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); |
| 6139 | } |
| 6140 | #endif /* VK_USE_PLATFORM_XCB_KHR */ |
| 6141 | |
| 6142 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR |
| 6143 | |
| 6144 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR( |
| 6145 | VkInstance instance, |
| 6146 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
| 6147 | const VkAllocationCallbacks* pAllocator, |
| 6148 | VkSurfaceKHR* pSurface) |
| 6149 | { |
| 6150 | return vkmock::CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); |
| 6151 | } |
| 6152 | #endif /* VK_USE_PLATFORM_WAYLAND_KHR */ |
| 6153 | |
| 6154 | #ifdef VK_USE_PLATFORM_ANDROID_KHR |
| 6155 | |
| 6156 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR( |
| 6157 | VkInstance instance, |
| 6158 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
| 6159 | const VkAllocationCallbacks* pAllocator, |
| 6160 | VkSurfaceKHR* pSurface) |
| 6161 | { |
| 6162 | return vkmock::CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); |
| 6163 | } |
| 6164 | #endif /* VK_USE_PLATFORM_ANDROID_KHR */ |
| 6165 | |
| 6166 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
| 6167 | |
| 6168 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR( |
| 6169 | VkInstance instance, |
| 6170 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
| 6171 | const VkAllocationCallbacks* pAllocator, |
| 6172 | VkSurfaceKHR* pSurface) |
| 6173 | { |
| 6174 | return vkmock::CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); |
| 6175 | } |
| 6176 | #endif /* VK_USE_PLATFORM_WIN32_KHR */ |
| 6177 | |
| 6178 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHR( |
| 6179 | VkDevice device, |
| 6180 | VkSurfaceKHR surface, |
| 6181 | VkDeviceGroupPresentModeFlagsKHR* pModes) |
| 6182 | { |
| 6183 | return vkmock::GetDeviceGroupSurfacePresentModesKHR(device, surface, pModes); |
| 6184 | } |
| 6185 | |
| 6186 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHR( |
| 6187 | VkPhysicalDevice physicalDevice, |
| 6188 | VkSurfaceKHR surface, |
| 6189 | uint32_t* pRectCount, |
| 6190 | VkRect2D* pRects) |
| 6191 | { |
| 6192 | return vkmock::GetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects); |
| 6193 | } |
| 6194 | |
| 6195 | #ifdef VK_USE_PLATFORM_VI_NN |
| 6196 | |
| 6197 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN( |
| 6198 | VkInstance instance, |
| 6199 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 6200 | const VkAllocationCallbacks* pAllocator, |
| 6201 | VkSurfaceKHR* pSurface) |
| 6202 | { |
| 6203 | return vkmock::CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); |
| 6204 | } |
| 6205 | #endif /* VK_USE_PLATFORM_VI_NN */ |
| 6206 | |
| 6207 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 6208 | VkPhysicalDevice physicalDevice, |
| 6209 | VkSurfaceKHR surface, |
| 6210 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) |
| 6211 | { |
| 6212 | return vkmock::GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); |
| 6213 | } |
| 6214 | |
| 6215 | #ifdef VK_USE_PLATFORM_IOS_MVK |
| 6216 | |
| 6217 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK( |
| 6218 | VkInstance instance, |
| 6219 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 6220 | const VkAllocationCallbacks* pAllocator, |
| 6221 | VkSurfaceKHR* pSurface) |
| 6222 | { |
| 6223 | return vkmock::CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); |
| 6224 | } |
| 6225 | #endif /* VK_USE_PLATFORM_IOS_MVK */ |
| 6226 | |
| 6227 | #ifdef VK_USE_PLATFORM_MACOS_MVK |
| 6228 | |
| 6229 | EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( |
| 6230 | VkInstance instance, |
| 6231 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 6232 | const VkAllocationCallbacks* pAllocator, |
| 6233 | VkSurfaceKHR* pSurface) |
| 6234 | { |
| 6235 | return vkmock::CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); |
| 6236 | } |
| 6237 | #endif /* VK_USE_PLATFORM_MACOS_MVK */ |
| 6238 | |
| 6239 | } // end extern "C" |
| 6240 | |
| 6241 | |