[waffle] Waffle GBM support

Chad Versace chad.versace at linux.intel.com
Tue Oct 15 10:14:42 PDT 2013


On 10/12/2013 12:28 PM, Barracuda wrote:
> Hi!
> I have some trouble getting GBM Waffle backend to work. I'm trying gl_basic example from sources. I start it from VT (X isn't running) as "./gl_basic --platform=gbm --api=gl", it runs OK and says "gl_basic: run was successful", however, NOTHING happens - no mode switch, no drawing - nothing. But in X it works fine (with --platform=x11_egl and --platform=glx).
> I'm using version 1.3.0 on: Gentoo x86_64, Intel HD3000 (i915 driver), Mesa 9.1.6, support up to OpenGL 3.1 and EGL 1.4.
> If you need more info, I'll provide, just say what.

That behavior is expected. Waffle does create the gbm_surface and render into it, but it does not post it to the screen. 
To display the GBM buffer, it's necessary to use the KMS (kernel mode-setting) APIs. I've never done that
myself, but you can discover how by reading src/compositor-drm.c in the Weston source. Of course, to use KMS on the 
gbm_bo, it's necessary to extract the gbm_surface from the waffle_window with waffle_window_get_native().

The reason Waffle doesn't display the gbm buffers is two-fold. (1) Waffle provides a mechanism to render into
gbm buffers that is unified with the mechanism with rendering into GLX, Wayland, and other buffers, but Waffle
doesn't dictate how you should use that buffer. The user may not want to display the gbm buffer, and Waffle
should support that use case. (In fact, among my co-workers, that's exactly our use-case. We normally do not
want to display the gbm buffers). (2) If Waffle did the KMS for the user, there is high likelihood that it would
do not do it the way the user wanted.


More information about the waffle mailing list