14#include "third_party/swiftshader/include/vulkan/vulkan_core.h"
15#include "vulkan/vulkan.hpp"
23struct MockCommandBuffer {
25 std::shared_ptr<std::vector<std::string>> called_functions)
30struct MockQueryPool {};
32struct MockCommandPool {};
34struct MockDescriptorPool {};
36struct MockSurfaceKHR {};
40struct MockSwapchainKHR {
45struct MockSemaphore {};
47struct MockFramebuffer {};
51class MockDevice final {
55 MockCommandBuffer* NewCommandBuffer() {
58 Lock lock(command_buffers_mutex_);
59 command_buffers_.emplace_back(std::move(
buffer));
63 MockCommandPool* NewCommandPool() {
64 auto pool = std::make_unique<MockCommandPool>();
66 Lock lock(commmand_pools_mutex_);
67 command_pools_.emplace_back(std::move(
pool));
71 void DeleteCommandPool(MockCommandPool*
pool) {
72 Lock lock(commmand_pools_mutex_);
73 auto it = std::find_if(command_pools_.begin(), command_pools_.end(),
74 [
pool](
const std::unique_ptr<MockCommandPool>&
p) {
75 return p.get() == pool;
77 if (it != command_pools_.end()) {
78 command_pools_.erase(it);
82 const std::shared_ptr<std::vector<std::string>>& GetCalledFunctions() {
86 void AddCalledFunction(
const std::string&
function) {
87 Lock lock(called_functions_mutex_);
92 MockDevice(
const MockDevice&) =
delete;
94 MockDevice& operator=(
const MockDevice&) =
delete;
96 Mutex called_functions_mutex_;
98 called_functions_mutex_);
100 Mutex command_buffers_mutex_;
101 std::vector<std::unique_ptr<MockCommandBuffer>> command_buffers_
104 Mutex commmand_pools_mutex_;
105 std::vector<std::unique_ptr<MockCommandPool>> command_pools_
IPLR_GUARDED_BY(
106 commmand_pools_mutex_);
111static thread_local std::vector<std::string> g_instance_extensions;
114 const char* pLayerName,
115 uint32_t* pPropertyCount,
118 *pPropertyCount = g_instance_extensions.size();
121 for (
const std::string&
ext : g_instance_extensions) {
122 strncpy(pProperties[
count].extensionName,
ext.c_str(),
131static thread_local std::vector<std::string> g_instance_layers;
136 *pPropertyCount = g_instance_layers.size();
139 for (
const std::string& layer : g_instance_layers) {
140 strncpy(pProperties[
count].layerName, layer.c_str(),
150 uint32_t* pPhysicalDeviceCount,
151 VkPhysicalDevice* pPhysicalDevices) {
152 if (!pPhysicalDevices) {
153 *pPhysicalDeviceCount = 1;
155 pPhysicalDevices[0] =
reinterpret_cast<VkPhysicalDevice
>(0xfeedface);
160static thread_local std::function<void(VkPhysicalDevice physicalDevice,
163 g_format_properties_callback;
166 VkPhysicalDevice physicalDevice,
169 g_format_properties_callback(physicalDevice,
format, pFormatProperties);
182 VkPhysicalDevice physicalDevice,
183 uint32_t* pQueueFamilyPropertyCount,
185 if (!pQueueFamilyProperties) {
186 *pQueueFamilyPropertyCount = 1;
195 VkPhysicalDevice physicalDevice,
196 const char* pLayerName,
197 uint32_t* pPropertyCount,
202 strcpy(pProperties[0].extensionName,
"VK_KHR_swapchain");
212 *pDevice =
reinterpret_cast<VkDevice
>(
new MockDevice());
218 VkInstance* pInstance) {
219 *pInstance =
reinterpret_cast<VkInstance
>(0xbaadf00d);
224 VkPhysicalDevice physicalDevice,
245 VkPipelineCache* pPipelineCache) {
246 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
247 mock_device->AddCalledFunction(
"vkCreatePipelineCache");
248 *pPipelineCache =
reinterpret_cast<VkPipelineCache
>(0xb000dead);
255 VkCommandPool* pCommandPool) {
256 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
257 mock_device->AddCalledFunction(
"vkCreateCommandPool");
259 reinterpret_cast<VkCommandPool
>(mock_device->NewCommandPool());
264 VkCommandPool commandPool,
272 VkCommandBuffer* pCommandBuffers) {
273 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
274 mock_device->AddCalledFunction(
"vkAllocateCommandBuffers");
276 reinterpret_cast<VkCommandBuffer
>(mock_device->NewCommandBuffer());
289 *pImage =
reinterpret_cast<VkImage
>(0xD0D0CACA);
304 VkDeviceMemory* pMemory) {
305 *pMemory =
reinterpret_cast<VkDeviceMemory
>(0xCAFEB0BA);
311 VkDeviceMemory memory,
319 VkImageView* pView) {
320 *pView =
reinterpret_cast<VkImageView
>(0xFEE1DEAD);
328 *pBuffer =
reinterpret_cast<VkBuffer
>(0xDEADDEAD);
342 VkDeviceMemory memory,
350 VkRenderPass* pRenderPass) {
351 *pRenderPass =
reinterpret_cast<VkRenderPass
>(0x12341234);
352 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
353 mock_device->AddCalledFunction(
"vkCreateRenderPass");
361 VkDescriptorSetLayout* pSetLayout) {
362 *pSetLayout =
reinterpret_cast<VkDescriptorSetLayout
>(0x77777777);
369 VkPipelineLayout* pPipelineLayout) {
370 *pPipelineLayout =
reinterpret_cast<VkPipelineLayout
>(0x88888888);
376 VkPipelineCache pipelineCache,
377 uint32_t createInfoCount,
380 VkPipeline* pPipelines) {
381 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
382 mock_device->AddCalledFunction(
"vkCreateGraphicsPipelines");
383 *pPipelines =
reinterpret_cast<VkPipeline
>(0x99999999);
388 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
389 mock_device->AddCalledFunction(
"vkDestroyDevice");
390 delete reinterpret_cast<MockDevice*
>(
device);
396 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
397 mock_device->AddCalledFunction(
"vkDestroyPipeline");
403 VkShaderModule* pShaderModule) {
404 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
405 mock_device->AddCalledFunction(
"vkCreateShaderModule");
406 *pShaderModule =
reinterpret_cast<VkShaderModule
>(0x11111111);
411 VkShaderModule shaderModule,
413 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
414 mock_device->AddCalledFunction(
"vkDestroyShaderModule");
418 VkPipelineCache pipelineCache,
420 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
421 mock_device->AddCalledFunction(
"vkDestroyPipelineCache");
432 VkPipeline pipeline) {
433 MockCommandBuffer* mock_command_buffer =
434 reinterpret_cast<MockCommandBuffer*
>(commandBuffer);
435 mock_command_buffer->called_functions_->push_back(
"vkCmdBindPipeline");
440 uint32_t reference) {
441 MockCommandBuffer* mock_command_buffer =
442 reinterpret_cast<MockCommandBuffer*
>(commandBuffer);
443 mock_command_buffer->called_functions_->push_back(
"vkCmdSetStencilReference");
447 uint32_t firstScissor,
448 uint32_t scissorCount,
450 MockCommandBuffer* mock_command_buffer =
451 reinterpret_cast<MockCommandBuffer*
>(commandBuffer);
452 mock_command_buffer->called_functions_->push_back(
"vkCmdSetScissor");
456 uint32_t firstViewport,
457 uint32_t viewportCount,
459 MockCommandBuffer* mock_command_buffer =
460 reinterpret_cast<MockCommandBuffer*
>(commandBuffer);
461 mock_command_buffer->called_functions_->push_back(
"vkCmdSetViewport");
465 VkCommandPool commandPool,
466 uint32_t commandBufferCount,
467 const VkCommandBuffer* pCommandBuffers) {
468 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
469 mock_device->AddCalledFunction(
"vkFreeCommandBuffers");
473 VkCommandPool commandPool,
475 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
476 mock_device->DeleteCommandPool(
477 reinterpret_cast<MockCommandPool*
>(commandPool));
478 mock_device->AddCalledFunction(
"vkDestroyCommandPool");
489 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
490 *pFence =
reinterpret_cast<VkFence
>(
new MockFence());
497 delete reinterpret_cast<MockFence*
>(fence);
502 uint32_t submitCount,
510 const VkFence* pFences,
517 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
518 MockFence* mock_fence =
reinterpret_cast<MockFence*
>(fence);
519 return mock_fence->GetStatus();
524 const VkFence* fences) {
532 VkDebugUtilsMessengerEXT* pMessenger) {
545 VkQueryPool* pQueryPool) {
546 *pQueryPool =
reinterpret_cast<VkQueryPool
>(
new MockQueryPool());
547 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
548 mock_device->AddCalledFunction(
"vkCreateQueryPool");
553 VkQueryPool queryPool,
555 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
556 mock_device->AddCalledFunction(
"vkDestroyQueryPool");
557 delete reinterpret_cast<MockQueryPool*
>(queryPool);
561 VkQueryPool queryPool,
568 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
569 if (dataSize ==
sizeof(uint32_t)) {
570 uint32_t*
data =
static_cast<uint32_t*
>(pData);
571 for (
auto i = firstQuery;
i < queryCount;
i++) {
574 }
else if (dataSize ==
sizeof(int64_t)) {
575 uint64_t*
data =
static_cast<uint64_t*
>(pData);
576 for (
auto i = firstQuery;
i < queryCount;
i++) {
580 mock_device->AddCalledFunction(
"vkGetQueryPoolResults");
587 VkDescriptorPool* pDescriptorPool) {
588 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
590 reinterpret_cast<VkDescriptorPool
>(
new MockDescriptorPool());
591 mock_device->AddCalledFunction(
"vkCreateDescriptorPool");
596 VkDescriptorPool descriptorPool,
598 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
599 mock_device->AddCalledFunction(
"vkDestroyDescriptorPool");
600 delete reinterpret_cast<MockDescriptorPool*
>(descriptorPool);
604 VkDescriptorPool descriptorPool,
606 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
607 mock_device->AddCalledFunction(
"vkResetDescriptorPool");
614 VkDescriptorSet* pDescriptorSets) {
615 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
616 mock_device->AddCalledFunction(
"vkAllocateDescriptorSets");
621 VkPhysicalDevice physicalDevice,
623 uint32_t* pSurfaceFormatCount,
625 *pSurfaceFormatCount = 1u;
626 if (pSurfaceFormats !=
nullptr) {
635 VkPhysicalDevice physicalDevice,
643 .
width =
static_cast<uint32_t
>(currentImageSize.width),
644 .
height =
static_cast<uint32_t
>(currentImageSize.height),
653 .
width =
static_cast<uint32_t
>(currentImageSize.width),
654 .
height =
static_cast<uint32_t
>(currentImageSize.height),
656 .maxImageArrayLayers = 1,
657 .supportedTransforms =
663 .supportedUsageFlags =
669 uint32_t queueFamilyIndex,
679 VkSwapchainKHR* pSwapchain) {
680 *pSwapchain =
reinterpret_cast<VkSwapchainKHR
>(
new MockSwapchainKHR());
687 delete reinterpret_cast<MockSwapchainKHR*
>(
swapchain);
692 uint32_t* pSwapchainImageCount,
693 VkImage* pSwapchainImages) {
694 MockSwapchainKHR* mock_swapchain =
695 reinterpret_cast<MockSwapchainKHR*
>(
swapchain);
696 auto&
images = mock_swapchain->images;
697 *pSwapchainImageCount =
images.size();
698 if (pSwapchainImages !=
nullptr) {
699 for (
size_t i = 0;
i <
images.size();
i++) {
700 pSwapchainImages[
i] =
reinterpret_cast<VkImage
>(&
images[
i]);
709 VkSemaphore* pSemaphore) {
710 *pSemaphore =
reinterpret_cast<VkSemaphore
>(
new MockSemaphore());
715 VkSemaphore semaphore,
717 delete reinterpret_cast<MockSemaphore*
>(semaphore);
723 VkSemaphore semaphore,
725 uint32_t* pImageIndex) {
728 *pImageIndex = (current_index + 1) % 3u;
735 VkFramebuffer* pFramebuffer) {
736 *pFramebuffer =
reinterpret_cast<VkFramebuffer
>(
new MockFramebuffer());
741 VkFramebuffer framebuffer,
743 delete reinterpret_cast<MockFramebuffer*
>(framebuffer);
748 if (strcmp(
"vkEnumerateInstanceExtensionProperties", pName) == 0) {
750 }
else if (strcmp(
"vkEnumerateInstanceLayerProperties", pName) == 0) {
752 }
else if (strcmp(
"vkEnumeratePhysicalDevices", pName) == 0) {
754 }
else if (strcmp(
"vkGetPhysicalDeviceFormatProperties", pName) == 0) {
756 }
else if (strcmp(
"vkGetPhysicalDeviceProperties", pName) == 0) {
758 }
else if (strcmp(
"vkGetPhysicalDeviceQueueFamilyProperties", pName) == 0) {
760 }
else if (strcmp(
"vkEnumerateDeviceExtensionProperties", pName) == 0) {
762 }
else if (strcmp(
"vkCreateDevice", pName) == 0) {
764 }
else if (strcmp(
"vkCreateInstance", pName) == 0) {
766 }
else if (strcmp(
"vkGetPhysicalDeviceMemoryProperties", pName) == 0) {
768 }
else if (strcmp(
"vkCreatePipelineCache", pName) == 0) {
770 }
else if (strcmp(
"vkCreateCommandPool", pName) == 0) {
772 }
else if (strcmp(
"vkResetCommandPool", pName) == 0) {
774 }
else if (strcmp(
"vkAllocateCommandBuffers", pName) == 0) {
776 }
else if (strcmp(
"vkBeginCommandBuffer", pName) == 0) {
778 }
else if (strcmp(
"vkCreateImage", pName) == 0) {
780 }
else if (strcmp(
"vkGetInstanceProcAddr", pName) == 0) {
782 }
else if (strcmp(
"vkGetDeviceProcAddr", pName) == 0) {
784 }
else if (strcmp(
"vkGetImageMemoryRequirements2KHR", pName) == 0 ||
785 strcmp(
"vkGetImageMemoryRequirements2", pName) == 0) {
787 }
else if (strcmp(
"vkAllocateMemory", pName) == 0) {
789 }
else if (strcmp(
"vkBindImageMemory", pName) == 0) {
791 }
else if (strcmp(
"vkCreateImageView", pName) == 0) {
793 }
else if (strcmp(
"vkCreateBuffer", pName) == 0) {
795 }
else if (strcmp(
"vkGetBufferMemoryRequirements2KHR", pName) == 0 ||
796 strcmp(
"vkGetBufferMemoryRequirements2", pName) == 0) {
798 }
else if (strcmp(
"vkBindBufferMemory", pName) == 0) {
800 }
else if (strcmp(
"vkCreateRenderPass", pName) == 0) {
802 }
else if (strcmp(
"vkCreateDescriptorSetLayout", pName) == 0) {
804 }
else if (strcmp(
"vkCreatePipelineLayout", pName) == 0) {
806 }
else if (strcmp(
"vkCreateGraphicsPipelines", pName) == 0) {
808 }
else if (strcmp(
"vkDestroyDevice", pName) == 0) {
810 }
else if (strcmp(
"vkDestroyPipeline", pName) == 0) {
812 }
else if (strcmp(
"vkCreateShaderModule", pName) == 0) {
814 }
else if (strcmp(
"vkDestroyShaderModule", pName) == 0) {
816 }
else if (strcmp(
"vkDestroyPipelineCache", pName) == 0) {
818 }
else if (strcmp(
"vkCmdBindPipeline", pName) == 0) {
820 }
else if (strcmp(
"vkCmdSetStencilReference", pName) == 0) {
822 }
else if (strcmp(
"vkCmdSetScissor", pName) == 0) {
824 }
else if (strcmp(
"vkCmdSetViewport", pName) == 0) {
826 }
else if (strcmp(
"vkDestroyCommandPool", pName) == 0) {
828 }
else if (strcmp(
"vkFreeCommandBuffers", pName) == 0) {
830 }
else if (strcmp(
"vkEndCommandBuffer", pName) == 0) {
832 }
else if (strcmp(
"vkCreateFence", pName) == 0) {
834 }
else if (strcmp(
"vkDestroyFence", pName) == 0) {
836 }
else if (strcmp(
"vkQueueSubmit", pName) == 0) {
838 }
else if (strcmp(
"vkWaitForFences", pName) == 0) {
840 }
else if (strcmp(
"vkGetFenceStatus", pName) == 0) {
842 }
else if (strcmp(
"vkResetFences", pName) == 0) {
844 }
else if (strcmp(
"vkCreateDebugUtilsMessengerEXT", pName) == 0) {
846 }
else if (strcmp(
"vkSetDebugUtilsObjectNameEXT", pName) == 0) {
848 }
else if (strcmp(
"vkCreateQueryPool", pName) == 0) {
850 }
else if (strcmp(
"vkDestroyQueryPool", pName) == 0) {
852 }
else if (strcmp(
"vkGetQueryPoolResults", pName) == 0) {
854 }
else if (strcmp(
"vkCreateDescriptorPool", pName) == 0) {
856 }
else if (strcmp(
"vkDestroyDescriptorPool", pName) == 0) {
858 }
else if (strcmp(
"vkResetDescriptorPool", pName) == 0) {
860 }
else if (strcmp(
"vkAllocateDescriptorSets", pName) == 0) {
862 }
else if (strcmp(
"vkGetPhysicalDeviceSurfaceFormatsKHR", pName) == 0) {
864 }
else if (strcmp(
"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", pName) == 0) {
866 }
else if (strcmp(
"vkGetPhysicalDeviceSurfaceSupportKHR", pName) == 0) {
868 }
else if (strcmp(
"vkCreateSwapchainKHR", pName) == 0) {
870 }
else if (strcmp(
"vkDestroySwapchainKHR", pName) == 0) {
872 }
else if (strcmp(
"vkGetSwapchainImagesKHR", pName) == 0) {
874 }
else if (strcmp(
"vkCreateSemaphore", pName) == 0) {
876 }
else if (strcmp(
"vkDestroySemaphore", pName) == 0) {
878 }
else if (strcmp(
"vkDestroySurfaceKHR", pName) == 0) {
880 }
else if (strcmp(
"vkAcquireNextImageKHR", pName) == 0) {
882 }
else if (strcmp(
"vkCreateFramebuffer", pName) == 0) {
884 }
else if (strcmp(
"vkDestroyFramebuffer", pName) == 0) {
893 : instance_extensions_({
"VK_KHR_surface",
"VK_MVK_macos_surface"}),
894 format_properties_callback_([](VkPhysicalDevice physicalDevice,
900 vk::FormatFeatureFlagBits::eColorAttachment);
904 vk::FormatFeatureFlagBits::eDepthStencilAttachment);
908 vk::FormatFeatureFlagBits::eDepthStencilAttachment);
915 settings.proc_address_callback = GetMockVulkanProcAddress;
916 if (settings_callback_) {
919 g_instance_extensions = instance_extensions_;
920 g_instance_layers = instance_layers_;
921 g_format_properties_callback = format_properties_callback_;
928 MockDevice* mock_device =
reinterpret_cast<MockDevice*
>(
device);
929 return mock_device->GetCalledFunctions();
933 currentImageSize =
size;
static std::shared_ptr< ConcurrentMessageLoop > Create(size_t worker_count=std::thread::hardware_concurrency())
static std::shared_ptr< ContextVK > Create(Settings settings)
MockCommandBuffer(std::weak_ptr< const Context > context)
std::shared_ptr< ContextVK > Build()
Create a Vulkan context with Vulkan functions mocked. The caller is given a chance to tinker on the s...
MockVulkanContextBuilder()
FlutterSemanticsFlag flags
uint32_t uint32_t * format
Dart_NativeFunction function
std::shared_ptr< std::vector< std::string > > called_functions_
std::array< MockImage, 3 > images
sk_sp< const SkImage > image
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
std::shared_ptr< std::vector< std::string > > GetMockVulkanFunctions(VkDevice device)
void SetSwapchainImageSize(ISize size)
Override the image size returned by all swapchain images.
static std::unordered_map< const ContextVK *, std::vector< std::weak_ptr< CommandPoolVK > > > g_all_pools_map IPLR_GUARDED_BY(g_all_pools_map_mutex)
def timeout(deadline, cmd)
char extensionName[VK_MAX_EXTENSION_NAME_SIZE]
char layerName[VK_MAX_EXTENSION_NAME_SIZE]
VkMemoryRequirements memoryRequirements
VkMemoryPropertyFlags propertyFlags
uint32_t maxImageDimension2D
VkSampleCountFlags framebufferColorSampleCounts
VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS]
VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]
VkPhysicalDeviceLimits limits
std::shared_ptr< const fml::Mapping > data
VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain)
VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator)
VkFlags VkSampleCountFlags
VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence)
VKAPI_ATTR VkResult VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore)
VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks *pAllocator)
@ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
@ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
@ VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
VKAPI_ATTR void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
VKAPI_ATTR void VKAPI_CALL vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool)
VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets)
VKAPI_ATTR VkResult VKAPI_CALL vkSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT *pNameInfo)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage)
VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout)
VkFlags VkStencilFaceFlags
VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements)
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties *pFormatProperties)
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties)
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties *pMemoryProperties)
VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags)
@ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
@ VK_MEMORY_HEAP_DEVICE_LOCAL_BIT
VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool)
@ VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineCache *pPipelineCache)
VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference)
VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
VkFlags VkCommandPoolResetFlags
VkFlags VkFormatFeatureFlags
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 *pSupported)
VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout)
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool)
VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugUtilsMessengerEXT *pMessenger)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass)
VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence)
VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements)
VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImageView *pView)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFramebuffer *pFramebuffer)
VkFlags VkQueryResultFlags
VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers)
@ VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats)
void(VKAPI_PTR * PFN_vkVoidFunction)(void)
VKAPI_ATTR void VKAPI_CALL vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors)
VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *pPropertyCount, VkLayerProperties *pProperties)
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties)
VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void *pData, VkDeviceSize stride, VkQueryResultFlags flags)
@ VK_FORMAT_R8G8B8A8_UNORM
@ VK_FORMAT_D32_SFLOAT_S8_UINT
VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkShaderModule *pShaderModule)
VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks *pAllocator)
VkFlags VkDescriptorPoolResetFlags
@ VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
VKAPI_ATTR void VKAPI_CALL vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *pViewports)
VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer)
VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages)
VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineLayout *pPipelineLayout)
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus(VkDevice device, VkFence fence)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice)
VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo)