Special handling for detecting mutual exclusive len usage on structures.

This commit is contained in:
asuessenbach
2020-12-10 17:23:44 +01:00
parent b02354a43c
commit 45e06d1753
3 changed files with 62 additions and 29 deletions

View File

@@ -17844,19 +17844,19 @@ namespace VULKAN_HPP_NAMESPACE
, mode( mode_ )
, srcAccelerationStructure( srcAccelerationStructure_ )
, dstAccelerationStructure( dstAccelerationStructure_ )
, geometryCount( static_cast<uint32_t>( geometries_.size() ) )
, geometryCount( static_cast<uint32_t>( !geometries_.empty() ? geometries_.size() : pGeometries_.size() ) )
, pGeometries( geometries_.data() )
, ppGeometries( pGeometries_.data() )
, scratchData( scratchData_ )
{
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( geometries_.empty() || pGeometries_.empty() || ( geometries_.size() == pGeometries_.size() ) );
VULKAN_HPP_ASSERT( ( !geometries_.empty() + !pGeometries_.empty() ) == 1 );
# else
if ( !geometries_.empty() && !pGeometries_.empty() && ( geometries_.size() != pGeometries_.size() ) )
if ( ( !geometries_.empty() + !pGeometries_.empty() ) != 1 )
{
throw LogicError(
VULKAN_HPP_NAMESPACE_STRING
"::AccelerationStructureBuildGeometryInfoKHR::AccelerationStructureBuildGeometryInfoKHR: !geometries_.empty() && !pGeometries_.empty() && ( geometries_.size() != pGeometries_.size() )" );
"::AccelerationStructureBuildGeometryInfoKHR::AccelerationStructureBuildGeometryInfoKHR: ( !geometries_.empty() + !pGeometries_.empty() ) != 1" );
}
# endif /*VULKAN_HPP_NO_EXCEPTIONS*/
}