diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 9bed8db..5d3d1ec 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -2783,6 +2783,10 @@ void writeTypeStruct( std::ofstream & ofs, VkData const& vkData, DependencyData { ofs << "( memcmp( " << it->second.members[i].name << ", rhs." << it->second.members[i].name << ", " << it->second.members[i].arraySize << " * sizeof( " << it->second.members[i].type << " ) ) == 0 )"; } + else if (vkData.handles.find(it->second.members[i].type) != vkData.handles.end()) + { + ofs << "( static_castsecond.members[i].type << ">( " << it->second.members[i].name << " ) == static_castsecond.members[i].type << ">( rhs." << it->second.members[i].name << " ) )"; + } else { ofs << "( " << it->second.members[i].name << " == rhs." << it->second.members[i].name << " )"; diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 645100c..2765909 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -2595,7 +2595,7 @@ namespace vk bool operator==( DescriptorBufferInfo const& rhs ) const { - return ( buffer == rhs.buffer ) + return ( static_cast( buffer ) == static_cast( rhs.buffer ) ) && ( offset == rhs.offset ) && ( range == rhs.range ); } @@ -3773,7 +3773,7 @@ namespace vk bool operator==( DisplayPlanePropertiesKHR const& rhs ) const { - return ( currentDisplay == rhs.currentDisplay ) + return ( static_cast( currentDisplay ) == static_cast( rhs.currentDisplay ) ) && ( currentStackIndex == rhs.currentStackIndex ); } @@ -3877,7 +3877,7 @@ namespace vk bool operator==( DisplayModePropertiesKHR const& rhs ) const { - return ( displayMode == rhs.displayMode ) + return ( static_cast( displayMode ) == static_cast( rhs.displayMode ) ) && ( parameters == rhs.parameters ); } @@ -3950,8 +3950,8 @@ namespace vk bool operator==( DescriptorImageInfo const& rhs ) const { - return ( sampler == rhs.sampler ) - && ( imageView == rhs.imageView ) + return ( static_cast( sampler ) == static_cast( rhs.sampler ) ) + && ( static_cast( imageView ) == static_cast( rhs.imageView ) ) && ( imageLayout == rhs.imageLayout ); } @@ -5593,7 +5593,7 @@ namespace vk { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( memory == rhs.memory ) + && ( static_cast( memory ) == static_cast( rhs.memory ) ) && ( offset == rhs.offset ) && ( size == rhs.size ); } @@ -5710,7 +5710,7 @@ namespace vk { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( dstSet == rhs.dstSet ) + && ( static_cast( dstSet ) == static_cast( rhs.dstSet ) ) && ( dstBinding == rhs.dstBinding ) && ( dstArrayElement == rhs.dstArrayElement ) && ( descriptorCount == rhs.descriptorCount ) @@ -5830,10 +5830,10 @@ namespace vk { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( srcSet == rhs.srcSet ) + && ( static_cast( srcSet ) == static_cast( rhs.srcSet ) ) && ( srcBinding == rhs.srcBinding ) && ( srcArrayElement == rhs.srcArrayElement ) - && ( dstSet == rhs.dstSet ) + && ( static_cast( dstSet ) == static_cast( rhs.dstSet ) ) && ( dstBinding == rhs.dstBinding ) && ( dstArrayElement == rhs.dstArrayElement ) && ( descriptorCount == rhs.descriptorCount ); @@ -5935,7 +5935,7 @@ namespace vk return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) - && ( buffer == rhs.buffer ) + && ( static_cast( buffer ) == static_cast( rhs.buffer ) ) && ( format == rhs.format ) && ( offset == rhs.offset ) && ( range == rhs.range ); @@ -6102,7 +6102,7 @@ namespace vk { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( descriptorPool == rhs.descriptorPool ) + && ( static_cast( descriptorPool ) == static_cast( rhs.descriptorPool ) ) && ( descriptorSetCount == rhs.descriptorSetCount ) && ( pSetLayouts == rhs.pSetLayouts ); } @@ -7119,7 +7119,7 @@ namespace vk { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( commandPool == rhs.commandPool ) + && ( static_cast( commandPool ) == static_cast( rhs.commandPool ) ) && ( level == rhs.level ) && ( commandBufferCount == rhs.commandBufferCount ); } @@ -7215,8 +7215,8 @@ namespace vk { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( renderPass == rhs.renderPass ) - && ( framebuffer == rhs.framebuffer ) + && ( static_cast( renderPass ) == static_cast( rhs.renderPass ) ) + && ( static_cast( framebuffer ) == static_cast( rhs.framebuffer ) ) && ( renderArea == rhs.renderArea ) && ( clearValueCount == rhs.clearValueCount ) && ( pClearValues == rhs.pClearValues ); @@ -7458,7 +7458,7 @@ namespace vk return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) - && ( renderPass == rhs.renderPass ) + && ( static_cast( renderPass ) == static_cast( rhs.renderPass ) ) && ( attachmentCount == rhs.attachmentCount ) && ( pAttachments == rhs.pAttachments ) && ( width == rhs.width ) @@ -8391,8 +8391,8 @@ namespace vk { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( image == rhs.image ) - && ( buffer == rhs.buffer ); + && ( static_cast( image ) == static_cast( rhs.image ) ) + && ( static_cast( buffer ) == static_cast( rhs.buffer ) ); } bool operator!=( DedicatedAllocationMemoryAllocateInfoNV const& rhs ) const @@ -8957,7 +8957,7 @@ namespace vk && ( dstAccessMask == rhs.dstAccessMask ) && ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) - && ( buffer == rhs.buffer ) + && ( static_cast( buffer ) == static_cast( rhs.buffer ) ) && ( offset == rhs.offset ) && ( size == rhs.size ); } @@ -9382,7 +9382,7 @@ namespace vk && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stage == rhs.stage ) - && ( module == rhs.module ) + && ( static_cast( module ) == static_cast( rhs.module ) ) && ( pName == rhs.pName ) && ( pSpecializationInfo == rhs.pSpecializationInfo ); } @@ -9692,8 +9692,8 @@ namespace vk && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stage == rhs.stage ) - && ( layout == rhs.layout ) - && ( basePipelineHandle == rhs.basePipelineHandle ) + && ( static_cast( layout ) == static_cast( rhs.layout ) ) + && ( static_cast( basePipelineHandle ) == static_cast( rhs.basePipelineHandle ) ) && ( basePipelineIndex == rhs.basePipelineIndex ); } @@ -10216,9 +10216,9 @@ namespace vk { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( renderPass == rhs.renderPass ) + && ( static_cast( renderPass ) == static_cast( rhs.renderPass ) ) && ( subpass == rhs.subpass ) - && ( framebuffer == rhs.framebuffer ) + && ( static_cast( framebuffer ) == static_cast( rhs.framebuffer ) ) && ( occlusionQueryEnable == rhs.occlusionQueryEnable ) && ( queryFlags == rhs.queryFlags ) && ( pipelineStatistics == rhs.pipelineStatistics ); @@ -10734,7 +10734,7 @@ namespace vk && ( newLayout == rhs.newLayout ) && ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) - && ( image == rhs.image ) + && ( static_cast( image ) == static_cast( rhs.image ) ) && ( subresourceRange == rhs.subresourceRange ); } @@ -10842,7 +10842,7 @@ namespace vk return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) - && ( image == rhs.image ) + && ( static_cast( image ) == static_cast( rhs.image ) ) && ( viewType == rhs.viewType ) && ( format == rhs.format ) && ( components == rhs.components ) @@ -11374,7 +11374,7 @@ namespace vk { return ( resourceOffset == rhs.resourceOffset ) && ( size == rhs.size ) - && ( memory == rhs.memory ) + && ( static_cast( memory ) == static_cast( rhs.memory ) ) && ( memoryOffset == rhs.memoryOffset ) && ( flags == rhs.flags ); } @@ -11461,7 +11461,7 @@ namespace vk return ( subresource == rhs.subresource ) && ( offset == rhs.offset ) && ( extent == rhs.extent ) - && ( memory == rhs.memory ) + && ( static_cast( memory ) == static_cast( rhs.memory ) ) && ( memoryOffset == rhs.memoryOffset ) && ( flags == rhs.flags ); } @@ -11525,7 +11525,7 @@ namespace vk bool operator==( SparseBufferMemoryBindInfo const& rhs ) const { - return ( buffer == rhs.buffer ) + return ( static_cast( buffer ) == static_cast( rhs.buffer ) ) && ( bindCount == rhs.bindCount ) && ( pBinds == rhs.pBinds ); } @@ -11586,7 +11586,7 @@ namespace vk bool operator==( SparseImageOpaqueMemoryBindInfo const& rhs ) const { - return ( image == rhs.image ) + return ( static_cast( image ) == static_cast( rhs.image ) ) && ( bindCount == rhs.bindCount ) && ( pBinds == rhs.pBinds ); } @@ -11647,7 +11647,7 @@ namespace vk bool operator==( SparseImageMemoryBindInfo const& rhs ) const { - return ( image == rhs.image ) + return ( static_cast( image ) == static_cast( rhs.image ) ) && ( bindCount == rhs.bindCount ) && ( pBinds == rhs.pBinds ); } @@ -12454,10 +12454,10 @@ namespace vk && ( pDepthStencilState == rhs.pDepthStencilState ) && ( pColorBlendState == rhs.pColorBlendState ) && ( pDynamicState == rhs.pDynamicState ) - && ( layout == rhs.layout ) - && ( renderPass == rhs.renderPass ) + && ( static_cast( layout ) == static_cast( rhs.layout ) ) + && ( static_cast( renderPass ) == static_cast( rhs.renderPass ) ) && ( subpass == rhs.subpass ) - && ( basePipelineHandle == rhs.basePipelineHandle ) + && ( static_cast( basePipelineHandle ) == static_cast( rhs.basePipelineHandle ) ) && ( basePipelineIndex == rhs.basePipelineIndex ); } @@ -14462,7 +14462,7 @@ namespace vk bool operator==( DisplayPropertiesKHR const& rhs ) const { - return ( display == rhs.display ) + return ( static_cast( display ) == static_cast( rhs.display ) ) && ( displayName == rhs.displayName ) && ( physicalDimensions == rhs.physicalDimensions ) && ( physicalResolution == rhs.physicalResolution ) @@ -14583,7 +14583,7 @@ namespace vk return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) - && ( displayMode == rhs.displayMode ) + && ( static_cast( displayMode ) == static_cast( rhs.displayMode ) ) && ( planeIndex == rhs.planeIndex ) && ( planeStackIndex == rhs.planeStackIndex ) && ( transform == rhs.transform ) @@ -14890,7 +14890,7 @@ namespace vk return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) - && ( surface == rhs.surface ) + && ( static_cast( surface ) == static_cast( rhs.surface ) ) && ( minImageCount == rhs.minImageCount ) && ( imageFormat == rhs.imageFormat ) && ( imageColorSpace == rhs.imageColorSpace ) @@ -14904,7 +14904,7 @@ namespace vk && ( compositeAlpha == rhs.compositeAlpha ) && ( presentMode == rhs.presentMode ) && ( clipped == rhs.clipped ) - && ( oldSwapchain == rhs.oldSwapchain ); + && ( static_cast( oldSwapchain ) == static_cast( rhs.oldSwapchain ) ); } bool operator!=( SwapchainCreateInfoKHR const& rhs ) const