• 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      -  **math** - vertex array translation and transformation code
60         (not used with Gallium)
61      -  **program** - Vertex/fragment shader and GLSL compiler code
62      -  **state_tracker** - Translator from Mesa to Gallium. This is
63         basically a Mesa device driver that speaks to Gallium.
64      -  **vbo** - Vertex Buffer Object code. All drawing with
65         glBegin/glEnd, glDrawArrays, display lists, etc. goes through
66         this module. The results is a well-defined set of vertex arrays
67         which are passed to the device driver (or tnl module) for
68         rendering.
69      -  **x86** - Assembly code/optimizations for 32-bit x86 systems
70         (not used with Gallium)
71      -  **x86-64** - Assembly code/optimizations for 64-bit x86 systems
72         (not used with Gallium)
73
74   -  **gallium** - Gallium3D source code
75
76      -  **include** - Gallium3D header files which define the Gallium3D
77         interfaces
78      -  **drivers** - Gallium3D device drivers
79
80         -  **etnaviv** - Driver for Vivante.
81         -  **freedreno** - Driver for Qualcomm Adreno.
82         -  **i915** - Driver for Intel i915/i945.
83         -  **iris** - Driver for Intel gen 8 (Broadwell) and newer.
84         -  **lima** - Driver for ARM Mali-400 (Utgard) series.
85         -  **llvmpipe** - Software driver using LLVM for runtime code
86            generation.
87         -  **nouveau** - Driver for NVIDIA GPUs.
88         -  **panfrost** - Driver for ARM Mali Txxx (Midgard) and
89            Gxx (Bifrost) GPUs.
90         -  **radeon** - Shared module for the r600 and radeonsi
91            drivers.
92         -  **r300** - Driver for ATI R300 - R500.
93         -  **r600** - Driver for ATI/AMD R600 - Northern Island (Terascale).
94         -  **radeonsi** - Driver for AMD Southern Island and newer (GCN, RDNA).
95         -  **softpipe** - Software reference driver.
96         -  **svga** - Driver for VMware's SVGA virtual GPU.
97         -  **tegra** - Driver for NVIDIA Tegra GPUs.
98         -  **v3d** - Driver for Broadcom VideoCore 5 and newer.
99         -  **vc4** - Driver for Broadcom VideoCore 4.
100         -  **virgl** - Driver for Virtio virtual GPU of QEMU.
101         -  **zink** - Driver that uses Vulkan for rendering.
102
103      -  **auxiliary** - Gallium support code
104
105         -  **cso_cache** - Constant State Objects Cache. Used to filter
106            out redundant state changes between frontends and drivers.
107         -  **draw** - Software vertex processing and primitive assembly
108            module. This includes vertex program execution, clipping,
109            culling and optional stages for drawing wide lines, stippled
110            lines, polygon stippling, two-sided lighting, etc. Intended
111            for use by drivers for hardware that does not have vertex
112            shaders. Geometry shaders will also be implemented in this
113            module.
114         -  **gallivm** - LLVM module for Gallium. For LLVM-based
115            compilation, optimization and code generation for TGSI
116            shaders. Incomplete.
117         -  **hud** - Heads-Up Display, an overlay showing GPU statistics
118         -  **pipebuffer** - utility module for managing buffers
119         -  **rbug** - Gallium remote debug utility
120         -  **rtasm** - run-time assembly/machine code generation.
121            Currently there's run-time code generation for x86/SSE,
122            PowerPC and Cell SPU.
123         -  **tessellator**- used by software drivers to implement
124            tessellation shaders
125         -  **tgsi** - TG Shader Infrastructure. Code for encoding,
126            manipulating and interpreting GPU programs.
127         -  **translate** - module for translating vertex data from one
128            format to another.
129         -  **util** - assorted utilities for arithmetic, hashing,
130            surface creation, memory management, 2D blitting, simple
131            rendering, etc.
132         -  **vl** - utility code for video decode/encode
133         -  XXX more
134
135      -  **frontends** - These implement various libraries using the
136         device drivers
137
138         -  **clover** - OpenCL frontend
139         -  **dri** - Meta frontend for DRI drivers, see mesa/state_tracker
140         -  **glx** - Meta frontend for GLX
141         -  **hgl** - Haiku OpenGL
142         -  **nine** - D3D9 frontend, see targets/d3dadapter9
143         -  **omx** - OpenMAX Bellagio frontend
144         -  **osmesa** - Off-screen OpenGL rendering library
145         -  **va** - VA-API frontend
146         -  **vdpau** - VDPAU frontend
147         -  **wgl** - Windows WGL frontend
148         -  **xa** - XA frontend
149         -  **xvmc** - XvMC frontend
150
151      -  **winsys** - The device drivers are platform-independent, the
152         winsys connects them to various platforms. There is usually one winsys
153         per device family, and within the winsys directory there can be
154         multiple flavors connecting to different platforms.
155
156         -  **drm** - Direct Rendering Manager on Linux
157         -  **gdi** - Windows
158         -  **xlib** - indirect rendering on X Window System
159         -  XXX more
160
161   -  **targets** - These control how the Gallium code is compiled into
162      different libraries. Each of these roughly corresponds to one frontend.
163
164         -  **d3dadapter9** - d3dadapter9.so for Wine
165         -  **dri** - libgallium_dri.so loaded by libGL.so
166         -  **graw** - raw Gallium interface without a frontend
167         -  XXX more
168
169   -  **glx** - The GLX library code for building libGL.so using DRI
170      drivers.
171   -  **loader** - Used by libGL.so to find and load the appropriate DRI driver.
172   -  **panfrost** - Panfrost-specific sources
173
174         -  **bifrost** - shader compiler for the Bifrost generation GPUs
175         -  **lib** - GPU data structures (command stream) support code`
176         -  **midgard** - shader compiler for the Midgard generation GPUs
177         -  **shared** - shared Mali code between Lima and Panfrost
178         -  **util** - shared code between Midgard and Bifrost shader compilers
179
180   -  **util** - Various utility codes
181   -  **vulkan** - Common code for Vulkan drivers
182