summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-10-24 22:56:51 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-14 10:43:00 +0900
commitd2aee4e5caf8765923ca5ff41676195a2fed3146 (patch)
tree1275ce9f2b79396e7e3a5d99dea5d5f119fc7105
parent56a64756eb727393092aacb0ce48429fab4a5591 (diff)
downloadefl-d2aee4e5caf8765923ca5ff41676195a2fed3146.tar.gz
Evas GL: Add support for some required extensions
- debug - debug_label - debug_marker
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext.c6
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h107
2 files changed, 108 insertions, 5 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 69175a67a9..e39224132c 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
@@ -325,8 +325,14 @@ re->info->info.screen);
} \
else evgl_safe_extension_add(name, NULL);
+#ifdef _EVASGL_EXT_FUNCTION_WHITELIST
+# undef _EVASGL_EXT_FUNCTION_WHITELIST
+#endif
+#define _EVASGL_EXT_FUNCTION_WHITELIST(name) evgl_safe_extension_add(name, NULL);
+
#include "evas_gl_api_ext_def.h"
+#undef _EVASGL_EXT_FUNCTION_WHITELIST
#undef _EVASGL_EXT_CHECK_SUPPORT
#undef _EVASGL_EXT_DISCARD_SUPPORT
#undef _EVASGL_EXT_BEGIN
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 637f2972af..3e48845027 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
@@ -51,6 +51,10 @@
# define _EVASGL_EXT_WHITELIST_ONLY 1
#endif
+#ifndef _EVASGL_EXT_FUNCTION_WHITELIST
+# define _EVASGL_EXT_FUNCTION_WHITELIST(name)
+#endif
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GL/GLES EXTENSIONS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1092,16 +1096,109 @@ _EVASGL_EXT_END()
#if _EVASGL_EXT_WHITELIST_ONLY
// TODO: Remove this function. Not actually supported. Just for debugging.
-_EVASGL_EXT_BEGIN(ARB_blend_func_extended)
- _EVASGL_EXT_DRVNAME(GL_ARB_blend_func_extended)
+_EVASGL_EXT_BEGIN(debug)
+_EVASGL_EXT_DRVNAME(GL_KHR_debug)
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glDebugMessageControl")
+_EVASGL_EXT_FUNCTION_WHITELIST("glDebugMessageControlKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glDebugMessageInsert")
+_EVASGL_EXT_FUNCTION_WHITELIST("glDebugMessageInsertKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glDebugMessageCallback")
+_EVASGL_EXT_FUNCTION_WHITELIST("glDebugMessageCallbackKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetDebugMessageLog")
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetDebugMessageLogKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetPointerv")
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetPointervKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glPushDebugGroup")
+_EVASGL_EXT_FUNCTION_WHITELIST("glPushDebugGroupKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glPopDebugGroup")
+_EVASGL_EXT_FUNCTION_WHITELIST("glPopDebugGroupKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glObjectLabel")
+_EVASGL_EXT_FUNCTION_WHITELIST("glObjectLabelKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetObjectLabel")
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetObjectLabelKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glObjectPtrLabel")
+_EVASGL_EXT_FUNCTION_WHITELIST("glObjectPtrLabelKHR")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetObjectPtrLabel")
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetObjectPtrLabelKHR")
+
+_EVASGL_EXT_END()
+
+
+_EVASGL_EXT_BEGIN(debug_label)
+_EVASGL_EXT_DRVNAME(GL_EXT_debug_label)
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glLabelObject")
+_EVASGL_EXT_FUNCTION_WHITELIST("glLabelObjectEXT")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetObjectLabel")
+_EVASGL_EXT_FUNCTION_WHITELIST("glGetObjectLabelEXT")
+
+_EVASGL_EXT_END()
+
+
+_EVASGL_EXT_BEGIN(debug_marker)
+_EVASGL_EXT_DRVNAME(GL_EXT_debug_marker)
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glInsertEventMarker")
+_EVASGL_EXT_FUNCTION_WHITELIST("glInsertEventMarkerEXT")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glPushGroupMarker")
+_EVASGL_EXT_FUNCTION_WHITELIST("glPushGroupMarkerEXT")
+
+_EVASGL_EXT_FUNCTION_WHITELIST("glPopGroupMarker")
+_EVASGL_EXT_FUNCTION_WHITELIST("glPopGroupMarkerEXT")
- _EVASGL_EXT_FUNCTION_BEGIN(int, glGetFragDataIndex, (uint program, const char * name))
- _EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("glGetFragDataIndex")
- _EVASGL_EXT_FUNCTION_END()
_EVASGL_EXT_END()
#endif // _EVASGL_EXT_WHITELIST_ONLY ("safe" extensions)
+#if 0
+// requested extensions
+/* GL_EXT_debug_marker */
+void (*glPushGroupMarkerEXT)(int len, const char* name);
+void (*glPopGroupMarkerEXT)();
+
+
+/* GL_QCOM_alpha_test */
+void (*glAlphaFuncQCOM)(GLenum func, GLfloat ref);
+
+
+/* GL_EXT_disjoint_timer_query */
+void (*glQueryCounterEXT)(GLuint target, GLuint id);
+void (*glGetQueryObjectui64vEXT)(GLuint id, GLuint pname, EvasGLuint64* params);
+
+
+/* GL_EXT_occlusion_query_boolean */
+void (*glGenQueriesEXT)(GLsizei n, GLuint* ids);
+void (*glDeleteQueriesEXT)(GLsizei n, const GLuint* ids);
+void (*glBeginQueryEXT) (GLenum target, GLuint id);
+void (*glEndQueryEXT) (GLenum target);
+void (*glGetQueryObjectuivEXT)(GLuint id, GLenum pname, GLuint* params);
+
+
+/* GL_NV_draw_buffers */
+void (*glDrawBuffersNV)(GLsizei n, const GLenum* bufs);
+
+
+/* GL_NV_read_buffer */
+void (*glReadBufferNV) (GLenum mode);
+
+
+/* GL_NV_framebuffer_blit */
+void (*glBlitFramebufferNV) (int srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////