At XDC2014, Nvidia employee Andy Ritger proposed to enhance EGL in order to replace GBM.[68]
https://lists.freedesktop.org/archives/mesa-commit/2012-January/035225.html
=> avec gbm_device_get_fd
, pas besoin de stocker le descripteur de fichier
gbm_device_get_backend_name
=> quel backend ?
gbm_device_is_format_supported
=> utiliser pour vérifier le format qu'on veut ?
https://jan.newmarch.name/Wayland/ProgrammingClient/#heading_toc_j_5
http://jylee-world.blogspot.com/2013/12/analyzing-simplest-wayland-clinet-test.html
wl_surface_set_user_data
?
https://groleo.wordpress.com/2012/07/24/ion-buffer-sharing-mechanism/
The android ION memory allocation https://lwn.net/Articles/480055/
https://dvdhrm.wordpress.com/2013/09/01/splitting-drm-and-kms-device-nodes/
gbm_bo_import
avec GBM_BO_IMPORT_FD
https://ppaalanen.blogspot.com/2012/03/what-does-egl-do-in-wayland-stack.html
https://github.com/msisov/chromium/commit/c11899c3e7e41d170b65024d3d712c264e586b75
en particulier https://github.com/rawoul/v4l2-decode/blob/master/video.c#L1041 pour les formats
https://www.mjmwired.net/kernel/Documentation/dma-buf-sharing.txt
https://bugzilla.gnome.org/attachment.cgi?id=331464&action=edit
https://github.com/robclark/libgbm/blob/master/gbm.h#L193
=> use GBM_BO_USE_SCANOUT
and GBM_BO_USE_RENDERING
https://forum.mqmaker.com/t/opengl-drm-direct-rendering-manager-examples/629 => full example OpenGL DRM
https://github.com/geomatsi/drm_test/blob/master/drm_gl_test1a.c#L145 https://gist.github.com/dvdhrm/1364994
https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_pixmap.txt
KHR_image_pixmap for gbm_bo -> EGL image
wl_drm_create_prime_buffer
https://cgit.freedesktop.org/wayland/weston/tree/libweston/compositor-drm.c#n1189
look at media/msm_vpu.h
https://bugaevc.gitbooks.io/writing-wayland-clients/content/black-square/global-objects.html
WAYLAND_DEBUG=1 so as to inspect gdm-buffer-backend
subsurfaces in wayland https://ppaalanen.blogspot.com/2013/11/sub-surfaces-now.html
use weston-info to get supported format and global objects (extensions)
https://ppaalanen.blogspot.com/2016/02/a-programmers-view-on-digital-images.html pixel format and digital images
// Prepare
if (vd->fmt.i_chroma == VLC_CODEC_FBX_OPAQUE)
{
struct gbm_devide gbm = sys->gbm.device;
struct gbm_import_fd_data import_fd =
{
.fd = picture->p_sys, // todo: extract fd
.width = width,
.height = height,
.stride = stride,
.format = GBM_FORMAT_YUV_420
};
struct gbm_bo *bo = gbm_bo_import(gbm, GBM_BO_IMPORT_FD, &import_fd, GBM_BO_USE_RENDERING);
//fixme map to wl
picture_Release(pic);
return;
}
else
{
struct wl_buffer *buf = pic->p_sys;
wl_buffer_set_user_data(buf, pic);
}
egl_wl gl debug: extensions: EGL_KHR_image EGL_KHR_image_base EGL_QCOM_create_image EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_KHR_lock_surface3 EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_renderbuffer_image EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_create_context_no_error EGL_KHR_get_all_proc_addresses EGL_QCOM_lock_image2 EGL_EXT_protected_content EGL_KHR_no_config_context EGL_EXT_image_dma_buf_import EGL_EXT_yuv_surface EGL_WL_bind_wayland_display EGL_WL_create_wayland_buffer_from_image
1) wl_compositor version 4 2) wl_subcompositor version 1 3) wp_viewporter version 1 4) wp_presentation version 1 5) wl_pll version 1 6) zwp_relative_pointer_manager_v1 version 1 7) zwp_pointer_constraints_v1 version 1 8) zwp_input_timestamps_manager_v1 version 1 9) wl_data_device_manager version 3 10) wl_shm version 1 11) wl_seat version 5 12) fbx_pointer version 1 13) fbx_text version 1 14) fbx_gamepad version 1 15) wayland_buffer_backend version 2 16) zwp_linux_dmabuf_v1 version 3 17) gbm_buffer_backend version 1 18) zfbx_hdr_info_v1 version 1 19) zxdg_shell_v6 version 1 20) xdg_shell version 1 21) wl_shell version 1 22) weston_screenshooter version 1 23) wl_hid_device version 1 24) wl_output version 3 25) wl_hid_device version 1