Buffer sync fix;

It appears that GL_MAP_UNSYNCHRONIZED_BIT interferes with
GL_MAP_INVALIDATE_BUFFER_BIT's ability to discard buffer
contents.  Removing the unsynchronized bit fixes visual
glitches on Intel HD GPUs.
This commit is contained in:
bjorn 2020-09-19 17:19:34 -07:00
parent c7ca7eaa38
commit 61e9c746a8
1 changed files with 1 additions and 1 deletions

View File

@ -2301,7 +2301,7 @@ void lovrBufferDiscard(Buffer* buffer) {
buffer->mapped = false;
}
GLbitfield flags = GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_BUFFER_BIT;
GLbitfield flags = GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_INVALIDATE_BUFFER_BIT;
buffer->data = glMapBufferRange(glType, 0, buffer->size, flags);
buffer->mapped = true;
#endif