xref: /aosp_15_r20/external/angle/include/vulkan/vulkan_fuchsia_ext.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker //
2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2019 The ANGLE Project Authors. All rights reserved.
3*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
4*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file.
5*8975f5c5SAndroid Build Coastguard Worker //
6*8975f5c5SAndroid Build Coastguard Worker // vulkan_fuchsia_ext:
7*8975f5c5SAndroid Build Coastguard Worker //   Defines Fuchsia-specific Vulkan extensions when compiling on other
8*8975f5c5SAndroid Build Coastguard Worker //   platforms.
9*8975f5c5SAndroid Build Coastguard Worker //
10*8975f5c5SAndroid Build Coastguard Worker 
11*8975f5c5SAndroid Build Coastguard Worker #ifndef COMMON_VULKAN_FUCHSIA_EXT_H_
12*8975f5c5SAndroid Build Coastguard Worker #define COMMON_VULKAN_FUCHSIA_EXT_H_
13*8975f5c5SAndroid Build Coastguard Worker 
14*8975f5c5SAndroid Build Coastguard Worker #if !defined(VK_NO_PROTOTYPES)
15*8975f5c5SAndroid Build Coastguard Worker #    define VK_NO_PROTOTYPES
16*8975f5c5SAndroid Build Coastguard Worker #endif
17*8975f5c5SAndroid Build Coastguard Worker 
18*8975f5c5SAndroid Build Coastguard Worker #include <vulkan/vulkan.h>
19*8975f5c5SAndroid Build Coastguard Worker 
20*8975f5c5SAndroid Build Coastguard Worker // If this is not Fuchsia then define Fuchsia-specific types explicitly and include
21*8975f5c5SAndroid Build Coastguard Worker // vulkan_fuchsia.h to make it possible to compile the code on other platforms.
22*8975f5c5SAndroid Build Coastguard Worker //
23*8975f5c5SAndroid Build Coastguard Worker // TODO(https://anglebug.com/42264570): Update all code to avoid dependencies on
24*8975f5c5SAndroid Build Coastguard Worker // Fuchsia-specific types when compiling on other platforms. Then remove this header.
25*8975f5c5SAndroid Build Coastguard Worker #if !defined(ANGLE_PLATFORM_FUCHSIA)
26*8975f5c5SAndroid Build Coastguard Worker typedef uint32_t zx_handle_t;
27*8975f5c5SAndroid Build Coastguard Worker #    define ZX_HANDLE_INVALID ((zx_handle_t)0)
28*8975f5c5SAndroid Build Coastguard Worker #    include <vulkan/vulkan_fuchsia.h>
29*8975f5c5SAndroid Build Coastguard Worker #endif
30*8975f5c5SAndroid Build Coastguard Worker 
31*8975f5c5SAndroid Build Coastguard Worker #endif  // COMMON_VULKAN_FUCHSIA_EXT_H_
32