path: root/video
diff options
authorNiklas Haas <>2017-08-03 20:06:58 +0200
committerNiklas Haas <>2017-08-03 20:06:58 +0200
commit0f956f0929bacd6f4ad1a8c8ad4892ee14001b2d (patch)
tree80b91247373e2e7c031efa1cb0ab9120e5164f3c /video
parent7625bcc71637ebaf571043c14d45ef6238fea7d7 (diff)
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)
Diffstat (limited to 'video')
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c
index 9067a06bd4..46cbbda987 100644
--- a/video/out/opengl/ra_gl.c
+++ b/video/out/opengl/ra_gl.c
@@ -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) {