Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComputeNbody sample - compute.uniform_buffer looks not properly synchronized, it's updated right after QueueSubmit. #1094

Open
tonyx123 opened this issue Jul 10, 2024 · 2 comments
Assignees

Comments

@tonyx123
Copy link

tonyx123 commented Jul 10, 2024

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.

@SaschaWillems SaschaWillems self-assigned this Jul 15, 2024
@SaschaWillems
Copy link
Collaborator

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?

@tonyx123
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants