[Mesa-dev] Haiku using the Wayland state_tracker?

Pekka Paalanen ppaalanen at gmail.com
Wed Mar 27 00:37:22 PDT 2013


On Tue, 26 Mar 2013 16:47:15 -0500
Alexander von Gluck IV <kallisti5 at unixzen.com> wrote:

> I've been hitting several brick walls working on the Haiku GL stuff. 
> (mostly due to things being too complex for the time I have available)
> 
> Given all the recent publicity for Wayland, I decided to look into the 
> wl_shm stuff.  From my point of view wl_shm looks *extremely* simple.
> 
> Does anyone see any reason *not* to use the wayland state_tracker for 
> Haiku's GL rendering? The only possible down side I see is using EGL vs 
> OpenGL. (I admit I don't fully understand the pros and cons of EGL)

I'm not familiar with the "wayland state_tracker", so I can only
comment from the Wayland protocol perspective. I'm not sure what you
intend to do with wl_shm, either. Are you implementing Wayland
platform support?

If you are only ever going to have software rendered GL, then I guess
you might use wl_shm. If you have any reason to believe you might ever
want hardware accelerated GL, then wl_shm won't work. (Actually, you
probably want to choose between wl_shm and something else according to
your renderer. Maybe.)

wl_shm basically deals with mmappable files, i.e. directly
CPU-accessible memory. Buffers suitable for hardware rendering or
texturing are often not CPU-accessible, or extremely slow for that.
Conversely, CPU-accessible memory is often not usable for GPU, or is
slow. And you really don't want to have extra copies between CPU and
GPU memory, especially just for buffer passing.

Mesa contains another Wayland protocol interface used for hardware
accelerated graphics buffers: wl_drm.

Also, EGL vs. OpenGL is like comparing a bucket to paint. EGL is just
one form of a bucket, that can give you OpenGL as the paint. There are
other buckets, and other paints, and you cannot use a bucket as paint,
nor paint as a bucket. Probably I just didn't understand what you are
actually comparing here. (and sorry for a bad analogue :-p)

I have a blog post about Wayland, that is maybe not directly related to
your question, but might give some insight, I hope:
http://ppaalanen.blogspot.fi/2012/11/on-supporting-wayland-gl-clients-and.html


Thanks,
pq


More information about the mesa-dev mailing list