[Mesa-dev] KWin and Mesa
Martin Gräßlin
mgraesslin at kde.org
Wed Apr 20 16:25:33 PDT 2011
On Wed, 20 Apr 2011 10:42:18 -0400, Jerome Glisse <j.glisse at gmail.com>
wrote:
> Then why do you need hack ?
I assume you are talking about the code which got broken by the removal
of "GEM". This code is not actually in KWin itself but in an external
helper application to test whether direct rendering is possible or not
and to set LIBGL_ALWAYS_INDIRECT accordingly. Why this is out-of-process
is I hope obvious.
As the application blocks startup it needs to be fast. Because of that
it only links agsinst xlib and OpenGL and is kept as simple as possible.
I don't know why the check for "GEM" was added instead of using the DRI
protocol, but it is likely that it was due to lack of knowledge (at
least I did not know about it) or to not pull in another library (which
at that time would not have been possible because it was after our
dependency freeze). Anyway I think it doesn't matter why the hack was
added. That is something that can happen and as we see it happens. If
you notice incorrect usage in our source code, please drop us a mail,
report a bug or ping us in IRC.
Cheers
Martin
P.S.
> To me it seems you are trying to enable
> feature just on some specific driver version, that's wrong, my point
> is define what mesa you want, then from that deduce the feature set
> that is safe to use then from that define what are the default
> feature, absolutely no hack in code needed here and you can still
> provide option for people to enable new feature if they want to try
> them with their driver.
Just out of interest: do you expect that everybody using OpenGL on
Linux knows about what you wrote here? I wouldn't be surprised if such
hacks as in KWin are quite common. As you changed the renderer string
for Mesa 7.11 anyway, why not add a "DONT PARSE THIS INFORMATION" to it?
More information about the mesa-dev
mailing list