Skip to content

Commit

Permalink
Update Vulkan-Headers to v1.3.278 (#1810)
Browse files Browse the repository at this point in the history
  • Loading branch information
asuessenbach authored Feb 19, 2024
1 parent 4c130b9 commit 29723f9
Show file tree
Hide file tree
Showing 14 changed files with 2,251 additions and 482 deletions.
38 changes: 31 additions & 7 deletions VulkanHppGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10720,15 +10720,35 @@ std::string VulkanHppGenerator::generateStructConstructorsEnhanced( std::pair<st
else
{
assert( mit->arraySizes.size() == 1 );
static const std::string copyOpsTemplate = R"(
if ( mit->lenExpressions[0] == "null-terminated" )
{
static const std::string strcpyTemplate = R"(
VULKAN_HPP_ASSERT( ${memberName}_.size() < ${arraySize} );
${copyOp}( ${memberName}, ${memberSize}, ${memberName}_.data(), ${memberName}_.size() );)";
#if defined( WIN32 )
strncpy_s( ${memberName}, ${memberSize}, ${memberName}_.data(), ${memberName}_.size() );
#else
strncpy( ${memberName}, ${memberName}_.data(), std::min<size_t>( ${memberSize}, ${memberName}_.size() ) );
#endif
)";

copyOps += replaceWithMap( copyOpsTemplate,
{ { "arraySize", mit->arraySizes[0] },
{ "copyOp", mit->lenExpressions[0] == "null-terminated" ? "strncpy_s" : "memcpy_s" },
{ "memberName", mit->name },
{ "memberSize", mit->arraySizes[0] } } );
copyOps +=
replaceWithMap( strcpyTemplate, { { "arraySize", mit->arraySizes[0] }, { "memberName", mit->name }, { "memberSize", mit->arraySizes[0] } } );
}
else
{
static const std::string memcpyTemplate = R"(
VULKAN_HPP_ASSERT( ${memberName}_.size() < ${arraySize} );
memcpy( ${memberName}, ${memberName}_.data(), ${lenExpression} * sizeof( ${argumentType} ) );)";

std::string arraySizeExpression = ( mit->lenExpressions[0] == "null-terminated" )
? ( "std::min<size_t>( " + mit->name + "_.size(), " + mit->arraySizes[0] + " )" )
: ( mit->lenExpressions[0] + " * sizeof( " + argumentType + " )" );
copyOps += replaceWithMap( memcpyTemplate,
{ { "arraySize", mit->arraySizes[0] },
{ "argumentType", argumentType },
{ "lenExpression", mit->lenExpressions[0] },
{ "memberName", mit->name } } );
}
}
}
else
Expand Down Expand Up @@ -11447,7 +11467,11 @@ std::string VulkanHppGenerator::generateStructSetter( std::string const & struct
${structureName} & set${ArrayName}( std::string const & ${arrayName}_ ) VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( ${arrayName}_.size() < ${arraySize} );
#if defined( WIN32 )
strncpy_s( ${arrayName}, ${arraySize}, ${arrayName}_.data(), ${arrayName}_.size() );
#else
strncpy( ${arrayName}, ${arrayName}_.data(), std::min<size_t>( ${arraySize}, ${arrayName}_.size() ) );
#endif
return *this;
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Expand Down
17 changes: 16 additions & 1 deletion vulkan/vulkan.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,6 @@ export namespace VULKAN_HPP_NAMESPACE
# endif /*VK_USE_PLATFORM_WIN32_KHR*/

using VULKAN_HPP_NAMESPACE::CompressionExhaustedEXTError;
using VULKAN_HPP_NAMESPACE::IncompatibleShaderBinaryEXTError;
using VULKAN_HPP_NAMESPACE::InvalidVideoStdParametersKHRError;
#endif /*VULKAN_HPP_NO_EXCEPTIONS*/

Expand Down Expand Up @@ -1873,6 +1872,10 @@ export namespace VULKAN_HPP_NAMESPACE
using VULKAN_HPP_NAMESPACE::KHRMapMemory2ExtensionName;
using VULKAN_HPP_NAMESPACE::KHRMapMemory2SpecVersion;

//=== VK_EXT_map_memory_placed ===
using VULKAN_HPP_NAMESPACE::EXTMapMemoryPlacedExtensionName;
using VULKAN_HPP_NAMESPACE::EXTMapMemoryPlacedSpecVersion;

//=== VK_EXT_shader_atomic_float2 ===
using VULKAN_HPP_NAMESPACE::EXTShaderAtomicFloat2ExtensionName;
using VULKAN_HPP_NAMESPACE::EXTShaderAtomicFloat2SpecVersion;
Expand Down Expand Up @@ -2491,6 +2494,10 @@ export namespace VULKAN_HPP_NAMESPACE
using VULKAN_HPP_NAMESPACE::NVDescriptorPoolOverallocationExtensionName;
using VULKAN_HPP_NAMESPACE::NVDescriptorPoolOverallocationSpecVersion;

//=== VK_NV_shader_atomic_float16_vector ===
using VULKAN_HPP_NAMESPACE::NVShaderAtomicFloat16VectorExtensionName;
using VULKAN_HPP_NAMESPACE::NVShaderAtomicFloat16VectorSpecVersion;

//========================
//=== CONSTEXPR VALUEs ===
//========================
Expand Down Expand Up @@ -3671,6 +3678,11 @@ export namespace VULKAN_HPP_NAMESPACE
using VULKAN_HPP_NAMESPACE::MemoryMapInfoKHR;
using VULKAN_HPP_NAMESPACE::MemoryUnmapInfoKHR;

//=== VK_EXT_map_memory_placed ===
using VULKAN_HPP_NAMESPACE::MemoryMapPlacedInfoEXT;
using VULKAN_HPP_NAMESPACE::PhysicalDeviceMapMemoryPlacedFeaturesEXT;
using VULKAN_HPP_NAMESPACE::PhysicalDeviceMapMemoryPlacedPropertiesEXT;

//=== VK_EXT_shader_atomic_float2 ===
using VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloat2FeaturesEXT;

Expand Down Expand Up @@ -4323,6 +4335,9 @@ export namespace VULKAN_HPP_NAMESPACE
//=== VK_NV_descriptor_pool_overallocation ===
using VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorPoolOverallocationFeaturesNV;

//=== VK_NV_shader_atomic_float16_vector ===
using VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV;

//===============
//=== HANDLEs ===
//===============
Expand Down
75 changes: 65 additions & 10 deletions vulkan/vulkan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h
# include <span>
#endif

static_assert( VK_HEADER_VERSION == 277, "Wrong VK_HEADER_VERSION!" );
static_assert( VK_HEADER_VERSION == 278, "Wrong VK_HEADER_VERSION!" );

// <tuple> includes <sys/sysmacros.h> through some other header
// this results in major(x) being resolved to gnu_dev_major(x)
Expand Down Expand Up @@ -6549,14 +6549,6 @@ namespace VULKAN_HPP_NAMESPACE
CompressionExhaustedEXTError( char const * message ) : SystemError( make_error_code( Result::eErrorCompressionExhaustedEXT ), message ) {}
};

class IncompatibleShaderBinaryEXTError : public SystemError
{
public:
IncompatibleShaderBinaryEXTError( std::string const & message ) : SystemError( make_error_code( Result::eErrorIncompatibleShaderBinaryEXT ), message ) {}

IncompatibleShaderBinaryEXTError( char const * message ) : SystemError( make_error_code( Result::eErrorIncompatibleShaderBinaryEXT ), message ) {}
};

namespace detail
{
[[noreturn]] VULKAN_HPP_INLINE void throwResultException( Result result, char const * message )
Expand Down Expand Up @@ -6599,7 +6591,6 @@ namespace VULKAN_HPP_NAMESPACE
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
case Result::eErrorInvalidVideoStdParametersKHR: throw InvalidVideoStdParametersKHRError( message );
case Result::eErrorCompressionExhaustedEXT: throw CompressionExhaustedEXTError( message );
case Result::eErrorIncompatibleShaderBinaryEXT: throw IncompatibleShaderBinaryEXTError( message );
default: throw SystemError( make_error_code( result ), message );
}
}
Expand Down Expand Up @@ -8015,6 +8006,10 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_CONSTEXPR_INLINE auto KHRMapMemory2ExtensionName = VK_KHR_MAP_MEMORY_2_EXTENSION_NAME;
VULKAN_HPP_CONSTEXPR_INLINE auto KHRMapMemory2SpecVersion = VK_KHR_MAP_MEMORY_2_SPEC_VERSION;

//=== VK_EXT_map_memory_placed ===
VULKAN_HPP_CONSTEXPR_INLINE auto EXTMapMemoryPlacedExtensionName = VK_EXT_MAP_MEMORY_PLACED_EXTENSION_NAME;
VULKAN_HPP_CONSTEXPR_INLINE auto EXTMapMemoryPlacedSpecVersion = VK_EXT_MAP_MEMORY_PLACED_SPEC_VERSION;

//=== VK_EXT_shader_atomic_float2 ===
VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderAtomicFloat2ExtensionName = VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME;
VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderAtomicFloat2SpecVersion = VK_EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION;
Expand Down Expand Up @@ -8667,6 +8662,10 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_CONSTEXPR_INLINE auto NVDescriptorPoolOverallocationExtensionName = VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME;
VULKAN_HPP_CONSTEXPR_INLINE auto NVDescriptorPoolOverallocationSpecVersion = VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_SPEC_VERSION;

//=== VK_NV_shader_atomic_float16_vector ===
VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderAtomicFloat16VectorExtensionName = VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_EXTENSION_NAME;
VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderAtomicFloat16VectorSpecVersion = VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_SPEC_VERSION;

} // namespace VULKAN_HPP_NAMESPACE

// clang-format off
Expand Down Expand Up @@ -12833,6 +12832,43 @@ namespace VULKAN_HPP_NAMESPACE
};
};

//=== VK_EXT_map_memory_placed ===
template <>
struct StructExtends<PhysicalDeviceMapMemoryPlacedFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};

template <>
struct StructExtends<PhysicalDeviceMapMemoryPlacedFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};

template <>
struct StructExtends<PhysicalDeviceMapMemoryPlacedPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};

template <>
struct StructExtends<MemoryMapPlacedInfoEXT, MemoryMapInfoKHR>
{
enum
{
value = true
};
};

//=== VK_EXT_shader_atomic_float2 ===
template <>
struct StructExtends<PhysicalDeviceShaderAtomicFloat2FeaturesEXT, PhysicalDeviceFeatures2>
Expand Down Expand Up @@ -16552,6 +16588,25 @@ namespace VULKAN_HPP_NAMESPACE
};
};

//=== VK_NV_shader_atomic_float16_vector ===
template <>
struct StructExtends<PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};

template <>
struct StructExtends<PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV, DeviceCreateInfo>
{
enum
{
value = true
};
};

#endif // VULKAN_HPP_DISABLE_ENHANCED_MODE

#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
Expand Down
13 changes: 10 additions & 3 deletions vulkan/vulkan_enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ namespace VULKAN_HPP_NAMESPACE
eErrorPipelineCompileRequiredEXT = VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT,
eErrorInvalidVideoStdParametersKHR = VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR,
eErrorCompressionExhaustedEXT = VK_ERROR_COMPRESSION_EXHAUSTED_EXT,
eIncompatibleShaderBinaryEXT = VK_INCOMPATIBLE_SHADER_BINARY_EXT,
eErrorIncompatibleShaderBinaryEXT = VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT
};

Expand Down Expand Up @@ -1027,6 +1028,9 @@ namespace VULKAN_HPP_NAMESPACE
eHostImageCopyDevicePerformanceQueryEXT = VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT,
eMemoryMapInfoKHR = VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR,
eMemoryUnmapInfoKHR = VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR,
ePhysicalDeviceMapMemoryPlacedFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT,
ePhysicalDeviceMapMemoryPlacedPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT,
eMemoryMapPlacedInfoEXT = VK_STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT,
ePhysicalDeviceShaderAtomicFloat2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT,
eSurfacePresentModeEXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT,
eSurfacePresentScalingCapabilitiesEXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT,
Expand Down Expand Up @@ -1417,7 +1421,8 @@ namespace VULKAN_HPP_NAMESPACE
ePushDescriptorSetWithTemplateInfoKHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR,
eSetDescriptorBufferOffsetsInfoEXT = VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT,
eBindDescriptorBufferEmbeddedSamplersInfoEXT = VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT,
ePhysicalDeviceDescriptorPoolOverallocationFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV
ePhysicalDeviceDescriptorPoolOverallocationFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV,
ePhysicalDeviceShaderAtomicFloat16VectorFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV
};

enum class PipelineCacheHeaderVersion
Expand Down Expand Up @@ -2185,6 +2190,7 @@ namespace VULKAN_HPP_NAMESPACE

enum class MemoryMapFlagBits : VkMemoryMapFlags
{
ePlacedEXT = VK_MEMORY_MAP_PLACED_BIT_EXT
};

using MemoryMapFlags = Flags<MemoryMapFlagBits>;
Expand All @@ -2193,7 +2199,7 @@ namespace VULKAN_HPP_NAMESPACE
struct FlagTraits<MemoryMapFlagBits>
{
static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true;
static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryMapFlags allFlags = {};
static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryMapFlags allFlags = MemoryMapFlagBits::ePlacedEXT;
};

enum class ImageAspectFlagBits : VkImageAspectFlags
Expand Down Expand Up @@ -6078,6 +6084,7 @@ namespace VULKAN_HPP_NAMESPACE

enum class MemoryUnmapFlagBitsKHR : VkMemoryUnmapFlagsKHR
{
eReserveEXT = VK_MEMORY_UNMAP_RESERVE_BIT_EXT
};

using MemoryUnmapFlagsKHR = Flags<MemoryUnmapFlagBitsKHR>;
Expand All @@ -6086,7 +6093,7 @@ namespace VULKAN_HPP_NAMESPACE
struct FlagTraits<MemoryUnmapFlagBitsKHR>
{
static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true;
static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryUnmapFlagsKHR allFlags = {};
static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryUnmapFlagsKHR allFlags = MemoryUnmapFlagBitsKHR::eReserveEXT;
};

//=== VK_EXT_surface_maintenance1 ===
Expand Down
28 changes: 18 additions & 10 deletions vulkan/vulkan_extension_inspection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ namespace VULKAN_HPP_NAMESPACE
"VK_KHR_pipeline_executable_properties",
"VK_EXT_host_image_copy",
"VK_KHR_map_memory2",
"VK_EXT_map_memory_placed",
"VK_EXT_shader_atomic_float2",
"VK_EXT_swapchain_maintenance1",
"VK_EXT_shader_demote_to_helper_invocation",
Expand Down Expand Up @@ -432,7 +433,8 @@ namespace VULKAN_HPP_NAMESPACE
"VK_KHR_calibrated_timestamps",
"VK_KHR_shader_expect_assume",
"VK_KHR_maintenance6",
"VK_NV_descriptor_pool_overallocation"
"VK_NV_descriptor_pool_overallocation",
"VK_NV_shader_atomic_float16_vector"
};
return deviceExtensions;
}
Expand Down Expand Up @@ -1398,6 +1400,11 @@ namespace VULKAN_HPP_NAMESPACE
"VK_KHR_copy_commands2",
"VK_KHR_format_feature_flags2",
} } } } },
{ "VK_EXT_map_memory_placed",
{ { "VK_VERSION_1_0",
{ {
"VK_KHR_map_memory2",
} } } } },
{ "VK_EXT_shader_atomic_float2",
{ { "VK_VERSION_1_0",
{ {
Expand Down Expand Up @@ -2786,14 +2793,15 @@ namespace VULKAN_HPP_NAMESPACE
|| ( extension == "VK_KHR_buffer_device_address" ) || ( extension == "VK_EXT_line_rasterization" ) || ( extension == "VK_EXT_shader_atomic_float" ) ||
( extension == "VK_EXT_host_query_reset" ) || ( extension == "VK_EXT_index_type_uint8" ) || ( extension == "VK_EXT_extended_dynamic_state" ) ||
( extension == "VK_KHR_deferred_host_operations" ) || ( extension == "VK_KHR_pipeline_executable_properties" ) ||
( extension == "VK_EXT_host_image_copy" ) || ( extension == "VK_KHR_map_memory2" ) || ( extension == "VK_EXT_shader_atomic_float2" ) ||
( extension == "VK_EXT_swapchain_maintenance1" ) || ( extension == "VK_EXT_shader_demote_to_helper_invocation" ) ||
( extension == "VK_NV_device_generated_commands" ) || ( extension == "VK_NV_inherited_viewport_scissor" ) ||
( extension == "VK_KHR_shader_integer_dot_product" ) || ( extension == "VK_EXT_texel_buffer_alignment" ) ||
( extension == "VK_QCOM_render_pass_transform" ) || ( extension == "VK_EXT_depth_bias_control" ) || ( extension == "VK_EXT_device_memory_report" ) ||
( extension == "VK_EXT_robustness2" ) || ( extension == "VK_EXT_custom_border_color" ) || ( extension == "VK_GOOGLE_user_type" ) ||
( extension == "VK_KHR_pipeline_library" ) || ( extension == "VK_NV_present_barrier" ) || ( extension == "VK_KHR_shader_non_semantic_info" ) ||
( extension == "VK_KHR_present_id" ) || ( extension == "VK_EXT_private_data" ) || ( extension == "VK_EXT_pipeline_creation_cache_control" ) ||
( extension == "VK_EXT_host_image_copy" ) || ( extension == "VK_KHR_map_memory2" ) || ( extension == "VK_EXT_map_memory_placed" ) ||
( extension == "VK_EXT_shader_atomic_float2" ) || ( extension == "VK_EXT_swapchain_maintenance1" ) ||
( extension == "VK_EXT_shader_demote_to_helper_invocation" ) || ( extension == "VK_NV_device_generated_commands" ) ||
( extension == "VK_NV_inherited_viewport_scissor" ) || ( extension == "VK_KHR_shader_integer_dot_product" ) ||
( extension == "VK_EXT_texel_buffer_alignment" ) || ( extension == "VK_QCOM_render_pass_transform" ) ||
( extension == "VK_EXT_depth_bias_control" ) || ( extension == "VK_EXT_device_memory_report" ) || ( extension == "VK_EXT_robustness2" ) ||
( extension == "VK_EXT_custom_border_color" ) || ( extension == "VK_GOOGLE_user_type" ) || ( extension == "VK_KHR_pipeline_library" ) ||
( extension == "VK_NV_present_barrier" ) || ( extension == "VK_KHR_shader_non_semantic_info" ) || ( extension == "VK_KHR_present_id" ) ||
( extension == "VK_EXT_private_data" ) || ( extension == "VK_EXT_pipeline_creation_cache_control" ) ||
( extension == "VK_KHR_video_encode_queue" ) || ( extension == "VK_NV_device_diagnostics_config" ) ||
( extension == "VK_QCOM_render_pass_store_ops" )
#if defined( VK_ENABLE_BETA_EXTENSIONS )
Expand Down Expand Up @@ -2866,7 +2874,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
|| ( extension == "VK_MSFT_layered_driver" ) || ( extension == "VK_KHR_index_type_uint8" ) || ( extension == "VK_KHR_line_rasterization" ) ||
( extension == "VK_KHR_calibrated_timestamps" ) || ( extension == "VK_KHR_shader_expect_assume" ) || ( extension == "VK_KHR_maintenance6" ) ||
( extension == "VK_NV_descriptor_pool_overallocation" );
( extension == "VK_NV_descriptor_pool_overallocation" ) || ( extension == "VK_NV_shader_atomic_float16_vector" );
}

VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isInstanceExtension( std::string const & extension )
Expand Down
Loading

0 comments on commit 29723f9

Please sign in to comment.