mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
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:
parent
7625bcc716
commit
0f956f0929
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user