• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Source Code Tree
2================
3
4This is a brief summary of Mesa's directory tree and what's contained in
5each directory.
6
7-  **docs** - Documentation
8-  **include** - Public OpenGL header files
9-  **src**
10
11   -  **amd** - AMD-specific sources
12
13      -  **addrlib** - common sources for creating images
14      -  **common** - common code between RADV, radeonsi and ACO
15      -  **compiler** - ACO shader compiler
16      -  **llvm** - common code between RADV and radeonsi for compiling
17         shaders using LLVM
18      -  **registers** - register definitions
19      -  **vulkan** - RADV Vulkan implementation for AMD Southern Island
20         and newer
21
22   -  **compiler** - Common utility sources for different compilers.
23
24      -  **glsl** - the GLSL IR and compiler
25      -  **nir** - the NIR IR and compiler
26      -  **spirv** - the SPIR-V compiler
27
28   -  **egl** - EGL library sources
29
30      -  **drivers** - EGL drivers
31      -  **main** - main EGL library implementation. This is where all
32         the EGL API functions are implemented, like eglCreateContext().
33
34   -  **freedreno** - Adreno-specific sources
35
36      -  **fdl** - mipmap layout manager
37      -  **vulkan** - Turnip is a Vulkan implementation for
38         Qualcomm Adreno
39
40   -  **gbm** - Generic Buffer Manager is a memory allocator for
41      device buffers
42
43   -  **intel** - Intel-specific sources
44
45      -  **blorp** - BLit Or Resolve Pass is a blit and HiZ resolve framework
46      -  **vulkan** - Anvil is a Vulkan implementation for Intel gen 7
47         (Ivy Bridge) and newer
48
49   -  **mapi** - Mesa APIs
50
51      -  **glapi** - OpenGL API dispatch layer. This is where all the GL
52         entrypoints like glClear, glBegin, etc. are generated, as well as
53         the GL dispatch table. All GL function calls jump through the
54         dispatch table to functions found in main/.
55
56   -  **mesa** - Main Mesa sources
57
58      -  **main** - The core Mesa code (mainly state management)
59      -  **drivers** - Mesa drivers (not used with Gallium)
60
61         -  **common** - code which may be shared by all drivers
62         -  **dri** - Direct Rendering Infrastructure drivers
63
64            -  **common** - code shared by all DRI drivers
65            -  **i915** - driver for Intel i915/i945
66            -  **i965** - driver for Intel i965
67            -  **nouveau** - driver for nVidia nv04/nv10/nv20
68            -  **radeon** - driver for ATI R100
69            -  **r200** - driver for ATI R200
70            -  **swrast** - software rasterizer driver that uses the
71               swrast module
72
73         -  **x11** - Xlib-based software driver
74         -  **osmesa** - off-screen software driver
75
76      -  **math** - vertex array translation and transformation code
77         (not used with Gallium)
78      -  **program** - Vertex/fragment shader and GLSL compiler code
79      -  **sparc** - Assembly code/optimizations for SPARC systems (not
80         used with Gallium)
81      -  **state_tracker** - Translator from Mesa to Gallium. This is
82         basically a Mesa device driver that speaks to Gallium. This
83         directory may be moved to src/mesa/drivers/gallium at some
84         point.
85      -  **swrast** - Software rasterization module. For drawing points,
86         lines, triangles, bitmaps, images, etc. in software. (not used
87         with Gallium)
88      -  **swrast_setup** - Software primitive setup. Does things like
89         polygon culling, glPolygonMode, polygon offset, etc. (not used
90         with Gallium)
91      -  **tnl** - Software vertex Transformation 'n Lighting. (not used
92         with Gallium)
93      -  **tnl_dd** - TNL code for device drivers. (not used with
94         Gallium)
95      -  **vbo** - Vertex Buffer Object code. All drawing with
96         glBegin/glEnd, glDrawArrays, display lists, etc. goes through
97         this module. The results is a well-defined set of vertex arrays
98         which are passed to the device driver (or tnl module) for
99         rendering.
100      -  **x86** - Assembly code/optimizations for 32-bit x86 systems
101         (not used with Gallium)
102      -  **x86-64** - Assembly code/optimizations for 64-bit x86 systems
103         (not used with Gallium)
104
105   -  **gallium** - Gallium3D source code
106
107      -  **include** - Gallium3D header files which define the Gallium3D
108         interfaces
109      -  **drivers** - Gallium3D device drivers
110
111         -  **etnaviv** - Driver for Vivante.
112         -  **freedreno** - Driver for Qualcomm Adreno.
113         -  **i915** - Driver for Intel i915/i945.
114         -  **iris** - Driver for Intel gen 8 (Broadwell) and newer.
115         -  **lima** - Driver for ARM Mali-400 (Utgard) series.
116         -  **llvmpipe** - Software driver using LLVM for runtime code
117            generation.
118         -  **nouveau** - Driver for NVIDIA GPUs.
119         -  **panfrost** - Driver for ARM Mali Txxx (Midgard) and
120            Gxx (Bifrost) GPUs.
121         -  **radeon** - Shared module for the r600 and radeonsi
122            drivers.
123         -  **r300** - Driver for ATI R300 - R500.
124         -  **r600** - Driver for ATI/AMD R600 - Northern Island (Terascale).
125         -  **radeonsi** - Driver for AMD Southern Island and newer (GCN, RDNA).
126         -  **softpipe** - Software reference driver.
127         -  **svga** - Driver for VMware's SVGA virtual GPU.
128         -  **swr** - Software driver with massively parellel vertex processing.
129         -  **tegra** - Driver for NVIDIA Tegra GPUs.
130         -  **v3d** - Driver for Broadcom VideoCore 5 and newer.
131         -  **vc4** - Driver for Broadcom VideoCore 4.
132         -  **virgl** - Driver for Virtio virtual GPU of QEMU.
133         -  **zink** - Driver that uses Vulkan for rendering.
134
135      -  **auxiliary** - Gallium support code
136
137         -  **cso_cache** - Constant State Objects Cache. Used to filter
138            out redundant state changes between frontends and drivers.
139         -  **draw** - Software vertex processing and primitive assembly
140            module. This includes vertex program execution, clipping,
141            culling and optional stages for drawing wide lines, stippled
142            lines, polygon stippling, two-sided lighting, etc. Intended
143            for use by drivers for hardware that does not have vertex
144            shaders. Geometry shaders will also be implemented in this
145            module.
146         -  **gallivm** - LLVM module for Gallium. For LLVM-based
147            compilation, optimization and code generation for TGSI
148            shaders. Incomplete.
149         -  **hud** - Heads-Up Display, an overlay showing GPU statistics
150         -  **pipebuffer** - utility module for managing buffers
151         -  **rbug** - Gallium remote debug utility
152         -  **rtasm** - run-time assembly/machine code generation.
153            Currently there's run-time code generation for x86/SSE,
154            PowerPC and Cell SPU.
155         -  **tessellator**- used by software drivers to implement
156            tessellation shaders
157         -  **tgsi** - TG Shader Infrastructure. Code for encoding,
158            manipulating and interpreting GPU programs.
159         -  **translate** - module for translating vertex data from one
160            format to another.
161         -  **util** - assorted utilities for arithmetic, hashing,
162            surface creation, memory management, 2D blitting, simple
163            rendering, etc.
164         -  **vl** - utility code for video decode/encode
165         -  XXX more
166
167      -  **frontends** - These implement various libraries using the
168         device drivers
169
170         -  **clover** - OpenCL frontend
171         -  **dri** - Meta frontend for DRI drivers, see mesa/state_tracker
172         -  **glx** - Meta frontend for GLX
173         -  **hgl** - Haiku OpenGL
174         -  **nine** - D3D9 frontend, see targets/d3dadapter9
175         -  **omx** - OpenMAX Bellagio frontend
176         -  **osmesa** - Off-screen OpenGL rendering library
177         -  **va** - VA-API frontend
178         -  **vdpau** - VDPAU frontend
179         -  **wgl** - Windows WGL frontend
180         -  **xa** - XA frontend
181         -  **xvmc** - XvMC frontend
182
183      -  **winsys** - The device drivers are platform-independent, the
184         winsys connects them to various platforms. There is usually one winsys
185         per device family, and within the winsys directory there can be
186         multiple flavors connecting to different platforms.
187
188         -  **drm** - Direct Rendering Manager on Linux
189         -  **gdi** - Windows
190         -  **xlib** - indirect rendering on X Window System
191         -  XXX more
192
193   -  **targets** - These control how the Gallium code is compiled into
194      different libraries. Each of these roughly corresponds to one frontend.
195
196         -  **d3dadapter9** - d3dadapter9.so for Wine
197         -  **dri** - libgallium_dri.so loaded by libGL.so
198         -  **graw** - raw Gallium interface without a frontend
199         -  XXX more
200
201   -  **glx** - The GLX library code for building libGL.so using DRI
202      drivers.
203   -  **loader** - Used by libGL.so to find and load the appropriate DRI driver.
204   -  **panfrost** - Panfrost-specific sources
205
206         -  **bifrost** - shader compiler for the Bifrost generation GPUs
207         -  **lib** - GPU data structures (command stream) support code`
208         -  **midgard** - shader compiler for the Midgard generation GPUs
209         -  **shared** - shared Mali code between Lima and Panfrost
210         -  **util** - shared code between Midgard and Bifrost shader compilers
211
212   -  **util** - Various utility codes
213   -  **vulkan** - Common code for Vulkan drivers
214