Replace hardcoded namesapce 'vk::' to 'VULKAN_HPP_NAMESPACE'.

This commit is contained in:
Sho Ikeda 2020-06-18 23:06:58 +09:00
parent 8c2d6d7d05
commit 3abb9592f7
2 changed files with 93 additions and 83 deletions

View File

@ -1597,7 +1597,7 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic( std::string & str )
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
template <typename DynamicLoader
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
= vk::DynamicLoader
= VULKAN_HPP_NAMESPACE::DynamicLoader
#endif
>
void init(VULKAN_HPP_NAMESPACE::Instance const& instance, VULKAN_HPP_NAMESPACE::Device const& device) VULKAN_HPP_NOEXCEPT
@ -3373,9 +3373,9 @@ void VulkanHppGenerator::appendHashStructures( std::string & str ) const
"namespace std\n"
"{\n";
const std::string hashTemplate = R"( template <> struct hash<vk::${type}>
const std::string hashTemplate = R"( template <> struct hash<VULKAN_HPP_NAMESPACE::${type}>
{
std::size_t operator()(vk::${type} const& ${name}) const VULKAN_HPP_NOEXCEPT
std::size_t operator()(VULKAN_HPP_NAMESPACE::${type} const& ${name}) const VULKAN_HPP_NOEXCEPT
{
return std::hash<Vk${type}>{}(static_cast<Vk${type}>(${name}));
}

View File

@ -97878,7 +97878,7 @@ namespace VULKAN_HPP_NAMESPACE
// library.
template <typename DynamicLoader
# if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
= vk::DynamicLoader
= VULKAN_HPP_NAMESPACE::DynamicLoader
# endif
>
void init( VULKAN_HPP_NAMESPACE::Instance const & instance,
@ -99340,9 +99340,10 @@ namespace VULKAN_HPP_NAMESPACE
namespace std
{
template <>
struct hash<vk::AccelerationStructureKHR>
struct hash<VULKAN_HPP_NAMESPACE::AccelerationStructureKHR>
{
std::size_t operator()( vk::AccelerationStructureKHR const & accelerationStructureKHR ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & accelerationStructureKHR ) const
VULKAN_HPP_NOEXCEPT
{
return std::hash<VkAccelerationStructureKHR>{}(
static_cast<VkAccelerationStructureKHR>( accelerationStructureKHR ) );
@ -99350,54 +99351,56 @@ namespace std
};
template <>
struct hash<vk::Buffer>
struct hash<VULKAN_HPP_NAMESPACE::Buffer>
{
std::size_t operator()( vk::Buffer const & buffer ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Buffer const & buffer ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkBuffer>{}( static_cast<VkBuffer>( buffer ) );
}
};
template <>
struct hash<vk::BufferView>
struct hash<VULKAN_HPP_NAMESPACE::BufferView>
{
std::size_t operator()( vk::BufferView const & bufferView ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferView const & bufferView ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkBufferView>{}( static_cast<VkBufferView>( bufferView ) );
}
};
template <>
struct hash<vk::CommandBuffer>
struct hash<VULKAN_HPP_NAMESPACE::CommandBuffer>
{
std::size_t operator()( vk::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkCommandBuffer>{}( static_cast<VkCommandBuffer>( commandBuffer ) );
}
};
template <>
struct hash<vk::CommandPool>
struct hash<VULKAN_HPP_NAMESPACE::CommandPool>
{
std::size_t operator()( vk::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkCommandPool>{}( static_cast<VkCommandPool>( commandPool ) );
}
};
template <>
struct hash<vk::DebugReportCallbackEXT>
struct hash<VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT>
{
std::size_t operator()( vk::DebugReportCallbackEXT const & debugReportCallbackEXT ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & debugReportCallbackEXT ) const
VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDebugReportCallbackEXT>{}( static_cast<VkDebugReportCallbackEXT>( debugReportCallbackEXT ) );
}
};
template <>
struct hash<vk::DebugUtilsMessengerEXT>
struct hash<VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT>
{
std::size_t operator()( vk::DebugUtilsMessengerEXT const & debugUtilsMessengerEXT ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & debugUtilsMessengerEXT ) const
VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDebugUtilsMessengerEXT>{}( static_cast<VkDebugUtilsMessengerEXT>( debugUtilsMessengerEXT ) );
}
@ -99405,9 +99408,10 @@ namespace std
#ifdef VK_ENABLE_BETA_EXTENSIONS
template <>
struct hash<vk::DeferredOperationKHR>
struct hash<VULKAN_HPP_NAMESPACE::DeferredOperationKHR>
{
std::size_t operator()( vk::DeferredOperationKHR const & deferredOperationKHR ) const VULKAN_HPP_NOEXCEPT
std::size_t
operator()( VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & deferredOperationKHR ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDeferredOperationKHR>{}( static_cast<VkDeferredOperationKHR>( deferredOperationKHR ) );
}
@ -99415,36 +99419,38 @@ namespace std
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
template <>
struct hash<vk::DescriptorPool>
struct hash<VULKAN_HPP_NAMESPACE::DescriptorPool>
{
std::size_t operator()( vk::DescriptorPool const & descriptorPool ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPool const & descriptorPool ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDescriptorPool>{}( static_cast<VkDescriptorPool>( descriptorPool ) );
}
};
template <>
struct hash<vk::DescriptorSet>
struct hash<VULKAN_HPP_NAMESPACE::DescriptorSet>
{
std::size_t operator()( vk::DescriptorSet const & descriptorSet ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSet const & descriptorSet ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDescriptorSet>{}( static_cast<VkDescriptorSet>( descriptorSet ) );
}
};
template <>
struct hash<vk::DescriptorSetLayout>
struct hash<VULKAN_HPP_NAMESPACE::DescriptorSetLayout>
{
std::size_t operator()( vk::DescriptorSetLayout const & descriptorSetLayout ) const VULKAN_HPP_NOEXCEPT
std::size_t
operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayout const & descriptorSetLayout ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDescriptorSetLayout>{}( static_cast<VkDescriptorSetLayout>( descriptorSetLayout ) );
}
};
template <>
struct hash<vk::DescriptorUpdateTemplate>
struct hash<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate>
{
std::size_t operator()( vk::DescriptorUpdateTemplate const & descriptorUpdateTemplate ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate const & descriptorUpdateTemplate ) const
VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDescriptorUpdateTemplate>{}(
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ) );
@ -99452,90 +99458,91 @@ namespace std
};
template <>
struct hash<vk::Device>
struct hash<VULKAN_HPP_NAMESPACE::Device>
{
std::size_t operator()( vk::Device const & device ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Device const & device ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDevice>{}( static_cast<VkDevice>( device ) );
}
};
template <>
struct hash<vk::DeviceMemory>
struct hash<VULKAN_HPP_NAMESPACE::DeviceMemory>
{
std::size_t operator()( vk::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDeviceMemory>{}( static_cast<VkDeviceMemory>( deviceMemory ) );
}
};
template <>
struct hash<vk::DisplayKHR>
struct hash<VULKAN_HPP_NAMESPACE::DisplayKHR>
{
std::size_t operator()( vk::DisplayKHR const & displayKHR ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayKHR const & displayKHR ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDisplayKHR>{}( static_cast<VkDisplayKHR>( displayKHR ) );
}
};
template <>
struct hash<vk::DisplayModeKHR>
struct hash<VULKAN_HPP_NAMESPACE::DisplayModeKHR>
{
std::size_t operator()( vk::DisplayModeKHR const & displayModeKHR ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeKHR const & displayModeKHR ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkDisplayModeKHR>{}( static_cast<VkDisplayModeKHR>( displayModeKHR ) );
}
};
template <>
struct hash<vk::Event>
struct hash<VULKAN_HPP_NAMESPACE::Event>
{
std::size_t operator()( vk::Event const & event ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Event const & event ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkEvent>{}( static_cast<VkEvent>( event ) );
}
};
template <>
struct hash<vk::Fence>
struct hash<VULKAN_HPP_NAMESPACE::Fence>
{
std::size_t operator()( vk::Fence const & fence ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Fence const & fence ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkFence>{}( static_cast<VkFence>( fence ) );
}
};
template <>
struct hash<vk::Framebuffer>
struct hash<VULKAN_HPP_NAMESPACE::Framebuffer>
{
std::size_t operator()( vk::Framebuffer const & framebuffer ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Framebuffer const & framebuffer ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkFramebuffer>{}( static_cast<VkFramebuffer>( framebuffer ) );
}
};
template <>
struct hash<vk::Image>
struct hash<VULKAN_HPP_NAMESPACE::Image>
{
std::size_t operator()( vk::Image const & image ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Image const & image ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkImage>{}( static_cast<VkImage>( image ) );
}
};
template <>
struct hash<vk::ImageView>
struct hash<VULKAN_HPP_NAMESPACE::ImageView>
{
std::size_t operator()( vk::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkImageView>{}( static_cast<VkImageView>( imageView ) );
}
};
template <>
struct hash<vk::IndirectCommandsLayoutNV>
struct hash<VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV>
{
std::size_t operator()( vk::IndirectCommandsLayoutNV const & indirectCommandsLayoutNV ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & indirectCommandsLayoutNV ) const
VULKAN_HPP_NOEXCEPT
{
return std::hash<VkIndirectCommandsLayoutNV>{}(
static_cast<VkIndirectCommandsLayoutNV>( indirectCommandsLayoutNV ) );
@ -99543,19 +99550,19 @@ namespace std
};
template <>
struct hash<vk::Instance>
struct hash<VULKAN_HPP_NAMESPACE::Instance>
{
std::size_t operator()( vk::Instance const & instance ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Instance const & instance ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkInstance>{}( static_cast<VkInstance>( instance ) );
}
};
template <>
struct hash<vk::PerformanceConfigurationINTEL>
struct hash<VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL>
{
std::size_t
operator()( vk::PerformanceConfigurationINTEL const & performanceConfigurationINTEL ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL const & performanceConfigurationINTEL )
const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkPerformanceConfigurationINTEL>{}(
static_cast<VkPerformanceConfigurationINTEL>( performanceConfigurationINTEL ) );
@ -99563,135 +99570,138 @@ namespace std
};
template <>
struct hash<vk::PhysicalDevice>
struct hash<VULKAN_HPP_NAMESPACE::PhysicalDevice>
{
std::size_t operator()( vk::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkPhysicalDevice>{}( static_cast<VkPhysicalDevice>( physicalDevice ) );
}
};
template <>
struct hash<vk::Pipeline>
struct hash<VULKAN_HPP_NAMESPACE::Pipeline>
{
std::size_t operator()( vk::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkPipeline>{}( static_cast<VkPipeline>( pipeline ) );
}
};
template <>
struct hash<vk::PipelineCache>
struct hash<VULKAN_HPP_NAMESPACE::PipelineCache>
{
std::size_t operator()( vk::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkPipelineCache>{}( static_cast<VkPipelineCache>( pipelineCache ) );
}
};
template <>
struct hash<vk::PipelineLayout>
struct hash<VULKAN_HPP_NAMESPACE::PipelineLayout>
{
std::size_t operator()( vk::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkPipelineLayout>{}( static_cast<VkPipelineLayout>( pipelineLayout ) );
}
};
template <>
struct hash<vk::PrivateDataSlotEXT>
struct hash<VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT>
{
std::size_t operator()( vk::PrivateDataSlotEXT const & privateDataSlotEXT ) const VULKAN_HPP_NOEXCEPT
std::size_t
operator()( VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT const & privateDataSlotEXT ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkPrivateDataSlotEXT>{}( static_cast<VkPrivateDataSlotEXT>( privateDataSlotEXT ) );
}
};
template <>
struct hash<vk::QueryPool>
struct hash<VULKAN_HPP_NAMESPACE::QueryPool>
{
std::size_t operator()( vk::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkQueryPool>{}( static_cast<VkQueryPool>( queryPool ) );
}
};
template <>
struct hash<vk::Queue>
struct hash<VULKAN_HPP_NAMESPACE::Queue>
{
std::size_t operator()( vk::Queue const & queue ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Queue const & queue ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkQueue>{}( static_cast<VkQueue>( queue ) );
}
};
template <>
struct hash<vk::RenderPass>
struct hash<VULKAN_HPP_NAMESPACE::RenderPass>
{
std::size_t operator()( vk::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkRenderPass>{}( static_cast<VkRenderPass>( renderPass ) );
}
};
template <>
struct hash<vk::Sampler>
struct hash<VULKAN_HPP_NAMESPACE::Sampler>
{
std::size_t operator()( vk::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkSampler>{}( static_cast<VkSampler>( sampler ) );
}
};
template <>
struct hash<vk::SamplerYcbcrConversion>
struct hash<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion>
{
std::size_t operator()( vk::SamplerYcbcrConversion const & samplerYcbcrConversion ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & samplerYcbcrConversion ) const
VULKAN_HPP_NOEXCEPT
{
return std::hash<VkSamplerYcbcrConversion>{}( static_cast<VkSamplerYcbcrConversion>( samplerYcbcrConversion ) );
}
};
template <>
struct hash<vk::Semaphore>
struct hash<VULKAN_HPP_NAMESPACE::Semaphore>
{
std::size_t operator()( vk::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkSemaphore>{}( static_cast<VkSemaphore>( semaphore ) );
}
};
template <>
struct hash<vk::ShaderModule>
struct hash<VULKAN_HPP_NAMESPACE::ShaderModule>
{
std::size_t operator()( vk::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkShaderModule>{}( static_cast<VkShaderModule>( shaderModule ) );
}
};
template <>
struct hash<vk::SurfaceKHR>
struct hash<VULKAN_HPP_NAMESPACE::SurfaceKHR>
{
std::size_t operator()( vk::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkSurfaceKHR>{}( static_cast<VkSurfaceKHR>( surfaceKHR ) );
}
};
template <>
struct hash<vk::SwapchainKHR>
struct hash<VULKAN_HPP_NAMESPACE::SwapchainKHR>
{
std::size_t operator()( vk::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT
std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkSwapchainKHR>{}( static_cast<VkSwapchainKHR>( swapchainKHR ) );
}
};
template <>
struct hash<vk::ValidationCacheEXT>
struct hash<VULKAN_HPP_NAMESPACE::ValidationCacheEXT>
{
std::size_t operator()( vk::ValidationCacheEXT const & validationCacheEXT ) const VULKAN_HPP_NOEXCEPT
std::size_t
operator()( VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & validationCacheEXT ) const VULKAN_HPP_NOEXCEPT
{
return std::hash<VkValidationCacheEXT>{}( static_cast<VkValidationCacheEXT>( validationCacheEXT ) );
}