diff options
author | Philip Langdale <philipl@overt.org> | 2016-09-22 21:39:40 -0700 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-24 17:11:06 +0200 |
commit | 441febfcbab2281d80579ded5cb8d9a7f4ca1e94 (patch) | |
tree | 83618085f3e659965c0b771e21a3c7f7eef7923f /player/command.c | |
parent | cb46f73cbb621a04244e4459e73e88541300e0c4 (diff) | |
download | mpv-441febfcbab2281d80579ded5cb8d9a7f4ca1e94.tar.bz2 mpv-441febfcbab2281d80579ded5cb8d9a7f4ca1e94.tar.xz |
vo_opengl: hwdec_cuda: directly map GL textures and skip using PBOs
The documentation around this stuff is poor, but I found an nvidia
sample that demonstrates how to use the interop API most efficiently.
(https://github.com/nvpro-samples/gl_cuda_interop_pingpong_st)
Key lessons are:
1) you can register the texture itself and have cuda write to it,
thereby skipping an additional copy through the PBO.
2) You don't have to be mapped when you do the copy - once you get a
mapped pointer, it remains valid. Magic!
This lets us throw out the PBOs as well as much of the explicit
alignment and stride handling.
CPU usage is slightly (~3%) lower for 4K content in one test case,
so it makes a detectable difference, and presumably saves memory.
Diffstat (limited to 'player/command.c')
0 files changed, 0 insertions, 0 deletions