From 333b6a556a2b0c33827109515950181608ccad00 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 21 Sep 2018 07:59:00 -0400 Subject: [PATCH] gl_stream_buffer: Fix use of bitwise OR instead of logical OR in Map() This was very likely intended to be a logical OR based off the conditioning and testing of inversion in one case. Even if this was intentional, this is the kind of non-obvious thing one should be clarifying with a comment. --- src/video_core/renderer_opengl/gl_stream_buffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_stream_buffer.cpp b/src/video_core/renderer_opengl/gl_stream_buffer.cpp index 965165dc22..9def546303 100644 --- a/src/video_core/renderer_opengl/gl_stream_buffer.cpp +++ b/src/video_core/renderer_opengl/gl_stream_buffer.cpp @@ -73,7 +73,7 @@ std::tuple OGLStreamBuffer::Map(GLsizeiptr size, GLintptr a } } - if (invalidate | !persistent) { + if (invalidate || !persistent) { GLbitfield flags = GL_MAP_WRITE_BIT | (persistent ? GL_MAP_PERSISTENT_BIT : 0) | (coherent ? GL_MAP_COHERENT_BIT : GL_MAP_FLUSH_EXPLICIT_BIT) | (invalidate ? GL_MAP_INVALIDATE_BUFFER_BIT : GL_MAP_UNSYNCHRONIZED_BIT);