mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #1422 from asuessenbach/mutual_exclusive
Corrected handling of mutual exclusive arrays in constructors of structures VkAccelerationStructureTrianglesOpacityMicromapEXT and VkMicromapBuildInfoEXT
This commit is contained in:
commit
c15ff49929
@ -12765,8 +12765,10 @@ void VulkanHppGenerator::readTypesTypeStruct( tinyxml2::XMLElement const * eleme
|
|||||||
// Note: even though the arrays are not marked as optional, they still might be mutually exclusive (like in
|
// Note: even though the arrays are not marked as optional, they still might be mutually exclusive (like in
|
||||||
// VkWriteDescriptorSet)! That is, there's not enough information available in vk.xml to decide on that, so we
|
// VkWriteDescriptorSet)! That is, there's not enough information available in vk.xml to decide on that, so we
|
||||||
// need this external knowledge!
|
// need this external knowledge!
|
||||||
static std::set<std::string> mutualExclusiveStructs = { "VkAccelerationStructureBuildGeometryInfoKHR", "VkWriteDescriptorSet" };
|
static std::set<std::string> mutualExclusiveStructs = {
|
||||||
static std::set<std::string> multipleLenStructs = { "VkImageConstraintsInfoFUCHSIA",
|
"VkAccelerationStructureBuildGeometryInfoKHR", "VkAccelerationStructureTrianglesOpacityMicromapEXT", "VkMicromapBuildInfoEXT", "VkWriteDescriptorSet"
|
||||||
|
};
|
||||||
|
static std::set<std::string> multipleLenStructs = { "VkImageConstraintsInfoFUCHSIA",
|
||||||
"VkIndirectCommandsLayoutTokenNV",
|
"VkIndirectCommandsLayoutTokenNV",
|
||||||
"VkPresentInfoKHR",
|
"VkPresentInfoKHR",
|
||||||
"VkSemaphoreWaitInfo",
|
"VkSemaphoreWaitInfo",
|
||||||
@ -12775,7 +12777,7 @@ void VulkanHppGenerator::readTypesTypeStruct( tinyxml2::XMLElement const * eleme
|
|||||||
"VkSubpassDescription2",
|
"VkSubpassDescription2",
|
||||||
"VkWin32KeyedMutexAcquireReleaseInfoKHR",
|
"VkWin32KeyedMutexAcquireReleaseInfoKHR",
|
||||||
"VkWin32KeyedMutexAcquireReleaseInfoNV" };
|
"VkWin32KeyedMutexAcquireReleaseInfoNV" };
|
||||||
bool warned = false;
|
bool warned = false;
|
||||||
for ( auto m0It = it->second.members.begin(); !warned && ( m0It != it->second.members.end() ); ++m0It )
|
for ( auto m0It = it->second.members.begin(); !warned && ( m0It != it->second.members.end() ); ++m0It )
|
||||||
{
|
{
|
||||||
if ( !m0It->len.empty() && ( m0It->len.front() != "null-terminated" ) )
|
if ( !m0It->len.empty() && ( m0It->len.front() != "null-terminated" ) )
|
||||||
|
@ -2516,10 +2516,10 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform = {};
|
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform = {};
|
||||||
uint32_t instanceCustomIndex : 24;
|
uint32_t instanceCustomIndex : 24;
|
||||||
uint32_t mask : 8;
|
uint32_t mask : 8;
|
||||||
uint32_t instanceShaderBindingTableRecordOffset : 24;
|
uint32_t instanceShaderBindingTableRecordOffset : 24;
|
||||||
VkGeometryInstanceFlagsKHR flags : 8;
|
VkGeometryInstanceFlagsKHR flags : 8;
|
||||||
uint64_t accelerationStructureReference = {};
|
uint64_t accelerationStructureReference = {};
|
||||||
};
|
};
|
||||||
using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR;
|
using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR;
|
||||||
@ -2662,10 +2662,10 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
public:
|
public:
|
||||||
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0 = {};
|
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0 = {};
|
||||||
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1 = {};
|
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1 = {};
|
||||||
uint32_t instanceCustomIndex : 24;
|
uint32_t instanceCustomIndex : 24;
|
||||||
uint32_t mask : 8;
|
uint32_t mask : 8;
|
||||||
uint32_t instanceShaderBindingTableRecordOffset : 24;
|
uint32_t instanceShaderBindingTableRecordOffset : 24;
|
||||||
VkGeometryInstanceFlagsKHR flags : 8;
|
VkGeometryInstanceFlagsKHR flags : 8;
|
||||||
uint64_t accelerationStructureReference = {};
|
uint64_t accelerationStructureReference = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3256,10 +3256,10 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
public:
|
public:
|
||||||
VULKAN_HPP_NAMESPACE::SRTDataNV transformT0 = {};
|
VULKAN_HPP_NAMESPACE::SRTDataNV transformT0 = {};
|
||||||
VULKAN_HPP_NAMESPACE::SRTDataNV transformT1 = {};
|
VULKAN_HPP_NAMESPACE::SRTDataNV transformT1 = {};
|
||||||
uint32_t instanceCustomIndex : 24;
|
uint32_t instanceCustomIndex : 24;
|
||||||
uint32_t mask : 8;
|
uint32_t mask : 8;
|
||||||
uint32_t instanceShaderBindingTableRecordOffset : 24;
|
uint32_t instanceShaderBindingTableRecordOffset : 24;
|
||||||
VkGeometryInstanceFlagsKHR flags : 8;
|
VkGeometryInstanceFlagsKHR flags : 8;
|
||||||
uint64_t accelerationStructureReference = {};
|
uint64_t accelerationStructureReference = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3556,19 +3556,19 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
, indexBuffer( indexBuffer_ )
|
, indexBuffer( indexBuffer_ )
|
||||||
, indexStride( indexStride_ )
|
, indexStride( indexStride_ )
|
||||||
, baseTriangle( baseTriangle_ )
|
, baseTriangle( baseTriangle_ )
|
||||||
, usageCountsCount( static_cast<uint32_t>( usageCounts_.size() ) )
|
, usageCountsCount( static_cast<uint32_t>( !usageCounts_.empty() ? usageCounts_.size() : pUsageCounts_.size() ) )
|
||||||
, pUsageCounts( usageCounts_.data() )
|
, pUsageCounts( usageCounts_.data() )
|
||||||
, ppUsageCounts( pUsageCounts_.data() )
|
, ppUsageCounts( pUsageCounts_.data() )
|
||||||
, micromap( micromap_ )
|
, micromap( micromap_ )
|
||||||
{
|
{
|
||||||
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||||
VULKAN_HPP_ASSERT( usageCounts_.empty() || pUsageCounts_.empty() || ( usageCounts_.size() == pUsageCounts_.size() ) );
|
VULKAN_HPP_ASSERT( ( !usageCounts_.empty() + !pUsageCounts_.empty() ) <= 1 );
|
||||||
# else
|
# else
|
||||||
if ( !usageCounts_.empty() && !pUsageCounts_.empty() && ( usageCounts_.size() != pUsageCounts_.size() ) )
|
if ( 1 < ( !usageCounts_.empty() + !pUsageCounts_.empty() ) )
|
||||||
{
|
{
|
||||||
throw LogicError(
|
throw LogicError(
|
||||||
VULKAN_HPP_NAMESPACE_STRING
|
VULKAN_HPP_NAMESPACE_STRING
|
||||||
"::AccelerationStructureTrianglesOpacityMicromapEXT::AccelerationStructureTrianglesOpacityMicromapEXT: !usageCounts_.empty() && !pUsageCounts_.empty() && ( usageCounts_.size() != pUsageCounts_.size() )" );
|
"::AccelerationStructureTrianglesOpacityMicromapEXT::AccelerationStructureTrianglesOpacityMicromapEXT: 1 < ( !usageCounts_.empty() + !pUsageCounts_.empty() )" );
|
||||||
}
|
}
|
||||||
# endif /*VULKAN_HPP_NO_EXCEPTIONS*/
|
# endif /*VULKAN_HPP_NO_EXCEPTIONS*/
|
||||||
}
|
}
|
||||||
@ -45136,7 +45136,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
, flags( flags_ )
|
, flags( flags_ )
|
||||||
, mode( mode_ )
|
, mode( mode_ )
|
||||||
, dstMicromap( dstMicromap_ )
|
, dstMicromap( dstMicromap_ )
|
||||||
, usageCountsCount( static_cast<uint32_t>( usageCounts_.size() ) )
|
, usageCountsCount( static_cast<uint32_t>( !usageCounts_.empty() ? usageCounts_.size() : pUsageCounts_.size() ) )
|
||||||
, pUsageCounts( usageCounts_.data() )
|
, pUsageCounts( usageCounts_.data() )
|
||||||
, ppUsageCounts( pUsageCounts_.data() )
|
, ppUsageCounts( pUsageCounts_.data() )
|
||||||
, data( data_ )
|
, data( data_ )
|
||||||
@ -45145,13 +45145,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
, triangleArrayStride( triangleArrayStride_ )
|
, triangleArrayStride( triangleArrayStride_ )
|
||||||
{
|
{
|
||||||
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||||
VULKAN_HPP_ASSERT( usageCounts_.empty() || pUsageCounts_.empty() || ( usageCounts_.size() == pUsageCounts_.size() ) );
|
VULKAN_HPP_ASSERT( ( !usageCounts_.empty() + !pUsageCounts_.empty() ) <= 1 );
|
||||||
# else
|
# else
|
||||||
if ( !usageCounts_.empty() && !pUsageCounts_.empty() && ( usageCounts_.size() != pUsageCounts_.size() ) )
|
if ( 1 < ( !usageCounts_.empty() + !pUsageCounts_.empty() ) )
|
||||||
{
|
{
|
||||||
throw LogicError(
|
throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::MicromapBuildInfoEXT::MicromapBuildInfoEXT: 1 < ( !usageCounts_.empty() + !pUsageCounts_.empty() )" );
|
||||||
VULKAN_HPP_NAMESPACE_STRING
|
|
||||||
"::MicromapBuildInfoEXT::MicromapBuildInfoEXT: !usageCounts_.empty() && !pUsageCounts_.empty() && ( usageCounts_.size() != pUsageCounts_.size() )" );
|
|
||||||
}
|
}
|
||||||
# endif /*VULKAN_HPP_NO_EXCEPTIONS*/
|
# endif /*VULKAN_HPP_NO_EXCEPTIONS*/
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user