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 (slowly) through the X server.
Its primary application is to provide hardware acceleration of the Mesa implementation of OpenGL. Mesa 的硬件加速就是通过 DRI 来实现的。
It has also been adapted to provide OpenGL acceleration on a framebuffer console without an X Server running.
Introduction to the Direct Rendering Infrastructure
来自参考资料4 |
libGL:
3D driver:
DRI extension:
2D Driver:
DRM core module
DRM module:
SAREA:
Details:
Direct Rendering Infrastructure: Architecture
DRI Data Flow Diagram |
This overview diagram shows the different paths which the data takes from the program to the graphics hardware.
Starting at the left from the top.
Direct rendering program (3D):
Direct rendering (3D data) -> 3D data -> Graphics Hardware
Direct rendering program (2D):
X Protocol Encode -> Protocol Decode -> DIX -> XAA -> DDX Driver -> Graphics Hardware
3D and 2D commands share the same transport / protocol arrow / stream between the indirect rendering program (client) and the X Server. It's not until the protocol is decoded in the X Server that they diverge.
Indirect rendering program (2D):
X Protocol Encode -> Protocol Decode -> DIX -> XAA -> DDX Driver -> Graphics Hardware
Indirect rendering program (3D):
X Protocol Decode -> GLX -> Mesa (including SW rasterizer) -> DDX Driver -> Graphics Hardware
DRI Control Flow Diagram |
3D and 2D commands share the same transport / protocol arrow / stream between the indirect rendering program (client) and the X Server. It's not until the protocol is decoded in the X Server that they diverge.
Indirect rendering program (3D):
X Protocol Decode -> GLX -> Mesa (including SW rasterizer) -> DDX Driver -> Graphics Hardware
Indirect rendering program (2D):
X Protocol Encode -> Protocol Decode -> DIX -> XAA -> DDX Driver -> Graphics Hardware
2D only program (2D):
X Protocol Encode -> Protocol Decode -> DIX -> XAA -> DDX Driver -> Graphics Hardware
RM and 2D commands share the same transport / protocol arrow / stream between the indirect rendering program (client) and the X Server. It's not until the protocol is decoded in the X Server that they diverge.
Direct rendering program (2D):
X Protocol Encode -> Protocol Decode -> DIX -> XAA -> DDX Driver -> Graphics Hardware
Direct rendering program (RM):
X Protocol Encode -> Protocol Decode -> DRI Module (-> DDX Driver) -> DRM Lib =>> SAREA & Kernel
Direct rendering program (3D):
Direct rendering (3D data) -> 3D data -> Graphics Hardware
Resource management:
SAREA & Kernel
3DDRP Internals:
Origins of 3D , RM , 2D & RM (x transport)
Direct Rendering Infrastructure, Low Level Design Document
The Direct Rendering Manager, Kernel Support for the Direct Rendering Infrastructure
Hardware Locking for the Direct Rendering Infrastructure
A Security Analysis of the Direct Rendering Infrastructure
DRI Extensions for supporting the Direct Rendering Protocol Specification
The DRM Memory manager
TTMFencing - Information on fencing and flushes using TTM
The DRI OpenGL support consists of several pieces: