diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2018-12-04 08:47:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-04 08:47:46 +0100 |
| commit | 59de8ea50338b39f604fde738229aaeb791cc459 (patch) | |
| tree | 17f445fc7a686cd28859e6c46fb1a32d64a56123 /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | c675ef148e6872115bd46cca5b5c51826c75b373 (diff) | |
| parent | 7afd5cc2fb7e45f2c497e5aed007a017b8461335 (diff) | |
Merge pull request #7592 from stenzek/imgui-prereq
VideoBackends: Share GX vertex/index/uniform buffers with utility draws
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 2e42ed984a..ba60e1636c 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -78,8 +78,10 @@ static float AspectToWidescreen(float aspect) return aspect * ((16.0f / 9.0f) / (4.0f / 3.0f)); } -Renderer::Renderer(int backbuffer_width, int backbuffer_height) - : m_backbuffer_width(backbuffer_width), m_backbuffer_height(backbuffer_height) +Renderer::Renderer(int backbuffer_width, int backbuffer_height, + AbstractTextureFormat backbuffer_format) + : m_backbuffer_width(backbuffer_width), m_backbuffer_height(backbuffer_height), + m_backbuffer_format(backbuffer_format) { UpdateActiveConfig(); UpdateDrawRectangle(); @@ -93,6 +95,11 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height) Renderer::~Renderer() = default; +bool Renderer::Initialize() +{ + return true; +} + void Renderer::Shutdown() { // First stop any framedumping, which might need to dump the last xfb frame. This process @@ -697,6 +704,11 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const m_last_xfb_region = xfb_rect; + // Since we use the common pipelines here and draw vertices if a batch is currently being + // built by the vertex loader, we end up trampling over its pointer, as we share the buffer + // with the loader, and it has not been unmapped yet. Force a pipeline flush to avoid this. + g_vertex_manager->Flush(); + // TODO: merge more generic parts into VideoCommon { std::lock_guard<std::mutex> guard(m_swap_mutex); |
