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

This commit is contained in:
Andreas Süßenbach
2023-08-14 16:09:11 +02:00
committed by GitHub
parent e2f5348e28
commit a6b2199409
44 changed files with 80 additions and 98 deletions

View File

@@ -88,7 +88,7 @@ int main( int /*argc*/, char ** /*argv*/ )
std::pair<uint32_t, uint32_t> graphicsAndPresentQueueFamilyIndex = vk::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, surfaceData.surface );
vk::Device device = vk::su::createDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() );
vk::CommandPool commandPool = vk::su::createCommandPool( device, graphicsAndPresentQueueFamilyIndex.first );
vk::CommandPool commandPool = device.createCommandPool( { {}, graphicsAndPresentQueueFamilyIndex.first } );
vk::CommandBuffer commandBuffer =
device.allocateCommandBuffers( vk::CommandBufferAllocateInfo( commandPool, vk::CommandBufferLevel::ePrimary, 1 ) ).front();