Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 872d469b authored by Jesse Hall's avatar Jesse Hall Committed by Android (Google) Code Review
Browse files

Merge changes Idf479bed,Iee7d56c1,I23d7945e,Ibd6fa875,I52f7afb4, ...

* changes:
  vulkan: Add apk_library_dir virtual branch
  Add support for loading layers from the apk.
  Add default callbacks in the loader.
  Add support for arbitrary number of layers
  Add support for autoloading callback extension.
  Add support for multiple layers in the same so
  Add layer loading to android vulkan loader.
  Fix GetSpecific*ProcAddr.
  vulkan: Implement vk_ext_khr_*swapchain extensions
  vulkan: Add skeleton swapchain support
  vulkan: add copyright notices
  vknulldrv: Implement VkImage
  vulkan: warn on bogus CreateBuffer args
parents 39b4507d 89bf2776
Loading
Loading
Loading
Loading
+188 −0
Original line number Original line Diff line number Diff line
//
// File: vk_debug_report_lunarg.h
//
/*
 * Vulkan
 *
 * Copyright (C) 2015 LunarG, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 * Authors:
 *   Jon Ashburn <jon@lunarg.com>
 *   Courtney Goeltzenleuchter <courtney@lunarg.com>
 */

#ifndef __VK_DEBUG_REPORT_LUNARG_H__
#define __VK_DEBUG_REPORT_LUNARG_H__

#include <vulkan/vulkan.h>

#define VK_DEBUG_REPORT_EXTENSION_NUMBER 5
#define VK_DEBUG_REPORT_EXTENSION_REVISION 1
#ifdef __cplusplus
extern "C" {
#endif  // __cplusplus

/*
***************************************************************************************************
*   DebugReport Vulkan Extension API
***************************************************************************************************
*/
typedef enum {
    VK_OBJECT_TYPE_INSTANCE = 0,
    VK_OBJECT_TYPE_PHYSICAL_DEVICE = 1,
    VK_OBJECT_TYPE_DEVICE = 2,
    VK_OBJECT_TYPE_QUEUE = 3,
    VK_OBJECT_TYPE_COMMAND_BUFFER = 4,
    VK_OBJECT_TYPE_DEVICE_MEMORY = 5,
    VK_OBJECT_TYPE_BUFFER = 6,
    VK_OBJECT_TYPE_BUFFER_VIEW = 7,
    VK_OBJECT_TYPE_IMAGE = 8,
    VK_OBJECT_TYPE_IMAGE_VIEW = 9,
    VK_OBJECT_TYPE_ATTACHMENT_VIEW = 10,
    VK_OBJECT_TYPE_SHADER_MODULE = 12,
    VK_OBJECT_TYPE_SHADER = 13,
    VK_OBJECT_TYPE_PIPELINE = 14,
    VK_OBJECT_TYPE_PIPELINE_LAYOUT = 15,
    VK_OBJECT_TYPE_SAMPLER = 16,
    VK_OBJECT_TYPE_DESCRIPTOR_SET = 17,
    VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 18,
    VK_OBJECT_TYPE_DESCRIPTOR_POOL = 19,
    VK_OBJECT_TYPE_DYNAMIC_VIEWPORT_STATE = 20,
    VK_OBJECT_TYPE_DYNAMIC_LINE_WIDTH_STATE = 21,
    VK_OBJECT_TYPE_DYNAMIC_DEPTH_BIAS_STATE = 22,
    VK_OBJECT_TYPE_DYNAMIC_BLEND_STATE = 23,
    VK_OBJECT_TYPE_DYNAMIC_DEPTH_BOUNDS_STATE = 24,
    VK_OBJECT_TYPE_DYNAMIC_STENCIL_STATE = 25,
    VK_OBJECT_TYPE_FENCE = 26,
    VK_OBJECT_TYPE_SEMAPHORE = 27,
    VK_OBJECT_TYPE_EVENT = 28,
    VK_OBJECT_TYPE_QUERY_POOL = 29,
    VK_OBJECT_TYPE_FRAMEBUFFER = 30,
    VK_OBJECT_TYPE_RENDER_PASS = 31,
    VK_OBJECT_TYPE_PIPELINE_CACHE = 32,
    VK_OBJECT_TYPE_SWAPCHAIN_KHR = 33,
    VK_OBJECT_TYPE_CMD_POOL = 34,
    VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_INSTANCE,
    VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_CMD_POOL,
    VK_OBJECT_TYPE_NUM =
        (VK_OBJECT_TYPE_CMD_POOL - VK_OBJECT_TYPE_INSTANCE + 1),
    VK_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkDbgObjectType;

#define VK_DEBUG_REPORT_EXTENSION_NAME "DEBUG_REPORT"

VK_DEFINE_NONDISP_HANDLE(VkDbgMsgCallback)

// ------------------------------------------------------------------------------------------------
// Enumerations

typedef enum VkDbgReportFlags_ {
    VK_DBG_REPORT_INFO_BIT = 0x0001,
    VK_DBG_REPORT_WARN_BIT = 0x0002,
    VK_DBG_REPORT_PERF_WARN_BIT = 0x0004,
    VK_DBG_REPORT_ERROR_BIT = 0x0008,
    VK_DBG_REPORT_DEBUG_BIT = 0x0010,
} VkDbgReportFlags;

// Debug Report ERROR codes
typedef enum _DEBUG_REPORT_ERROR {
    DEBUG_REPORT_NONE,          // Used for INFO & other non-error messages
    DEBUG_REPORT_CALLBACK_REF,  // Callbacks were not destroyed prior to calling
                                // DestroyInstance
} DEBUG_REPORT_ERROR;

#define VK_DEBUG_REPORT_ENUM_EXTEND(type, id) \
    ((type)(VK_DEBUG_REPORT_EXTENSION_NUMBER * -1000 + (id)))

#define VK_OBJECT_TYPE_MSG_CALLBACK \
    VK_DEBUG_REPORT_ENUM_EXTEND(VkDbgObjectType, 0)
// ------------------------------------------------------------------------------------------------
// Vulkan function pointers

typedef void (*PFN_vkDbgMsgCallback)(VkFlags msgFlags,
                                     VkDbgObjectType objType,
                                     uint64_t srcObject,
                                     size_t location,
                                     int32_t msgCode,
                                     const char* pLayerPrefix,
                                     const char* pMsg,
                                     void* pUserData);

// ------------------------------------------------------------------------------------------------
// API functions

typedef VkResult(VKAPI* PFN_vkDbgCreateMsgCallback)(
    VkInstance instance,
    VkFlags msgFlags,
    const PFN_vkDbgMsgCallback pfnMsgCallback,
    void* pUserData,
    VkDbgMsgCallback* pMsgCallback);
typedef VkResult(VKAPI* PFN_vkDbgDestroyMsgCallback)(
    VkInstance instance,
    VkDbgMsgCallback msgCallback);

#ifdef VK_PROTOTYPES

// DebugReport extension entrypoints
VkResult VKAPI vkDbgCreateMsgCallback(VkInstance instance,
                                      VkFlags msgFlags,
                                      const PFN_vkDbgMsgCallback pfnMsgCallback,
                                      void* pUserData,
                                      VkDbgMsgCallback* pMsgCallback);

VkResult VKAPI vkDbgDestroyMsgCallback(VkInstance instance,
                                       VkDbgMsgCallback msgCallback);

// DebugReport utility callback functions
void VKAPI vkDbgStringCallback(VkFlags msgFlags,
                               VkDbgObjectType objType,
                               uint64_t srcObject,
                               size_t location,
                               int32_t msgCode,
                               const char* pLayerPrefix,
                               const char* pMsg,
                               void* pUserData);

void VKAPI vkDbgStdioCallback(VkFlags msgFlags,
                              VkDbgObjectType objType,
                              uint64_t srcObject,
                              size_t location,
                              int32_t msgCode,
                              const char* pLayerPrefix,
                              const char* pMsg,
                              void* pUserData);

void VKAPI vkDbgBreakCallback(VkFlags msgFlags,
                              VkDbgObjectType objType,
                              uint64_t srcObject,
                              size_t location,
                              int32_t msgCode,
                              const char* pLayerPrefix,
                              const char* pMsg,
                              void* pUserData);

#endif  // VK_PROTOTYPES

#ifdef __cplusplus
}  // extern "C"
#endif  // __cplusplus

#endif  // __VK_DEBUG_REPORT_LUNARG_H__
+69 −0
Original line number Original line Diff line number Diff line
/*
 * 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.
 */

#ifndef __VK_EXT_ANDROID_NATIVE_BUFFER_H__
#define __VK_EXT_ANDROID_NATIVE_BUFFER_H__

#include <vulkan/vulkan.h>
#include <system/window.h>

// TODO(jessehall): Get a real extension number officially assigned.
#define VK_EXT_ANDROID_NATIVE_BUFFER_EXTENSION_NUMBER 1024
#define VK_EXT_ANDROID_NATIVE_BUFFER_REVISION         1
#define VK_EXT_ANDROID_NATIVE_BUFFER_EXTENSION_NAME   "VK_EXT_ANDROID_gralloc"

#ifdef __cplusplus
extern "C" {
#endif

// See https://gitlab.khronos.org/vulkan/vulkan/blob/master/doc/proposals/proposed/NVIDIA/VulkanRegistryProposal.txt
// and Khronos bug 14154 for explanation of these magic numbers.
#define VK_EXT_ANDROID_NATIVE_BUFFER_ENUM(type,id)    ((type)((int)0xc0000000 - VK_EXT_ANDROID_NATIVE_BUFFER_EXTENSION_NUMBER * -1024 + (id)))
#define VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID       VK_EXT_ANDROID_NATIVE_BUFFER_ENUM(VkStructureType, 0)

typedef struct {
    VkStructureType             sType; // must be VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID
    const void*                 pNext;

    // Buffer handle and stride returned from gralloc alloc()
    buffer_handle_t             handle;
    int                         stride;

    // Gralloc format and usage requested when the buffer was allocated.
    int                         format;
    int                         usage;
} VkNativeBufferANDROID;

typedef VkResult (VKAPI *PFN_vkImportNativeFenceANDROID)(VkDevice device, VkSemaphore semaphore, int nativeFenceFd);
typedef VkResult (VKAPI *PFN_vkQueueSignalNativeFenceANDROID)(VkQueue queue, int* pNativeFenceFd);

#ifdef VK_PROTOTYPES
VkResult VKAPI vkImportNativeFenceANDROID(
    VkDevice        device,
    VkSemaphore     semaphore,
    int             nativeFenceFd
);
VkResult VKAPI vkQueueSignalNativeFenceANDROID(
    VkQueue         queue,
    int*            pNativeFenceFd
);
#endif

#ifdef __cplusplus
}
#endif

#endif // __VK_EXT_ANDROID_NATIVE_BUFFER_H__
+210 −0
Original line number Original line Diff line number Diff line
//
// File: vk_ext_khr_device_swapchain.h
//
/*
** Copyright (c) 2015 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/

#ifndef __VK_EXT_KHR_DEVICE_SWAPCHAIN_H__
#define __VK_EXT_KHR_DEVICE_SWAPCHAIN_H__

#include "vulkan.h"

#define VK_EXT_KHR_DEVICE_SWAPCHAIN_REVISION         51
#define VK_EXT_KHR_DEVICE_SWAPCHAIN_EXTENSION_NUMBER 2
#define VK_EXT_KHR_DEVICE_SWAPCHAIN_EXTENSION_NAME   "VK_EXT_KHR_device_swapchain"

#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus

// ------------------------------------------------------------------------------------------------
// Objects

VK_DEFINE_NONDISP_HANDLE(VkSwapchainKHR);

// ------------------------------------------------------------------------------------------------
// Enumeration constants

#define VK_EXT_KHR_DEVICE_SWAPCHAIN_ENUM(type,id)    ((type)((int)0xc0000000 - VK_EXT_KHR_DEVICE_SWAPCHAIN_EXTENSION_NUMBER * -1024 + (id)))
#define VK_EXT_KHR_DEVICE_SWAPCHAIN_ENUM_POSITIVE(type,id)    ((type)((int)0x40000000 + (VK_EXT_KHR_DEVICE_SWAPCHAIN_EXTENSION_NUMBER - 1) * 1024 + (id)))

// Extend VkStructureType enum with extension specific constants
#define VK_STRUCTURE_TYPE_SWAP_CHAIN_CREATE_INFO_KHR VK_EXT_KHR_DEVICE_SWAPCHAIN_ENUM(VkStructureType, 0)
#define VK_STRUCTURE_TYPE_PRESENT_INFO_KHR VK_EXT_KHR_DEVICE_SWAPCHAIN_ENUM(VkStructureType, 1)

// Extend VkImageLayout enum with extension specific constants
#define VK_IMAGE_LAYOUT_PRESENT_SOURCE_KHR VK_EXT_KHR_DEVICE_SWAPCHAIN_ENUM(VkImageLayout, 2)

// Extend VkResult enum with extension specific constants
//  Return codes for successful operation execution
#define VK_SUBOPTIMAL_KHR           VK_EXT_KHR_DEVICE_SWAPCHAIN_ENUM_POSITIVE(VkResult, 3)
//  Error codes
#define VK_ERROR_OUT_OF_DATE_KHR    VK_EXT_KHR_DEVICE_SWAPCHAIN_ENUM(VkResult, 4)

// ------------------------------------------------------------------------------------------------
// Enumerations

typedef enum {
    VK_PRESENT_MODE_IMMEDIATE_KHR = 0,
    VK_PRESENT_MODE_MAILBOX_KHR = 1,
    VK_PRESENT_MODE_FIFO_KHR = 2,
    VK_PRESENT_MODE_BEGIN_RANGE_KHR = VK_PRESENT_MODE_IMMEDIATE_KHR,
    VK_PRESENT_MODE_END_RANGE_KHR = VK_PRESENT_MODE_FIFO_KHR,
    VK_PRESENT_MODE_NUM = (VK_PRESENT_MODE_FIFO_KHR - VK_PRESENT_MODE_IMMEDIATE_KHR + 1),
    VK_PRESENT_MODE_MAX_ENUM_KHR = 0x7FFFFFFF
} VkPresentModeKHR;

typedef enum {
    VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000,
    VK_COLORSPACE_NUM = (VK_COLORSPACE_SRGB_NONLINEAR_KHR - VK_COLORSPACE_SRGB_NONLINEAR_KHR + 1),
    VK_COLORSPACE_MAX_ENUM_KHR = 0x7FFFFFFF
} VkColorSpaceKHR;

// ------------------------------------------------------------------------------------------------
// Flags

// ------------------------------------------------------------------------------------------------
// Structures

typedef struct {
    uint32_t                                minImageCount;      // Supported minimum number of images for the surface
    uint32_t                                maxImageCount;      // Supported maximum number of images for the surface, 0 for unlimited

    VkExtent2D                              currentExtent;      // Current image width and height for the surface, (-1, -1) if undefined
    VkExtent2D                              minImageExtent;     // Supported minimum image width and height for the surface
    VkExtent2D                              maxImageExtent;     // Supported maximum image width and height for the surface

    VkSurfaceTransformFlagsKHR              supportedTransforms;// 1 or more bits representing the transforms supported
    VkSurfaceTransformKHR                   currentTransform;   // The surface's current transform relative to the device's natural orientation

    uint32_t                                maxImageArraySize;  // Supported maximum number of image layers for the surface

    VkImageUsageFlags                       supportedUsageFlags;// Supported image usage flags for the surface
} VkSurfacePropertiesKHR;

typedef struct {
    VkFormat                                format;             // Supported pair of rendering format
    VkColorSpaceKHR                         colorSpace;         // and colorspace for the surface
} VkSurfaceFormatKHR;

typedef struct {
    VkStructureType                          sType;             // Must be VK_STRUCTURE_TYPE_SWAP_CHAIN_CREATE_INFO_KHR
    const void*                              pNext;             // Pointer to next structure

    const VkSurfaceDescriptionKHR*           pSurfaceDescription;// describes the swap chain's target surface

    uint32_t                                 minImageCount;     // Minimum number of presentation images the application needs
    VkFormat                                 imageFormat;       // Format of the presentation images
    VkColorSpaceKHR                          imageColorSpace;   // Colorspace of the presentation images
    VkExtent2D                               imageExtent;       // Dimensions of the presentation images
    VkImageUsageFlags                        imageUsageFlags;   // Bits indicating how the presentation images will be used
    VkSurfaceTransformKHR                    preTransform;      // The transform, relative to the device's natural orientation, applied to the image content prior to presentation
    uint32_t                                 imageArraySize;    // Determines the number of views for multiview/stereo presentation

    VkSharingMode                            sharingMode;       // Sharing mode used for the presentation images
    uint32_t                                 queueFamilyCount;  // Number of queue families having access to the images in case of concurrent sharing mode
    const uint32_t*                          pQueueFamilyIndices; // Array of queue family indices having access to the images in case of concurrent sharing mode

    VkPresentModeKHR                         presentMode;       // Which presentation mode to use for presents on this swap chain

    VkSwapchainKHR                           oldSwapchain;      // Existing swap chain to replace, if any

    VkBool32                                 clipped;           // Specifies whether presentable images may be affected by window clip regions
} VkSwapchainCreateInfoKHR;

typedef struct {
    VkStructureType                          sType;             // Must be VK_STRUCTURE_TYPE_PRESENT_INFO_KHR
    const void*                              pNext;             // Pointer to next structure
    uint32_t                                 swapchainCount;    // Number of swap chains to present in this call
    const VkSwapchainKHR*                    swapchains;        // Swap chains to present an image from
    const uint32_t*                          imageIndices;      // Indices of which swapchain images to present
} VkPresentInfoKHR;

// ------------------------------------------------------------------------------------------------
// Function types

typedef VkResult (VKAPI *PFN_vkGetSurfacePropertiesKHR)(VkDevice device, const VkSurfaceDescriptionKHR* pSurfaceDescription, VkSurfacePropertiesKHR* pSurfaceProperties);
typedef VkResult (VKAPI *PFN_vkGetSurfaceFormatsKHR)(VkDevice device, const VkSurfaceDescriptionKHR* pSurfaceDescription, uint32_t* pCount, VkSurfaceFormatKHR* pSurfaceFormats);
typedef VkResult (VKAPI *PFN_vkGetSurfacePresentModesKHR)(VkDevice device, const VkSurfaceDescriptionKHR* pSurfaceDescription, uint32_t* pCount, VkPresentModeKHR* pPresentModes);
typedef VkResult (VKAPI *PFN_vkCreateSwapchainKHR)(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, VkSwapchainKHR* pSwapchain);
typedef VkResult (VKAPI *PFN_vkDestroySwapchainKHR)(VkDevice device, VkSwapchainKHR swapchain);
typedef VkResult (VKAPI *PFN_vkGetSwapchainImagesKHR)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pCount, VkImage* pSwapchainImages);
typedef VkResult (VKAPI *PFN_vkAcquireNextImageKHR)(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, uint32_t* pImageIndex);
typedef VkResult (VKAPI *PFN_vkQueuePresentKHR)(VkQueue queue, VkPresentInfoKHR* pPresentInfo);

// ------------------------------------------------------------------------------------------------
// Function prototypes

#ifdef VK_PROTOTYPES

VkResult VKAPI vkGetSurfacePropertiesKHR(
    VkDevice                                 device,
    const VkSurfaceDescriptionKHR*           pSurfaceDescription,
    VkSurfacePropertiesKHR*                  pSurfaceProperties);

VkResult VKAPI vkGetSurfaceFormatsKHR(
    VkDevice                                 device,
    const VkSurfaceDescriptionKHR*           pSurfaceDescription,
    uint32_t*                                pCount,
    VkSurfaceFormatKHR*                      pSurfaceFormats);

VkResult VKAPI vkGetSurfacePresentModesKHR(
    VkDevice                                 device,
    const VkSurfaceDescriptionKHR*           pSurfaceDescription,
    uint32_t*                                pCount,
    VkPresentModeKHR*                        pPresentModes);

VkResult VKAPI vkCreateSwapchainKHR(
    VkDevice                                 device,
    const VkSwapchainCreateInfoKHR*          pCreateInfo,
    VkSwapchainKHR*                          pSwapchain);

VkResult VKAPI vkDestroySwapchainKHR(
    VkDevice                                 device,
    VkSwapchainKHR                           swapchain);

VkResult VKAPI vkGetSwapchainImagesKHR(
    VkDevice                                 device,
    VkSwapchainKHR                           swapchain,
    uint32_t*                                pCount,
    VkImage*                                 pSwapchainImages);

VkResult VKAPI vkAcquireNextImageKHR(
    VkDevice                                 device,
    VkSwapchainKHR                           swapchain,
    uint64_t                                 timeout,
    VkSemaphore                              semaphore,
    uint32_t*                                pImageIndex);

VkResult VKAPI vkQueuePresentKHR(
    VkQueue                                  queue,
    VkPresentInfoKHR*                        pPresentInfo);

#endif // VK_PROTOTYPES

#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus

#endif // __VK_EXT_KHR_SWAPCHAIN_H__
+153 −0

File added.

Preview size limit exceeded, changes collapsed.

+29 −0
Original line number Original line Diff line number Diff line
/*
 * 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.
 */

#ifndef VULKAN_VULKAN_LOADER_DATA_H
#define VULKAN_VULKAN_LOADER_DATA_H

#include <string>

namespace vulkan {
    struct LoaderData {
        std::string layer_path;
        __attribute__((visibility("default"))) static LoaderData& GetInstance();
    };
}

#endif
Loading