Fix validation errors with external semaphores

The code didn't realize when zircon handle semaphores were exported or
imported.

Change-Id: Ia8a6f9a21ed844293eddac1779de7a1fe45555a6
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 88bb1c7..9e1880b 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -11996,6 +11996,26 @@
     if (VK_SUCCESS != result) return;
     RecordGetExternalSemaphoreState(pGetFdInfo->semaphore, pGetFdInfo->handleType);
 }
+#ifdef VK_USE_PLATFORM_FUCHSIA
+bool CoreChecks::PreCallValidateImportSemaphoreZirconHandleFUCHSIA(
+    VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA *pImportSemaphoreZirconHandleInfo) {
+    return ValidateImportSemaphore(pImportSemaphoreZirconHandleInfo->semaphore, "vkImportSemaphoreZirconHandleFUCHSIA");
+}
+
+void CoreChecks::PostCallRecordImportSemaphoreZirconHandleFUCHSIA(
+    VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA *pImportSemaphoreZirconHandleInfo, VkResult result) {
+    if (VK_SUCCESS != result) return;
+    RecordImportSemaphoreState(pImportSemaphoreZirconHandleInfo->semaphore, pImportSemaphoreZirconHandleInfo->handleType,
+                               pImportSemaphoreZirconHandleInfo->flags);
+}
+
+void CoreChecks::PostCallRecordGetSemaphoreZirconHandleFUCHSIA(VkDevice device,
+                                                               const VkSemaphoreGetZirconHandleInfoFUCHSIA *pGetZirconHandleInfo,
+                                                               zx_handle_t *pZirconHandle, VkResult result) {
+    if (VK_SUCCESS != result) return;
+    RecordGetExternalSemaphoreState(pGetZirconHandleInfo->semaphore, pGetZirconHandleInfo->handleType);
+}
+#endif
 
 bool CoreChecks::ValidateImportFence(VkFence fence, const char *caller_name) {
     FENCE_STATE *fence_node = GetFenceState(fence);
diff --git a/layers/core_validation.h b/layers/core_validation.h
index 11133bb..1c272cf 100644
--- a/layers/core_validation.h
+++ b/layers/core_validation.h
@@ -1685,6 +1685,16 @@
     bool PreCallValidateImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);
     void PostCallRecordImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo,
                                             VkResult result);
+#ifdef VK_USE_PLATFORM_FUCHSIA
+    bool PreCallValidateImportSemaphoreZirconHandleFUCHSIA(
+        VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo);
+
+    void PostCallRecordImportSemaphoreZirconHandleFUCHSIA(
+        VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo, VkResult result);
+    void PostCallRecordGetSemaphoreZirconHandleFUCHSIA(VkDevice device,
+                                                       const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
+                                                       zx_handle_t* pZirconHandle, VkResult result);
+#endif
 #ifdef VK_USE_PLATFORM_WIN32_KHR
     void PostCallRecordImportSemaphoreWin32HandleKHR(VkDevice device,
                                                      const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo,