vlc | branch: master | Alexandre Janniaux <[email protected]> | Wed Jun 3 15:23:50 2020 +0200| [60e91a960a9e33a5dc5b8fc43f15321e326e75f4] | committer: Alexandre Janniaux
opengl: fragment_shaders: fix TexSize0 usage In the case we're using GL_TEXTURE_RECTANGLE, we need to convert the normalized texture coordinates into pixel coordinates using TexSize0. This was done in the case of yuv (cf. is_yuv) in general but not when is_yuv == false, which leads to failure when fetching uniform locations on MacOSX. In particular, this can be tested by forcing the chroma through the --videotoolbox-cvpx-chroma=BGRA option on MacOSX. Signed-off-by: Alexandre Janniaux <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=60e91a960a9e33a5dc5b8fc43f15321e326e75f4 --- modules/video_output/opengl/fragment_shaders.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c index a779d7df5d..e63313cd61 100644 --- a/modules/video_output/opengl/fragment_shaders.c +++ b/modules/video_output/opengl/fragment_shaders.c @@ -680,6 +680,9 @@ opengl_fragment_shader_init(struct vlc_gl_sampler *sampler, GLenum tex_target, else { ADD(" tex_coords = (TexCoordsMap0 * pic_hcoords).st;\n"); + if (tex_target == GL_TEXTURE_RECTANGLE) + ADD(" tex_coords *= TexSize0;\n"); + ADDF(" vec4 result = %s(Texture0, tex_coords);\n", lookup); color_count = 1; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
