remove fifowait flag, is not needed now as we execute all events that need to be executed even if the cpu is waiting for the fifo.
this way fifo will not avid other thread events to bi executed. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6514 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f5a28aecb7
commit
97e3a3ea6f
|
@ -42,7 +42,6 @@ struct BaseEvent
|
|||
s64 time;
|
||||
u64 userdata;
|
||||
int type;
|
||||
bool fifoWait;
|
||||
// Event *next;
|
||||
};
|
||||
|
||||
|
@ -177,8 +176,7 @@ void DoState(PointerWrap &p)
|
|||
prev->next = ev;
|
||||
p.Do(ev->time);
|
||||
p.Do(ev->type);
|
||||
p.Do(ev->userdata);
|
||||
p.Do(ev->fifoWait);
|
||||
p.Do(ev->userdata);
|
||||
ev->next = 0;
|
||||
prev = ev;
|
||||
ev = ev->next;
|
||||
|
@ -195,8 +193,7 @@ void DoState(PointerWrap &p)
|
|||
p.Do(more_events);
|
||||
p.Do(ev->time);
|
||||
p.Do(ev->type);
|
||||
p.Do(ev->userdata);
|
||||
p.Do(ev->fifoWait);
|
||||
p.Do(ev->userdata);
|
||||
ev = ev->next;
|
||||
}
|
||||
more_events = 0;
|
||||
|
@ -219,7 +216,7 @@ u64 GetIdleTicks()
|
|||
|
||||
// This is to be called when outside threads, such as the graphics thread, wants to
|
||||
// schedule things to be executed on the main thread.
|
||||
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata, bool fifoWait)
|
||||
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata)
|
||||
{
|
||||
externalEventSection.Enter();
|
||||
Event *ne = GetNewTsEvent();
|
||||
|
@ -227,7 +224,6 @@ void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata
|
|||
ne->type = event_type;
|
||||
ne->next = 0;
|
||||
ne->userdata = userdata;
|
||||
ne->fifoWait = fifoWait;
|
||||
if(!tsFirst)
|
||||
tsFirst = ne;
|
||||
if(tsLast)
|
||||
|
@ -247,7 +243,7 @@ void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata)
|
|||
externalEventSection.Leave();
|
||||
}
|
||||
else
|
||||
ScheduleEvent_Threadsafe(0, event_type, userdata, false);
|
||||
ScheduleEvent_Threadsafe(0, event_type, userdata);
|
||||
}
|
||||
|
||||
void ClearPendingEvents()
|
||||
|
@ -287,7 +283,6 @@ void ScheduleEvent(int cyclesIntoFuture, int event_type, u64 userdata)
|
|||
ne->userdata = userdata;
|
||||
ne->type = event_type;
|
||||
ne->time = globalTimer + cyclesIntoFuture;
|
||||
ne->fifoWait = false;
|
||||
AddEventToQueue(ne);
|
||||
}
|
||||
|
||||
|
@ -403,7 +398,7 @@ void ProcessFifoWaitEvents()
|
|||
if (!first)
|
||||
return;
|
||||
|
||||
if (first->time <= globalTimer && first->fifoWait)
|
||||
if (first->time <= globalTimer)
|
||||
{
|
||||
Event *next = first->next;
|
||||
event_types[first->type].callback(first->userdata, (int)(globalTimer - first->time));
|
||||
|
@ -418,7 +413,7 @@ void ProcessFifoWaitEvents()
|
|||
Event *ptr = prev->next;
|
||||
while (ptr)
|
||||
{
|
||||
if (ptr->time <= globalTimer && ptr->fifoWait)
|
||||
if (ptr->time <= globalTimer)
|
||||
{
|
||||
prev->next = ptr->next;
|
||||
event_types[ptr->type].callback(ptr->userdata, (int)(globalTimer - ptr->time));
|
||||
|
|
|
@ -57,7 +57,7 @@ void UnregisterAllEvents();
|
|||
// userdata MAY NOT CONTAIN POINTERS. userdata might get written and reloaded from disk,
|
||||
// when we implement state saves.
|
||||
void ScheduleEvent(int cyclesIntoFuture, int event_type, u64 userdata=0);
|
||||
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata=0, bool fifoWait=true);
|
||||
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata=0);
|
||||
void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata=0);
|
||||
|
||||
// We only permit one event of each type in the queue at a time.
|
||||
|
|
|
@ -717,7 +717,7 @@ void UpdateInterrupts()
|
|||
|
||||
void UpdateInterruptsFromVideoPlugin()
|
||||
{
|
||||
g_VideoInitialize.pScheduleEvent_Threadsafe(0, et_UpdateInterrupts, 0, true);
|
||||
g_VideoInitialize.pScheduleEvent_Threadsafe(0, et_UpdateInterrupts, 0);
|
||||
}
|
||||
|
||||
void SetFifoIdleFromVideoPlugin()
|
||||
|
|
|
@ -343,7 +343,7 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
|
|||
// This seems smelly...
|
||||
CommandProcessor::IncrementGPWDToken(); // for DC watchdog hack since PEToken seems to be a frame-finish too
|
||||
g_VideoInitialize.pScheduleEvent_Threadsafe(
|
||||
0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16), true);
|
||||
0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
|
||||
}
|
||||
else // set token value
|
||||
{
|
||||
|
@ -362,7 +362,7 @@ void SetFinish()
|
|||
{
|
||||
CommandProcessor::IncrementGPWDToken(); // for DC watchdog hack
|
||||
g_VideoInitialize.pScheduleEvent_Threadsafe(
|
||||
0, et_SetFinishOnMainThread, 0, true);
|
||||
0, et_SetFinishOnMainThread, 0);
|
||||
INFO_LOG(PIXELENGINE, "VIDEO Set Finish");
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ typedef void (*TimedCallback)(u64 userdata, int cyclesLate);
|
|||
|
||||
typedef void (*TSetInterrupt)(u32 _causemask, bool _bSet);
|
||||
typedef int (*TRegisterEvent)(const char *name, TimedCallback callback);
|
||||
typedef void (*TScheduleEvent_Threadsafe)(int cyclesIntoFuture, int event_type, u64 userdata, bool fifoWait);
|
||||
typedef void (*TScheduleEvent_Threadsafe)(int cyclesIntoFuture, int event_type, u64 userdata);
|
||||
typedef void (*TRemoveEvent)(int event_type);
|
||||
typedef unsigned char* (*TGetMemoryPointer)(const unsigned int _iAddress);
|
||||
typedef void (*TVideoLog)(const char* _pMessage, int _bBreak);
|
||||
|
|
|
@ -322,7 +322,7 @@ void UpdateInterrupts(u64 userdata)
|
|||
|
||||
void UpdateInterruptsFromVideoPlugin(u64 userdata)
|
||||
{
|
||||
g_VideoInitialize.pScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata, true);
|
||||
g_VideoInitialize.pScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata);
|
||||
}
|
||||
|
||||
void ReadFifo()
|
||||
|
|
|
@ -155,7 +155,7 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
|
|||
if (_bSetTokenAcknowledge) // set token INT
|
||||
{
|
||||
g_VideoInitialize.pScheduleEvent_Threadsafe(
|
||||
0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16), true);
|
||||
0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
|
|||
void SetFinish()
|
||||
{
|
||||
g_VideoInitialize.pScheduleEvent_Threadsafe(
|
||||
0, et_SetFinishOnMainThread, 0, true);
|
||||
0, et_SetFinishOnMainThread, 0);
|
||||
INFO_LOG(PIXELENGINE, "VIDEO Set Finish");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue