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

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

Merge changes Ie45b097c,I4ed4c12d,I6f096f25,I2b62229c,Ieb81c64b, ...

* changes:
  vulkan: Update from version 1.0.1 to 1.0.2
  libvulkan: Fix dEQP-VK.api.object_management.alloc_callback_fail.device
  libvulkan: Fix dEQP-VK.api.object_management.alloc_callback_fail.instance
  libvulkan: Fix dEQP-VK.api.device_init.create_instance_unsupported_extensions
  Fix ref count.
  Activate layers when the strings match.
  libvulkan: Implement VK_PRESENT_MODE_MAILBOX_KHR
  libvulkan: Really only write vkCreateInstance out parameter on success
  libvulkan: Return error if an unsupported instance extension is requested
  libvulkan: Only write vkCreateInstance out parameter on succes
  vulkan: Driver device extension enumeration and filtering
  vulkan: Enumerate device layer extensions
  libvulkan: Enumerate device layers
  vulkan: Support VK_EXT_debug_report in loader and nulldrv
  libvulkan: Only load driver functions for enabled extensions
  vulkan: Add current vk_ext_debug_report.h from upstream
  vulkan: Update to version 1.0.1
  vkinfo: Enable VK_EXT_debug_report if available
  vkinfo: improve formatting
  libvulkan: Disable accidentally-enabled verbose logging
  libvulkan: Load vkGetSwapchainGrallocUsageFlagsANDROID from driver
  vulkan: Fix 64-bit compilation errors
  vulkan: Pass vkQueuePresentKHR wait semaphores to vkQueueSignalReleaseImageANDROID
  libvulkan: Filter layer and extension lists passed to drivers
parents c78fa706 33faaad0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ define VK_SUBPASS_EXTERNAL (~0U)
    {{end}}
  {{end}}

#ifdef VK_PROTOTYPES
#ifdef VK_NO_PROTOTYPES

  {{range $f := AllCommands $}}
    {{if not (GetAnnotation $f "pfn")}}
+115 −6
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ import platform "platform.api"
// API version (major.minor.patch)
define VERSION_MAJOR 1
define VERSION_MINOR 0
define VERSION_PATCH 0
define VERSION_PATCH 2

// API limits
define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
@@ -45,7 +45,7 @@ define VK_FALSE 0
// API keyword, but needs special handling by some templates
define NULL_HANDLE 0

@extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION                 24
@extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION                 25
@extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME               "VK_KHR_surface"

@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION             67
@@ -69,12 +69,15 @@ define NULL_HANDLE 0
@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION         4
@extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME                 "VK_KHR_mir_surface"

@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 5
@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
@extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME         "VK_KHR_android_surface"

@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION     5
@extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME             "VK_KHR_win32_surface"

@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION       2
@extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME               "VK_EXT_debug_report"


/////////////
//  Types  //
@@ -121,6 +124,8 @@ type u32 VkSampleMask
@extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayKHR
@extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayModeKHR

@extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT


/////////////
//  Enums  //
@@ -684,15 +689,15 @@ enum VkResult {
    //@extension("VK_KHR_surface")
    VK_ERROR_SURFACE_LOST_KHR                               = 0xC4653600, // -1000000000

    //@extension("VK_KHR_surface")
    VK_ERROR_NATIVE_WINDOW_IN_USE_KHR                       = 0xC46535FF, // -1000008001

    //@extension("VK_KHR_swapchain")
    VK_ERROR_OUT_OF_DATE_KHR                                = 0xC4653214, // -1000001004

    //@extension("VK_KHR_display_swapchain")
    VK_ERROR_INCOMPATIBLE_DISPLAY_KHR                       = 0xC4652A47, // -1000003001

    //@extension("VK_KHR_android_surface")
    VK_ERROR_NATIVE_WINDOW_IN_USE_KHR                       = 0xC46516C0, // -1000008000

    //@extension("VK_EXT_debug_report")
    VK_ERROR_VALIDATION_FAILED_EXT                          = 0xC4650B07, // -1000011001
}
@@ -722,6 +727,46 @@ enum VkColorSpaceKHR {
    VK_COLORSPACE_SRGB_NONLINEAR_KHR                        = 0x00000000,
}

@extension("VK_EXT_debug_report")
enum VkDebugReportObjectTypeEXT {
    VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT                 = 0,
    VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT                = 1,
    VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT         = 2,
    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT                  = 3,
    VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT                   = 4,
    VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT               = 5,
    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT          = 6,
    VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT                   = 7,
    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT           = 8,
    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT                  = 9,
    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT                   = 10,
    VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT                   = 11,
    VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT              = 12,
    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT             = 13,
    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT              = 14,
    VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT           = 15,
    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT          = 16,
    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT         = 17,
    VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT             = 18,
    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT                = 19,
    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT   = 20,
    VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT                 = 21,
    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT         = 22,
    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT          = 23,
    VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT             = 24,
    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT            = 25,
    VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT             = 26,
    VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT           = 27,
    VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT            = 28,
}

@extension("VK_EXT_debug_report")
enum VkDebugReportErrorEXT {
    VK_DEBUG_REPORT_ERROR_NONE_EXT                          = 0,
    VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT                  = 1,
}


/////////////////
//  Bitfields  //
/////////////////
@@ -891,6 +936,7 @@ bitfield VkFormatFeatureFlagBits {
    VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT          = 0x00000200,    /// Format can be used for depth/stencil attachment images
    VK_FORMAT_FEATURE_BLIT_SRC_BIT                          = 0x00000400,    /// Format can be used as the source image of blits with vkCommandBlitImage
    VK_FORMAT_FEATURE_BLIT_DST_BIT                          = 0x00000800,    /// Format can be used as the destination image of blits with vkCommandBlitImage
    VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT       = 0x00001000,
}

/// Query control flags
@@ -1249,6 +1295,17 @@ type VkFlags VkWin32SurfaceCreateFlagsKHR
//bitfield VkWin32SurfaceCreateFlagBitsKHR {
//}

@extension("VK_EXT_debug_report")
type VkFlags VkDebugReportFlagsEXT
@extension("VK_EXT_debug_report")
bitfield VkDebugReportFlagBitsEXT {
    VK_DEBUG_REPORT_INFO_BIT_EXT                            = 0x00000001,
    VK_DEBUG_REPORT_WARN_BIT_EXT                            = 0x00000002,
    VK_DEBUG_REPORT_PERF_WARN_BIT_EXT                       = 0x00000004,
    VK_DEBUG_REPORT_ERROR_BIT_EXT                           = 0x00000008,
    VK_DEBUG_REPORT_DEBUG_BIT_EXT                           = 0x00000010,
}


//////////////////
//  Structures  //
@@ -2534,6 +2591,15 @@ class VkWin32SurfaceCreateInfoKHR {
    platform.HWND                               hwnd
}

@extension("VK_EXT_debug_report")
class VkDebugReportCallbackCreateInfoEXT {
    VkStructureType                             sType
    const void*                                 pNext
    VkDebugReportFlagsEXT                       flags
    PFN_vkDebugReportCallbackEXT                pfnCallback
    void*                                       pUserData
}


////////////////
//  Commands  //
@@ -5068,6 +5134,49 @@ cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR(
    return ?
}

@extension("VK_EXT_debug_report")
@external type void* PFN_vkDebugReportCallbackEXT
@extension("VK_EXT_debug_report")
@pfn cmd VkBool32 vkDebugReportCallbackEXT(
        VkDebugReportFlagsEXT                   flags,
        VkDebugReportObjectTypeEXT              objectType,
        u64                                     object,
        platform.size_t                         location,
        s32                                     messageCode,
        const char*                             pLayerPrefix,
        const char*                             pMessage,
        void*                                   pUserData) {
    return ?
}

@extension("VK_EXT_debug_report")
cmd VkResult vkCreateDebugReportCallbackEXT(
        VkInstance                                  instance,
        const VkDebugReportCallbackCreateInfoEXT*   pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkDebugReportCallbackEXT*                   pCallback) {
    return ?
}

@extension("VK_EXT_debug_report")
cmd void vkDestroyDebugReportCallbackEXT(
        VkInstance                                  instance,
        VkDebugReportCallbackEXT                    callback,
        const VkAllocationCallbacks*                pAllocator) {
}

@extension("VK_EXT_debug_report")
cmd void vkDebugReportMessageEXT(
        VkInstance                                  instance,
        VkDebugReportFlagsEXT                       flags,
        VkDebugReportObjectTypeEXT                  objectType,
        u64                                         object,
        platform.size_t                             location,
        s32                                         messageCode,
        const char*                                 pLayerPrefix,
        const char*                                 pMessage) {
}


////////////////
// Validation //
+6 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
= Vulkan on Android Implementor's Guide =
:toc: right
:numbered:
:revnumber: 4
:revnumber: 5

This document is intended for GPU IHVs writing Vulkan drivers for Android, and OEMs integrating them for specific devices. It describes how a Vulkan driver interacts with the system, how GPU-specific tools should be installed, and Android-specific requirements.

@@ -136,12 +136,14 @@ is as if the native fence was already signalled.
----
VkResult VKAPI vkQueueSignalReleaseImageANDROID(
    VkQueue             queue,
    uint32_t            waitSemaphoreCount,
    const VkSemaphore*  pWaitSemaphores,
    VkImage             image,
    int*                pNativeFenceFd
);
----

This will be called during +vkQueuePresentWSI+ on the provided queue. Effects are similar to +vkQueueSignalSemaphore+, except with a native fence instead of a semaphore. Unlike +vkQueueSignalSemaphore+, however, this call creates and returns the synchronization object that will be signalled rather than having it provided as input. If the queue is already idle when this function is called, it is allowed but not required to set +*pNativeFenceFd+ to -1. The file descriptor returned in +*pNativeFenceFd+ is owned and will be closed by the caller. Many drivers will be able to ignore the +image+ parameter, but some may need to prepare CPU-side data structures associated with a gralloc buffer for use by external image consumers. Preparing buffer contents for use by external consumers should have been done asynchronously as part of transitioning the image to +VK_IMAGE_LAYOUT_PRESENT_SRC_KHR+.
This will be called during +vkQueuePresentWSI+ on the provided queue. Effects are similar to +vkQueueSignalSemaphore+, except with a native fence instead of a semaphore. The native fence must: not signal until the +waitSemaphoreCount+ semaphores in +pWaitSemaphores+ have signaled. Unlike +vkQueueSignalSemaphore+, however, this call creates and returns the synchronization object that will be signalled rather than having it provided as input. If the queue is already idle when this function is called, it is allowed but not required to set +*pNativeFenceFd+ to -1. The file descriptor returned in +*pNativeFenceFd+ is owned and will be closed by the caller. Many drivers will be able to ignore the +image+ parameter, but some may need to prepare CPU-side data structures associated with a gralloc buffer for use by external image consumers. Preparing buffer contents for use by external consumers should have been done asynchronously as part of transitioning the image to +VK_IMAGE_LAYOUT_PRESENT_SRC_KHR+.

== History ==

@@ -159,3 +161,5 @@ This will be called during +vkQueuePresentWSI+ on the provided queue. Effects ar
. *2015-12-03*
   * Added a VkFence parameter to vkAcquireImageANDROID corresponding to the
     parameter added to vkAcquireNextImageKHR.
. *2016-01-08*
   * Added waitSemaphoreCount and pWaitSemaphores parameters to vkQueueSignalReleaseImageANDROID.
 No newline at end of file
+22 −8
Original line number Diff line number Diff line
@@ -733,7 +733,7 @@ asciidoc.install(2);
<body class="book">
<div id="header">
<h1>Vulkan on Android Implementor&#8217;s Guide</h1>
<span id="revnumber">version 3</span>
<span id="revnumber">version 5</span>
<div id="toc">
  <div id="toctitle">Table of Contents</div>
  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
@@ -797,7 +797,7 @@ Injected layers, like framerate, social network, or game launcher overlays, whic
<div class="paragraph"><p>The <span class="monospaced">vk_wsi_swapchin</span> and <span class="monospaced">vk_wsi_device_swapchain</span> extensions will primarily be implemented by the platform and live in <span class="monospaced">libvulkan.so</span>. The <span class="monospaced">VkSwapchain</span> object and all interaction with <span class="monospaced">ANativeWindow</span> will be handled by the platform and not exposed to drivers. The WSI implementation will rely on a few private interfaces to the driver for this implementation. These will be loaded through the driver&#8217;s <span class="monospaced">vkGetDeviceProcAddr</span> functions, after passing through any enabled layers.</p></div>
<div class="paragraph"><p>Implementations may need swapchain buffers to be allocated with implementation-defined private gralloc usage flags. When creating a swapchain, the platform will ask the driver to translate the requested format and image usage flags into gralloc usage flags by calling</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -810,7 +810,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>The <span class="monospaced">format</span> and <span class="monospaced">imageUsage</span> parameters are taken from the <span class="monospaced">VkSwapchainCreateInfoKHR</span> structure. The driver should fill <span class="monospaced">*grallocUsage</span> with the gralloc usage flags it requires for that format and usage. These will be combined with the usage flags requested by the swapchain consumer when allocating buffers.</p></div>
<div class="paragraph"><p><span class="monospaced">VkNativeBufferANDROID</span> is a <span class="monospaced">vkCreateImage</span> extension structure for creating an image backed by a gralloc buffer. This structure is provided to <span class="monospaced">vkCreateImage</span> in the <span class="monospaced">VkImageCreateInfo</span> structure chain. Calls to <span class="monospaced">vkCreateImage</span> with this structure will happen during the first call to <span class="monospaced">vkGetSwapChainInfoWSI(.. VK_SWAP_CHAIN_INFO_TYPE_IMAGES_WSI ..)</span>. The WSI implementation will allocate the number of native buffers requested for the swapchain, then create a <span class="monospaced">VkImage</span> for each one.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -847,7 +847,7 @@ http://www.gnu.org/software/src-highlite -->
externally-signalled native fence into both an existing VkSemaphore object
and an existing VkFence object:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -875,16 +875,18 @@ neither a semaphore or fence object is provided, or even if
is as if the native fence was already signalled.</p></div>
<div class="paragraph"><p><span class="monospaced">vkQueueSignalReleaseImageANDROID</span> prepares a swapchain image for external use, and creates a native fence and schedules it to be signalled when prior work on the queue has completed.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>VkResult <span style="color: #008080">VKAPI</span> <span style="font-weight: bold"><span style="color: #000000">vkQueueSignalReleaseImageANDROID</span></span><span style="color: #990000">(</span>
    <span style="color: #008080">VkQueue</span>             queue<span style="color: #990000">,</span>
    <span style="color: #008080">uint32_t</span>            waitSemaphoreCount<span style="color: #990000">,</span>
    <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> VkSemaphore<span style="color: #990000">*</span>  pWaitSemaphores<span style="color: #990000">,</span>
    <span style="color: #008080">VkImage</span>             image<span style="color: #990000">,</span>
    <span style="color: #009900">int</span><span style="color: #990000">*</span>                pNativeFenceFd
<span style="color: #990000">);</span></tt></pre></div></div>
<div class="paragraph"><p>This will be called during <span class="monospaced">vkQueuePresentWSI</span> on the provided queue. Effects are similar to <span class="monospaced">vkQueueSignalSemaphore</span>, except with a native fence instead of a semaphore. Unlike <span class="monospaced">vkQueueSignalSemaphore</span>, however, this call creates and returns the synchronization object that will be signalled rather than having it provided as input. If the queue is already idle when this function is called, it is allowed but not required to set <span class="monospaced">*pNativeFenceFd</span> to -1. The file descriptor returned in <span class="monospaced">*pNativeFenceFd</span> is owned and will be closed by the caller. Many drivers will be able to ignore the <span class="monospaced">image</span> parameter, but some may need to prepare CPU-side data structures associated with a gralloc buffer for use by external image consumers. Preparing buffer contents for use by external consumers should have been done asynchronously as part of transitioning the image to <span class="monospaced">VK_IMAGE_LAYOUT_PRESENT_SRC_KHR</span>.</p></div>
<div class="paragraph"><p>This will be called during <span class="monospaced">vkQueuePresentWSI</span> on the provided queue. Effects are similar to <span class="monospaced">vkQueueSignalSemaphore</span>, except with a native fence instead of a semaphore. The native fence must: not signal until the <span class="monospaced">waitSemaphoreCount</span> semaphores in <span class="monospaced">pWaitSemaphores</span> have signaled. Unlike <span class="monospaced">vkQueueSignalSemaphore</span>, however, this call creates and returns the synchronization object that will be signalled rather than having it provided as input. If the queue is already idle when this function is called, it is allowed but not required to set <span class="monospaced">*pNativeFenceFd</span> to -1. The file descriptor returned in <span class="monospaced">*pNativeFenceFd</span> is owned and will be closed by the caller. Many drivers will be able to ignore the <span class="monospaced">image</span> parameter, but some may need to prepare CPU-side data structures associated with a gralloc buffer for use by external image consumers. Preparing buffer contents for use by external consumers should have been done asynchronously as part of transitioning the image to <span class="monospaced">VK_IMAGE_LAYOUT_PRESENT_SRC_KHR</span>.</p></div>
</div>
</div>
<div class="sect1">
@@ -955,6 +957,18 @@ Added a VkFence parameter to vkAcquireImageANDROID corresponding to the
</li>
</ul></div>
</li>
<li>
<p>
<strong>2016-01-08</strong>
</p>
<div class="ulist"><ul>
<li>
<p>
Added waitSemaphoreCount and pWaitSemaphores parameters to vkQueueSignalReleaseImageANDROID.
</p>
</li>
</ul></div>
</li>
</ol></div>
</div>
</div>
@@ -962,8 +976,8 @@ Added a VkFence parameter to vkAcquireImageANDROID corresponding to the
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
Version 3<br>
Last updated 2015-12-03 15:47:36 PST
Version 5<br>
Last updated 2016-01-08 22:43:07 PST
</div>
</div>
</body>
+5 −7
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ extern "C" {
#define VK_ANDROID_native_buffer 1

#define VK_ANDROID_NATIVE_BUFFER_EXTENSION_NUMBER 11
#define VK_ANDROID_NATIVE_BUFFER_REVISION         4
#define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION     5
#define VK_ANDROID_NATIVE_BUFFER_EXTENSION_NAME   "VK_ANDROID_native_buffer"

#define VK_ANDROID_NATIVE_BUFFER_ENUM(type,id)    ((type)(1000000000 + (1000 * (VK_ANDROID_NATIVE_BUFFER_EXTENSION_NUMBER - 1)) + (id)))
@@ -48,13 +48,9 @@ typedef struct {

typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainGrallocUsageANDROID)(VkDevice device, VkFormat format, VkImageUsageFlags imageUsage, int* grallocUsage);
typedef VkResult (VKAPI_PTR *PFN_vkAcquireImageANDROID)(VkDevice device, VkImage image, int nativeFenceFd, VkSemaphore semaphore, VkFence fence);
typedef VkResult (VKAPI_PTR *PFN_vkQueueSignalReleaseImageANDROID)(VkQueue queue, VkImage image, int* pNativeFenceFd);
// -- DEPRECATED --
typedef VkResult (VKAPI_PTR *PFN_vkImportNativeFenceANDROID)(VkDevice device, VkSemaphore semaphore, int nativeFenceFd);
typedef VkResult (VKAPI_PTR *PFN_vkQueueSignalNativeFenceANDROID)(VkQueue queue, int* pNativeFenceFd);
// ----------------
typedef VkResult (VKAPI_PTR *PFN_vkQueueSignalReleaseImageANDROID)(VkQueue queue, uint32_t waitSemaphoreCount, const VkSemaphore* pWaitSemaphores, VkImage image, int* pNativeFenceFd);

#ifdef VK_PROTOTYPES
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainGrallocUsageANDROID(
    VkDevice            device,
    VkFormat            format,
@@ -70,6 +66,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAcquireImageANDROID(
);
VKAPI_ATTR VkResult VKAPI_CALL vkQueueSignalReleaseImageANDROID(
    VkQueue             queue,
    uint32_t            waitSemaphoreCount,
    const VkSemaphore*  pWaitSemaphores,
    VkImage             image,
    int*                pNativeFenceFd
);
Loading