| /* |
| * Copyright 2015, The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| * |
| * THIS FILE WAS GENERATED BY apic. DO NOT EDIT. |
| */ |
| |
| |
| #include "vulkan_types.h" |
| #include "vulkan_spy.h" |
| #include "vulkan_exports.h" |
| #include "spy.h" |
| |
| #include <gapic/get_vulkan_proc_address.h> |
| #include <gapic/lock.h> |
| #include <gapic/log.h> |
| #include <gapic/target.h> // STDCALL |
| |
| #include <memory> |
| |
| #include <cstring> |
| |
| using namespace gapii; |
| |
| namespace gapii { |
| VKAPI_ATTR uint32_t VKAPI_CALL vkGetSwapchainGrallocUsageANDROID(VkDevice device, uint32_t format, VkImageUsageFlags imageUsage, int* grallocUsage) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetSwapchainGrallocUsageANDROID(%zu, %u, %" PRIu32 ", %p)", device, format, imageUsage, grallocUsage); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetSwapchainGrallocUsageANDROID"); |
| auto _result_ = s->vkGetSwapchainGrallocUsageANDROID(&observer, device, format, imageUsage, grallocUsage); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkAcquireImageANDROID(VkDevice device, VkImage image, int nativeFenceFd, VkSemaphore semaphore, VkFence fence) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkAcquireImageANDROID(%zu, %" PRIu64 ", %d, %" PRIu64 ", %" PRIu64 ")", device, image, nativeFenceFd, semaphore, fence); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkAcquireImageANDROID"); |
| auto _result_ = s->vkAcquireImageANDROID(&observer, device, image, nativeFenceFd, semaphore, fence); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char* pName) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetDeviceProcAddr(%zu, %s)", device, pName); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return nullptr; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetDeviceProcAddr"); |
| auto _result_ = s->vkGetDeviceProcAddr(&observer, device, pName); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyDevice(%zu, %p)", device, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyDevice"); |
| s->vkDestroyDevice(&observer, device, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetDeviceQueue(%zu, %" PRIu32 ", %" PRIu32 ", %p)", device, queueFamilyIndex, queueIndex, pQueue); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetDeviceQueue"); |
| s->vkGetDeviceQueue(&observer, device, queueFamilyIndex, queueIndex, pQueue); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkDeviceWaitIdle(VkDevice device) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDeviceWaitIdle(%zu)", device); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDeviceWaitIdle"); |
| auto _result_ = s->vkDeviceWaitIdle(&observer, device); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkAllocateMemory(VkDevice device, VkMemoryAllocateInfo* pAllocateInfo, VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkAllocateMemory(%zu, %p, %p, %p)", device, pAllocateInfo, pAllocator, pMemory); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkAllocateMemory"); |
| auto _result_ = s->vkAllocateMemory(&observer, device, pAllocateInfo, pAllocator, pMemory); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkFreeMemory(VkDevice device, VkDeviceMemory memory, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkFreeMemory(%zu, %" PRIu64 ", %p)", device, memory, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkFreeMemory"); |
| s->vkFreeMemory(&observer, device, memory, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkMapMemory(%zu, %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu32 ", %p)", device, memory, offset, size, flags, ppData); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkMapMemory"); |
| auto _result_ = s->vkMapMemory(&observer, device, memory, offset, size, flags, ppData); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkUnmapMemory(VkDevice device, VkDeviceMemory memory) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkUnmapMemory(%zu, %" PRIu64 ")", device, memory); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkUnmapMemory"); |
| s->vkUnmapMemory(&observer, device, memory); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, VkMappedMemoryRange* pMemoryRanges) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkFlushMappedMemoryRanges(%zu, %" PRIu32 ", %p)", device, memoryRangeCount, pMemoryRanges); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkFlushMappedMemoryRanges"); |
| auto _result_ = s->vkFlushMappedMemoryRanges(&observer, device, memoryRangeCount, pMemoryRanges); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, VkMappedMemoryRange* pMemoryRanges) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkInvalidateMappedMemoryRanges(%zu, %" PRIu32 ", %p)", device, memoryRangeCount, pMemoryRanges); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkInvalidateMappedMemoryRanges"); |
| auto _result_ = s->vkInvalidateMappedMemoryRanges(&observer, device, memoryRangeCount, pMemoryRanges); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetDeviceMemoryCommitment(%zu, %" PRIu64 ", %p)", device, memory, pCommittedMemoryInBytes); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetDeviceMemoryCommitment"); |
| s->vkGetDeviceMemoryCommitment(&observer, device, memory, pCommittedMemoryInBytes); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkBindBufferMemory(%zu, %" PRIu64 ", %" PRIu64 ", %" PRIu64 ")", device, buffer, memory, memoryOffset); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkBindBufferMemory"); |
| auto _result_ = s->vkBindBufferMemory(&observer, device, buffer, memory, memoryOffset); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkBindImageMemory(%zu, %" PRIu64 ", %" PRIu64 ", %" PRIu64 ")", device, image, memory, memoryOffset); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkBindImageMemory"); |
| auto _result_ = s->vkBindImageMemory(&observer, device, image, memory, memoryOffset); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetBufferMemoryRequirements(%zu, %" PRIu64 ", %p)", device, buffer, pMemoryRequirements); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetBufferMemoryRequirements"); |
| s->vkGetBufferMemoryRequirements(&observer, device, buffer, pMemoryRequirements); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetImageMemoryRequirements(%zu, %" PRIu64 ", %p)", device, image, pMemoryRequirements); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetImageMemoryRequirements"); |
| s->vkGetImageMemoryRequirements(&observer, device, image, pMemoryRequirements); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetImageSparseMemoryRequirements(%zu, %" PRIu64 ", %p, %p)", device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetImageSparseMemoryRequirements"); |
| s->vkGetImageSparseMemoryRequirements(&observer, device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateFence(VkDevice device, VkFenceCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkFence* pFence) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateFence(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pFence); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateFence"); |
| auto _result_ = s->vkCreateFence(&observer, device, pCreateInfo, pAllocator, pFence); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyFence(%zu, %" PRIu64 ", %p)", device, fence, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyFence"); |
| s->vkDestroyFence(&observer, device, fence, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, VkFence* pFences) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkResetFences(%zu, %" PRIu32 ", %p)", device, fenceCount, pFences); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkResetFences"); |
| auto _result_ = s->vkResetFences(&observer, device, fenceCount, pFences); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkGetFenceStatus(VkDevice device, VkFence fence) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetFenceStatus(%zu, %" PRIu64 ")", device, fence); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetFenceStatus"); |
| auto _result_ = s->vkGetFenceStatus(&observer, device, fence); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, VkFence* pFences, VkBool32 waitAll, uint64_t timeout) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkWaitForFences(%zu, %" PRIu32 ", %p, %" PRIu32 ", %" PRIu64 ")", device, fenceCount, pFences, waitAll, timeout); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkWaitForFences"); |
| auto _result_ = s->vkWaitForFences(&observer, device, fenceCount, pFences, waitAll, timeout); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateSemaphore(VkDevice device, VkSemaphoreCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateSemaphore(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pSemaphore); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateSemaphore"); |
| auto _result_ = s->vkCreateSemaphore(&observer, device, pCreateInfo, pAllocator, pSemaphore); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroySemaphore(%zu, %" PRIu64 ", %p)", device, semaphore, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroySemaphore"); |
| s->vkDestroySemaphore(&observer, device, semaphore, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateEvent(VkDevice device, VkEventCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkEvent* pEvent) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateEvent(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pEvent); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateEvent"); |
| auto _result_ = s->vkCreateEvent(&observer, device, pCreateInfo, pAllocator, pEvent); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyEvent(VkDevice device, VkEvent event, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyEvent(%zu, %" PRIu64 ", %p)", device, event, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyEvent"); |
| s->vkDestroyEvent(&observer, device, event, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkGetEventStatus(VkDevice device, VkEvent event) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetEventStatus(%zu, %" PRIu64 ")", device, event); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetEventStatus"); |
| auto _result_ = s->vkGetEventStatus(&observer, device, event); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkSetEvent(VkDevice device, VkEvent event) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkSetEvent(%zu, %" PRIu64 ")", device, event); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkSetEvent"); |
| auto _result_ = s->vkSetEvent(&observer, device, event); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkResetEvent(VkDevice device, VkEvent event) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkResetEvent(%zu, %" PRIu64 ")", device, event); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkResetEvent"); |
| auto _result_ = s->vkResetEvent(&observer, device, event); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateQueryPool(VkDevice device, VkQueryPoolCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateQueryPool(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pQueryPool); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateQueryPool"); |
| auto _result_ = s->vkCreateQueryPool(&observer, device, pCreateInfo, pAllocator, pQueryPool); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyQueryPool(%zu, %" PRIu64 ", %p)", device, queryPool, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyQueryPool"); |
| s->vkDestroyQueryPool(&observer, device, queryPool, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_val dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetQueryPoolResults(%zu, %" PRIu64 ", %" PRIu32 ", %" PRIu32 ", %zu, %p, %" PRIu64 ", %" PRIu32 ")", device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetQueryPoolResults"); |
| auto _result_ = s->vkGetQueryPoolResults(&observer, device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateBuffer(VkDevice device, VkBufferCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateBuffer(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pBuffer); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateBuffer"); |
| auto _result_ = s->vkCreateBuffer(&observer, device, pCreateInfo, pAllocator, pBuffer); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyBuffer(VkDevice device, VkBuffer buffer, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyBuffer(%zu, %" PRIu64 ", %p)", device, buffer, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyBuffer"); |
| s->vkDestroyBuffer(&observer, device, buffer, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateBufferView(VkDevice device, VkBufferViewCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkBufferView* pView) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateBufferView(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pView); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateBufferView"); |
| auto _result_ = s->vkCreateBufferView(&observer, device, pCreateInfo, pAllocator, pView); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView(VkDevice device, VkBufferView bufferView, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyBufferView(%zu, %" PRIu64 ", %p)", device, bufferView, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyBufferView"); |
| s->vkDestroyBufferView(&observer, device, bufferView, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateImage(VkDevice device, VkImageCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkImage* pImage) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateImage(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pImage); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateImage"); |
| auto _result_ = s->vkCreateImage(&observer, device, pCreateInfo, pAllocator, pImage); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyImage(VkDevice device, VkImage image, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyImage(%zu, %" PRIu64 ", %p)", device, image, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyImage"); |
| s->vkDestroyImage(&observer, device, image, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout(VkDevice device, VkImage image, VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetImageSubresourceLayout(%zu, %" PRIu64 ", %p, %p)", device, image, pSubresource, pLayout); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetImageSubresourceLayout"); |
| s->vkGetImageSubresourceLayout(&observer, device, image, pSubresource, pLayout); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateImageView(VkDevice device, VkImageViewCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkImageView* pView) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateImageView(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pView); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateImageView"); |
| auto _result_ = s->vkCreateImageView(&observer, device, pCreateInfo, pAllocator, pView); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyImageView(VkDevice device, VkImageView imageView, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyImageView(%zu, %" PRIu64 ", %p)", device, imageView, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyImageView"); |
| s->vkDestroyImageView(&observer, device, imageView, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateShaderModule(VkDevice device, VkShaderModuleCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateShaderModule(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pShaderModule); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateShaderModule"); |
| auto _result_ = s->vkCreateShaderModule(&observer, device, pCreateInfo, pAllocator, pShaderModule); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyShaderModule(%zu, %" PRIu64 ", %p)", device, shaderModule, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyShaderModule"); |
| s->vkDestroyShaderModule(&observer, device, shaderModule, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreatePipelineCache(VkDevice device, VkPipelineCacheCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreatePipelineCache(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pPipelineCache); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreatePipelineCache"); |
| auto _result_ = s->vkCreatePipelineCache(&observer, device, pCreateInfo, pAllocator, pPipelineCache); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyPipelineCache(%zu, %" PRIu64 ", %p)", device, pipelineCache, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyPipelineCache"); |
| s->vkDestroyPipelineCache(&observer, device, pipelineCache, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_val* pDataSize, void* pData) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetPipelineCacheData(%zu, %" PRIu64 ", %p, %p)", device, pipelineCache, pDataSize, pData); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetPipelineCacheData"); |
| auto _result_ = s->vkGetPipelineCacheData(&observer, device, pipelineCache, pDataSize, pData); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, VkPipelineCache* pSrcCaches) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkMergePipelineCaches(%zu, %" PRIu64 ", %" PRIu32 ", %p)", device, dstCache, srcCacheCount, pSrcCaches); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkMergePipelineCaches"); |
| auto _result_ = s->vkMergePipelineCaches(&observer, device, dstCache, srcCacheCount, pSrcCaches); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, VkGraphicsPipelineCreateInfo* pCreateInfos, VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateGraphicsPipelines(%zu, %" PRIu64 ", %" PRIu32 ", %p, %p, %p)", device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateGraphicsPipelines"); |
| auto _result_ = s->vkCreateGraphicsPipelines(&observer, device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, VkComputePipelineCreateInfo* pCreateInfos, VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateComputePipelines(%zu, %" PRIu64 ", %" PRIu32 ", %p, %p, %p)", device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateComputePipelines"); |
| auto _result_ = s->vkCreateComputePipelines(&observer, device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline(VkDevice device, VkPipeline pipeline, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyPipeline(%zu, %" PRIu64 ", %p)", device, pipeline, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyPipeline"); |
| s->vkDestroyPipeline(&observer, device, pipeline, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreatePipelineLayout(VkDevice device, VkPipelineLayoutCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreatePipelineLayout(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pPipelineLayout); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreatePipelineLayout"); |
| auto _result_ = s->vkCreatePipelineLayout(&observer, device, pCreateInfo, pAllocator, pPipelineLayout); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyPipelineLayout(%zu, %" PRIu64 ", %p)", device, pipelineLayout, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyPipelineLayout"); |
| s->vkDestroyPipelineLayout(&observer, device, pipelineLayout, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateSampler(VkDevice device, VkSamplerCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkSampler* pSampler) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateSampler(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pSampler); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateSampler"); |
| auto _result_ = s->vkCreateSampler(&observer, device, pCreateInfo, pAllocator, pSampler); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroySampler(VkDevice device, VkSampler sampler, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroySampler(%zu, %" PRIu64 ", %p)", device, sampler, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroySampler"); |
| s->vkDestroySampler(&observer, device, sampler, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateDescriptorSetLayout(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pSetLayout); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateDescriptorSetLayout"); |
| auto _result_ = s->vkCreateDescriptorSetLayout(&observer, device, pCreateInfo, pAllocator, pSetLayout); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyDescriptorSetLayout(%zu, %" PRIu64 ", %p)", device, descriptorSetLayout, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyDescriptorSetLayout"); |
| s->vkDestroyDescriptorSetLayout(&observer, device, descriptorSetLayout, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateDescriptorPool(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pDescriptorPool); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateDescriptorPool"); |
| auto _result_ = s->vkCreateDescriptorPool(&observer, device, pCreateInfo, pAllocator, pDescriptorPool); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyDescriptorPool(%zu, %" PRIu64 ", %p)", device, descriptorPool, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyDescriptorPool"); |
| s->vkDestroyDescriptorPool(&observer, device, descriptorPool, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkResetDescriptorPool(%zu, %" PRIu64 ", %" PRIu32 ")", device, descriptorPool, flags); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkResetDescriptorPool"); |
| auto _result_ = s->vkResetDescriptorPool(&observer, device, descriptorPool, flags); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkAllocateDescriptorSets(%zu, %p, %p)", device, pAllocateInfo, pDescriptorSets); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkAllocateDescriptorSets"); |
| auto _result_ = s->vkAllocateDescriptorSets(&observer, device, pAllocateInfo, pDescriptorSets); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, VkDescriptorSet* pDescriptorSets) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkFreeDescriptorSets(%zu, %" PRIu64 ", %" PRIu32 ", %p)", device, descriptorPool, descriptorSetCount, pDescriptorSets); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkFreeDescriptorSets"); |
| auto _result_ = s->vkFreeDescriptorSets(&observer, device, descriptorPool, descriptorSetCount, pDescriptorSets); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, VkCopyDescriptorSet* pDescriptorCopies) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkUpdateDescriptorSets(%zu, %" PRIu32 ", %p, %" PRIu32 ", %p)", device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkUpdateDescriptorSets"); |
| s->vkUpdateDescriptorSets(&observer, device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateFramebuffer(VkDevice device, VkFramebufferCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateFramebuffer(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pFramebuffer); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateFramebuffer"); |
| auto _result_ = s->vkCreateFramebuffer(&observer, device, pCreateInfo, pAllocator, pFramebuffer); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyFramebuffer(%zu, %" PRIu64 ", %p)", device, framebuffer, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyFramebuffer"); |
| s->vkDestroyFramebuffer(&observer, device, framebuffer, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateRenderPass(VkDevice device, VkRenderPassCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateRenderPass(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pRenderPass); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateRenderPass"); |
| auto _result_ = s->vkCreateRenderPass(&observer, device, pCreateInfo, pAllocator, pRenderPass); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyRenderPass(%zu, %" PRIu64 ", %p)", device, renderPass, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyRenderPass"); |
| s->vkDestroyRenderPass(&observer, device, renderPass, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetRenderAreaGranularity(%zu, %" PRIu64 ", %p)", device, renderPass, pGranularity); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetRenderAreaGranularity"); |
| s->vkGetRenderAreaGranularity(&observer, device, renderPass, pGranularity); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateCommandPool(VkDevice device, VkCommandPoolCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateCommandPool(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pCommandPool); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateCommandPool"); |
| auto _result_ = s->vkCreateCommandPool(&observer, device, pCreateInfo, pAllocator, pCommandPool); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroyCommandPool(%zu, %" PRIu64 ", %p)", device, commandPool, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroyCommandPool"); |
| s->vkDestroyCommandPool(&observer, device, commandPool, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkResetCommandPool(%zu, %" PRIu64 ", %" PRIu32 ")", device, commandPool, flags); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkResetCommandPool"); |
| auto _result_ = s->vkResetCommandPool(&observer, device, commandPool, flags); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkAllocateCommandBuffers(%zu, %p, %p)", device, pAllocateInfo, pCommandBuffers); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkAllocateCommandBuffers"); |
| auto _result_ = s->vkAllocateCommandBuffers(&observer, device, pAllocateInfo, pCommandBuffers); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, VkCommandBuffer* pCommandBuffers) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkFreeCommandBuffers(%zu, %" PRIu64 ", %" PRIu32 ", %p)", device, commandPool, commandBufferCount, pCommandBuffers); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkFreeCommandBuffers"); |
| s->vkFreeCommandBuffers(&observer, device, commandPool, commandBufferCount, pCommandBuffers); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateSwapchainKHR(VkDevice device, VkSwapchainCreateInfoKHR* pCreateInfo, VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateSwapchainKHR(%zu, %p, %p, %p)", device, pCreateInfo, pAllocator, pSwapchain); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateSwapchainKHR"); |
| auto _result_ = s->vkCreateSwapchainKHR(&observer, device, pCreateInfo, pAllocator, pSwapchain); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, VkAllocationCallbacks* pAllocator) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkDestroySwapchainKHR(%zu, %" PRIu64 ", %p)", device, swapchain, pAllocator); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return ; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkDestroySwapchainKHR"); |
| s->vkDestroySwapchainKHR(&observer, device, swapchain, pAllocator); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkGetSwapchainImagesKHR(%zu, %" PRIu64 ", %p, %p)", device, swapchain, pSwapchainImageCount, pSwapchainImages); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkGetSwapchainImagesKHR"); |
| auto _result_ = s->vkGetSwapchainImagesKHR(&observer, device, swapchain, pSwapchainImageCount, pSwapchainImages); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkAcquireNextImageKHR(%zu, %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %p)", device, swapchain, timeout, semaphore, fence, pImageIndex); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkAcquireNextImageKHR"); |
| auto _result_ = s->vkAcquireNextImageKHR(&observer, device, swapchain, timeout, semaphore, fence, pImageIndex); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| VKAPI_ATTR uint32_t VKAPI_CALL vkCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, VkSwapchainCreateInfoKHR* pCreateInfos, VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) { |
| Spy* s = Spy::get(); |
| GAPID_DEBUG("vkCreateSharedSwapchainsKHR(%zu, %" PRIu32 ", %p, %p, %p)", device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); |
| if (!s->try_to_enter()) { |
| GAPID_FATAL("Unexpected re-entrant call to vulkan function"); |
| return 0; |
| } |
| CallObserver observer(s); |
| s->lock(&observer, "vkCreateSharedSwapchainsKHR"); |
| auto _result_ = s->vkCreateSharedSwapchainsKHR(&observer, device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); |
| s->unlock(); |
| s->VulkanSpy::exit(); |
| return _result_; |
| } |
| } |