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

StreamBuffer: Don't wait on fences twice when reserve > commit #6041

Merged
merged 1 commit into from Sep 10, 2017
Merged

StreamBuffer: Don't wait on fences twice when reserve > commit #6041

merged 1 commit into from Sep 10, 2017

Conversation

stenzek
Copy link
Contributor

@stenzek stenzek commented Sep 9, 2017

Ran into this bug with my videocommon pipeline branch, since I use the streaming buffer for utility draws as well.

If we allocate a large amount of memory (A), commit a smaller amount, then allocate memory smaller than allocation A, we will have already waited for these fences in A, but not used the space. In this case, don't set m_free_iterator to a position before that which we know is safe to use, which would result in waiting on the same fence(s) next time.

@stenzek stenzek changed the title StreamBuffer: Don't wait on fences twice when reserve < commit StreamBuffer: Don't wait on fences twice when reserve > commit Sep 9, 2017
If we allocate a large amount of memory (A), commit a smaller amount,
then allocate memory smaller than allocation A, we will have already
waited for these fences in A, but not used the space. In this case,
don't set m_free_iterator to a position before that which we know is
safe to use, which would result in waiting on the same fence(s) next
time.
@degasus degasus merged commit 88624f6 into dolphin-emu:master Sep 10, 2017
@stenzek stenzek deleted the streambuffer-fence branch February 19, 2018 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants