2 * Copyright 2017 Jacob Lifshay
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in all
12 * copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 #include "vulkan_icd.h"
24 #include "util/string_view.h"
25 #include <initializer_list>
28 using namespace vulkan_cpu
;
31 #define DLLEXPORT_ATTR(original_attributes) \
32 __attribute__((visibility("default"))) original_attributes
33 #define DLLEXPORT_CALL(original_attributes) original_attributes
35 #define DLLEXPORT_ATTR(original_attributes) __declspec(dllexport) original_attributes
36 #define DLLEXPORT_CALL(original_attributes) original_attributes
38 #error DLLEXPORT_* macros not implemented for platform
41 extern "C" DLLEXPORT_ATTR(VKAPI_ATTR
) PFN_vkVoidFunction
DLLEXPORT_CALL(VKAPI_CALL
)
42 vk_icdGetInstanceProcAddr(VkInstance instance
, const char *name
)
44 return vulkan_icd::Vulkan_loader_interface::get()->get_instance_proc_addr(instance
, name
);
47 static_assert(static_cast<PFN_vk_icdGetInstanceProcAddr
>(&vk_icdGetInstanceProcAddr
), "");
49 static constexpr void validate_allocator(const VkAllocationCallbacks
*allocator
) noexcept
51 assert(allocator
== nullptr && "Vulkan allocation callbacks are not implemented");
54 extern "C" VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
vkGetInstanceProcAddr(VkInstance instance
,
57 return vk_icdGetInstanceProcAddr(instance
, name
);
60 static_assert(static_cast<PFN_vkGetInstanceProcAddr
>(&vkGetInstanceProcAddr
), "");
62 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkCreateInstance(const VkInstanceCreateInfo
*create_info
,
63 const VkAllocationCallbacks
*allocator
,
66 return vulkan_icd::Vulkan_loader_interface::get()->create_instance(
67 create_info
, allocator
, instance
);
70 static_assert(static_cast<PFN_vkCreateInstance
>(&vkCreateInstance
), "");
72 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkEnumerateInstanceExtensionProperties(
73 const char *layer_name
, uint32_t *property_count
, VkExtensionProperties
*properties
)
76 return vulkan_icd::Vulkan_loader_interface::get()->enumerate_instance_extension_properties(
77 layer_name
, property_count
, properties
);
80 static_assert(static_cast<PFN_vkEnumerateInstanceExtensionProperties
>(
81 &vkEnumerateInstanceExtensionProperties
),
84 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyInstance(VkInstance instance
,
85 const VkAllocationCallbacks
*allocator
)
87 validate_allocator(allocator
);
88 vulkan::Vulkan_instance::move_from_handle(instance
).reset();
91 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkEnumeratePhysicalDevices(
92 VkInstance instance
, uint32_t *physical_device_count
, VkPhysicalDevice
*physical_devices
)
95 return vulkan_icd::catch_exceptions_and_return_result(
98 auto *instance_pointer
= vulkan::Vulkan_instance::from_handle(instance
);
99 return vulkan_icd::vulkan_enumerate_list_helper(
100 physical_device_count
,
103 to_handle(&instance_pointer
->physical_device
),
108 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkGetPhysicalDeviceFeatures(
109 VkPhysicalDevice physicalDevice
, VkPhysicalDeviceFeatures
*pFeatures
)
111 #warning finish implementing vkGetPhysicalDeviceFeatures
112 assert(!"vkGetPhysicalDeviceFeatures is not implemented");
115 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkGetPhysicalDeviceFormatProperties(
116 VkPhysicalDevice physicalDevice
, VkFormat format
, VkFormatProperties
*pFormatProperties
)
118 #warning finish implementing vkGetPhysicalDeviceFormatProperties
119 assert(!"vkGetPhysicalDeviceFormatProperties is not implemented");
122 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
123 vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice
,
126 VkImageTiling tiling
,
127 VkImageUsageFlags usage
,
128 VkImageCreateFlags flags
,
129 VkImageFormatProperties
*pImageFormatProperties
)
131 #warning finish implementing vkGetPhysicalDeviceImageFormatProperties
132 assert(!"vkGetPhysicalDeviceImageFormatProperties is not implemented");
135 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkGetPhysicalDeviceProperties(
136 VkPhysicalDevice physical_device
, VkPhysicalDeviceProperties
*properties
)
138 assert(physical_device
);
140 auto *physical_device_pointer
= vulkan::Vulkan_physical_device::from_handle(physical_device
);
141 *properties
= physical_device_pointer
->properties
;
144 extern "C" VKAPI_ATTR
void VKAPI_CALL
145 vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice
,
146 uint32_t *pQueueFamilyPropertyCount
,
147 VkQueueFamilyProperties
*pQueueFamilyProperties
)
149 #warning finish implementing vkGetPhysicalDeviceQueueFamilyProperties
150 assert(!"vkGetPhysicalDeviceQueueFamilyProperties is not implemented");
153 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkGetPhysicalDeviceMemoryProperties(
154 VkPhysicalDevice physicalDevice
, VkPhysicalDeviceMemoryProperties
*pMemoryProperties
)
156 #warning finish implementing vkGetPhysicalDeviceMemoryProperties
157 assert(!"vkGetPhysicalDeviceMemoryProperties is not implemented");
160 extern "C" VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
vkGetDeviceProcAddr(VkDevice device
,
163 return vulkan_icd::Vulkan_loader_interface::get()->get_procedure_address(
164 name
, vulkan_icd::Vulkan_loader_interface::Procedure_address_scope::Device
);
167 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkCreateDevice(VkPhysicalDevice physicalDevice
,
168 const VkDeviceCreateInfo
*pCreateInfo
,
169 const VkAllocationCallbacks
*allocator
,
172 validate_allocator(allocator
);
173 #warning finish implementing vkCreateDevice
174 assert(!"vkCreateDevice is not implemented");
177 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyDevice(VkDevice device
,
178 const VkAllocationCallbacks
*allocator
)
180 validate_allocator(allocator
);
181 #warning finish implementing vkDestroyDevice
182 assert(!"vkDestroyDevice is not implemented");
185 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
186 vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physical_device
,
187 const char *layer_name
,
188 uint32_t *property_count
,
189 VkExtensionProperties
*properties
)
191 return vulkan_icd::Vulkan_loader_interface::get()->enumerate_device_extension_properties(
192 physical_device
, layer_name
, property_count
, properties
);
195 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkGetDeviceQueue(VkDevice device
,
196 uint32_t queueFamilyIndex
,
200 #warning finish implementing vkGetDeviceQueue
201 assert(!"vkGetDeviceQueue is not implemented");
204 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkQueueSubmit(VkQueue queue
,
205 uint32_t submitCount
,
206 const VkSubmitInfo
*pSubmits
,
209 #warning finish implementing vkQueueSubmit
210 assert(!"vkQueueSubmit is not implemented");
213 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkQueueWaitIdle(VkQueue queue
)
215 #warning finish implementing vkQueueWaitIdle
216 assert(!"vkQueueWaitIdle is not implemented");
219 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkDeviceWaitIdle(VkDevice device
)
221 #warning finish implementing vkDeviceWaitIdle
222 assert(!"vkDeviceWaitIdle is not implemented");
225 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
226 vkAllocateMemory(VkDevice device
,
227 const VkMemoryAllocateInfo
*pAllocateInfo
,
228 const VkAllocationCallbacks
*allocator
,
229 VkDeviceMemory
*pMemory
)
231 validate_allocator(allocator
);
232 #warning finish implementing vkAllocateMemory
233 assert(!"vkAllocateMemory is not implemented");
236 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkFreeMemory(VkDevice device
,
237 VkDeviceMemory memory
,
238 const VkAllocationCallbacks
*allocator
)
240 validate_allocator(allocator
);
241 #warning finish implementing vkFreeMemory
242 assert(!"vkFreeMemory is not implemented");
245 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkMapMemory(VkDevice device
,
246 VkDeviceMemory memory
,
249 VkMemoryMapFlags flags
,
252 #warning finish implementing vkMapMemory
253 assert(!"vkMapMemory is not implemented");
256 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkUnmapMemory(VkDevice device
, VkDeviceMemory memory
)
258 #warning finish implementing vkUnmapMemory
259 assert(!"vkUnmapMemory is not implemented");
262 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkFlushMappedMemoryRanges(
263 VkDevice device
, uint32_t memoryRangeCount
, const VkMappedMemoryRange
*pMemoryRanges
)
265 #warning finish implementing vkFlushMappedMemoryRanges
266 assert(!"vkFlushMappedMemoryRanges is not implemented");
269 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkInvalidateMappedMemoryRanges(
270 VkDevice device
, uint32_t memoryRangeCount
, const VkMappedMemoryRange
*pMemoryRanges
)
272 #warning finish implementing vkInvalidateMappedMemoryRanges
273 assert(!"vkInvalidateMappedMemoryRanges is not implemented");
276 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkGetDeviceMemoryCommitment(
277 VkDevice device
, VkDeviceMemory memory
, VkDeviceSize
*pCommittedMemoryInBytes
)
279 #warning finish implementing vkGetDeviceMemoryCommitment
280 assert(!"vkGetDeviceMemoryCommitment is not implemented");
283 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkBindBufferMemory(VkDevice device
,
285 VkDeviceMemory memory
,
286 VkDeviceSize memoryOffset
)
288 #warning finish implementing vkBindBufferMemory
289 assert(!"vkBindBufferMemory is not implemented");
292 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkBindImageMemory(VkDevice device
,
294 VkDeviceMemory memory
,
295 VkDeviceSize memoryOffset
)
297 #warning finish implementing vkBindImageMemory
298 assert(!"vkBindImageMemory is not implemented");
301 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkGetBufferMemoryRequirements(
302 VkDevice device
, VkBuffer buffer
, VkMemoryRequirements
*pMemoryRequirements
)
304 #warning finish implementing vkGetBufferMemoryRequirements
305 assert(!"vkGetBufferMemoryRequirements is not implemented");
308 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkGetImageMemoryRequirements(
309 VkDevice device
, VkImage image
, VkMemoryRequirements
*pMemoryRequirements
)
311 #warning finish implementing vkGetImageMemoryRequirements
312 assert(!"vkGetImageMemoryRequirements is not implemented");
315 extern "C" VKAPI_ATTR
void VKAPI_CALL
316 vkGetImageSparseMemoryRequirements(VkDevice device
,
318 uint32_t *pSparseMemoryRequirementCount
,
319 VkSparseImageMemoryRequirements
*pSparseMemoryRequirements
)
321 #warning finish implementing vkGetImageSparseMemoryRequirements
322 assert(!"vkGetImageSparseMemoryRequirements is not implemented");
325 extern "C" VKAPI_ATTR
void VKAPI_CALL
326 vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice
,
329 VkSampleCountFlagBits samples
,
330 VkImageUsageFlags usage
,
331 VkImageTiling tiling
,
332 uint32_t *pPropertyCount
,
333 VkSparseImageFormatProperties
*pProperties
)
335 #warning finish implementing vkGetPhysicalDeviceSparseImageFormatProperties
336 assert(!"vkGetPhysicalDeviceSparseImageFormatProperties is not implemented");
339 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkQueueBindSparse(VkQueue queue
,
340 uint32_t bindInfoCount
,
341 const VkBindSparseInfo
*pBindInfo
,
344 #warning finish implementing vkQueueBindSparse
345 assert(!"vkQueueBindSparse is not implemented");
348 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkCreateFence(VkDevice device
,
349 const VkFenceCreateInfo
*pCreateInfo
,
350 const VkAllocationCallbacks
*allocator
,
353 validate_allocator(allocator
);
354 #warning finish implementing vkCreateFence
355 assert(!"vkCreateFence is not implemented");
358 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyFence(VkDevice device
,
360 const VkAllocationCallbacks
*allocator
)
362 validate_allocator(allocator
);
363 #warning finish implementing vkDestroyFence
364 assert(!"vkDestroyFence is not implemented");
367 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkResetFences(VkDevice device
,
369 const VkFence
*pFences
)
371 #warning finish implementing vkResetFences
372 assert(!"vkResetFences is not implemented");
375 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkGetFenceStatus(VkDevice device
, VkFence fence
)
377 #warning finish implementing vkGetFenceStatus
378 assert(!"vkGetFenceStatus is not implemented");
381 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkWaitForFences(VkDevice device
,
383 const VkFence
*pFences
,
387 #warning finish implementing vkWaitForFences
388 assert(!"vkWaitForFences is not implemented");
391 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
392 vkCreateSemaphore(VkDevice device
,
393 const VkSemaphoreCreateInfo
*pCreateInfo
,
394 const VkAllocationCallbacks
*allocator
,
395 VkSemaphore
*pSemaphore
)
397 validate_allocator(allocator
);
398 #warning finish implementing vkCreateSemaphore
399 assert(!"vkCreateSemaphore is not implemented");
402 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroySemaphore(VkDevice device
,
403 VkSemaphore semaphore
,
404 const VkAllocationCallbacks
*allocator
)
406 validate_allocator(allocator
);
407 #warning finish implementing vkDestroySemaphore
408 assert(!"vkDestroySemaphore is not implemented");
411 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkCreateEvent(VkDevice device
,
412 const VkEventCreateInfo
*pCreateInfo
,
413 const VkAllocationCallbacks
*allocator
,
416 validate_allocator(allocator
);
417 #warning finish implementing vkCreateEvent
418 assert(!"vkCreateEvent is not implemented");
421 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyEvent(VkDevice device
,
423 const VkAllocationCallbacks
*allocator
)
425 validate_allocator(allocator
);
426 #warning finish implementing vkDestroyEvent
427 assert(!"vkDestroyEvent is not implemented");
430 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkGetEventStatus(VkDevice device
, VkEvent event
)
432 #warning finish implementing vkGetEventStatus
433 assert(!"vkGetEventStatus is not implemented");
436 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkSetEvent(VkDevice device
, VkEvent event
)
438 #warning finish implementing vkSetEvent
439 assert(!"vkSetEvent is not implemented");
442 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkResetEvent(VkDevice device
, VkEvent event
)
444 #warning finish implementing vkResetEvent
445 assert(!"vkResetEvent is not implemented");
448 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
449 vkCreateQueryPool(VkDevice device
,
450 const VkQueryPoolCreateInfo
*pCreateInfo
,
451 const VkAllocationCallbacks
*allocator
,
452 VkQueryPool
*pQueryPool
)
454 #warning finish implementing vkCreateQueryPool
455 assert(!"vkCreateQueryPool is not implemented");
458 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyQueryPool(VkDevice device
,
459 VkQueryPool queryPool
,
460 const VkAllocationCallbacks
*allocator
)
462 validate_allocator(allocator
);
463 #warning finish implementing vkDestroyQueryPool
464 assert(!"vkDestroyQueryPool is not implemented");
467 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkGetQueryPoolResults(VkDevice device
,
468 VkQueryPool queryPool
,
474 VkQueryResultFlags flags
)
476 #warning finish implementing vkGetQueryPoolResults
477 assert(!"vkGetQueryPoolResults is not implemented");
480 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkCreateBuffer(VkDevice device
,
481 const VkBufferCreateInfo
*pCreateInfo
,
482 const VkAllocationCallbacks
*allocator
,
485 validate_allocator(allocator
);
486 #warning finish implementing vkCreateBuffer
487 assert(!"vkCreateBuffer is not implemented");
490 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyBuffer(VkDevice device
,
492 const VkAllocationCallbacks
*allocator
)
494 validate_allocator(allocator
);
495 #warning finish implementing vkDestroyBuffer
496 assert(!"vkDestroyBuffer is not implemented");
499 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
500 vkCreateBufferView(VkDevice device
,
501 const VkBufferViewCreateInfo
*pCreateInfo
,
502 const VkAllocationCallbacks
*allocator
,
505 validate_allocator(allocator
);
506 #warning finish implementing vkCreateBufferView
507 assert(!"vkCreateBufferView is not implemented");
510 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyBufferView(VkDevice device
,
511 VkBufferView bufferView
,
512 const VkAllocationCallbacks
*allocator
)
514 validate_allocator(allocator
);
515 #warning finish implementing vkDestroyBufferView
516 assert(!"vkDestroyBufferView is not implemented");
519 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkCreateImage(VkDevice device
,
520 const VkImageCreateInfo
*pCreateInfo
,
521 const VkAllocationCallbacks
*allocator
,
524 validate_allocator(allocator
);
525 #warning finish implementing vkCreateImage
526 assert(!"vkCreateImage is not implemented");
529 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyImage(VkDevice device
,
531 const VkAllocationCallbacks
*allocator
)
533 validate_allocator(allocator
);
534 #warning finish implementing vkDestroyImage
535 assert(!"vkDestroyImage is not implemented");
538 extern "C" VKAPI_ATTR
void VKAPI_CALL
539 vkGetImageSubresourceLayout(VkDevice device
,
541 const VkImageSubresource
*pSubresource
,
542 VkSubresourceLayout
*pLayout
)
544 #warning finish implementing vkGetImageSubresourceLayout
545 assert(!"vkGetImageSubresourceLayout is not implemented");
548 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
549 vkCreateImageView(VkDevice device
,
550 const VkImageViewCreateInfo
*pCreateInfo
,
551 const VkAllocationCallbacks
*allocator
,
554 validate_allocator(allocator
);
555 #warning finish implementing vkCreateImageView
556 assert(!"vkCreateImageView is not implemented");
559 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyImageView(VkDevice device
,
560 VkImageView imageView
,
561 const VkAllocationCallbacks
*allocator
)
563 validate_allocator(allocator
);
564 #warning finish implementing vkDestroyImageView
565 assert(!"vkDestroyImageView is not implemented");
568 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
569 vkCreateShaderModule(VkDevice device
,
570 const VkShaderModuleCreateInfo
*pCreateInfo
,
571 const VkAllocationCallbacks
*allocator
,
572 VkShaderModule
*pShaderModule
)
574 validate_allocator(allocator
);
575 #warning finish implementing vkCreateShaderModule
576 assert(!"vkCreateShaderModule is not implemented");
579 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyShaderModule(VkDevice device
,
580 VkShaderModule shaderModule
,
581 const VkAllocationCallbacks
*allocator
)
583 validate_allocator(allocator
);
584 #warning finish implementing vkDestroyShaderModule
585 assert(!"vkDestroyShaderModule is not implemented");
588 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
589 vkCreatePipelineCache(VkDevice device
,
590 const VkPipelineCacheCreateInfo
*pCreateInfo
,
591 const VkAllocationCallbacks
*allocator
,
592 VkPipelineCache
*pPipelineCache
)
594 validate_allocator(allocator
);
595 #warning finish implementing vkCreatePipelineCache
596 assert(!"vkCreatePipelineCache is not implemented");
599 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyPipelineCache(VkDevice device
,
600 VkPipelineCache pipelineCache
,
601 const VkAllocationCallbacks
*allocator
)
603 validate_allocator(allocator
);
604 #warning finish implementing vkDestroyPipelineCache
605 assert(!"vkDestroyPipelineCache is not implemented");
608 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkGetPipelineCacheData(VkDevice device
,
609 VkPipelineCache pipelineCache
,
613 #warning finish implementing vkGetPipelineCacheData
614 assert(!"vkGetPipelineCacheData is not implemented");
617 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkMergePipelineCaches(VkDevice device
,
618 VkPipelineCache dstCache
,
619 uint32_t srcCacheCount
,
620 const VkPipelineCache
*pSrcCaches
)
622 #warning finish implementing vkMergePipelineCaches
623 assert(!"vkMergePipelineCaches is not implemented");
626 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
627 vkCreateGraphicsPipelines(VkDevice device
,
628 VkPipelineCache pipelineCache
,
629 uint32_t createInfoCount
,
630 const VkGraphicsPipelineCreateInfo
*pCreateInfos
,
631 const VkAllocationCallbacks
*allocator
,
632 VkPipeline
*pPipelines
)
634 validate_allocator(allocator
);
635 #warning finish implementing vkCreateGraphicsPipelines
636 assert(!"vkCreateGraphicsPipelines is not implemented");
639 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
640 vkCreateComputePipelines(VkDevice device
,
641 VkPipelineCache pipelineCache
,
642 uint32_t createInfoCount
,
643 const VkComputePipelineCreateInfo
*pCreateInfos
,
644 const VkAllocationCallbacks
*allocator
,
645 VkPipeline
*pPipelines
)
647 validate_allocator(allocator
);
648 #warning finish implementing vkCreateComputePipelines
649 assert(!"vkCreateComputePipelines is not implemented");
652 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyPipeline(VkDevice device
,
654 const VkAllocationCallbacks
*allocator
)
656 validate_allocator(allocator
);
657 #warning finish implementing vkDestroyPipeline
658 assert(!"vkDestroyPipeline is not implemented");
661 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
662 vkCreatePipelineLayout(VkDevice device
,
663 const VkPipelineLayoutCreateInfo
*pCreateInfo
,
664 const VkAllocationCallbacks
*allocator
,
665 VkPipelineLayout
*pPipelineLayout
)
667 validate_allocator(allocator
);
668 #warning finish implementing vkCreatePipelineLayout
669 assert(!"vkCreatePipelineLayout is not implemented");
672 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyPipelineLayout(
673 VkDevice device
, VkPipelineLayout pipelineLayout
, const VkAllocationCallbacks
*allocator
)
675 validate_allocator(allocator
);
676 #warning finish implementing vkDestroyPipelineLayout
677 assert(!"vkDestroyPipelineLayout is not implemented");
680 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkCreateSampler(VkDevice device
,
681 const VkSamplerCreateInfo
*pCreateInfo
,
682 const VkAllocationCallbacks
*allocator
,
685 validate_allocator(allocator
);
686 #warning finish implementing vkCreateSampler
687 assert(!"vkCreateSampler is not implemented");
690 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroySampler(VkDevice device
,
692 const VkAllocationCallbacks
*allocator
)
694 validate_allocator(allocator
);
695 #warning finish implementing vkDestroySampler
696 assert(!"vkDestroySampler is not implemented");
699 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
700 vkCreateDescriptorSetLayout(VkDevice device
,
701 const VkDescriptorSetLayoutCreateInfo
*pCreateInfo
,
702 const VkAllocationCallbacks
*allocator
,
703 VkDescriptorSetLayout
*pSetLayout
)
705 validate_allocator(allocator
);
706 #warning finish implementing vkCreateDescriptorSetLayout
707 assert(!"vkCreateDescriptorSetLayout is not implemented");
710 extern "C" VKAPI_ATTR
void VKAPI_CALL
711 vkDestroyDescriptorSetLayout(VkDevice device
,
712 VkDescriptorSetLayout descriptorSetLayout
,
713 const VkAllocationCallbacks
*allocator
)
715 validate_allocator(allocator
);
716 #warning finish implementing vkDestroyDescriptorSetLayout
717 assert(!"vkDestroyDescriptorSetLayout is not implemented");
720 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
721 vkCreateDescriptorPool(VkDevice device
,
722 const VkDescriptorPoolCreateInfo
*pCreateInfo
,
723 const VkAllocationCallbacks
*allocator
,
724 VkDescriptorPool
*pDescriptorPool
)
726 validate_allocator(allocator
);
727 #warning finish implementing vkCreateDescriptorPool
728 assert(!"vkCreateDescriptorPool is not implemented");
731 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyDescriptorPool(
732 VkDevice device
, VkDescriptorPool descriptorPool
, const VkAllocationCallbacks
*allocator
)
734 validate_allocator(allocator
);
735 #warning finish implementing vkDestroyDescriptorPool
736 assert(!"vkDestroyDescriptorPool is not implemented");
739 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkResetDescriptorPool(VkDevice device
,
740 VkDescriptorPool descriptorPool
,
741 VkDescriptorPoolResetFlags flags
)
743 #warning finish implementing vkResetDescriptorPool
744 assert(!"vkResetDescriptorPool is not implemented");
747 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
748 vkAllocateDescriptorSets(VkDevice device
,
749 const VkDescriptorSetAllocateInfo
*pAllocateInfo
,
750 VkDescriptorSet
*pDescriptorSets
)
752 #warning finish implementing vkAllocateDescriptorSets
753 assert(!"vkAllocateDescriptorSets is not implemented");
756 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
757 vkFreeDescriptorSets(VkDevice device
,
758 VkDescriptorPool descriptorPool
,
759 uint32_t descriptorSetCount
,
760 const VkDescriptorSet
*pDescriptorSets
)
762 #warning finish implementing vkFreeDescriptorSets
763 assert(!"vkFreeDescriptorSets is not implemented");
766 extern "C" VKAPI_ATTR
void VKAPI_CALL
767 vkUpdateDescriptorSets(VkDevice device
,
768 uint32_t descriptorWriteCount
,
769 const VkWriteDescriptorSet
*pDescriptorWrites
,
770 uint32_t descriptorCopyCount
,
771 const VkCopyDescriptorSet
*pDescriptorCopies
)
773 #warning finish implementing vkUpdateDescriptorSets
774 assert(!"vkUpdateDescriptorSets is not implemented");
777 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
778 vkCreateFramebuffer(VkDevice device
,
779 const VkFramebufferCreateInfo
*pCreateInfo
,
780 const VkAllocationCallbacks
*allocator
,
781 VkFramebuffer
*pFramebuffer
)
783 validate_allocator(allocator
);
784 #warning finish implementing vkCreateFramebuffer
785 assert(!"vkCreateFramebuffer is not implemented");
788 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyFramebuffer(VkDevice device
,
789 VkFramebuffer framebuffer
,
790 const VkAllocationCallbacks
*allocator
)
792 validate_allocator(allocator
);
793 #warning finish implementing vkDestroyFramebuffer
794 assert(!"vkDestroyFramebuffer is not implemented");
797 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
798 vkCreateRenderPass(VkDevice device
,
799 const VkRenderPassCreateInfo
*pCreateInfo
,
800 const VkAllocationCallbacks
*allocator
,
801 VkRenderPass
*pRenderPass
)
803 validate_allocator(allocator
);
804 #warning finish implementing vkCreateRenderPass
805 assert(!"vkCreateRenderPass is not implemented");
808 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyRenderPass(VkDevice device
,
809 VkRenderPass renderPass
,
810 const VkAllocationCallbacks
*allocator
)
812 validate_allocator(allocator
);
813 #warning finish implementing vkDestroyRenderPass
814 assert(!"vkDestroyRenderPass is not implemented");
817 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkGetRenderAreaGranularity(VkDevice device
,
818 VkRenderPass renderPass
,
819 VkExtent2D
*pGranularity
)
821 #warning finish implementing vkGetRenderAreaGranularity
822 assert(!"vkGetRenderAreaGranularity is not implemented");
825 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
826 vkCreateCommandPool(VkDevice device
,
827 const VkCommandPoolCreateInfo
*pCreateInfo
,
828 const VkAllocationCallbacks
*allocator
,
829 VkCommandPool
*pCommandPool
)
831 validate_allocator(allocator
);
832 #warning finish implementing vkCreateCommandPool
833 assert(!"vkCreateCommandPool is not implemented");
836 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkDestroyCommandPool(VkDevice device
,
837 VkCommandPool commandPool
,
838 const VkAllocationCallbacks
*allocator
)
840 validate_allocator(allocator
);
841 #warning finish implementing vkDestroyCommandPool
842 assert(!"vkDestroyCommandPool is not implemented");
845 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkResetCommandPool(VkDevice device
,
846 VkCommandPool commandPool
,
847 VkCommandPoolResetFlags flags
)
849 #warning finish implementing vkResetCommandPool
850 assert(!"vkResetCommandPool is not implemented");
853 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
854 vkAllocateCommandBuffers(VkDevice device
,
855 const VkCommandBufferAllocateInfo
*pAllocateInfo
,
856 VkCommandBuffer
*pCommandBuffers
)
858 #warning finish implementing vkAllocateCommandBuffers
859 assert(!"vkAllocateCommandBuffers is not implemented");
862 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkFreeCommandBuffers(VkDevice device
,
863 VkCommandPool commandPool
,
864 uint32_t commandBufferCount
,
865 const VkCommandBuffer
*pCommandBuffers
)
867 #warning finish implementing vkFreeCommandBuffers
868 assert(!"vkFreeCommandBuffers is not implemented");
871 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
872 vkBeginCommandBuffer(VkCommandBuffer commandBuffer
, const VkCommandBufferBeginInfo
*pBeginInfo
)
874 #warning finish implementing vkBeginCommandBuffer
875 assert(!"vkBeginCommandBuffer is not implemented");
878 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkEndCommandBuffer(VkCommandBuffer commandBuffer
)
880 #warning finish implementing vkEndCommandBuffer
881 assert(!"vkEndCommandBuffer is not implemented");
884 extern "C" VKAPI_ATTR VkResult VKAPI_CALL
vkResetCommandBuffer(VkCommandBuffer commandBuffer
,
885 VkCommandBufferResetFlags flags
)
887 #warning finish implementing vkResetCommandBuffer
888 assert(!"vkResetCommandBuffer is not implemented");
891 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdBindPipeline(VkCommandBuffer commandBuffer
,
892 VkPipelineBindPoint pipelineBindPoint
,
895 #warning finish implementing vkCmdBindPipeline
896 assert(!"vkCmdBindPipeline is not implemented");
899 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetViewport(VkCommandBuffer commandBuffer
,
900 uint32_t firstViewport
,
901 uint32_t viewportCount
,
902 const VkViewport
*pViewports
)
904 #warning finish implementing vkCmdSetViewport
905 assert(!"vkCmdSetViewport is not implemented");
908 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetScissor(VkCommandBuffer commandBuffer
,
909 uint32_t firstScissor
,
910 uint32_t scissorCount
,
911 const VkRect2D
*pScissors
)
913 #warning finish implementing vkCmdSetScissor
914 assert(!"vkCmdSetScissor is not implemented");
917 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetLineWidth(VkCommandBuffer commandBuffer
,
920 #warning finish implementing vkCmdSetLineWidth
921 assert(!"vkCmdSetLineWidth is not implemented");
924 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetDepthBias(VkCommandBuffer commandBuffer
,
925 float depthBiasConstantFactor
,
926 float depthBiasClamp
,
927 float depthBiasSlopeFactor
)
929 #warning finish implementing vkCmdSetDepthBias
930 assert(!"vkCmdSetDepthBias is not implemented");
933 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetBlendConstants(VkCommandBuffer commandBuffer
,
934 const float blendConstants
[4])
936 #warning finish implementing vkCmdSetBlendConstants
937 assert(!"vkCmdSetBlendConstants is not implemented");
940 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetDepthBounds(VkCommandBuffer commandBuffer
,
941 float minDepthBounds
,
942 float maxDepthBounds
)
944 #warning finish implementing vkCmdSetDepthBounds
945 assert(!"vkCmdSetDepthBounds is not implemented");
948 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer
,
949 VkStencilFaceFlags faceMask
,
950 uint32_t compareMask
)
952 #warning finish implementing vkCmdSetStencilCompareMask
953 assert(!"vkCmdSetStencilCompareMask is not implemented");
956 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer
,
957 VkStencilFaceFlags faceMask
,
960 #warning finish implementing vkCmdSetStencilWriteMask
961 assert(!"vkCmdSetStencilWriteMask is not implemented");
964 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetStencilReference(VkCommandBuffer commandBuffer
,
965 VkStencilFaceFlags faceMask
,
968 #warning finish implementing vkCmdSetStencilReference
969 assert(!"vkCmdSetStencilReference is not implemented");
972 extern "C" VKAPI_ATTR
void VKAPI_CALL
973 vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer
,
974 VkPipelineBindPoint pipelineBindPoint
,
975 VkPipelineLayout layout
,
977 uint32_t descriptorSetCount
,
978 const VkDescriptorSet
*pDescriptorSets
,
979 uint32_t dynamicOffsetCount
,
980 const uint32_t *pDynamicOffsets
)
982 #warning finish implementing vkCmdBindDescriptorSets
983 assert(!"vkCmdBindDescriptorSets is not implemented");
986 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer
,
989 VkIndexType indexType
)
991 #warning finish implementing vkCmdBindIndexBuffer
992 assert(!"vkCmdBindIndexBuffer is not implemented");
995 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer
,
996 uint32_t firstBinding
,
997 uint32_t bindingCount
,
998 const VkBuffer
*pBuffers
,
999 const VkDeviceSize
*pOffsets
)
1001 #warning finish implementing vkCmdBindVertexBuffers
1002 assert(!"vkCmdBindVertexBuffers is not implemented");
1005 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdDraw(VkCommandBuffer commandBuffer
,
1006 uint32_t vertexCount
,
1007 uint32_t instanceCount
,
1008 uint32_t firstVertex
,
1009 uint32_t firstInstance
)
1011 #warning finish implementing vkCmdDraw
1012 assert(!"vkCmdDraw is not implemented");
1015 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdDrawIndexed(VkCommandBuffer commandBuffer
,
1016 uint32_t indexCount
,
1017 uint32_t instanceCount
,
1018 uint32_t firstIndex
,
1019 int32_t vertexOffset
,
1020 uint32_t firstInstance
)
1022 #warning finish implementing vkCmdDrawIndexed
1023 assert(!"vkCmdDrawIndexed is not implemented");
1026 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdDrawIndirect(VkCommandBuffer commandBuffer
,
1028 VkDeviceSize offset
,
1032 #warning finish implementing vkCmdDrawIndirect
1033 assert(!"vkCmdDrawIndirect is not implemented");
1036 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer
,
1038 VkDeviceSize offset
,
1042 #warning finish implementing vkCmdDrawIndexedIndirect
1043 assert(!"vkCmdDrawIndexedIndirect is not implemented");
1046 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdDispatch(VkCommandBuffer commandBuffer
,
1047 uint32_t groupCountX
,
1048 uint32_t groupCountY
,
1049 uint32_t groupCountZ
)
1051 #warning finish implementing vkCmdDispatch
1052 assert(!"vkCmdDispatch is not implemented");
1055 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdDispatchIndirect(VkCommandBuffer commandBuffer
,
1057 VkDeviceSize offset
)
1059 #warning finish implementing vkCmdDispatchIndirect
1060 assert(!"vkCmdDispatchIndirect is not implemented");
1063 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdCopyBuffer(VkCommandBuffer commandBuffer
,
1066 uint32_t regionCount
,
1067 const VkBufferCopy
*pRegions
)
1069 #warning finish implementing vkCmdCopyBuffer
1070 assert(!"vkCmdCopyBuffer is not implemented");
1073 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdCopyImage(VkCommandBuffer commandBuffer
,
1075 VkImageLayout srcImageLayout
,
1077 VkImageLayout dstImageLayout
,
1078 uint32_t regionCount
,
1079 const VkImageCopy
*pRegions
)
1081 #warning finish implementing vkCmdCopyImage
1082 assert(!"vkCmdCopyImage is not implemented");
1085 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdBlitImage(VkCommandBuffer commandBuffer
,
1087 VkImageLayout srcImageLayout
,
1089 VkImageLayout dstImageLayout
,
1090 uint32_t regionCount
,
1091 const VkImageBlit
*pRegions
,
1094 #warning finish implementing vkCmdBlitImage
1095 assert(!"vkCmdBlitImage is not implemented");
1098 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer
,
1101 VkImageLayout dstImageLayout
,
1102 uint32_t regionCount
,
1103 const VkBufferImageCopy
*pRegions
)
1105 #warning finish implementing vkCmdCopyBufferToImage
1106 assert(!"vkCmdCopyBufferToImage is not implemented");
1109 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer
,
1111 VkImageLayout srcImageLayout
,
1113 uint32_t regionCount
,
1114 const VkBufferImageCopy
*pRegions
)
1116 #warning finish implementing vkCmdCopyImageToBuffer
1117 assert(!"vkCmdCopyImageToBuffer is not implemented");
1120 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer
,
1122 VkDeviceSize dstOffset
,
1123 VkDeviceSize dataSize
,
1126 #warning finish implementing vkCmdUpdateBuffer
1127 assert(!"vkCmdUpdateBuffer is not implemented");
1130 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdFillBuffer(VkCommandBuffer commandBuffer
,
1132 VkDeviceSize dstOffset
,
1136 #warning finish implementing vkCmdFillBuffer
1137 assert(!"vkCmdFillBuffer is not implemented");
1140 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdClearColorImage(VkCommandBuffer commandBuffer
,
1142 VkImageLayout imageLayout
,
1143 const VkClearColorValue
*pColor
,
1144 uint32_t rangeCount
,
1145 const VkImageSubresourceRange
*pRanges
)
1147 #warning finish implementing vkCmdClearColorImage
1148 assert(!"vkCmdClearColorImage is not implemented");
1151 extern "C" VKAPI_ATTR
void VKAPI_CALL
1152 vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer
,
1154 VkImageLayout imageLayout
,
1155 const VkClearDepthStencilValue
*pDepthStencil
,
1156 uint32_t rangeCount
,
1157 const VkImageSubresourceRange
*pRanges
)
1159 #warning finish implementing vkCmdClearDepthStencilImage
1160 assert(!"vkCmdClearDepthStencilImage is not implemented");
1163 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdClearAttachments(VkCommandBuffer commandBuffer
,
1164 uint32_t attachmentCount
,
1165 const VkClearAttachment
*pAttachments
,
1167 const VkClearRect
*pRects
)
1169 #warning finish implementing vkCmdClearAttachments
1170 assert(!"vkCmdClearAttachments is not implemented");
1173 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdResolveImage(VkCommandBuffer commandBuffer
,
1175 VkImageLayout srcImageLayout
,
1177 VkImageLayout dstImageLayout
,
1178 uint32_t regionCount
,
1179 const VkImageResolve
*pRegions
)
1181 #warning finish implementing vkCmdResolveImage
1182 assert(!"vkCmdResolveImage is not implemented");
1185 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdSetEvent(VkCommandBuffer commandBuffer
,
1187 VkPipelineStageFlags stageMask
)
1189 #warning finish implementing vkCmdSetEvent
1190 assert(!"vkCmdSetEvent is not implemented");
1193 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdResetEvent(VkCommandBuffer commandBuffer
,
1195 VkPipelineStageFlags stageMask
)
1197 #warning finish implementing vkCmdResetEvent
1198 assert(!"vkCmdResetEvent is not implemented");
1201 extern "C" VKAPI_ATTR
void VKAPI_CALL
1202 vkCmdWaitEvents(VkCommandBuffer commandBuffer
,
1203 uint32_t eventCount
,
1204 const VkEvent
*pEvents
,
1205 VkPipelineStageFlags srcStageMask
,
1206 VkPipelineStageFlags dstStageMask
,
1207 uint32_t memoryBarrierCount
,
1208 const VkMemoryBarrier
*pMemoryBarriers
,
1209 uint32_t bufferMemoryBarrierCount
,
1210 const VkBufferMemoryBarrier
*pBufferMemoryBarriers
,
1211 uint32_t imageMemoryBarrierCount
,
1212 const VkImageMemoryBarrier
*pImageMemoryBarriers
)
1214 #warning finish implementing vkCmdWaitEvents
1215 assert(!"vkCmdWaitEvents is not implemented");
1218 extern "C" VKAPI_ATTR
void VKAPI_CALL
1219 vkCmdPipelineBarrier(VkCommandBuffer commandBuffer
,
1220 VkPipelineStageFlags srcStageMask
,
1221 VkPipelineStageFlags dstStageMask
,
1222 VkDependencyFlags dependencyFlags
,
1223 uint32_t memoryBarrierCount
,
1224 const VkMemoryBarrier
*pMemoryBarriers
,
1225 uint32_t bufferMemoryBarrierCount
,
1226 const VkBufferMemoryBarrier
*pBufferMemoryBarriers
,
1227 uint32_t imageMemoryBarrierCount
,
1228 const VkImageMemoryBarrier
*pImageMemoryBarriers
)
1230 #warning finish implementing vkCmdPipelineBarrier
1231 assert(!"vkCmdPipelineBarrier is not implemented");
1234 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdBeginQuery(VkCommandBuffer commandBuffer
,
1235 VkQueryPool queryPool
,
1237 VkQueryControlFlags flags
)
1239 #warning finish implementing vkCmdBeginQuery
1240 assert(!"vkCmdBeginQuery is not implemented");
1243 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdEndQuery(VkCommandBuffer commandBuffer
,
1244 VkQueryPool queryPool
,
1247 #warning finish implementing vkCmdEndQuery
1248 assert(!"vkCmdEndQuery is not implemented");
1251 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdResetQueryPool(VkCommandBuffer commandBuffer
,
1252 VkQueryPool queryPool
,
1253 uint32_t firstQuery
,
1254 uint32_t queryCount
)
1256 #warning finish implementing vkCmdResetQueryPool
1257 assert(!"vkCmdResetQueryPool is not implemented");
1260 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdWriteTimestamp(VkCommandBuffer commandBuffer
,
1261 VkPipelineStageFlagBits pipelineStage
,
1262 VkQueryPool queryPool
,
1265 #warning finish implementing vkCmdWriteTimestamp
1266 assert(!"vkCmdWriteTimestamp is not implemented");
1269 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer
,
1270 VkQueryPool queryPool
,
1271 uint32_t firstQuery
,
1272 uint32_t queryCount
,
1274 VkDeviceSize dstOffset
,
1275 VkDeviceSize stride
,
1276 VkQueryResultFlags flags
)
1278 #warning finish implementing vkCmdCopyQueryPoolResults
1279 assert(!"vkCmdCopyQueryPoolResults is not implemented");
1282 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdPushConstants(VkCommandBuffer commandBuffer
,
1283 VkPipelineLayout layout
,
1284 VkShaderStageFlags stageFlags
,
1287 const void *pValues
)
1289 #warning finish implementing vkCmdPushConstants
1290 assert(!"vkCmdPushConstants is not implemented");
1293 extern "C" VKAPI_ATTR
void VKAPI_CALL
1294 vkCmdBeginRenderPass(VkCommandBuffer commandBuffer
,
1295 const VkRenderPassBeginInfo
*pRenderPassBegin
,
1296 VkSubpassContents contents
)
1298 #warning finish implementing vkCmdBeginRenderPass
1299 assert(!"vkCmdBeginRenderPass is not implemented");
1302 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdNextSubpass(VkCommandBuffer commandBuffer
,
1303 VkSubpassContents contents
)
1305 #warning finish implementing vkCmdNextSubpass
1306 assert(!"vkCmdNextSubpass is not implemented");
1309 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdEndRenderPass(VkCommandBuffer commandBuffer
)
1311 #warning finish implementing vkCmdEndRenderPass
1312 assert(!"vkCmdEndRenderPass is not implemented");
1315 extern "C" VKAPI_ATTR
void VKAPI_CALL
vkCmdExecuteCommands(VkCommandBuffer commandBuffer
,
1316 uint32_t commandBufferCount
,
1317 const VkCommandBuffer
*pCommandBuffers
)
1319 #warning finish implementing vkCmdExecuteCommands
1320 assert(!"vkCmdExecuteCommands is not implemented");
1322 namespace vulkan_cpu
1324 namespace vulkan_icd
1326 Vulkan_loader_interface
*Vulkan_loader_interface::get() noexcept
1328 static Vulkan_loader_interface vulkan_loader_interface
{};
1329 return &vulkan_loader_interface
;
1332 PFN_vkVoidFunction
Vulkan_loader_interface::get_procedure_address(
1333 const char *name
, Procedure_address_scope scope
) noexcept
1335 using namespace util::string_view_literals
;
1336 assert(name
!= "vkEnumerateInstanceLayerProperties"_sv
1337 && "shouldn't be called, implemented by the vulkan loader");
1338 assert(name
!= "vkEnumerateDeviceLayerProperties"_sv
1339 && "shouldn't be called, implemented by the vulkan loader");
1341 #define LIBRARY_SCOPE_FUNCTION(function_name) \
1344 if(name == #function_name##_sv) \
1345 return reinterpret_cast<PFN_vkVoidFunction>( \
1346 static_cast<PFN_##function_name>(function_name)); \
1348 #define INSTANCE_SCOPE_FUNCTION(function_name) \
1351 if(scope != Procedure_address_scope::Library && name == #function_name##_sv) \
1352 return reinterpret_cast<PFN_vkVoidFunction>( \
1353 static_cast<PFN_##function_name>(function_name)); \
1356 LIBRARY_SCOPE_FUNCTION(vkEnumerateInstanceExtensionProperties
);
1357 LIBRARY_SCOPE_FUNCTION(vkCreateInstance
);
1358 INSTANCE_SCOPE_FUNCTION(vkDestroyInstance
);
1359 INSTANCE_SCOPE_FUNCTION(vkEnumeratePhysicalDevices
);
1360 INSTANCE_SCOPE_FUNCTION(vkGetPhysicalDeviceFeatures
);
1361 INSTANCE_SCOPE_FUNCTION(vkGetPhysicalDeviceFormatProperties
);
1362 INSTANCE_SCOPE_FUNCTION(vkGetPhysicalDeviceImageFormatProperties
);
1363 INSTANCE_SCOPE_FUNCTION(vkGetPhysicalDeviceProperties
);
1364 INSTANCE_SCOPE_FUNCTION(vkGetPhysicalDeviceQueueFamilyProperties
);
1365 INSTANCE_SCOPE_FUNCTION(vkGetPhysicalDeviceMemoryProperties
);
1366 INSTANCE_SCOPE_FUNCTION(vkGetInstanceProcAddr
);
1367 INSTANCE_SCOPE_FUNCTION(vkGetDeviceProcAddr
);
1368 INSTANCE_SCOPE_FUNCTION(vkCreateDevice
);
1369 INSTANCE_SCOPE_FUNCTION(vkDestroyDevice
);
1370 INSTANCE_SCOPE_FUNCTION(vkEnumerateDeviceExtensionProperties
);
1371 INSTANCE_SCOPE_FUNCTION(vkGetDeviceQueue
);
1372 INSTANCE_SCOPE_FUNCTION(vkQueueSubmit
);
1373 INSTANCE_SCOPE_FUNCTION(vkQueueWaitIdle
);
1374 INSTANCE_SCOPE_FUNCTION(vkDeviceWaitIdle
);
1375 INSTANCE_SCOPE_FUNCTION(vkAllocateMemory
);
1376 INSTANCE_SCOPE_FUNCTION(vkFreeMemory
);
1377 INSTANCE_SCOPE_FUNCTION(vkMapMemory
);
1378 INSTANCE_SCOPE_FUNCTION(vkUnmapMemory
);
1379 INSTANCE_SCOPE_FUNCTION(vkFlushMappedMemoryRanges
);
1380 INSTANCE_SCOPE_FUNCTION(vkInvalidateMappedMemoryRanges
);
1381 INSTANCE_SCOPE_FUNCTION(vkGetDeviceMemoryCommitment
);
1382 INSTANCE_SCOPE_FUNCTION(vkBindBufferMemory
);
1383 INSTANCE_SCOPE_FUNCTION(vkBindImageMemory
);
1384 INSTANCE_SCOPE_FUNCTION(vkGetBufferMemoryRequirements
);
1385 INSTANCE_SCOPE_FUNCTION(vkGetImageMemoryRequirements
);
1386 INSTANCE_SCOPE_FUNCTION(vkGetImageSparseMemoryRequirements
);
1387 INSTANCE_SCOPE_FUNCTION(vkGetPhysicalDeviceSparseImageFormatProperties
);
1388 INSTANCE_SCOPE_FUNCTION(vkQueueBindSparse
);
1389 INSTANCE_SCOPE_FUNCTION(vkCreateFence
);
1390 INSTANCE_SCOPE_FUNCTION(vkDestroyFence
);
1391 INSTANCE_SCOPE_FUNCTION(vkResetFences
);
1392 INSTANCE_SCOPE_FUNCTION(vkGetFenceStatus
);
1393 INSTANCE_SCOPE_FUNCTION(vkWaitForFences
);
1394 INSTANCE_SCOPE_FUNCTION(vkCreateSemaphore
);
1395 INSTANCE_SCOPE_FUNCTION(vkDestroySemaphore
);
1396 INSTANCE_SCOPE_FUNCTION(vkCreateEvent
);
1397 INSTANCE_SCOPE_FUNCTION(vkDestroyEvent
);
1398 INSTANCE_SCOPE_FUNCTION(vkGetEventStatus
);
1399 INSTANCE_SCOPE_FUNCTION(vkSetEvent
);
1400 INSTANCE_SCOPE_FUNCTION(vkResetEvent
);
1401 INSTANCE_SCOPE_FUNCTION(vkCreateQueryPool
);
1402 INSTANCE_SCOPE_FUNCTION(vkDestroyQueryPool
);
1403 INSTANCE_SCOPE_FUNCTION(vkGetQueryPoolResults
);
1404 INSTANCE_SCOPE_FUNCTION(vkCreateBuffer
);
1405 INSTANCE_SCOPE_FUNCTION(vkDestroyBuffer
);
1406 INSTANCE_SCOPE_FUNCTION(vkCreateBufferView
);
1407 INSTANCE_SCOPE_FUNCTION(vkDestroyBufferView
);
1408 INSTANCE_SCOPE_FUNCTION(vkCreateImage
);
1409 INSTANCE_SCOPE_FUNCTION(vkDestroyImage
);
1410 INSTANCE_SCOPE_FUNCTION(vkGetImageSubresourceLayout
);
1411 INSTANCE_SCOPE_FUNCTION(vkCreateImageView
);
1412 INSTANCE_SCOPE_FUNCTION(vkDestroyImageView
);
1413 INSTANCE_SCOPE_FUNCTION(vkCreateShaderModule
);
1414 INSTANCE_SCOPE_FUNCTION(vkDestroyShaderModule
);
1415 INSTANCE_SCOPE_FUNCTION(vkCreatePipelineCache
);
1416 INSTANCE_SCOPE_FUNCTION(vkDestroyPipelineCache
);
1417 INSTANCE_SCOPE_FUNCTION(vkGetPipelineCacheData
);
1418 INSTANCE_SCOPE_FUNCTION(vkMergePipelineCaches
);
1419 INSTANCE_SCOPE_FUNCTION(vkCreateGraphicsPipelines
);
1420 INSTANCE_SCOPE_FUNCTION(vkCreateComputePipelines
);
1421 INSTANCE_SCOPE_FUNCTION(vkDestroyPipeline
);
1422 INSTANCE_SCOPE_FUNCTION(vkCreatePipelineLayout
);
1423 INSTANCE_SCOPE_FUNCTION(vkDestroyPipelineLayout
);
1424 INSTANCE_SCOPE_FUNCTION(vkCreateSampler
);
1425 INSTANCE_SCOPE_FUNCTION(vkDestroySampler
);
1426 INSTANCE_SCOPE_FUNCTION(vkCreateDescriptorSetLayout
);
1427 INSTANCE_SCOPE_FUNCTION(vkDestroyDescriptorSetLayout
);
1428 INSTANCE_SCOPE_FUNCTION(vkCreateDescriptorPool
);
1429 INSTANCE_SCOPE_FUNCTION(vkDestroyDescriptorPool
);
1430 INSTANCE_SCOPE_FUNCTION(vkResetDescriptorPool
);
1431 INSTANCE_SCOPE_FUNCTION(vkAllocateDescriptorSets
);
1432 INSTANCE_SCOPE_FUNCTION(vkFreeDescriptorSets
);
1433 INSTANCE_SCOPE_FUNCTION(vkUpdateDescriptorSets
);
1434 INSTANCE_SCOPE_FUNCTION(vkCreateFramebuffer
);
1435 INSTANCE_SCOPE_FUNCTION(vkDestroyFramebuffer
);
1436 INSTANCE_SCOPE_FUNCTION(vkCreateRenderPass
);
1437 INSTANCE_SCOPE_FUNCTION(vkDestroyRenderPass
);
1438 INSTANCE_SCOPE_FUNCTION(vkGetRenderAreaGranularity
);
1439 INSTANCE_SCOPE_FUNCTION(vkCreateCommandPool
);
1440 INSTANCE_SCOPE_FUNCTION(vkDestroyCommandPool
);
1441 INSTANCE_SCOPE_FUNCTION(vkResetCommandPool
);
1442 INSTANCE_SCOPE_FUNCTION(vkAllocateCommandBuffers
);
1443 INSTANCE_SCOPE_FUNCTION(vkFreeCommandBuffers
);
1444 INSTANCE_SCOPE_FUNCTION(vkBeginCommandBuffer
);
1445 INSTANCE_SCOPE_FUNCTION(vkEndCommandBuffer
);
1446 INSTANCE_SCOPE_FUNCTION(vkResetCommandBuffer
);
1447 INSTANCE_SCOPE_FUNCTION(vkCmdBindPipeline
);
1448 INSTANCE_SCOPE_FUNCTION(vkCmdSetViewport
);
1449 INSTANCE_SCOPE_FUNCTION(vkCmdSetScissor
);
1450 INSTANCE_SCOPE_FUNCTION(vkCmdSetLineWidth
);
1451 INSTANCE_SCOPE_FUNCTION(vkCmdSetDepthBias
);
1452 INSTANCE_SCOPE_FUNCTION(vkCmdSetBlendConstants
);
1453 INSTANCE_SCOPE_FUNCTION(vkCmdSetDepthBounds
);
1454 INSTANCE_SCOPE_FUNCTION(vkCmdSetStencilCompareMask
);
1455 INSTANCE_SCOPE_FUNCTION(vkCmdSetStencilWriteMask
);
1456 INSTANCE_SCOPE_FUNCTION(vkCmdSetStencilReference
);
1457 INSTANCE_SCOPE_FUNCTION(vkCmdBindDescriptorSets
);
1458 INSTANCE_SCOPE_FUNCTION(vkCmdBindIndexBuffer
);
1459 INSTANCE_SCOPE_FUNCTION(vkCmdBindVertexBuffers
);
1460 INSTANCE_SCOPE_FUNCTION(vkCmdDraw
);
1461 INSTANCE_SCOPE_FUNCTION(vkCmdDrawIndexed
);
1462 INSTANCE_SCOPE_FUNCTION(vkCmdDrawIndirect
);
1463 INSTANCE_SCOPE_FUNCTION(vkCmdDrawIndexedIndirect
);
1464 INSTANCE_SCOPE_FUNCTION(vkCmdDispatch
);
1465 INSTANCE_SCOPE_FUNCTION(vkCmdDispatchIndirect
);
1466 INSTANCE_SCOPE_FUNCTION(vkCmdCopyBuffer
);
1467 INSTANCE_SCOPE_FUNCTION(vkCmdCopyImage
);
1468 INSTANCE_SCOPE_FUNCTION(vkCmdBlitImage
);
1469 INSTANCE_SCOPE_FUNCTION(vkCmdCopyBufferToImage
);
1470 INSTANCE_SCOPE_FUNCTION(vkCmdCopyImageToBuffer
);
1471 INSTANCE_SCOPE_FUNCTION(vkCmdUpdateBuffer
);
1472 INSTANCE_SCOPE_FUNCTION(vkCmdFillBuffer
);
1473 INSTANCE_SCOPE_FUNCTION(vkCmdClearColorImage
);
1474 INSTANCE_SCOPE_FUNCTION(vkCmdClearDepthStencilImage
);
1475 INSTANCE_SCOPE_FUNCTION(vkCmdClearAttachments
);
1476 INSTANCE_SCOPE_FUNCTION(vkCmdResolveImage
);
1477 INSTANCE_SCOPE_FUNCTION(vkCmdSetEvent
);
1478 INSTANCE_SCOPE_FUNCTION(vkCmdResetEvent
);
1479 INSTANCE_SCOPE_FUNCTION(vkCmdWaitEvents
);
1480 INSTANCE_SCOPE_FUNCTION(vkCmdPipelineBarrier
);
1481 INSTANCE_SCOPE_FUNCTION(vkCmdBeginQuery
);
1482 INSTANCE_SCOPE_FUNCTION(vkCmdEndQuery
);
1483 INSTANCE_SCOPE_FUNCTION(vkCmdResetQueryPool
);
1484 INSTANCE_SCOPE_FUNCTION(vkCmdWriteTimestamp
);
1485 INSTANCE_SCOPE_FUNCTION(vkCmdCopyQueryPoolResults
);
1486 INSTANCE_SCOPE_FUNCTION(vkCmdPushConstants
);
1487 INSTANCE_SCOPE_FUNCTION(vkCmdBeginRenderPass
);
1488 INSTANCE_SCOPE_FUNCTION(vkCmdNextSubpass
);
1489 INSTANCE_SCOPE_FUNCTION(vkCmdEndRenderPass
);
1490 INSTANCE_SCOPE_FUNCTION(vkCmdExecuteCommands
);
1492 #undef LIBRARY_SCOPE_FUNCTION
1493 #undef INSTANCE_SCOPE_FUNCTION
1497 PFN_vkVoidFunction
Vulkan_loader_interface::get_instance_proc_addr(VkInstance instance
,
1498 const char *name
) noexcept
1501 return get_procedure_address(name
, Procedure_address_scope::Library
);
1502 return get_procedure_address(name
, Procedure_address_scope::Instance
);
1505 VkResult
Vulkan_loader_interface::create_instance(const VkInstanceCreateInfo
*create_info
,
1506 const VkAllocationCallbacks
*allocator
,
1507 VkInstance
*instance
) noexcept
1509 validate_allocator(allocator
);
1510 assert(create_info
);
1512 return catch_exceptions_and_return_result(
1515 auto create_result
= vulkan::Vulkan_instance::create(*create_info
);
1516 if(util::holds_alternative
<VkResult
>(create_result
))
1517 return util::get
<VkResult
>(create_result
);
1518 *instance
= move_to_handle(
1519 util::get
<std::unique_ptr
<vulkan::Vulkan_instance
>>(std::move(create_result
)));
1524 VkResult
Vulkan_loader_interface::enumerate_instance_extension_properties(
1525 const char *layer_name
, uint32_t *property_count
, VkExtensionProperties
*properties
) noexcept
1527 assert(layer_name
== nullptr);
1528 static constexpr std::initializer_list
<VkExtensionProperties
> extensions
= {};
1529 return vulkan_enumerate_list_helper(property_count
, properties
, extensions
);
1532 VkResult
Vulkan_loader_interface::enumerate_device_extension_properties(
1533 VkPhysicalDevice physical_device
,
1534 const char *layer_name
,
1535 uint32_t *property_count
,
1536 VkExtensionProperties
*properties
) noexcept
1538 assert(layer_name
== nullptr);
1539 assert(physical_device
!= nullptr);
1540 static constexpr std::initializer_list
<VkExtensionProperties
> extensions
= {};
1541 return vulkan_enumerate_list_helper(property_count
, properties
, extensions
);
1545 void vulkan_icd::print_exception(std::exception
&e
) noexcept
1547 std::cerr
<< "error: " << e
.what() << std::endl
;