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

MVKCmdWaitEvents: end current encoder before encodeWait #2422

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

dboyan
Copy link
Contributor

@dboyan dboyan commented Jan 17, 2025

The Metal documentation for encodeWaitForEvent method says:

A command buffer can instruct the GPU to wait for an event only between passes, not within a pass. If a command buffer has an active encoder, finish using the encoder, call its endEncoding() method, and then call this method before creating another encoder.

We should obey this rule and call endEncoding when there can be active encoder around.

This should fix #2078.

The Metal documentation for encodeWaitForEvent method says:

A command buffer can instruct the GPU to wait for an event only between passes,
not within a pass. If a command buffer has an active encoder, finish using the
encoder, call its endEncoding() method, and then call this method before
creating another encoder.

We should obey this rule and call endEncoding when there can be active encoder
around.
Copy link
Collaborator

@cdavis5e cdavis5e left a comment

Choose a reason for hiding this comment

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

My one concern is that splitting up Metal render passes like this would require special handling of e.g. DONT_CARE attachments whose intermediate results are used within a render pass--but we already have to deal with that because of tessellation, among other things. One of these days, someone should look into reducing the need to interrupt render passes like this...

@cdavis5e cdavis5e merged commit 3803cc9 into KhronosGroup:main Jan 17, 2025
6 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.

vkQueueSubmit failing with IOGPUMetalCommandBuffer :`encodeWaitForEvent:value: with uncommitted encoder'
2 participants