summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines
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 /src/modules/evas/engines
parent76725b2d3b16aaa49dc5bea64bc83adf4605e5f8 (diff)
glx extns - check client and server extns
in case... client should be a superset...
Diffstat (limited to 'src/modules/evas/engines')
-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;
94int (*glsym_glXWaitVideoSync) (int a, int b, unsigned int *c) = NULL; 94int (*glsym_glXWaitVideoSync) (int a, int b, unsigned int *c) = NULL;
95XID (*glsym_glXCreatePixmap) (Display *a, void *b, Pixmap c, const int *d) = NULL; 95XID (*glsym_glXCreatePixmap) (Display *a, void *b, Pixmap c, const int *d) = NULL;
96void (*glsym_glXDestroyPixmap) (Display *a, XID b) = NULL; 96void (*glsym_glXDestroyPixmap) (Display *a, XID b) = NULL;
97int (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d) = NULL; 97void (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d) = NULL;
98int (*glsym_glXSwapIntervalSGI) (int a) = NULL; 98int (*glsym_glXSwapIntervalSGI) (int a) = NULL;
99void (*glsym_glXSwapIntervalEXT) (Display *s, GLXDrawable b, int c) = NULL; 99void (*glsym_glXSwapIntervalEXT) (Display *s, GLXDrawable b, int c) = NULL;
100void (*glsym_glXReleaseBuffersMESA) (Display *a, XID b) = NULL; 100void (*glsym_glXReleaseBuffersMESA) (Display *a, XID b) = NULL;
@@ -1409,7 +1409,7 @@ eng_gl_symbols(Outbuf *ob)
1409 // GLX 1.3 1409 // GLX 1.3
1410 FINDSYM(glsym_glXCreatePixmap, "glXCreatePixmap", NULL, glsym_func_xid); 1410 FINDSYM(glsym_glXCreatePixmap, "glXCreatePixmap", NULL, glsym_func_xid);
1411 FINDSYM(glsym_glXDestroyPixmap, "glXDestroyPixmap", NULL, glsym_func_void); 1411 FINDSYM(glsym_glXDestroyPixmap, "glXDestroyPixmap", NULL, glsym_func_void);
1412 FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawable", NULL, glsym_func_int); 1412 FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawable", NULL, glsym_func_void);
1413 1413
1414 // swap interval: MESA and SGI take (interval) 1414 // swap interval: MESA and SGI take (interval)
1415 FINDSYM(glsym_glXSwapIntervalSGI, "glXSwapIntervalMESA", "GLX_MESA_swap_control", glsym_func_int); 1415 FINDSYM(glsym_glXSwapIntervalSGI, "glXSwapIntervalMESA", "GLX_MESA_swap_control", glsym_func_int);
@@ -1496,31 +1496,46 @@ gl_extn_veto(Render_Engine *re)
1496 eng_get_ob(re)->info->info.screen); 1496 eng_get_ob(re)->info->info.screen);
1497 if (str) 1497 if (str)
1498 { 1498 {
1499 const char *str2;
1500 char *tmpstr;
1501 size_t sz = 0;
1502
1503 sz = strlen(str);
1504 str2 = glXGetClientString(eng_get_ob(re)->info->info.display,
1505 GLX_EXTENSIONS);
1506 if (str2) sz += 1 + strlen(str2);
1507 tmpstr = alloca(sz + 1);
1508 strcpy(tmpstr, str);
1509 if (str2)
1510 {
1511 strcat(tmpstr, " ");
1512 if (str2) strcat(tmpstr, str2);
1513 }
1499 if (getenv("EVAS_GL_INFO")) 1514 if (getenv("EVAS_GL_INFO"))
1500 printf("GLX EXTN:\n%s\n", str); 1515 printf("GLX EXTN:\n%s\n", tmpstr);
1501 if (!strstr(str, "_texture_from_pixmap")) 1516 if (!strstr(tmpstr, "_texture_from_pixmap"))
1502 { 1517 {
1503 glsym_glXBindTexImage = NULL; 1518 glsym_glXBindTexImage = NULL;
1504 glsym_glXReleaseTexImage = NULL; 1519 glsym_glXReleaseTexImage = NULL;
1505 } 1520 }
1506 if (!strstr(str, "GLX_SGI_video_sync")) 1521 if (!strstr(tmpstr, "GLX_SGI_video_sync"))
1507 { 1522 {
1508 glsym_glXGetVideoSync = NULL; 1523 glsym_glXGetVideoSync = NULL;
1509 glsym_glXWaitVideoSync = NULL; 1524 glsym_glXWaitVideoSync = NULL;
1510 } 1525 }
1511 if (!strstr(str, "GLX_EXT_buffer_age")) 1526 if (!strstr(tmpstr, "GLX_EXT_buffer_age"))
1512 { 1527 {
1513 extn_have_buffer_age = 0; 1528 extn_have_buffer_age = 0;
1514 } 1529 }
1515 if (!strstr(str, "GLX_EXT_swap_control")) 1530 if (!strstr(tmpstr, "GLX_EXT_swap_control"))
1516 { 1531 {
1517 glsym_glXSwapIntervalEXT = NULL; 1532 glsym_glXSwapIntervalEXT = NULL;
1518 } 1533 }
1519 if (!strstr(str, "GLX_SGI_swap_control")) 1534 if (!strstr(tmpstr, "GLX_SGI_swap_control"))
1520 { 1535 {
1521 glsym_glXSwapIntervalSGI = NULL; 1536 glsym_glXSwapIntervalSGI = NULL;
1522 } 1537 }
1523 if (!strstr(str, "GLX_MESA_release_buffers")) 1538 if (!strstr(tmpstr, "GLX_MESA_release_buffers"))
1524 { 1539 {
1525 glsym_glXReleaseBuffersMESA = NULL; 1540 glsym_glXReleaseBuffersMESA = NULL;
1526 } 1541 }
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
157# define GLX_BACK_BUFFER_AGE_EXT 0x20f4 157# define GLX_BACK_BUFFER_AGE_EXT 0x20f4
158#endif 158#endif
159 159
160extern int (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d); 160extern void (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d);
161extern void (*glsym_glXSwapIntervalEXT) (Display *s, GLXDrawable b, int c); 161extern void (*glsym_glXSwapIntervalEXT) (Display *s, GLXDrawable b, int c);
162extern int (*glsym_glXSwapIntervalSGI) (int a); 162extern int (*glsym_glXSwapIntervalSGI) (int a);
163extern int (*glsym_glXGetVideoSync) (unsigned int *a); 163extern 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)
1439 unsigned int age = 0; 1439 unsigned int age = 0;
1440 1440
1441 if (glsym_glXQueryDrawable) 1441 if (glsym_glXQueryDrawable)
1442 { 1442 glsym_glXQueryDrawable(ob->disp, ob->glxwin,
1443 if (glsym_glXQueryDrawable(ob->disp, ob->glxwin, 1443 GLX_BACK_BUFFER_AGE_EXT, &age);
1444 GLX_BACK_BUFFER_AGE_EXT, &age) < 1)
1445 age = 0;
1446 }
1447#endif 1444#endif
1448 measure(1, "query age"); 1445 measure(1, "query age");
1449 if (age == 1) swap_mode = MODE_COPY; 1446 if (age == 1) swap_mode = MODE_COPY;