vo_opengl: use GL_CLIENT_STORAGE_BIT for DR

mesa won't pick client storage unless this bit is set, and we
*absolutely* want to be using client storage for our DR PBOs.
Performance is shit on AMD otherwise. (Nvidia always uses client storage
for persistent coherent buffers whether you tell it it or not, probably
because it's way faster and nvidia doesn't trust users to figure that
out on their own)
This commit is contained in:
Niklas Haas 2017-08-03 20:06:58 +02:00
parent 7625bcc716
commit 0f956f0929
No known key found for this signature in database
GPG Key ID: 9A09076581B27402
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ static struct ra_mapped_buffer *gl_create_mapped_buffer(struct ra *ra,
gl->GenBuffers(1, &buf_gl->pbo);
gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, buf_gl->pbo);
gl->BufferStorage(GL_PIXEL_UNPACK_BUFFER, size, NULL, flags);
gl->BufferStorage(GL_PIXEL_UNPACK_BUFFER, size, NULL, flags | GL_CLIENT_STORAGE_BIT);
buf->data = gl->MapBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, buf->size, flags);
gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
if (!buf->data) {