On Tue, Mar 27, 2012 at 3:08 PM, Kristian Høgsberg <k...@bitplanet.net> wrote: > Hi, > > Here's a patch series from Ander to implement a new gbm feature: gbm > surface. The gbm library is useful for allocating surface for scanout > and rendering, but the application needs to create EGLImages for the > gbm bos and then renderbuffers and then render using an FBO. On top > of that, we have to rely on the (awkward) surfaceless extension to > make it all work. So gbm surface gives us a few things: > > 1) Independent from KMS. The API could be a lot simpler if we just > could say "EGL surface on this KMS crtc", we didn't want to tie it > to KMS for a few reasons: we need to be able to pageflip to gbm bos > from different sources (wayland clients); without the kms > integration we can do headless EGL; gbm is usable with OpenWF as > well; and finally, we may be able to implement the wayland egl > backend in terms of gbm surface, which will greatly simplify that. > > 2) Go through eglSwapBuffers as a end-of-frame indicator. This is > mainly to cover our back on architectures that require explicit > synchronization between multiple queues, or for deferred rendering > architectures that relies on eglSwapBuffers to trigger the actual > rendering. > > 3) Let the EGL implementation manage number of buffers (double or > triple buffer decision etc) > > 4) Provide a native window type for EGL on GBM. We avoid the > surfaceless extension. > > 5) Reduce boilerplate code for applications using GBM, EGL and KMS. > > Here's how the eglkms.c example looks converted to gbm surface. > > http://cgit.freedesktop.org/~krh/mesa-demos/diff/src/egl/opengl/eglkms.c?id=1c78c24366c24786eff3e08132754f7876539e57
Ooops, wrong link, try this one: http://cgit.freedesktop.org/~krh/mesa-demos/tree/src/egl/opengl/eglkms.c?h=gbm-surface Kristian _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev