[PATCH] weston: Don't ask for EGL depth buffer if not needed
spitzak at gmail.com
Wed Mar 21 14:41:52 PDT 2012
Kristian Hoegsberg wrote:
> On Sat, Mar 17, 2012 at 01:43:52PM -0700, Bill Spitzak wrote:
>> This makes the compositor and demo clients work on the current
>> nouveau nvfx driver. Obviously does not fix any clients that
>> actually want a depth buffer, but this does allow more people to at
>> least try wayland.
> Ok, yeah, that's a good point. It's probably a bug in nouveau that it
> doesn't work when we ask for a depth buffer, but of course, if we
> don't need a depth buffer we shouldn't ask for one. I applied the
> patch, except for the window.c part. The gears client does actually
> need a depth buffer. We would need some way to tell init_egl in
> window.c whether or not to ask for a depth buffer, so we could do that
> only in case of gears.c.
I don't like the idea of complicating the api just because of a bug.
Also, strangely enough, there actually *is* a depth buffer on the
resulting window, because z compositing works. In fact in my experience,
on all modern hardware you always get color, alpha, and depth buffers no
matter what you ask for. Makes sense to avoid circuitry for situations
that are rarely used.
I would like to try a simple fix, with a comment in the code to say it
is to work around a nouveau bug. This is to ask for the depth buffer,
but if that fails to try again without it. Eventually this can be
removed when they fix the driver.
PS: I have not heard anything about my changes to wayland (there are 5
patches). One of them fixed a major bug for me. I believe my EAGAIN
changes are a mistake and should be ignored, but the other changes are
still legit imho. Sorry also that I submitted the patches multiple times
in different arrangements. You should look at the *last* patches I
submitted (the ones in a range 1/5) and ignore the earlier ones.
More information about the wayland-devel