Open tonyx123 opened 4 months ago
It's kinda hard to help with that little information, so can you elaborate?
graphics.uniform_buffer
is only updated from the host and it's using host coherent memory.
Why do you think sync is missing, and what sync do you think is missing?
Sorry for the typo. I mean "For compute sequence, it's QueueSubmit -> compute.uniform_buffer.update"
We submit compute cmdBuf first then update compute uniform. I don't see anything to guarantee that the compute cmdBuf execution happens before its uniform get updated. Isn't it an issue?
Please look at ComputeNBody::render and ComputeNBody::draw. We add an WaitForIdle in Api::VulkanSample::submit_frame(), so: For graphics sequence, it's QueueSubmit -> WaitForIdle -> graphics.uniform_buffer.update. Most samples implement similar to this. For compute sequence, it's QueueSubmit -> compute.uniform_buffer.update, there's no synchronization between the submission and buffer-update, which I think is wrong.