diff options
author | Niklas Haas <git@haasn.xyz> | 2016-07-25 12:32:19 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-25 12:50:11 +0200 |
commit | 46b60a3e72a0343611a204876522e36e7869b998 (patch) | |
tree | 9f39e567a2403f56d92b4dcc4bde1b0e3cb3b031 /video/out/opengl/video.c | |
parent | f127869037f50c1382424e89e0cba5ac3443c094 (diff) | |
download | mpv-46b60a3e72a0343611a204876522e36e7869b998.tar.bz2 mpv-46b60a3e72a0343611a204876522e36e7869b998.tar.xz |
vo_opengl: remove the 3dlut-size npot2 restriction
This requires changing the pixel upload alignment because the odd sizes
might not be aligned to multiples of 4.
Anyway, the restriction has no real benefit and the sizes in between 32
and 64 might be worth using, so just drop it.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r-- | video/out/opengl/video.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index d403f6211a..901e208cab 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -631,8 +631,10 @@ static bool gl_video_get_lut3d(struct gl_video *p, enum mp_csp_prim prim, gl->ActiveTexture(GL_TEXTURE0 + TEXUNIT_3DLUT); gl->BindTexture(GL_TEXTURE_3D, p->lut_3d_texture); + gl->PixelStorei(GL_UNPACK_ALIGNMENT, 1); gl->TexImage3D(GL_TEXTURE_3D, 0, GL_RGB16, lut3d->size[0], lut3d->size[1], lut3d->size[2], 0, GL_RGB, GL_UNSIGNED_SHORT, lut3d->data); + gl->PixelStorei(GL_UNPACK_ALIGNMENT, 4); gl->TexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); gl->TexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); gl->TexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |