dolphin/Source/Core/VideoCommon/Fifo.h
Lioncash 62db55dee2 Fifo: const correctness
PushFifoAuxBuffer only memcpys data using ptr as the source pointer, so
it can be a pointer to const data because of that.
2017-03-26 23:08:33 -04:00

49 lines
1.0 KiB
C++

// Copyright 2008 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <cstddef>
#include "Common/CommonTypes.h"
class PointerWrap;
namespace Fifo
{
void Init();
void Shutdown();
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 class SyncGPUReason
{
Other,
Wraparound,
EFBPoke,
PerfQuery,
BBox,
Swap,
AuxSpace,
};
// 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(const void* ptr, size_t size);
void* PopFifoAuxBuffer(size_t size);
void FlushGpu();
void RunGpu();
void GpuMaySleep();
void RunGpuLoop();
void ExitGpuLoop();
void EmulatorState(bool running);
bool AtBreakpoint();
void ResetVideoBuffer();
} // namespace Fifo