Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 1 | Source Code Tree |
| 2 | ================ |
| 3 | |
| 4 | This is a brief summary of Mesa's directory tree and what's contained in |
| 5 | each 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 | |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 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 | |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 49 | - **mapi** - Mesa APIs |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 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 | |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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 |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 67 | - **nouveau** - driver for nVidia nv04/nv10/nv20 |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 68 | - **radeon** - driver for ATI R100 |
| 69 | - **r200** - driver for ATI R200 |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 70 | - **swrast** - software rasterizer driver that uses the |
| 71 | swrast module |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 72 | |
| 73 | - **x11** - Xlib-based software driver |
| 74 | - **osmesa** - off-screen software driver |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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 | |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 111 | - **etnaviv** - Driver for Vivante. |
| 112 | - **freedreno** - Driver for Qualcomm Adreno. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 113 | - **i915** - Driver for Intel i915/i945. |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 114 | - **iris** - Driver for Intel gen 8 (Broadwell) and newer. |
| 115 | - **lima** - Driver for ARM Mali-400 (Utgard) series. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 116 | - **llvmpipe** - Software driver using LLVM for runtime code |
| 117 | generation. |
| 118 | - **nouveau** - Driver for NVIDIA GPUs. |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 119 | - **panfrost** - Driver for ARM Mali Txxx (Midgard) and |
| 120 | Gxx (Bifrost) GPUs. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 121 | - **radeon** - Shared module for the r600 and radeonsi |
| 122 | drivers. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 123 | - **r300** - Driver for ATI R300 - R500. |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 124 | - **r600** - Driver for ATI/AMD R600 - Northern Island (Terascale). |
| 125 | - **radeonsi** - Driver for AMD Southern Island and newer (GCN, RDNA). |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 126 | - **softpipe** - Software reference driver. |
| 127 | - **svga** - Driver for VMware's SVGA virtual GPU. |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 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. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 134 | |
| 135 | - **auxiliary** - Gallium support code |
| 136 | |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 137 | - **cso_cache** - Constant State Objects Cache. Used to filter |
| 138 | out redundant state changes between frontends and drivers. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 146 | - **gallivm** - LLVM module for Gallium. For LLVM-based |
| 147 | compilation, optimization and code generation for TGSI |
| 148 | shaders. Incomplete. |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 149 | - **hud** - Heads-Up Display, an overlay showing GPU statistics |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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. |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 155 | - **tessellator**- used by software drivers to implement |
| 156 | tessellation shaders |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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. |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 164 | - **vl** - utility code for video decode/encode |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 165 | - XXX more |
| 166 | |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 167 | - **frontends** - These implement various libraries using the |
| 168 | device drivers |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 169 | |
| 170 | - **clover** - OpenCL frontend |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 171 | - **dri** - Meta frontend for DRI drivers, see mesa/state_tracker |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 172 | - **glx** - Meta frontend for GLX |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 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 |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 179 | - **wgl** - Windows WGL frontend |
| 180 | - **xa** - XA frontend |
| 181 | - **xvmc** - XvMC frontend |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 182 | |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 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. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 187 | |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 188 | - **drm** - Direct Rendering Manager on Linux |
| 189 | - **gdi** - Windows |
| 190 | - **xlib** - indirect rendering on X Window System |
| 191 | - XXX more |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 192 | |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 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 |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 202 | drivers. |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 203 | - **loader** - Used by libGL.so to find and load the appropriate DRI driver. |
| 204 | - **panfrost** - Panfrost-specific sources |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 205 | |
Miklós Máté | ee99a7a | 2020-07-09 00:39:15 +0200 | [diff] [blame] | 206 | - **bifrost** - shader compiler for the Bifrost generation GPUs |
| 207 | - **midgard** - shader compiler for the Midgard generation GPUs |
| 208 | - **pandecode** - command stream debugger |
| 209 | |
| 210 | - **util** - Various utility codes |
| 211 | - **vulkan** - Common code for Vulkan drivers |