summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/utils.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-07-15 22:11:48 +0200
committerNiklas Haas <git@haasn.xyz>2017-07-15 22:11:48 +0200
commitb93bcce5df343de20096deb6d37e971bfa9a3072 (patch)
tree2dc9ab0730371dc4366751742f3228290bb84e5a /video/out/opengl/utils.h
parent60d0cea31084d770f5b2d7f691ae2aea8bc05812 (diff)
downloadmpv-b93bcce5df343de20096deb6d37e971bfa9a3072.tar.bz2
mpv-b93bcce5df343de20096deb6d37e971bfa9a3072.tar.xz
vo_opengl: coalesce intra-plane PBOs
Instead of allocating three PBOs and cycling through them, we allocate one PBO that's three times as large, and cycle through the subregion offsets. This results in arguably simpler code and faster initialization performance. Especially for 4K textures, initializing PBOs can take quite some time (e.g. 180ms -> 110ms). For 1080p, it's more like 66ms -> 52ms for me. The alignment to 4096 is completely unnecessary by spec, but we do it anyway just for peace of mind.
Diffstat (limited to 'video/out/opengl/utils.h')
-rw-r--r--video/out/opengl/utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/utils.h b/video/out/opengl/utils.h
index 92b1005c39..c55670b8d6 100644
--- a/video/out/opengl/utils.h
+++ b/video/out/opengl/utils.h
@@ -188,7 +188,7 @@ struct mp_pass_perf gl_timer_measure(struct gl_timer *timer);
struct gl_pbo_upload {
GL *gl;
int index;
- GLuint buffers[NUM_PBO_BUFFERS];
+ GLuint buffer;
size_t buffer_size;
};