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 race condition caused by opening graphics options while running #7437

Merged
merged 4 commits into from Oct 12, 2018

Conversation

2 participants
@stenzek
Contributor

stenzek commented Sep 28, 2018

Opening the graphics option could lead to a race condition with the GPU thread, where state owned by the GPU thread (e.g. function pointers) are updated from the UI thread. This patch ensures that the context is only created when the core is booted, and there is no GPU thread.

It also drops Host_ShowVideoConfig() and the associated call site, as it was not used (remnants from the old plugin days?)

May fix https://bugs.dolphin-emu.org/issues/11367, and related to #7417 (except fixing it at the root for all video backends).

@stenzek

This comment has been minimized.

Show comment
Hide comment
@stenzek

stenzek Sep 28, 2018

Contributor

The third commit fixes another issue; the incorrect adapter being selected in multi-GPU systems, if the graphics dialog is not opened prior to booting a game. The same issue applies to other settings which are applied prior to devices being created (e.g. driver validation layer enable).

Contributor

stenzek commented Sep 28, 2018

The third commit fixes another issue; the incorrect adapter being selected in multi-GPU systems, if the graphics dialog is not opened prior to booting a game. The same issue applies to other settings which are applied prior to devices being created (e.g. driver validation layer enable).

stenzek added some commits Sep 28, 2018

Don't fill backend info when core is running
The current approach results in the UI thread creating a graphics device
whilst the core is running, leading to races on function pointers, and
potentially crashing.

@lioncash lioncash merged commit ecd4897 into dolphin-emu:master Oct 12, 2018

10 checks passed

default Very basic checks passed, handed off to Buildbot.
Details
lint Build succeeded on builder lint
Details
pr-android Build succeeded on builder pr-android
Details
pr-deb-dbg-x64 Build succeeded on builder pr-deb-dbg-x64
Details
pr-deb-x64 Build succeeded on builder pr-deb-x64
Details
pr-freebsd-x64 Build succeeded on builder pr-freebsd-x64
Details
pr-osx-x64 Build succeeded on builder pr-osx-x64
Details
pr-ubu-x64 Build succeeded on builder pr-ubu-x64
Details
pr-win-dbg-x64 Build succeeded on builder pr-win-dbg-x64
Details
pr-win-x64 Build succeeded on builder pr-win-x64
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment