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

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Mon Jan 24 09:03:10 UTC 2022



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


Commits:
c69bbb07 by Alexandre Janniaux at 2022-01-24T08:41:46+00:00
opengl: sampler: fix swizzle components

The GLSL allows three different swizzling:
 - .rgba
 - .stuv
 - .xyzw

However, they are not allowed to be mixed together:

    ERROR: 0:8: Inconsistent component characters in swizzle 'xa'
    ERROR: 0:10: Use of undeclared identifier 'pixel'
    ERROR: 0:11: Use of undeclared identifier 'result'

Fix the swizzling to w instead of a.

- - - - -
e58c9ef3 by Alexandre Janniaux at 2022-01-24T08:41:46+00:00
opengl: add more opengl checks

They have zero cost in release and help pinpoint the component raising
OpenGL issues.

- - - - -


2 changed files:

- modules/video_output/opengl/sampler.c
- modules/video_output/opengl/vout_helper.c


Changes:

=====================================
modules/video_output/opengl/sampler.c
=====================================
@@ -441,7 +441,7 @@ opengl_init_swizzle(struct vlc_gl_sampler *sampler,
         else
         {
             swizzle_per_tex[0] = "x";
-            swizzle_per_tex[1] = "xa";
+            swizzle_per_tex[1] = "xw";
         }
     }
     else if (desc->plane_count == 1)


=====================================
modules/video_output/opengl/vout_helper.c
=====================================
@@ -139,6 +139,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
         msg_Err(gl, "Could not create interop");
         goto free_vgl;
     }
+    GL_ASSERT_NOERROR(vt);
 
     vgl->filters = vlc_gl_filters_New(gl, api, vgl->interop);
     if (!vgl->filters)
@@ -146,6 +147,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
         msg_Err(gl, "Could not create filters");
         goto delete_interop;
     }
+    GL_ASSERT_NOERROR(vt);
 
     int upscaler = var_InheritInteger(gl, "gl-upscaler");
     int downscaler = var_InheritInteger(gl, "gl-downscaler");
@@ -191,6 +193,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
                  (const char *) &fmt->i_chroma);
         goto delete_filters;
     }
+    GL_ASSERT_NOERROR(vt);
 
     /* The renderer is a special filter: we need its concrete instance to
      * forward SetViewpoint() */
@@ -202,6 +205,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
         msg_Err(gl, "Could not init filters framebuffers");
         goto delete_filters;
     }
+    GL_ASSERT_NOERROR(vt);
 
     vgl->sub_interop = vlc_gl_interop_NewForSubpictures(gl);
     if (!vgl->sub_interop)
@@ -209,6 +213,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
         msg_Err(gl, "Could not create sub interop");
         goto delete_filters;
     }
+    GL_ASSERT_NOERROR(vt);
 
     vgl->sub_renderer =
         vlc_gl_sub_renderer_New(gl, api, vgl->sub_interop);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/21d696e5df185e4ca3b9c5ecd606951462da2b9f...e58c9ef32194cb1fd4d7274b9f50f95291076c6a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/21d696e5df185e4ca3b9c5ecd606951462da2b9f...e58c9ef32194cb1fd4d7274b9f50f95291076c6a
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list