mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-22 12:20:05 +00:00
Add special handling for call sequence in commands for vkGetDeviceFaultInfoEXT (#1790)
This commit is contained in:
parent
6bdba3ef31
commit
9fa4459c50
@ -3066,6 +3066,39 @@ std::string VulkanHppGenerator::generateCallSequence( std::string const &
|
|||||||
bool raiiFactory ) const
|
bool raiiFactory ) const
|
||||||
{
|
{
|
||||||
std::string dispatcher = raii ? "getDispatcher()->" : "d.";
|
std::string dispatcher = raii ? "getDispatcher()->" : "d.";
|
||||||
|
|
||||||
|
// first a special handling on vkGetDeviceFaultInfoEXT!!
|
||||||
|
if ( name == "vkGetDeviceFaultInfoEXT" )
|
||||||
|
{
|
||||||
|
const std::string callSequenceTemplate =
|
||||||
|
R"( VULKAN_HPP_NAMESPACE::Result result;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
result = static_cast<VULKAN_HPP_NAMESPACE::Result>( ${dispatcher}vkGetDeviceFaultInfoEXT( m_device, reinterpret_cast<VkDeviceFaultCountsEXT *>( &faultCounts ), nullptr ) );
|
||||||
|
if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
|
||||||
|
{
|
||||||
|
std::free( faultInfo.pAddressInfos );
|
||||||
|
if ( faultCounts.addressInfoCount )
|
||||||
|
{
|
||||||
|
faultInfo.pAddressInfos = reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT *>( std::malloc( faultCounts.addressInfoCount * sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT ) ) );
|
||||||
|
}
|
||||||
|
std::free( faultInfo.pVendorInfos );
|
||||||
|
if ( faultCounts.vendorInfoCount )
|
||||||
|
{
|
||||||
|
faultInfo.pVendorInfos = reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT *>( std::malloc( faultCounts.vendorInfoCount * sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT ) ) );
|
||||||
|
}
|
||||||
|
std::free( faultInfo.pVendorBinaryData );
|
||||||
|
if ( faultCounts.vendorBinarySize )
|
||||||
|
{
|
||||||
|
faultInfo.pVendorBinaryData = std::malloc( faultCounts.vendorBinarySize );
|
||||||
|
}
|
||||||
|
result = static_cast<VULKAN_HPP_NAMESPACE::Result>( ${dispatcher}vkGetDeviceFaultInfoEXT( m_device, reinterpret_cast<VkDeviceFaultCountsEXT *>( &faultCounts ), reinterpret_cast<VkDeviceFaultInfoEXT *>( &faultInfo ) ) );
|
||||||
|
}
|
||||||
|
} while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete );)";
|
||||||
|
|
||||||
|
return replaceWithMap( callSequenceTemplate, { { "dispatcher", dispatcher } } );
|
||||||
|
}
|
||||||
|
|
||||||
// if at least one returnParam is a size value of a vector param (and no singular params), we need two calls
|
// if at least one returnParam is a size value of a vector param (and no singular params), we need two calls
|
||||||
if ( singularParams.empty() &&
|
if ( singularParams.empty() &&
|
||||||
std::any_of( returnParams.begin(),
|
std::any_of( returnParams.begin(),
|
||||||
|
@ -22589,8 +22589,34 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
std::pair<VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT, VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT> data_;
|
std::pair<VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT, VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT> data_;
|
||||||
VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT & faultCounts = data_.first;
|
VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT & faultCounts = data_.first;
|
||||||
VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT & faultInfo = data_.second;
|
VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT & faultInfo = data_.second;
|
||||||
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( d.vkGetDeviceFaultInfoEXT(
|
VULKAN_HPP_NAMESPACE::Result result;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
result =
|
||||||
|
static_cast<VULKAN_HPP_NAMESPACE::Result>( d.vkGetDeviceFaultInfoEXT( m_device, reinterpret_cast<VkDeviceFaultCountsEXT *>( &faultCounts ), nullptr ) );
|
||||||
|
if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
|
||||||
|
{
|
||||||
|
std::free( faultInfo.pAddressInfos );
|
||||||
|
if ( faultCounts.addressInfoCount )
|
||||||
|
{
|
||||||
|
faultInfo.pAddressInfos = reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT *>(
|
||||||
|
std::malloc( faultCounts.addressInfoCount * sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT ) ) );
|
||||||
|
}
|
||||||
|
std::free( faultInfo.pVendorInfos );
|
||||||
|
if ( faultCounts.vendorInfoCount )
|
||||||
|
{
|
||||||
|
faultInfo.pVendorInfos = reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT *>(
|
||||||
|
std::malloc( faultCounts.vendorInfoCount * sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT ) ) );
|
||||||
|
}
|
||||||
|
std::free( faultInfo.pVendorBinaryData );
|
||||||
|
if ( faultCounts.vendorBinarySize )
|
||||||
|
{
|
||||||
|
faultInfo.pVendorBinaryData = std::malloc( faultCounts.vendorBinarySize );
|
||||||
|
}
|
||||||
|
result = static_cast<VULKAN_HPP_NAMESPACE::Result>( d.vkGetDeviceFaultInfoEXT(
|
||||||
m_device, reinterpret_cast<VkDeviceFaultCountsEXT *>( &faultCounts ), reinterpret_cast<VkDeviceFaultInfoEXT *>( &faultInfo ) ) );
|
m_device, reinterpret_cast<VkDeviceFaultCountsEXT *>( &faultCounts ), reinterpret_cast<VkDeviceFaultInfoEXT *>( &faultInfo ) ) );
|
||||||
|
}
|
||||||
|
} while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete );
|
||||||
resultCheck(
|
resultCheck(
|
||||||
result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultInfoEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } );
|
result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultInfoEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } );
|
||||||
|
|
||||||
|
@ -21056,10 +21056,34 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
std::pair<VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT, VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT> data_;
|
std::pair<VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT, VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT> data_;
|
||||||
VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT & faultCounts = data_.first;
|
VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT & faultCounts = data_.first;
|
||||||
VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT & faultInfo = data_.second;
|
VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT & faultInfo = data_.second;
|
||||||
VULKAN_HPP_NAMESPACE::Result result =
|
VULKAN_HPP_NAMESPACE::Result result;
|
||||||
static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkGetDeviceFaultInfoEXT( static_cast<VkDevice>( m_device ),
|
do
|
||||||
reinterpret_cast<VkDeviceFaultCountsEXT *>( &faultCounts ),
|
{
|
||||||
reinterpret_cast<VkDeviceFaultInfoEXT *>( &faultInfo ) ) );
|
result = static_cast<VULKAN_HPP_NAMESPACE::Result>(
|
||||||
|
getDispatcher()->vkGetDeviceFaultInfoEXT( m_device, reinterpret_cast<VkDeviceFaultCountsEXT *>( &faultCounts ), nullptr ) );
|
||||||
|
if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
|
||||||
|
{
|
||||||
|
std::free( faultInfo.pAddressInfos );
|
||||||
|
if ( faultCounts.addressInfoCount )
|
||||||
|
{
|
||||||
|
faultInfo.pAddressInfos = reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT *>(
|
||||||
|
std::malloc( faultCounts.addressInfoCount * sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT ) ) );
|
||||||
|
}
|
||||||
|
std::free( faultInfo.pVendorInfos );
|
||||||
|
if ( faultCounts.vendorInfoCount )
|
||||||
|
{
|
||||||
|
faultInfo.pVendorInfos = reinterpret_cast<VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT *>(
|
||||||
|
std::malloc( faultCounts.vendorInfoCount * sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT ) ) );
|
||||||
|
}
|
||||||
|
std::free( faultInfo.pVendorBinaryData );
|
||||||
|
if ( faultCounts.vendorBinarySize )
|
||||||
|
{
|
||||||
|
faultInfo.pVendorBinaryData = std::malloc( faultCounts.vendorBinarySize );
|
||||||
|
}
|
||||||
|
result = static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkGetDeviceFaultInfoEXT(
|
||||||
|
m_device, reinterpret_cast<VkDeviceFaultCountsEXT *>( &faultCounts ), reinterpret_cast<VkDeviceFaultInfoEXT *>( &faultInfo ) ) );
|
||||||
|
}
|
||||||
|
} while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete );
|
||||||
resultCheck( result,
|
resultCheck( result,
|
||||||
VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultInfoEXT",
|
VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultInfoEXT",
|
||||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } );
|
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } );
|
||||||
|
Loading…
Reference in New Issue
Block a user