From f13b7ec102c15c9b367d10db89fe0a16d7f51a10 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 4 Apr 2019 18:23:48 +0100 Subject: [PATCH] Don't actually call a flush into GL for "virtual" coherent map flushes --- renderdoc/driver/gl/wrappers/gl_buffer_funcs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/gl/wrappers/gl_buffer_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_buffer_funcs.cpp index 62af8fad5..8152a0b2d 100644 --- a/renderdoc/driver/gl/wrappers/gl_buffer_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_buffer_funcs.cpp @@ -2410,7 +2410,8 @@ void WrappedOpenGL::glFlushMappedNamedBufferRangeEXT(GLuint buffer, GLintptr off // note that we only want to flush the range with GL if we've actually // mapped it. Otherwise the map is 'virtual' and just pointing to our backing store data - if(record && record->Map.status == GLResourceRecord::Mapped_Direct) + if(record && record->Map.status == GLResourceRecord::Mapped_Direct && + gl_CurChunk != GLChunk::CoherentMapWrite) { GL.glFlushMappedNamedBufferRangeEXT(buffer, offset, length); }