Mercurial > mplayer.hg
changeset 34968:0807ab90536c
Work around IMG drivers not being able to parse our shaders.
author | reimar |
---|---|
date | Tue, 07 Aug 2012 17:46:36 +0000 |
parents | a8859956ed3c |
children | 7974179b9471 |
files | libvo/gl_common.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/gl_common.c Mon Aug 06 18:26:02 2012 +0000 +++ b/libvo/gl_common.c Tue Aug 07 17:46:36 2012 +0000 @@ -1466,11 +1466,14 @@ */ 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;