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 perf query regression #9731

Merged
merged 1 commit into from May 21, 2021
Merged

Conversation

JosJuice
Copy link
Member

When trying to do a small optimization in PR #9710, I failed to take into account that WeakFlush and FlushOne update m_query_count.

Only D3D11 and OGL had this problem, not D3D12 and Vulkan.

@JosJuice
Copy link
Member Author

Fixes bad performance in Need for Speed: Most Wanted and a freeze in Super Mario Sunshine.

@Techjar
Copy link
Contributor

Techjar commented May 21, 2021

Can confirm this fixes both the performance loss on OpenGL and the crash on D3D11, in Super Mario Sunshine.

When trying to do a small optimization in 8a0f5ea, I failed to
take into account that WeakFlush and FlushOne update m_query_count.

Only D3D11 and OGL had this problem, not D3D12 and Vulkan.
@Techjar
Copy link
Contributor

Techjar commented May 21, 2021

For anyone curious, after analysis of the code, I have determined that the underlying reason why this broke is that we would begin a query with the wrong id, then later when we tried to get the result with the correct id, bad things would happen (read: driver gets angry).

@lioncash lioncash merged commit bc89df8 into dolphin-emu:master May 21, 2021
10 of 11 checks passed
@JosJuice JosJuice deleted the perf-queries-slow branch May 21, 2021 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants