Introduce additional constructor for unions holding a fixed size array of data.

This commit is contained in:
asuessenbach 2022-11-24 08:59:50 +01:00
parent fc0568ea37
commit 556c0d3434
37 changed files with 94 additions and 47 deletions

View File

@ -103,7 +103,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( imageIndex < swapChainData.images.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
commandBuffer.begin( {} );

View File

@ -128,7 +128,7 @@ int main( int /*argc*/, char ** /*argv*/ )
commandBuffer.begin( {} );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );
commandBuffer.beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline );

View File

@ -125,7 +125,7 @@ int main( int /*argc*/, char ** /*argv*/ )
// commandBuffer.begin() has already been called above!
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -150,7 +150,7 @@ int main( int /*argc*/, char ** /*argv*/ )
commandBuffer.begin( {} );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );
commandBuffer.beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline );

View File

@ -152,7 +152,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( imageIndex < swapChainData.images.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );
commandBuffer.beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline );

View File

@ -216,7 +216,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( imageIndex < swapChainData.images.size() );
vk::ClearValue clearValue;
clearValue.color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValue.color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValue );
commandBuffer.beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline );
commandBuffer.bindPipeline( vk::PipelineBindPoint::eGraphics, *graphicsPipeline );

View File

@ -215,7 +215,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( imageIndex < swapChainData.images.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );
commandBuffer.beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline );

View File

@ -142,7 +142,7 @@ int main( int /*argc*/, char ** /*argv*/ )
commandBuffer.resetQueryPool( *queryPool, 0, 2 );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
commandBuffer.beginRenderPass(
vk::RenderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D(), surfaceData.extent ), clearValues ),

View File

@ -306,7 +306,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( imageIndex < swapChainData.images.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
commandBuffer.beginRenderPass(

View File

@ -229,7 +229,7 @@ void main()
assert( imageIndex < swapChainData.images.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
commandBuffer.beginRenderPass(

View File

@ -189,7 +189,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( imageIndex < swapChainData.images.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -149,7 +149,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( imageIndex < swapChainData.images.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );
commandBuffer.beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline );

View File

@ -1092,7 +1092,7 @@ int main( int /*argc*/, char ** /*argv*/ )
shaderBindingTableBufferData.upload( shaderHandleStorage );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
// Main loop

View File

@ -180,7 +180,7 @@ int main( int /*argc*/, char ** /*argv*/ )
}
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -205,7 +205,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( imageIndex < swapChainData.images.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -120,7 +120,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( imageIndex < swapChainData.images.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -146,7 +146,7 @@ int main( int /*argc*/, char ** /*argv*/ )
commandBuffer.begin( vk::CommandBufferBeginInfo() );
vk::ClearValue clearValue;
clearValue.color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValue.color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
vk::RenderPassBeginInfo renderPassBeginInfo( *renderPass, *framebuffers[imageIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValue );
commandBuffer.beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline );

View File

@ -10131,6 +10131,39 @@ std::string VulkanHppGenerator::generateUnion( std::pair<std::string, StructureD
{ "memberType", memberType },
{ "unionName", stripPrefix( structure.first, "Vk" ) } } );
firstMember = false;
if ( !memberIt->arraySizes.empty() )
{
assert( !multipleType );
assert( memberIt->arraySizes.size() == 1 );
int size = std::stoi( memberIt->arraySizes[0] );
assert( std::to_string( size ) == memberIt->arraySizes[0] );
std::string arguments, callArguments;
bool firstArgument = true;
for ( int i = 0; i < size; i++ )
{
if ( !firstArgument )
{
arguments += ", ";
callArguments += ", ";
}
std::string argumentIndex = std::to_string( i );
arguments += memberIt->type.type + " " + memberIt->name + "_" + argumentIndex;
callArguments += memberIt->name + "_" + argumentIndex;
firstArgument = false;
}
static const std::string constructorBySequenceTemplate = R"(
VULKAN_HPP_CONSTEXPR ${unionName}( ${arguments} )
: ${memberName}( { ${callArguments} } )
{})";
constructors += "\n" + replaceWithMap( constructorBySequenceTemplate,
{ { "arguments", arguments },
{ "callArguments", callArguments },
{ "memberName", memberIt->name },
{ "unionName", stripPrefix( structure.first, "Vk" ) } } );
}
}
}

View File

@ -88,7 +88,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( currentBuffer.value < framebuffers.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
commandBuffer.begin( vk::CommandBufferBeginInfo( vk::CommandBufferUsageFlags() ) );

View File

@ -112,7 +112,7 @@ int main( int /*argc*/, char ** /*argv*/ )
commandBuffer.begin( vk::CommandBufferBeginInfo( vk::CommandBufferUsageFlags() ) );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(
renderPass, framebuffers[currentBuffer.value], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -119,7 +119,7 @@ int main( int /*argc*/, char ** /*argv*/ )
// commandBuffer.begin() has already been called above!
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(
renderPass, framebuffers[currentBuffer.value], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -151,7 +151,7 @@ int main( int /*argc*/, char ** /*argv*/ )
commandBuffer.begin( vk::CommandBufferBeginInfo( vk::CommandBufferUsageFlags() ) );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(
renderPass, framebuffers[currentBuffer.value], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -143,7 +143,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( currentBuffer.value < framebuffers.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(
renderPass, framebuffers[currentBuffer.value], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -134,7 +134,7 @@ int main( int /*argc*/, char ** /*argv*/ )
commandBuffer.clearColorImage( inputImage,
vk::ImageLayout::eTransferDstOptimal,
vk::ClearColorValue( std::array<float, 4>( { { 1.0f, 1.0f, 0.0f, 0.0f } } ) ),
vk::ClearColorValue( 1.0f, 1.0f, 0.0f, 0.0f ),
vk::ImageSubresourceRange( vk::ImageAspectFlagBits::eColor, 0, VK_REMAINING_MIP_LEVELS, 0, VK_REMAINING_ARRAY_LAYERS ) );
// Set the image layout to SHADER_READONLY_OPTIMAL for use by the shaders
@ -220,7 +220,7 @@ int main( int /*argc*/, char ** /*argv*/ )
uint32_t currentBuffer = nexImage.value;
vk::ClearValue clearValue;
clearValue.color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValue.color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
commandBuffer.beginRenderPass(
vk::RenderPassBeginInfo( renderPass, framebuffers[currentBuffer], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValue ),
vk::SubpassContents::eInline );

View File

@ -199,7 +199,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( currentBuffer.value < framebuffers.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(
renderPass, framebuffers[currentBuffer.value], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -129,7 +129,7 @@ int main( int /*argc*/, char ** /*argv*/ )
commandBuffer.resetQueryPool( queryPool, 0, 2 );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
commandBuffer.beginRenderPass(
vk::RenderPassBeginInfo( renderPass, framebuffers[currentBuffer.value], vk::Rect2D( vk::Offset2D(), surfaceData.extent ), clearValues ),

View File

@ -300,7 +300,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( currentBuffer.value < framebuffers.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
commandBuffer.beginRenderPass(

View File

@ -239,7 +239,7 @@ void main()
assert( currentBuffer.value < framebuffers.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
commandBuffer.beginRenderPass(

View File

@ -184,7 +184,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( currentBuffer.value < framebuffers.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(

View File

@ -148,7 +148,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( currentBuffer.value < framebuffers.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(
renderPass, framebuffers[currentBuffer.value], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -1084,7 +1084,7 @@ int main( int /*argc*/, char ** /*argv*/ )
shaderBindingTableBufferData.upload( device, shaderHandleStorage );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
// Main loop

View File

@ -176,7 +176,7 @@ int main( int /*argc*/, char ** /*argv*/ )
}
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(

View File

@ -201,7 +201,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( currentBuffer.value < framebuffers.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(

View File

@ -116,7 +116,7 @@ int main( int /*argc*/, char ** /*argv*/ )
assert( currentBuffer.value < framebuffers.size() );
std::array<vk::ClearValue, 2> clearValues;
clearValues[0].color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValues[0].color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 );
vk::RenderPassBeginInfo renderPassBeginInfo(
renderPass, framebuffers[currentBuffer.value], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValues );

View File

@ -149,7 +149,7 @@ int main( int /*argc*/, char ** /*argv*/ )
commandBuffer.begin( vk::CommandBufferBeginInfo() );
vk::ClearValue clearValue;
clearValue.color = vk::ClearColorValue( std::array<float, 4>( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) );
clearValue.color = vk::ClearColorValue( 0.2f, 0.2f, 0.2f, 0.2f );
vk::RenderPassBeginInfo renderPassBeginInfo(
renderPass, framebuffers[currentBuffer.value], vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), clearValue );

View File

@ -1708,9 +1708,9 @@ namespace VULKAN_HPP_NAMESPACE
static VULKAN_HPP_CONST_OR_CONSTEXPR QueueFlags allFlags = QueueFlagBits::eGraphics | QueueFlagBits::eCompute | QueueFlagBits::eTransfer |
QueueFlagBits::eSparseBinding | QueueFlagBits::eProtected
#if defined( VK_ENABLE_BETA_EXTENSIONS )
| QueueFlagBits::eVideoDecodeKHR | QueueFlagBits::eVideoEncodeKHR
| QueueFlagBits::eVideoDecodeKHR | QueueFlagBits::eVideoEncodeKHR
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
| QueueFlagBits::eOpticalFlowNV;
| QueueFlagBits::eOpticalFlowNV;
};
enum class SampleCountFlagBits : VkSampleCountFlags
@ -1984,7 +1984,7 @@ namespace VULKAN_HPP_NAMESPACE
static VULKAN_HPP_CONST_OR_CONSTEXPR QueryResultFlags allFlags = QueryResultFlagBits::e64 | QueryResultFlagBits::eWait |
QueryResultFlagBits::eWithAvailability | QueryResultFlagBits::ePartial
#if defined( VK_ENABLE_BETA_EXTENSIONS )
| QueryResultFlagBits::eWithStatusKHR
| QueryResultFlagBits::eWithStatusKHR
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
;
};

View File

@ -2630,10 +2630,10 @@ namespace VULKAN_HPP_NAMESPACE
public:
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform = {};
uint32_t instanceCustomIndex : 24;
uint32_t mask : 8;
uint32_t instanceCustomIndex : 24;
uint32_t mask : 8;
uint32_t instanceShaderBindingTableRecordOffset : 24;
VkGeometryInstanceFlagsKHR flags : 8;
VkGeometryInstanceFlagsKHR flags : 8;
uint64_t accelerationStructureReference = {};
};
using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR;
@ -2776,10 +2776,10 @@ namespace VULKAN_HPP_NAMESPACE
public:
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0 = {};
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1 = {};
uint32_t instanceCustomIndex : 24;
uint32_t mask : 8;
uint32_t instanceCustomIndex : 24;
uint32_t mask : 8;
uint32_t instanceShaderBindingTableRecordOffset : 24;
VkGeometryInstanceFlagsKHR flags : 8;
VkGeometryInstanceFlagsKHR flags : 8;
uint64_t accelerationStructureReference = {};
};
@ -3370,10 +3370,10 @@ namespace VULKAN_HPP_NAMESPACE
public:
VULKAN_HPP_NAMESPACE::SRTDataNV transformT0 = {};
VULKAN_HPP_NAMESPACE::SRTDataNV transformT1 = {};
uint32_t instanceCustomIndex : 24;
uint32_t mask : 8;
uint32_t instanceCustomIndex : 24;
uint32_t mask : 8;
uint32_t instanceShaderBindingTableRecordOffset : 24;
VkGeometryInstanceFlagsKHR flags : 8;
VkGeometryInstanceFlagsKHR flags : 8;
uint64_t accelerationStructureReference = {};
};
@ -12509,9 +12509,23 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_CONSTEXPR_14 ClearColorValue( const std::array<float, 4> & float32_ = {} ) : float32( float32_ ) {}
VULKAN_HPP_CONSTEXPR ClearColorValue( float float32_0, float float32_1, float float32_2, float float32_3 )
: float32( { float32_0, float32_1, float32_2, float32_3 } )
{
}
VULKAN_HPP_CONSTEXPR_14 ClearColorValue( const std::array<int32_t, 4> & int32_ ) : int32( int32_ ) {}
VULKAN_HPP_CONSTEXPR ClearColorValue( int32_t int32_0, int32_t int32_1, int32_t int32_2, int32_t int32_3 ) : int32( { int32_0, int32_1, int32_2, int32_3 } )
{
}
VULKAN_HPP_CONSTEXPR_14 ClearColorValue( const std::array<uint32_t, 4> & uint32_ ) : uint32( uint32_ ) {}
VULKAN_HPP_CONSTEXPR ClearColorValue( uint32_t uint32_0, uint32_t uint32_1, uint32_t uint32_2, uint32_t uint32_3 )
: uint32( { uint32_0, uint32_1, uint32_2, uint32_3 } )
{
}
#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
#if !defined( VULKAN_HPP_NO_UNION_SETTERS )