Merge pull request #6334 from stenzek/startup

Video Backend Initialization/Core Boot Improvements
This commit is contained in:
Anthony
2018-02-07 23:35:54 -08:00
committed by GitHub
24 changed files with 89 additions and 290 deletions

View File

@ -299,8 +299,6 @@ void RunGpuLoop()
[] {
const SConfig& param = SConfig::GetInstance();
g_video_backend->PeekMessages();
// Do nothing while paused
if (!s_emu_running_state.IsSet())
return;

View File

@ -45,15 +45,6 @@ void VideoBackendBase::Video_ExitLoop()
s_FifoShuttingDown.Set();
}
void VideoBackendBase::Video_CleanupShared()
{
// First stop any framedumping, which might need to dump the last xfb frame. This process
// can require additional graphics sub-systems so it needs to be done first
g_renderer->ShutdownFrameDumping();
Video_Cleanup();
}
// Run from the CPU thread (from VideoInterface.cpp)
void VideoBackendBase::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
u64 ticks)
@ -211,12 +202,8 @@ void VideoBackendBase::ShutdownShared()
m_initialized = false;
Fifo::Shutdown();
}
void VideoBackendBase::CleanupShared()
{
VertexLoaderManager::Clear();
Fifo::Shutdown();
}
// Run from the CPU thread

View File

@ -101,6 +101,13 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height)
Renderer::~Renderer() = default;
void Renderer::Shutdown()
{
// First stop any framedumping, which might need to dump the last xfb frame. This process
// can require additional graphics sub-systems so it needs to be done first
ShutdownFrameDumping();
}
void Renderer::RenderToXFB(u32 xfbAddr, const EFBRectangle& sourceRc, u32 fbStride, u32 fbHeight,
float Gamma)
{

View File

@ -154,7 +154,7 @@ public:
virtual void ChangeSurface(void* new_surface_handle) {}
bool UseVertexDepthRange() const;
void ShutdownFrameDumping();
virtual void Shutdown();
protected:
std::tuple<int, int> CalculateTargetScale(int x, int y) const;
@ -243,6 +243,7 @@ private:
std::string GetFrameDumpNextImageFileName() const;
bool StartFrameDumpToImage(const FrameDumpConfig& config);
void DumpFrameToImage(const FrameDumpConfig& config);
void ShutdownFrameDumping();
bool IsFrameDumping();

View File

@ -35,8 +35,6 @@ class VideoBackendBase
{
public:
virtual ~VideoBackendBase() {}
virtual unsigned int PeekMessages() = 0;
virtual bool Initialize(void* window_handle) = 0;
virtual void Shutdown() = 0;
@ -45,12 +43,8 @@ public:
void ShowConfig(void*);
virtual void InitBackendInfo() = 0;
virtual void Video_Prepare() = 0;
void Video_ExitLoop();
void Video_CleanupShared(); // called from gl/d3d thread
virtual void Video_Cleanup() = 0;
void Video_BeginField(u32, u32, u32, u32, u64);
u32 Video_AccessEFB(EFBAccessType, u32, u32, u32);
@ -70,7 +64,6 @@ public:
protected:
void InitializeShared();
void ShutdownShared();
void CleanupShared();
bool m_initialized = false;
bool m_invalid = false;