summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-03-26 20:31:27 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-03-26 20:31:27 +0000
commitcf6b3667c3649a232fff829cc7aa35ade37f05dd (patch)
tree13df216a9c50455ae0533859f35ae26d7466e65e /src/modules/evas/engines
parent80140f7724f3fd2b1497a783d7b1078a8cda94fe (diff)
downloadefl-cf6b3667c3649a232fff829cc7aa35ade37f05dd.tar.gz
evas - gl add export for getting dmabuf formats and modifiers
we need this to do formats and modifiers properly... and this is what broke on the rpi4 - it started using interesting formats etc. ... new feature to support a bug fix in e @feat
Diffstat (limited to 'src/modules/evas/engines')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext.c18
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h19
2 files changed, 37 insertions, 0 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 11e76eed8b..1d47f98214 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
@@ -414,6 +414,24 @@ _evgl_evasglQueryWaylandBuffer(Evas_GL *evas_gl,
return EXT_FUNC_EGL(eglQueryWaylandBufferWL)(dpy, buffer, attribute, value);
}
+static Eina_Bool
+_evgl_evasglQueryDmaBufFormats(Evas_GL *evas_gl,
+ int max_formats, int *formats, int *num_formats)
+{
+ EGLDisplay dpy = EGLDISPLAY_GET(evas_gl);
+ if (!dpy) return EINA_FALSE;
+ return EXT_FUNC_EGL(eglQueryDmaBufFormatsEXT)(dpy, max_formats, formats, num_formats);
+}
+
+static Eina_Bool
+_evgl_evasglQueryDmaBufModifiers(Evas_GL *evas_gl,
+ int format, int max_modifiers, uint64_t *modifiers, Eina_Bool *external_only, int *num_modifiers)
+{
+ EGLDisplay dpy = EGLDISPLAY_GET(evas_gl);
+ if (!dpy) return EINA_FALSE;
+ return EXT_FUNC_EGL(eglQueryDmaBufModifiersEXT)(dpy, format, max_modifiers, modifiers, external_only, num_modifiers);
+}
+
#else
#endif
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 581dd6c3b3..3a5afcbdfc 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
@@ -1675,6 +1675,25 @@ _EVASGL_EXT_BEGIN(EGL_WL_bind_wayland_display)
_EVASGL_EXT_END()
+_EVASGL_EXT_BEGIN(EGL_EXT_image_dma_buf_import_modifiers)
+
+ _EVASGL_EXT_DRVNAME(EGL_EXT_image_dma_buf_import_modifiers)
+
+ _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(EGLBoolean, eglQueryDmaBufFormatsEXT, (EGLDisplay dpy, int max_formats, int *formats, int *num_formats), (dpy, max_formats, formats, num_formats))
+ _EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("eglQueryDmaBufFormatsEXT")
+ _EVASGL_EXT_FUNCTION_PRIVATE_END()
+ _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(EGLBoolean, eglQueryDmaBufModifiersEXT, (EGLDisplay dpy, int format, int max_modifiers, uint64_t *modifiers, Eina_Bool *external_only, int *num_modifiers), (dpy, format, max_modifiers, modifiers, external_only, num_modifiers))
+ _EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("eglQueryDmaBufModifiersEXT")
+ _EVASGL_EXT_FUNCTION_PRIVATE_END()
+
+ _EVASGL_EXT_FUNCTION_BEGIN(Eina_Bool, evasglQueryDmaBufFormats, (Evas_GL *evas_gl, int max_formats, int *formats, int *num_formats), (evas_gl, max_formats, formats, num_formats))
+ _EVASGL_EXT_FUNCTION_DRVFUNC(_evgl_evasglQueryDmaBufFormats)
+ _EVASGL_EXT_FUNCTION_END()
+ _EVASGL_EXT_FUNCTION_BEGIN(Eina_Bool, evasglQueryDmaBufModifiers, (Evas_GL *evas_gl, int format, int max_modifiers, uint64_t *modifiers, Eina_Bool *external_only, int *num_modifiers), (evas_gl, format, max_modifiers, modifiers, external_only, num_modifiers))
+ _EVASGL_EXT_FUNCTION_DRVFUNC(_evgl_evasglQueryDmaBufModifiers)
+ _EVASGL_EXT_FUNCTION_END()
+_EVASGL_EXT_END()
+
#if 0
_EVASGL_EXT_BEGIN(EGL_SEC_map_image)