[Bug 782923] gl: Add Mesa3D GBM backend
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Fri Mar 2 16:30:35 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=782923
Daniel Stone <daniel at fooishbar.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel at fooishbar.org
--- Comment #22 from Daniel Stone <daniel at fooishbar.org> ---
Sorry for chiming in so late here.
Firstly, get_{depth,bpp}_from_format are wrong. There is a very very small and
fixed depth/bpp -> format mapping inside the kernel, which is pretty much:
* 8/8 -> C8
* 15/16 -> XRGB1555
* 16/16 -> RGB565
* 24/24 -> RGB888
* 24/32 -> XRGB8888
* 30/32 -> XRGB2101010
* 32/32 -> ARGB8888
Anything else will silently be assumed to be XRGB8888.
So you should delete all but those formats, but _also_ preferentially use
drmModeAddFB2, for which you can just pass a format directly. (GBM_FORMAT_* ==
DRM_FORMAT_*, so no need to add a mapping; you can rely on this and it is both
API and ABI guaranteed.) Then you can just use drmModeAddFB as a fallback for
the above formats only.
You can also delete the GBM_BO_FORMAT_* handling inside those two functions, as
gbm_bo_get_format() only ever returns GBM_FORMAT_* enums. Very intuitive, I
know.
I don't quite follow what the comment in
gst_gl_window_gbm_egl_set_window_handle() means (wrt external objects and DRM
pageflips), but I'm happy to try to answer if you can elaborate.
As a final nitpick, GBM is not Mesa-specific: it's also implemented by the
Imagination, ARM, and Vivante proprietary drivers. Those tend to advertise
EGL_KHR_platform_gbm rather than EGL_MESA_platform_gbm in the extension string.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list