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

49 lines
1.0 KiB
C++
Raw Normal View History

// Copyright 2008 Dolphin Emulator Project
2015-05-18 01:08:10 +02:00
// 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
2016-01-17 16:54:31 -05:00
#include <cstddef>
2014-09-07 20:06:58 -05:00
#include "Common/CommonTypes.h"
class PointerWrap;
2008-12-08 04:46:09 +00:00
2016-01-12 22:44:58 +01:00
namespace Fifo
{
void Init();
void Shutdown();
void Prepare(); // Must be called from the CPU thread.
void DoState(PointerWrap& f);
2016-01-12 22:44:58 +01:00
void PauseAndLock(bool doLock, bool unpauseOnUnlock);
void UpdateWantDeterminism(bool want);
bool UseDeterministicGPUThread();
2014-08-27 22:56:19 -04:00
// Used for diagnostics.
2016-08-18 22:35:58 -04:00
enum class SyncGPUReason
2014-10-06 20:04:57 -04:00
{
2016-08-18 22:35:58 -04:00
Other,
Wraparound,
EFBPoke,
PerfQuery,
BBox,
Swap,
AuxSpace,
2014-08-27 22:56:19 -04:00
};
// In deterministic GPU thread mode this waits for the GPU to be done with pending work.
2014-08-27 22:56:19 -04:00
void SyncGPU(SyncGPUReason reason, bool may_move_read_ptr = true);
2017-03-26 20:38:19 -04:00
void PushFifoAuxBuffer(const void* ptr, size_t size);
2014-08-27 22:56:19 -04:00
void* PopFifoAuxBuffer(size_t size);
2015-03-05 21:14:46 +01:00
void FlushGpu();
void RunGpu();
2015-05-27 20:53:09 +02:00
void GpuMaySleep();
void RunGpuLoop();
void ExitGpuLoop();
void EmulatorState(bool running);
bool AtBreakpoint();
void ResetVideoBuffer();
2016-01-12 22:44:58 +01:00
} // namespace Fifo