Files
dolphin/Source/Core/VideoCommon/Fifo.h
T

60 lines
1.4 KiB
C++
Raw Normal View History

// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
2008-12-08 04:46:09 +00:00
#pragma once
2008-12-08 04:46:09 +00:00
2014-09-07 20:06:58 -05:00
#include "Common/CommonTypes.h"
2014-02-17 05:18:15 -05:00
#include "VideoCommon/VideoBackendBase.h"
class PointerWrap;
2008-12-08 04:46:09 +00:00
#define FIFO_SIZE (2*1024*1024)
2008-12-08 04:46:09 +00:00
2014-09-03 21:49:15 +02:00
extern bool g_bSkipCurrentFrame;
2014-08-27 22:56:19 -04:00
// This could be in SCoreStartupParameter, but it depends on multiple settings
// and can change at runtime.
extern bool g_use_deterministic_gpu_thread;
extern std::atomic<u8*> g_video_buffer_write_ptr_xthread;
2008-12-08 04:46:09 +00:00
void Fifo_Init();
void Fifo_Shutdown();
2014-07-08 14:29:26 +02:00
u8* GetVideoBufferStartPtr();
u8* GetVideoBufferEndPtr();
2008-12-08 04:46:09 +00:00
void Fifo_DoState(PointerWrap &f);
void Fifo_PauseAndLock(bool doLock, bool unpauseOnUnlock);
void Fifo_UpdateWantDeterminism(bool want);
2014-08-27 22:56:19 -04:00
// Used for diagnostics.
2014-10-06 20:04:57 -04:00
enum SyncGPUReason
{
SYNC_GPU_NONE,
SYNC_GPU_OTHER,
SYNC_GPU_WRAPAROUND,
SYNC_GPU_EFB_POKE,
SYNC_GPU_PERFQUERY,
SYNC_GPU_BBOX,
2014-10-06 20:04:57 -04:00
SYNC_GPU_SWAP,
SYNC_GPU_AUX_SPACE,
2014-08-27 22:56:19 -04:00
};
// In g_use_deterministic_gpu_thread mode, waits for the GPU to be done with pending work.
void SyncGPU(SyncGPUReason reason, bool may_move_read_ptr = true);
void PushFifoAuxBuffer(void* ptr, size_t size);
void* PopFifoAuxBuffer(size_t size);
void RunGpu();
void RunGpuLoop();
void ExitGpuLoop();
void EmulatorState(bool running);
bool AtBreakpoint();
void ResetVideoBuffer();
void Fifo_SetRendering(bool bEnabled);
// Implemented by the Video Backend
void VideoFifo_CheckAsyncRequest();