summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-07 13:13:01 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-07 20:46:24 +0900
commiteb23cc28bbd2782d6963f1a0e73d530704078790 (patch)
treebf991523bc0b7076dc1a14efee66ce29c325a199
parent9f6fd5df1de004e7361e3bfb5f6cea57a751ecb4 (diff)
evas - gl-x11 engine - put in guessed blacklist of yinvert extn for intel mesa
Conflicts: src/modules/evas/engines/gl_x11/evas_engine.c
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index 4e5c22c..a964254 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -71,7 +71,9 @@ struct _Render_Engine
71static int initted = 0; 71static int initted = 0;
72static int gl_wins = 0; 72static int gl_wins = 0;
73static int extn_have_buffer_age = 1; 73static int extn_have_buffer_age = 1;
74static int extn_have_y_inverted = 0; 74#ifdef GL_GLES
75static int extn_have_y_inverted = 1;
76#endif
75 77
76typedef void (*_eng_fn) (void); 78typedef void (*_eng_fn) (void);
77typedef _eng_fn (*glsym_func_eng_fn) (); 79typedef _eng_fn (*glsym_func_eng_fn) ();
@@ -715,9 +717,28 @@ gl_extn_veto(Render_Engine *re)
715 { 717 {
716 extn_have_buffer_age = 0; 718 extn_have_buffer_age = 0;
717 } 719 }
718 if (strstr(str, "EGL_NOK_texture_from_pixmap")) 720 if (!strstr(str, "EGL_NOK_texture_from_pixmap"))
721 {
722 extn_have_y_inverted = 0;
723 }
724 else
719 { 725 {
720 extn_have_y_inverted = 1; 726 const GLubyte *vendor, *renderer;
727
728 vendor = glGetString(GL_VENDOR);
729 renderer = glGetString(GL_RENDERER);
730 // XXX: workaround mesa bug!
731 // looking for mesa and intel build which is known to
732 // advertise the EGL_NOK_texture_from_pixmap extension
733 // but not set it correctly. guessing vendor/renderer
734 // strings will be like the following:
735 // OpenGL vendor string: Intel Open Source Technology Center
736 // OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Desktop
737 if (((vendor) && (strstr(vendor, "Intel"))) &&
738 ((renderer) && (strstr(renderer, "Mesa"))) &&
739 ((renderer) && (strstr(renderer, "Intel")))
740 )
741 extn_have_y_inverted = 0;
721 } 742 }
722 } 743 }
723 else 744 else