xref: /aosp_15_r20/external/mesa3d/docs/faq.rst (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1*61046927SAndroid Build Coastguard WorkerFrequently Asked Questions
2*61046927SAndroid Build Coastguard Worker==========================
3*61046927SAndroid Build Coastguard Worker
4*61046927SAndroid Build Coastguard WorkerLast updated: 19 September 2018
5*61046927SAndroid Build Coastguard Worker
6*61046927SAndroid Build Coastguard Worker1. High-level Questions and Answers
7*61046927SAndroid Build Coastguard Worker-----------------------------------
8*61046927SAndroid Build Coastguard Worker
9*61046927SAndroid Build Coastguard Worker1.1 What is Mesa?
10*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~
11*61046927SAndroid Build Coastguard Worker
12*61046927SAndroid Build Coastguard WorkerMesa is an open-source implementation of the OpenGL specification.
13*61046927SAndroid Build Coastguard WorkerOpenGL is a programming library for writing interactive 3D applications.
14*61046927SAndroid Build Coastguard WorkerSee the `OpenGL website <https://www.opengl.org/>`__ for more
15*61046927SAndroid Build Coastguard Workerinformation.
16*61046927SAndroid Build Coastguard Worker
17*61046927SAndroid Build Coastguard WorkerMesa 9.x supports the OpenGL 3.1 specification.
18*61046927SAndroid Build Coastguard Worker
19*61046927SAndroid Build Coastguard Worker1.2 Does Mesa support/use graphics hardware?
20*61046927SAndroid Build Coastguard Worker--------------------------------------------
21*61046927SAndroid Build Coastguard Worker
22*61046927SAndroid Build Coastguard WorkerYes. Specifically, Mesa serves as the OpenGL core for the open-source
23*61046927SAndroid Build Coastguard WorkerDRI drivers for X.org.
24*61046927SAndroid Build Coastguard Worker
25*61046927SAndroid Build Coastguard Worker-  See the `DRI website <https://dri.freedesktop.org/>`__ for more
26*61046927SAndroid Build Coastguard Worker   information.
27*61046927SAndroid Build Coastguard Worker-  See `01.org <https://www.intel.com/content/www/us/en/developer/topic-technology/open/overview.html>`__
28*61046927SAndroid Build Coastguard Worker   for more information about Intel drivers.
29*61046927SAndroid Build Coastguard Worker-  See `nouveau.freedesktop.org <https://nouveau.freedesktop.org>`__ for
30*61046927SAndroid Build Coastguard Worker   more information about Nouveau drivers.
31*61046927SAndroid Build Coastguard Worker-  See
32*61046927SAndroid Build Coastguard Worker   `www.x.org/wiki/RadeonFeature <https://www.x.org/wiki/RadeonFeature>`__
33*61046927SAndroid Build Coastguard Worker   for more information about Radeon drivers.
34*61046927SAndroid Build Coastguard Worker
35*61046927SAndroid Build Coastguard Worker1.3 What purpose does Mesa serve today?
36*61046927SAndroid Build Coastguard Worker---------------------------------------
37*61046927SAndroid Build Coastguard Worker
38*61046927SAndroid Build Coastguard WorkerHardware-accelerated OpenGL implementations are available for most
39*61046927SAndroid Build Coastguard Workerpopular operating systems today. Still, Mesa serves at least these
40*61046927SAndroid Build Coastguard Workerpurposes:
41*61046927SAndroid Build Coastguard Worker
42*61046927SAndroid Build Coastguard Worker-  Mesa is used as the core of the open-source X.org DRI hardware
43*61046927SAndroid Build Coastguard Worker   drivers.
44*61046927SAndroid Build Coastguard Worker-  Mesa is quite portable and allows OpenGL to be used on systems that
45*61046927SAndroid Build Coastguard Worker   have no other OpenGL solution.
46*61046927SAndroid Build Coastguard Worker-  Software rendering with Mesa serves as a reference for validating the
47*61046927SAndroid Build Coastguard Worker   hardware drivers.
48*61046927SAndroid Build Coastguard Worker-  A software implementation of OpenGL is useful for experimentation,
49*61046927SAndroid Build Coastguard Worker   such as testing new rendering techniques.
50*61046927SAndroid Build Coastguard Worker-  Mesa can render images with deep color channels: 16-bit integer and
51*61046927SAndroid Build Coastguard Worker   32-bit floating point color channels are supported. This capability
52*61046927SAndroid Build Coastguard Worker   is only now appearing in hardware.
53*61046927SAndroid Build Coastguard Worker-  Mesa's internal limits (max lights, clip planes, texture size, etc)
54*61046927SAndroid Build Coastguard Worker   can be changed for special needs (hardware limits are hard to
55*61046927SAndroid Build Coastguard Worker   overcome).
56*61046927SAndroid Build Coastguard Worker
57*61046927SAndroid Build Coastguard Worker1.4 What's the difference between "Stand-Alone" Mesa and the DRI drivers?
58*61046927SAndroid Build Coastguard Worker-------------------------------------------------------------------------
59*61046927SAndroid Build Coastguard Worker
60*61046927SAndroid Build Coastguard Worker*Stand-alone Mesa* is the original incarnation of Mesa. On systems
61*61046927SAndroid Build Coastguard Workerrunning the X Window System it does all its rendering through the Xlib
62*61046927SAndroid Build Coastguard WorkerAPI:
63*61046927SAndroid Build Coastguard Worker
64*61046927SAndroid Build Coastguard Worker-  The GLX API is supported, but it's really just an emulation of the
65*61046927SAndroid Build Coastguard Worker   real thing.
66*61046927SAndroid Build Coastguard Worker-  The GLX wire protocol is not supported and there's no OpenGL
67*61046927SAndroid Build Coastguard Worker   extension loaded by the X server.
68*61046927SAndroid Build Coastguard Worker-  There is no hardware acceleration.
69*61046927SAndroid Build Coastguard Worker-  The OpenGL library, ``libGL.so``, contains everything (the
70*61046927SAndroid Build Coastguard Worker   programming API, the GLX functions and all the rendering code).
71*61046927SAndroid Build Coastguard Worker
72*61046927SAndroid Build Coastguard WorkerAlternately, Mesa acts as the core for a number of OpenGL hardware
73*61046927SAndroid Build Coastguard Workerdrivers within the DRI (Direct Rendering Infrastructure):
74*61046927SAndroid Build Coastguard Worker
75*61046927SAndroid Build Coastguard Worker-  The ``libGL.so`` library provides the GL and GLX API functions, a GLX
76*61046927SAndroid Build Coastguard Worker   protocol encoder, and a device driver loader.
77*61046927SAndroid Build Coastguard Worker-  The device driver modules (such as ``r200_dri.so``) contain a
78*61046927SAndroid Build Coastguard Worker   built-in copy of the core Mesa code.
79*61046927SAndroid Build Coastguard Worker-  The X server loads the GLX module. The GLX module decodes incoming
80*61046927SAndroid Build Coastguard Worker   GLX protocol and dispatches the commands to a rendering module. For
81*61046927SAndroid Build Coastguard Worker   the DRI, this module is basically a software Mesa renderer.
82*61046927SAndroid Build Coastguard Worker
83*61046927SAndroid Build Coastguard Worker1.5 How do I upgrade my DRI installation to use a new Mesa release?
84*61046927SAndroid Build Coastguard Worker-------------------------------------------------------------------
85*61046927SAndroid Build Coastguard Worker
86*61046927SAndroid Build Coastguard WorkerThis wasn't easy in the past. Now, the DRI drivers are included in the
87*61046927SAndroid Build Coastguard WorkerMesa tree and can be compiled separately from the X server. Just follow
88*61046927SAndroid Build Coastguard Workerthe Mesa :doc:`compilation instructions <install>`.
89*61046927SAndroid Build Coastguard Worker
90*61046927SAndroid Build Coastguard Worker1.6 Are there other open-source implementations of OpenGL?
91*61046927SAndroid Build Coastguard Worker----------------------------------------------------------
92*61046927SAndroid Build Coastguard Worker
93*61046927SAndroid Build Coastguard WorkerYes, SGI's `OpenGL Sample Implementation
94*61046927SAndroid Build Coastguard Worker(SI) <https://web.archive.org/web/20171010115110_/http://oss.sgi.com/projects/ogl-sample/index.html>`__
95*61046927SAndroid Build Coastguard Workeris available. The SI was written during the time that OpenGL was
96*61046927SAndroid Build Coastguard Workeroriginally designed. Unfortunately, development of the SI has stagnated.
97*61046927SAndroid Build Coastguard WorkerMesa is much more up to date with modern features and extensions.
98*61046927SAndroid Build Coastguard Worker
99*61046927SAndroid Build Coastguard Worker`Vincent <https://sourceforge.net/projects/ogl-es/>`__ is an open-source
100*61046927SAndroid Build Coastguard Workerimplementation of OpenGL ES for mobile devices.
101*61046927SAndroid Build Coastguard Worker
102*61046927SAndroid Build Coastguard Worker`miniGL <https://web.archive.org/web/20130830162848/http://www.dsbox.com/minigl.html>`__
103*61046927SAndroid Build Coastguard Workeris a subset of OpenGL for PalmOS devices. The website is gone, but the
104*61046927SAndroid Build Coastguard Workersource code can still be found on
105*61046927SAndroid Build Coastguard Worker`sourceforge.net <https://sourceforge.net/projects/minigl/>`__.
106*61046927SAndroid Build Coastguard Worker
107*61046927SAndroid Build Coastguard Worker`TinyGL <https://bellard.org/TinyGL/>`__ is a subset of OpenGL.
108*61046927SAndroid Build Coastguard Worker
109*61046927SAndroid Build Coastguard Worker`SoftGL <https://sourceforge.net/projects/softgl/>`__ is an OpenGL
110*61046927SAndroid Build Coastguard Workersubset for mobile devices.
111*61046927SAndroid Build Coastguard Worker
112*61046927SAndroid Build Coastguard Worker`Chromium <https://chromium.sourceforge.net/>`__ isn't a conventional
113*61046927SAndroid Build Coastguard WorkerOpenGL implementation (it's layered upon OpenGL), but it does export the
114*61046927SAndroid Build Coastguard WorkerOpenGL API. It allows tiled rendering, sort-last rendering, etc.
115*61046927SAndroid Build Coastguard Worker
116*61046927SAndroid Build Coastguard Worker`ClosedGL <https://www.ticalc.org/archives/files/fileinfo/361/36173.html>`__
117*61046927SAndroid Build Coastguard Workeris an OpenGL subset library for TI graphing calculators.
118*61046927SAndroid Build Coastguard Worker
119*61046927SAndroid Build Coastguard WorkerThere may be other open OpenGL implementations, but Mesa is the most
120*61046927SAndroid Build Coastguard Workerpopular and feature-complete.
121*61046927SAndroid Build Coastguard Worker
122*61046927SAndroid Build Coastguard Worker2. Compilation and Installation Problems
123*61046927SAndroid Build Coastguard Worker----------------------------------------
124*61046927SAndroid Build Coastguard Worker
125*61046927SAndroid Build Coastguard Worker2.1 What's the easiest way to install Mesa?
126*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127*61046927SAndroid Build Coastguard Worker
128*61046927SAndroid Build Coastguard WorkerIf you're using a Linux-based system, your distro CD most likely already
129*61046927SAndroid Build Coastguard Workerhas Mesa packages (like RPM or DEB) which you can easily install.
130*61046927SAndroid Build Coastguard Worker
131*61046927SAndroid Build Coastguard Worker2.2 I get undefined symbols such as bgnpolygon, v3f, etc...
132*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133*61046927SAndroid Build Coastguard Worker
134*61046927SAndroid Build Coastguard WorkerYour application is written in IRIS GL, not OpenGL. IRIS GL was the
135*61046927SAndroid Build Coastguard Workerpredecessor to OpenGL and is a different thing (almost) entirely. Mesa's
136*61046927SAndroid Build Coastguard Workernot the solution.
137*61046927SAndroid Build Coastguard Worker
138*61046927SAndroid Build Coastguard Worker2.3 Where is the GLUT library?
139*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140*61046927SAndroid Build Coastguard Worker
141*61046927SAndroid Build Coastguard WorkerGLUT (OpenGL Utility Toolkit) is no longer in the separate
142*61046927SAndroid Build Coastguard Worker``MesaGLUT-x.y.z.tar.gz`` file. If you don't already have GLUT
143*61046927SAndroid Build Coastguard Workerinstalled, you should grab
144*61046927SAndroid Build Coastguard Worker`freeglut <https://freeglut.sourceforge.net/>`__.
145*61046927SAndroid Build Coastguard Worker
146*61046927SAndroid Build Coastguard Worker2.4 Where is the GLw library?
147*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148*61046927SAndroid Build Coastguard Worker
149*61046927SAndroid Build Coastguard WorkerGLw (OpenGL widget library) is now available from a separate `git
150*61046927SAndroid Build Coastguard Workerrepository <https://gitlab.freedesktop.org/mesa/glw>`__. Unless you're
151*61046927SAndroid Build Coastguard Workerusing very old Xt/Motif applications with OpenGL, you shouldn't need it.
152*61046927SAndroid Build Coastguard Worker
153*61046927SAndroid Build Coastguard Worker2.5 What's the proper place for the libraries and headers?
154*61046927SAndroid Build Coastguard Worker----------------------------------------------------------
155*61046927SAndroid Build Coastguard Worker
156*61046927SAndroid Build Coastguard WorkerOn Linux-based systems you'll want to follow the `Linux
157*61046927SAndroid Build Coastguard WorkerABI <https://registry.khronos.org/OpenGL/ABI/>`__ standard.
158*61046927SAndroid Build Coastguard WorkerBasically you'll want the following:
159*61046927SAndroid Build Coastguard Worker
160*61046927SAndroid Build Coastguard Worker``/usr/include/GL/gl.h``
161*61046927SAndroid Build Coastguard Worker   the main OpenGL header
162*61046927SAndroid Build Coastguard Worker``/usr/include/GL/glu.h``
163*61046927SAndroid Build Coastguard Worker   the OpenGL GLU (utility) header
164*61046927SAndroid Build Coastguard Worker``/usr/include/GL/glx.h``
165*61046927SAndroid Build Coastguard Worker   the OpenGL GLX header
166*61046927SAndroid Build Coastguard Worker``/usr/include/GL/glext.h``
167*61046927SAndroid Build Coastguard Worker   the OpenGL extensions header
168*61046927SAndroid Build Coastguard Worker``/usr/include/GL/glxext.h``
169*61046927SAndroid Build Coastguard Worker   the OpenGL GLX extensions header
170*61046927SAndroid Build Coastguard Worker``/usr/include/GL/osmesa.h``
171*61046927SAndroid Build Coastguard Worker   the Mesa off-screen rendering header
172*61046927SAndroid Build Coastguard Worker``/usr/lib/libGL.so``
173*61046927SAndroid Build Coastguard Worker   a symlink to ``libGL.so.1``
174*61046927SAndroid Build Coastguard Worker``/usr/lib/libGL.so.1``
175*61046927SAndroid Build Coastguard Worker   a symlink to ``libGL.so.1.xyz``
176*61046927SAndroid Build Coastguard Worker``/usr/lib/libGL.so.xyz``
177*61046927SAndroid Build Coastguard Worker   the actual OpenGL/Mesa library. xyz denotes the Mesa version number.
178*61046927SAndroid Build Coastguard Worker
179*61046927SAndroid Build Coastguard WorkerWhen configuring Mesa, there are three meson options that affect the
180*61046927SAndroid Build Coastguard Workerinstall location that you should take care with: ``--prefix``,
181*61046927SAndroid Build Coastguard Worker``--libdir``, and ``-D dri-drivers-path``. To install Mesa into the
182*61046927SAndroid Build Coastguard Workersystem location where it will be available for all programs to use, set
183*61046927SAndroid Build Coastguard Worker``--prefix=/usr``. Set ``--libdir`` to where your Linux distribution
184*61046927SAndroid Build Coastguard Workerinstalls system libraries, usually either ``/usr/lib`` or
185*61046927SAndroid Build Coastguard Worker``/usr/lib64``. Set ``-D dri-drivers-path`` to the directory where your
186*61046927SAndroid Build Coastguard WorkerLinux distribution installs DRI drivers. To find your system's DRI
187*61046927SAndroid Build Coastguard Workerdriver directory, try executing ``find /usr -type d -name dri``. For
188*61046927SAndroid Build Coastguard Workerexample, if the ``find`` command listed ``/usr/lib64/dri``, then set
189*61046927SAndroid Build Coastguard Worker``-D dri-drivers-path=/usr/lib64/dri``.
190*61046927SAndroid Build Coastguard Worker
191*61046927SAndroid Build Coastguard WorkerAfter determining the correct values for the install location, configure
192*61046927SAndroid Build Coastguard WorkerMesa with
193*61046927SAndroid Build Coastguard Worker``meson configure --prefix=/usr --libdir=xxx -D dri-drivers-path=xxx``
194*61046927SAndroid Build Coastguard Workerand then install with ``sudo meson install``.
195*61046927SAndroid Build Coastguard Worker
196*61046927SAndroid Build Coastguard Worker3. Runtime / Rendering Problems
197*61046927SAndroid Build Coastguard Worker-------------------------------
198*61046927SAndroid Build Coastguard Worker
199*61046927SAndroid Build Coastguard Worker3.1 Rendering is slow / why isn't my graphics hardware being used?
200*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
201*61046927SAndroid Build Coastguard Worker
202*61046927SAndroid Build Coastguard WorkerIf Mesa can't use its hardware accelerated drivers it falls back on one
203*61046927SAndroid Build Coastguard Workerof its software renderers. (e.g. Softpipe or LLVMpipe)
204*61046927SAndroid Build Coastguard Worker
205*61046927SAndroid Build Coastguard WorkerYou can run the ``glxinfo`` program to learn about your OpenGL library.
206*61046927SAndroid Build Coastguard WorkerLook for the ``OpenGL vendor`` and ``OpenGL renderer`` values. That will
207*61046927SAndroid Build Coastguard Workeridentify who's OpenGL library with which driver you're using and what
208*61046927SAndroid Build Coastguard Workersort of hardware it has detected.
209*61046927SAndroid Build Coastguard Worker
210*61046927SAndroid Build Coastguard WorkerIf you're using a hardware accelerated driver you want
211*61046927SAndroid Build Coastguard Worker``direct rendering: Yes``.
212*61046927SAndroid Build Coastguard Worker
213*61046927SAndroid Build Coastguard WorkerIf your DRI-based driver isn't working, go to the `DRI
214*61046927SAndroid Build Coastguard Workerwebsite <https://dri.freedesktop.org/>`__ for trouble-shooting
215*61046927SAndroid Build Coastguard Workerinformation.
216*61046927SAndroid Build Coastguard Worker
217*61046927SAndroid Build Coastguard Worker3.2 I'm seeing errors in depth (Z) buffering. Why?
218*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
219*61046927SAndroid Build Coastguard Worker
220*61046927SAndroid Build Coastguard WorkerMake sure the ratio of the far to near clipping planes isn't too great.
221*61046927SAndroid Build Coastguard WorkerLook
222*61046927SAndroid Build Coastguard Worker`here <https://www.opengl.org/archives/resources/faq/technical/depthbuffer.htm#0040>`__
223*61046927SAndroid Build Coastguard Workerfor details.
224*61046927SAndroid Build Coastguard Worker
225*61046927SAndroid Build Coastguard WorkerMesa uses a 16-bit depth buffer by default which is smaller and faster
226*61046927SAndroid Build Coastguard Workerto clear than a 32-bit buffer but not as accurate. If you need a deeper
227*61046927SAndroid Build Coastguard Workeryou can modify the parameters to ``glXChooseVisual`` in your code.
228*61046927SAndroid Build Coastguard Worker
229*61046927SAndroid Build Coastguard Worker3.3 Why Isn't depth buffering working at all?
230*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
231*61046927SAndroid Build Coastguard Worker
232*61046927SAndroid Build Coastguard WorkerBe sure you're requesting a depth buffered-visual. If you set the
233*61046927SAndroid Build Coastguard Worker``MESA_DEBUG`` environment variable it will warn you about trying to
234*61046927SAndroid Build Coastguard Workerenable depth testing when you don't have a depth buffer.
235*61046927SAndroid Build Coastguard Worker
236*61046927SAndroid Build Coastguard WorkerSpecifically, make sure ``glutInitDisplayMode`` is being called with
237*61046927SAndroid Build Coastguard Worker``GLUT_DEPTH`` or ``glXChooseVisual`` is being called with a non-zero
238*61046927SAndroid Build Coastguard Workervalue for ``GLX_DEPTH_SIZE``.
239*61046927SAndroid Build Coastguard Worker
240*61046927SAndroid Build Coastguard WorkerThis discussion applies to stencil buffers, accumulation buffers and
241*61046927SAndroid Build Coastguard Workeralpha channels too.
242*61046927SAndroid Build Coastguard Worker
243*61046927SAndroid Build Coastguard Worker3.4 Why does ``glGetString()`` always return ``NULL``?
244*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
245*61046927SAndroid Build Coastguard Worker
246*61046927SAndroid Build Coastguard WorkerBe sure you have an active/current OpenGL rendering context before
247*61046927SAndroid Build Coastguard Workercalling ``glGetString``.
248*61046927SAndroid Build Coastguard Worker
249*61046927SAndroid Build Coastguard Worker3.5 ``GL_POINTS`` and ``GL_LINES`` don't touch the right pixels
250*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
251*61046927SAndroid Build Coastguard Worker
252*61046927SAndroid Build Coastguard WorkerIf you're trying to draw a filled region by using ``GL_POINTS`` or
253*61046927SAndroid Build Coastguard Worker``GL_LINES`` and seeing holes or gaps it's because of a float-to-int
254*61046927SAndroid Build Coastguard Workerrounding problem. But this is not a bug. See Appendix H of the OpenGL
255*61046927SAndroid Build Coastguard WorkerProgramming Guide - "OpenGL Correctness Tips". Basically, applying a
256*61046927SAndroid Build Coastguard Workertranslation of (0.375, 0.375, 0.0) to your coordinates will fix the
257*61046927SAndroid Build Coastguard Workerproblem.
258*61046927SAndroid Build Coastguard Worker
259*61046927SAndroid Build Coastguard Worker4. Developer Questions
260*61046927SAndroid Build Coastguard Worker----------------------
261*61046927SAndroid Build Coastguard Worker
262*61046927SAndroid Build Coastguard Worker4.1 How can I contribute?
263*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~
264*61046927SAndroid Build Coastguard Worker
265*61046927SAndroid Build Coastguard WorkerFirst, join the :doc:`mesa-dev mailing list <lists>`. That's where
266*61046927SAndroid Build Coastguard WorkerMesa development is discussed.
267*61046927SAndroid Build Coastguard Worker
268*61046927SAndroid Build Coastguard WorkerThe `OpenGL Specification
269*61046927SAndroid Build Coastguard Worker<https://registry.khronos.org/OpenGL/index_gl.php#apispecs>`__ is the
270*61046927SAndroid Build Coastguard Workerbible for OpenGL implementation work. You should read it.
271*61046927SAndroid Build Coastguard Worker
272*61046927SAndroid Build Coastguard WorkerMost of the Mesa development work involves implementing new OpenGL
273*61046927SAndroid Build Coastguard Workerextensions, writing hardware drivers (for the DRI), and code
274*61046927SAndroid Build Coastguard Workeroptimization.
275*61046927SAndroid Build Coastguard Worker
276*61046927SAndroid Build Coastguard Worker4.2 How do I write a new device driver?
277*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
278*61046927SAndroid Build Coastguard Worker
279*61046927SAndroid Build Coastguard WorkerUnfortunately, writing a device driver isn't easy. It requires detailed
280*61046927SAndroid Build Coastguard Workerunderstanding of OpenGL, the Mesa code, and your target
281*61046927SAndroid Build Coastguard Workerhardware/operating system. 3D graphics are not simple.
282*61046927SAndroid Build Coastguard Worker
283*61046927SAndroid Build Coastguard WorkerThe best way to get started is to use an existing driver as your
284*61046927SAndroid Build Coastguard Workerstarting point. For a classic hardware driver, the i965 driver is a good
285*61046927SAndroid Build Coastguard Workerexample. For a Gallium3D hardware driver, the r300g, r600g and the i915g
286*61046927SAndroid Build Coastguard Workerare good examples.
287*61046927SAndroid Build Coastguard Worker
288*61046927SAndroid Build Coastguard WorkerThe DRI website has more information about writing hardware drivers. The
289*61046927SAndroid Build Coastguard Workerprocess isn't well document because the Mesa driver interface changes
290*61046927SAndroid Build Coastguard Workerover time, and we seldom have spare time for writing documentation. That
291*61046927SAndroid Build Coastguard Workerbeing said, many people have managed to figure out the process.
292*61046927SAndroid Build Coastguard Worker
293*61046927SAndroid Build Coastguard WorkerJoining the appropriate mailing lists and asking questions (and
294*61046927SAndroid Build Coastguard Workersearching the archives) is a good way to get information.
295*61046927SAndroid Build Coastguard Worker
296*61046927SAndroid Build Coastguard Worker4.3 Why isn't :ext:`GL_EXT_texture_compression_s3tc` implemented in Mesa?
297*61046927SAndroid Build Coastguard Worker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
298*61046927SAndroid Build Coastguard Worker
299*61046927SAndroid Build Coastguard WorkerOh but it is! Prior to 2nd October 2017, the Mesa project did not
300*61046927SAndroid Build Coastguard Workerinclude S3TC support due to intellectual property (IP) and/or patent
301*61046927SAndroid Build Coastguard Workerissues around the S3TC algorithm.
302*61046927SAndroid Build Coastguard Worker
303*61046927SAndroid Build Coastguard WorkerAs of Mesa 17.3.0, Mesa now officially supports S3TC, as the patent has
304*61046927SAndroid Build Coastguard Workerexpired.
305*61046927SAndroid Build Coastguard Worker
306*61046927SAndroid Build Coastguard WorkerIn versions prior to this, a 3rd party `plug-in
307*61046927SAndroid Build Coastguard Workerlibrary <https://dri.freedesktop.org/wiki/S3TC>`__ was required.
308