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

Move D3D12 fence SetEventOnCompletion call to fence_wait to avoid stalling on some platforms #98975

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clayjohn
Copy link
Member

@clayjohn clayjohn commented Nov 8, 2024

This is a weird one and hasn't been reported upstream.

Basically SetEventOnCompletion() should be fine to call anytime after the Signal() and before we wait on the fence. The docs don't indicate that it should stall, but in testing, it appears that there are cases where it will stall until GPU work finishes. In any case, all the official samples call SetEventOnCompletion() immediately before WaitForSingleObjectEx() so we should do the same.

In testing with our complex 3D test project on the affected hardware we get roughly double the performance from this change.

@clayjohn clayjohn added this to the 4.4 milestone Nov 8, 2024
@clayjohn clayjohn requested a review from a team as a code owner November 8, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant