diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-09 01:24:16 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-09 01:24:16 +0200 |
commit | 7646f2c21dcd3e36073142da84d56cd7640476a9 (patch) | |
tree | 3d0612fda7ade815bb3b0cf90cc9374419913497 /src/video_core/renderer_opengl | |
parent | buffer_cache: Return stream buffer invalidation in Map instead of Unmap (diff) | |
download | yuzu-7646f2c21dcd3e36073142da84d56cd7640476a9.tar yuzu-7646f2c21dcd3e36073142da84d56cd7640476a9.tar.gz yuzu-7646f2c21dcd3e36073142da84d56cd7640476a9.tar.bz2 yuzu-7646f2c21dcd3e36073142da84d56cd7640476a9.tar.lz yuzu-7646f2c21dcd3e36073142da84d56cd7640476a9.tar.xz yuzu-7646f2c21dcd3e36073142da84d56cd7640476a9.tar.zst yuzu-7646f2c21dcd3e36073142da84d56cd7640476a9.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 11 |
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 55e79aaf6..5673e30b3 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -576,7 +576,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(); |