Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.12k stars 513 forks source link

Provide C++ code link just before "Frames in flight" #150

Closed buzmeg closed 2 years ago

buzmeg commented 4 years ago

Could someone please create a C++ code link just before the "Frames in flight" section? ("Drawing a triangle"->"Drawing"->"Rendering and Presentation"--https://vulkan-tutorial.com/Drawing_a_triangle/Drawing/Rendering_and_presentation)

If you don't get a triangle, it's REALLY hard to find the error as there is no code to compare to at that exact point--you can only compare to the code that adds a whole bunch of extraneous "frames in flight" stuff. Providing a C++ code link right before that point would make life a lot easier on people.

It sure would have helped me. I had to basically restart from ground zero a second time and walk forward to find my error. :( I had two bugs simultaneously and I couldn't extract one from the other because I didn't have a good basis for comparison.

Thanks.

chenzhekl commented 4 years ago

How about uploading your code for others to check? Besides, it might be better to ask this question in the Disqus comment, I guess, since it's not an issue of the tutorial itself.

Overv commented 4 years ago

Could you elaborate on which bugs you had?

buzmeg commented 4 years ago

There was a driver bug (in MoltenVK) and an allocation ordering bug (my fault) which would cause my driver to crash out. However, fixing one without fixing the other looked the same from a crash point of view. Until I redid all my code from the ground up and fixed the allocation ordering bug, it was absolutely impossible to pin down the driver bug.

charles-lunarg commented 2 years ago

This should be fixed with the recent PR that added command buffer re-recording. Now, frames in flight are their own chapter.