[vlc-commits] [Git][videolan/vlc][master] 2 commits: opengl: fix swizzle

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Wed Mar 23 15:22:25 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
05f29287 by Romain Vimont at 2022-03-23T14:21:07+00:00
opengl: fix swizzle

The four components are, in order: x, y, z, w.

The U and V values are the first and second components in the second
texture.

Fixes #26735

- - - - -
aa5bec3b by Romain Vimont at 2022-03-23T14:21:07+00:00
opengl: simplify swizzle

The commit ca7d2ea4b618b5bc1a8a03c0318d4f2afaf3007f introduced an xyzw
swizzle, whereas the previous code was using an rgba swizzle. No other
location used the xyzw swizzle for texture so unify and use rgba
everywhere.

Refs #26735

- - - - -


1 changed file:

- modules/video_output/opengl/sampler.c


Changes:

=====================================
modules/video_output/opengl/sampler.c
=====================================
@@ -435,16 +435,8 @@ opengl_init_swizzle(struct vlc_gl_sampler *sampler,
         swizzle_per_tex[0] = swizzle_per_tex[1] = swizzle_per_tex[2] = "r";
     else if (desc->plane_count == 2)
     {
-        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";
-        }
+        swizzle_per_tex[0] = "r";
+        swizzle_per_tex[1] = "rg";
     }
     else if (desc->plane_count == 1)
     {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/203b197211f0fe83e29cc27549ed12a0e2b03eac...aa5bec3b49a790709bcf2c7d874552916da2aea1

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/203b197211f0fe83e29cc27549ed12a0e2b03eac...aa5bec3b49a790709bcf2c7d874552916da2aea1
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