From 0688cfdaef8e87969882fe46b46238cecc6f604c Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 5 Jun 2014 12:18:44 +0200 Subject: [PATCH] OGL-StreamBuffer: don't use coherent mapping Coherent mapping seems to be much slower on fermi gpus. --- Source/Core/VideoBackends/OGL/StreamBuffer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoBackends/OGL/StreamBuffer.cpp b/Source/Core/VideoBackends/OGL/StreamBuffer.cpp index f2448ffbf0..4a79c8f6b7 100644 --- a/Source/Core/VideoBackends/OGL/StreamBuffer.cpp +++ b/Source/Core/VideoBackends/OGL/StreamBuffer.cpp @@ -223,9 +223,9 @@ public: // COHERENT_BIT is set so we don't have to use a MemoryBarrier on write // CLIENT_STORAGE_BIT is set since we access the buffer more frequently on the client side then server side glBufferStorage(m_buffertype, m_size, nullptr, - GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT | GL_CLIENT_STORAGE_BIT); + GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT); m_pointer = (u8*)glMapBufferRange(m_buffertype, 0, m_size, - GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); + GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_FLUSH_EXPLICIT_BIT); } ~BufferStorage() { @@ -241,6 +241,7 @@ public: } void Unmap(size_t used_size) override { + glFlushMappedBufferRange(m_buffertype, m_iterator, used_size); m_iterator += used_size; }