forked from enlightenment/efl
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
This commit is contained in:
parent
80140f7724
commit
cf6b3667c3
|
@ -5117,8 +5117,9 @@ typedef unsigned long long EvasGLTime;
|
||||||
* Version 4: [version 3] + GLES3.0 + GLES3.0 extensions
|
* Version 4: [version 3] + GLES3.0 + GLES3.0 extensions
|
||||||
* Version 5: [version 4] + GLES3.1
|
* Version 5: [version 4] + GLES3.1
|
||||||
* Version 6: [version 5] + GLES3.2
|
* Version 6: [version 5] + GLES3.2
|
||||||
|
* Version 7: [version 7] + query formats + modifiers
|
||||||
*/
|
*/
|
||||||
#define EVAS_GL_API_VERSION 6
|
#define EVAS_GL_API_VERSION 7
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The Evas GL API
|
* @brief The Evas GL API
|
||||||
|
@ -6106,6 +6107,25 @@ EvasGLImage *img = glapi->evasglCreateImageForContext
|
||||||
* new APIs here, please bump the struct version number (together with
|
* new APIs here, please bump the struct version number (together with
|
||||||
* the EFL version bump).
|
* the EFL version bump).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Evas GL Wayland functions
|
||||||
|
*
|
||||||
|
* Evas_GL_API version 7 or higher.
|
||||||
|
*
|
||||||
|
* @since 1.26
|
||||||
|
* @{ */
|
||||||
|
/**
|
||||||
|
* @anchor evasglQueryDmaBufFormats
|
||||||
|
* @brief Direct map to eglQueryDmaBufFormatsEXT
|
||||||
|
*/
|
||||||
|
Eina_Bool (*evasglQueryDmaBufFormats) (Evas_GL *evas_gl, int max_formats, int *formats, int *num_formats);
|
||||||
|
/**
|
||||||
|
* @anchor evasglQueryDmaBufModifiers
|
||||||
|
* @brief RDirect map to eglQueryDmaBufModifiersEXT
|
||||||
|
*/
|
||||||
|
Eina_Bool (*evasglQueryDmaBufModifiers) (Evas_GL *evas_gl, int format, int max_modifiers, uint64_t *modifiers, Eina_Bool *external_only, int *num_modifiers);
|
||||||
|
/** @} */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -414,6 +414,24 @@ _evgl_evasglQueryWaylandBuffer(Evas_GL *evas_gl,
|
||||||
return EXT_FUNC_EGL(eglQueryWaylandBufferWL)(dpy, buffer, attribute, value);
|
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
|
#else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1675,6 +1675,25 @@ _EVASGL_EXT_BEGIN(EGL_WL_bind_wayland_display)
|
||||||
|
|
||||||
_EVASGL_EXT_END()
|
_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
|
#if 0
|
||||||
_EVASGL_EXT_BEGIN(EGL_SEC_map_image)
|
_EVASGL_EXT_BEGIN(EGL_SEC_map_image)
|
||||||
|
|
Loading…
Reference in New Issue