From e5065da29ca988b84a3741861e1474d1c71c8228 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 18 Apr 2013 20:29:55 +0900 Subject: [PATCH] fix nvidia texture from pixmap config depth match to be looser to avoid non-matches. --- src/modules/evas/engines/gl_x11/evas_engine.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index 1f32bb7554..5b3865c404 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -2183,13 +2183,17 @@ eng_image_native_set(void *data, void *image, void *native) &num); if (configs) { - int j = 0, val = 0; + int j = 0, val = 0, found = 0; + try_again: for (j = 0; j < num; j++) { - glXGetFBConfigAttrib(re->win->disp, configs[j], - GLX_BUFFER_SIZE, &val); - if (val != depth) continue; + if (found == 0) + { + glXGetFBConfigAttrib(re->win->disp, configs[j], + GLX_BUFFER_SIZE, &val); + if (val != depth) continue; + } glXGetFBConfigAttrib(re->win->disp, configs[j], GLX_DRAWABLE_TYPE, &val); if (!(val & GLX_PIXMAP_BIT)) continue; @@ -2220,8 +2224,14 @@ eng_image_native_set(void *data, void *image, void *native) GLX_BIND_TO_MIPMAP_TEXTURE_EXT, &val); mipmap = val; n->fbc = configs[j]; + found = 1; break; } + if (found == 0) + { + found = -1; + goto try_again; + } XFree(configs); }