diff options
| author | Stenzek <stenzek@gmail.com> | 2018-01-21 01:32:20 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2018-12-04 17:36:08 +1000 |
| commit | 38479dd7830ab0790b487cbdee7477e6eb6b941d (patch) | |
| tree | 4040748dca3d85e9931f0fae36230c072049cf0f /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | c675ef148e6872115bd46cca5b5c51826c75b373 (diff) | |
RenderBase: Force a pipeline flush when drawing the XFB to the host
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.
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 2e42ed984a..d37b6aa07b 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -697,6 +697,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); |
