Skip to content

Commit 994c895

Browse files
Merge pull request #211 from KhronosGroup/fix_sync
Fix synchronization
2 parents f6d84ec + 2b42648 commit 994c895

25 files changed

+366
-465
lines changed

attachments/15_hello_triangle.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,10 @@ class HelloTriangleApplication {
374374
imageIndex,
375375
vk::ImageLayout::eUndefined,
376376
vk::ImageLayout::eColorAttachmentOptimal,
377-
{}, // srcAccessMask (no need to wait for previous operations)
378-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
379-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
380-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
377+
{}, // srcAccessMask (no need to wait for previous operations)
378+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
379+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
380+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
381381
);
382382
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
383383
vk::RenderingAttachmentInfo attachmentInfo = {
@@ -406,9 +406,9 @@ class HelloTriangleApplication {
406406
vk::ImageLayout::eColorAttachmentOptimal,
407407
vk::ImageLayout::ePresentSrcKHR,
408408
vk::AccessFlagBits2::eColorAttachmentWrite, // srcAccessMask
409-
{}, // dstAccessMask
410-
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
411-
vk::PipelineStageFlagBits2::eBottomOfPipe // dstStage
409+
{}, // dstAccessMask
410+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
411+
vk::PipelineStageFlagBits2::eBottomOfPipe // dstStage
412412
);
413413
commandBuffer.end();
414414
}

attachments/16_frames_in_flight.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ class HelloTriangleApplication {
379379
imageIndex,
380380
vk::ImageLayout::eUndefined,
381381
vk::ImageLayout::eColorAttachmentOptimal,
382-
{}, // srcAccessMask (no need to wait for previous operations)
383-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
384-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
385-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
382+
{}, // srcAccessMask (no need to wait for previous operations)
383+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
384+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
385+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
386386
);
387387
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
388388
vk::RenderingAttachmentInfo attachmentInfo = {

attachments/17_swap_chain_recreation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,10 @@ class HelloTriangleApplication {
408408
imageIndex,
409409
vk::ImageLayout::eUndefined,
410410
vk::ImageLayout::eColorAttachmentOptimal,
411-
{}, // srcAccessMask (no need to wait for previous operations)
412-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
413-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
414-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
411+
{}, // srcAccessMask (no need to wait for previous operations)
412+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
413+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
414+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
415415
);
416416
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
417417
vk::RenderingAttachmentInfo attachmentInfo = {

attachments/18_vertex_input.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,10 @@ class HelloTriangleApplication {
427427
imageIndex,
428428
vk::ImageLayout::eUndefined,
429429
vk::ImageLayout::eColorAttachmentOptimal,
430-
{}, // srcAccessMask (no need to wait for previous operations)
431-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
432-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
433-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
430+
{}, // srcAccessMask (no need to wait for previous operations)
431+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
432+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
433+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
434434
);
435435
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
436436
vk::RenderingAttachmentInfo attachmentInfo = {

attachments/19_vertex_buffer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,10 @@ class HelloTriangleApplication {
458458
imageIndex,
459459
vk::ImageLayout::eUndefined,
460460
vk::ImageLayout::eColorAttachmentOptimal,
461-
{}, // srcAccessMask (no need to wait for previous operations)
462-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
463-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
464-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
461+
{}, // srcAccessMask (no need to wait for previous operations)
462+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
463+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
464+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
465465
);
466466
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
467467
vk::RenderingAttachmentInfo attachmentInfo = {

attachments/20_staging_buffer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,10 +477,10 @@ class HelloTriangleApplication {
477477
imageIndex,
478478
vk::ImageLayout::eUndefined,
479479
vk::ImageLayout::eColorAttachmentOptimal,
480-
{}, // srcAccessMask (no need to wait for previous operations)
481-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
482-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
483-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
480+
{}, // srcAccessMask (no need to wait for previous operations)
481+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
482+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
483+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
484484
);
485485
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
486486
vk::RenderingAttachmentInfo attachmentInfo = {

attachments/21_index_buffer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,10 @@ class HelloTriangleApplication {
501501
imageIndex,
502502
vk::ImageLayout::eUndefined,
503503
vk::ImageLayout::eColorAttachmentOptimal,
504-
{}, // srcAccessMask (no need to wait for previous operations)
505-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
506-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
507-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
504+
{}, // srcAccessMask (no need to wait for previous operations)
505+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
506+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
507+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
508508
);
509509
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
510510
vk::RenderingAttachmentInfo attachmentInfo = {

attachments/22_descriptor_layout.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,10 @@ class HelloTriangleApplication {
540540
imageIndex,
541541
vk::ImageLayout::eUndefined,
542542
vk::ImageLayout::eColorAttachmentOptimal,
543-
{}, // srcAccessMask (no need to wait for previous operations)
544-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
545-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
546-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
543+
{}, // srcAccessMask (no need to wait for previous operations)
544+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
545+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
546+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
547547
);
548548
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
549549
vk::RenderingAttachmentInfo attachmentInfo = {

attachments/23_descriptor_sets.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,10 @@ class HelloTriangleApplication {
564564
imageIndex,
565565
vk::ImageLayout::eUndefined,
566566
vk::ImageLayout::eColorAttachmentOptimal,
567-
{}, // srcAccessMask (no need to wait for previous operations)
568-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
569-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
570-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
567+
{}, // srcAccessMask (no need to wait for previous operations)
568+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
569+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
570+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
571571
);
572572
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
573573
vk::RenderingAttachmentInfo attachmentInfo = {

attachments/24_texture_image.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -668,10 +668,10 @@ class HelloTriangleApplication {
668668
imageIndex,
669669
vk::ImageLayout::eUndefined,
670670
vk::ImageLayout::eColorAttachmentOptimal,
671-
{}, // srcAccessMask (no need to wait for previous operations)
672-
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
673-
vk::PipelineStageFlagBits2::eTopOfPipe, // srcStage
674-
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
671+
{}, // srcAccessMask (no need to wait for previous operations)
672+
vk::AccessFlagBits2::eColorAttachmentWrite, // dstAccessMask
673+
vk::PipelineStageFlagBits2::eColorAttachmentOutput, // srcStage
674+
vk::PipelineStageFlagBits2::eColorAttachmentOutput // dstStage
675675
);
676676
vk::ClearValue clearColor = vk::ClearColorValue(0.0f, 0.0f, 0.0f, 1.0f);
677677
vk::RenderingAttachmentInfo attachmentInfo = {

0 commit comments

Comments
 (0)