aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-10-09 15:08:59 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-10-11 16:25:06 +0100
commit01109a8c7b703191d45132f0816a4b166892696d (patch)
tree33b66fe3ea98c9419cda280e98d45f568fb4426f
parentevas gl x11 - add working measure funcs for debugging performance (diff)
downloadefl-01109a8c7b703191d45132f0816a4b166892696d.tar.gz
glx extns - check client and server extns
in case... client should be a superset...
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c33
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.h2
-rw-r--r--src/modules/evas/engines/gl_x11/evas_x_main.c7
3 files changed, 27 insertions, 15 deletions
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index 2278f950d8..82e2517ca0 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -94,7 +94,7 @@ int (*glsym_glXGetVideoSync) (unsigned int *a) = NULL;
int (*glsym_glXWaitVideoSync) (int a, int b, unsigned int *c) = NULL;
XID (*glsym_glXCreatePixmap) (Display *a, void *b, Pixmap c, const int *d) = NULL;
void (*glsym_glXDestroyPixmap) (Display *a, XID b) = NULL;
-int (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d) = NULL;
+void (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d) = NULL;
int (*glsym_glXSwapIntervalSGI) (int a) = NULL;
void (*glsym_glXSwapIntervalEXT) (Display *s, GLXDrawable b, int c) = NULL;
void (*glsym_glXReleaseBuffersMESA) (Display *a, XID b) = NULL;
@@ -1409,7 +1409,7 @@ eng_gl_symbols(Outbuf *ob)
// GLX 1.3
FINDSYM(glsym_glXCreatePixmap, "glXCreatePixmap", NULL, glsym_func_xid);
FINDSYM(glsym_glXDestroyPixmap, "glXDestroyPixmap", NULL, glsym_func_void);
- FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawable", NULL, glsym_func_int);
+ FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawable", NULL, glsym_func_void);
// swap interval: MESA and SGI take (interval)
FINDSYM(glsym_glXSwapIntervalSGI, "glXSwapIntervalMESA", "GLX_MESA_swap_control", glsym_func_int);
@@ -1496,31 +1496,46 @@ gl_extn_veto(Render_Engine *re)
eng_get_ob(re)->info->info.screen);
if (str)
{
+ const char *str2;
+ char *tmpstr;
+ size_t sz = 0;
+
+ sz = strlen(str);
+ str2 = glXGetClientString(eng_get_ob(re)->info->info.display,
+ GLX_EXTENSIONS);
+ if (str2) sz += 1 + strlen(str2);
+ tmpstr = alloca(sz + 1);
+ strcpy(tmpstr, str);
+ if (str2)
+ {
+ strcat(tmpstr, " ");
+ if (str2) strcat(tmpstr, str2);
+ }
if (getenv("EVAS_GL_INFO"))
- printf("GLX EXTN:\n%s\n", str);
- if (!strstr(str, "_texture_from_pixmap"))
+ printf("GLX EXTN:\n%s\n", tmpstr);
+ if (!strstr(tmpstr, "_texture_from_pixmap"))
{
glsym_glXBindTexImage = NULL;
glsym_glXReleaseTexImage = NULL;
}
- if (!strstr(str, "GLX_SGI_video_sync"))
+ if (!strstr(tmpstr, "GLX_SGI_video_sync"))
{
glsym_glXGetVideoSync = NULL;
glsym_glXWaitVideoSync = NULL;
}
- if (!strstr(str, "GLX_EXT_buffer_age"))
+ if (!strstr(tmpstr, "GLX_EXT_buffer_age"))
{
extn_have_buffer_age = 0;
}
- if (!strstr(str, "GLX_EXT_swap_control"))
+ if (!strstr(tmpstr, "GLX_EXT_swap_control"))
{
glsym_glXSwapIntervalEXT = NULL;
}
- if (!strstr(str, "GLX_SGI_swap_control"))
+ if (!strstr(tmpstr, "GLX_SGI_swap_control"))
{
glsym_glXSwapIntervalSGI = NULL;
}
- if (!strstr(str, "GLX_MESA_release_buffers"))
+ if (!strstr(tmpstr, "GLX_MESA_release_buffers"))
{
glsym_glXReleaseBuffersMESA = NULL;
}
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.h b/src/modules/evas/engines/gl_x11/evas_engine.h
index ed7277172d..78af5bed5d 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.h
+++ b/src/modules/evas/engines/gl_x11/evas_engine.h
@@ -157,7 +157,7 @@ extern unsigned int (*glsym_eglSetDamageRegionKHR) (EGLDisplay a, EGLSurface
# define GLX_BACK_BUFFER_AGE_EXT 0x20f4
#endif
-extern int (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d);
+extern void (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d);
extern void (*glsym_glXSwapIntervalEXT) (Display *s, GLXDrawable b, int c);
extern int (*glsym_glXSwapIntervalSGI) (int a);
extern int (*glsym_glXGetVideoSync) (unsigned int *a);
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c
index 07d757e118..3996f510d0 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -1439,11 +1439,8 @@ eng_outbuf_swap_mode(Outbuf *ob)
unsigned int age = 0;
if (glsym_glXQueryDrawable)
- {
- if (glsym_glXQueryDrawable(ob->disp, ob->glxwin,
- GLX_BACK_BUFFER_AGE_EXT, &age) < 1)
- age = 0;
- }
+ glsym_glXQueryDrawable(ob->disp, ob->glxwin,
+ GLX_BACK_BUFFER_AGE_EXT, &age);
#endif
measure(1, "query age");
if (age == 1) swap_mode = MODE_COPY;