summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelEngine.cpp
diff options
context:
space:
mode:
authormagumagu <magumagu9@gmail.com>2015-02-10 13:48:12 -0800
committermagumagu <magumagu9@gmail.com>2015-02-10 13:48:12 -0800
commitd9988ee9b5d89b4ac5905dfffabb8ccae2d78a76 (patch)
treef7ed8e8d0eb18291121e7c6861948684674140c8 /Source/Core/VideoCommon/PixelEngine.cpp
parent0f96a0104e60045e39d0c2a2ff34ec06bb8c3634 (diff)
parent30d15b3a32485bda06f7eea605b1a66155e25dad (diff)
Merge pull request #1987 from magumagu/thread-safety
Cleanup usage of atomic/threadsafe functions
Diffstat (limited to 'Source/Core/VideoCommon/PixelEngine.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelEngine.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/PixelEngine.cpp b/Source/Core/VideoCommon/PixelEngine.cpp
index f6bc26186a..afe08c7d0a 100644
--- a/Source/Core/VideoCommon/PixelEngine.cpp
+++ b/Source/Core/VideoCommon/PixelEngine.cpp
@@ -16,6 +16,7 @@
#include "Core/HW/ProcessorInterface.h"
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/CommandProcessor.h"
+#include "VideoCommon/Fifo.h"
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/VideoCommon.h"
@@ -299,7 +300,10 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
}
CommandProcessor::interruptTokenWaiting = true;
- CoreTiming::ScheduleEvent_Threadsafe(0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
+ if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || g_use_deterministic_gpu_thread)
+ CoreTiming::ScheduleEvent(0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
+ else
+ CoreTiming::ScheduleEvent_Threadsafe(0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
}
// SetFinish
@@ -307,7 +311,10 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
void SetFinish()
{
CommandProcessor::interruptFinishWaiting = true;
- CoreTiming::ScheduleEvent_Threadsafe(0, et_SetFinishOnMainThread, 0);
+ if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || g_use_deterministic_gpu_thread)
+ CoreTiming::ScheduleEvent(0, et_SetFinishOnMainThread, 0);
+ else
+ CoreTiming::ScheduleEvent_Threadsafe(0, et_SetFinishOnMainThread, 0);
INFO_LOG(PIXELENGINE, "VIDEO Set Finish");
}