Internal: What does LIBGL_ALWAYS_INDIRECT=1 actually do?
Help Article Update 2
Anonym
Topic:
NOTE
Information in this tech tip is for internal use only. Content obtained on 2 March 2011 from external web site:
|
Discussion:
From article at:
http://unix.stackexchange.com/questions/1437/what-does-libgl-always-indirect-1-actually-do
What does LIBGL_ALWAYS_INDIRECT=1 actually do?
KDE SC 4.5.0 has some problems with some video cards including mine. Upon Release Arch recommended several workarounds. One of which was
export "LIBGL_ALWAYS_INDIRECT=1" before starting KDE
I decided that it was the easiest, best method. But I don't know what it does or how it impacts my system. Is it slower than the default? should I remember to keep an eye on the problem and disable it later once it's fixed?
edited Aug 31 '10 at 21:03
asked Aug 31 '10 at 18:40
xenoterracide?
4,880826
83% accept rate
1 Answer
active oldest votes
up vote 4 down vote accepted
Indirect rendering means that the GLX protocol will be used to transmit OpenGL commands and the X.org will do the real drawing.
Direct rendering means that application can access hardware directly without communication with X.org first via mesa.
The direct rendering is faster as it does not require change of context into X.org process.
Clarification: In both cases the rendering is done by GPU (or technically - may be done by GPU). However in indirect rendering the process looks like:
1. Program calls a command(s)
2. Command(s) is/are sent to X.org by GLX protocol
3. X.org calls hardware (i.e. GPU) to draw
In direct rendering
1. Program calls a command(s)
2. Command(s) is/are sent to GPU
Please note that because OpenGL was designed in such way that may operate over network the indirect rendering is faster then would be naive implementation of architecture i.e. allows to send a buch of commands in one go. However there is some overhead in terms of CPU time spent for context switches and handling protocol.
link|edit|flag
edited Aug 31 '10 at 20:39
answered Aug 31 '10 at 20:10
Maciej Piechotka?
3,931216
@Maciej Does this mean my CPU is doing the rendering atm instead of my video chip?
xenoterracide
Aug 31 '10 at 20:17
No. In both cases the GPU does the drawing if you have acceleration - however there is additional overhead. Not accelerated drawing is extreamly slow and no effects which would require LIBGL_ALWAYS_INDIRECT=1 would work with it (i.e. indirect rendering workaround is usually needed for advanced use of OpenGL such as composite wm).
Maciej Piechotka
Aug 31 '10 at 20:43
tagged
xorg × 69
kde × 47
opengl × 6
bug-workaround × 2Solution:
[Edit this field in the IDL-based Tech Tip Editor, v80]