Open BartSiwek opened 3 years ago
Yeah, that should be changed.
Yep had some hard time debugging this after applying what I've learned from the compute shader chapter. Uniforms waited for the compute shader to finish before updating, but updating the uniforms updated the camera as well, which was read from the graphics shader (still in flight).
I thought I should ask before going through the trouble of making the PR. It seems that inside the
drawFrame
function the order of calls toupdateUniformBuffer
andvkWaitForFences(device, 1, &imagesInFlight[imageIndex], VK_TRUE, UINT64_MAX);
is inverted.For example in
code/29_multisampling.cpp
we have:If
imagesInFlight[imageIndex]
is suppose to be used to make sure GPU processing is done before the uniform buffer with indeximageIndex
is updated then the callupdateUniformBuffer
should be after the wait.