Direct Rendering Infrastructure

From Wikipedia, the free encyclopedia
DRI-1.0
Original author(s) Precision Insight, Tungsten Graphics
Developer(s) freedesktop.org
Initial release August 1998 (1998-08)[1]
Stable release 2.4.x / February 2009
Development status maintained, marked for obsoletion
Written in C
Platform POSIX
Type Framework / API
License MIT and other licenses[2]
Website dri.freedesktop.org
DRI-2.0
Original author(s) various
Developer(s) freedesktop.org
Initial release September 4, 2008 (2008-09-04)[3]
Stable release 2.4.x / February 2009 (2009-02)
Development status active
Written in C
Platform POSIX
Type Framework / API
License MIT and other licenses[4]
Website dri.freedesktop.org
DRI-3.0
Original author(s) Keith Packard et al.
Developer(s) freedesktop.org
Initial release November 1, 2013 (2013-11-01)[5]
Stable release November 1, 2013 (2013-11-01) / 3.0[5]
Development status development[6]
Written in C
Platform POSIX
Type Framework / API
License MIT and other licenses[7]
Website dri.freedesktop.org
There are two graphics hardware drivers: one resides inside of the X display server. There have been several designs of this driver. The current one splits it in two portions: DIX (Device-Independent X) and DDX (Device-Dependent X)
Direct Rendering Infrastructure versus indirect rendering in its early stage: the X display server is still rooted because the 2D graphics driver is part of it, and accesses the hardware directly.
Only the Direct Rendering Manager accesses the graphics hardware.

Direct Rendering Infrastructure (DRI) is an interface and a free software implementation used in the X Window System to securely allow user applications to access the video hardware without requiring data to be passed through the display server. Its primary application is to provide hardware acceleration for the Mesa implementation of OpenGL used as the core for the DRI OpenGL drivers. Without DRI, programs have to use the CPU while rendering (indirect rendering), which degrades overall performance. DRI has also been adapted to provide OpenGL acceleration on a framebuffer console without a display server running.

Components

The DRI OpenGL support consists of several pieces:

  • The Direct Rendering Manager (DRM) is a combination of at least two kernel modules, one of core DRM code and others providing APIs to userland to access different classes of video hardware.
  • The userland driver module contains an OpenGL driver that typically prepares buffers of commands to be sent to the hardware by the DRM and interacts with the windowing system for synchronization of access to the hardware.
  • Additional code provides access to the interface provided by the driver module. In X this is the libdri.so support module and a DRI-enabled DDX (2D driver). In the framebuffer implementation this is MiniGLX, which initializes the DRM and provides some X APIs to the userland driver despite the lack of a display server.

Drivers

Several open source DRI drivers have been written, including ones for ATI Mach64, ATI Rage128, ATI Radeon, 3dfx Voodoo3 through Voodoo5, Matrox G200 through G400, SiS 300-series, Intel i810 through i965, S3 Savage, VIA UniChrome graphics chipsets, and nouveau for Nvidia. Some graphics vendors have written closed-source DRI drivers, including ATI and Kyro. The DRI is supported on Linux, OpenSolaris, FreeBSD, NetBSD, and OpenBSD.

DRI

  • Single shared back buffer for screen
  • applications clip to back buffer area
  • DRI application block X
  • Only temporary allocations possible in graphics memory

DRI2

Work on DRI2 started at the 2007 X Developers' Summit. The new rendering infrastructure improves several shortcomings of the old design, including removing internal locks and adding proper support for off-screen rendering, so that compositing and XVideo/OpenGL applications are properly managed.

  • per-window stencil-/depth-/back-buffers
  • shared across applications (as required by GLX)
  • allocated from X
  • objects passed by global GEM handles (huge security issues)

DRI3

There has been talk about DRI3 (aka DRI3000) by Keith Packard and Eric Anholt at (XDC2012) and again at (LCA2013). DRI3 revolves around using POSIX file descriptors for passing kernel objects between the display server and the application instead of passing global GEM handles. As part of the proposed DRI3 is also the swap extension for swapping the screen contents in a synchronized manner. DRI3 will improve the window resizing process, improve security a bit, utilize DMA-BUF.[8]

  • client-allocated per-windows buffers (this is how "Wayland does it")
  • no sharing at all (sharing is required by GLX)
  • allocated and managed by client
  • File descriptor (FD) passing by DMA_Buf

DMA buffer sharing has been available since Linux kernel 3.3[9]

DRI3 extension

  • provides access to DRM device
  • share DRM pixel buffers between client and server
  • share buffer idle semaphore (futex) between client and server

Present extension

  • copy or flip pixmap to window
  • synchronize with vblank
  • deliver events when present occurs

GPGPU

There is a project using the Linux kernel DRI to gain direct access to the hardware for the purpose of using it as General-purpose computing on graphics processing units.

History

The project was started by Jens Owen and Kevin E. Martin of Precision Insight. It was first made widely available as part of XFree86 4.0 and is now part of the X.Org Server. It is currently maintained by the free software community.

See also

Notes

  1. "History of DRI-1.0". 
  2. Mesa DRI License / Copyright Information - The Mesa 3D Graphics Library
  3. "Announcement of DRI-2.0". 
  4. Mesa DRI License / Copyright Information - The Mesa 3D Graphics Library
  5. 5.0 5.1 "[ANNOUNCE] dri3proto 1.0". 2013-11-01. 
  6. "DRI-3.0 concepts". 
  7. Mesa DRI License / Copyright Information - The Mesa 3D Graphics Library
  8. http://keithp.com/blogs/DRI3000/
  9. "DMA buffer sharing in Linux kernel 3.3". LWN.net. 2012-01-11. 

References

External links

This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.