[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: Revert "opengl: simplify swizzle"

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Thu Mar 31 09:57:24 UTC 2022



Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC


Commits:
3facda53 by Alexandre Janniaux at 2022-03-31T09:42:42+00:00
Revert "opengl: simplify swizzle"

The swizzle of the texture should be different between
GL_LUMINANCE_ALPHA textures and GL_RG textures.

This reverts commit d6ffeba288c533f0531541fe8a97d8bda60fd25c.

Refs #26767

- - - - -
270330c9 by Alexandre Janniaux at 2022-03-31T09:42:42+00:00
Revert "opengl: fix swizzle"

GL_LUMINANCE_ALPHA textures should be sampled through r and a swizzle
since it has a `(L,L,L,A)` layout.

This reverts commit 4082f4f2f46b60fd4c7d4d31ba26c3d890ad03a4, but
includes also the fix from c69bbb07f761975a13209faf4aaee821b462d490 to
avoid using an invalid swizzle.

Fixes #26767
Reintroduce #26735

- - - - -


1 changed file:

- modules/video_output/opengl/fragment_shaders.c


Changes:

=====================================
modules/video_output/opengl/fragment_shaders.c
=====================================
@@ -198,8 +198,16 @@ tc_yuv_base_init(opengl_tex_converter_t *tc, GLenum tex_target,
         else
             return VLC_EGENERIC;
 
-        swizzle_per_tex[0] = "r";
-        swizzle_per_tex[1] = "rg";
+        if (oneplane_texfmt == GL_RED)
+        {
+            swizzle_per_tex[0] = "r";
+            swizzle_per_tex[1] = "rg";
+        }
+        else
+        {
+            swizzle_per_tex[0] = "x";
+            swizzle_per_tex[1] = "xw";
+        }
     }
     else if (desc->plane_count == 1)
     {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/008c33307cbd901069444165e5cabb7cdb54ec17...270330c90d86dec2d5301af22f9fd3032df4b279

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/008c33307cbd901069444165e5cabb7cdb54ec17...270330c90d86dec2d5301af22f9fd3032df4b279
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list