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

Fix MTL completion fences discarded by newer CBs #39

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

smoogipoo
Copy link

Command buffers execution is started in order, but is not guaranteed to complete in order.

@frenzibyte
Copy link
Member

For future reference, see this discord message.

@smoogipoo
Copy link
Author

Just gonna post it here for those without Discord:


Developer documentation

"The GPU starts the command buffer after it starts any command buffers that are ahead of it in the same command queue".
It doesn't mention anything about completing in order.

Programming guide

"All command buffers sent to a single queue are guaranteed to execute in the order in which the command buffers were enqueued."
Again, I think "execution" here refers to the start of execution.

SO Thread

Links to the above guide programming guide, but again mentions "execution".

I could be wrong. I believe order of execution is important for one and only one reason - to prevent deadlocks, because you can waitForFence: from a CB.

Copy link
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooh yay more dictionaries 😆

@peppy peppy merged commit 68a9be7 into ppy:master Mar 8, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants