summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-06-14 06:29:16 +0200
committerGitHub <noreply@github.com>2020-06-14 06:29:16 +0200
commit92021a344cc2562496a41e2fc4e4090e49e1c6fb (patch)
tree02ddce73a3c77c9f6ba72b7ebb36b62de4c0583b /src/video_core/renderer_opengl
parentMerge pull request #4049 from ReinUsesLisp/separate-samplers (diff)
parentgl_rasterizer: Mark vertex buffers as dirty after buffer cache invalidation (diff)
downloadyuzu-92021a344cc2562496a41e2fc4e4090e49e1c6fb.tar
yuzu-92021a344cc2562496a41e2fc4e4090e49e1c6fb.tar.gz
yuzu-92021a344cc2562496a41e2fc4e4090e49e1c6fb.tar.bz2
yuzu-92021a344cc2562496a41e2fc4e4090e49e1c6fb.tar.lz
yuzu-92021a344cc2562496a41e2fc4e4090e49e1c6fb.tar.xz
yuzu-92021a344cc2562496a41e2fc4e4090e49e1c6fb.tar.zst
yuzu-92021a344cc2562496a41e2fc4e4090e49e1c6fb.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 121af9718..2d6c11320 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -617,7 +617,16 @@ void RasterizerOpenGL::Draw(bool is_indexed, bool is_instanced) {
(Maxwell::MaxConstBufferSize + device.GetUniformBufferAlignment());
// Prepare the vertex array.
- buffer_cache.Map(buffer_size);
+ const bool invalidated = buffer_cache.Map(buffer_size);
+
+ if (invalidated) {
+ // When the stream buffer has been invalidated, we have to consider vertex buffers as dirty
+ auto& dirty = gpu.dirty.flags;
+ dirty[Dirty::VertexBuffers] = true;
+ for (int index = Dirty::VertexBuffer0; index <= Dirty::VertexBuffer31; ++index) {
+ dirty[index] = true;
+ }
+ }
// Prepare vertex array format.
SetupVertexFormat();