[fuchsia] Add headers containing extra vulkan definitions.

The Fuchsia platforms relies on a number of Vulkan extensions
that have not been upstreamed to Khronos yet, and thus are not
part of the official Vulkan headers (i.e. <vulkan/vulkan.h>).

This CL adds a new header under src/common/ that contains these
declarations, extracted from the Fuchsia source tree, and ensures
they are included automatically from <common/vulkan_platform.h>

This is necessary to support certain features when building
Dawn on Fuchsia.

IMPORTANT NOTE: Some of the things declared in this header will
change once everything is upstreamed, which will require updating
the source code using them. For example,

  VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TEMP_ZIRCON_EVENT_BIT_FUCHSIA

Will likely be renamed officially as:

  VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT

And will be assigned a new value by Khronos.

BUG=dawn:221
Change-Id: If88a1dd06083a01d7b34b5cf5ab93f4e3f3681eb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: David Turner <digit@google.com>
This commit is contained in:
David 'Digit' Turner
2019-09-09 16:48:58 +00:00
committed by Commit Bot service account
parent b749d07ac9
commit 882ff72742
3 changed files with 241 additions and 0 deletions

View File

@@ -161,4 +161,9 @@ class alignas(kNativeVkHandleAlignment) VkNonDispatchableHandle {
# include "common/xlib_with_undefs.h"
#endif
// Include Fuchsia-specific definitions that are not upstreamed yet.
#if defined(DAWN_PLATFORM_FUCHSIA)
# include <vulkan/vulkan_fuchsia_extras.h>
#endif
#endif // COMMON_VULKANPLATFORM_H_