PacktPublishing / Mastering-Graphics-Programming-with-Vulkan

MIT License
539 stars 73 forks source link

Transfer Synchronization #54

Open nickyc95 opened 5 months ago

nickyc95 commented 5 months ago

Hello! I've been reading the book and wanted to follow up on something. In Chapter 3 you introduce the AsyncronousLoader and talk about creating semaphores and fences for synchronization..

However, transfer_complete_semaphore is never actually used in the code..

I'm just curious as to whether that is a mistake or not, since it doesn't get mentioned again? 😄

Thanks

theWatchmen commented 4 months ago

Hey Nick, that semaphore is used here :) https://github.com/PacktPublishing/Mastering-Graphics-Programming-with-Vulkan/blob/main/source/chapter3/main.cpp#L1746

However I can see that code is not the book as we had already covered how to use semaphores. Apologies for the confusion.

nickyc95 commented 4 months ago

Hey Nick, that semaphore is used here :) https://github.com/PacktPublishing/Mastering-Graphics-Programming-with-Vulkan/blob/main/source/chapter3/main.cpp#L1746

However I can see that code is not the book as we had already covered how to use semaphores. Apologies for the confusion.

Hey Marco, the semaphore is set to submitInfo.pWaitSemaphores except submitInfo expects a uint32_t waitSemaphoreCount; which will be set to 0 from defaulting the struct 😄

theWatchmen commented 4 months ago

Ah, that's indeed a bug! I'll get it sorted. Thanks!

theWatchmen commented 3 months ago

I took a stab at using the semaphore properly, however I get what I think are inaccurate validation errors about the semaphore not being signalled from the transfer queue. I need to investigate further.