Mesa (computer graphics)

From Wikipedia, the free encyclopedia
  (Redirected from Mesa 3D (OpenGL))
Jump to: navigation, search
Original author(s) Brian Paul
Developer(s) Intel, AMD, VMware (previously Tungsten Graphics)[1]
Initial release August 1, 1993; 20 years ago (1993-08-01)[citation needed]
Stable release 10.1 / March 4, 2014; 43 days ago (2014-03-04)[2]
Development status active
Written in C, C++, Assembly[3]
Operating system Cross-platform (Linux, BSD, et al.)
Type Graphics library
License MIT License[4]

Mesa is a collection of free and open-source libraries that implement OpenGL and several other APIs related to hardware-accelerated 3D rendering, 3D computer graphics and GPGPU. Mesa is hosted by and used on Linux, BSD and other operating systems. Additionally to the APIs, Mesa also harbors the available free implementations of graphics device drivers. The development of Mesa started in August 1993 by Brian Paul, who still maintains the package, by now containing numerous contributions from various other people and companies worldwide, due to its broad adoption.

Software architecture[edit]

Video games outsource rendering calculations to the GPU over OpenGL in real-time. Shaders are written in OpenGL Shading Language and compiled. The compiled programs are executed on the GPU.
Illustration of the Linux graphics stack

Graphic API implementations[edit]

The free implementations of Wayland rely upon the Mesa implementation of EGL. The special library called libwayland-EGL, written to accommodate access to the framebuffer, should be have been made obsoleted by EGL 1.5 release. On the GDC 2014, AMD was exploring a strategy change towards using DRM instead of their in-kernel blob.[5]

Mesa is known as housing implementation of graphic APIs. Historically the main API that Mesa has implemented is OpenGL, along with other Khronos Group related specifications (like OpenVG, OpenGL ES or recently EGL). But Mesa can implement other APIs and indeed it did with Glide. There had been patches to support Direct3D Windows API, but neither of those are currently in the main line.

The supported version of the different graphic APIs depends on the driver, because each hardware driver has its own implementation (and therefore status). This is specially true for DRI drivers, while the Gallium3D drivers share common code that tend to homogenize the supported extensions and versions.

Mesa 10 complies with OpenGL 3.3, for Intel, AMD/ATI and Nvidia GPU hardware.[6] It has not yet achieved full OpenGL 4 compliance at any level.[7] Mesa maintains a support matrix with the status of the current OpenGL 3 conformance.[8]

API OpenGL OpenGL ES OpenVG EGL GLX Glide Direct3D
Current Version Date 4.4
Current stable version: 10.0 (2013-11-30)[9] 3.3[10] 3.0 1.1 1.4 1.4 deprecated 9.3 (and some of 10/11[11])
Older version, yet still supported: 9.0 (2012-10-08) 3.1[12] 2.0 1.1 1.4 1.4  ?  ?
Old version, no longer supported: 8.0 (2012-02-08) 3.0 2.0 1.1 1.4 1.4  ?  ?
Old version, no longer supported: 7.0 (2007-06-22) 2.1 N/A N/A N/A 1.4  ?  ?
Old version, no longer supported: 6.0 (2004-01-06) 1.5 N/A N/A N/A 1.3  ?  ?
Old version, no longer supported: 5.0 (2002-11-13) 1.4 N/A N/A N/A 1.3  ?  ?
Old version, no longer supported: 4.0 (2001-10-22) 1.3 N/A N/A N/A 1.3  ?  ?
Old version
Older version, still supported
Latest version
Latest preview version
Future release

The Wine (software) project wrote a free and open-source implementation of version 9.3 of the Direct3D rendering API. In conjunction with the Gallium3D Direct3D 9 State Tracker, Direct3D 9 games can be played at high frame rates on Linux.[citation needed]

Device driver implementations[edit]

DRI and Gallium3D have different driver models. Both share a lot of free and open-source code

The available free and open-source device drivers for graphic chipsets are "stewarded" by Mesa (because the existing free and open-source implementation of APIs are developed inside of Mesa). Currently there are two frameworks to write graphics drivers: DRI and Gallium3D.

There are device drivers for AMD/ATI R100 to R800, Intel, and Nvidia cards with 3D acceleration. Previously drivers existed for the IBM/Toshiba/Sony Cell APU of the PlayStation 3, S3 Virge & Savage chipsets, VIA chipsets, Matrox G200 & G400, and more.[13]

The free and open-source drivers compete with proprietary closed-source drivers. Depending on the availability of hardware documentation and man-power, the free and open-source driver lag behind more or less in supporting 3D acceleration of new hardware. Also, 3D rendering performance is usually significantly slower [1][2][3][4][5], with some notable exceptions, where the free and open-source driver perform better than the vendor drivers.

Direct Rendering Infrastructure (DRI)[edit]

At the time 3D graphics cards became more mainstream for PCs, individuals partly supported by some companies began working on adding more support for hardware-accelerated 3D rendering to Mesa.[when?] The Direct Rendering Infrastructure (DRI) was one of these approaches to interface Mesa, OpenGL and other 3D rendering API libraries with the device drivers and hardware. After reaching a basic level of usability, DRI support was officially added to Mesa. This significantly broadened the available range of hardware support achievable when using the Mesa library.[14]

With adapting to DRI, the Mesa library finally took over the role of the front end component of a full scale OpenGL framework with varying backend components that could offer different degrees of 3D hardware support while not dropping the full software rendering capability. The total system used many different software components.[14]

While the design requires all these components to interact carefully, the interfaces between them are relatively fixed. Nonetheless, as most components interacting with the Mesa stack are open source, experimental work is often done through altering several components at once as well as the interfaces between them. If such experiments prove successful, they can be incorporated into the next major or minor release. That applies e.g. to the update of the DRI specification developed in the 2007-2008 timeframe. The result of this experimentation, DRI2, operates without locks and with improved back buffer support. For this, a special git branch of Mesa was created.[15]


Gallium3D was developed by Tungsten Graphics as a means to simplify the writing of device drivers and also to achieve maximum portability of them, without having to rewrite the source code. The main disadvantage is, that by introducing additional interfaces, namely the Gallium3D WinSys Interface, the full capabilities of the underlying hardware can not be accessed by the device drivers.

Software renderer[edit]

Mesa also contains an implementation of software rendering.



Project initiator Brian Paul was a graphics hobbyist. He thought it would be fun to implement a simple 3D graphics library using the OpenGL API, which he might then use instead of VOGL (very ordinary GL Like Library).[16] Beginning in 1993, he spent eighteen months of part-time development before he released the software on the Internet. The software was well received, and people began contributing to its development. Mesa started off by rendering all 3D computer graphics on the CPU. Despite this, the internal architecture of Mesa was designed to be open for attaching to graphics processor-accelerated 3D rendering. In this first phase, rendering was done indirectly in the display server, leaving some overhead and noticeable speed lagging behind the theoretical maximum. The Diamond Monster 3D, using the Voodoo Graphics chipset, was one of the first 3D hardware devices supported by Mesa.

The first true graphics hardware support was added to Mesa in 1997, based upon the Glide API for the once new 3dfx Voodoo I/II graphics cards and their successors.[14] A major problem of using Glide as the acceleration layer was the habit of Glide to run full screen, which was only suitable for computer games. Further, Glide took the lock of the screen memory, and thus the display server was blocked from doing any other GUI tasks.[17]

See also[edit]


  1. ^ David Marshall (2008-12-16). "VMware's year end acquisition of Tungsten Graphics". InfoWorld. Retrieved 08-06-2011. 
  2. ^ "Mesa 10.1 Release Notes". 
  3. ^ "Mesa". Ohloh. Retrieved 08-06-2011. 
  4. ^ "Mesa3D license". 
  5. ^ "AMD exploring new Linux driver Strategy". 2014-03-22. Retrieved 2014-03-23. 
  6. ^ Status of OpenGL 3.x features in Mesa
  7. ^ "Nine Reasons Mesa 9.0 Is Disappointing For End-Users". 2012-10-09. 
  8. ^
  9. ^ "[Mesa-announce] Mesa 10.0 released". 
  10. ^ "". 
  11. ^
  12. ^
  13. ^ Direct Rendering Infrastructure Status Page on
  14. ^ a b c Brian Paul (2000-08-10). "Introduction to the Direct Rendering Infrastructure". Retrieved 2012-01-25. 
  15. ^ "DRI2". Retrieved 2012-01-25. 
  16. ^ "Mesa Introduction". Mesa Team. Retrieved 24 January 2013. 
  17. ^ "What's the relationship between Glide and DRI?". Retrieved 2012-01-25. 

External links[edit]

Various layers within Linux, also showing separation between the userland and kernel space
User mode User applications e.g. bash, LibreOffice, Blender, 0 A.D.
Low-level system components: System daemons:
systemd, logind, networkd, soundd, ...
Windowing system:
display server
Other libraries:
GLib, GTK+, Qt, EFL, SDL, SFML, FLTK, GNUstep, etc.
Mesa 3D, AMD Catalyst, ...
C standard library open, exec, sbrk, socket, fopen, calloc, ... (up to 2000 subroutines)
glibc aims to be POSIX/SUS-compatible, uClibc targets embedded systems, bionic written for Android, etc.
Kernel mode Linux kernel stat, splice, dup, read, open, ioctl, write, mmap, close, exit, etc. (about 380 system calls)
The Linux kernel System Call Interface (SCI, aims to be POSIX/SUS-compatible)
Process scheduling
Memory management
Virtual files
Articles: ALSA, DRI, evdev, LVM, device mapper, Linux Network Scheduler, Netfilter
Linux Security Modules: SELinux, TOMOYO, AppArmor, Smack
Hardware (CPU, main memory, data storage devices, etc.)