Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Mesa (computer graphics)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Gallium3D == {{Infobox software | name = Gallium3D | logo = | caption = | author = Tungsten Graphics (now [[VMware]]) | developer = | released = | latest release version = | latest release date = | latest preview version = 0.4<ref>{{cite web|url=https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/docs/source/conf.py|title=Build configuration file|website=cgit.freedesktop.org|publisher=Gallium documentation}}</ref> | latest preview date = {{Start date and age|df=yes|2010|04|24}} | programming language = {{#statements:programmed in}} | operating system = [[Cross-platform]] | platform = | genre = [[Graphics library]] | license = [[MIT License]] | website = {{URL|https://www.freedesktop.org/wiki/Software/gallium/}} }} '''Gallium3D''' is a set of interfaces and a collection of supporting libraries<ref>{{cite web |url=http://jrfonseca.blogspot.de/2008/04/gallium3d-introduction.html |title=Gallium3D: Introduction |date=27 April 2008 |access-date=20 June 2014 |last=Fonseca |first=José}}</ref> intended to ease the programming of [[device driver]]s for [[3D graphics]] chipsets for multiple operating systems, rendering or video acceleration APIs. It is [[free and open-source graphics device driver]] software. A feature matrix is being provided at {{URL|https://mesamatrix.net/}}. The development of Gallium3D started in 2008 at Tungsten Graphics,<ref>{{cite web |url=http://www.mesa3d.org/intro.html |title=MESA3D.org: Introduction |access-date=28 October 2016 |last=Fonseca |first=José |archive-date=2 November 2016 |archive-url=https://web.archive.org/web/20161102062539/http://www.mesa3d.org/intro.html |url-status=dead }}</ref> and the implementation is available as [[free and open-source software]] as part of [[Mesa 3D]] hosted by [[freedesktop.org]]. The primary goal of making driver development easier, bundling otherwise duplicated code of several different drivers at a single point, and to support modern hardware architectures. This is done by providing a better division of labor, for example, leaving memory management to the kernel [[Direct Rendering Infrastructure|DRI]] driver. Gallium3D has been a part of Mesa since 2009<ref>{{cite web |url = https://www.phoronix.com/scan.php?page=news_item&px=NzA1Ng |title = Gallium3D Now in Mainline Mesa Code-Base! |publisher = [[Phoronix]] |date = 11 February 2009 |access-date = 26 October 2010 }}</ref> and is currently used by the [[free and open-source]] graphics driver for [[Nvidia]] ([[nouveau (software)|nouveau]] project),<ref>{{cite web |url = https://lwn.net/Articles/270830/ |title = The state of Nouveau, part 2 |publisher = [[LWN.net]] |date = 26 February 2008 |access-date = 7 March 2008 }}</ref><ref name=companion-36> {{cite web |url = https://nouveau.freedesktop.org/wiki/Nouveau_Companion_36 |title = Nouveau Companion 36 |website = Nouveau.freedesktop.org |date = 7 March 2008 |access-date = 1 April 2008 |archive-url = https://web.archive.org/web/20130307234203/http://nouveau.freedesktop.org/wiki/Nouveau_Companion_36 |archive-date = 7 March 2013 |url-status = dead |df = dmy-all }} </ref> for AMD's [[R300]]–[[Radeon R900|R900]],<ref>{{cite web |url = https://www.phoronix.com/scan.php?page=news_item&px=NzY4Ng |title = ATI R300 Gallium3D DRI Support Is "Done" |publisher = [[Phoronix]] |date = 9 November 2009 |access-date = 15 November 2010 }}</ref><ref>{{cite web |url = https://www.phoronix.com/scan.php?page=news_item&px=ODI5NQ |title = Radeon "R600g" Gallium3D Driver Merged To [Mesa] Master |publisher = [[Phoronix]] |date = 27 May 2010 |access-date = 26 October 2010 }}</ref><ref>{{cite web |url = http://wiki.x.org/wiki/GalliumStatus |title = X.Org Wiki GalliumStatus |publisher = [[Xorg]] |date = 22 September 2010 |access-date = 7 December 2010 }}</ref> Intel's 'Iris' driver for generation 8+ iGPUs<ref>{{Cite web|url=https://gitlab.freedesktop.org/mesa/mesa/merge_requests/283|title=iris: Add a new experimental Gallium driver for Intel Gen8+ GPUs (!283) · Merge Requests · Mesa / mesa|website=GitLab|date=20 February 2019 |language=en|access-date=21 September 2019}}</ref> and for other [[Free and open-source graphics device driver|free and open-source GPU device drivers]]. === Software architecture === Gallium3D eases programming of device drivers by splitting the graphics device driver into three parts. This is accomplished by the introduction of two [[Application programming interface|interfaces]]: ''Gallium3D State Tracker Interface'' and the ''Gallium3D WinSys Interface''. The three components are called: ;Gallium3D State Tracker :Each graphical [[API]] by which a device driver is being addressed has its own State Tracker, e.g. there is a Gallium3D State Tracker for [[OpenGL]] and a different one for [[Direct3D]] or [[GLX]]. Each State Tracker contains an implementation of the Gallium3D State Tracker Interface, and is unique, this means is shared by all existent Gallium3D device drivers. ;Gallium3D hardware device driver :This is the actual code, that is specific to the underlying 3D graphic accelerator, but only as far as the Gallium3D WinSys Interface allows. There is a unique Gallium3D hardware device driver for each available graphics chip and each implements the Gallium3D State Tracker Interface as well as the Gallium3D WinSys Interface. The Gallium3D hardware device driver understands only TGSI (Tungsten Graphics Shader Infrastructure), an intermediate language for describing shaders. This code translated shaders translated from GLSL into TGSI further into [[instruction set]] implemented by the GPU. ;Gallium3D WinSys :This is specific to the underlying [[kernel (operating system)|kernel]] of the [[operating system]] and each one implements the Gallium3D WinSys Interface to interface with all available Gallium3D hardware device drivers. [[File:Mesa layers of crap 2016.svg|thumb|VC4 and freedreno can both consume NIR directly (and fall back to tgsi_to_nir for shaders that do not use glsl_to_nir).]] [[File:Linux Graphics Stack 2013.svg|thumb|Illustration of the [[Linux]] graphics stack]] [[File:Gallium3D vs DRI graphics driver model.svg|thumb|Mesa/[[Direct Rendering Infrastructure|DRI]] and Gallium3D have different driver models. Both share a lot of [[free and open-source]] code.]] [[File:Gallium3D example matrix.svg|thumb|A possible example matrix when implementing the Gallium3D driver model. Through the introduction of the Gallium3D Tracker Interface and the Gallium3D WinSys Interface, only 18 instead of 36 modules are required. Each WinSys module can work with each Gallium3D device driver module and with each State Tracker module.]] ==== Differences from classic graphics drivers ==== Gallium3D provides a unified [[API]] exposing standard hardware functions, such as [[shader]] units found on modern hardware. Thus, 3D APIs such as [[OpenGL]] 1.x/2.x, OpenGL 3.x, [[OpenVG]], [[GPGPU]] infrastructure or even [[Direct3D]] (as found in the [[Wine (software)|Wine]] compatibility layer) will need only a single back-end, called a state tracker, targeting the Gallium3D API. By contrast, classic-style DRI device drivers require a different back-end for each hardware platform and several other APIs need translation to OpenGL at the expense of code duplication.<ref>{{cite web |url = http://www.tungstengraphics.com/technologies/gallium3d.html |archive-url = https://web.archive.org/web/20080503021058/http://www.tungstengraphics.com/technologies/gallium3d.html |url-status = dead |archive-date = 3 May 2008 |title = TG-Gallium3D |publisher = Tungsten Graphics |access-date = 1 April 2008 }}</ref><ref>{{cite web |url = http://zrusin.blogspot.com/2008/02/gpgpu.html |title = GPGPU |last = Rusin |first = Zack |date = 6 February 2008 |access-date = 1 April 2008 }}</ref><ref>{{cite web |url = http://zrusin.blogspot.com/2008/02/openvg-and-accelerating-2d.html |title = OpenVG and accelerating 2D |last = Rusin |first = Zack |date = 7 February 2008 |access-date = 1 April 2008 }}</ref> All vendor device drivers, due to their proprietary and closed-source nature, are written that way meaning that, e.g. the [[AMD Catalyst]] implements both [[OpenGL]] and [[Direct3D]], and the vendor drivers for the [[GeForce]] have their implementations. Under Gallium3D, [[Direct Rendering Manager]] (DRM) kernel drivers will manage the memory and [[Direct Rendering Infrastructure|Direct Rendering Interface]] (DRI2) drivers will be more GPU processing oriented.<ref>{{cite web |url = http://wiki.x.org/wiki/DRI2 |title = DRI2 |date = 4 October 2007 |access-date = 1 April 2008 |url-status = dead |archive-url = https://web.archive.org/web/20080704122122/http://wiki.x.org/wiki/DRI2 |archive-date = 4 July 2008 |df = dmy-all }}</ref> During the transition period from userspace modesetting to kernelspace modesetting some of the Mesa 3D drivers, such as the radeon driver or Intel's drivers, ended up supporting both DRI1 and DRI2 and used DRI2 if available on the system. Gallium3D additionally requires a level of shader support that is not available on older cards like e.g. ATi r100-r200 so users for those cards need to keep using Mesa 3D with DRI2 for their 3D usage. ==== Tungsten Graphics Shader Infrastructure ==== Tungsten Graphics Shader Infrastructure ([[TGSI]]) is an [[Intermediate representation]] like [[LLVM Intermediate Representation]] or the new [[Standard Portable Intermediate Representation]] (SPIR) to be used by the [[Vulkan API]] and OpenCL 2.1. Shaders written in [[OpenGL Shading Language]] are to be translated/compiled into TGSI, then optimizations are made, and then the TGSI shaders are being compiled into shaders for the [[instruction set]] of the used GPU. NIR is the new Layer representation in Mesa with full SPIR-V support and since 2019 main development area of all newer drivers with OpenGL 4.6 support. ==== LLVM usage ==== [[File:GlassyMesa3D.svg|thumb|GlassyMesa is an LLVM-based compiler stack for shaders written in [[OpenGL Shading Language|GLSL]]. For SSA see the article [[Static single assignment form]].]] In addition, using the modular structure of Gallium3D, there is an effort underway to use the [[LLVM]] compiler suite and create a module to optimize [[shader]] code on the fly.<ref>{{cite web |url = http://zrusin.blogspot.com/2007/11/gallium3d-llvm.html |title = Gallium3D LLVM |last = Rusin |first = Zack |date = 2 November 2007 |access-date = 1 April 2008 }}</ref> The library represents each shader program using an extensible binary intermediate representation called Tungsten Graphics Shader Infrastructure (TGSI), which LLVM then translates into [[GLSL]] shaders optimized for target hardware. === Adoption === Several [[free and open-source]] graphics [[device driver]]s, which have been, or are being written based on information gained through [[Clean room design|clean-room]] [[reverse engineering]], adopted the driver model provided by Gallium3D, e.g. [[nouveau (software)|nouveau]] and others (''see [[Free and open-source graphics device driver]] for a complete list''). The main reason may be that the Gallium3D driver model lessens the amount of code required to be written.{{Original research inline|date=March 2017}} Of course, being licensed under a free software license, this code can at any time by anybody be rewritten to implement the DRI-, or some other, driver model. === History === Original authors of Gallium3D were Keith Whitwell and Brian Paul at Tungsten Graphics (acquired by [[VMware]] in 2008).<ref>{{cite web |last=Marshall |first=David |date=16 December 2008 |title=VMware's year end acquisition of Tungsten Graphics |publisher=InfoWorld |url=http://www.infoworld.com/article/2638430/virtualization/vmware-s-year-end-acquisition-of-tungsten-graphics.html }}</ref> ==== Milestones ==== As of fall 2011, there were at least 10 known, mature and working Gallium3D drivers.<ref>{{cite web |url = https://www.freedesktop.org/wiki/Software/gallium/ |title = Gallium |website= Freedesktop.org |date = 2 November 2011 |access-date = 24 August 2012 }}</ref>{{Failed verification|date=October 2013}}{{Citation needed|date=October 2013}} Open-source drivers for Nvidia graphics cards by the name of [[nouveau (software)|Nouveau]] team develops its drivers using the Gallium3D framework.<ref name=companion-36 /><ref> {{cite web |url = https://nouveau.freedesktop.org/wiki/Nouveau_Companion_37 |title = Nouveau Companion 37 |website = Nouveau.freedesktop.org |date = 21 March 2008 |access-date = 1 April 2008 |archive-url = https://web.archive.org/web/20120208005444/http://nouveau.freedesktop.org/wiki/Nouveau_Companion_37 |archive-date = 8 February 2012 |url-status = dead |df = dmy-all }} </ref> '''2008-07-13:''' Nouveau development is done exclusively for the Gallium framework. The old DRI driver was removed from the master branch of the Mesa repository on Freedesktop.org.<ref>{{cite web |url = https://cgit.freedesktop.org/mesa/mesa/commit/?id=93115c4b235896df097b91edec7458a8a4488c4e |title = nouveau: say goodbye to the old DRI driver... (cgit on FDO)|website=Cgit.freedesktop.org |date = 13 July 2008 }}</ref> '''2009-02-11:''' The gallium-0.2 branch was merged into mainline Master branch of Mesa.<ref>{{cite web |url = https://www.phoronix.com/scan.php?page=news_item&px=NzA1Ng |title = Gallium3D Now in Mainline Mesa Code-Base!|website=Phoronix.com |date = 11 February 2009 }}</ref> Development is done in Mesa mainline. '''2009-02-25:''' Gallium3D can run on Linux as well as FreeBSD kernels.<ref>{{cite web |last=Larabel |first=Michael |author-link=Michael Larabel |date=25 February 2009 |title=Gallium3D, EGL Now Buildable on FreeBSD |publisher=[[Phoronix]] |url=https://www.phoronix.com/scan.php?page=news_item&px=NzA5Mg }}</ref> '''2009-05-01:''' Zack Rusin from Tungsten Graphics added the [[OpenVG]] state tracker to Mesa 3D,<ref>{{cite web |url = http://sourceforge.net/mailarchive/forum.php?thread_name=200905011303.10970.zackr@vmware.com&forum_name=mesa3d-dev |title = OpenVG state tracker is in Mesa 3D|website=Sourceforge.net |date = 1 May 2009 }}</ref> which enables [[Scalable Vector Graphics]] to be hardware-accelerated by any Gallium3D-based driver. '''2009-07-17:''' Mesa3D 7.5 is released, the first version to include Gallium3D.<ref> {{cite web |url = http://www.mesa3d.org/relnotes-7.5.html |title = Mesa 7.5 Release Notes / 17 July 2009 |website = Mesa3d.org |date = 17 July 2009 |access-date = 12 September 2017 |archive-url = https://web.archive.org/web/20100613083500/http://mesa3d.org/relnotes-7.5.html |archive-date = 13 June 2010 |url-status = dead |df = dmy-all }} </ref> '''2010-09-10:''' Initial support for the Evergreen GPUs was added to the r600g driver.<ref>{{cite web |url = https://cgit.freedesktop.org/mesa/mesa/commit/?id=50526e094f4c66957c7f74c190c35903bc82fb62 |title = r600g: add initial evergreen support (cgit on FDO)|website=Cgit.freedesktop.org |date = 10 September 2010 }}</ref> '''2010-09-21:''' There are two Gallium3D drivers for ATI hardware known as r300g and r600g for R300-R500 and R600-Evergreen GPUs respectively. '''2010-09-21:''' Major commits were made to the code to support Direct3D 10 and 11.<ref>{{cite web |url = https://cgit.freedesktop.org/mesa/mesa/commit/?id=92617aeac109481258f0c3863d09c1b8903d438b |title = d3d1x: add new Direct3D 10/11 COM state tracker for Gallium|website=Cgit.freedesktop.org |date = 21 September 2010 }}</ref> In time, this might offer the ability to use recent Direct3D implementations on Linux systems. '''2011-11-30:''' Intel 965g and Cell Gallium drivers were removed from the master branch of Mesa as unmaintained and broken.<ref>{{cite web |url = https://www.phoronix.com/scan.php?page=news_item&px=MTAyMTA |title = The Gallium3D Intel 965 Driver Gets Dropped |publisher = [[Phoronix]] |last = Larabel |first = Michael |author-link = Michael Larabel |page = 1 |date = 30 November 2011 |access-date = 1 December 2011 }}</ref><ref>{{cite web |url = https://www.phoronix.com/scan.php?page=news_item&px=MTAyMTM |title = The Gallium3D Cell Driver Gets Dropped Too |publisher = [[Phoronix]] |last = Larabel |first = Michael |author-link = Michael Larabel |page = 1 |date = 30 November 2011 |access-date = 1 December 2011 }}</ref> '''2013-11-30:''' Mesa 10 with OpenGL 3.2, 3.3 and OpenCL 1.0+ '''2014-11-18:''' Major commits were made to the code to support Direct3D 9.<ref>{{cite web |url = https://cgit.freedesktop.org/mesa/mesa/commit/?id=fdd96578ef2dfe9c4ad5aab5858036298d444a64 |title = nine: Add state tracker nine for Direct3D9 (v3)|website=Cgit.freedesktop.org |date = 18 November 2014 }}</ref> '''2015-09-15:''' Mesa 11 with OpenGL 4.0, 4.1 and OpenCL 1.2 (incomplete) '''2015-12-15:''' Mesa 11.1 Driver VIRGL for virtual machines with OpenGL 3.3 '''2016-07-08:''' Mesa 12 with OpenGL 4.2, 4.3 and Vulkan 1.0 (Intel ANV and AMD RADV) '''2016-11-01:''' Mesa 13 with OpenGL 4.4 and OpenGL ES 3.2 '''2017-02-13:''' Mesa 17.0 with OpenGL 4.5 and freedreno driver with OpenGL 3.0 and 3.1 '''2017-05-10:''' Mesa 17.1 OpenGL 4.2+ for Intel Ivy Bridge (more than Intel driver for Windows, OpenGL 3.3+ for Intel Open SWR Rasterizer (important for cluster Computer for huge simulations) '''2017-12-08:''' Mesa 17.3 AMD Vulkan Driver RADV full compliant in Khronos Test of Vulkan 1.0 '''2018-05-18:''' Mesa 18.1 with Vulkan 1.1 (Intel ANV and AMD RADV) '''2018-09-07:''' Mesa 18.2 with OpenGL 4.3 for Soft Driver VIRGL (important for virtual machines in cloud Cluster Computer), OpenGL ES 3.1 for Freedreno with Adreno A5xx '''2019-06-11:''' Mesa 19.1 released with Intel's next generation 'iris' graphics driver for generation 8+ iGPUs<ref>{{Cite web|url=https://www.phoronix.com/scan.php?page=news_item&px=Mesa-19.1.0-Released|title=Mesa 19.1 Released With Experimental Intel Gallium3D, Other New GL/VLK Drivers Too - Phoronix|website=www.phoronix.com|access-date=21 September 2019}}</ref> '''2019-12-11:''' Mesa 19.3 released OpenGL 4.6 with Intel i965 with gen 7+ and optional Iris Gen 8+ '''2020-03-18:''' Mesa 20.0 released OpenGL 4.6 with AMD GCN and Vulkan 1.2 for Intel '''2020-05-27:''' Mesa 20.1 released NIR vectorisation support and shared virtual memory support for OpenCL in Clover '''2020-11-30:''' Mesa 20.3 full support of OpenCL 1.2 in Clover<ref name="ReferenceC"/> '''2021-03-11:''' Mesa 21.0 initial support of "D3D12“: Direct 3D 12 for WSL2 in Windows 10 with OpenGL 3.3+, ARM Freedreno: OpenGL 3.3+ '''2021-05-05:''' Mesa 21.1 initial support of Google VirtIO GPU Driver "Venus“ with Vulkan 1.2+; Zink: OpenGL 4.6+, OpenGL ES 3.1+; Qualcomm Turnip, Lavapipe: Vulkan 1.1+ '''2021-08-04:''' Mesa 21.2 initial support of new Intel Crocus OpenGL 4.6 driver based on gallium3D to Intel Sandy Bridge to Haswell for old i965, Vulkan Driver panVK for ARM Panfrost '''2022-03-09:''' Mesa 22.0 full support of Vulkan 1.3 by Intel Anvil and AMD RADV '''2023-05-10:''' Mesa 23.1 OpenCL with Rust: RustiCL for AMD GCN Hardware available (more hardware wip)<ref>{{cite web | url=https://www.phoronix.com/news/Mesa-23.1-Released | title=Mesa 23.1 Released with RadeonSI Rusticl-OpenCL, RADV GPL }}</ref> '''2023-09-30:''' Mesa 23.2 with Apple Asahi OpenGL 3.1 and OpenGL ES 3.0, RADV supports Ray Tracing in AMD RDNA 2 and 3, Intel Anvil Vulkan H.265 decoding support <ref>{{cite web | url=https://www.phoronix.com/news/Mesa-23.2-Branched | title=Mesa 23.2 Feature Development Concludes with Numerous New Vulkan Extensions }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)