Merge pull request #1682 from spnda/vulkan_1_2_commands

Add Vulkan 1.2 core commands
diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKInstance.mm b/MoltenVK/MoltenVK/GPUObjects/MVKInstance.mm
index 0888186..017d0a9 100644
--- a/MoltenVK/MoltenVK/GPUObjects/MVKInstance.mm
+++ b/MoltenVK/MoltenVK/GPUObjects/MVKInstance.mm
@@ -404,6 +404,7 @@
 
 #define ADD_INST_1_1_ENTRY_POINT(func)					ADD_ENTRY_POINT(func, VK_API_VERSION_1_1, nullptr, nullptr, false)
 #define ADD_DVC_1_1_ENTRY_POINT(func)					ADD_ENTRY_POINT(func, VK_API_VERSION_1_1, nullptr, nullptr, true)
+#define ADD_DVC_1_2_ENTRY_POINT(func)					ADD_ENTRY_POINT(func, VK_API_VERSION_1_2, nullptr, nullptr, true)
 
 // Adds both the 1.1 function and the promoted extension function.
 #define ADD_INST_1_1_PROMOTED_ENTRY_POINT(func, EXT)	\
@@ -415,6 +416,10 @@
 	ADD_DVC_1_1_ENTRY_POINT(func);	\
 	ADD_ENTRY_POINT_MAP(func##KHR, func, 0, VK_##EXT##_EXTENSION_NAME, nullptr, true)
 
+#define ADD_DVC_1_2_PROMOTED_ENTRY_POINT(func, suffix, EXT) \
+	ADD_DVC_1_2_ENTRY_POINT(func); \
+	ADD_ENTRY_POINT_MAP(func##suffix, func, 0, VK_##EXT##_EXTENSION_NAME, nullptr, true)
+
 #define ADD_INST_EXT_ENTRY_POINT(func, EXT)				ADD_ENTRY_POINT(func, 0, VK_##EXT##_EXTENSION_NAME, nullptr, false)
 #define ADD_DVC_EXT_ENTRY_POINT(func, EXT)				ADD_ENTRY_POINT(func, 0, VK_##EXT##_EXTENSION_NAME, nullptr, true)
 
@@ -591,6 +596,20 @@
 	ADD_DVC_1_1_PROMOTED_ENTRY_POINT(vkCmdSetDeviceMask, KHR_DEVICE_GROUP);
 	ADD_DVC_1_1_PROMOTED_ENTRY_POINT(vkCmdDispatchBase, KHR_DEVICE_GROUP);
 
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkCmdBeginRenderPass2, KHR, KHR_CREATE_RENDERPASS_2);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkCmdDrawIndexedIndirectCount, KHR, KHR_DRAW_INDIRECT_COUNT);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkCmdDrawIndirectCount, KHR, KHR_DRAW_INDIRECT_COUNT);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkCmdEndRenderPass2, KHR, KHR_CREATE_RENDERPASS_2);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkCmdNextSubpass2, KHR, KHR_CREATE_RENDERPASS_2);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkCreateRenderPass2, KHR, KHR_CREATE_RENDERPASS_2);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkGetBufferDeviceAddress, KHR, KHR_BUFFER_DEVICE_ADDRESS);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkGetBufferOpaqueCaptureAddress, KHR, KHR_BUFFER_DEVICE_ADDRESS);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkGetDeviceMemoryOpaqueCaptureAddressKHR, KHR, KHR_BUFFER_DEVICE_ADDRESS);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkGetSemaphoreCounterValue, KHR, KHR_TIMELINE_SEMAPHORE);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkResetQueryPool, EXT, EXT_HOST_QUERY_RESET);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkSignalSemaphore, KHR, KHR_TIMELINE_SEMAPHORE);
+	ADD_DVC_1_2_PROMOTED_ENTRY_POINT(vkWaitSemaphores, KHR, KHR_TIMELINE_SEMAPHORE);
+
 	// Instance extension functions:
 	ADD_INST_EXT_ENTRY_POINT(vkDestroySurfaceKHR, KHR_SURFACE);
 	ADD_INST_EXT_ENTRY_POINT(vkGetPhysicalDeviceSurfaceSupportKHR, KHR_SURFACE);
@@ -636,13 +655,6 @@
     ADD_INST_EXT_ENTRY_POINT(vkGetMTLCommandQueueMVK, MVK_MOLTENVK);
 
 	// Device extension functions:
-	ADD_DVC_EXT_ENTRY_POINT(vkGetBufferDeviceAddressKHR, KHR_BUFFER_DEVICE_ADDRESS);
-	ADD_DVC_EXT_ENTRY_POINT(vkGetBufferOpaqueCaptureAddressKHR, KHR_BUFFER_DEVICE_ADDRESS);
-	ADD_DVC_EXT_ENTRY_POINT(vkGetDeviceMemoryOpaqueCaptureAddressKHR, KHR_BUFFER_DEVICE_ADDRESS);
-	ADD_DVC_EXT_ENTRY_POINT(vkCreateRenderPass2KHR, KHR_CREATE_RENDERPASS_2);
-	ADD_DVC_EXT_ENTRY_POINT(vkCmdBeginRenderPass2KHR, KHR_CREATE_RENDERPASS_2);
-	ADD_DVC_EXT_ENTRY_POINT(vkCmdNextSubpass2KHR, KHR_CREATE_RENDERPASS_2);
-	ADD_DVC_EXT_ENTRY_POINT(vkCmdEndRenderPass2KHR, KHR_CREATE_RENDERPASS_2);
 	ADD_DVC_EXT_ENTRY_POINT(vkCmdBeginRenderingKHR, KHR_DYNAMIC_RENDERING);
 	ADD_DVC_EXT_ENTRY_POINT(vkCmdEndRenderingKHR, KHR_DYNAMIC_RENDERING);
 	ADD_DVC_EXT_ENTRY_POINT(vkCmdPushDescriptorSetKHR, KHR_PUSH_DESCRIPTOR);
@@ -656,17 +668,12 @@
 	ADD_DVC_EXT2_ENTRY_POINT(vkGetDeviceGroupSurfacePresentModesKHR, KHR_SWAPCHAIN, KHR_DEVICE_GROUP);
 	ADD_DVC_EXT2_ENTRY_POINT(vkGetPhysicalDevicePresentRectanglesKHR, KHR_SWAPCHAIN, KHR_DEVICE_GROUP);
 	ADD_DVC_EXT2_ENTRY_POINT(vkAcquireNextImage2KHR, KHR_SWAPCHAIN, KHR_DEVICE_GROUP);
-	ADD_DVC_EXT_ENTRY_POINT(vkGetSemaphoreCounterValueKHR, KHR_TIMELINE_SEMAPHORE);
-	ADD_DVC_EXT_ENTRY_POINT(vkSignalSemaphoreKHR, KHR_TIMELINE_SEMAPHORE);
-	ADD_DVC_EXT_ENTRY_POINT(vkWaitSemaphoresKHR, KHR_TIMELINE_SEMAPHORE);
-	ADD_DVC_EXT_ENTRY_POINT(vkGetBufferDeviceAddressEXT, EXT_BUFFER_DEVICE_ADDRESS);
 	ADD_DVC_EXT_ENTRY_POINT(vkDebugMarkerSetObjectTagEXT, EXT_DEBUG_MARKER);
 	ADD_DVC_EXT_ENTRY_POINT(vkDebugMarkerSetObjectNameEXT, EXT_DEBUG_MARKER);
 	ADD_DVC_EXT_ENTRY_POINT(vkCmdDebugMarkerBeginEXT, EXT_DEBUG_MARKER);
 	ADD_DVC_EXT_ENTRY_POINT(vkCmdDebugMarkerEndEXT, EXT_DEBUG_MARKER);
 	ADD_DVC_EXT_ENTRY_POINT(vkCmdDebugMarkerInsertEXT, EXT_DEBUG_MARKER);
 	ADD_DVC_EXT_ENTRY_POINT(vkSetHdrMetadataEXT, EXT_HDR_METADATA);
-	ADD_DVC_EXT_ENTRY_POINT(vkResetQueryPoolEXT, EXT_HOST_QUERY_RESET);
 	ADD_DVC_EXT_ENTRY_POINT(vkExportMetalObjectsEXT, EXT_METAL_OBJECTS);
 	ADD_DVC_EXT_ENTRY_POINT(vkCreatePrivateDataSlotEXT, EXT_PRIVATE_DATA);
 	ADD_DVC_EXT_ENTRY_POINT(vkDestroyPrivateDataSlotEXT, EXT_PRIVATE_DATA);
diff --git a/MoltenVK/MoltenVK/Vulkan/vulkan.mm b/MoltenVK/MoltenVK/Vulkan/vulkan.mm
index 2fa6b10..62d6984 100644
--- a/MoltenVK/MoltenVK/Vulkan/vulkan.mm
+++ b/MoltenVK/MoltenVK/Vulkan/vulkan.mm
@@ -162,7 +162,7 @@
 	}
 
 // Define an extension call as an alias of a core call
-#define MVK_PUBLIC_VULKAN_CORE_ALIAS(vkf)	MVK_PUBLIC_VULKAN_ALIAS(vkf##KHR, vkf)
+#define MVK_PUBLIC_VULKAN_CORE_ALIAS(vkf, ext)	MVK_PUBLIC_VULKAN_ALIAS(vkf##ext, vkf)
 
 
 #pragma mark -
@@ -2317,45 +2317,65 @@
 	MVKTraceVulkanCallEnd();
 }
 
-
 #pragma mark -
-#pragma mark VK_KHR_bind_memory2 extension
+#pragma mark Vulkan 1.2 calls
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkBindBufferMemory2);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkBindImageMemory2);
+MVK_PUBLIC_VULKAN_SYMBOL void vkCmdBeginRenderPass2(
+	VkCommandBuffer								commandBuffer,
+	const VkRenderPassBeginInfo*				pRenderPassBegin,
+	const VkSubpassBeginInfo*					pSubpassBeginInfo) {
 
-
-#pragma mark -
-#pragma mark VK_KHR_buffer_device_address
-
-MVK_PUBLIC_VULKAN_SYMBOL VkDeviceAddress vkGetBufferDeviceAddressKHR(
-	VkDevice                                    device,
-	const VkBufferDeviceAddressInfo*            pInfo) {
-	
 	MVKTraceVulkanCallStart();
-	uint64_t result = ((MVKBuffer*)pInfo->buffer)->getMTLBufferGPUAddress();
+	mvkCmdBeginRenderPass(commandBuffer, pRenderPassBegin, pSubpassBeginInfo);
 	MVKTraceVulkanCallEnd();
-	return (VkDeviceAddress)result;
 }
 
-MVK_PUBLIC_VULKAN_SYMBOL uint64_t vkGetBufferOpaqueCaptureAddressKHR(
-	VkDevice                                    device,
-	const VkBufferDeviceAddressInfo*            pInfo) {
-	
-	return 0;
+MVK_PUBLIC_VULKAN_SYMBOL void vkCmdDrawIndexedIndirectCount(
+	VkCommandBuffer                             commandBuffer,
+    VkBuffer                                    buffer,
+    VkDeviceSize                                offset,
+    VkBuffer                                    countBuffer,
+    VkDeviceSize                                countBufferOffset,
+    uint32_t                                    maxDrawCount,
+    uint32_t                                    stride) {
+
+	MVKTraceVulkanCallStart();
+	MVKTraceVulkanCallEnd();
 }
 
-MVK_PUBLIC_VULKAN_SYMBOL uint64_t vkGetDeviceMemoryOpaqueCaptureAddressKHR(
-	VkDevice                                    device,
-	const VkDeviceMemoryOpaqueCaptureAddressInfo*            pInfo) {
-	
-	return 0;
+MVK_PUBLIC_VULKAN_SYMBOL void vkCmdDrawIndirectCount(
+    VkCommandBuffer                             commandBuffer,
+    VkBuffer                                    buffer,
+    VkDeviceSize                                offset,
+    VkBuffer                                    countBuffer,
+    VkDeviceSize                                countBufferOffset,
+    uint32_t                                    maxDrawCount,
+    uint32_t                                    stride) {
+
+	MVKTraceVulkanCallStart();
+	MVKTraceVulkanCallEnd();
 }
 
-#pragma mark -
-#pragma mark VK_KHR_create_renderpass2 extension
+MVK_PUBLIC_VULKAN_SYMBOL void vkCmdEndRenderPass2(
+	VkCommandBuffer								commandBuffer,
+	const VkSubpassEndInfo*						pSubpassEndInfo) {
 
-MVK_PUBLIC_VULKAN_SYMBOL VkResult vkCreateRenderPass2KHR(
+	MVKTraceVulkanCallStart();
+	MVKAddCmd(EndRenderPass, commandBuffer, pSubpassEndInfo);
+	MVKTraceVulkanCallEnd();
+}
+
+MVK_PUBLIC_VULKAN_SYMBOL void vkCmdNextSubpass2(
+	VkCommandBuffer								commandBuffer,
+	const VkSubpassBeginInfo*					pSubpassBeginInfo,
+	const VkSubpassEndInfo*						pSubpassEndInfo) {
+
+	MVKTraceVulkanCallStart();
+	MVKAddCmd(NextSubpass, commandBuffer, pSubpassBeginInfo, pSubpassEndInfo);
+	MVKTraceVulkanCallEnd();
+}
+
+MVK_PUBLIC_VULKAN_SYMBOL VkResult vkCreateRenderPass2(
 	VkDevice									device,
 	const VkRenderPassCreateInfo2*				pCreateInfo,
 	const VkAllocationCallbacks*				pAllocator,
@@ -2371,37 +2391,107 @@
 	return rslt;
 }
 
-MVK_PUBLIC_VULKAN_SYMBOL void vkCmdBeginRenderPass2KHR(
-	VkCommandBuffer								commandBuffer,
-	const VkRenderPassBeginInfo*				pRenderPassBegin,
-	const VkSubpassBeginInfo*					pSubpassBeginInfo) {
+MVK_PUBLIC_VULKAN_SYMBOL VkDeviceAddress vkGetBufferDeviceAddress(
+	VkDevice                                    device,
+	const VkBufferDeviceAddressInfo*            pInfo) {
+	
+	MVKTraceVulkanCallStart();
+	uint64_t result = ((MVKBuffer*)pInfo->buffer)->getMTLBufferGPUAddress();
+	MVKTraceVulkanCallEnd();
+	return (VkDeviceAddress)result;
+}
+
+MVK_PUBLIC_VULKAN_SYMBOL uint64_t vkGetBufferOpaqueCaptureAddress(
+	VkDevice                                    device,
+	const VkBufferDeviceAddressInfo*            pInfo) {
+	
+	return 0;
+}
+
+MVK_PUBLIC_VULKAN_SYMBOL uint64_t vkGetDeviceMemoryOpaqueCaptureAddress(
+	VkDevice                                    device,
+	const VkDeviceMemoryOpaqueCaptureAddressInfo*            pInfo) {
+	
+	return 0;
+}
+
+
+MVK_PUBLIC_VULKAN_SYMBOL VkResult vkGetSemaphoreCounterValue(
+	VkDevice									device,
+	VkSemaphore									semaphore,
+	uint64_t*									pValue) {
 
 	MVKTraceVulkanCallStart();
-	mvkCmdBeginRenderPass(commandBuffer, pRenderPassBegin, pSubpassBeginInfo);
+	VkResult rslt = MVKDevice::getMVKDevice(device)->getConfigurationResult();
+	if (rslt == VK_SUCCESS) {
+		auto* mvkSem4 = (MVKTimelineSemaphore*)semaphore;
+		*pValue = mvkSem4->getCounterValue();
+	}
+	MVKTraceVulkanCallEnd();
+	return rslt;
+}
+
+MVK_PUBLIC_VULKAN_SYMBOL void vkResetQueryPool(
+    VkDevice                                    device,
+    VkQueryPool                                 queryPool,
+    uint32_t                                    firstQuery,
+    uint32_t                                    queryCount) {
+
+	MVKTraceVulkanCallStart();
+    auto* mvkQueryPool = (MVKQueryPool*)queryPool;
+    mvkQueryPool->resetResults(firstQuery, queryCount, nullptr);
 	MVKTraceVulkanCallEnd();
 }
 
-MVK_PUBLIC_VULKAN_SYMBOL void vkCmdNextSubpass2KHR(
-	VkCommandBuffer								commandBuffer,
-	const VkSubpassBeginInfo*					pSubpassBeginInfo,
-	const VkSubpassEndInfo*						pSubpassEndInfo) {
+MVK_PUBLIC_VULKAN_SYMBOL VkResult vkSignalSemaphore(
+	VkDevice									device,
+	const VkSemaphoreSignalInfoKHR*				pSignalInfo) {
 
 	MVKTraceVulkanCallStart();
-	MVKAddCmd(NextSubpass, commandBuffer, pSubpassBeginInfo, pSubpassEndInfo);
+	auto* mvkSem4 = (MVKTimelineSemaphore*)pSignalInfo->semaphore;
+	mvkSem4->signal(pSignalInfo);
 	MVKTraceVulkanCallEnd();
+	return VK_SUCCESS;
 }
 
-MVK_PUBLIC_VULKAN_SYMBOL void vkCmdEndRenderPass2KHR(
-	VkCommandBuffer								commandBuffer,
-	const VkSubpassEndInfo*						pSubpassEndInfo) {
+MVK_PUBLIC_VULKAN_SYMBOL VkResult vkWaitSemaphores(
+	VkDevice									device,
+	const VkSemaphoreWaitInfoKHR*				pWaitInfo,
+	uint64_t									timeout) {
 
 	MVKTraceVulkanCallStart();
-	MVKAddCmd(EndRenderPass, commandBuffer, pSubpassEndInfo);
+	MVKDevice* mvkDev = MVKDevice::getMVKDevice(device);
+	VkResult rslt = mvkWaitSemaphores(mvkDev, pWaitInfo, timeout);
 	MVKTraceVulkanCallEnd();
+	return rslt;
 }
 
 
 #pragma mark -
+#pragma mark VK_KHR_bind_memory2 extension
+
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkBindBufferMemory2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkBindImageMemory2, KHR);
+
+
+#pragma mark -
+#pragma mark VK_KHR_buffer_device_address
+
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetBufferDeviceAddress, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetBufferOpaqueCaptureAddress, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetDeviceMemoryOpaqueCaptureAddress, KHR);
+
+
+#pragma mark -
+#pragma mark VK_KHR_create_renderpass2 extension
+
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCreateRenderPass2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdBeginRenderPass2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdNextSubpass2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdEndRenderPass2, KHR);
+
+
+#pragma mark -
 #pragma mark VK_KHR_dynamic_rendering extension
 
 void vkCmdBeginRenderingKHR(
@@ -2426,73 +2516,80 @@
 #pragma mark -
 #pragma mark VK_KHR_descriptor_update_template extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCreateDescriptorUpdateTemplate);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkDestroyDescriptorUpdateTemplate);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkUpdateDescriptorSetWithTemplate);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCreateDescriptorUpdateTemplate, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkDestroyDescriptorUpdateTemplate, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkUpdateDescriptorSetWithTemplate, KHR);
 
 
 #pragma mark -
 #pragma mark VK_KHR_device_group extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetDeviceGroupPeerMemoryFeatures);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdSetDeviceMask);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdDispatchBase);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetDeviceGroupPeerMemoryFeatures, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdSetDeviceMask, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdDispatchBase, KHR);
 
 
 #pragma mark -
 #pragma mark VK_KHR_device_group_creation extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkEnumeratePhysicalDeviceGroups);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkEnumeratePhysicalDeviceGroups, KHR);
+
+
+#pragma mark -
+#pragma mark VK_KHR_draw_indirect_count
+
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdDrawIndexedIndirectCount, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdDrawIndirectCount, KHR);
 
 
 #pragma mark -
 #pragma mark VK_KHR_external_fence_capabilities extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceExternalFenceProperties);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceExternalFenceProperties, KHR);
 
 
 #pragma mark -
 #pragma mark VK_KHR_external_memory_capabilities extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceExternalBufferProperties);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceExternalBufferProperties, KHR);
 
 
 #pragma mark -
 #pragma mark VK_KHR_external_semaphore_capabilities extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceExternalSemaphoreProperties);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceExternalSemaphoreProperties, KHR);
 
 
 #pragma mark -
 #pragma mark VK_KHR_get_memory_requirements2 extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetBufferMemoryRequirements2);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetImageMemoryRequirements2);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetImageSparseMemoryRequirements2);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetBufferMemoryRequirements2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetImageMemoryRequirements2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetImageSparseMemoryRequirements2, KHR);
 
 
 #pragma mark -
 #pragma mark VK_KHR_get_physical_device_properties2 extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceFeatures2);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceProperties2);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceFormatProperties2);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceImageFormatProperties2);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceQueueFamilyProperties2);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceMemoryProperties2);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceSparseImageFormatProperties2);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceFeatures2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceProperties2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceFormatProperties2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceImageFormatProperties2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceQueueFamilyProperties2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceMemoryProperties2, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetPhysicalDeviceSparseImageFormatProperties2, KHR);
 
 
 #pragma mark -
 #pragma mark VK_KHR_maintenance1 extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkTrimCommandPool);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkTrimCommandPool, KHR);
 
 
 #pragma mark -
 #pragma mark VK_KHR_maintenance3 extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetDescriptorSetLayoutSupport);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetDescriptorSetLayoutSupport, KHR);
 
 
 #pragma mark -
@@ -2527,8 +2624,8 @@
 #pragma mark -
 #pragma mark VK_KHR_sampler_ycbcr_conversion extension
 
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCreateSamplerYcbcrConversion);
-MVK_PUBLIC_VULKAN_CORE_ALIAS(vkDestroySamplerYcbcrConversion);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCreateSamplerYcbcrConversion, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkDestroySamplerYcbcrConversion, KHR);
 
 
 #pragma mark -
@@ -2762,43 +2859,9 @@
 #pragma mark -
 #pragma mark VK_KHR_timeline_semaphore
 
-MVK_PUBLIC_VULKAN_SYMBOL VkResult vkGetSemaphoreCounterValueKHR(
-	VkDevice									device,
-	VkSemaphore									semaphore,
-	uint64_t*									pValue) {
-
-	MVKTraceVulkanCallStart();
-	VkResult rslt = MVKDevice::getMVKDevice(device)->getConfigurationResult();
-	if (rslt == VK_SUCCESS) {
-		auto* mvkSem4 = (MVKTimelineSemaphore*)semaphore;
-		*pValue = mvkSem4->getCounterValue();
-	}
-	MVKTraceVulkanCallEnd();
-	return rslt;
-}
-
-MVK_PUBLIC_VULKAN_SYMBOL VkResult vkSignalSemaphoreKHR(
-	VkDevice									device,
-	const VkSemaphoreSignalInfoKHR*				pSignalInfo) {
-
-	MVKTraceVulkanCallStart();
-	auto* mvkSem4 = (MVKTimelineSemaphore*)pSignalInfo->semaphore;
-	mvkSem4->signal(pSignalInfo);
-	MVKTraceVulkanCallEnd();
-	return VK_SUCCESS;
-}
-
-MVK_PUBLIC_VULKAN_SYMBOL VkResult vkWaitSemaphoresKHR(
-	VkDevice									device,
-	const VkSemaphoreWaitInfoKHR*				pWaitInfo,
-	uint64_t									timeout) {
-
-	MVKTraceVulkanCallStart();
-	MVKDevice* mvkDev = MVKDevice::getMVKDevice(device);
-	VkResult rslt = mvkWaitSemaphores(mvkDev, pWaitInfo, timeout);
-	MVKTraceVulkanCallEnd();
-	return rslt;
-}
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkGetSemaphoreCounterValue, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkSignalSemaphore, KHR);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkWaitSemaphores, KHR);
 
 
 #pragma mark -
@@ -3039,17 +3102,7 @@
 #pragma mark -
 #pragma mark VK_EXT_host_query_reset extension
 
-MVK_PUBLIC_VULKAN_SYMBOL void vkResetQueryPoolEXT(
-    VkDevice                                    device,
-    VkQueryPool                                 queryPool,
-    uint32_t                                    firstQuery,
-    uint32_t                                    queryCount) {
-
-	MVKTraceVulkanCallStart();
-    auto* mvkQueryPool = (MVKQueryPool*)queryPool;
-    mvkQueryPool->resetResults(firstQuery, queryCount, nullptr);
-	MVKTraceVulkanCallEnd();
-}
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkResetQueryPool, EXT);
 
 
 #pragma mark -
@@ -3192,6 +3245,12 @@
 }
 
 #pragma mark -
+#pragma mark VK_AMD_draw_indirect_count
+
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdDrawIndexedIndirectCount, AMD);
+MVK_PUBLIC_VULKAN_CORE_ALIAS(vkCmdDrawIndirectCount, AMD);
+
+#pragma mark -
 #pragma mark iOS & macOS surface extensions
 
 MVK_PUBLIC_VULKAN_SYMBOL VkResult vkCreate_PLATFORM_SurfaceMVK(