wayland.md 5.0 KB

At XDC2014, Nvidia employee Andy Ritger proposed to enhance EGL in order to replace GBM.[68]

en particulier https://github.com/rawoul/v4l2-decode/blob/master/video.c#L1041 pour les formats

dma-buf and exporting from ION

dma-buf and wayland, EGL, rendering

https://github.com/geomatsi/drm_test/blob/master/drm_gl_test1a.c#L145 https://gist.github.com/dvdhrm/1364994

  • gbm buffer object <-> EGL image <-> GL renderbuffer

https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_pixmap.txt

other links found

Implementation

// 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);
    }

Available EGL extensions

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

Available wayland objects

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