Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change samples from resetting command buffers to resetting command pool #1638

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions RAII_Samples/13_InitVertexBuffer/13_InitVertexBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/15_DrawCube/15_DrawCube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
11 changes: 6 additions & 5 deletions RAII_Samples/CopyBlitImage/CopyBlitImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down Expand Up @@ -140,7 +139,9 @@ int main( int /*argc*/, char ** /*argv*/ )
device.flushMappedMemoryRanges( mappedMemoryRange );
deviceMemory.unmapMemory();

commandBuffer.reset( {} );
// reset the command buffer by resetting the complete command pool
commandPool.reset();

commandBuffer.begin( vk::CommandBufferBeginInfo() );

// Intend to blit from this image, set the layout accordingly
Expand All @@ -151,9 +152,9 @@ int main( int /*argc*/, char ** /*argv*/ )
// Do a 32x32 blit to all of the dst image - should get big squares
vk::ImageSubresourceLayers imageSubresourceLayers( vk::ImageAspectFlagBits::eColor, 0, 0, 1 );
vk::ImageBlit imageBlit( imageSubresourceLayers,
{ { vk::Offset3D( 0, 0, 0 ), vk::Offset3D( 32, 32, 1 ) } },
{ { vk::Offset3D( 0, 0, 0 ), vk::Offset3D( 32, 32, 1 ) } },
imageSubresourceLayers,
{ { vk::Offset3D( 0, 0, 0 ), vk::Offset3D( surfaceData.extent.width, surfaceData.extent.height, 1 ) } } );
{ { vk::Offset3D( 0, 0, 0 ), vk::Offset3D( surfaceData.extent.width, surfaceData.extent.height, 1 ) } } );
commandBuffer.blitImage(
*blitSourceImage, vk::ImageLayout::eTransferSrcOptimal, blitDestinationImage, vk::ImageLayout::eTransferDstOptimal, imageBlit, vk::Filter::eLinear );

Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/DrawTexturedCube/DrawTexturedCube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/DynamicUniform/DynamicUniform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
10 changes: 7 additions & 3 deletions RAII_Samples/Events/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main( int /*argc*/, char ** /*argv*/ )
uint32_t graphicsQueueFamilyIndex = vk::su::findGraphicsQueueFamilyIndex( physicalDevice.getQueueFamilyProperties() );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsQueueFamilyIndex, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsQueueFamilyIndex } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsQueueFamilyIndex } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsQueueFamilyIndex, 0 );
Expand Down Expand Up @@ -71,7 +71,9 @@ int main( int /*argc*/, char ** /*argv*/ )
// Now create an event and wait for it on the GPU
vk::raii::Event event( device, vk::EventCreateInfo() );

commandBuffer.reset( vk::CommandBufferResetFlags() );
// reset the command buffer by resetting the complete command pool of this frame
commandPool.reset();

commandBuffer.begin( vk::CommandBufferBeginInfo() );
commandBuffer.waitEvents( { *event }, vk::PipelineStageFlagBits::eHost, vk::PipelineStageFlagBits::eBottomOfPipe, nullptr, nullptr, nullptr );
commandBuffer.end();
Expand All @@ -98,10 +100,12 @@ int main( int /*argc*/, char ** /*argv*/ )
} while ( result == vk::Result::eTimeout );
assert( result == vk::Result::eSuccess );

commandBuffer.reset( {} );
device.resetFences( { *fence } );
event.reset();

// reset the command buffer by resetting the complete command pool
commandPool.reset();

// Now set the event from the GPU and wait on the CPU
commandBuffer.begin( vk::CommandBufferBeginInfo() );
commandBuffer.setEvent( *event, vk::PipelineStageFlagBits::eBottomOfPipe );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/ImmutableSampler/ImmutableSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/InitTexture/InitTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/InputAttachment/InputAttachment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/MultipleSets/MultipleSets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/OcclusionQuery/OcclusionQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/PipelineCache/PipelineCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/PipelineDerivative/PipelineDerivative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/PushConstants/PushConstants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/PushDescriptors/PushDescriptors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, deviceExtensions );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
12 changes: 8 additions & 4 deletions RAII_Samples/RayTracing/RayTracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ AccelerationStructureData createAccelerationStructureData( vk::raii::PhysicalDev
struct PerFrameData
{
PerFrameData( vk::raii::Device const & device, uint32_t queueFamilyIndex )
: commandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, queueFamilyIndex } )
: commandPool( device, { {}, queueFamilyIndex } )
, commandBuffer( vk::raii::su::makeCommandBuffer( device, commandPool ) )
, fence( device, vk::FenceCreateInfo( vk::FenceCreateFlagBits::eSignaled ) )
, presentCompleteSemaphore( device, vk::SemaphoreCreateInfo() )
Expand Down Expand Up @@ -1109,8 +1109,6 @@ int main( int /*argc*/, char ** /*argv*/ )
double startTime = glfwGetTime();
glfwPollEvents();

vk::raii::CommandBuffer const & commandBuffer = perFrameData[frameIndex].commandBuffer;

int w, h;
glfwGetWindowSize( window, &w, &h );
if ( ( w != static_cast<int>( windowExtent.width ) ) || ( h != static_cast<int>( windowExtent.height ) ) )
Expand All @@ -1129,7 +1127,8 @@ int main( int /*argc*/, char ** /*argv*/ )
depthBufferData = vk::raii::su::DepthBufferData( physicalDevice, device, vk::raii::su::pickDepthFormat( physicalDevice ), windowExtent );

vk::raii::su::oneTimeSubmit(
commandBuffer,
device,
perFrameData[frameIndex].commandPool,
graphicsQueue,
[&]( vk::raii::CommandBuffer const & commandBuffer )
{
Expand Down Expand Up @@ -1160,6 +1159,11 @@ int main( int /*argc*/, char ** /*argv*/ )
;
device.resetFences( { *perFrameData[frameIndex].fence } );

// reset the command buffer by resetting the complete command pool of this frame
perFrameData[frameIndex].commandPool.reset();

vk::raii::CommandBuffer const & commandBuffer = perFrameData[frameIndex].commandBuffer;

commandBuffer.begin( vk::CommandBufferBeginInfo( vk::CommandBufferUsageFlagBits::eOneTimeSubmit ) );

if ( appInfo.useRasterRender )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/SeparateImageSampler/SeparateImageSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/Template/Template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
3 changes: 1 addition & 2 deletions RAII_Samples/TexelBuffer/TexelBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::raii::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );

vk::raii::CommandPool commandPool =
vk::raii::CommandPool( device, { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandPool commandPool = vk::raii::CommandPool( device, { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::raii::CommandBuffer commandBuffer = vk::raii::su::makeCommandBuffer( device, commandPool );

vk::raii::Queue graphicsQueue( device, graphicsAndPresentQueueFamilyIndex.first, 0 );
Expand Down
Loading
Loading