Fifo: Make g_use_deterministic_gpu_thread a TU-local variable

This commit is contained in:
Lioncash
2016-01-23 23:31:13 -05:00
parent 5ebd1e215b
commit 32ce2be2bf
7 changed files with 29 additions and 24 deletions

View File

@ -13,9 +13,6 @@ class PointerWrap;
namespace Fifo
{
// This could be in SConfig, 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;
void Init();
@ -24,6 +21,7 @@ void Prepare(); // Must be called from the CPU thread.
void DoState(PointerWrap &f);
void PauseAndLock(bool doLock, bool unpauseOnUnlock);
void UpdateWantDeterminism(bool want);
bool UseDeterministicGPUThread();
// Used for diagnostics.
enum SyncGPUReason
@ -36,7 +34,7 @@ enum SyncGPUReason
SYNC_GPU_SWAP,
SYNC_GPU_AUX_SPACE,
};
// In g_use_deterministic_gpu_thread mode, waits for the GPU to be done with pending work.
// In deterministic GPU thread mode this 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);