On Wed, 04 Dec 2013 15:20:09 +0400 Stanislav Vorobiov <s.vorob...@samsung.com> said:
> > now.. i can only conclude here that either the interpretation of the > > extension is wrong and that the invert value when 0/false == invertad and > > when 1/true is NOT inverted... (odd and doesn't make sense)... or that your > > driver has a bug. it implements this extn but gets it wrong. > It looks like a bug in mesa. They support EGL_Y_INVERTED_NOK, but always > return 0. Look at mesa/src/egl/main/eglconfig.h:struct _egl_config, > YInvertedNOK field is always 0 and it's returned in eglGetConfigAttrib via > eglOffsetOfConfig. that was my guess. it smelled of a mesa bug. the code in that patch is totally correct as best i read it (and there isn't much to read) so as i said.. beyond blacklisting things in buggy drivers... i'm of the opinion of "don't bother. file a bug with driver maintainers and let them fix it rather than hiding their bug for them" :) > On 12/04/2013 01:13 PM, Carsten Haitzler (The Rasterman) wrote: > > On Tue, 3 Dec 2013 23:32:13 -0200 Iván Briano <sachi...@gmail.com> said: > > > >> Building with EGL and GL-ES, Mesa 9.2.4 on Intel video, > >> I’m getting windows vertically inverted. Works if I revert > >> this commit or go back to software compositing. > > > > and did you look at the commit? it's right. if you don't have the yinverted > > extension it's the same behavior as before. it assume yinverted in gles/egl > > by default (yinvert = 1 ... same as before ... m->native.yinvert = 1). > > > > but IF you have the extension - it queries. it checks for the extensions > > string and if you have it - sets a flag. if this flag is true AND the get > > config attr succeeds - it sets yinvert to the queried invert value. > > > > now.. i can only conclude here that either the interpretation of the > > extension is wrong and that the invert value when 0/false == invertad and > > when 1/true is NOT inverted... (odd and doesn't make sense)... or that your > > driver has a bug. it implements this extn but gets it wrong. > > > > the only solutions here would be (assuming the driver is wrong), is to > > ignore this and just wait for the driver to be fixed, or to add blacklist > > code into evas to detect the specific broken driver + version and ignore > > that extension if that driver is found. i don't know what specific driver > > strings you have there so i can't write a blacklist for you, but i suspect > > you want to file a bug with mesa/driver/xorg devs :) > > > >> On Nov 29, 2013, at 8:08, Stanislav Vorobiov <s.vorob...@samsung.com> > >> wrote: > >> > >>> raster pushed a commit to branch master. > >>> > >>> http://git.enlightenment.org/core/efl.git/commit/?id=9e3b778acb851671c2f24454b80bdeafc20d1c65 > >>> > >>> commit 9e3b778acb851671c2f24454b80bdeafc20d1c65 > >>> Author: Stanislav Vorobiov <s.vorob...@samsung.com> > >>> Date: Thu Nov 28 18:18:16 2013 +0900 > >>> > >>> evas - fix gl egl textrue from pixmap support y invert query extension > >>> > >>> Instead of hardcoding yinvert=1 we should query for > >>> EGL_NOK_texture_from_pixmap extension and if it's present > >>> use EGL_Y_INVERTED_NOK value > >>> --- > >>> src/modules/evas/engines/gl_x11/evas_engine.c | 20 +++++++++++++++++++- > >>> 1 file changed, 19 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c > >>> b/src/modules/evas/engines/gl_x11/evas_engine.c index d25610f..4e5c22c > >>> 100644 > >>> --- a/src/modules/evas/engines/gl_x11/evas_engine.c > >>> +++ b/src/modules/evas/engines/gl_x11/evas_engine.c > >>> @@ -71,6 +71,7 @@ struct _Render_Engine > >>> static int initted = 0; > >>> static int gl_wins = 0; > >>> static int extn_have_buffer_age = 1; > >>> +static int extn_have_y_inverted = 0; > >>> > >>> typedef void (*_eng_fn) (void); > >>> typedef _eng_fn (*glsym_func_eng_fn) (); > >>> @@ -90,6 +91,9 @@ static Eina_Bool eng_preload_make_current(void *data, > >>> void *doit); > >>> #ifndef EGL_BUFFER_AGE_EXT > >>> # define EGL_BUFFER_AGE_EXT 0x313d > >>> #endif > >>> +#ifndef EGL_Y_INVERTED_NOK > >>> +# define EGL_Y_INVERTED_NOK 0x307F > >>> +#endif > >>> > >>> _eng_fn (*glsym_eglGetProcAddress) (const char *a) = NULL; > >>> void *(*glsym_eglCreateImage) (EGLDisplay a, EGLContext > >>> b, EGLenum c, EGLClientBuffer d, const int *e) = NULL; @@ -711,6 +715,10 > >>> @@ gl_extn_veto(Render_Engine *re) { > >>> extn_have_buffer_age = 0; > >>> } > >>> + if (strstr(str, "EGL_NOK_texture_from_pixmap")) > >>> + { > >>> + extn_have_y_inverted = 1; > >>> + } > >>> } > >>> else > >>> { > >>> @@ -2225,6 +2233,7 @@ eng_image_native_set(void *data, void *image, void > >>> *native) EGLConfig egl_config; > >>> int config_attrs[20]; > >>> int num_config, i = 0; > >>> + int yinvert = 1; > >>> > >>> eina_hash_add(re->win->gl_context->shared->native_pm_hash, > >>> &pmid, im); > >>> > >>> @@ -2250,6 +2259,15 @@ eng_image_native_set(void *data, void *image, void > >>> *native) if (!eglChooseConfig(re->win->egl_disp, config_attrs, > >>> &egl_config, 1, &num_config)) > >>> ERR("eglChooseConfig() failed for pixmap 0x%x, num_config > >>> = %i", (unsigned int)pm, num_config); > >>> + else > >>> + { > >>> + int val; > >>> + if (extn_have_y_inverted && > >>> + eglGetConfigAttrib(re->win->egl_disp, egl_config, > >>> + EGL_Y_INVERTED_NOK, &val)) > >>> + yinvert = val; > >>> + } > >>> + > >>> memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface)); > >>> n->pixmap = pm; > >>> n->visual = vis; > >>> @@ -2263,7 +2281,7 @@ eng_image_native_set(void *data, void *image, void > >>> *native) ERR("Try eglCreateImage on EGL with no support"); > >>> if (!n->egl_surface) > >>> ERR("eglCreatePixmapSurface() for 0x%x failed", (unsigned > >>> int)pm); > >>> - im->native.yinvert = 1; > >>> + im->native.yinvert = yinvert; > >>> im->native.loose = 0; > >>> im->native.data = n; > >>> im->native.func.data = re; > >>> > >>> -- > >>> > >>> > >> > >> > >> ------------------------------------------------------------------------------ > >> Sponsored by Intel(R) XDK > >> Develop, test and display web and hybrid apps with a single code base. > >> Download it for free now! > >> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > >> _______________________________________________ > >> enlightenment-devel mailing list > >> enlightenment-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > >> > > > > > > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel