[MPlayer-cvslog] r35062 - trunk/libvo/gl_common.c

reimar subversion at mplayerhq.hu
Tue Aug 7 19:46:37 CEST 2012


Author: reimar
Date: Tue Aug  7 19:46:36 2012
New Revision: 35062

Log:
Work around IMG drivers not being able to parse our shaders.

Modified:
   trunk/libvo/gl_common.c

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Mon Aug  6 20:26:02 2012	(r35061)
+++ trunk/libvo/gl_common.c	Tue Aug  7 19:46:36 2012	(r35062)
@@ -1466,11 +1466,14 @@ static void glSetupYUVFragprog(gl_conver
  */
 int glAutodetectYUVConversion(void) {
   const char *extensions = mpglGetString(GL_EXTENSIONS);
+  const char *vendor     = mpglGetString(GL_VENDOR);
+  // Imagination cannot parse floats in exponential representation (%e)
+  int is_img = vendor && strstr(vendor, "Imagination") != NULL;
   if (!extensions || !mpglMultiTexCoord2f)
     return YUV_CONVERSION_NONE;
-  if (strstr(extensions, "GL_ARB_fragment_program"))
+  if (strstr(extensions, "GL_ARB_fragment_program") && !is_img)
     return YUV_CONVERSION_FRAGMENT;
-  if (strstr(extensions, "GL_ATI_text_fragment_shader"))
+  if (strstr(extensions, "GL_ATI_text_fragment_shader") && !is_img)
     return YUV_CONVERSION_TEXT_FRAGMENT;
   if (strstr(extensions, "GL_ATI_fragment_shader"))
     return YUV_CONVERSION_COMBINERS_ATI;


More information about the MPlayer-cvslog mailing list