blob: 1ec493f26072cea88c0c64542ca330e8292fcf26 [file] [log] [blame]
/*
* 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 VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceXlibPresentationSupportKHR(%zu, %" PRIu32 ", %p, %zu)", physicalDevice, queueFamilyIndex, dpy, visualID);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceXlibPresentationSupportKHR");
auto _result_ = s->vkGetPhysicalDeviceXlibPresentationSupportKHR(&observer, physicalDevice, queueFamilyIndex, dpy, visualID);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceXcbPresentationSupportKHR(%zu, %" PRIu32 ", %p, %" PRIu32 ")", physicalDevice, queueFamilyIndex, connection, visual_id);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceXcbPresentationSupportKHR");
auto _result_ = s->vkGetPhysicalDeviceXcbPresentationSupportKHR(&observer, physicalDevice, queueFamilyIndex, connection, visual_id);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, wl_display* display) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceWaylandPresentationSupportKHR(%zu, %" PRIu32 ", %p)", physicalDevice, queueFamilyIndex, display);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
auto _result_ = s->vkGetPhysicalDeviceWaylandPresentationSupportKHR(&observer, physicalDevice, queueFamilyIndex, display);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceMirPresentationSupportKHR(%zu, %" PRIu32 ", %p)", physicalDevice, queueFamilyIndex, connection);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceMirPresentationSupportKHR");
auto _result_ = s->vkGetPhysicalDeviceMirPresentationSupportKHR(&observer, physicalDevice, queueFamilyIndex, connection);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceFeatures(%zu, %p)", physicalDevice, pFeatures);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return ;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceFeatures");
s->vkGetPhysicalDeviceFeatures(&observer, physicalDevice, pFeatures);
s->unlock();
s->VulkanSpy::exit();
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, uint32_t format, VkFormatProperties* pFormatProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceFormatProperties(%zu, %u, %p)", physicalDevice, format, pFormatProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return ;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceFormatProperties");
s->vkGetPhysicalDeviceFormatProperties(&observer, physicalDevice, format, pFormatProperties);
s->unlock();
s->VulkanSpy::exit();
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, uint32_t format, uint32_t type, uint32_t tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceImageFormatProperties(%zu, %u, %u, %u, %" PRIu32 ", %" PRIu32 ", %p)", physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceImageFormatProperties");
auto _result_ = s->vkGetPhysicalDeviceImageFormatProperties(&observer, physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceProperties(%zu, %p)", physicalDevice, pProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return ;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceProperties");
s->vkGetPhysicalDeviceProperties(&observer, physicalDevice, pProperties);
s->unlock();
s->VulkanSpy::exit();
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceQueueFamilyProperties(%zu, %p, %p)", physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return ;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceQueueFamilyProperties");
s->vkGetPhysicalDeviceQueueFamilyProperties(&observer, physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
s->unlock();
s->VulkanSpy::exit();
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceMemoryProperties(%zu, %p)", physicalDevice, pMemoryProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return ;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceMemoryProperties");
s->vkGetPhysicalDeviceMemoryProperties(&observer, physicalDevice, pMemoryProperties);
s->unlock();
s->VulkanSpy::exit();
}
VKAPI_ATTR uint32_t VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, VkDeviceCreateInfo* pCreateInfo, VkAllocationCallbacks* pAllocator, VkDevice* pDevice) {
Spy* s = Spy::get();
GAPID_DEBUG("vkCreateDevice(%zu, %p, %p, %p)", physicalDevice, pCreateInfo, pAllocator, pDevice);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkCreateDevice");
auto _result_ = s->vkCreateDevice(&observer, physicalDevice, pCreateInfo, pAllocator, pDevice);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkEnumerateDeviceExtensionProperties(%zu, %s, %p, %p)", physicalDevice, pLayerName, pPropertyCount, pProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkEnumerateDeviceExtensionProperties");
auto _result_ = s->vkEnumerateDeviceExtensionProperties(&observer, physicalDevice, pLayerName, pPropertyCount, pProperties);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkEnumerateDeviceLayerProperties(%zu, %p, %p)", physicalDevice, pPropertyCount, pProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkEnumerateDeviceLayerProperties");
auto _result_ = s->vkEnumerateDeviceLayerProperties(&observer, physicalDevice, pPropertyCount, pProperties);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, uint32_t format, uint32_t type, uint32_t samples, VkImageUsageFlags usage, uint32_t tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceSparseImageFormatProperties(%zu, %u, %u, %u, %" PRIu32 ", %u, %p, %p)", physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return ;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceSparseImageFormatProperties");
s->vkGetPhysicalDeviceSparseImageFormatProperties(&observer, physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties);
s->unlock();
s->VulkanSpy::exit();
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceSurfaceSupportKHR(%zu, %" PRIu32 ", %" PRIu64 ", %p)", physicalDevice, queueFamilyIndex, surface, pSupported);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceSurfaceSupportKHR");
auto _result_ = s->vkGetPhysicalDeviceSurfaceSupportKHR(&observer, physicalDevice, queueFamilyIndex, surface, pSupported);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceSurfaceCapabilitiesKHR(%zu, %" PRIu64 ", %p)", physicalDevice, surface, pSurfaceCapabilities);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
auto _result_ = s->vkGetPhysicalDeviceSurfaceCapabilitiesKHR(&observer, physicalDevice, surface, pSurfaceCapabilities);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceSurfaceFormatsKHR(%zu, %" PRIu64 ", %p, %p)", physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceSurfaceFormatsKHR");
auto _result_ = s->vkGetPhysicalDeviceSurfaceFormatsKHR(&observer, physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, uint32_t* pPresentModes) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceSurfacePresentModesKHR(%zu, %" PRIu64 ", %p, %p)", physicalDevice, surface, pPresentModeCount, pPresentModes);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceSurfacePresentModesKHR");
auto _result_ = s->vkGetPhysicalDeviceSurfacePresentModesKHR(&observer, physicalDevice, surface, pPresentModeCount, pPresentModes);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceDisplayPropertiesKHR(%zu, %p, %p)", physicalDevice, pPropertyCount, pProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceDisplayPropertiesKHR");
auto _result_ = s->vkGetPhysicalDeviceDisplayPropertiesKHR(&observer, physicalDevice, pPropertyCount, pProperties);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetPhysicalDeviceDisplayPlanePropertiesKHR(%zu, %p, %p)", physicalDevice, pPropertyCount, pProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
auto _result_ = s->vkGetPhysicalDeviceDisplayPlanePropertiesKHR(&observer, physicalDevice, pPropertyCount, pProperties);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetDisplayPlaneSupportedDisplaysKHR(%zu, %" PRIu32 ", %p, %p)", physicalDevice, planeIndex, pDisplayCount, pDisplays);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetDisplayPlaneSupportedDisplaysKHR");
auto _result_ = s->vkGetDisplayPlaneSupportedDisplaysKHR(&observer, physicalDevice, planeIndex, pDisplayCount, pDisplays);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetDisplayModePropertiesKHR(%zu, %" PRIu64 ", %p, %p)", physicalDevice, display, pPropertyCount, pProperties);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetDisplayModePropertiesKHR");
auto _result_ = s->vkGetDisplayModePropertiesKHR(&observer, physicalDevice, display, pPropertyCount, pProperties);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, VkDisplayModeCreateInfoKHR* pCreateInfo, VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode) {
Spy* s = Spy::get();
GAPID_DEBUG("vkCreateDisplayModeKHR(%zu, %" PRIu64 ", %p, %p, %p)", physicalDevice, display, pCreateInfo, pAllocator, pMode);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkCreateDisplayModeKHR");
auto _result_ = s->vkCreateDisplayModeKHR(&observer, physicalDevice, display, pCreateInfo, pAllocator, pMode);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
VKAPI_ATTR uint32_t VKAPI_CALL vkGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
Spy* s = Spy::get();
GAPID_DEBUG("vkGetDisplayPlaneCapabilitiesKHR(%zu, %" PRIu64 ", %" PRIu32 ", %p)", physicalDevice, mode, planeIndex, pCapabilities);
if (!s->try_to_enter()) {
GAPID_FATAL("Unexpected re-entrant call to vulkan function");
return 0;
}
CallObserver observer(s);
s->lock(&observer, "vkGetDisplayPlaneCapabilitiesKHR");
auto _result_ = s->vkGetDisplayPlaneCapabilitiesKHR(&observer, physicalDevice, mode, planeIndex, pCapabilities);
s->unlock();
s->VulkanSpy::exit();
return _result_;
}
}