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