mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Merge pull request #2148 from Tilka/fifo_cleanup
Small FIFO-related cleanup
This commit is contained in:
commit
7f7973efa5
@ -104,7 +104,8 @@ void Fifo_Init()
|
|||||||
|
|
||||||
void Fifo_Shutdown()
|
void Fifo_Shutdown()
|
||||||
{
|
{
|
||||||
if (GpuRunningState) PanicAlert("Fifo shutting down while active");
|
if (GpuRunningState)
|
||||||
|
PanicAlert("Fifo shutting down while active");
|
||||||
FreeMemoryPages(s_video_buffer, FIFO_SIZE + 4);
|
FreeMemoryPages(s_video_buffer, FIFO_SIZE + 4);
|
||||||
s_video_buffer = nullptr;
|
s_video_buffer = nullptr;
|
||||||
s_video_buffer_write_ptr = nullptr;
|
s_video_buffer_write_ptr = nullptr;
|
||||||
@ -115,16 +116,6 @@ void Fifo_Shutdown()
|
|||||||
s_fifo_aux_read_ptr = nullptr;
|
s_fifo_aux_read_ptr = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8* GetVideoBufferStartPtr()
|
|
||||||
{
|
|
||||||
return s_video_buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
u8* GetVideoBufferEndPtr()
|
|
||||||
{
|
|
||||||
return s_video_buffer_write_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Fifo_SetRendering(bool enabled)
|
void Fifo_SetRendering(bool enabled)
|
||||||
{
|
{
|
||||||
g_bSkipCurrentFrame = !enabled;
|
g_bSkipCurrentFrame = !enabled;
|
||||||
@ -137,7 +128,8 @@ void ExitGpuLoop()
|
|||||||
// This should break the wait loop in CPU thread
|
// This should break the wait loop in CPU thread
|
||||||
CommandProcessor::fifo.bFF_GPReadEnable = false;
|
CommandProcessor::fifo.bFF_GPReadEnable = false;
|
||||||
SCPFifoStruct &fifo = CommandProcessor::fifo;
|
SCPFifoStruct &fifo = CommandProcessor::fifo;
|
||||||
while (fifo.isGpuReadingData) Common::YieldCPU();
|
while (fifo.isGpuReadingData)
|
||||||
|
Common::YieldCPU();
|
||||||
// Terminate GPU thread loop
|
// Terminate GPU thread loop
|
||||||
GpuRunningState = false;
|
GpuRunningState = false;
|
||||||
EmuRunningState = true;
|
EmuRunningState = true;
|
||||||
|
@ -20,10 +20,6 @@ extern std::atomic<u8*> g_video_buffer_write_ptr_xthread;
|
|||||||
|
|
||||||
void Fifo_Init();
|
void Fifo_Init();
|
||||||
void Fifo_Shutdown();
|
void Fifo_Shutdown();
|
||||||
|
|
||||||
u8* GetVideoBufferStartPtr();
|
|
||||||
u8* GetVideoBufferEndPtr();
|
|
||||||
|
|
||||||
void Fifo_DoState(PointerWrap &f);
|
void Fifo_DoState(PointerWrap &f);
|
||||||
void Fifo_PauseAndLock(bool doLock, bool unpauseOnUnlock);
|
void Fifo_PauseAndLock(bool doLock, bool unpauseOnUnlock);
|
||||||
void Fifo_UpdateWantDeterminism(bool want);
|
void Fifo_UpdateWantDeterminism(bool want);
|
||||||
@ -31,7 +27,6 @@ void Fifo_UpdateWantDeterminism(bool want);
|
|||||||
// Used for diagnostics.
|
// Used for diagnostics.
|
||||||
enum SyncGPUReason
|
enum SyncGPUReason
|
||||||
{
|
{
|
||||||
SYNC_GPU_NONE,
|
|
||||||
SYNC_GPU_OTHER,
|
SYNC_GPU_OTHER,
|
||||||
SYNC_GPU_WRAPAROUND,
|
SYNC_GPU_WRAPAROUND,
|
||||||
SYNC_GPU_EFB_POKE,
|
SYNC_GPU_EFB_POKE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user