[Mesa-dev] Mesa llvmpipe for WebGL software rendering

Fredrik Höglund fredrik at kde.org
Sat Mar 3 10:51:03 PST 2012

On Tuesday 28 February 2012, Eric Anholt wrote:
> On Tue, 28 Feb 2012 09:08:39 -0800 (PST), Benoit Jacob <bjacob at mozilla.com> wrote:
> >  1. Is it possible for the application to choose between Mesa renderers? Ideally I would like to be able to evaluate the driver blacklist, and depending on that, use either the default renderer or Mesa llvmpipe. Is that possible?
> > 
> >  2. Related question: are you planning to update OSMesa, base it on
> >  llvmpipe? Last I checked, OSMesa was based on swrast from an old Mesa
> >  version. An updated OSMesa would offer a great solution to question
> >  1.
> I'd rather see us create a software-only EGL platform.  It seems like it
> ought to be easier to maintain than the special OSMesa system that
> developers other than Brian Paul break, and provides a better-known API
> for interacting with the window system.  That also solves 1) by giving
> you an option at context setup, I think.

Mesa already has this in 8.0.  The EGL platform is called "null", and it uses
llvmpipe as its renderer.

In order to use it you have to set the EGL_PLATFORM environment variable
to "null", and pass EGL_DEFAULT_DISPLAY to eglGetDisplay().

There are no native windows or pixmaps, so you have to render to a pbuffer
surface or a framebuffer object.

Ideally there would be a better way to specify the platform at runtime, but
this is complicated by the fact that EGL wasn't designed around the idea
that the OS has multiple platforms to choose from.

Also note that rendering to a framebuffer object won't work unless you
have commit 5a70e12f.


More information about the mesa-dev mailing list