diff --git a/Vulkan-Headers b/Vulkan-Headers index bae9700..bbe0f57 160000 --- a/Vulkan-Headers +++ b/Vulkan-Headers @@ -1 +1 @@ -Subproject commit bae9700cd9425541a0f6029957f005e5ad3ef660 +Subproject commit bbe0f575ebd6098369f0ac6c6a43532732ed0ba6 diff --git a/VulkanDeviceInfoExtensions.cpp b/VulkanDeviceInfoExtensions.cpp index 5872e8f..3b8534d 100644 --- a/VulkanDeviceInfoExtensions.cpp +++ b/VulkanDeviceInfoExtensions.cpp @@ -3,7 +3,7 @@ * * THIS HEADER IS AUTO-GENERATED, DO NOT CHANGE * - * Copyright (C) 2022 by Sascha Willems (www.saschawillems.de) + * Copyright (C) 2022-2023 by Sascha Willems (www.saschawillems.de) * * This code is free software, you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -77,6 +77,38 @@ void VulkanDeviceInfoExtensions::readPhysicalProperties_AMD() { delete extProps; } } +void VulkanDeviceInfoExtensions::readPhysicalProperties_AMDX() { + VkPhysicalDeviceProperties2 deviceProps2{}; + if (extensionSupported("VK_AMDX_shader_enqueue")) { + const char* extension("VK_AMDX_shader_enqueue"); + VkPhysicalDeviceShaderEnqueuePropertiesAMDX* extProps = new VkPhysicalDeviceShaderEnqueuePropertiesAMDX{}; + extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_PROPERTIES_AMDX; + deviceProps2 = initDeviceProperties2(extProps); + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + pushProperty2(extension, { { "extension", "VK_AMDX_shader_enqueue" }, { "name", "maxExecutionGraphDepth" }, { "value", extProps->maxExecutionGraphDepth } }); + pushProperty2(extension, { { "extension", "VK_AMDX_shader_enqueue" }, { "name", "maxExecutionGraphShaderOutputNodes" }, { "value", extProps->maxExecutionGraphShaderOutputNodes } }); + pushProperty2(extension, { { "extension", "VK_AMDX_shader_enqueue" }, { "name", "maxExecutionGraphShaderPayloadSize" }, { "value", extProps->maxExecutionGraphShaderPayloadSize } }); + pushProperty2(extension, { { "extension", "VK_AMDX_shader_enqueue" }, { "name", "maxExecutionGraphShaderPayloadCount" }, { "value", extProps->maxExecutionGraphShaderPayloadCount } }); + pushProperty2(extension, { { "extension", "VK_AMDX_shader_enqueue" }, { "name", "executionGraphDispatchAddressAlignment" }, { "value", extProps->executionGraphDispatchAddressAlignment } }); + delete extProps; + } +} +void VulkanDeviceInfoExtensions::readPhysicalProperties_ANDROID() { + VkPhysicalDeviceProperties2 deviceProps2{}; +#if defined(VK_USE_PLATFORM_ANDROID) + if (extensionSupported("VK_ANDROID_external_format_resolve")) { + const char* extension("VK_ANDROID_external_format_resolve"); + VkPhysicalDeviceExternalFormatResolvePropertiesANDROID* extProps = new VkPhysicalDeviceExternalFormatResolvePropertiesANDROID{}; + extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID; + deviceProps2 = initDeviceProperties2(extProps); + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + pushProperty2(extension, { { "extension", "VK_ANDROID_external_format_resolve" }, { "name", "nullColorAttachmentWithExternalFormatResolve" }, { "value", extProps->nullColorAttachmentWithExternalFormatResolve ? "true" : "false" } }); + pushProperty2(extension, { { "extension", "VK_ANDROID_external_format_resolve" }, { "name", "externalFormatResolveChromaOffsetX" }, { "value", extProps->externalFormatResolveChromaOffsetX } }); + pushProperty2(extension, { { "extension", "VK_ANDROID_external_format_resolve" }, { "name", "externalFormatResolveChromaOffsetY" }, { "value", extProps->externalFormatResolveChromaOffsetY } }); + delete extProps; + } +#endif +} void VulkanDeviceInfoExtensions::readPhysicalProperties_ARM() { VkPhysicalDeviceProperties2 deviceProps2{}; if (extensionSupported("VK_ARM_shader_core_properties")) { @@ -313,6 +345,29 @@ void VulkanDeviceInfoExtensions::readPhysicalProperties_EXT() { pushProperty2(extension, { { "extension", "VK_EXT_line_rasterization" }, { "name", "lineSubPixelPrecisionBits" }, { "value", extProps->lineSubPixelPrecisionBits } }); delete extProps; } + if (extensionSupported("VK_EXT_host_image_copy")) { + // This extension needs some special handling, this code has to be adjusted manually after header generation + const char* extension("VK_EXT_host_image_copy"); + VkPhysicalDeviceHostImageCopyPropertiesEXT* extProps = new VkPhysicalDeviceHostImageCopyPropertiesEXT{}; + extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT; + deviceProps2 = initDeviceProperties2(extProps); + // First call will return the sizes of the image format lists + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + pushProperty2(extension, { { "extension", "VK_EXT_host_image_copy" }, { "name", "copySrcLayoutCount" }, { "value", extProps->copySrcLayoutCount } }); + pushProperty2(extension, { { "extension", "VK_EXT_host_image_copy" }, { "name", "copyDstLayoutCount" }, { "value", extProps->copyDstLayoutCount } }); + pushProperty2(extension, { { "extension", "VK_EXT_host_image_copy" }, { "name", "optimalTilingLayoutUUID" }, { "value", extProps->optimalTilingLayoutUUID } }); + pushProperty2(extension, { { "extension", "VK_EXT_host_image_copy" }, { "name", "identicalMemoryTypeRequirements" }, { "value", extProps->identicalMemoryTypeRequirements ? "true" : "false" } }); + // Second call to get the source and destination format list + std::vector copySrcLayouts(extProps->copySrcLayoutCount); + std::vector copyDstLayouts(extProps->copyDstLayoutCount); + extProps->pCopySrcLayouts = copySrcLayouts.data(); + extProps->pCopyDstLayouts = copyDstLayouts.data(); + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + // Store them as serialized values + pushProperty2(extension, { { "extension", "VK_EXT_host_image_copy" }, { "name", "pCopySrcLayouts" }, { "value", copySrcLayouts } }); + pushProperty2(extension, { { "extension", "VK_EXT_host_image_copy" }, { "name", "pCopyDstLayouts" }, { "value", copyDstLayouts } }); + delete extProps; + } if (extensionSupported("VK_EXT_texel_buffer_alignment")) { const char* extension("VK_EXT_texel_buffer_alignment"); VkPhysicalDeviceTexelBufferAlignmentProperties* extProps = new VkPhysicalDeviceTexelBufferAlignmentProperties{}; @@ -487,6 +542,15 @@ void VulkanDeviceInfoExtensions::readPhysicalProperties_EXT() { pushProperty2(extension, { { "extension", "VK_EXT_opacity_micromap" }, { "name", "maxOpacity4StateSubdivisionLevel" }, { "value", extProps->maxOpacity4StateSubdivisionLevel } }); delete extProps; } + if (extensionSupported("VK_EXT_nested_command_buffer")) { + const char* extension("VK_EXT_nested_command_buffer"); + VkPhysicalDeviceNestedCommandBufferPropertiesEXT* extProps = new VkPhysicalDeviceNestedCommandBufferPropertiesEXT{}; + extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT; + deviceProps2 = initDeviceProperties2(extProps); + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + pushProperty2(extension, { { "extension", "VK_EXT_nested_command_buffer" }, { "name", "maxCommandBufferNestingLevel" }, { "value", extProps->maxCommandBufferNestingLevel } }); + delete extProps; + } if (extensionSupported("VK_EXT_extended_dynamic_state3")) { const char* extension("VK_EXT_extended_dynamic_state3"); VkPhysicalDeviceExtendedDynamicState3PropertiesEXT* extProps = new VkPhysicalDeviceExtendedDynamicState3PropertiesEXT{}; @@ -808,6 +872,41 @@ void VulkanDeviceInfoExtensions::readPhysicalProperties_KHR() { pushProperty2(extension, { { "extension", "VK_KHR_maintenance4" }, { "name", "maxBufferSize" }, { "value", extProps->maxBufferSize } }); delete extProps; } + if (extensionSupported("VK_KHR_maintenance5")) { + const char* extension("VK_KHR_maintenance5"); + VkPhysicalDeviceMaintenance5PropertiesKHR* extProps = new VkPhysicalDeviceMaintenance5PropertiesKHR{}; + extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR; + deviceProps2 = initDeviceProperties2(extProps); + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + pushProperty2(extension, { { "extension", "VK_KHR_maintenance5" }, { "name", "earlyFragmentMultisampleCoverageAfterSampleCounting" }, { "value", extProps->earlyFragmentMultisampleCoverageAfterSampleCounting ? "true" : "false" } }); + pushProperty2(extension, { { "extension", "VK_KHR_maintenance5" }, { "name", "earlyFragmentSampleMaskTestBeforeSampleCounting" }, { "value", extProps->earlyFragmentSampleMaskTestBeforeSampleCounting ? "true" : "false" } }); + pushProperty2(extension, { { "extension", "VK_KHR_maintenance5" }, { "name", "depthStencilSwizzleOneSupport" }, { "value", extProps->depthStencilSwizzleOneSupport ? "true" : "false" } }); + pushProperty2(extension, { { "extension", "VK_KHR_maintenance5" }, { "name", "polygonModePointSize" }, { "value", extProps->polygonModePointSize ? "true" : "false" } }); + pushProperty2(extension, { { "extension", "VK_KHR_maintenance5" }, { "name", "nonStrictSinglePixelWideLinesUseParallelogram" }, { "value", extProps->nonStrictSinglePixelWideLinesUseParallelogram ? "true" : "false" } }); + pushProperty2(extension, { { "extension", "VK_KHR_maintenance5" }, { "name", "nonStrictWideLinesUseParallelogram" }, { "value", extProps->nonStrictWideLinesUseParallelogram ? "true" : "false" } }); + delete extProps; + } + if (extensionSupported("VK_KHR_cooperative_matrix")) { + const char* extension("VK_KHR_cooperative_matrix"); + VkPhysicalDeviceCooperativeMatrixPropertiesKHR* extProps = new VkPhysicalDeviceCooperativeMatrixPropertiesKHR{}; + extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR; + deviceProps2 = initDeviceProperties2(extProps); + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + pushProperty2(extension, { { "extension", "VK_KHR_cooperative_matrix" }, { "name", "cooperativeMatrixSupportedStages" }, { "value", extProps->cooperativeMatrixSupportedStages } }); + delete extProps; + } +} +void VulkanDeviceInfoExtensions::readPhysicalProperties_MSFT() { + VkPhysicalDeviceProperties2 deviceProps2{}; + if (extensionSupported("VK_MSFT_layered_driver")) { + const char* extension("VK_MSFT_layered_driver"); + VkPhysicalDeviceLayeredDriverPropertiesMSFT* extProps = new VkPhysicalDeviceLayeredDriverPropertiesMSFT{}; + extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT; + deviceProps2 = initDeviceProperties2(extProps); + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + pushProperty2(extension, { { "extension", "VK_MSFT_layered_driver" }, { "name", "underlyingAPI" }, { "value", extProps->underlyingAPI } }); + delete extProps; + } } void VulkanDeviceInfoExtensions::readPhysicalProperties_NV() { VkPhysicalDeviceProperties2 deviceProps2{}; @@ -960,6 +1059,17 @@ void VulkanDeviceInfoExtensions::readPhysicalProperties_NV() { pushProperty2(extension, { { "extension", "VK_NV_ray_tracing_invocation_reorder" }, { "name", "rayTracingInvocationReorderReorderingHint" }, { "value", extProps->rayTracingInvocationReorderReorderingHint } }); delete extProps; } + if (extensionSupported("VK_NV_extended_sparse_address_space")) { + const char* extension("VK_NV_extended_sparse_address_space"); + VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV* extProps = new VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV{}; + extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_PROPERTIES_NV; + deviceProps2 = initDeviceProperties2(extProps); + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + pushProperty2(extension, { { "extension", "VK_NV_extended_sparse_address_space" }, { "name", "extendedSparseAddressSpaceSize" }, { "value", extProps->extendedSparseAddressSpaceSize } }); + pushProperty2(extension, { { "extension", "VK_NV_extended_sparse_address_space" }, { "name", "extendedSparseImageUsageFlags" }, { "value", extProps->extendedSparseImageUsageFlags } }); + pushProperty2(extension, { { "extension", "VK_NV_extended_sparse_address_space" }, { "name", "extendedSparseBufferUsageFlags" }, { "value", extProps->extendedSparseBufferUsageFlags } }); + delete extProps; + } } void VulkanDeviceInfoExtensions::readPhysicalProperties_NVX() { VkPhysicalDeviceProperties2 deviceProps2{}; @@ -996,15 +1106,27 @@ void VulkanDeviceInfoExtensions::readPhysicalProperties_QCOM() { pushProperty2(extension, { { "extension", "VK_QCOM_image_processing" }, { "name", "maxBoxFilterBlockSize" }, { "value", { extProps->maxBoxFilterBlockSize.width, extProps->maxBoxFilterBlockSize.height } } }); delete extProps; } + if (extensionSupported("VK_QCOM_image_processing2")) { + const char* extension("VK_QCOM_image_processing2"); + VkPhysicalDeviceImageProcessing2PropertiesQCOM* extProps = new VkPhysicalDeviceImageProcessing2PropertiesQCOM{}; + extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM; + deviceProps2 = initDeviceProperties2(extProps); + vulkanContext.vkGetPhysicalDeviceProperties2KHR(handle, &deviceProps2); + pushProperty2(extension, { { "extension", "VK_QCOM_image_processing2" }, { "name", "maxBlockMatchWindow" }, { "value", { extProps->maxBlockMatchWindow.width, extProps->maxBlockMatchWindow.height } } }); + delete extProps; + } } void VulkanDeviceInfoExtensions::readExtendedProperties() { readPhysicalProperties_AMD(); + readPhysicalProperties_AMDX(); + readPhysicalProperties_ANDROID(); readPhysicalProperties_ARM(); readPhysicalProperties_EXT(); readPhysicalProperties_HUAWEI(); readPhysicalProperties_KHR(); + readPhysicalProperties_MSFT(); readPhysicalProperties_NV(); readPhysicalProperties_NVX(); readPhysicalProperties_QCOM(); @@ -1042,6 +1164,32 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_AMD() { delete extFeatures; } } +void VulkanDeviceInfoExtensions::readPhysicalFeatures_AMDX() { + VkPhysicalDeviceFeatures2 deviceFeatures2{}; + if (extensionSupported("VK_AMDX_shader_enqueue")) { + const char* extension("VK_AMDX_shader_enqueue"); + VkPhysicalDeviceShaderEnqueueFeaturesAMDX* extFeatures = new VkPhysicalDeviceShaderEnqueueFeaturesAMDX{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "shaderEnqueue", extFeatures->shaderEnqueue); + delete extFeatures; + } +} +void VulkanDeviceInfoExtensions::readPhysicalFeatures_ANDROID() { + VkPhysicalDeviceFeatures2 deviceFeatures2{}; +#if defined(VK_USE_PLATFORM_ANDROID) + if (extensionSupported("VK_ANDROID_external_format_resolve")) { + const char* extension("VK_ANDROID_external_format_resolve"); + VkPhysicalDeviceExternalFormatResolveFeaturesANDROID* extFeatures = new VkPhysicalDeviceExternalFormatResolveFeaturesANDROID{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "externalFormatResolve", extFeatures->externalFormatResolve); + delete extFeatures; + } +#endif +} void VulkanDeviceInfoExtensions::readPhysicalFeatures_ARM() { VkPhysicalDeviceFeatures2 deviceFeatures2{}; if (extensionSupported("VK_ARM_rasterization_order_attachment_access")) { @@ -1331,6 +1479,15 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_EXT() { pushFeature2(extension, "extendedDynamicState", extFeatures->extendedDynamicState); delete extFeatures; } + if (extensionSupported("VK_EXT_host_image_copy")) { + const char* extension("VK_EXT_host_image_copy"); + VkPhysicalDeviceHostImageCopyFeaturesEXT* extFeatures = new VkPhysicalDeviceHostImageCopyFeaturesEXT{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "hostImageCopy", extFeatures->hostImageCopy); + delete extFeatures; + } if (extensionSupported("VK_EXT_shader_atomic_float2")) { const char* extension("VK_EXT_shader_atomic_float2"); VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT* extFeatures = new VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT{}; @@ -1378,6 +1535,18 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_EXT() { pushFeature2(extension, "texelBufferAlignment", extFeatures->texelBufferAlignment); delete extFeatures; } + if (extensionSupported("VK_EXT_depth_bias_control")) { + const char* extension("VK_EXT_depth_bias_control"); + VkPhysicalDeviceDepthBiasControlFeaturesEXT* extFeatures = new VkPhysicalDeviceDepthBiasControlFeaturesEXT{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "depthBiasControl", extFeatures->depthBiasControl); + pushFeature2(extension, "leastRepresentableValueForceUnormRepresentation", extFeatures->leastRepresentableValueForceUnormRepresentation); + pushFeature2(extension, "floatRepresentation", extFeatures->floatRepresentation); + pushFeature2(extension, "depthBiasExact", extFeatures->depthBiasExact); + delete extFeatures; + } if (extensionSupported("VK_EXT_device_memory_report")) { const char* extension("VK_EXT_device_memory_report"); VkPhysicalDeviceDeviceMemoryReportFeaturesEXT* extFeatures = new VkPhysicalDeviceDeviceMemoryReportFeaturesEXT{}; @@ -1580,6 +1749,15 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_EXT() { pushFeature2(extension, "pipelinePropertiesIdentifier", extFeatures->pipelinePropertiesIdentifier); delete extFeatures; } + if (extensionSupported("VK_EXT_frame_boundary")) { + const char* extension("VK_EXT_frame_boundary"); + VkPhysicalDeviceFrameBoundaryFeaturesEXT* extFeatures = new VkPhysicalDeviceFrameBoundaryFeaturesEXT{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "frameBoundary", extFeatures->frameBoundary); + delete extFeatures; + } if (extensionSupported("VK_EXT_multisampled_render_to_single_sampled")) { const char* extension("VK_EXT_multisampled_render_to_single_sampled"); VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT* extFeatures = new VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT{}; @@ -1734,6 +1912,17 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_EXT() { pushFeature2(extension, "imageCompressionControlSwapchain", extFeatures->imageCompressionControlSwapchain); delete extFeatures; } + if (extensionSupported("VK_EXT_nested_command_buffer")) { + const char* extension("VK_EXT_nested_command_buffer"); + VkPhysicalDeviceNestedCommandBufferFeaturesEXT* extFeatures = new VkPhysicalDeviceNestedCommandBufferFeaturesEXT{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "nestedCommandBuffer", extFeatures->nestedCommandBuffer); + pushFeature2(extension, "nestedCommandBufferRendering", extFeatures->nestedCommandBufferRendering); + pushFeature2(extension, "nestedCommandBufferSimultaneousUse", extFeatures->nestedCommandBufferSimultaneousUse); + delete extFeatures; + } if (extensionSupported("VK_EXT_extended_dynamic_state3")) { const char* extension("VK_EXT_extended_dynamic_state3"); VkPhysicalDeviceExtendedDynamicState3FeaturesEXT* extFeatures = new VkPhysicalDeviceExtendedDynamicState3FeaturesEXT{}; @@ -1847,6 +2036,15 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_EXT() { pushFeature2(extension, "pipelineLibraryGroupHandles", extFeatures->pipelineLibraryGroupHandles); delete extFeatures; } + if (extensionSupported("VK_EXT_dynamic_rendering_unused_attachments")) { + const char* extension("VK_EXT_dynamic_rendering_unused_attachments"); + VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT* extFeatures = new VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "dynamicRenderingUnusedAttachments", extFeatures->dynamicRenderingUnusedAttachments); + delete extFeatures; + } if (extensionSupported("VK_EXT_attachment_feedback_loop_dynamic_state")) { const char* extension("VK_EXT_attachment_feedback_loop_dynamic_state"); VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT* extFeatures = new VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT{}; @@ -2261,6 +2459,15 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_KHR() { pushFeature2(extension, "maintenance4", extFeatures->maintenance4); delete extFeatures; } + if (extensionSupported("VK_KHR_maintenance5")) { + const char* extension("VK_KHR_maintenance5"); + VkPhysicalDeviceMaintenance5FeaturesKHR* extFeatures = new VkPhysicalDeviceMaintenance5FeaturesKHR{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "maintenance5", extFeatures->maintenance5); + delete extFeatures; + } if (extensionSupported("VK_KHR_ray_tracing_position_fetch")) { const char* extension("VK_KHR_ray_tracing_position_fetch"); VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR* extFeatures = new VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR{}; @@ -2270,6 +2477,16 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_KHR() { pushFeature2(extension, "rayTracingPositionFetch", extFeatures->rayTracingPositionFetch); delete extFeatures; } + if (extensionSupported("VK_KHR_cooperative_matrix")) { + const char* extension("VK_KHR_cooperative_matrix"); + VkPhysicalDeviceCooperativeMatrixFeaturesKHR* extFeatures = new VkPhysicalDeviceCooperativeMatrixFeaturesKHR{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "cooperativeMatrix", extFeatures->cooperativeMatrix); + pushFeature2(extension, "cooperativeMatrixRobustBufferAccess", extFeatures->cooperativeMatrixRobustBufferAccess); + delete extFeatures; + } } void VulkanDeviceInfoExtensions::readPhysicalFeatures_NV() { VkPhysicalDeviceFeatures2 deviceFeatures2{}; @@ -2478,6 +2695,17 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_NV() { pushFeature2(extension, "memoryDecompression", extFeatures->memoryDecompression); delete extFeatures; } + if (extensionSupported("VK_NV_device_generated_commands_compute")) { + const char* extension("VK_NV_device_generated_commands_compute"); + VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV* extFeatures = new VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "deviceGeneratedCompute", extFeatures->deviceGeneratedCompute); + pushFeature2(extension, "deviceGeneratedComputePipelines", extFeatures->deviceGeneratedComputePipelines); + pushFeature2(extension, "deviceGeneratedComputeCaptureReplay", extFeatures->deviceGeneratedComputeCaptureReplay); + delete extFeatures; + } if (extensionSupported("VK_NV_linear_color_attachment")) { const char* extension("VK_NV_linear_color_attachment"); VkPhysicalDeviceLinearColorAttachmentFeaturesNV* extFeatures = new VkPhysicalDeviceLinearColorAttachmentFeaturesNV{}; @@ -2505,6 +2733,24 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_NV() { pushFeature2(extension, "rayTracingInvocationReorder", extFeatures->rayTracingInvocationReorder); delete extFeatures; } + if (extensionSupported("VK_NV_extended_sparse_address_space")) { + const char* extension("VK_NV_extended_sparse_address_space"); + VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV* extFeatures = new VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "extendedSparseAddressSpace", extFeatures->extendedSparseAddressSpace); + delete extFeatures; + } + if (extensionSupported("VK_NV_descriptor_pool_overallocation")) { + const char* extension("VK_NV_descriptor_pool_overallocation"); + VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV* extFeatures = new VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "descriptorPoolOverallocation", extFeatures->descriptorPoolOverallocation); + delete extFeatures; + } } void VulkanDeviceInfoExtensions::readPhysicalFeatures_QCOM() { VkPhysicalDeviceFeatures2 deviceFeatures2{}; @@ -2555,6 +2801,56 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_QCOM() { pushFeature2(extension, "multiviewPerViewRenderAreas", extFeatures->multiviewPerViewRenderAreas); delete extFeatures; } + if (extensionSupported("VK_QCOM_image_processing2")) { + const char* extension("VK_QCOM_image_processing2"); + VkPhysicalDeviceImageProcessing2FeaturesQCOM* extFeatures = new VkPhysicalDeviceImageProcessing2FeaturesQCOM{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "textureBlockMatch2", extFeatures->textureBlockMatch2); + delete extFeatures; + } + if (extensionSupported("VK_QCOM_filter_cubic_weights")) { + const char* extension("VK_QCOM_filter_cubic_weights"); + VkPhysicalDeviceCubicWeightsFeaturesQCOM* extFeatures = new VkPhysicalDeviceCubicWeightsFeaturesQCOM{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "selectableCubicWeights", extFeatures->selectableCubicWeights); + delete extFeatures; + } + if (extensionSupported("VK_QCOM_ycbcr_degamma")) { + const char* extension("VK_QCOM_ycbcr_degamma"); + VkPhysicalDeviceYcbcrDegammaFeaturesQCOM* extFeatures = new VkPhysicalDeviceYcbcrDegammaFeaturesQCOM{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "ycbcrDegamma", extFeatures->ycbcrDegamma); + delete extFeatures; + } + if (extensionSupported("VK_QCOM_filter_cubic_clamp")) { + const char* extension("VK_QCOM_filter_cubic_clamp"); + VkPhysicalDeviceCubicClampFeaturesQCOM* extFeatures = new VkPhysicalDeviceCubicClampFeaturesQCOM{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "cubicRangeClamp", extFeatures->cubicRangeClamp); + delete extFeatures; + } +} +void VulkanDeviceInfoExtensions::readPhysicalFeatures_QNX() { + VkPhysicalDeviceFeatures2 deviceFeatures2{}; +#if defined(VK_USE_PLATFORM_SCREEN_QNX) + if (extensionSupported("VK_QNX_external_memory_screen_buffer")) { + const char* extension("VK_QNX_external_memory_screen_buffer"); + VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX* extFeatures = new VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX{}; + extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX; + deviceFeatures2 = initDeviceFeatures2(extFeatures); + vulkanContext.vkGetPhysicalDeviceFeatures2KHR(handle, &deviceFeatures2); + pushFeature2(extension, "screenBufferImport", extFeatures->screenBufferImport); + delete extFeatures; + } +#endif } void VulkanDeviceInfoExtensions::readPhysicalFeatures_SEC() { VkPhysicalDeviceFeatures2 deviceFeatures2{}; @@ -2593,6 +2889,8 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_VALVE() { void VulkanDeviceInfoExtensions::readExtendedFeatures() { readPhysicalFeatures_AMD(); + readPhysicalFeatures_AMDX(); + readPhysicalFeatures_ANDROID(); readPhysicalFeatures_ARM(); readPhysicalFeatures_EXT(); readPhysicalFeatures_HUAWEI(); @@ -2600,6 +2898,7 @@ void VulkanDeviceInfoExtensions::readExtendedFeatures() { readPhysicalFeatures_KHR(); readPhysicalFeatures_NV(); readPhysicalFeatures_QCOM(); + readPhysicalFeatures_QNX(); readPhysicalFeatures_SEC(); readPhysicalFeatures_VALVE(); } diff --git a/VulkanDeviceInfoExtensions.h b/VulkanDeviceInfoExtensions.h index 876acf6..db45659 100644 --- a/VulkanDeviceInfoExtensions.h +++ b/VulkanDeviceInfoExtensions.h @@ -3,7 +3,7 @@ * * THIS HEADER IS AUTO-GENERATED, DO NOT CHANGE * - * Copyright (C) 2022 by Sascha Willems (www.saschawillems.de) + * Copyright (C) 2022-2023 by Sascha Willems (www.saschawillems.de) * * This code is free software, you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -55,6 +55,10 @@ class VulkanDeviceInfoExtensions bool extensionSupported(const char* extensionName); void readPhysicalFeatures_AMD(); void readPhysicalProperties_AMD(); + void readPhysicalFeatures_AMDX(); + void readPhysicalProperties_AMDX(); + void readPhysicalFeatures_ANDROID(); + void readPhysicalProperties_ANDROID(); void readPhysicalFeatures_ARM(); void readPhysicalProperties_ARM(); void readPhysicalFeatures_EXT(); @@ -64,16 +68,18 @@ class VulkanDeviceInfoExtensions void readPhysicalFeatures_INTEL(); void readPhysicalFeatures_KHR(); void readPhysicalProperties_KHR(); + void readPhysicalProperties_MSFT(); void readPhysicalFeatures_NV(); void readPhysicalProperties_NV(); void readPhysicalProperties_NVX(); void readPhysicalFeatures_QCOM(); void readPhysicalProperties_QCOM(); + void readPhysicalFeatures_QNX(); void readPhysicalFeatures_SEC(); void readPhysicalFeatures_VALVE(); public: - const uint32_t vkHeaderVersion = 250; + const uint32_t vkHeaderVersion = 267; std::vector features2; std::vector properties2; std::vector extensions; diff --git a/extensionlist.txt b/extensionlist.txt index 8c91dd3..f6ffc52 100644 --- a/extensionlist.txt +++ b/extensionlist.txt @@ -3,6 +3,10 @@ VK_AMD_shader_core_properties VK_AMD_shader_core_properties2 VK_AMD_device_coherent_memory VK_AMD_shader_early_and_late_fragment_tests +AMDX +VK_AMDX_shader_enqueue +ANDROID +VK_ANDROID_external_format_resolve ARM VK_ARM_rasterization_order_attachment_access VK_ARM_shader_core_properties @@ -38,10 +42,12 @@ VK_EXT_shader_atomic_float VK_EXT_host_query_reset VK_EXT_index_type_uint8 VK_EXT_extended_dynamic_state +VK_EXT_host_image_copy VK_EXT_shader_atomic_float2 VK_EXT_swapchain_maintenance1 VK_EXT_shader_demote_to_helper_invocation VK_EXT_texel_buffer_alignment +VK_EXT_depth_bias_control VK_EXT_device_memory_report VK_EXT_robustness2 VK_EXT_custom_border_color @@ -64,6 +70,7 @@ VK_EXT_device_address_binding_report VK_EXT_depth_clip_control VK_EXT_primitive_topology_list_restart VK_EXT_pipeline_properties +VK_EXT_frame_boundary VK_EXT_multisampled_render_to_single_sampled VK_EXT_extended_dynamic_state2 VK_EXT_color_write_enable @@ -80,6 +87,7 @@ VK_EXT_image_sliced_view_of_3d VK_EXT_depth_clamp_zero_one VK_EXT_non_seamless_cube_map VK_EXT_image_compression_control_swapchain +VK_EXT_nested_command_buffer VK_EXT_extended_dynamic_state3 VK_EXT_subpass_merge_feedback VK_EXT_shader_module_identifier @@ -89,6 +97,7 @@ VK_EXT_pipeline_protected_access VK_EXT_shader_object VK_EXT_mutable_descriptor_type VK_EXT_pipeline_library_group_handles +VK_EXT_dynamic_rendering_unused_attachments VK_EXT_attachment_feedback_loop_dynamic_state HUAWEI VK_HUAWEI_subpass_shading @@ -141,7 +150,11 @@ VK_KHR_zero_initialize_workgroup_memory VK_KHR_workgroup_memory_explicit_layout VK_KHR_ray_tracing_maintenance1 VK_KHR_maintenance4 +VK_KHR_maintenance5 VK_KHR_ray_tracing_position_fetch +VK_KHR_cooperative_matrix +MSFT +VK_MSFT_layered_driver NV VK_NV_corner_sampled_image VK_NV_shader_sm_builtins @@ -166,9 +179,12 @@ VK_NV_external_memory_rdma VK_NV_displacement_micromap VK_NV_copy_memory_indirect VK_NV_memory_decompression +VK_NV_device_generated_commands_compute VK_NV_linear_color_attachment VK_NV_optical_flow VK_NV_ray_tracing_invocation_reorder +VK_NV_extended_sparse_address_space +VK_NV_descriptor_pool_overallocation NVX VK_NVX_multiview_per_view_attributes QCOM @@ -177,6 +193,12 @@ VK_QCOM_image_processing VK_QCOM_tile_properties VK_QCOM_multiview_per_view_viewports VK_QCOM_multiview_per_view_render_areas +VK_QCOM_image_processing2 +VK_QCOM_filter_cubic_weights +VK_QCOM_ycbcr_degamma +VK_QCOM_filter_cubic_clamp +QNX +VK_QNX_external_memory_screen_buffer SEC VK_SEC_amigo_profiling VALVE diff --git a/tools/deviceExtensionsFileGenerator.php b/tools/deviceExtensionsFileGenerator.php index 9122e39..132af50 100644 --- a/tools/deviceExtensionsFileGenerator.php +++ b/tools/deviceExtensionsFileGenerator.php @@ -120,10 +120,10 @@ function __construct($xml, $typecontainer) // Skip Vulkan SC only extensions if ($ext_node['supported'] == 'vulkansc') { continue; - } + } $features2_node = null; $properties2_node = null; - // We're only interested in extensions with property or feature types + // We're only interested in extensions with property or feature types foreach ($ext_node->require as $require) { foreach ($require as $requirement) { if (strcasecmp($requirement->getName, 'type')) { @@ -176,7 +176,7 @@ public function generateFeatures2CodeBlock($extension) if (in_array($type, ['VkStructureType', 'void'])) { continue; } - $name = (string)$member->name; + $name = (string)$member->name; $res .= "\t\tpushFeature2(extension, \"$name\", extFeatures->$name);\n"; } $res .= "\t\tdelete extFeatures;\n"; @@ -287,9 +287,18 @@ public function writeImplementation(string $file_name, string $output_dir, $exte if (count($ext_arr) > 0) { $cpp_features_block .= "void VulkanDeviceInfoExtensions::readPhysicalFeatures_$ext_group() {\n"; $cpp_features_block .= "\tVkPhysicalDeviceFeatures2 deviceFeatures2{};\n"; + if ($ext_group == 'QNX') { + $cpp_features_block .= "#if defined(VK_USE_PLATFORM_SCREEN_QNX)\n"; + } + if ($ext_group == 'ANDROID') { + $cpp_features_block .= "#if defined(VK_USE_PLATFORM_ANDROID)\n"; + } foreach ($ext_arr as $extension) { $cpp_features_block .= $this->generateFeatures2CodeBlock($extension); } + if (in_array($ext_group, ['QNX', 'ANDROID']) != false) { + $cpp_features_block .= "#endif\n"; + } $cpp_features_block .= "}\n"; } // Properties2 @@ -299,9 +308,18 @@ public function writeImplementation(string $file_name, string $output_dir, $exte if (count($ext_arr) > 0) { $cpp_properties_block .= "void VulkanDeviceInfoExtensions::readPhysicalProperties_$ext_group() {\n"; $cpp_properties_block .= "\tVkPhysicalDeviceProperties2 deviceProps2{};\n"; + if ($ext_group == 'QNX') { + $cpp_properties_block .= "#if defined(VK_USE_PLATFORM_SCREEN_QNX)\n"; + } + if ($ext_group == 'ANDROID') { + $cpp_properties_block .= "#if defined(VK_USE_PLATFORM_ANDROID)\n"; + } foreach ($ext_arr as $extension) { $cpp_properties_block .= $this->generateProperties2CodeBlock($extension); } + if (in_array($ext_group, ['QNX', 'ANDROID']) != false) { + $cpp_properties_block .= "#endif\n"; + } $cpp_properties_block .= "}\n"; } } diff --git a/tools/templates/VulkanDeviceInfoExtensions.cpp b/tools/templates/VulkanDeviceInfoExtensions.cpp index 3a03b70..3dbaada 100644 --- a/tools/templates/VulkanDeviceInfoExtensions.cpp +++ b/tools/templates/VulkanDeviceInfoExtensions.cpp @@ -3,7 +3,7 @@ * * THIS HEADER IS AUTO-GENERATED, DO NOT CHANGE * - * Copyright (C) 2022 by Sascha Willems (www.saschawillems.de) + * Copyright (C) 2022-2023 by Sascha Willems (www.saschawillems.de) * * This code is free software, you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/tools/templates/VulkanDeviceInfoExtensions.h b/tools/templates/VulkanDeviceInfoExtensions.h index 74f141b..be07b36 100644 --- a/tools/templates/VulkanDeviceInfoExtensions.h +++ b/tools/templates/VulkanDeviceInfoExtensions.h @@ -3,7 +3,7 @@ * * THIS HEADER IS AUTO-GENERATED, DO NOT CHANGE * - * Copyright (C) 2022 by Sascha Willems (www.saschawillems.de) + * Copyright (C) 2022-2023 by Sascha Willems (www.saschawillems.de) * * This code is free software, you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public