summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-06-08 22:39:55 +0200
committerGitHub <noreply@github.com>2018-06-08 22:39:55 +0200
commita941a94148190f71912fface3405f87b2a894b83 (patch)
treebb8a51beb4026c47921802817a1ab2e03f9bfc44 /src/video_core
parentMerge pull request #478 from janisozaur/patch-1 (diff)
parentRasterizer: Flush the written region when writing shader uniform data before copying it to the uniform buffers. (diff)
downloadyuzu-a941a94148190f71912fface3405f87b2a894b83.tar
yuzu-a941a94148190f71912fface3405f87b2a894b83.tar.gz
yuzu-a941a94148190f71912fface3405f87b2a894b83.tar.bz2
yuzu-a941a94148190f71912fface3405f87b2a894b83.tar.lz
yuzu-a941a94148190f71912fface3405f87b2a894b83.tar.xz
yuzu-a941a94148190f71912fface3405f87b2a894b83.tar.zst
yuzu-a941a94148190f71912fface3405f87b2a894b83.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 0bd235218..59761c6b1 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -218,6 +218,9 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) {
ubo.SetFromRegs(gpu.state.shader_stages[stage]);
std::memcpy(buffer_ptr, &ubo, sizeof(ubo));
+ // Flush the buffer so that the GPU can see the data we just wrote.
+ glFlushMappedBufferRange(GL_ARRAY_BUFFER, buffer_offset, sizeof(ubo));
+
// Upload uniform data as one UBO per stage
const GLintptr ubo_offset = buffer_offset;
copy_buffer(uniform_buffers[stage].handle, ubo_offset,