Commit graph

68 commits

Author SHA1 Message Date
Martin Gräßlin
bb5dce0e3b Use KGlobal::config() instead of specifying kwinrc
Inside KWin we can just use the global configuration
instead of manually opening kwinrc which is just the
same.

REVIEW: 104754
2012-04-29 21:55:45 +02:00
Martin Gräßlin
fdd804bdf4 Remove GL context creation from CompositingPrefs
Whether creating the OpenGL context succeeds or not
had no influence in any decisions on the used settings
for OpenGL based compositing.

The only valid information CompositingPrefs still detects
is whether direct rendering should be used which is
performed out of process and does not require a context.

So overall the context creation is not needed and can
be removed.

REVIEW: 104778
2012-04-29 21:46:43 +02:00
Martin Gräßlin
2fc0b8074b Move detection of GLPlatform and printResults into Scene
This means the GLPlatform is filled with values from the
context actually used for Compositing and if XRender
compositing is used no OpenGL information is logged.
2012-04-29 21:44:35 +02:00
Martin Gräßlin
23708521c6 Make GLVSync a complete user controlled variable
There is no need to have it driver specific any more.
All drivers seem to support it (only Intel had been
opt-ed out without any apparent reason shown in commit log).

This was the last driver specific setting which means that
the method applyDriverSpecificSettings() got dropped from
CompositingPrefs.
2012-04-29 21:44:35 +02:00
Martin Gräßlin
bcbbf3c5a8 Drop recommendCompositing from CompositingPrefs
It's always true which means it's no longer needed.
2012-04-29 21:44:34 +02:00
Martin Gräßlin
d6540c8392 Remove strict binding from compositing prefs
Strict binding follows the driver (GLPlattform) unless
the user has a config value specified in the kwinrc.

For this a new property is added to Options to indicate
whether strict binding is user defined or follows the
driver. In case of driver the strict binding option is
set when OpenGL compositor starts up.
2012-04-29 21:44:34 +02:00
Philipp Knechtges
cd585972ae kwin: avoid SEGFAULT in case of egl_glx
The mesa egl_glx egl driver only provides indirect rendering which is
insufficient for GLES2.
2011-12-01 22:45:10 +01:00
Martin Gräßlin
987bc837d9 Remove define KWIN_HAVE_OPENGL_COMPOSITING
Due to changes in build system we have always either OpenGL or OpenGL ES.
This allows to remove the KWIN_HAVE_OPENGL_COMPOSITING define. In the
effects the define is kept as KWIN_HAVE_OPENGL which can be used in
future to build also an XRender only effect system.
2011-08-13 16:46:43 +02:00
Martin Gräßlin
b7d2b16b8d Remove define KWIN_HAVE_COMPOSITING
Building the workspaces requires to have all the build dependencies
which were required for KWIN_HAVE_COMPOSITING to be set. This allows
us to remove all the ifdefs for this and gives us a cleaner code.
2011-08-13 16:46:43 +02:00
Martin Gräßlin
5213c4aff6 Drop direct rendering setting
The advanced compositing option "direct rendering" could only
correctly be honored in the case of proprietary NVIDIA drivers.
In all other cases playing with the setting was most likely
harmful as it could result in inconsistent states and the
option not to be honored at all.

This patch resolves this issue by moving the detection whether
to use a direct rendering context completely into the hands of
 the set environment variables or the helper program:
* if LIBGL_ALWAYS_INDIRECT is set, we use an indirect context
* if KWIN_DIRECT_GL is set, we use a direct context
* if none of the two are set, we use the helper program, if it
  returns 0 we create a direct context, otherwise we set
  LIBGL_ALWAYS_INDIRECT and create an indirect context

If a user really wants to influence the behavior the
environment variables can be used.

REVIEW: 102074
2011-07-31 17:40:03 +02:00
Martin Gräßlin
c3cf4482a3 Move GLX detection from kwinglobals to CompositingPrefs
Removes the Extension::glxAvailable() from kwinglobals and
implements the functionality in CompositingPrefs, where it
is only needed. There used to be one additional check in
scene_opengl_glx.cpp which is moved into composite.cpp
before the OpenGL Scene is created.

REVIEW: 102002
2011-07-27 18:34:31 +02:00
Thomas Lübking
364ce6fbfc Allow the user to rearm OpenGLIsUnsafe KWIn autocrash protection
Also add a usable "doesn't work why" info and WARN! the user about clicking the rearm button.
Merge "OpenGLIsUnsafe" and "CheckIsSafe" config keys
Move the entire checking into CompositingPrefs

BUG:250865
FIXED-IN:4.7
2011-05-11 20:16:08 +02:00
Martin Gräßlin
0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Martin Gräßlin
1b70279664 Removing Xgl support from KWin.
Xgl has been removed from the X tree in 2008. It does not make sense
to still support it in KWin.
2011-01-30 14:24:48 +01:00
Martin Gräßlin
ea08ae0929 Fix rebasing failure 2011-01-30 14:12:03 +01:00
Martin Gräßlin
c24fa39acb CompositingPrefs work with EGL 2011-01-30 14:12:01 +01:00
Martin Gräßlin
e5932ff214 Make it compile again after rebasing on current trunk 2011-01-30 14:11:58 +01:00
Martin Gräßlin
aef6208fdc Fix compiling 2011-01-30 14:11:57 +01:00
Martin Gräßlin
0f0509cbd9 Make it compile with EGL 2011-01-30 14:11:56 +01:00
Andriy Rysin
0f2e500abd Allow kdelibs/kdebase compile without glu library (review 6213)
svn path=/trunk/KDE/kdebase/workspace/; revision=1209642
2010-12-27 19:12:37 +00:00
Fredrik Höglund
13eaca37f4 Remove the driver detection code from CompositingPrefs, and use
the new GLPlatform class instead.

This change also enables loose binding with the R600 drivers
when DRI2 is being used.

svn path=/trunk/KDE/kdebase/workspace/; revision=1203402
2010-12-03 21:13:43 +00:00
Martin Gräßlin
aa4e2c0c54 Print useful version information for nouveau.
Unknown, unknown just looks bad given that we will have more
nouveau users in future. Neither the vendor, nor the renderer
nor the version string contains a version number. The information
most close to a version number is the gallium number. Other
possible number would be OpenGL version or Mesa version in the
GL version string, but those information is not used in other
Mesa drivers.

svn path=/trunk/KDE/kdebase/workspace/; revision=1184526
2010-10-10 17:40:43 +00:00
Luboš Luňák
654995d6aa recent intel renderer strings are like
'Mesa DRI Intel(R) 965G GEM 20100328 2010Q1 x86/MMX/SSE2',
having one more field from the end - fix reading version
(bnc#605498)


svn path=/trunk/KDE/kdebase/workspace/; revision=1139202
2010-06-17 16:23:45 +00:00
Fredrik Höglund
bcd8d3f476 - Add an external helper program that initializes GLX and checks if kwin can
use direct rendering.
- Move the LIBGL_ALWAYS_INDIRECT code to CompositingPrefs::detect(), and use
  the external helper program to determine if the variable needs to be set.

svn path=/trunk/KDE/kdebase/workspace/; revision=1096554
2010-02-26 20:47:00 +00:00
Lucas Murray
fd47ff5332 Revert r1082246 as it needs to be done in CompositingPrefs::detect()
to work correctly but as doing it there defeats the purpose of moving
the code to begin with there's no point in moving it.
BUG: 226049

svn path=/trunk/KDE/kdebase/workspace/; revision=1088054
2010-02-10 02:53:33 +00:00
Lucas Murray
2a34e440f5 Change the location where LIBGL_ALWAYS_INDIRECT is set and add some
useful documentation about when it is used and why it is required.

svn path=/trunk/KDE/kdebase/workspace/; revision=1082246
2010-01-30 08:27:24 +00:00
Lucas Murray
8960c552d2 Remove OpenGL driver whitelist; Add protection against crashy glXQuery
functions and share the value with the KCM; Fallback to XRender
compositing if OpenGL fails to work correctly; Rearrange setting order
in options.h slightly and fix variable names

svn path=/trunk/KDE/kdebase/workspace/; revision=1079919
2010-01-25 10:02:08 +00:00
Luboš Luňák
7cef1eadd5 use recommendation from compositing prefs only if there's
no explicit choice (because of driver crashes)


svn path=/trunk/KDE/kdebase/workspace/; revision=1058248
2009-12-04 09:29:08 +00:00
Fredrik Höglund
37fbc26205 Enable OpenGL compositing by default with R600/R700 cards and Mesa 7.7+.
svn path=/trunk/KDE/kdebase/workspace/; revision=1058207
2009-12-04 08:58:54 +00:00
Sebastian Kügler
7d9155171d compositing detection for r300
I've had missing compositing since about a week on my ATI x1300.

After a bit of debugging with the help of fredrikh and mgraesslin, the version string reported seems to be the culprit. I've special-cased the different version string for the R300 driver and it works again now.

The strings my r300 reports are:

DRI R300 Project
Mesa DRI R300 (RV515 7149) 20090101 x86/MMX/SSE2 TCL
1.4 (1.5 Mesa 7.6)

reviewed by fredrikh

kwin people, please have another look, I don't want to break anybody else's setup...

CCMAIL:kwin@kde.org

svn path=/trunk/KDE/kdebase/workspace/; revision=1058156
2009-12-04 01:13:33 +00:00
Lucas Murray
424d358fd2 Less Krazy warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1042583
2009-10-30 08:10:35 +00:00
Lucas Murray
8a8428e41c Less Krazy warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1042572
2009-10-30 06:51:59 +00:00
Luboš Luňák
747c9b1f3e Detect radeon by using at least "Mesa DRI R", not
just the way too generic "Mesa DRI".


svn path=/trunk/KDE/kdebase/workspace/; revision=980487
2009-06-11 20:58:51 +00:00
Dirk Mueller
329cddf5bd Detect mobil intel chips as intel chips, not ATI
svn path=/trunk/KDE/kdebase/workspace/; revision=980438
2009-06-11 18:53:23 +00:00
Martin Gräßlin
7991f3e99d Ati changed the OpenGL version string. It used to be in the first part, now it is in the second part encapsulated in parenthesis. So new driver versions are now recognized again. Looking forward to the next change.
svn path=/trunk/KDE/kdebase/workspace/; revision=959824
2009-04-27 10:12:12 +00:00
Luboš Luňák
ab6772a8c9 Enable compositing with nvidia by default only for driver 173.14.12 and up,
this rules out GeForce4 and below, but there it's still possible to enable
it explicitly if the user finds it good enough.


svn path=/trunk/KDE/kdebase/workspace/; revision=880710
2008-11-06 09:31:33 +00:00
Enrique Matías Sánchez
f5efd9ca28 SVN_SILENT Fix typos in kdebase
svn path=/trunk/KDE/kdebase/workspace/; revision=875089
2008-10-23 09:31:44 +00:00
Luboš Luňák
ecfaf59014 I forgot to actually enable compositing by default for some cards listed
on the HW techbase page, do so for intel Gxx cards, radeon r200 and fglrx.


svn path=/trunk/KDE/kdebase/workspace/; revision=871764
2008-10-15 14:10:43 +00:00
Luboš Luňák
5a7557fc6f Force OpenGL compositing to be off if OpenGL rendering is done in software
(second X session with Intel).


svn path=/trunk/KDE/kdebase/workspace/; revision=871752
2008-10-15 13:41:53 +00:00
Luboš Luňák
c2ef38b83c Match intel and nvidia more exactly when detecting, and also
enable by default ati cards with fglrx driver or
(only r200 ...?) with radeon driver.


svn path=/trunk/KDE/kdebase/workspace/; revision=864377
2008-09-24 16:36:24 +00:00
Luboš Luňák
cfb0a0584d Compositing enabled by default again where possible.
svn path=/trunk/KDE/kdebase/workspace/; revision=859934
2008-09-11 15:14:45 +00:00
Malcolm Hunter
be582d3a1a Typo fixes
svn path=/trunk/KDE/kdebase/workspace/; revision=798922
2008-04-19 22:36:47 +00:00
Luboš Luňák
6c823ead71 Avoid 'possibly uninitialized' warning.
svn path=/trunk/KDE/kdebase/workspace/; revision=787696
2008-03-19 16:55:07 +00:00
Luboš Luňák
52f86e4a47 The context should probably be first unset from being current,
and also fix a possible leak.


svn path=/trunk/KDE/kdebase/workspace/; revision=764823
2008-01-22 17:04:41 +00:00
Luboš Luňák
d2a2ec2937 Use kwin debug group.
svn path=/trunk/KDE/kdebase/workspace/; revision=762376
2008-01-16 21:58:37 +00:00
Luboš Luňák
7b0b67b988 Change kError's to kDebug as they don't tell the user anything
useful in release builds anyway.


svn path=/trunk/KDE/kdebase/workspace/; revision=761477
2008-01-14 22:16:29 +00:00
Luboš Luňák
4b33f1babc Fix render check.
svn path=/trunk/KDE/kdebase/workspace/; revision=758642
2008-01-08 16:28:43 +00:00
Luboš Luňák
2f1e9eba44 Uncomment code with new i18n strings.
svn path=/trunk/KDE/kdebase/workspace/; revision=758577
2008-01-08 11:26:52 +00:00
Luboš Luňák
5647e4684d Compositing always disabled by default for now.
svn path=/trunk/KDE/kdebase/workspace/; revision=756786
2008-01-03 19:10:44 +00:00
Luboš Luňák
bb433ac40e No longer include config*.h files in installed headers.
Also slightly redo the #define's for effects, now it's:
- #ifdef KWIN_HAVE_COMPOSITING to check whether there's any compositing support at all
- #ifdef KWIN_HAVE_OPENGL_COMPOSITING to check for OpenGL-based compositing
- #ifdef KWIN_HAVE_XRENDER_COMPOSITING the same for XRender
CCMAIL: kwin@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=749628
2007-12-17 14:14:53 +00:00