Skip to content

Commit

Permalink
Merge pull request #55 from tannergooding/main
Browse files Browse the repository at this point in the history
Ensure new extension methods are properly marked as manual imports
  • Loading branch information
tannergooding authored Sep 3, 2022
2 parents 5652cd0 + eda1214 commit c2f5b4e
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 42 deletions.
20 changes: 15 additions & 5 deletions generation/remap-classes.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ vkBuildAccelerationStructuresKHR=VkDeviceManualImports
vkCmdBeginConditionalRenderingEXT=VkCommandBufferManualImports
vkCmdBeginDebugUtilsLabelEXT=VkCommandBufferManualImports
vkCmdBeginQueryIndexedEXT=VkCommandBufferManualImports
vkCmdBeginRenderingKHR=VkCommandBufferManualImports
vkCmdBeginRenderPass2KHR=VkCommandBufferManualImports
vkCmdBeginRenderingKHR=VkCommandBufferManualImports
vkCmdBeginTransformFeedbackEXT=VkCommandBufferManualImports
vkCmdBeginVideoCodingKHR=VkCommandBufferManualImports
vkCmdBindInvocationMaskHUAWEI=VkCommandBufferManualImports
Expand Down Expand Up @@ -55,8 +55,8 @@ vkCmdEncodeVideoKHR=VkCommandBufferManualImports
vkCmdEndConditionalRenderingEXT=VkCommandBufferManualImports
vkCmdEndDebugUtilsLabelEXT=VkCommandBufferManualImports
vkCmdEndQueryIndexedEXT=VkCommandBufferManualImports
vkCmdEndRenderingKHR=VkCommandBufferManualImports
vkCmdEndRenderPass2KHR=VkCommandBufferManualImports
vkCmdEndRenderingKHR=VkCommandBufferManualImports
vkCmdEndTransformFeedbackEXT=VkCommandBufferManualImports
vkCmdEndVideoCodingKHR=VkCommandBufferManualImports
vkCmdExecuteGeneratedCommandsNV=VkCommandBufferManualImports
Expand Down Expand Up @@ -100,9 +100,10 @@ vkCmdSetStencilOpEXT=VkCommandBufferManualImports
vkCmdSetStencilTestEnableEXT=VkCommandBufferManualImports
vkCmdSetVertexInputEXT=VkCommandBufferManualImports
vkCmdSetViewportShadingRatePaletteNV=VkCommandBufferManualImports
vkCmdSetViewportWithCountEXT=VkCommandBufferManualImports
vkCmdSetViewportWScalingNV=VkCommandBufferManualImports
vkCmdSetViewportWithCountEXT=VkCommandBufferManualImports
vkCmdSubpassShadingHUAWEI=VkCommandBufferManualImports
vkCmdTraceRaysIndirect2KHR=VkCommandBufferManualImports
vkCmdTraceRaysIndirectKHR=VkCommandBufferManualImports
vkCmdTraceRaysKHR=VkCommandBufferManualImports
vkCmdTraceRaysNV=VkCommandBufferManualImports
Expand All @@ -128,9 +129,9 @@ vkCreateDeferredOperationKHR=VkDeviceManualImports
vkCreateDescriptorUpdateTemplateKHR=VkDeviceManualImports
vkCreateDirectFBSurfaceEXT=VkInstanceManualImports
vkCreateHeadlessSurfaceEXT=VkInstanceManualImports
vkCreateIOSSurfaceMVK=VkInstanceManualImports
vkCreateImagePipeSurfaceFUCHSIA=VkInstanceManualImports
vkCreateIndirectCommandsLayoutNV=VkDeviceManualImports
vkCreateIOSSurfaceMVK=VkInstanceManualImports
vkCreateMacOSSurfaceMVK=VkInstanceManualImports
vkCreateMetalSurfaceEXT=VkInstanceManualImports
vkCreatePrivateDataSlotEXT=VkDeviceManualImports
Expand All @@ -141,9 +142,9 @@ vkCreateSamplerYcbcrConversionKHR=VkDeviceManualImports
vkCreateScreenSurfaceQNX=VkInstanceManualImports
vkCreateStreamDescriptorSurfaceGGP=VkInstanceManualImports
vkCreateValidationCacheEXT=VkDeviceManualImports
vkCreateViSurfaceNN=VkInstanceManualImports
vkCreateVideoSessionKHR=VkDeviceManualImports
vkCreateVideoSessionParametersKHR=VkDeviceManualImports
vkCreateViSurfaceNN=VkInstanceManualImports
vkCreateWaylandSurfaceKHR=VkInstanceManualImports
vkCreateWin32SurfaceKHR=VkInstanceManualImports
vkCreateXcbSurfaceKHR=VkInstanceManualImports
Expand All @@ -170,6 +171,7 @@ vkDestroyVideoSessionParametersKHR=VkDeviceManualImports
vkDisplayPowerControlEXT=VkDeviceManualImports
vkEnumeratePhysicalDeviceGroupsKHR=VkInstanceManualImports
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR=VkPhysicalDeviceManualImports
vkExportMetalObjectsEXT=VkDeviceManualImports
vkGetAccelerationStructureBuildSizesKHR=VkDeviceManualImports
vkGetAccelerationStructureDeviceAddressKHR=VkDeviceManualImports
vkGetAccelerationStructureHandleNV=VkDeviceManualImports
Expand All @@ -183,6 +185,8 @@ vkGetBufferOpaqueCaptureAddressKHR=VkDeviceManualImports
vkGetCalibratedTimestampsEXT=VkDeviceManualImports
vkGetDeferredOperationMaxConcurrencyKHR=VkDeviceManualImports
vkGetDeferredOperationResultKHR=VkDeviceManualImports
vkGetDescriptorSetHostMappingVALVE=VkDeviceManualImports
vkGetDescriptorSetLayoutHostMappingInfoVALVE=VkDeviceManualImports
vkGetDescriptorSetLayoutSupportKHR=VkDeviceManualImports
vkGetDeviceAccelerationStructureCompatibilityKHR=VkDeviceManualImports
vkGetDeviceBufferMemoryRequirementsKHR=VkDeviceManualImports
Expand All @@ -193,12 +197,15 @@ vkGetDeviceImageSparseMemoryRequirementsKHR=VkDeviceManualImports
vkGetDeviceMemoryOpaqueCaptureAddressKHR=VkDeviceManualImports
vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI=VkDeviceManualImports
vkGetDrmDisplayEXT=VkPhysicalDeviceManualImports
vkGetDynamicRenderingTilePropertiesQCOM=VkDeviceManualImports
vkGetFenceFdKHR=VkDeviceManualImports
vkGetFenceWin32HandleKHR=VkDeviceManualImports
vkGetFramebufferTilePropertiesQCOM=VkDeviceManualImports
vkGetGeneratedCommandsMemoryRequirementsNV=VkDeviceManualImports
vkGetImageDrmFormatModifierPropertiesEXT=VkDeviceManualImports
vkGetImageMemoryRequirements2KHR=VkDeviceManualImports
vkGetImageSparseMemoryRequirements2KHR=VkDeviceManualImports
vkGetImageSubresourceLayout2EXT=VkDeviceManualImports
vkGetImageViewAddressNVX=VkDeviceManualImports
vkGetImageViewHandleNVX=VkDeviceManualImports
vkGetMemoryAndroidHardwareBufferANDROID=VkDeviceManualImports
Expand Down Expand Up @@ -246,6 +253,7 @@ vkGetPhysicalDeviceXlibPresentationSupportKHR=VkPhysicalDeviceManualImports
vkGetPipelineExecutableInternalRepresentationsKHR=VkDeviceManualImports
vkGetPipelineExecutablePropertiesKHR=VkDeviceManualImports
vkGetPipelineExecutableStatisticsKHR=VkDeviceManualImports
vkGetPipelinePropertiesEXT=VkDeviceManualImports
vkGetPrivateDataEXT=VkDeviceManualImports
vkGetQueueCheckpointData2NV=VkQueueManualImports
vkGetQueueCheckpointDataNV=VkQueueManualImports
Expand All @@ -260,6 +268,8 @@ vkGetSemaphoreFdKHR=VkDeviceManualImports
vkGetSemaphoreWin32HandleKHR=VkDeviceManualImports
vkGetSemaphoreZirconHandleFUCHSIA=VkDeviceManualImports
vkGetShaderInfoAMD=VkDeviceManualImports
vkGetShaderModuleCreateInfoIdentifierEXT=VkDeviceManualImports
vkGetShaderModuleIdentifierEXT=VkDeviceManualImports
vkGetSwapchainCounterEXT=VkDeviceManualImports
vkGetSwapchainStatusKHR=VkDeviceManualImports
vkGetValidationCacheDataEXT=VkDeviceManualImports
Expand Down
20 changes: 15 additions & 5 deletions generation/remap-imports.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ vkBuildAccelerationStructuresKHR
vkCmdBeginConditionalRenderingEXT
vkCmdBeginDebugUtilsLabelEXT
vkCmdBeginQueryIndexedEXT
vkCmdBeginRenderingKHR
vkCmdBeginRenderPass2KHR
vkCmdBeginRenderingKHR
vkCmdBeginTransformFeedbackEXT
vkCmdBeginVideoCodingKHR
vkCmdBindInvocationMaskHUAWEI
Expand Down Expand Up @@ -55,8 +55,8 @@ vkCmdEncodeVideoKHR
vkCmdEndConditionalRenderingEXT
vkCmdEndDebugUtilsLabelEXT
vkCmdEndQueryIndexedEXT
vkCmdEndRenderingKHR
vkCmdEndRenderPass2KHR
vkCmdEndRenderingKHR
vkCmdEndTransformFeedbackEXT
vkCmdEndVideoCodingKHR
vkCmdExecuteGeneratedCommandsNV
Expand Down Expand Up @@ -100,9 +100,10 @@ vkCmdSetStencilOpEXT
vkCmdSetStencilTestEnableEXT
vkCmdSetVertexInputEXT
vkCmdSetViewportShadingRatePaletteNV
vkCmdSetViewportWithCountEXT
vkCmdSetViewportWScalingNV
vkCmdSetViewportWithCountEXT
vkCmdSubpassShadingHUAWEI
vkCmdTraceRaysIndirect2KHR
vkCmdTraceRaysIndirectKHR
vkCmdTraceRaysKHR
vkCmdTraceRaysNV
Expand All @@ -128,9 +129,9 @@ vkCreateDeferredOperationKHR
vkCreateDescriptorUpdateTemplateKHR
vkCreateDirectFBSurfaceEXT
vkCreateHeadlessSurfaceEXT
vkCreateIOSSurfaceMVK
vkCreateImagePipeSurfaceFUCHSIA
vkCreateIndirectCommandsLayoutNV
vkCreateIOSSurfaceMVK
vkCreateMacOSSurfaceMVK
vkCreateMetalSurfaceEXT
vkCreatePrivateDataSlotEXT
Expand All @@ -141,9 +142,9 @@ vkCreateSamplerYcbcrConversionKHR
vkCreateScreenSurfaceQNX
vkCreateStreamDescriptorSurfaceGGP
vkCreateValidationCacheEXT
vkCreateViSurfaceNN
vkCreateVideoSessionKHR
vkCreateVideoSessionParametersKHR
vkCreateViSurfaceNN
vkCreateWaylandSurfaceKHR
vkCreateWin32SurfaceKHR
vkCreateXcbSurfaceKHR
Expand All @@ -170,6 +171,7 @@ vkDestroyVideoSessionParametersKHR
vkDisplayPowerControlEXT
vkEnumeratePhysicalDeviceGroupsKHR
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
vkExportMetalObjectsEXT
vkGetAccelerationStructureBuildSizesKHR
vkGetAccelerationStructureDeviceAddressKHR
vkGetAccelerationStructureHandleNV
Expand All @@ -183,6 +185,8 @@ vkGetBufferOpaqueCaptureAddressKHR
vkGetCalibratedTimestampsEXT
vkGetDeferredOperationMaxConcurrencyKHR
vkGetDeferredOperationResultKHR
vkGetDescriptorSetHostMappingVALVE
vkGetDescriptorSetLayoutHostMappingInfoVALVE
vkGetDescriptorSetLayoutSupportKHR
vkGetDeviceAccelerationStructureCompatibilityKHR
vkGetDeviceBufferMemoryRequirementsKHR
Expand All @@ -193,12 +197,15 @@ vkGetDeviceImageSparseMemoryRequirementsKHR
vkGetDeviceMemoryOpaqueCaptureAddressKHR
vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI
vkGetDrmDisplayEXT
vkGetDynamicRenderingTilePropertiesQCOM
vkGetFenceFdKHR
vkGetFenceWin32HandleKHR
vkGetFramebufferTilePropertiesQCOM
vkGetGeneratedCommandsMemoryRequirementsNV
vkGetImageDrmFormatModifierPropertiesEXT
vkGetImageMemoryRequirements2KHR
vkGetImageSparseMemoryRequirements2KHR
vkGetImageSubresourceLayout2EXT
vkGetImageViewAddressNVX
vkGetImageViewHandleNVX
vkGetMemoryAndroidHardwareBufferANDROID
Expand Down Expand Up @@ -246,6 +253,7 @@ vkGetPhysicalDeviceXlibPresentationSupportKHR
vkGetPipelineExecutableInternalRepresentationsKHR
vkGetPipelineExecutablePropertiesKHR
vkGetPipelineExecutableStatisticsKHR
vkGetPipelinePropertiesEXT
vkGetPrivateDataEXT
vkGetQueueCheckpointData2NV
vkGetQueueCheckpointDataNV
Expand All @@ -260,6 +268,8 @@ vkGetSemaphoreFdKHR
vkGetSemaphoreWin32HandleKHR
vkGetSemaphoreZirconHandleFUCHSIA
vkGetShaderInfoAMD
vkGetShaderModuleCreateInfoIdentifierEXT
vkGetShaderModuleIdentifierEXT
vkGetSwapchainCounterEXT
vkGetSwapchainStatusKHR
vkGetValidationCacheDataEXT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public unsafe partial struct VkCommandBufferManualImports

public delegate* unmanaged<VkCommandBuffer, VkResolveImageInfo2*, void> vkCmdResolveImage2KHR;

public delegate* unmanaged<VkCommandBuffer, ulong, void> vkCmdTraceRaysIndirect2KHR;

public delegate* unmanaged<VkCommandBuffer, VkDebugMarkerMarkerInfoEXT*, void> vkCmdDebugMarkerBeginEXT;

public delegate* unmanaged<VkCommandBuffer, void> vkCmdDebugMarkerEndEXT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,28 @@ public unsafe partial struct VkDeviceManualImports

public delegate* unmanaged<VkDevice, VkObjectType, ulong, VkPrivateDataSlot, ulong*, void> vkGetPrivateDataEXT;

public delegate* unmanaged<VkDevice, VkImage, VkImageSubresource2EXT*, VkSubresourceLayout2EXT*, void> vkGetImageSubresourceLayout2EXT;

public delegate* unmanaged<VkDevice, VkRenderPass, VkExtent2D*, VkResult> vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI;

public delegate* unmanaged<VkDevice, VkMemoryGetRemoteAddressInfoNV*, void**, VkResult> vkGetMemoryRemoteAddressNV;

public delegate* unmanaged<VkDevice, VkPipelineInfoKHR*, VkBaseOutStructure*, VkResult> vkGetPipelinePropertiesEXT;

public delegate* unmanaged<VkDevice, VkDeviceMemory, float, void> vkSetDeviceMemoryPriorityEXT;

public delegate* unmanaged<VkDevice, VkDescriptorSetBindingReferenceVALVE*, VkDescriptorSetLayoutHostMappingInfoVALVE*, void> vkGetDescriptorSetLayoutHostMappingInfoVALVE;

public delegate* unmanaged<VkDevice, VkDescriptorSet, void**, void> vkGetDescriptorSetHostMappingVALVE;

public delegate* unmanaged<VkDevice, VkShaderModule, VkShaderModuleIdentifierEXT*, void> vkGetShaderModuleIdentifierEXT;

public delegate* unmanaged<VkDevice, VkShaderModuleCreateInfo*, VkShaderModuleIdentifierEXT*, void> vkGetShaderModuleCreateInfoIdentifierEXT;

public delegate* unmanaged<VkDevice, VkFramebuffer, uint*, VkTilePropertiesQCOM*, VkResult> vkGetFramebufferTilePropertiesQCOM;

public delegate* unmanaged<VkDevice, VkRenderingInfo*, VkTilePropertiesQCOM*, VkResult> vkGetDynamicRenderingTilePropertiesQCOM;

public delegate* unmanaged<VkDevice, VkAccelerationStructureCreateInfoKHR*, VkAllocationCallbacks*, VkAccelerationStructureKHR*, VkResult> vkCreateAccelerationStructureKHR;

public delegate* unmanaged<VkDevice, VkAccelerationStructureKHR, VkAllocationCallbacks*, void> vkDestroyAccelerationStructureKHR;
Expand Down
27 changes: 0 additions & 27 deletions sources/Interop/Vulkan/Vulkan/vulkan/vulkan_core/Vulkan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -738,33 +738,6 @@ public static unsafe partial class Vulkan
[DllImport("vulkan", ExactSpelling = true)]
public static extern VkResult vkGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, [NativeTypeName("const VkDisplayPlaneInfo2KHR *")] VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities);

[DllImport("vulkan", ExactSpelling = true)]
public static extern void vkCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, [NativeTypeName("VkDeviceAddress")] ulong indirectDeviceAddress);

[DllImport("vulkan", ExactSpelling = true)]
public static extern void vkGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, [NativeTypeName("const VkImageSubresource2EXT *")] VkImageSubresource2EXT* pSubresource, VkSubresourceLayout2EXT* pLayout);

[DllImport("vulkan", ExactSpelling = true)]
public static extern VkResult vkGetPipelinePropertiesEXT(VkDevice device, [NativeTypeName("const VkPipelineInfoEXT *")] VkPipelineInfoKHR* pPipelineInfo, VkBaseOutStructure* pPipelineProperties);

[DllImport("vulkan", ExactSpelling = true)]
public static extern void vkGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, [NativeTypeName("const VkDescriptorSetBindingReferenceVALVE *")] VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping);

[DllImport("vulkan", ExactSpelling = true)]
public static extern void vkGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData);

[DllImport("vulkan", ExactSpelling = true)]
public static extern void vkGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier);

[DllImport("vulkan", ExactSpelling = true)]
public static extern void vkGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, [NativeTypeName("const VkShaderModuleCreateInfo *")] VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier);

[DllImport("vulkan", ExactSpelling = true)]
public static extern VkResult vkGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, [NativeTypeName("uint32_t *")] uint* pPropertiesCount, VkTilePropertiesQCOM* pProperties);

[DllImport("vulkan", ExactSpelling = true)]
public static extern VkResult vkGetDynamicRenderingTilePropertiesQCOM(VkDevice device, [NativeTypeName("const VkRenderingInfo *")] VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties);

[NativeTypeName("#define VK_VERSION_1_0 1")]
public const int VK_VERSION_1_0 = 1;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from include/vulkan/vulkan_metal.h in the KhronosGroup/Vulkan-Headers repository for tag v1.3.224
// Original source is Copyright © 2015-2022 The Khronos Group Inc. Licensed under the Apache License v2.0 (Apache-2.0)

namespace TerraFX.Interop.Vulkan;

public unsafe partial struct VkDeviceManualImports
{
public delegate* unmanaged<VkDevice, VkExportMetalObjectsInfoEXT*, void> vkExportMetalObjectsEXT;
}
6 changes: 1 addition & 5 deletions sources/Interop/Vulkan/Vulkan/vulkan/vulkan_metal/Vulkan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
// Original source is Copyright © 2015-2022 The Khronos Group Inc. Licensed under the Apache License v2.0 (Apache-2.0)

using System;
using System.Runtime.InteropServices;

namespace TerraFX.Interop.Vulkan;

public static unsafe partial class Vulkan
public static partial class Vulkan
{
[DllImport("vulkan", ExactSpelling = true)]
public static extern void vkExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);

[NativeTypeName("#define VK_EXT_metal_surface 1")]
public const int VK_EXT_metal_surface = 1;

Expand Down

0 comments on commit c2f5b4e

Please sign in to comment.