Create device

This commit is contained in:
hodasemi 2023-01-10 18:20:18 +01:00
parent 69f7fcb0c6
commit 39c28af575
7 changed files with 172 additions and 1278 deletions

42
src/device_handles.rs Normal file
View file

@ -0,0 +1,42 @@
use crate::instance_handles::instance_fns;
use vulkan_sys::prelude::*;
static mut DEVICE_FN_HANDLES: Option<VkDeviceHandles> = None;
pub fn device_fns() -> &'static VkDeviceHandles {
unsafe { DEVICE_FN_HANDLES.as_ref().unwrap() }
}
pub fn set_device_fns(handles: VkDeviceHandles) {
unsafe { DEVICE_FN_HANDLES = Some(handles) };
}
pub struct VkDeviceHandles {
pub device: VkDevice,
pub device_functions: DeviceFunctions,
pub device_wsi_functions: DeviceWSIFunctions,
pub maintenance3_functions: Maintenance3Functions,
pub acceleration_structure_functions: AccelerationStructureFunctions,
pub ray_tracing_pipeline_functions: RayTracingPipelineFunctions,
pub deferred_operation_functions: DeferredOperationsFunctions,
}
impl VkDeviceHandles {
pub fn new(device: VkDevice) -> Self {
let instance = &instance_fns().instance_functions;
Self {
device,
device_functions: DeviceFunctions::new(instance, device),
device_wsi_functions: DeviceWSIFunctions::new(instance, device),
maintenance3_functions: Maintenance3Functions::new(instance, device),
acceleration_structure_functions: AccelerationStructureFunctions::new(instance, device),
ray_tracing_pipeline_functions: RayTracingPipelineFunctions::new(instance, device),
deferred_operation_functions: DeferredOperationsFunctions::new(instance, device),
}
}
}

View file

@ -1,354 +0,0 @@
#![allow(non_camel_case_types)]
use vulkan_sys::prelude::*;
// instance
pub type PFN_GetPhysicalDeviceProcAddr = PFN_vkVoidFunction;
pub type PFN_vkEnumerateDeviceLayerProperties = PFN_vkVoidFunction;
pub type PFN_vkEnumerateInstanceVersion = PFN_vkVoidFunction;
pub type PFN_vkEnumeratePhysicalDeviceGroups = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceFeatures2 = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceProperties2 = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceFormatProperties2 = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceImageFormatProperties2 = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceExternalBufferProperties = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceExternalFenceProperties = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceExternalSemaphoreProperties = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceToolProperties = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDevicePresentRectanglesKHR = PFN_vkVoidFunction;
pub type PFN_vkEnumeratePhysicalDeviceGroupsKHR = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR = PFN_vkVoidFunction;
pub type PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceDisplayProperties2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetDisplayModeProperties2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetDisplayPlaneCapabilities2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR = PFN_vkVoidFunction;
pub type PFN_vkDebugReportMessageEXT = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT = PFN_vkVoidFunction;
pub type PFN_vkSubmitDebugUtilsMessageEXT = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceToolPropertiesEXT = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = PFN_vkVoidFunction;
pub type PFN_vkCreateHeadlessSurfaceEXT = PFN_vkVoidFunction;
pub type PFN_vkAcquireDrmDisplayEXT = PFN_vkVoidFunction;
pub type PFN_vkGetDrmDisplayEXT = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceSurfaceFormats2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetPhysicalDeviceQueueFamilyProperties2 = PFN_vkVoidFunction;
// device
pub type PFN_vkGetDeviceMemoryCommitment = PFN_vkVoidFunction;
pub type PFN_vkQueueBindSparse = PFN_vkVoidFunction;
pub type PFN_vkGetFenceStatus = PFN_vkVoidFunction;
pub type PFN_vkGetRenderAreaGranularity = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceGroupPeerMemoryFeatures = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDeviceMask = PFN_vkVoidFunction;
pub type PFN_vkCmdDispatchBase = PFN_vkVoidFunction;
pub type PFN_vkGetImageSparseMemoryRequirements2 = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceQueue2 = PFN_vkVoidFunction;
pub type PFN_vkCreateSamplerYcbcrConversion = PFN_vkVoidFunction;
pub type PFN_vkDestroySamplerYcbcrConversion = PFN_vkVoidFunction;
pub type PFN_vkCreateDescriptorUpdateTemplate = PFN_vkVoidFunction;
pub type PFN_vkDestroyDescriptorUpdateTemplate = PFN_vkVoidFunction;
pub type PFN_vkUpdateDescriptorSetWithTemplate = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawIndirectCount = PFN_vkVoidFunction;
pub type PFN_vkCreateRenderPass2 = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawIndexedIndirectCount = PFN_vkVoidFunction;
pub type PFN_vkCmdBeginRenderPass2 = PFN_vkVoidFunction;
pub type PFN_vkCmdNextSubpass2 = PFN_vkVoidFunction;
pub type PFN_vkCmdEndRenderPass2 = PFN_vkVoidFunction;
pub type PFN_vkResetQueryPool = PFN_vkVoidFunction;
pub type PFN_vkGetSemaphoreCounterValue = PFN_vkVoidFunction;
pub type PFN_vkWaitSemaphores = PFN_vkVoidFunction;
pub type PFN_vkSignalSemaphore = PFN_vkVoidFunction;
pub type PFN_vkGetBufferOpaqueCaptureAddress = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkVoidFunction;
pub type PFN_vkCreatePrivateDataSlot = PFN_vkVoidFunction;
pub type PFN_vkDestroyPrivateDataSlot = PFN_vkVoidFunction;
pub type PFN_vkSetPrivateData = PFN_vkVoidFunction;
pub type PFN_vkGetPrivateData = PFN_vkVoidFunction;
pub type PFN_vkCmdSetEvent2 = PFN_vkVoidFunction;
pub type PFN_vkCmdResetEvent2 = PFN_vkVoidFunction;
pub type PFN_vkCmdWaitEvents2 = PFN_vkVoidFunction;
pub type PFN_vkCmdPipelineBarrier2 = PFN_vkVoidFunction;
pub type PFN_vkCmdWriteTimestamp2 = PFN_vkVoidFunction;
pub type PFN_vkQueueSubmit2 = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyBuffer2 = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyImage2 = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyBufferToImage2 = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyImageToBuffer2 = PFN_vkVoidFunction;
pub type PFN_vkCmdBlitImage2 = PFN_vkVoidFunction;
pub type PFN_vkCmdResolveImage2 = PFN_vkVoidFunction;
pub type PFN_vkCmdBeginRendering = PFN_vkVoidFunction;
pub type PFN_vkCmdEndRendering = PFN_vkVoidFunction;
pub type PFN_vkCmdSetCullMode = PFN_vkVoidFunction;
pub type PFN_vkCmdSetFrontFace = PFN_vkVoidFunction;
pub type PFN_vkCmdSetPrimitiveTopology = PFN_vkVoidFunction;
pub type PFN_vkCmdSetViewportWithCount = PFN_vkVoidFunction;
pub type PFN_vkCmdSetScissorWithCount = PFN_vkVoidFunction;
pub type PFN_vkCmdBindVertexBuffers2 = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthTestEnable = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthWriteEnable = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthCompareOp = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthBoundsTestEnable = PFN_vkVoidFunction;
pub type PFN_vkCmdSetStencilTestEnable = PFN_vkVoidFunction;
pub type PFN_vkCmdSetStencilOp = PFN_vkVoidFunction;
pub type PFN_vkCmdSetRasterizerDiscardEnable = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthBiasEnable = PFN_vkVoidFunction;
pub type PFN_vkCmdSetPrimitiveRestartEnable = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceBufferMemoryRequirements = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceImageMemoryRequirements = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceImageSparseMemoryRequirements = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkVoidFunction;
pub type PFN_vkAcquireNextImage2KHR = PFN_vkVoidFunction;
pub type PFN_vkCreateSharedSwapchainsKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdBeginRenderingKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdEndRenderingKHR = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDeviceMaskKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdDispatchBaseKHR = PFN_vkVoidFunction;
pub type PFN_vkTrimCommandPoolKHR = PFN_vkVoidFunction;
pub type PFN_vkGetMemoryFdKHR = PFN_vkVoidFunction;
pub type PFN_vkGetMemoryFdPropertiesKHR = PFN_vkVoidFunction;
pub type PFN_vkImportSemaphoreFdKHR = PFN_vkVoidFunction;
pub type PFN_vkGetSemaphoreFdKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdPushDescriptorSetKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkVoidFunction;
pub type PFN_vkCreateDescriptorUpdateTemplateKHR = PFN_vkVoidFunction;
pub type PFN_vkDestroyDescriptorUpdateTemplateKHR = PFN_vkVoidFunction;
pub type PFN_vkUpdateDescriptorSetWithTemplateKHR = PFN_vkVoidFunction;
pub type PFN_vkCreateRenderPass2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdBeginRenderPass2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdNextSubpass2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdEndRenderPass2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetSwapchainStatusKHR = PFN_vkVoidFunction;
pub type PFN_vkImportFenceFdKHR = PFN_vkVoidFunction;
pub type PFN_vkGetFenceFdKHR = PFN_vkVoidFunction;
pub type PFN_vkAcquireProfilingLockKHR = PFN_vkVoidFunction;
pub type PFN_vkReleaseProfilingLockKHR = PFN_vkVoidFunction;
pub type PFN_vkGetImageMemoryRequirements2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetBufferMemoryRequirements2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetImageSparseMemoryRequirements2KHR = PFN_vkVoidFunction;
pub type PFN_vkDestroySamplerYcbcrConversionKHR = PFN_vkVoidFunction;
pub type PFN_vkCreateSamplerYcbcrConversionKHR = PFN_vkVoidFunction;
pub type PFN_vkBindBufferMemory2KHR = PFN_vkVoidFunction;
pub type PFN_vkBindImageMemory2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetDescriptorSetLayoutSupportKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawIndirectCountKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawIndexedIndirectCountKHR = PFN_vkVoidFunction;
pub type PFN_vkGetSemaphoreCounterValueKHR = PFN_vkVoidFunction;
pub type PFN_vkWaitSemaphoresKHR = PFN_vkVoidFunction;
pub type PFN_vkSignalSemaphoreKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdSetFragmentShadingRateKHR = PFN_vkVoidFunction;
pub type PFN_vkWaitForPresentKHR = PFN_vkVoidFunction;
pub type PFN_vkGetBufferDeviceAddressKHR = PFN_vkVoidFunction;
pub type PFN_vkGetBufferOpaqueCaptureAddressKHR = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkVoidFunction;
pub type PFN_vkGetPipelineExecutablePropertiesKHR = PFN_vkVoidFunction;
pub type PFN_vkGetPipelineExecutableStatisticsKHR = PFN_vkVoidFunction;
pub type PFN_vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkVoidFunction;
pub type PFN_vkCmdSetEvent2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdResetEvent2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdWaitEvents2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdPipelineBarrier2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdWriteTimestamp2KHR = PFN_vkVoidFunction;
pub type PFN_vkQueueSubmit2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdWriteBufferMarker2AMD = PFN_vkVoidFunction;
pub type PFN_vkGetQueueCheckpointData2NV = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyBuffer2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyImage2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyBufferToImage2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyImageToBuffer2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdResolveImage2KHR = PFN_vkVoidFunction;
pub type PFN_vkCmdTraceRaysIndirect2KHR = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceBufferMemoryRequirementsKHR = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceImageMemoryRequirementsKHR = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceImageSparseMemoryRequirementsKHR = PFN_vkVoidFunction;
pub type PFN_vkDebugMarkerSetObjectTagEXT = PFN_vkVoidFunction;
pub type PFN_vkDebugMarkerSetObjectNameEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdDebugMarkerBeginEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdDebugMarkerEndEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdDebugMarkerInsertEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdBindTransformFeedbackBuffersEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdBeginTransformFeedbackEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdEndTransformFeedbackEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdBeginQueryIndexedEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdEndQueryIndexedEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawIndirectByteCountEXT = PFN_vkVoidFunction;
pub type PFN_vkCreateCuModuleNVX = PFN_vkVoidFunction;
pub type PFN_vkCreateCuFunctionNVX = PFN_vkVoidFunction;
pub type PFN_vkDestroyCuModuleNVX = PFN_vkVoidFunction;
pub type PFN_vkDestroyCuFunctionNVX = PFN_vkVoidFunction;
pub type PFN_vkCmdCuLaunchKernelNVX = PFN_vkVoidFunction;
pub type PFN_vkGetImageViewHandleNVX = PFN_vkVoidFunction;
pub type PFN_vkGetImageViewAddressNVX = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawIndirectCountAMD = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawIndexedIndirectCountAMD = PFN_vkVoidFunction;
pub type PFN_vkGetShaderInfoAMD = PFN_vkVoidFunction;
pub type PFN_vkCmdBeginConditionalRenderingEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdEndConditionalRenderingEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetViewportWScalingNV = PFN_vkVoidFunction;
pub type PFN_vkDisplayPowerControlEXT = PFN_vkVoidFunction;
pub type PFN_vkRegisterDeviceEventEXT = PFN_vkVoidFunction;
pub type PFN_vkRegisterDisplayEventEXT = PFN_vkVoidFunction;
pub type PFN_vkGetSwapchainCounterEXT = PFN_vkVoidFunction;
pub type PFN_vkGetRefreshCycleDurationGOOGLE = PFN_vkVoidFunction;
pub type PFN_vkGetPastPresentationTimingGOOGLE = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDiscardRectangleEXT = PFN_vkVoidFunction;
pub type PFN_vkSetHdrMetadataEXT = PFN_vkVoidFunction;
pub type PFN_vkSetDebugUtilsObjectNameEXT = PFN_vkVoidFunction;
pub type PFN_vkSetDebugUtilsObjectTagEXT = PFN_vkVoidFunction;
pub type PFN_vkQueueBeginDebugUtilsLabelEXT = PFN_vkVoidFunction;
pub type PFN_vkQueueEndDebugUtilsLabelEXT = PFN_vkVoidFunction;
pub type PFN_vkQueueInsertDebugUtilsLabelEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdBeginDebugUtilsLabelEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdEndDebugUtilsLabelEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdInsertDebugUtilsLabelEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetSampleLocationsEXT = PFN_vkVoidFunction;
pub type PFN_vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkVoidFunction;
pub type PFN_vkCreateValidationCacheEXT = PFN_vkVoidFunction;
pub type PFN_vkDestroyValidationCacheEXT = PFN_vkVoidFunction;
pub type PFN_vkMergeValidationCachesEXT = PFN_vkVoidFunction;
pub type PFN_vkGetValidationCacheDataEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdBindShadingRateImageNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetViewportShadingRatePaletteNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetCoarseSampleOrderNV = PFN_vkVoidFunction;
pub type PFN_vkCreateAccelerationStructureNV = PFN_vkVoidFunction;
pub type PFN_vkDestroyAccelerationStructureNV = PFN_vkVoidFunction;
pub type PFN_vkGetAccelerationStructureMemoryRequirementsNV = PFN_vkVoidFunction;
pub type PFN_vkBindAccelerationStructureMemoryNV = PFN_vkVoidFunction;
pub type PFN_vkCmdBuildAccelerationStructureNV = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyAccelerationStructureNV = PFN_vkVoidFunction;
pub type PFN_vkCmdTraceRaysNV = PFN_vkVoidFunction;
pub type PFN_vkCreateRayTracingPipelinesNV = PFN_vkVoidFunction;
pub type PFN_vkGetRayTracingShaderGroupHandlesNV = PFN_vkVoidFunction;
pub type PFN_vkGetAccelerationStructureHandleNV = PFN_vkVoidFunction;
pub type PFN_vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkVoidFunction;
pub type PFN_vkCompileDeferredNV = PFN_vkVoidFunction;
pub type PFN_vkGetMemoryHostPointerPropertiesEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdWriteBufferMarkerAMD = PFN_vkVoidFunction;
pub type PFN_vkGetCalibratedTimestampsEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawMeshTasksNV = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawMeshTasksIndirectNV = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawMeshTasksIndirectCountNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetExclusiveScissorNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetCheckpointNV = PFN_vkVoidFunction;
pub type PFN_vkGetQueueCheckpointDataNV = PFN_vkVoidFunction;
pub type PFN_vkInitializePerformanceApiINTEL = PFN_vkVoidFunction;
pub type PFN_vkUninitializePerformanceApiINTEL = PFN_vkVoidFunction;
pub type PFN_vkCmdSetPerformanceMarkerINTEL = PFN_vkVoidFunction;
pub type PFN_vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkVoidFunction;
pub type PFN_vkCmdSetPerformanceOverrideINTEL = PFN_vkVoidFunction;
pub type PFN_vkAcquirePerformanceConfigurationINTEL = PFN_vkVoidFunction;
pub type PFN_vkQueueSetPerformanceConfigurationINTEL = PFN_vkVoidFunction;
pub type PFN_vkGetPerformanceParameterINTEL = PFN_vkVoidFunction;
pub type PFN_vkSetLocalDimmingAMD = PFN_vkVoidFunction;
pub type PFN_vkGetBufferDeviceAddressEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetLineStippleEXT = PFN_vkVoidFunction;
pub type PFN_vkResetQueryPoolEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetCullModeEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetPrimitiveTopologyEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetViewportWithCountEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetScissorWithCountEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdBindVertexBuffers2EXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthTestEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthWriteEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthCompareOpEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthBoundsTestEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetStencilTestEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetStencilOpEXT = PFN_vkVoidFunction;
pub type PFN_vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkVoidFunction;
pub type PFN_vkCmdPreprocessGeneratedCommandsNV = PFN_vkVoidFunction;
pub type PFN_vkCmdExecuteGeneratedCommandsNV = PFN_vkVoidFunction;
pub type PFN_vkCmdBindPipelineShaderGroupNV = PFN_vkVoidFunction;
pub type PFN_vkCreateIndirectCommandsLayoutNV = PFN_vkVoidFunction;
pub type PFN_vkDestroyIndirectCommandsLayoutNV = PFN_vkVoidFunction;
pub type PFN_vkCreatePrivateDataSlotEXT = PFN_vkVoidFunction;
pub type PFN_vkDestroyPrivateDataSlotEXT = PFN_vkVoidFunction;
pub type PFN_vkSetPrivateDataEXT = PFN_vkVoidFunction;
pub type PFN_vkGetPrivateDataEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetFragmentShadingRateEnumNV = PFN_vkVoidFunction;
pub type PFN_vkGetImageSubresourceLayout2EXT = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceFaultInfoEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetVertexInputEXT = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkVoidFunction;
pub type PFN_vkCmdSubpassShadingHUAWEI = PFN_vkVoidFunction;
pub type PFN_vkCmdBindInvocationMaskHUAWEI = PFN_vkVoidFunction;
pub type PFN_vkGetMemoryRemoteAddressNV = PFN_vkVoidFunction;
pub type PFN_vkGetPipelinePropertiesEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetPatchControlPointsEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetRasterizerDiscardEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthBiasEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetLogicOpEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetPrimitiveRestartEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetColorWriteEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawMultiEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawMultiIndexedEXT = PFN_vkVoidFunction;
pub type PFN_vkCreateMicromapEXT = PFN_vkVoidFunction;
pub type PFN_vkDestroyMicromapEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdBuildMicromapsEXT = PFN_vkVoidFunction;
pub type PFN_vkBuildMicromapsEXT = PFN_vkVoidFunction;
pub type PFN_vkCopyMicromapEXT = PFN_vkVoidFunction;
pub type PFN_vkCopyMicromapToMemoryEXT = PFN_vkVoidFunction;
pub type PFN_vkCopyMemoryToMicromapEXT = PFN_vkVoidFunction;
pub type PFN_vkWriteMicromapsPropertiesEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyMicromapEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyMicromapToMemoryEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdCopyMemoryToMicromapEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdWriteMicromapsPropertiesEXT = PFN_vkVoidFunction;
pub type PFN_vkGetDeviceMicromapCompatibilityEXT = PFN_vkVoidFunction;
pub type PFN_vkGetMicromapBuildSizesEXT = PFN_vkVoidFunction;
pub type PFN_vkSetDeviceMemoryPriorityEXT = PFN_vkVoidFunction;
pub type PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE = PFN_vkVoidFunction;
pub type PFN_vkGetDescriptorSetHostMappingVALVE = PFN_vkVoidFunction;
pub type PFN_vkCmdSetTessellationDomainOriginEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthClampEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetPolygonModeEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetRasterizationSamplesEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetSampleMaskEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetAlphaToCoverageEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetAlphaToOneEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetLogicOpEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetColorBlendEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetColorBlendEquationEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetColorWriteMaskEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetRasterizationStreamEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetConservativeRasterizationModeEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthClipEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetSampleLocationsEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetColorBlendAdvancedEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetProvokingVertexModeEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetLineRasterizationModeEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetLineStippleEnableEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetDepthClipNegativeOneToOneEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetViewportWScalingEnableNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetCoverageModulationModeNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetCoverageModulationTableEnableNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetCoverageModulationTableNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetShadingRateImageEnableNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetRepresentativeFragmentTestEnableNV = PFN_vkVoidFunction;
pub type PFN_vkCmdSetCoverageReductionModeNV = PFN_vkVoidFunction;
pub type PFN_vkGetShaderModuleIdentifierEXT = PFN_vkVoidFunction;
pub type PFN_vkGetShaderModuleCreateInfoIdentifierEXT = PFN_vkVoidFunction;
pub type PFN_vkCreateOpticalFlowSessionNV = PFN_vkVoidFunction;
pub type PFN_vkDestroyOpticalFlowSessionNV = PFN_vkVoidFunction;
pub type PFN_vkBindOpticalFlowSessionImageNV = PFN_vkVoidFunction;
pub type PFN_vkCmdOpticalFlowExecuteNV = PFN_vkVoidFunction;
pub type PFN_vkGetFramebufferTilePropertiesQCOM = PFN_vkVoidFunction;
pub type PFN_vkGetDynamicRenderingTilePropertiesQCOM = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawMeshTasksEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawMeshTasksIndirectEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdDrawMeshTasksIndirectCountEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdSetFrontFaceEXT = PFN_vkVoidFunction;
pub type PFN_vkCmdBlitImage2KHR = PFN_vkVoidFunction;

72
src/instance_handles.rs Normal file
View file

@ -0,0 +1,72 @@
use vulkan_sys::prelude::*;
static mut INSTANCE_FN_HANDLES: Option<VkInstanceHandles> = None;
pub fn instance_fns() -> &'static VkInstanceHandles {
unsafe { INSTANCE_FN_HANDLES.as_ref().unwrap() }
}
pub fn set_instance_fns(handles: VkInstanceHandles) {
unsafe { INSTANCE_FN_HANDLES = Some(handles) };
}
pub struct VkInstanceHandles {
pub instance: VkInstance,
pub static_functions: StaticFunctions,
pub entry_functions: EntryFunctions,
pub instance_functions: InstanceFunctions,
pub instance_wsi_functions: InstanceWSIFunctions,
pub physical_device_properties2_functions: PhysicalDeviceProperties2Functions,
pub debug_report_callback_functions: DebugReportCallbackFunctions,
pub debug_utils_messenger_functions: DebugUtilsMessengerFunctions,
}
impl VkInstanceHandles {
pub fn load_instance(
static_functions: StaticFunctions,
entry_functions: EntryFunctions,
instance: VkInstance,
) -> Self {
Self {
instance_functions: InstanceFunctions::new(&static_functions, instance),
instance_wsi_functions: InstanceWSIFunctions::new(&static_functions, instance),
physical_device_properties2_functions: PhysicalDeviceProperties2Functions::new(
&static_functions,
instance,
),
debug_report_callback_functions: DebugReportCallbackFunctions::new(
&static_functions,
instance,
),
debug_utils_messenger_functions: DebugUtilsMessengerFunctions::new(
&static_functions,
instance,
),
instance,
static_functions,
entry_functions,
}
}
}
macro_rules! cmp_vk_fn {
($name:ident, {$([$fns:ident, $fn_name:ident],)*}) => {
match $name {
$(
stringify!($fn_name) => return unsafe {
mem::transmute(
instance_fns()
.$fns
.$fn_name,
)
},
)*
_ => ()
}
}
}

View file

@ -1,667 +0,0 @@
#![allow(non_snake_case)]
use vulkan_sys::prelude::*;
use crate::dummy_functions::*;
#[derive(Clone, Default)]
// Device function pointer dispatch table
pub struct VkLayerDispatchTable {
// ---- Core 1_0 commands
pub GetDeviceProcAddr: Option<PFN_vkGetDeviceProcAddr>,
pub DestroyDevice: Option<PFN_vkDestroyDevice>,
pub GetDeviceQueue: Option<PFN_vkGetDeviceQueue>,
pub QueueSubmit: Option<PFN_vkQueueSubmit>,
pub QueueWaitIdle: Option<PFN_vkQueueWaitIdle>,
pub DeviceWaitIdle: Option<PFN_vkDeviceWaitIdle>,
pub AllocateMemory: Option<PFN_vkAllocateMemory>,
pub FreeMemory: Option<PFN_vkFreeMemory>,
pub MapMemory: Option<PFN_vkMapMemory>,
pub UnmapMemory: Option<PFN_vkUnmapMemory>,
pub FlushMappedMemoryRanges: Option<PFN_vkFlushMappedMemoryRanges>,
pub InvalidateMappedMemoryRanges: Option<PFN_vkInvalidateMappedMemoryRanges>,
pub GetDeviceMemoryCommitment: Option<PFN_vkGetDeviceMemoryCommitment>,
pub BindBufferMemory: Option<PFN_vkBindBufferMemory>,
pub BindImageMemory: Option<PFN_vkBindImageMemory>,
pub GetBufferMemoryRequirements: Option<PFN_vkGetBufferMemoryRequirements>,
pub GetImageMemoryRequirements: Option<PFN_vkGetImageMemoryRequirements>,
pub GetImageSparseMemoryRequirements: Option<PFN_vkGetImageSparseMemoryRequirements>,
pub QueueBindSparse: Option<PFN_vkQueueBindSparse>,
pub CreateFence: Option<PFN_vkCreateFence>,
pub DestroyFence: Option<PFN_vkDestroyFence>,
pub ResetFences: Option<PFN_vkResetFences>,
pub GetFenceStatus: Option<PFN_vkGetFenceStatus>,
pub WaitForFences: Option<PFN_vkWaitForFences>,
pub CreateSemaphore: Option<PFN_vkCreateSemaphore>,
pub DestroySemaphore: Option<PFN_vkDestroySemaphore>,
pub CreateEvent: Option<PFN_vkCreateEvent>,
pub DestroyEvent: Option<PFN_vkDestroyEvent>,
pub GetEventStatus: Option<PFN_vkGetEventStatus>,
pub SetEvent: Option<PFN_vkSetEvent>,
pub ResetEvent: Option<PFN_vkResetEvent>,
pub CreateQueryPool: Option<PFN_vkCreateQueryPool>,
pub DestroyQueryPool: Option<PFN_vkDestroyQueryPool>,
pub GetQueryPoolResults: Option<PFN_vkGetQueryPoolResults>,
pub CreateBuffer: Option<PFN_vkCreateBuffer>,
pub DestroyBuffer: Option<PFN_vkDestroyBuffer>,
pub CreateBufferView: Option<PFN_vkCreateBufferView>,
pub DestroyBufferView: Option<PFN_vkDestroyBufferView>,
pub CreateImage: Option<PFN_vkCreateImage>,
pub DestroyImage: Option<PFN_vkDestroyImage>,
pub GetImageSubresourceLayout: Option<PFN_vkGetImageSubresourceLayout>,
pub CreateImageView: Option<PFN_vkCreateImageView>,
pub DestroyImageView: Option<PFN_vkDestroyImageView>,
pub CreateShaderModule: Option<PFN_vkCreateShaderModule>,
pub DestroyShaderModule: Option<PFN_vkDestroyShaderModule>,
pub CreatePipelineCache: Option<PFN_vkCreatePipelineCache>,
pub DestroyPipelineCache: Option<PFN_vkDestroyPipelineCache>,
pub GetPipelineCacheData: Option<PFN_vkGetPipelineCacheData>,
pub MergePipelineCaches: Option<PFN_vkMergePipelineCaches>,
pub CreateGraphicsPipelines: Option<PFN_vkCreateGraphicsPipelines>,
pub CreateComputePipelines: Option<PFN_vkCreateComputePipelines>,
pub DestroyPipeline: Option<PFN_vkDestroyPipeline>,
pub CreatePipelineLayout: Option<PFN_vkCreatePipelineLayout>,
pub DestroyPipelineLayout: Option<PFN_vkDestroyPipelineLayout>,
pub CreateSampler: Option<PFN_vkCreateSampler>,
pub DestroySampler: Option<PFN_vkDestroySampler>,
pub CreateDescriptorSetLayout: Option<PFN_vkCreateDescriptorSetLayout>,
pub DestroyDescriptorSetLayout: Option<PFN_vkDestroyDescriptorSetLayout>,
pub CreateDescriptorPool: Option<PFN_vkCreateDescriptorPool>,
pub DestroyDescriptorPool: Option<PFN_vkDestroyDescriptorPool>,
pub ResetDescriptorPool: Option<PFN_vkResetDescriptorPool>,
pub AllocateDescriptorSets: Option<PFN_vkAllocateDescriptorSets>,
pub FreeDescriptorSets: Option<PFN_vkFreeDescriptorSets>,
pub UpdateDescriptorSets: Option<PFN_vkUpdateDescriptorSets>,
pub CreateFramebuffer: Option<PFN_vkCreateFramebuffer>,
pub DestroyFramebuffer: Option<PFN_vkDestroyFramebuffer>,
pub CreateRenderPass: Option<PFN_vkCreateRenderPass>,
pub DestroyRenderPass: Option<PFN_vkDestroyRenderPass>,
pub GetRenderAreaGranularity: Option<PFN_vkGetRenderAreaGranularity>,
pub CreateCommandPool: Option<PFN_vkCreateCommandPool>,
pub DestroyCommandPool: Option<PFN_vkDestroyCommandPool>,
pub ResetCommandPool: Option<PFN_vkResetCommandPool>,
pub AllocateCommandBuffers: Option<PFN_vkAllocateCommandBuffers>,
pub FreeCommandBuffers: Option<PFN_vkFreeCommandBuffers>,
pub BeginCommandBuffer: Option<PFN_vkBeginCommandBuffer>,
pub EndCommandBuffer: Option<PFN_vkEndCommandBuffer>,
pub ResetCommandBuffer: Option<PFN_vkResetCommandBuffer>,
pub CmdBindPipeline: Option<PFN_vkCmdBindPipeline>,
pub CmdSetViewport: Option<PFN_vkCmdSetViewport>,
pub CmdSetScissor: Option<PFN_vkCmdSetScissor>,
pub CmdSetLineWidth: Option<PFN_vkCmdSetLineWidth>,
pub CmdSetDepthBias: Option<PFN_vkCmdSetDepthBias>,
pub CmdSetBlendConstants: Option<PFN_vkCmdSetBlendConstants>,
pub CmdSetDepthBounds: Option<PFN_vkCmdSetDepthBounds>,
pub CmdSetStencilCompareMask: Option<PFN_vkCmdSetStencilCompareMask>,
pub CmdSetStencilWriteMask: Option<PFN_vkCmdSetStencilWriteMask>,
pub CmdSetStencilReference: Option<PFN_vkCmdSetStencilReference>,
pub CmdBindDescriptorSets: Option<PFN_vkCmdBindDescriptorSets>,
pub CmdBindIndexBuffer: Option<PFN_vkCmdBindIndexBuffer>,
pub CmdBindVertexBuffers: Option<PFN_vkCmdBindVertexBuffers>,
pub CmdDraw: Option<PFN_vkCmdDraw>,
pub CmdDrawIndexed: Option<PFN_vkCmdDrawIndexed>,
pub CmdDrawIndirect: Option<PFN_vkCmdDrawIndirect>,
pub CmdDrawIndexedIndirect: Option<PFN_vkCmdDrawIndexedIndirect>,
pub CmdDispatch: Option<PFN_vkCmdDispatch>,
pub CmdDispatchIndirect: Option<PFN_vkCmdDispatchIndirect>,
pub CmdCopyBuffer: Option<PFN_vkCmdCopyBuffer>,
pub CmdCopyImage: Option<PFN_vkCmdCopyImage>,
pub CmdBlitImage: Option<PFN_vkCmdBlitImage>,
pub CmdCopyBufferToImage: Option<PFN_vkCmdCopyBufferToImage>,
pub CmdCopyImageToBuffer: Option<PFN_vkCmdCopyImageToBuffer>,
pub CmdUpdateBuffer: Option<PFN_vkCmdUpdateBuffer>,
pub CmdFillBuffer: Option<PFN_vkCmdFillBuffer>,
pub CmdClearColorImage: Option<PFN_vkCmdClearColorImage>,
pub CmdClearDepthStencilImage: Option<PFN_vkCmdClearDepthStencilImage>,
pub CmdClearAttachments: Option<PFN_vkCmdClearAttachments>,
pub CmdResolveImage: Option<PFN_vkCmdResolveImage>,
pub CmdSetEvent: Option<PFN_vkCmdSetEvent>,
pub CmdResetEvent: Option<PFN_vkCmdResetEvent>,
pub CmdWaitEvents: Option<PFN_vkCmdWaitEvents>,
pub CmdPipelineBarrier: Option<PFN_vkCmdPipelineBarrier>,
pub CmdBeginQuery: Option<PFN_vkCmdBeginQuery>,
pub CmdEndQuery: Option<PFN_vkCmdEndQuery>,
pub CmdResetQueryPool: Option<PFN_vkCmdResetQueryPool>,
pub CmdWriteTimestamp: Option<PFN_vkCmdWriteTimestamp>,
pub CmdCopyQueryPoolResults: Option<PFN_vkCmdCopyQueryPoolResults>,
pub CmdPushConstants: Option<PFN_vkCmdPushConstants>,
pub CmdBeginRenderPass: Option<PFN_vkCmdBeginRenderPass>,
pub CmdNextSubpass: Option<PFN_vkCmdNextSubpass>,
pub CmdEndRenderPass: Option<PFN_vkCmdEndRenderPass>,
pub CmdExecuteCommands: Option<PFN_vkCmdExecuteCommands>,
// ---- Core 1_1 commands
pub BindBufferMemory2: Option<PFN_vkBindBufferMemory2>,
pub BindImageMemory2: Option<PFN_vkBindImageMemory2>,
pub GetDeviceGroupPeerMemoryFeatures: Option<PFN_vkGetDeviceGroupPeerMemoryFeatures>,
pub CmdSetDeviceMask: Option<PFN_vkCmdSetDeviceMask>,
pub CmdDispatchBase: Option<PFN_vkCmdDispatchBase>,
pub GetImageMemoryRequirements2: Option<PFN_vkGetImageMemoryRequirements2>,
pub GetBufferMemoryRequirements2: Option<PFN_vkGetBufferMemoryRequirements2>,
pub GetImageSparseMemoryRequirements2: Option<PFN_vkGetImageSparseMemoryRequirements2>,
pub TrimCommandPool: Option<PFN_vkTrimCommandPool>,
pub GetDeviceQueue2: Option<PFN_vkGetDeviceQueue2>,
pub CreateSamplerYcbcrConversion: Option<PFN_vkCreateSamplerYcbcrConversion>,
pub DestroySamplerYcbcrConversion: Option<PFN_vkDestroySamplerYcbcrConversion>,
pub CreateDescriptorUpdateTemplate: Option<PFN_vkCreateDescriptorUpdateTemplate>,
pub DestroyDescriptorUpdateTemplate: Option<PFN_vkDestroyDescriptorUpdateTemplate>,
pub UpdateDescriptorSetWithTemplate: Option<PFN_vkUpdateDescriptorSetWithTemplate>,
pub GetDescriptorSetLayoutSupport: Option<PFN_vkGetDescriptorSetLayoutSupport>,
// ---- Core 1_2 commands
pub CmdDrawIndirectCount: Option<PFN_vkCmdDrawIndirectCount>,
pub CmdDrawIndexedIndirectCount: Option<PFN_vkCmdDrawIndexedIndirectCount>,
pub CreateRenderPass2: Option<PFN_vkCreateRenderPass2>,
pub CmdBeginRenderPass2: Option<PFN_vkCmdBeginRenderPass2>,
pub CmdNextSubpass2: Option<PFN_vkCmdNextSubpass2>,
pub CmdEndRenderPass2: Option<PFN_vkCmdEndRenderPass2>,
pub ResetQueryPool: Option<PFN_vkResetQueryPool>,
pub GetSemaphoreCounterValue: Option<PFN_vkGetSemaphoreCounterValue>,
pub WaitSemaphores: Option<PFN_vkWaitSemaphores>,
pub SignalSemaphore: Option<PFN_vkSignalSemaphore>,
pub GetBufferDeviceAddress: Option<PFN_vkGetBufferDeviceAddress>,
pub GetBufferOpaqueCaptureAddress: Option<PFN_vkGetBufferOpaqueCaptureAddress>,
pub GetDeviceMemoryOpaqueCaptureAddress: Option<PFN_vkGetDeviceMemoryOpaqueCaptureAddress>,
// ---- Core 1_3 commands
pub CreatePrivateDataSlot: Option<PFN_vkCreatePrivateDataSlot>,
pub DestroyPrivateDataSlot: Option<PFN_vkDestroyPrivateDataSlot>,
pub SetPrivateData: Option<PFN_vkSetPrivateData>,
pub GetPrivateData: Option<PFN_vkGetPrivateData>,
pub CmdSetEvent2: Option<PFN_vkCmdSetEvent2>,
pub CmdResetEvent2: Option<PFN_vkCmdResetEvent2>,
pub CmdWaitEvents2: Option<PFN_vkCmdWaitEvents2>,
pub CmdPipelineBarrier2: Option<PFN_vkCmdPipelineBarrier2>,
pub CmdWriteTimestamp2: Option<PFN_vkCmdWriteTimestamp2>,
pub QueueSubmit2: Option<PFN_vkQueueSubmit2>,
pub CmdCopyBuffer2: Option<PFN_vkCmdCopyBuffer2>,
pub CmdCopyImage2: Option<PFN_vkCmdCopyImage2>,
pub CmdCopyBufferToImage2: Option<PFN_vkCmdCopyBufferToImage2>,
pub CmdCopyImageToBuffer2: Option<PFN_vkCmdCopyImageToBuffer2>,
pub CmdBlitImage2: Option<PFN_vkCmdBlitImage2>,
pub CmdResolveImage2: Option<PFN_vkCmdResolveImage2>,
pub CmdBeginRendering: Option<PFN_vkCmdBeginRendering>,
pub CmdEndRendering: Option<PFN_vkCmdEndRendering>,
pub CmdSetCullMode: Option<PFN_vkCmdSetCullMode>,
pub CmdSetFrontFace: Option<PFN_vkCmdSetFrontFace>,
pub CmdSetPrimitiveTopology: Option<PFN_vkCmdSetPrimitiveTopology>,
pub CmdSetViewportWithCount: Option<PFN_vkCmdSetViewportWithCount>,
pub CmdSetScissorWithCount: Option<PFN_vkCmdSetScissorWithCount>,
pub CmdBindVertexBuffers2: Option<PFN_vkCmdBindVertexBuffers2>,
pub CmdSetDepthTestEnable: Option<PFN_vkCmdSetDepthTestEnable>,
pub CmdSetDepthWriteEnable: Option<PFN_vkCmdSetDepthWriteEnable>,
pub CmdSetDepthCompareOp: Option<PFN_vkCmdSetDepthCompareOp>,
pub CmdSetDepthBoundsTestEnable: Option<PFN_vkCmdSetDepthBoundsTestEnable>,
pub CmdSetStencilTestEnable: Option<PFN_vkCmdSetStencilTestEnable>,
pub CmdSetStencilOp: Option<PFN_vkCmdSetStencilOp>,
pub CmdSetRasterizerDiscardEnable: Option<PFN_vkCmdSetRasterizerDiscardEnable>,
pub CmdSetDepthBiasEnable: Option<PFN_vkCmdSetDepthBiasEnable>,
pub CmdSetPrimitiveRestartEnable: Option<PFN_vkCmdSetPrimitiveRestartEnable>,
pub GetDeviceBufferMemoryRequirements: Option<PFN_vkGetDeviceBufferMemoryRequirements>,
pub GetDeviceImageMemoryRequirements: Option<PFN_vkGetDeviceImageMemoryRequirements>,
pub GetDeviceImageSparseMemoryRequirements:
Option<PFN_vkGetDeviceImageSparseMemoryRequirements>,
// ---- VK_KHR_swapchain extension commands
pub CreateSwapchainKHR: Option<PFN_vkCreateSwapchainKHR>,
pub DestroySwapchainKHR: Option<PFN_vkDestroySwapchainKHR>,
pub GetSwapchainImagesKHR: Option<PFN_vkGetSwapchainImagesKHR>,
pub AcquireNextImageKHR: Option<PFN_vkAcquireNextImageKHR>,
pub QueuePresentKHR: Option<PFN_vkQueuePresentKHR>,
pub GetDeviceGroupPresentCapabilitiesKHR: Option<PFN_vkGetDeviceGroupPresentCapabilitiesKHR>,
pub GetDeviceGroupSurfacePresentModesKHR: Option<PFN_vkGetDeviceGroupSurfacePresentModesKHR>,
pub AcquireNextImage2KHR: Option<PFN_vkAcquireNextImage2KHR>,
// ---- VK_KHR_display_swapchain extension commands
pub CreateSharedSwapchainsKHR: Option<PFN_vkCreateSharedSwapchainsKHR>,
// ---- VK_KHR_dynamic_rendering extension commands
pub CmdBeginRenderingKHR: Option<PFN_vkCmdBeginRenderingKHR>,
pub CmdEndRenderingKHR: Option<PFN_vkCmdEndRenderingKHR>,
// ---- VK_KHR_device_group extension commands
pub GetDeviceGroupPeerMemoryFeaturesKHR: Option<PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR>,
pub CmdSetDeviceMaskKHR: Option<PFN_vkCmdSetDeviceMaskKHR>,
pub CmdDispatchBaseKHR: Option<PFN_vkCmdDispatchBaseKHR>,
// ---- VK_KHR_maintenance1 extension commands
pub TrimCommandPoolKHR: Option<PFN_vkTrimCommandPoolKHR>,
// ---- VK_KHR_external_memory_fd extension commands
pub GetMemoryFdKHR: Option<PFN_vkGetMemoryFdKHR>,
pub GetMemoryFdPropertiesKHR: Option<PFN_vkGetMemoryFdPropertiesKHR>,
// ---- VK_KHR_external_semaphore_fd extension commands
pub ImportSemaphoreFdKHR: Option<PFN_vkImportSemaphoreFdKHR>,
pub GetSemaphoreFdKHR: Option<PFN_vkGetSemaphoreFdKHR>,
// ---- VK_KHR_push_descriptor extension commands
pub CmdPushDescriptorSetKHR: Option<PFN_vkCmdPushDescriptorSetKHR>,
pub CmdPushDescriptorSetWithTemplateKHR: Option<PFN_vkCmdPushDescriptorSetWithTemplateKHR>,
// ---- VK_KHR_descriptor_update_template extension commands
pub CreateDescriptorUpdateTemplateKHR: Option<PFN_vkCreateDescriptorUpdateTemplateKHR>,
pub DestroyDescriptorUpdateTemplateKHR: Option<PFN_vkDestroyDescriptorUpdateTemplateKHR>,
pub UpdateDescriptorSetWithTemplateKHR: Option<PFN_vkUpdateDescriptorSetWithTemplateKHR>,
// ---- VK_KHR_create_renderpass2 extension commands
pub CreateRenderPass2KHR: Option<PFN_vkCreateRenderPass2KHR>,
pub CmdBeginRenderPass2KHR: Option<PFN_vkCmdBeginRenderPass2KHR>,
pub CmdNextSubpass2KHR: Option<PFN_vkCmdNextSubpass2KHR>,
pub CmdEndRenderPass2KHR: Option<PFN_vkCmdEndRenderPass2KHR>,
// ---- VK_KHR_shared_presentable_image extension commands
pub GetSwapchainStatusKHR: Option<PFN_vkGetSwapchainStatusKHR>,
// ---- VK_KHR_external_fence_fd extension commands
pub ImportFenceFdKHR: Option<PFN_vkImportFenceFdKHR>,
pub GetFenceFdKHR: Option<PFN_vkGetFenceFdKHR>,
// ---- VK_KHR_performance_query extension commands
pub AcquireProfilingLockKHR: Option<PFN_vkAcquireProfilingLockKHR>,
pub ReleaseProfilingLockKHR: Option<PFN_vkReleaseProfilingLockKHR>,
// ---- VK_KHR_get_memory_requirements2 extension commands
pub GetImageMemoryRequirements2KHR: Option<PFN_vkGetImageMemoryRequirements2KHR>,
pub GetBufferMemoryRequirements2KHR: Option<PFN_vkGetBufferMemoryRequirements2KHR>,
pub GetImageSparseMemoryRequirements2KHR: Option<PFN_vkGetImageSparseMemoryRequirements2KHR>,
// ---- VK_KHR_sampler_ycbcr_conversion extension commands
pub CreateSamplerYcbcrConversionKHR: Option<PFN_vkCreateSamplerYcbcrConversionKHR>,
pub DestroySamplerYcbcrConversionKHR: Option<PFN_vkDestroySamplerYcbcrConversionKHR>,
// ---- VK_KHR_bind_memory2 extension commands
pub BindBufferMemory2KHR: Option<PFN_vkBindBufferMemory2KHR>,
pub BindImageMemory2KHR: Option<PFN_vkBindImageMemory2KHR>,
// ---- VK_KHR_maintenance3 extension commands
pub GetDescriptorSetLayoutSupportKHR: Option<PFN_vkGetDescriptorSetLayoutSupportKHR>,
// ---- VK_KHR_draw_indirect_count extension commands
pub CmdDrawIndirectCountKHR: Option<PFN_vkCmdDrawIndirectCountKHR>,
pub CmdDrawIndexedIndirectCountKHR: Option<PFN_vkCmdDrawIndexedIndirectCountKHR>,
// ---- VK_KHR_timeline_semaphore extension commands
pub GetSemaphoreCounterValueKHR: Option<PFN_vkGetSemaphoreCounterValueKHR>,
pub WaitSemaphoresKHR: Option<PFN_vkWaitSemaphoresKHR>,
pub SignalSemaphoreKHR: Option<PFN_vkSignalSemaphoreKHR>,
// ---- VK_KHR_fragment_shading_rate extension commands
pub CmdSetFragmentShadingRateKHR: Option<PFN_vkCmdSetFragmentShadingRateKHR>,
// ---- VK_KHR_present_wait extension commands
pub WaitForPresentKHR: Option<PFN_vkWaitForPresentKHR>,
// ---- VK_KHR_buffer_device_address extension commands
pub GetBufferDeviceAddressKHR: Option<PFN_vkGetBufferDeviceAddressKHR>,
pub GetBufferOpaqueCaptureAddressKHR: Option<PFN_vkGetBufferOpaqueCaptureAddressKHR>,
pub GetDeviceMemoryOpaqueCaptureAddressKHR:
Option<PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR>,
// ---- VK_KHR_deferred_host_operations extension commands
pub CreateDeferredOperationKHR: Option<PFN_vkCreateDeferredOperationKHR>,
pub DestroyDeferredOperationKHR: Option<PFN_vkDestroyDeferredOperationKHR>,
pub GetDeferredOperationMaxConcurrencyKHR: Option<PFN_vkGetDeferredOperationMaxConcurrencyKHR>,
pub GetDeferredOperationResultKHR: Option<PFN_vkGetDeferredOperationResultKHR>,
pub DeferredOperationJoinKHR: Option<PFN_vkDeferredOperationJoinKHR>,
// ---- VK_KHR_pipeline_executable_properties extension commands
pub GetPipelineExecutablePropertiesKHR: Option<PFN_vkGetPipelineExecutablePropertiesKHR>,
pub GetPipelineExecutableStatisticsKHR: Option<PFN_vkGetPipelineExecutableStatisticsKHR>,
pub GetPipelineExecutableInternalRepresentationsKHR:
Option<PFN_vkGetPipelineExecutableInternalRepresentationsKHR>,
// ---- VK_KHR_synchronization2 extension commands
pub CmdSetEvent2KHR: Option<PFN_vkCmdSetEvent2KHR>,
pub CmdResetEvent2KHR: Option<PFN_vkCmdResetEvent2KHR>,
pub CmdWaitEvents2KHR: Option<PFN_vkCmdWaitEvents2KHR>,
pub CmdPipelineBarrier2KHR: Option<PFN_vkCmdPipelineBarrier2KHR>,
pub CmdWriteTimestamp2KHR: Option<PFN_vkCmdWriteTimestamp2KHR>,
pub QueueSubmit2KHR: Option<PFN_vkQueueSubmit2KHR>,
pub CmdWriteBufferMarker2AMD: Option<PFN_vkCmdWriteBufferMarker2AMD>,
pub GetQueueCheckpointData2NV: Option<PFN_vkGetQueueCheckpointData2NV>,
// ---- VK_KHR_copy_commands2 extension commands
pub CmdCopyBuffer2KHR: Option<PFN_vkCmdCopyBuffer2KHR>,
pub CmdCopyImage2KHR: Option<PFN_vkCmdCopyImage2KHR>,
pub CmdCopyBufferToImage2KHR: Option<PFN_vkCmdCopyBufferToImage2KHR>,
pub CmdCopyImageToBuffer2KHR: Option<PFN_vkCmdCopyImageToBuffer2KHR>,
pub CmdBlitImage2KHR: Option<PFN_vkCmdBlitImage2KHR>,
pub CmdResolveImage2KHR: Option<PFN_vkCmdResolveImage2KHR>,
// ---- VK_KHR_ray_tracing_maintenance1 extension commands
pub CmdTraceRaysIndirect2KHR: Option<PFN_vkCmdTraceRaysIndirect2KHR>,
// ---- VK_KHR_maintenance4 extension commands
pub GetDeviceBufferMemoryRequirementsKHR: Option<PFN_vkGetDeviceBufferMemoryRequirementsKHR>,
pub GetDeviceImageMemoryRequirementsKHR: Option<PFN_vkGetDeviceImageMemoryRequirementsKHR>,
pub GetDeviceImageSparseMemoryRequirementsKHR:
Option<PFN_vkGetDeviceImageSparseMemoryRequirementsKHR>,
// ---- VK_EXT_debug_marker extension commands
pub DebugMarkerSetObjectTagEXT: Option<PFN_vkDebugMarkerSetObjectTagEXT>,
pub DebugMarkerSetObjectNameEXT: Option<PFN_vkDebugMarkerSetObjectNameEXT>,
pub CmdDebugMarkerBeginEXT: Option<PFN_vkCmdDebugMarkerBeginEXT>,
pub CmdDebugMarkerEndEXT: Option<PFN_vkCmdDebugMarkerEndEXT>,
pub CmdDebugMarkerInsertEXT: Option<PFN_vkCmdDebugMarkerInsertEXT>,
// ---- VK_EXT_transform_feedback extension commands
pub CmdBindTransformFeedbackBuffersEXT: Option<PFN_vkCmdBindTransformFeedbackBuffersEXT>,
pub CmdBeginTransformFeedbackEXT: Option<PFN_vkCmdBeginTransformFeedbackEXT>,
pub CmdEndTransformFeedbackEXT: Option<PFN_vkCmdEndTransformFeedbackEXT>,
pub CmdBeginQueryIndexedEXT: Option<PFN_vkCmdBeginQueryIndexedEXT>,
pub CmdEndQueryIndexedEXT: Option<PFN_vkCmdEndQueryIndexedEXT>,
pub CmdDrawIndirectByteCountEXT: Option<PFN_vkCmdDrawIndirectByteCountEXT>,
// ---- VK_NVX_binary_import extension commands
pub CreateCuModuleNVX: Option<PFN_vkCreateCuModuleNVX>,
pub CreateCuFunctionNVX: Option<PFN_vkCreateCuFunctionNVX>,
pub DestroyCuModuleNVX: Option<PFN_vkDestroyCuModuleNVX>,
pub DestroyCuFunctionNVX: Option<PFN_vkDestroyCuFunctionNVX>,
pub CmdCuLaunchKernelNVX: Option<PFN_vkCmdCuLaunchKernelNVX>,
// ---- VK_NVX_image_view_handle extension commands
pub GetImageViewHandleNVX: Option<PFN_vkGetImageViewHandleNVX>,
pub GetImageViewAddressNVX: Option<PFN_vkGetImageViewAddressNVX>,
// ---- VK_AMD_draw_indirect_count extension commands
pub CmdDrawIndirectCountAMD: Option<PFN_vkCmdDrawIndirectCountAMD>,
pub CmdDrawIndexedIndirectCountAMD: Option<PFN_vkCmdDrawIndexedIndirectCountAMD>,
// ---- VK_AMD_shader_info extension commands
pub GetShaderInfoAMD: Option<PFN_vkGetShaderInfoAMD>,
// ---- VK_EXT_conditional_rendering extension commands
pub CmdBeginConditionalRenderingEXT: Option<PFN_vkCmdBeginConditionalRenderingEXT>,
pub CmdEndConditionalRenderingEXT: Option<PFN_vkCmdEndConditionalRenderingEXT>,
// ---- VK_NV_clip_space_w_scaling extension commands
pub CmdSetViewportWScalingNV: Option<PFN_vkCmdSetViewportWScalingNV>,
// ---- VK_EXT_display_control extension commands
pub DisplayPowerControlEXT: Option<PFN_vkDisplayPowerControlEXT>,
pub RegisterDeviceEventEXT: Option<PFN_vkRegisterDeviceEventEXT>,
pub RegisterDisplayEventEXT: Option<PFN_vkRegisterDisplayEventEXT>,
pub GetSwapchainCounterEXT: Option<PFN_vkGetSwapchainCounterEXT>,
// ---- VK_GOOGLE_display_timing extension commands
pub GetRefreshCycleDurationGOOGLE: Option<PFN_vkGetRefreshCycleDurationGOOGLE>,
pub GetPastPresentationTimingGOOGLE: Option<PFN_vkGetPastPresentationTimingGOOGLE>,
// ---- VK_EXT_discard_rectangles extension commands
pub CmdSetDiscardRectangleEXT: Option<PFN_vkCmdSetDiscardRectangleEXT>,
// ---- VK_EXT_hdr_metadata extension commands
pub SetHdrMetadataEXT: Option<PFN_vkSetHdrMetadataEXT>,
// ---- VK_EXT_debug_utils extension commands
pub SetDebugUtilsObjectNameEXT: Option<PFN_vkSetDebugUtilsObjectNameEXT>,
pub SetDebugUtilsObjectTagEXT: Option<PFN_vkSetDebugUtilsObjectTagEXT>,
pub QueueBeginDebugUtilsLabelEXT: Option<PFN_vkQueueBeginDebugUtilsLabelEXT>,
pub QueueEndDebugUtilsLabelEXT: Option<PFN_vkQueueEndDebugUtilsLabelEXT>,
pub QueueInsertDebugUtilsLabelEXT: Option<PFN_vkQueueInsertDebugUtilsLabelEXT>,
pub CmdBeginDebugUtilsLabelEXT: Option<PFN_vkCmdBeginDebugUtilsLabelEXT>,
pub CmdEndDebugUtilsLabelEXT: Option<PFN_vkCmdEndDebugUtilsLabelEXT>,
pub CmdInsertDebugUtilsLabelEXT: Option<PFN_vkCmdInsertDebugUtilsLabelEXT>,
// ---- VK_EXT_sample_locations extension commands
pub CmdSetSampleLocationsEXT: Option<PFN_vkCmdSetSampleLocationsEXT>,
// ---- VK_EXT_image_drm_format_modifier extension commands
pub GetImageDrmFormatModifierPropertiesEXT:
Option<PFN_vkGetImageDrmFormatModifierPropertiesEXT>,
// ---- VK_EXT_validation_cache extension commands
pub CreateValidationCacheEXT: Option<PFN_vkCreateValidationCacheEXT>,
pub DestroyValidationCacheEXT: Option<PFN_vkDestroyValidationCacheEXT>,
pub MergeValidationCachesEXT: Option<PFN_vkMergeValidationCachesEXT>,
pub GetValidationCacheDataEXT: Option<PFN_vkGetValidationCacheDataEXT>,
// ---- VK_NV_shading_rate_image extension commands
pub CmdBindShadingRateImageNV: Option<PFN_vkCmdBindShadingRateImageNV>,
pub CmdSetViewportShadingRatePaletteNV: Option<PFN_vkCmdSetViewportShadingRatePaletteNV>,
pub CmdSetCoarseSampleOrderNV: Option<PFN_vkCmdSetCoarseSampleOrderNV>,
// ---- VK_NV_ray_tracing extension commands
pub CreateAccelerationStructureNV: Option<PFN_vkCreateAccelerationStructureNV>,
pub DestroyAccelerationStructureNV: Option<PFN_vkDestroyAccelerationStructureNV>,
pub GetAccelerationStructureMemoryRequirementsNV:
Option<PFN_vkGetAccelerationStructureMemoryRequirementsNV>,
pub BindAccelerationStructureMemoryNV: Option<PFN_vkBindAccelerationStructureMemoryNV>,
pub CmdBuildAccelerationStructureNV: Option<PFN_vkCmdBuildAccelerationStructureNV>,
pub CmdCopyAccelerationStructureNV: Option<PFN_vkCmdCopyAccelerationStructureNV>,
pub CmdTraceRaysNV: Option<PFN_vkCmdTraceRaysNV>,
pub CreateRayTracingPipelinesNV: Option<PFN_vkCreateRayTracingPipelinesNV>,
pub GetRayTracingShaderGroupHandlesKHR: Option<PFN_vkGetRayTracingShaderGroupHandlesKHR>,
pub GetRayTracingShaderGroupHandlesNV: Option<PFN_vkGetRayTracingShaderGroupHandlesNV>,
pub GetAccelerationStructureHandleNV: Option<PFN_vkGetAccelerationStructureHandleNV>,
pub CmdWriteAccelerationStructuresPropertiesNV:
Option<PFN_vkCmdWriteAccelerationStructuresPropertiesNV>,
pub CompileDeferredNV: Option<PFN_vkCompileDeferredNV>,
// ---- VK_EXT_external_memory_host extension commands
pub GetMemoryHostPointerPropertiesEXT: Option<PFN_vkGetMemoryHostPointerPropertiesEXT>,
// ---- VK_AMD_buffer_marker extension commands
pub CmdWriteBufferMarkerAMD: Option<PFN_vkCmdWriteBufferMarkerAMD>,
// ---- VK_EXT_calibrated_timestamps extension commands
pub GetCalibratedTimestampsEXT: Option<PFN_vkGetCalibratedTimestampsEXT>,
// ---- VK_NV_mesh_shader extension commands
pub CmdDrawMeshTasksNV: Option<PFN_vkCmdDrawMeshTasksNV>,
pub CmdDrawMeshTasksIndirectNV: Option<PFN_vkCmdDrawMeshTasksIndirectNV>,
pub CmdDrawMeshTasksIndirectCountNV: Option<PFN_vkCmdDrawMeshTasksIndirectCountNV>,
// ---- VK_NV_scissor_exclusive extension commands
pub CmdSetExclusiveScissorNV: Option<PFN_vkCmdSetExclusiveScissorNV>,
// ---- VK_NV_device_diagnostic_checkpoints extension commands
pub CmdSetCheckpointNV: Option<PFN_vkCmdSetCheckpointNV>,
pub GetQueueCheckpointDataNV: Option<PFN_vkGetQueueCheckpointDataNV>,
// ---- VK_INTEL_performance_query extension commands
pub InitializePerformanceApiINTEL: Option<PFN_vkInitializePerformanceApiINTEL>,
pub UninitializePerformanceApiINTEL: Option<PFN_vkUninitializePerformanceApiINTEL>,
pub CmdSetPerformanceMarkerINTEL: Option<PFN_vkCmdSetPerformanceMarkerINTEL>,
pub CmdSetPerformanceStreamMarkerINTEL: Option<PFN_vkCmdSetPerformanceStreamMarkerINTEL>,
pub CmdSetPerformanceOverrideINTEL: Option<PFN_vkCmdSetPerformanceOverrideINTEL>,
pub AcquirePerformanceConfigurationINTEL: Option<PFN_vkAcquirePerformanceConfigurationINTEL>,
pub QueueSetPerformanceConfigurationINTEL: Option<PFN_vkQueueSetPerformanceConfigurationINTEL>,
pub GetPerformanceParameterINTEL: Option<PFN_vkGetPerformanceParameterINTEL>,
// ---- VK_AMD_display_native_hdr extension commands
pub SetLocalDimmingAMD: Option<PFN_vkSetLocalDimmingAMD>,
// ---- VK_EXT_buffer_device_address extension commands
pub GetBufferDeviceAddressEXT: Option<PFN_vkGetBufferDeviceAddressEXT>,
// ---- VK_EXT_line_rasterization extension commands
pub CmdSetLineStippleEXT: Option<PFN_vkCmdSetLineStippleEXT>,
// ---- VK_EXT_host_query_reset extension commands
pub ResetQueryPoolEXT: Option<PFN_vkResetQueryPoolEXT>,
// ---- VK_EXT_extended_dynamic_state extension commands
pub CmdSetCullModeEXT: Option<PFN_vkCmdSetCullModeEXT>,
pub CmdSetFrontFaceEXT: Option<PFN_vkCmdSetFrontFaceEXT>,
pub CmdSetPrimitiveTopologyEXT: Option<PFN_vkCmdSetPrimitiveTopologyEXT>,
pub CmdSetViewportWithCountEXT: Option<PFN_vkCmdSetViewportWithCountEXT>,
pub CmdSetScissorWithCountEXT: Option<PFN_vkCmdSetScissorWithCountEXT>,
pub CmdBindVertexBuffers2EXT: Option<PFN_vkCmdBindVertexBuffers2EXT>,
pub CmdSetDepthTestEnableEXT: Option<PFN_vkCmdSetDepthTestEnableEXT>,
pub CmdSetDepthWriteEnableEXT: Option<PFN_vkCmdSetDepthWriteEnableEXT>,
pub CmdSetDepthCompareOpEXT: Option<PFN_vkCmdSetDepthCompareOpEXT>,
pub CmdSetDepthBoundsTestEnableEXT: Option<PFN_vkCmdSetDepthBoundsTestEnableEXT>,
pub CmdSetStencilTestEnableEXT: Option<PFN_vkCmdSetStencilTestEnableEXT>,
pub CmdSetStencilOpEXT: Option<PFN_vkCmdSetStencilOpEXT>,
// ---- VK_NV_device_generated_commands extension commands
pub GetGeneratedCommandsMemoryRequirementsNV:
Option<PFN_vkGetGeneratedCommandsMemoryRequirementsNV>,
pub CmdPreprocessGeneratedCommandsNV: Option<PFN_vkCmdPreprocessGeneratedCommandsNV>,
pub CmdExecuteGeneratedCommandsNV: Option<PFN_vkCmdExecuteGeneratedCommandsNV>,
pub CmdBindPipelineShaderGroupNV: Option<PFN_vkCmdBindPipelineShaderGroupNV>,
pub CreateIndirectCommandsLayoutNV: Option<PFN_vkCreateIndirectCommandsLayoutNV>,
pub DestroyIndirectCommandsLayoutNV: Option<PFN_vkDestroyIndirectCommandsLayoutNV>,
// ---- VK_EXT_private_data extension commands
pub CreatePrivateDataSlotEXT: Option<PFN_vkCreatePrivateDataSlotEXT>,
pub DestroyPrivateDataSlotEXT: Option<PFN_vkDestroyPrivateDataSlotEXT>,
pub SetPrivateDataEXT: Option<PFN_vkSetPrivateDataEXT>,
pub GetPrivateDataEXT: Option<PFN_vkGetPrivateDataEXT>,
// ---- VK_NV_fragment_shading_rate_enums extension commands
pub CmdSetFragmentShadingRateEnumNV: Option<PFN_vkCmdSetFragmentShadingRateEnumNV>,
// ---- VK_EXT_image_compression_control extension commands
pub GetImageSubresourceLayout2EXT: Option<PFN_vkGetImageSubresourceLayout2EXT>,
// ---- VK_EXT_device_fault extension commands
pub GetDeviceFaultInfoEXT: Option<PFN_vkGetDeviceFaultInfoEXT>,
// ---- VK_EXT_vertex_input_dynamic_state extension commands
pub CmdSetVertexInputEXT: Option<PFN_vkCmdSetVertexInputEXT>,
// ---- VK_HUAWEI_subpass_shading extension commands
pub GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI:
Option<PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI>,
pub CmdSubpassShadingHUAWEI: Option<PFN_vkCmdSubpassShadingHUAWEI>,
// ---- VK_HUAWEI_invocation_mask extension commands
pub CmdBindInvocationMaskHUAWEI: Option<PFN_vkCmdBindInvocationMaskHUAWEI>,
// ---- VK_NV_external_memory_rdma extension commands
pub GetMemoryRemoteAddressNV: Option<PFN_vkGetMemoryRemoteAddressNV>,
// ---- VK_EXT_pipeline_properties extension commands
pub GetPipelinePropertiesEXT: Option<PFN_vkGetPipelinePropertiesEXT>,
// ---- VK_EXT_extended_dynamic_state2 extension commands
pub CmdSetPatchControlPointsEXT: Option<PFN_vkCmdSetPatchControlPointsEXT>,
pub CmdSetRasterizerDiscardEnableEXT: Option<PFN_vkCmdSetRasterizerDiscardEnableEXT>,
pub CmdSetDepthBiasEnableEXT: Option<PFN_vkCmdSetDepthBiasEnableEXT>,
pub CmdSetLogicOpEXT: Option<PFN_vkCmdSetLogicOpEXT>,
pub CmdSetPrimitiveRestartEnableEXT: Option<PFN_vkCmdSetPrimitiveRestartEnableEXT>,
// ---- VK_EXT_color_write_enable extension commands
pub CmdSetColorWriteEnableEXT: Option<PFN_vkCmdSetColorWriteEnableEXT>,
// ---- VK_EXT_multi_draw extension commands
pub CmdDrawMultiEXT: Option<PFN_vkCmdDrawMultiEXT>,
pub CmdDrawMultiIndexedEXT: Option<PFN_vkCmdDrawMultiIndexedEXT>,
// ---- VK_EXT_opacity_micromap extension commands
pub CreateMicromapEXT: Option<PFN_vkCreateMicromapEXT>,
pub DestroyMicromapEXT: Option<PFN_vkDestroyMicromapEXT>,
pub CmdBuildMicromapsEXT: Option<PFN_vkCmdBuildMicromapsEXT>,
pub BuildMicromapsEXT: Option<PFN_vkBuildMicromapsEXT>,
pub CopyMicromapEXT: Option<PFN_vkCopyMicromapEXT>,
pub CopyMicromapToMemoryEXT: Option<PFN_vkCopyMicromapToMemoryEXT>,
pub CopyMemoryToMicromapEXT: Option<PFN_vkCopyMemoryToMicromapEXT>,
pub WriteMicromapsPropertiesEXT: Option<PFN_vkWriteMicromapsPropertiesEXT>,
pub CmdCopyMicromapEXT: Option<PFN_vkCmdCopyMicromapEXT>,
pub CmdCopyMicromapToMemoryEXT: Option<PFN_vkCmdCopyMicromapToMemoryEXT>,
pub CmdCopyMemoryToMicromapEXT: Option<PFN_vkCmdCopyMemoryToMicromapEXT>,
pub CmdWriteMicromapsPropertiesEXT: Option<PFN_vkCmdWriteMicromapsPropertiesEXT>,
pub GetDeviceMicromapCompatibilityEXT: Option<PFN_vkGetDeviceMicromapCompatibilityEXT>,
pub GetMicromapBuildSizesEXT: Option<PFN_vkGetMicromapBuildSizesEXT>,
// ---- VK_EXT_pageable_device_local_memory extension commands
pub SetDeviceMemoryPriorityEXT: Option<PFN_vkSetDeviceMemoryPriorityEXT>,
// ---- VK_VALVE_descriptor_set_host_mapping extension commands
pub GetDescriptorSetLayoutHostMappingInfoVALVE:
Option<PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE>,
pub GetDescriptorSetHostMappingVALVE: Option<PFN_vkGetDescriptorSetHostMappingVALVE>,
// ---- VK_EXT_extended_dynamic_state3 extension commands
pub CmdSetTessellationDomainOriginEXT: Option<PFN_vkCmdSetTessellationDomainOriginEXT>,
pub CmdSetDepthClampEnableEXT: Option<PFN_vkCmdSetDepthClampEnableEXT>,
pub CmdSetPolygonModeEXT: Option<PFN_vkCmdSetPolygonModeEXT>,
pub CmdSetRasterizationSamplesEXT: Option<PFN_vkCmdSetRasterizationSamplesEXT>,
pub CmdSetSampleMaskEXT: Option<PFN_vkCmdSetSampleMaskEXT>,
pub CmdSetAlphaToCoverageEnableEXT: Option<PFN_vkCmdSetAlphaToCoverageEnableEXT>,
pub CmdSetAlphaToOneEnableEXT: Option<PFN_vkCmdSetAlphaToOneEnableEXT>,
pub CmdSetLogicOpEnableEXT: Option<PFN_vkCmdSetLogicOpEnableEXT>,
pub CmdSetColorBlendEnableEXT: Option<PFN_vkCmdSetColorBlendEnableEXT>,
pub CmdSetColorBlendEquationEXT: Option<PFN_vkCmdSetColorBlendEquationEXT>,
pub CmdSetColorWriteMaskEXT: Option<PFN_vkCmdSetColorWriteMaskEXT>,
pub CmdSetRasterizationStreamEXT: Option<PFN_vkCmdSetRasterizationStreamEXT>,
pub CmdSetConservativeRasterizationModeEXT:
Option<PFN_vkCmdSetConservativeRasterizationModeEXT>,
pub CmdSetExtraPrimitiveOverestimationSizeEXT:
Option<PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT>,
pub CmdSetDepthClipEnableEXT: Option<PFN_vkCmdSetDepthClipEnableEXT>,
pub CmdSetSampleLocationsEnableEXT: Option<PFN_vkCmdSetSampleLocationsEnableEXT>,
pub CmdSetColorBlendAdvancedEXT: Option<PFN_vkCmdSetColorBlendAdvancedEXT>,
pub CmdSetProvokingVertexModeEXT: Option<PFN_vkCmdSetProvokingVertexModeEXT>,
pub CmdSetLineRasterizationModeEXT: Option<PFN_vkCmdSetLineRasterizationModeEXT>,
pub CmdSetLineStippleEnableEXT: Option<PFN_vkCmdSetLineStippleEnableEXT>,
pub CmdSetDepthClipNegativeOneToOneEXT: Option<PFN_vkCmdSetDepthClipNegativeOneToOneEXT>,
pub CmdSetViewportWScalingEnableNV: Option<PFN_vkCmdSetViewportWScalingEnableNV>,
pub CmdSetViewportSwizzleNV: Option<PFN_vkCmdSetViewportWScalingEnableNV>,
pub CmdSetCoverageToColorEnableNV: Option<PFN_vkCmdSetViewportWScalingEnableNV>,
pub CmdSetCoverageToColorLocationNV: Option<PFN_vkCmdSetViewportWScalingEnableNV>,
pub CmdSetCoverageModulationModeNV: Option<PFN_vkCmdSetCoverageModulationModeNV>,
pub CmdSetCoverageModulationTableEnableNV: Option<PFN_vkCmdSetCoverageModulationTableEnableNV>,
pub CmdSetCoverageModulationTableNV: Option<PFN_vkCmdSetCoverageModulationTableNV>,
pub CmdSetShadingRateImageEnableNV: Option<PFN_vkCmdSetShadingRateImageEnableNV>,
pub CmdSetRepresentativeFragmentTestEnableNV:
Option<PFN_vkCmdSetRepresentativeFragmentTestEnableNV>,
pub CmdSetCoverageReductionModeNV: Option<PFN_vkCmdSetCoverageReductionModeNV>,
// ---- VK_EXT_shader_module_identifier extension commands
pub GetShaderModuleIdentifierEXT: Option<PFN_vkGetShaderModuleIdentifierEXT>,
pub GetShaderModuleCreateInfoIdentifierEXT:
Option<PFN_vkGetShaderModuleCreateInfoIdentifierEXT>,
// ---- VK_NV_optical_flow extension commands
pub CreateOpticalFlowSessionNV: Option<PFN_vkCreateOpticalFlowSessionNV>,
pub DestroyOpticalFlowSessionNV: Option<PFN_vkDestroyOpticalFlowSessionNV>,
pub BindOpticalFlowSessionImageNV: Option<PFN_vkBindOpticalFlowSessionImageNV>,
pub CmdOpticalFlowExecuteNV: Option<PFN_vkCmdOpticalFlowExecuteNV>,
// ---- VK_QCOM_tile_properties extension commands
pub GetFramebufferTilePropertiesQCOM: Option<PFN_vkGetFramebufferTilePropertiesQCOM>,
pub GetDynamicRenderingTilePropertiesQCOM: Option<PFN_vkGetDynamicRenderingTilePropertiesQCOM>,
// ---- VK_KHR_acceleration_structure extension commands
pub CreateAccelerationStructureKHR: Option<PFN_vkCreateAccelerationStructureKHR>,
pub DestroyAccelerationStructureKHR: Option<PFN_vkDestroyAccelerationStructureKHR>,
pub CmdBuildAccelerationStructuresKHR: Option<PFN_vkCmdBuildAccelerationStructuresKHR>,
pub CmdBuildAccelerationStructuresIndirectKHR:
Option<PFN_vkCmdBuildAccelerationStructuresIndirectKHR>,
pub BuildAccelerationStructuresKHR: Option<PFN_vkBuildAccelerationStructuresKHR>,
pub CopyAccelerationStructureKHR: Option<PFN_vkCopyAccelerationStructureKHR>,
pub CopyAccelerationStructureToMemoryKHR: Option<PFN_vkCopyAccelerationStructureToMemoryKHR>,
pub CopyMemoryToAccelerationStructureKHR: Option<PFN_vkCopyMemoryToAccelerationStructureKHR>,
pub WriteAccelerationStructuresPropertiesKHR:
Option<PFN_vkWriteAccelerationStructuresPropertiesKHR>,
pub CmdCopyAccelerationStructureKHR: Option<PFN_vkCmdCopyAccelerationStructureKHR>,
pub CmdCopyAccelerationStructureToMemoryKHR:
Option<PFN_vkCmdCopyAccelerationStructureToMemoryKHR>,
pub CmdCopyMemoryToAccelerationStructureKHR:
Option<PFN_vkCmdCopyMemoryToAccelerationStructureKHR>,
pub GetAccelerationStructureDeviceAddressKHR:
Option<PFN_vkGetAccelerationStructureDeviceAddressKHR>,
pub CmdWriteAccelerationStructuresPropertiesKHR:
Option<PFN_vkCmdWriteAccelerationStructuresPropertiesKHR>,
pub GetDeviceAccelerationStructureCompatibilityKHR:
Option<PFN_vkGetDeviceAccelerationStructureCompatibilityKHR>,
pub GetAccelerationStructureBuildSizesKHR: Option<PFN_vkGetAccelerationStructureBuildSizesKHR>,
// ---- VK_KHR_ray_tracing_pipeline extension commands
pub CmdTraceRaysKHR: Option<PFN_vkCmdTraceRaysKHR>,
pub CreateRayTracingPipelinesKHR: Option<PFN_vkCreateRayTracingPipelinesKHR>,
pub GetRayTracingCaptureReplayShaderGroupHandlesKHR:
Option<PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR>,
pub CmdTraceRaysIndirectKHR: Option<PFN_vkCmdTraceRaysIndirectKHR>,
pub GetRayTracingShaderGroupStackSizeKHR: Option<PFN_vkGetRayTracingShaderGroupStackSizeKHR>,
pub CmdSetRayTracingPipelineStackSizeKHR: Option<PFN_vkCmdSetRayTracingPipelineStackSizeKHR>,
// ---- VK_EXT_mesh_shader extension commands
pub CmdDrawMeshTasksEXT: Option<PFN_vkCmdDrawMeshTasksEXT>,
pub CmdDrawMeshTasksIndirectEXT: Option<PFN_vkCmdDrawMeshTasksIndirectEXT>,
pub CmdDrawMeshTasksIndirectCountEXT: Option<PFN_vkCmdDrawMeshTasksIndirectCountEXT>,
}

View file

@ -1,175 +0,0 @@
#![allow(non_snake_case)]
use vulkan_sys::prelude::*;
use crate::dummy_functions::*;
#[derive(Clone, Default)]
pub struct VkLayerInstanceDispatchTable {
// Manually add in GetPhysicalDeviceProcAddr entry
pub GetPhysicalDeviceProcAddr: Option<PFN_GetPhysicalDeviceProcAddr>,
// ---- Core 1_0 commands
pub CreateInstance: Option<PFN_vkCreateInstance>,
pub DestroyInstance: Option<PFN_vkDestroyInstance>,
pub EnumeratePhysicalDevices: Option<PFN_vkEnumeratePhysicalDevices>,
pub GetPhysicalDeviceFeatures: Option<PFN_vkGetPhysicalDeviceFeatures>,
pub GetPhysicalDeviceFormatProperties: Option<PFN_vkGetPhysicalDeviceFormatProperties>,
pub GetPhysicalDeviceImageFormatProperties:
Option<PFN_vkGetPhysicalDeviceImageFormatProperties>,
pub GetPhysicalDeviceProperties: Option<PFN_vkGetPhysicalDeviceProperties>,
pub GetPhysicalDeviceQueueFamilyProperties:
Option<PFN_vkGetPhysicalDeviceQueueFamilyProperties>,
pub GetPhysicalDeviceMemoryProperties: Option<PFN_vkGetPhysicalDeviceMemoryProperties>,
pub GetInstanceProcAddr: Option<PFN_vkGetInstanceProcAddr>,
pub CreateDevice: Option<PFN_vkCreateDevice>,
pub EnumerateInstanceExtensionProperties: Option<PFN_vkEnumerateInstanceExtensionProperties>,
pub EnumerateDeviceExtensionProperties: Option<PFN_vkEnumerateDeviceExtensionProperties>,
pub EnumerateInstanceLayerProperties: Option<PFN_vkEnumerateInstanceLayerProperties>,
pub EnumerateDeviceLayerProperties: Option<PFN_vkEnumerateDeviceLayerProperties>,
pub GetPhysicalDeviceSparseImageFormatProperties:
Option<PFN_vkGetPhysicalDeviceSparseImageFormatProperties>,
// ---- Core 1_1 commands
pub EnumerateInstanceVersion: Option<PFN_vkEnumerateInstanceVersion>,
pub EnumeratePhysicalDeviceGroups: Option<PFN_vkEnumeratePhysicalDeviceGroups>,
pub GetPhysicalDeviceFeatures2: Option<PFN_vkGetPhysicalDeviceFeatures2>,
pub GetPhysicalDeviceProperties2: Option<PFN_vkGetPhysicalDeviceProperties2>,
pub GetPhysicalDeviceFormatProperties2: Option<PFN_vkGetPhysicalDeviceFormatProperties2>,
pub GetPhysicalDeviceImageFormatProperties2:
Option<PFN_vkGetPhysicalDeviceImageFormatProperties2>,
pub GetPhysicalDeviceQueueFamilyProperties2:
Option<PFN_vkGetPhysicalDeviceQueueFamilyProperties2>,
pub GetPhysicalDeviceMemoryProperties2: Option<PFN_vkGetPhysicalDeviceMemoryProperties2>,
pub GetPhysicalDeviceSparseImageFormatProperties2:
Option<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2>,
pub GetPhysicalDeviceExternalBufferProperties:
Option<PFN_vkGetPhysicalDeviceExternalBufferProperties>,
pub GetPhysicalDeviceExternalFenceProperties:
Option<PFN_vkGetPhysicalDeviceExternalFenceProperties>,
pub GetPhysicalDeviceExternalSemaphoreProperties:
Option<PFN_vkGetPhysicalDeviceExternalSemaphoreProperties>,
// ---- Core 1_3 commands
pub GetPhysicalDeviceToolProperties: Option<PFN_vkGetPhysicalDeviceToolProperties>,
// ---- VK_KHR_surface extension commands
pub DestroySurfaceKHR: Option<PFN_vkDestroySurfaceKHR>,
pub GetPhysicalDeviceSurfaceSupportKHR: Option<PFN_vkGetPhysicalDeviceSurfaceSupportKHR>,
pub GetPhysicalDeviceSurfaceCapabilitiesKHR:
Option<PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR>,
pub GetPhysicalDeviceSurfaceFormatsKHR: Option<PFN_vkGetPhysicalDeviceSurfaceFormatsKHR>,
pub GetPhysicalDeviceSurfacePresentModesKHR:
Option<PFN_vkGetPhysicalDeviceSurfacePresentModesKHR>,
// ---- VK_KHR_swapchain extension commands
pub GetPhysicalDevicePresentRectanglesKHR: Option<PFN_vkGetPhysicalDevicePresentRectanglesKHR>,
// ---- VK_KHR_display extension commands
pub GetPhysicalDeviceDisplayPropertiesKHR: Option<PFN_vkGetPhysicalDeviceDisplayPropertiesKHR>,
pub GetPhysicalDeviceDisplayPlanePropertiesKHR:
Option<PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR>,
pub GetDisplayPlaneSupportedDisplaysKHR: Option<PFN_vkGetDisplayPlaneSupportedDisplaysKHR>,
pub GetDisplayModePropertiesKHR: Option<PFN_vkGetDisplayModePropertiesKHR>,
pub CreateDisplayModeKHR: Option<PFN_vkCreateDisplayModeKHR>,
pub GetDisplayPlaneCapabilitiesKHR: Option<PFN_vkGetDisplayPlaneCapabilitiesKHR>,
pub CreateDisplayPlaneSurfaceKHR: Option<PFN_vkCreateDisplayPlaneSurfaceKHR>,
// ---- VK_KHR_get_physical_device_properties2 extension commands
pub GetPhysicalDeviceFeatures2KHR: Option<PFN_vkGetPhysicalDeviceFeatures2KHR>,
pub GetPhysicalDeviceProperties2KHR: Option<PFN_vkGetPhysicalDeviceProperties2KHR>,
pub GetPhysicalDeviceFormatProperties2KHR: Option<PFN_vkGetPhysicalDeviceFormatProperties2KHR>,
pub GetPhysicalDeviceImageFormatProperties2KHR:
Option<PFN_vkGetPhysicalDeviceImageFormatProperties2KHR>,
pub GetPhysicalDeviceQueueFamilyProperties2KHR:
Option<PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR>,
pub GetPhysicalDeviceMemoryProperties2KHR: Option<PFN_vkGetPhysicalDeviceMemoryProperties2KHR>,
pub GetPhysicalDeviceSparseImageFormatProperties2KHR:
Option<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR>,
// ---- VK_KHR_device_group_creation extension commands
pub EnumeratePhysicalDeviceGroupsKHR: Option<PFN_vkEnumeratePhysicalDeviceGroupsKHR>,
// ---- VK_KHR_external_memory_capabilities extension commands
pub GetPhysicalDeviceExternalBufferPropertiesKHR:
Option<PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR>,
// ---- VK_KHR_external_semaphore_capabilities extension commands
pub GetPhysicalDeviceExternalSemaphorePropertiesKHR:
Option<PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR>,
// ---- VK_KHR_external_fence_capabilities extension commands
pub GetPhysicalDeviceExternalFencePropertiesKHR:
Option<PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR>,
// ---- VK_KHR_performance_query extension commands
pub EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR:
Option<PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR>,
pub GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR:
Option<PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR>,
// ---- VK_KHR_get_surface_capabilities2 extension commands
pub GetPhysicalDeviceSurfaceCapabilities2KHR:
Option<PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR>,
pub GetPhysicalDeviceSurfaceFormats2KHR: Option<PFN_vkGetPhysicalDeviceSurfaceFormats2KHR>,
// ---- VK_KHR_get_display_properties2 extension commands
pub GetPhysicalDeviceDisplayProperties2KHR:
Option<PFN_vkGetPhysicalDeviceDisplayProperties2KHR>,
pub GetPhysicalDeviceDisplayPlaneProperties2KHR:
Option<PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR>,
pub GetDisplayModeProperties2KHR: Option<PFN_vkGetDisplayModeProperties2KHR>,
pub GetDisplayPlaneCapabilities2KHR: Option<PFN_vkGetDisplayPlaneCapabilities2KHR>,
// ---- VK_KHR_fragment_shading_rate extension commands
pub GetPhysicalDeviceFragmentShadingRatesKHR:
Option<PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR>,
// ---- VK_EXT_debug_report extension commands
pub CreateDebugReportCallbackEXT: Option<PFN_vkCreateDebugReportCallbackEXT>,
pub DestroyDebugReportCallbackEXT: Option<PFN_vkDestroyDebugReportCallbackEXT>,
pub DebugReportMessageEXT: Option<PFN_vkDebugReportMessageEXT>,
// ---- VK_NV_external_memory_capabilities extension commands
pub GetPhysicalDeviceExternalImageFormatPropertiesNV:
Option<PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV>,
// ---- VK_EXT_display_surface_counter extension commands
pub GetPhysicalDeviceSurfaceCapabilities2EXT:
Option<PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT>,
// ---- VK_EXT_debug_utils extension commands
pub CreateDebugUtilsMessengerEXT: Option<PFN_vkCreateDebugUtilsMessengerEXT>,
pub DestroyDebugUtilsMessengerEXT: Option<PFN_vkDestroyDebugUtilsMessengerEXT>,
pub SubmitDebugUtilsMessageEXT: Option<PFN_vkSubmitDebugUtilsMessageEXT>,
// ---- VK_EXT_sample_locations extension commands
pub GetPhysicalDeviceMultisamplePropertiesEXT:
Option<PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT>,
// ---- VK_EXT_calibrated_timestamps extension commands
pub GetPhysicalDeviceCalibrateableTimeDomainsEXT:
Option<PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT>,
// ---- VK_EXT_tooling_info extension commands
pub GetPhysicalDeviceToolPropertiesEXT: Option<PFN_vkGetPhysicalDeviceToolPropertiesEXT>,
// ---- VK_NV_cooperative_matrix extension commands
pub GetPhysicalDeviceCooperativeMatrixPropertiesNV:
Option<PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV>,
// ---- VK_NV_coverage_reduction_mode extension commands
pub GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV:
Option<PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV>,
// ---- VK_EXT_headless_surface extension commands
pub CreateHeadlessSurfaceEXT: Option<PFN_vkCreateHeadlessSurfaceEXT>,
// ---- VK_EXT_acquire_drm_display extension commands
pub AcquireDrmDisplayEXT: Option<PFN_vkAcquireDrmDisplayEXT>,
pub GetDrmDisplayEXT: Option<PFN_vkGetDrmDisplayEXT>,
// ---- VK_NV_optical_flow extension commands
pub GetPhysicalDeviceOpticalFlowImageFormatsNV:
Option<PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV>,
}

View file

@ -1,85 +1,18 @@
pub mod dummy_functions;
pub mod enums; pub mod enums;
pub mod layer_device_dispatch_table;
pub mod layer_instance_dispatch_table;
pub mod structs; pub mod structs;
use std::{ #[macro_use]
fs::OpenOptions, mod instance_handles;
io::Write, mod device_handles;
mem::{self},
os::raw::c_char,
ptr,
};
use std::{fs::OpenOptions, io::Write, mem, os::raw::c_char, ptr};
use device_handles::*;
use enums::*; use enums::*;
use instance_handles::*;
use structs::*; use structs::*;
use vulkan_sys::prelude::*; use vulkan_sys::prelude::*;
static mut INSTANCE_FN_HANDLES: Option<VkFunctionHandles> = None;
fn instance_fns() -> &'static VkFunctionHandles {
unsafe { INSTANCE_FN_HANDLES.as_ref().unwrap() }
}
pub struct VkFunctionHandles {
pub static_functions: StaticFunctions,
pub entry_functions: EntryFunctions,
pub instance_functions: InstanceFunctions,
pub instance_wsi_functions: InstanceWSIFunctions,
pub physical_device_properties2_functions: PhysicalDeviceProperties2Functions,
pub debug_report_callback_functions: DebugReportCallbackFunctions,
pub debug_utils_messenger_functions: DebugUtilsMessengerFunctions,
}
impl VkFunctionHandles {
pub fn load_instance(
static_functions: StaticFunctions,
entry_functions: EntryFunctions,
instance: VkInstance,
) -> Self {
Self {
instance_functions: InstanceFunctions::new(&static_functions, instance),
instance_wsi_functions: InstanceWSIFunctions::new(&static_functions, instance),
physical_device_properties2_functions: PhysicalDeviceProperties2Functions::new(
&static_functions,
instance,
),
debug_report_callback_functions: DebugReportCallbackFunctions::new(
&static_functions,
instance,
),
debug_utils_messenger_functions: DebugUtilsMessengerFunctions::new(
&static_functions,
instance,
),
static_functions,
entry_functions,
}
}
}
macro_rules! cmp_vk_fn {
($name:ident, {$([$fns:ident, $fn_name:ident],)*}) => {
match $name {
$(
stringify!($fn_name) => return unsafe {
mem::transmute(
instance_fns()
.$fns
.$fn_name,
)
},
)*
_ => ()
}
}
}
#[no_mangle] #[no_mangle]
#[allow(non_snake_case)] #[allow(non_snake_case)]
pub extern "C" fn vkNegotiateLoaderLayerInterfaceVersion( pub extern "C" fn vkNegotiateLoaderLayerInterfaceVersion(
@ -105,7 +38,7 @@ pub extern "C" fn vkNegotiateLoaderLayerInterfaceVersion(
#[no_mangle] #[no_mangle]
extern "system" fn get_device_proc_addr( extern "system" fn get_device_proc_addr(
device: VkDevice, _device: VkDevice,
function_name: *const c_char, function_name: *const c_char,
) -> PFN_vkVoidFunction { ) -> PFN_vkVoidFunction {
write_log("-> vulkan layer device proc addr"); write_log("-> vulkan layer device proc addr");
@ -115,7 +48,7 @@ extern "system" fn get_device_proc_addr(
#[no_mangle] #[no_mangle]
extern "system" fn get_instance_proc_addr( extern "system" fn get_instance_proc_addr(
instance: VkInstance, _instance: VkInstance,
function_name: *const c_char, function_name: *const c_char,
) -> PFN_vkVoidFunction { ) -> PFN_vkVoidFunction {
write_log("-> vulkan layer instance proc addr"); write_log("-> vulkan layer instance proc addr");
@ -204,7 +137,7 @@ extern "system" fn create_instance(
) { ) {
Some(info) => info, Some(info) => info,
None => { None => {
write_log("chain info not found."); write_log("instance chain info not found.");
return VK_ERROR_LAYER_NOT_PRESENT; return VK_ERROR_LAYER_NOT_PRESENT;
} }
}; };
@ -221,12 +154,13 @@ extern "system" fn create_instance(
let result = unsafe { entry_functions.vkCreateInstance(create_info, allocator, instance) }; let result = unsafe { entry_functions.vkCreateInstance(create_info, allocator, instance) };
if result != VK_SUCCESS { if result != VK_SUCCESS {
return result; return result;
} };
let function_handles = set_instance_fns(VkInstanceHandles::load_instance(
VkFunctionHandles::load_instance(static_functions, entry_functions, unsafe { *instance }); static_functions,
entry_functions,
unsafe { INSTANCE_FN_HANDLES = Some(function_handles) }; unsafe { *instance },
));
write_log("-> successfully created instance."); write_log("-> successfully created instance.");
@ -235,6 +169,12 @@ extern "system" fn create_instance(
extern "system" fn destroy_instance(instance: VkInstance, allocator: *const VkAllocationCallbacks) { extern "system" fn destroy_instance(instance: VkInstance, allocator: *const VkAllocationCallbacks) {
write_log(" ================== vulkan layer destroy instance =================="); write_log(" ================== vulkan layer destroy instance ==================");
unsafe {
instance_fns()
.instance_functions
.vkDestroyInstance(instance, allocator)
};
} }
extern "system" fn create_device( extern "system" fn create_device(
@ -245,11 +185,41 @@ extern "system" fn create_device(
) -> VkResult { ) -> VkResult {
write_log(" ================== vulkan layer create device =================="); write_log(" ================== vulkan layer create device ==================");
let chain_info =
match VkLayerDeviceCreateInfo::get_chain_info(unsafe { &*create_info }, VK_LAYER_LINK_INFO)
{
Some(info) => info,
None => {
write_log("device chain info not found.");
return VK_ERROR_LAYER_NOT_PRESENT;
}
};
chain_info.advance_layer_info();
let instance = instance_fns();
let result = unsafe {
instance
.instance_functions
.vkCreateDevice(physical_device, create_info, allocator, device)
};
if result != VK_SUCCESS {
return result;
}
set_device_fns(VkDeviceHandles::new(unsafe { *device }));
VK_SUCCESS VK_SUCCESS
} }
extern "system" fn destroy_device(device: VkDevice, allocator: *const VkAllocationCallbacks) { extern "system" fn destroy_device(device: VkDevice, allocator: *const VkAllocationCallbacks) {
write_log(" ================== vulkan layer destroy device =================="); write_log(" ================== vulkan layer destroy device ==================");
unsafe {
device_fns()
.device_functions
.vkDestroyDevice(device, allocator)
}
} }
fn write_log(msg: impl ToString) { fn write_log(msg: impl ToString) {

View file

@ -159,6 +159,12 @@ impl VkLayerDeviceCreateInfo {
debug_assert!(self.function == VK_LAYER_LINK_INFO); debug_assert!(self.function == VK_LAYER_LINK_INFO);
unsafe { &*self.u.layer_info } unsafe { &*self.u.layer_info }
} }
pub fn advance_layer_info(&mut self) {
debug_assert!(self.function == VK_LAYER_LINK_INFO);
unsafe { self.u.layer_info = (*self.u.layer_info).next }
}
} }
impl Drop for VkLayerDeviceCreateInfo { impl Drop for VkLayerDeviceCreateInfo {