summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-27 20:08:10 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-27 20:50:47 +0900
commit9be96f4b96f7f500c8047ca41f0c8b8aa6014e8e (patch)
tree25bb32a85f9b0b64df68577e217cdf0b61a475cf
parenteaefb7c04755fcab73f5867f8fe25b0007c7e90c (diff)
Evas GL: Advertise support for npot on desktop
The extension name is GL_ARB_texture_non_power_of_two for desktop GL, but GL_OES_texture_npot for GLES. We will consider the extensions compatible, I believe the GLES version is a subset of the desktop one. Not sure if that's 100% true.
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext.c14
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext.h4
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h10
3 files changed, 22 insertions, 6 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
index 5aaa085..a79efdd 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
@@ -23,6 +23,7 @@ char _gl_ext_string_official[MAX_EXTENSION_STRING_BUFFER] = { 0 };
23#define _EVASGL_EXT_BEGIN(name) 23#define _EVASGL_EXT_BEGIN(name)
24#define _EVASGL_EXT_END() 24#define _EVASGL_EXT_END()
25#define _EVASGL_EXT_DRVNAME(name) 25#define _EVASGL_EXT_DRVNAME(name)
26#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
26#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) ret (*glextsym_##name) param = NULL; 27#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) ret (*glextsym_##name) param = NULL;
27#define _EVASGL_EXT_FUNCTION_END() 28#define _EVASGL_EXT_FUNCTION_END()
28#define _EVASGL_EXT_FUNCTION_DRVFUNC(name) 29#define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -35,6 +36,7 @@ char _gl_ext_string_official[MAX_EXTENSION_STRING_BUFFER] = { 0 };
35#undef _EVASGL_EXT_BEGIN 36#undef _EVASGL_EXT_BEGIN
36#undef _EVASGL_EXT_END 37#undef _EVASGL_EXT_END
37#undef _EVASGL_EXT_DRVNAME 38#undef _EVASGL_EXT_DRVNAME
39#undef _EVASGL_EXT_DRVNAME_DESKTOP
38#undef _EVASGL_EXT_FUNCTION_BEGIN 40#undef _EVASGL_EXT_FUNCTION_BEGIN
39#undef _EVASGL_EXT_FUNCTION_END 41#undef _EVASGL_EXT_FUNCTION_END
40#undef _EVASGL_EXT_FUNCTION_DRVFUNC 42#undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -49,6 +51,7 @@ char _gl_ext_string_official[MAX_EXTENSION_STRING_BUFFER] = { 0 };
49#define _EVASGL_EXT_BEGIN(name) int _gl_ext_support_##name = 0; 51#define _EVASGL_EXT_BEGIN(name) int _gl_ext_support_##name = 0;
50#define _EVASGL_EXT_END() 52#define _EVASGL_EXT_END()
51#define _EVASGL_EXT_DRVNAME(name) 53#define _EVASGL_EXT_DRVNAME(name)
54#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
52#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) 55#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param)
53#define _EVASGL_EXT_FUNCTION_END() 56#define _EVASGL_EXT_FUNCTION_END()
54#define _EVASGL_EXT_FUNCTION_DRVFUNC(name) 57#define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -61,6 +64,7 @@ char _gl_ext_string_official[MAX_EXTENSION_STRING_BUFFER] = { 0 };
61#undef _EVASGL_EXT_BEGIN 64#undef _EVASGL_EXT_BEGIN
62#undef _EVASGL_EXT_END 65#undef _EVASGL_EXT_END
63#undef _EVASGL_EXT_DRVNAME 66#undef _EVASGL_EXT_DRVNAME
67#undef _EVASGL_EXT_DRVNAME_DESKTOP
64#undef _EVASGL_EXT_FUNCTION_BEGIN 68#undef _EVASGL_EXT_FUNCTION_BEGIN
65#undef _EVASGL_EXT_FUNCTION_END 69#undef _EVASGL_EXT_FUNCTION_END
66#undef _EVASGL_EXT_FUNCTION_DRVFUNC 70#undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -316,6 +320,9 @@ re->info->info.screen);
316#define _EVASGL_EXT_DRVNAME(name) \ 320#define _EVASGL_EXT_DRVNAME(name) \
317 if (_EVASGL_EXT_CHECK_SUPPORT(#name)) *ext_support = 1; 321 if (_EVASGL_EXT_CHECK_SUPPORT(#name)) *ext_support = 1;
318 322
323#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname) \
324 if (_EVASGL_EXT_CHECK_SUPPORT(deskname)) *ext_support = 1;
325
319#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \ 326#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \
320 { \ 327 { \
321 ret (**drvfunc)param = &glextsym_##name; 328 ret (**drvfunc)param = &glextsym_##name;
@@ -350,6 +357,7 @@ re->info->info.screen);
350#undef _EVASGL_EXT_BEGIN 357#undef _EVASGL_EXT_BEGIN
351#undef _EVASGL_EXT_END 358#undef _EVASGL_EXT_END
352#undef _EVASGL_EXT_DRVNAME 359#undef _EVASGL_EXT_DRVNAME
360#undef _EVASGL_EXT_DRVNAME_DESKTOP
353#undef _EVASGL_EXT_FUNCTION_BEGIN 361#undef _EVASGL_EXT_FUNCTION_BEGIN
354#undef _EVASGL_EXT_FUNCTION_END 362#undef _EVASGL_EXT_FUNCTION_END
355#undef _EVASGL_EXT_FUNCTION_DRVFUNC 363#undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -373,6 +381,7 @@ re->info->info.screen);
373 strcat(_gl_ext_string, #name" "); \ 381 strcat(_gl_ext_string, #name" "); \
374 strcat(_gl_ext_string_official, #name" "); \ 382 strcat(_gl_ext_string_official, #name" "); \
375 } 383 }
384#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
376#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) 385#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param)
377#define _EVASGL_EXT_FUNCTION_END() 386#define _EVASGL_EXT_FUNCTION_END()
378#define _EVASGL_EXT_FUNCTION_DRVFUNC(name) 387#define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -385,6 +394,7 @@ re->info->info.screen);
385#undef _EVASGL_EXT_BEGIN 394#undef _EVASGL_EXT_BEGIN
386#undef _EVASGL_EXT_END 395#undef _EVASGL_EXT_END
387#undef _EVASGL_EXT_DRVNAME 396#undef _EVASGL_EXT_DRVNAME
397#undef _EVASGL_EXT_DRVNAME_DESKTOP
388#undef _EVASGL_EXT_FUNCTION_BEGIN 398#undef _EVASGL_EXT_FUNCTION_BEGIN
389#undef _EVASGL_EXT_FUNCTION_END 399#undef _EVASGL_EXT_FUNCTION_END
390#undef _EVASGL_EXT_FUNCTION_DRVFUNC 400#undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -417,6 +427,7 @@ evgl_api_ext_get(Evas_GL_API *gl_funcs)
417#define _EVASGL_EXT_END() \ 427#define _EVASGL_EXT_END() \
418 } 428 }
419#define _EVASGL_EXT_DRVNAME(name) 429#define _EVASGL_EXT_DRVNAME(name)
430#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
420#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \ 431#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \
421 ORD(name); 432 ORD(name);
422#define _EVASGL_EXT_FUNCTION_END() 433#define _EVASGL_EXT_FUNCTION_END()
@@ -436,6 +447,7 @@ evgl_api_ext_get(Evas_GL_API *gl_funcs)
436#undef _EVASGL_EXT_BEGIN 447#undef _EVASGL_EXT_BEGIN
437#undef _EVASGL_EXT_END 448#undef _EVASGL_EXT_END
438#undef _EVASGL_EXT_DRVNAME 449#undef _EVASGL_EXT_DRVNAME
450#undef _EVASGL_EXT_DRVNAME_DESKTOP
439#undef _EVASGL_EXT_FUNCTION_BEGIN 451#undef _EVASGL_EXT_FUNCTION_BEGIN
440#undef _EVASGL_EXT_FUNCTION_END 452#undef _EVASGL_EXT_FUNCTION_END
441#undef _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN 453#undef _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN
@@ -469,6 +481,7 @@ evgl_api_gles1_ext_get(Evas_GL_API *gl_funcs)
469#define _EVASGL_EXT_END() \ 481#define _EVASGL_EXT_END() \
470 } 482 }
471#define _EVASGL_EXT_DRVNAME(name) 483#define _EVASGL_EXT_DRVNAME(name)
484#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
472#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \ 485#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \
473 ORD(name); 486 ORD(name);
474#define _EVASGL_EXT_FUNCTION_END() 487#define _EVASGL_EXT_FUNCTION_END()
@@ -487,6 +500,7 @@ evgl_api_gles1_ext_get(Evas_GL_API *gl_funcs)
487#undef _EVASGL_EXT_BEGIN 500#undef _EVASGL_EXT_BEGIN
488#undef _EVASGL_EXT_END 501#undef _EVASGL_EXT_END
489#undef _EVASGL_EXT_DRVNAME 502#undef _EVASGL_EXT_DRVNAME
503#undef _EVASGL_EXT_DRVNAME_DESKTOP
490#undef _EVASGL_EXT_FUNCTION_BEGIN 504#undef _EVASGL_EXT_FUNCTION_BEGIN
491#undef _EVASGL_EXT_FUNCTION_END 505#undef _EVASGL_EXT_FUNCTION_END
492#undef _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN 506#undef _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext.h b/src/modules/evas/engines/gl_common/evas_gl_api_ext.h
index 91c2358..357edc9 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext.h
@@ -24,6 +24,7 @@
24#define _EVASGL_EXT_BEGIN(name) 24#define _EVASGL_EXT_BEGIN(name)
25#define _EVASGL_EXT_END() 25#define _EVASGL_EXT_END()
26#define _EVASGL_EXT_DRVNAME(name) 26#define _EVASGL_EXT_DRVNAME(name)
27#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
27#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) extern ret (*glextsym_##name) param; 28#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) extern ret (*glextsym_##name) param;
28#define _EVASGL_EXT_FUNCTION_END() 29#define _EVASGL_EXT_FUNCTION_END()
29#define _EVASGL_EXT_FUNCTION_DRVFUNC(name) 30#define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -36,6 +37,7 @@
36#undef _EVASGL_EXT_BEGIN 37#undef _EVASGL_EXT_BEGIN
37#undef _EVASGL_EXT_END 38#undef _EVASGL_EXT_END
38#undef _EVASGL_EXT_DRVNAME 39#undef _EVASGL_EXT_DRVNAME
40#undef _EVASGL_EXT_DRVNAME_DESKTOP
39#undef _EVASGL_EXT_FUNCTION_BEGIN 41#undef _EVASGL_EXT_FUNCTION_BEGIN
40#undef _EVASGL_EXT_FUNCTION_END 42#undef _EVASGL_EXT_FUNCTION_END
41#undef _EVASGL_EXT_FUNCTION_DRVFUNC 43#undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -52,6 +54,7 @@
52#define _EVASGL_EXT_BEGIN(name) extern int _gl_ext_support_##name; 54#define _EVASGL_EXT_BEGIN(name) extern int _gl_ext_support_##name;
53#define _EVASGL_EXT_END() 55#define _EVASGL_EXT_END()
54#define _EVASGL_EXT_DRVNAME(name) 56#define _EVASGL_EXT_DRVNAME(name)
57#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
55#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) 58#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param)
56#define _EVASGL_EXT_FUNCTION_END() 59#define _EVASGL_EXT_FUNCTION_END()
57#define _EVASGL_EXT_FUNCTION_DRVFUNC(name) 60#define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -64,6 +67,7 @@
64#undef _EVASGL_EXT_BEGIN 67#undef _EVASGL_EXT_BEGIN
65#undef _EVASGL_EXT_END 68#undef _EVASGL_EXT_END
66#undef _EVASGL_EXT_DRVNAME 69#undef _EVASGL_EXT_DRVNAME
70#undef _EVASGL_EXT_DRVNAME_DESKTOP
67#undef _EVASGL_EXT_FUNCTION_BEGIN 71#undef _EVASGL_EXT_FUNCTION_BEGIN
68#undef _EVASGL_EXT_FUNCTION_END 72#undef _EVASGL_EXT_FUNCTION_END
69#undef _EVASGL_EXT_FUNCTION_DRVFUNC 73#undef _EVASGL_EXT_FUNCTION_DRVFUNC
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
index 0f518ed..135ce74 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
@@ -14,6 +14,7 @@
14 14
15// Driver extensions to wrap (name : SPEC extension name) 15// Driver extensions to wrap (name : SPEC extension name)
16#define _EVASGL_EXT_DRVNAME(name) 16#define _EVASGL_EXT_DRVNAME(name)
17#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
17 18
18// These functions will be exported to 'EVAS extension function'. 19// These functions will be exported to 'EVAS extension function'.
19// The functions of this block must correspond with the functions list in Evas_GL.h. 20// The functions of this block must correspond with the functions list in Evas_GL.h.
@@ -375,12 +376,9 @@ _EVASGL_EXT_BEGIN(texture_half_float_linear)
375 _EVASGL_EXT_DRVNAME(GL_OES_texture_half_float_linear) 376 _EVASGL_EXT_DRVNAME(GL_OES_texture_half_float_linear)
376_EVASGL_EXT_END() 377_EVASGL_EXT_END()
377 378
378_EVASGL_EXT_BEGIN(texture_npot) // Desktop differs 379_EVASGL_EXT_BEGIN(texture_npot)
379 _EVASGL_EXT_DRVNAME(GL_OES_texture_npot) 380 _EVASGL_EXT_DRVNAME(GL_OES_texture_npot)
380_EVASGL_EXT_END() 381 _EVASGL_EXT_DRVNAME_DESKTOP("GL_ARB_texture_non_power_of_two")
381
382_EVASGL_EXT_BEGIN(texture_npot_DESKTOP) // Desktop differs
383 _EVASGL_EXT_DRVNAME(GL_OES_texture_npot)
384_EVASGL_EXT_END() 382_EVASGL_EXT_END()
385 383
386_EVASGL_EXT_BEGIN(vertex_half_float) // Desktop differs 384_EVASGL_EXT_BEGIN(vertex_half_float) // Desktop differs