Don't queue Flush() etc. while on GPU thread.

Oops, that makes it not actually flush properly of course.

Also made a simpler guard wrapper to avoid extra braces in too many
places.  Reduced contention areas slightly.
This commit is contained in:
Unknown W. Brackets committed 2013-08-09 22:57:52 -07:00
1 parent 68fb78e203
commit e71cf2ec7e
5 files changed
+106 -81

No files matched your search

+8
View File
@@ -74,6 +74,14 @@ volatile CoreState coreState = CORE_STEPPING;
volatile bool coreStatePending = false;
static volatile CPUThreadState cpuThreadState = CPU_THREAD_NOT_RUNNING;
bool IsOnSeparateCPUThread() {
if (g_Config.bSeparateCPUThread) {
return cpuThread->get_id() == std::this_thread::get_id();
} else {
return false;
}
}
bool CPU_NextState(CPUThreadState from, CPUThreadState to) {
if (cpuThreadState == from) {
cpuThreadState = to;