mpv/video/out
Niklas Haas 46d86da630 vo_opengl: refactor RA texture and buffer updates
- tex_uploads args are moved to a struct
- the ability to directly upload texture data without going through a
  buffer is made explicit
- the concept of buffer updates and buffer polling is made more explicit
  and generalized to buf_update as well (not just mapped buffers)
- the ability to call tex_upload/buf_update on a tex/buf is made
  explicit during tex/buf creation
- uploading from buffers now uses an explicit offset instead of
  implicitly comparing *src against buf->data, because not all buffers
  may actually be persistently mapped
- the initial_data = immutable requirement is dropped. (May be re-added
  later for D3D11 if that ever becomes a thing)

This change helps the vulkan abstraction immensely and also helps move
common code (like the PBO pooling) out of ra_gl and into the
opengl/utils.c

This also technically has the side-benefit / side-constraint of using
PBOs for OSD texture uploads as well, which actually seems to help
performance on machines where --opengl-pbo is faster than the naive code
path. Because of this, I decided to hook up the OSD code to the
opengl-pbo option as well.

One drawback of this refactor is that the GL_STREAM_COPY hack for
texture uploads "got lost", but I think I'm happy with that going away
anyway since DR almost fully deprecates it, and it's not the "right
thing" anyway - but instead an nvidia-only hack to make this stuff work
somewhat better on NUMA systems with discrete GPUs.

Another change is that due to the way fencing works with ra_buf (we get
one fence per ra_buf per upload) we have to use multiple ra_bufs instead
of offsets into a shared buffer. But for OpenGL this is probably better
anyway. It's possible that in future, we could support having
independent “buffer slices” (each with their own fence/sync object), but
this would be an optimization more than anything. I also think that we
could address the underlying problem (memory closeness) differently by
making the ra_vk memory allocator smart enough to chunk together
allocations under the hood.
2017-08-18 00:34:34 +02:00
..
cocoa cocoa: add an option to disable the native macOS fullscreen 2017-08-06 22:48:26 +02:00
opengl vo_opengl: refactor RA texture and buffer updates 2017-08-18 00:34:34 +02:00
wayland
win32
aspect.c
aspect.h
bitmap_packer.c
bitmap_packer.h
cocoa_common.h
cocoa_common.m cocoa: add an option to disable the native macOS fullscreen 2017-08-06 22:48:26 +02:00
d3d_shader_420p.h
d3d_shader_yuv.hlsl
dither.c
dither.h
drm_common.c
drm_common.h
filter_kernels.c vo_opengl: generalize --scale-clamp etc. 2017-07-12 19:08:58 +02:00
filter_kernels.h vo_opengl: generalize --scale-clamp etc. 2017-07-12 19:08:58 +02:00
vo.c vo_opengl: add direct rendering support 2017-07-24 04:32:55 +02:00
vo.h vo_opengl: add direct rendering support 2017-07-24 04:32:55 +02:00
vo_caca.c
vo_direct3d.c
vo_drm.c
vo_image.c
vo_lavc.c
vo_null.c
vo_opengl.c vo_opengl: remove DR image layouting code to renderer 2017-08-14 19:57:44 +02:00
vo_opengl_cb.c vo_opengl: separate hwdec context and mapping, port it to use ra 2017-08-10 21:24:31 +02:00
vo_rpi.c vo_rpi: fix operation 2017-08-15 19:41:23 +02:00
vo_sdl.c
vo_tct.c
vo_vaapi.c
vo_vdpau.c
vo_wayland.c
vo_x11.c
vo_xv.c
w32_common.c w32_common: handle media keys 2017-08-05 02:38:44 +10:00
w32_common.h
wayland_common.c
wayland_common.h
win_state.c
win_state.h
x11_common.c x11: use xdg-screensaver suspend/resume 2017-08-15 20:32:44 +02:00
x11_common.h x11: use xdg-screensaver suspend/resume 2017-08-15 20:32:44 +02:00