Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #462 from degasus/non-coherent
OGL-StreamBuffer: don't use coherent mapping.
  • Loading branch information
neobrain committed Jun 5, 2014
2 parents 3a06907 + 0688cfd commit 81842bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Core/VideoBackends/OGL/StreamBuffer.cpp
Expand Up @@ -223,9 +223,9 @@ class BufferStorage : public StreamBuffer
// 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() {
Expand All @@ -241,6 +241,7 @@ class BufferStorage : public StreamBuffer
}

void Unmap(size_t used_size) override {
glFlushMappedBufferRange(m_buffertype, m_iterator, used_size);
m_iterator += used_size;
}

Expand Down

0 comments on commit 81842bc

Please sign in to comment.