Skip to content
Permalink
Browse files

Add SyncGPUIfIdleOnly to EFB access and perf queries.

  • Loading branch information
comex committed Sep 9, 2013
1 parent ae1fe1f commit 40b965fcfa421c110b9dc58eb23503bc563c5538
Showing with 6 additions and 2 deletions.
  1. +4 −2 Source/Core/VideoCommon/Src/CommandProcessor.cpp
  2. +2 −0 Source/Core/VideoCommon/Src/MainBase.cpp
@@ -138,7 +138,8 @@ void Init()
et_UpdateInterrupts = CoreTiming::RegisterEvent("CPInterrupt", UpdateInterrupts_Wrapper);
}

static void SyncGPU() {
static void SyncGPU()
{
if (IsOnThread())
{
while (Common::AtomicLoad(CommandProcessor::gpuBusy))
@@ -166,7 +167,8 @@ static void SyncGPU() {
}
}

void SyncGPUIfIdleOnly() {
void SyncGPUIfIdleOnly()
{
if (Core::g_CoreStartupParameter.bSyncGPUAtIdleOnly)
{
SyncGPU();
@@ -147,6 +147,7 @@ void VideoFifo_CheckEFBAccess()

u32 VideoBackendHardware::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
{
CommandProcessor::SyncGPUIfIdleOnly();
if (s_BackendInitialized)
{
s_accessEFBArgs.type = type;
@@ -193,6 +194,7 @@ void VideoFifo_CheckPerfQueryRequest()

u32 VideoBackendHardware::Video_GetQueryResult(PerfQueryType type)
{
CommandProcessor::SyncGPUIfIdleOnly();
// TODO: Is this check sane?
if (!g_perf_query->IsFlushed())
{

0 comments on commit 40b965f

Please sign in to comment.
You can’t perform that action at this time.