Compare commits
No commits in common. "9747e682859933ae8d756509e19ed3391ccddebd" and "c75dcdc0bbbb8116953970ed2eb235803db4551e" have entirely different histories.
9747e68285
...
c75dcdc0bb
|
|
@ -1710,7 +1710,7 @@ void VulkanHppGenerator::extendSpecialCommands( std::string const & name, bool d
|
|||
cmd.insert(
|
||||
pos,
|
||||
R"( // wrapper function for command vkSetDebugUtilsObjectNameEXT, see https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectNameEXT.html
|
||||
template <typename HandleType, typename Dispatch, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type>
|
||||
template <typename HandleType, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
|
||||
Device::setDebugUtilsObjectNameEXT( HandleType const & handle, std::string const & name, Dispatch const & d ) const
|
||||
{
|
||||
|
|
@ -1728,7 +1728,7 @@ void VulkanHppGenerator::extendSpecialCommands( std::string const & name, bool d
|
|||
{
|
||||
cmd.insert( pos, R"( // wrapper function for command vkSetDebugUtilsObjectNameEXT, see
|
||||
// https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectNameEXT.html
|
||||
template <typename HandleType, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type = true>
|
||||
template <typename HandleType, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<void>::type
|
||||
setDebugUtilsObjectNameEXT( HandleType const & handle, std::string const & name, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||
)" );
|
||||
|
|
@ -1781,7 +1781,7 @@ void VulkanHppGenerator::extendSpecialCommands( std::string const & name, bool d
|
|||
cmd.insert(
|
||||
pos,
|
||||
R"( // wrapper function for command vkSetDebugUtilsObjectTagEXT, see https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectTagEXT.html
|
||||
template <typename HandleType, typename TagType, typename Dispatch, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type>
|
||||
template <typename HandleType, typename TagType, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
|
||||
Device::setDebugUtilsObjectTagEXT( HandleType const & handle, uint64_t name, TagType const & tag, Dispatch const & d ) const
|
||||
{
|
||||
|
|
@ -1801,7 +1801,7 @@ void VulkanHppGenerator::extendSpecialCommands( std::string const & name, bool d
|
|||
{
|
||||
cmd.insert( pos, R"( // wrapper function for command vkSetDebugUtilsObjectTagEXT, see
|
||||
// https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectTagEXT.html
|
||||
template <typename HandleType, typename TagType, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type = true>
|
||||
template <typename HandleType, typename TagType, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<void>::type setDebugUtilsObjectTagEXT(
|
||||
HandleType const & handle, uint64_t name, TagType const & tag, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||
)" );
|
||||
|
|
@ -3293,7 +3293,7 @@ std::string VulkanHppGenerator::generateCommandEnhanced( std::string const &
|
|||
|
||||
std::string const functionTemplate =
|
||||
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
||||
template <${argumentTemplates}${allocatorTemplates}typename Dispatch${uniqueHandleAllocatorTemplates}${typenameCheck}, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type>
|
||||
template <${argumentTemplates}${allocatorTemplates}typename Dispatch${uniqueHandleAllocatorTemplates}${typenameCheck}>
|
||||
${nodiscard}VULKAN_HPP_INLINE ${decoratedReturnType} ${className}${classSeparator}${commandName}( ${argumentList} )${const}${noexcept}
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
|
@ -3336,7 +3336,7 @@ ${vectorSizeCheck}
|
|||
{
|
||||
std::string const functionTemplate =
|
||||
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
||||
template <${argumentTemplates}${allocatorTemplates}typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${uniqueHandleAllocatorTemplates}${typenameCheck}, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type = true>
|
||||
template <${argumentTemplates}${allocatorTemplates}typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${uniqueHandleAllocatorTemplates}${typenameCheck}>
|
||||
${nodiscard}${decoratedReturnType} ${commandName}( ${argumentList} )${const}${noexcept};)";
|
||||
|
||||
return replaceWithMap( functionTemplate,
|
||||
|
|
@ -4487,7 +4487,7 @@ std::string
|
|||
|
||||
std::string const functionTemplate =
|
||||
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
||||
template <typename Dispatch, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type>
|
||||
template <typename Dispatch>
|
||||
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} )${const} VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
|
@ -4509,7 +4509,7 @@ std::string
|
|||
{
|
||||
std::string const functionTemplate =
|
||||
R"( // wrapper function for command ${vkCommandName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/${vkCommandName}.html
|
||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if<detail::isDispatchLoader<Dispatch>::value, bool>::type = true>
|
||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
${nodiscard}${returnType} ${commandName}( ${argumentList} VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )${const} VULKAN_HPP_NOEXCEPT;)";
|
||||
|
||||
return replaceWithMap( functionTemplate,
|
||||
|
|
@ -5509,7 +5509,6 @@ std::string VulkanHppGenerator::generateCppModuleUsings() const
|
|||
#endif /*VK_NO_PROTOTYPES*/
|
||||
using VULKAN_HPP_NAMESPACE::detail::createResultValueType;
|
||||
using VULKAN_HPP_NAMESPACE::detail::resultCheck;
|
||||
using VULKAN_HPP_NAMESAPCE::detail::isDispatchLoader;
|
||||
}
|
||||
#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
||||
namespace VULKAN_HPP_RAII_NAMESPACE
|
||||
|
|
@ -6800,14 +6799,7 @@ ${deviceCommandAssignments}
|
|||
static DynamicLoader dl;
|
||||
init(instance, device, dl);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct isDispatchLoader<DispatchLoaderDynamic>
|
||||
{
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
|
||||
};
|
||||
)";
|
||||
};)";
|
||||
|
||||
std::string commandMembers, deviceCommandAssignments, initialCommandAssignments, instanceCommandAssignments;
|
||||
std::set<std::string> listedCommands; // some commands are listed with more than one extension!
|
||||
|
|
@ -6910,12 +6902,6 @@ std::string VulkanHppGenerator::generateDispatchLoaderStatic() const
|
|||
${commands}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct isDispatchLoader<DispatchLoaderStatic>
|
||||
{
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
inline DispatchLoaderStatic & getDispatchLoaderStatic()
|
||||
{
|
||||
static DispatchLoaderStatic dls;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ module;
|
|||
#include <vulkan/${api}_shared.hpp>
|
||||
|
||||
export module ${api}_hpp;
|
||||
export import std;
|
||||
export import std.compat;
|
||||
|
||||
export namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,10 +20,3 @@
|
|||
bool m_valid = true;
|
||||
#endif
|
||||
};
|
||||
|
||||
template <typename Type>
|
||||
struct isDispatchLoader
|
||||
{
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -317,12 +317,13 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
# pragma clang diagnostic ignored "-Wcast-function-type"
|
||||
# endif
|
||||
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
template <typename HandleType>
|
||||
class ObjectDestroyShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType =
|
||||
typename std::conditional<HasDestructor<HandleType>::value,
|
||||
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
|
||||
|
|
@ -330,9 +331,10 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
|
||||
|
||||
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &SelectorType::destroy ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &SelectorType::destroy ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
|
|
@ -354,22 +356,24 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
template <typename HandleType>
|
||||
class ObjectFreeShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
|
|
@ -383,21 +387,23 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
template <typename HandleType>
|
||||
class ObjectReleaseShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::release ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::release ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
{
|
||||
}
|
||||
|
|
@ -410,11 +416,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename PoolType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
template <typename HandleType, typename PoolType>
|
||||
class PoolFreeShared
|
||||
{
|
||||
public:
|
||||
|
|
@ -422,14 +428,17 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using PoolTypeExport = PoolType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
|
||||
|
||||
using DestroyFunctionPointerType = ReturnType( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = ReturnType<Dispatcher> ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||
|
||||
PoolFreeShared() = default;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_pool( std::move( pool ) )
|
||||
{
|
||||
|
|
@ -443,9 +452,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
SharedHandle<PoolType> m_pool{};
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
SharedHandle<PoolType> m_pool{};
|
||||
};
|
||||
|
||||
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#include <vulkan/${vulkan_h}>
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
// clang-format off
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
|
|
@ -28,8 +27,9 @@
|
|||
#else
|
||||
# include <cassert>
|
||||
# include <cstring>
|
||||
import std;
|
||||
import std.compat;
|
||||
#endif
|
||||
#include <vulkan/${vulkan_h}>
|
||||
|
||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
||||
# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ )
|
||||
|
|
|
|||
|
|
@ -504,66 +504,6 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
queue.bindSparse( bindSparseInfo, fence );
|
||||
}
|
||||
|
||||
// Fence commands
|
||||
{
|
||||
vk::Device device;
|
||||
vk::FenceCreateInfo fenceCreateInfo;
|
||||
vk::AllocationCallbacks allocationCallbacks;
|
||||
vk::Fence fence;
|
||||
vk::Result result = device.createFence( &fenceCreateInfo, &allocationCallbacks, &fence );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::FenceCreateInfo fenceCreateInfo;
|
||||
vk::Fence fence = device.createFence( fenceCreateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
vk::AllocationCallbacks allocationCallbacks;
|
||||
device.destroyFence( fence, &allocationCallbacks );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
device.destroyFence( fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
uint32_t fenceCount = 1;
|
||||
vk::Fence fence;
|
||||
vk::Result result = device.resetFences( fenceCount, &fence );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
device.resetFences( fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
vk::Result result = device.getFenceStatus( fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
uint32_t fenceCount = 1;
|
||||
vk::Fence fence;
|
||||
vk::Bool32 waitAll = vk::True;
|
||||
uint64_t timeout = 1000000000;
|
||||
vk::Result result = device.waitForFences( fenceCount, &fence, waitAll, timeout );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
vk::Bool32 waitAll = vk::True;
|
||||
uint64_t timeout = 1000000000;
|
||||
vk::Result result = device.waitForFences( fence, waitAll, timeout );
|
||||
}
|
||||
|
||||
#if 0
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
|
|
|
|||
|
|
@ -106,11 +106,6 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
vk::DeviceCreateInfo deviceCreateInfo;
|
||||
vk::raii::Device device = physicalDevice.createDevice( deviceCreateInfo );
|
||||
}
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
vk::DeviceCreateInfo deviceCreateInfo;
|
||||
vk::raii::Device device( physicalDevice, deviceCreateInfo );
|
||||
}
|
||||
|
||||
// Extension discovery commands
|
||||
{
|
||||
|
|
@ -141,12 +136,6 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
uint32_t queueIndex = 0;
|
||||
vk::raii::Queue queue = device.getQueue( queueFamilyIndex, queueIndex );
|
||||
}
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
uint32_t queueFamilyIndex = 0;
|
||||
uint32_t queueIndex = 0;
|
||||
vk::raii::Queue queue( device, queueFamilyIndex, queueIndex );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Queue queue = nullptr;
|
||||
|
|
@ -171,11 +160,6 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
vk::MemoryAllocateInfo memoryAllocateInfo;
|
||||
vk::raii::DeviceMemory deviceMemory = device.allocateMemory( memoryAllocateInfo );
|
||||
}
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::MemoryAllocateInfo memoryAllocateInfo;
|
||||
vk::raii::DeviceMemory deviceMemory( device, memoryAllocateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::DeviceMemory deviceMemory = nullptr;
|
||||
|
|
@ -256,36 +240,5 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
queue.bindSparse( bindSparseInfo, fence );
|
||||
}
|
||||
|
||||
// Fence commands
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::FenceCreateInfo fenceCreateInfo;
|
||||
vk::raii::Fence fence = device.createFence( fenceCreateInfo );
|
||||
}
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::FenceCreateInfo fenceCreateInfo;
|
||||
vk::raii::Fence fence( device, fenceCreateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::Fence fence;
|
||||
device.resetFences( fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Fence fence = nullptr;
|
||||
vk::Result result = fence.getStatus();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::Fence fence;
|
||||
vk::Bool32 waitAll = vk::True;
|
||||
uint64_t timeout = 1000000000;
|
||||
vk::Result result = device.waitForFences( fence, waitAll, timeout );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ VULKAN_HPP_COMPILE_WARNING( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
|
|||
#include <vulkan/vulkan_shared.hpp>
|
||||
|
||||
export module vulkan_hpp;
|
||||
export import std;
|
||||
export import std.compat;
|
||||
|
||||
export namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
|
|
@ -52,7 +52,6 @@ export namespace VULKAN_HPP_NAMESPACE
|
|||
using VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic;
|
||||
using VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic;
|
||||
#endif /*VK_NO_PROTOTYPES*/
|
||||
using VULKAN_HPP_NAMESAPCE::detail::isDispatchLoader;
|
||||
using VULKAN_HPP_NAMESPACE::detail::createResultValueType;
|
||||
using VULKAN_HPP_NAMESPACE::detail::resultCheck;
|
||||
} // namespace detail
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#ifndef VULKAN_HPP
|
||||
#define VULKAN_HPP
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
// clang-format off
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
|
|
@ -38,8 +37,9 @@
|
|||
#else
|
||||
# include <cassert>
|
||||
# include <cstring>
|
||||
import std;
|
||||
import std.compat;
|
||||
#endif
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
||||
# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ )
|
||||
|
|
@ -1023,12 +1023,6 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
#endif
|
||||
};
|
||||
|
||||
template <typename Type>
|
||||
struct isDispatchLoader
|
||||
{
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
#if !defined( VK_NO_PROTOTYPES ) || ( defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC ) && ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 0 ) )
|
||||
class DispatchLoaderStatic : public DispatchLoaderBase
|
||||
{
|
||||
|
|
@ -6606,12 +6600,6 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct isDispatchLoader<DispatchLoaderStatic>
|
||||
{
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
inline DispatchLoaderStatic & getDispatchLoaderStatic()
|
||||
{
|
||||
static DispatchLoaderStatic dls;
|
||||
|
|
@ -24163,13 +24151,6 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
init( instance, device, dl );
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct isDispatchLoader<DispatchLoaderDynamic>
|
||||
{
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
#endif
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -321,12 +321,13 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
# pragma clang diagnostic ignored "-Wcast-function-type"
|
||||
# endif
|
||||
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
template <typename HandleType>
|
||||
class ObjectDestroyShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType =
|
||||
typename std::conditional<HasDestructor<HandleType>::value,
|
||||
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
|
||||
|
|
@ -334,9 +335,10 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
|
||||
|
||||
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &SelectorType::destroy ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &SelectorType::destroy ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
|
|
@ -358,22 +360,24 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
template <typename HandleType>
|
||||
class ObjectFreeShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
|
|
@ -387,21 +391,24 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
template <typename HandleType>
|
||||
class ObjectReleaseShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::release ) ) ), m_dispatch( &dispatch )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::release ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -413,11 +420,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename PoolType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
template <typename HandleType, typename PoolType>
|
||||
class PoolFreeShared
|
||||
{
|
||||
public:
|
||||
|
|
@ -425,14 +432,17 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using PoolTypeExport = PoolType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
|
||||
|
||||
using DestroyFunctionPointerType = ReturnType ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = ReturnType<Dispatcher> ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||
|
||||
PoolFreeShared() = default;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_pool( std::move( pool ) )
|
||||
{
|
||||
|
|
@ -446,9 +456,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
SharedHandle<PoolType> m_pool{};
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
SharedHandle<PoolType> m_pool{};
|
||||
};
|
||||
|
||||
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
||||
|
|
|
|||
Loading…
Reference in New Issue