Commit 3fd439c2 by David Reveman Committed by Commit Bot

[Fuchsia] Add ifndefs to vulkan_fuchsia_ext.h

This allows chromium to build with upstream headers that include these extension. The old TEMP enums and structure types are used until drivers have been updated to support upstream header values. Bug: chromium:1191605 Change-Id: I25d2991204ca34956298013138af8f48e0aaefaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2782765 Commit-Queue: David Reveman <reveman@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent d1462228
...@@ -47,9 +47,10 @@ const VkExternalSemaphoreHandleTypeFlagBits ...@@ -47,9 +47,10 @@ const VkExternalSemaphoreHandleTypeFlagBits
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TEMP_ZIRCON_EVENT_BIT_FUCHSIA = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TEMP_ZIRCON_EVENT_BIT_FUCHSIA =
static_cast<VkExternalSemaphoreHandleTypeFlagBits>(0x00100000); static_cast<VkExternalSemaphoreHandleTypeFlagBits>(0x00100000);
#define VK_FUCHSIA_external_memory 1 #ifndef VK_FUCHSIA_external_memory
#define VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION 1 # define VK_FUCHSIA_external_memory 1
#define VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME "VK_FUCHSIA_external_memory" # define VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION 1
# define VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME "VK_FUCHSIA_external_memory"
typedef struct VkImportMemoryZirconHandleInfoFUCHSIA typedef struct VkImportMemoryZirconHandleInfoFUCHSIA
{ {
...@@ -84,7 +85,7 @@ typedef VkResult(VKAPI_PTR *PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)( ...@@ -84,7 +85,7 @@ typedef VkResult(VKAPI_PTR *PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)(
zx_handle_t ZirconHandle, zx_handle_t ZirconHandle,
VkMemoryZirconHandlePropertiesFUCHSIA *pMemoryZirconHandleProperties); VkMemoryZirconHandlePropertiesFUCHSIA *pMemoryZirconHandleProperties);
#ifndef VK_NO_PROTOTYPES # ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL VKAPI_ATTR VkResult VKAPI_CALL
vkGetMemoryZirconHandleFUCHSIA(VkDevice device, vkGetMemoryZirconHandleFUCHSIA(VkDevice device,
const VkMemoryGetZirconHandleInfoFUCHSIA *pGetZirconHandleInfo, const VkMemoryGetZirconHandleInfoFUCHSIA *pGetZirconHandleInfo,
...@@ -95,11 +96,13 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA( ...@@ -95,11 +96,13 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA(
VkExternalMemoryHandleTypeFlagBits handleType, VkExternalMemoryHandleTypeFlagBits handleType,
zx_handle_t ZirconHandle, zx_handle_t ZirconHandle,
VkMemoryZirconHandlePropertiesFUCHSIA *pMemoryZirconHandleProperties); VkMemoryZirconHandlePropertiesFUCHSIA *pMemoryZirconHandleProperties);
# endif
#endif #endif
#define VK_FUCHSIA_external_semaphore 1 #ifndef VK_FUCHSIA_external_semaphore
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 # define VK_FUCHSIA_external_semaphore 1
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_FUCHSIA_external_semaphore" # define VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
# define VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_FUCHSIA_external_semaphore"
typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA
{ {
...@@ -108,7 +111,7 @@ typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA ...@@ -108,7 +111,7 @@ typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA
VkSemaphore semaphore; VkSemaphore semaphore;
VkSemaphoreImportFlags flags; VkSemaphoreImportFlags flags;
VkExternalSemaphoreHandleTypeFlagBits handleType; VkExternalSemaphoreHandleTypeFlagBits handleType;
zx_handle_t handle; zx_handle_t zirconHandle;
} VkImportSemaphoreZirconHandleInfoFUCHSIA; } VkImportSemaphoreZirconHandleInfoFUCHSIA;
typedef struct VkSemaphoreGetZirconHandleInfoFUCHSIA typedef struct VkSemaphoreGetZirconHandleInfoFUCHSIA
...@@ -127,7 +130,7 @@ typedef VkResult(VKAPI_PTR *PFN_vkGetSemaphoreZirconHandleFUCHSIA)( ...@@ -127,7 +130,7 @@ typedef VkResult(VKAPI_PTR *PFN_vkGetSemaphoreZirconHandleFUCHSIA)(
const VkSemaphoreGetZirconHandleInfoFUCHSIA *pGetZirconHandleInfo, const VkSemaphoreGetZirconHandleInfoFUCHSIA *pGetZirconHandleInfo,
zx_handle_t *pZirconHandle); zx_handle_t *pZirconHandle);
#ifndef VK_NO_PROTOTYPES # ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA(
VkDevice device, VkDevice device,
const VkImportSemaphoreZirconHandleInfoFUCHSIA *pImportSemaphoreZirconHandleInfo); const VkImportSemaphoreZirconHandleInfoFUCHSIA *pImportSemaphoreZirconHandleInfo);
...@@ -136,6 +139,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ...@@ -136,6 +139,7 @@ VKAPI_ATTR VkResult VKAPI_CALL
vkGetSemaphoreZirconHandleFUCHSIA(VkDevice device, vkGetSemaphoreZirconHandleFUCHSIA(VkDevice device,
const VkSemaphoreGetZirconHandleInfoFUCHSIA *pGetZirconHandleInfo, const VkSemaphoreGetZirconHandleInfoFUCHSIA *pGetZirconHandleInfo,
zx_handle_t *pZirconHandle); zx_handle_t *pZirconHandle);
# endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -261,7 +261,7 @@ angle::Result SemaphoreVk::importZirconEvent(ContextVk *contextVk, GLuint handle ...@@ -261,7 +261,7 @@ angle::Result SemaphoreVk::importZirconEvent(ContextVk *contextVk, GLuint handle
importSemaphoreZirconHandleInfo.flags = 0; importSemaphoreZirconHandleInfo.flags = 0;
importSemaphoreZirconHandleInfo.handleType = importSemaphoreZirconHandleInfo.handleType =
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TEMP_ZIRCON_EVENT_BIT_FUCHSIA; VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TEMP_ZIRCON_EVENT_BIT_FUCHSIA;
importSemaphoreZirconHandleInfo.handle = handle; importSemaphoreZirconHandleInfo.zirconHandle = handle;
// TODO(spang): Add vkImportSemaphoreZirconHandleFUCHSIA to volk. // TODO(spang): Add vkImportSemaphoreZirconHandleFUCHSIA to volk.
static PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA = static PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment