[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: ideas to potentially share some effort
From:       Martin =?iso-8859-1?q?Gr=E4=DFlin?= <kde () martin-graesslin ! com>
Date:       2010-12-14 18:48:10
Message-ID: 201012141948.18084.kde () martin-graesslin ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Tuesday 14 December 2010 09:28:04 Benoit Jacob wrote:
> Hi,
Hi Benoit,

thanks for getting in contact with us.
> 
> There seems to be a bit of overlap between what you've been doing in
> KWin, and what we've been doing in Mozilla to accelerate compositing
> on OpenGL and OpenGL ES.
With your thread on kde-devel in mind, I doubt that Mozilla and KWin have much 
in common with regards to OpenGL. KWin is a very primitive compositor. Our 
pain point is the (on some drivers) slow texture from pixmap, which is 
completely irrelevant to the needs of Mozilla. As soon as we have the texture 
it's just a simple "getting the texture to the right screen coords". Our 
effects are not as hardware accelerated as it might seem. E.g. wobbly window 
is completely done on CPU - the GPU part is only simple texture mapping.
> 
> 1. What I'd like to get from you
> 
> Do you have a good device / driver blacklist/whitelist ?
No we don't have a blacklist or 4.5 would not have been so painful. We 
nowadays have a platform detection [1] which could be of help for you.
> We're
> currently not enabling hardware acceleration by default in Firefox 4
> on X11 because we're scared of the status of drivers (and being a
> browser, we shouldn't risk crashing).
I'd recommend to just enable it by default. The crashes and problems in the 
driver stack will never get fixed if apps don't demand the functionality. 
Firefox 4 will go into the next distro round which will require more OpenGL 
functionality. Both GNOME Shell and Unity depend on OpenGL. So at least Ubuntu 
and Fedora will need it. In general it's not your problem at all. It's the 
task of the distribution to bundle the software in a way that it works. They 
have to ensure that the drivers are not broken!
> Having a good
> blacklist/whitelist would allow us to turn opengl features on at least
> certain X11 setups.
If you want to go the easy way, enable for NVIDIA, disable for anything else. 
Though that's not nice from an OpenSource developer point of view.
> 
> 2. What you might be interested in from us
> 
> a. Maybe I'm a bit late with this, but we have a good OpenGL / OpenGL
> ES context abstraction layer, allowing to write code that will run
> either way: see the GL... files in this directory:
> http://hg.mozilla.org/mozilla-central/file/66036625795f/gfx/thebes
Our code is written in a way that it runs on both OpenGL and XRender. So yes 
it's too late ;-) Our GL is very tainted to our needs, so most of what I found 
in the headers is not required by us.
> 
> b. We have implemented a 'OpenGL debug mode' that helps a lot with
> debugging GL code. It catches such errors as
> gl-function-called-on-wrong-gl-context, forgot-to-call-glFlush, etc.
> It turns OpenGL into a synchronous API by calling glFinish after every
> GL call, making stack traces actually significant in case of crashes.
> It allows to trace GL calls and GL errors. See GLContext.* files in
> above directory, especially BeforeGLCall() and AfterGLCall() in
> GLContext.h.
Interesting, but again I don't think it's of much use for us as we have just 
one context and do exactly one flush per painted frame. Please keep in mind 
that you are changing the environment when doing these debug calls. It's not 
the same any more and you can easily start to investigate time in the wrong 
parts of the engine.

Cheers
Martin

[1]: 
http://websvn.kde.org/*checkout*/trunk/KDE/kdebase/workspace/kwin/lib/kwinglplatform.h
> 
> c. In case you're interested, our compositing engine resides there:
> http://hg.mozilla.org/mozilla-central/file/66036625795f/gfx/layers
> with the OpenGL (ES) back-end there:
> http://hg.mozilla.org/mozilla-central/file/66036625795f/gfx/layers/opengl
> 
> Cheers
> Benoit
> _______________________________________________
> kwin mailing list
> kwin@kde.org
> https://mail.kde.org/mailman/listinfo/kwin

["signature.asc" (application/pgp-signature)]

_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic