A display list, also called a
command list in
Direct3D 12 and a
command buffer in
Vulkan
Vulkan is a cross-platform API and open standard for 3D graphics and computing. It was intended to address the shortcomings of OpenGL, and allow developers more control over the GPU. It is designed to support a wide variety of GPUs, CPUs and o ...
, is a series of graphics commands or instructions that are run when the list is executed. Systems that make use of display list functionality are called
retained mode systems, while systems that do not are as opposed to
immediate mode systems. In OpenGL, display lists are useful to redraw the same geometry or apply a set of state changes multiple times.
This benefit is also used with Direct3D 12's bundle command lists. In Direct3D 12 and Vulkan, display lists are regularly used for per-frame recording and execution.
Origins in vector displays
The
vector monitor
A vector monitor, vector display, or calligraphic display is a display device used for computer graphics up through the 1970s. It is a type of CRT, similar to that of an early oscilloscope. In a vector display, the image is composed of drawn ...
s or ''calligraphic displays'' of the 1960s and 1970s used
electron beam
Since the mid-20th century, electron-beam technology has provided the basis for a variety of novel and specialized applications in semiconductor manufacturing, microelectromechanical systems, nanoelectromechanical systems, and microscopy.
Mechani ...
deflection to draw
line segment
In geometry, a line segment is a part of a line (mathematics), straight line that is bounded by two distinct endpoints (its extreme points), and contains every Point (geometry), point on the line that is between its endpoints. It is a special c ...
s, points, and sometimes curves directly on a
CRT screen
A cathode-ray tube (CRT) is a vacuum tube containing one or more electron guns, which emit electron beams that are manipulated to display images on a phosphorescent screen. The images may represent electrical waveforms on an oscilloscope, a ...
. Because the image would immediately fade, it needed to be redrawn many times a second (
storage tube CRTs retained the image until blanked, but they were unsuitable for interactive graphics). To refresh the display, a dedicated CPU called a Display Processor or Display Processing Unit (DPU) was used, which had a memory buffer for a "display list", "display file", or "display program" containing line segment coordinates and other information. Advanced Display Processors also supported
control flow
In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an '' ...
instructions, which were useful for drawing repetitive graphics such as text, and some could perform
coordinate transformations
In geometry, a coordinate system is a system that uses one or more numbers, or coordinates, to uniquely determine and standardize the position of the points or other geometric elements on a manifold such as Euclidean space. The coordinates are ...
such as
3D projection
A 3D projection (or graphical projection) is a Design, design technique used to display a three-dimensional (3D) object on a two-dimensional (2D) surface. These projections rely on perspective (graphical), visual perspective and aspect analysi ...
.
Home computer display list functionality
One of the earliest systems with a true display list was the
Atari 8-bit computers
The Atari 8-bit computers, formally launched as the Atari Home Computer System, are a series of home computers introduced by Atari, Inc., in 1979 with the Atari 400 and Atari 800. The architecture is designed around the 8-bit MOS Technology 650 ...
. The display list (actually called so in Atari terminology) is a series of instructions for
ANTIC, the video co-processor used in these machines. This program, stored in the computer's memory and executed by ANTIC in real-time, can specify blank lines, any of six text modes and eight graphics modes, which sections of the screen can be horizontally or vertically fine-scrolled, and trigger Display List Interrupts (called
raster interrupts or
HBI on other systems).
The
Amstrad PCW family contains a Display List function called the 'Roller RAM'. This is a 512-byte RAM area consisting of 256 16-bit pointers in RAM, one for each line of the 720 × 256 pixel display. Each pointer identifies the location of 90 bytes of monochrome pixels that hold the line's 720 pixel states. The 90 bytes of 8 pixel states are spaced at 8-byte intervals, so there are 7 unused bytes between each byte of pixel data. This suits how the text-orientated PCW constructs a typical screen buffer in RAM, where the first character's 8 rows are stored in the first 8 bytes, the second character's rows in the next 8 bytes, and so on. The Roller RAM was implemented to speed up display scrolling as it would have been unacceptably slow for its 3.4 MHz Z80 to move up the 23 KB display buffer 'by hand' i.e. in software. The Roller RAM starting entry used at the beginning of a screen refresh is controlled by a Z80-writable I/O register. Therefore, the screen can be scrolled simply by changing this I/O register.
Another system using a Display List-like feature in hardware is the
Amiga
Amiga is a family of personal computers produced by Commodore International, Commodore from 1985 until the company's bankruptcy in 1994, with production by others afterward. The original model is one of a number of mid-1980s computers with 16-b ...
, which, not coincidentally, was also designed by some of the same people who developed the custom hardware for the Atari 8-bit computers. Once directed to produce a display mode, it would continue to do so automatically for every following scan line. The computer also included a dedicated co-processor, called "
Copper
Copper is a chemical element; it has symbol Cu (from Latin ) and atomic number 29. It is a soft, malleable, and ductile metal with very high thermal and electrical conductivity. A freshly exposed surface of pure copper has a pinkish-orang ...
", which ran a simple program or 'Copper List' intended for modifying hardware registers in sync with the display. The Copper List instructions could direct the Copper to wait for the display to reach a specific position on the screen, and then change the contents of hardware registers. In effect, it was a processor dedicated to servicing
raster interrupts. The Copper was used by Workbench to mix multiple display modes (multiple resolutions and color palettes on the monitor at the same time), and by numerous programs to create rainbow and gradient effects on the screen. The Amiga Copper was also capable of reconfiguring the sprite engine mid-frame, with only one scanline of delay. This allowed the Amiga to draw more than its 8 hardware sprites, so long as the additional sprites did not share scanlines (or the one scanline gap) with more than 7 other sprites. i.e., so long as at least one sprite had finished drawing, another sprite could be added below it on the screen. Additionally, the later 32-bit AGA chipset allowed the drawing of bigger sprites (more pixels per row) while retaining the same multiplexing. The Amiga also had dedicated block-shifter ("blitter") hardware, which could draw larger objects into a framebuffer. This was often used in place of, or in addition to, sprites.
In more primitive systems, the results of a display list can be simulated, though at the cost of CPU-intensive writes to certain display modes, color control, or other visual effect registers in the video device, rather than a series of rendering commands executed by the device. Thus, one must create the displayed image using some other rendering process, either before or while the CPU-driven display generation executes. In many cases, the image is also modified or re-rendered between
frames. The image is then displayed in various ways, depending on the exact way in which the CPU-driven display code is implemented.
Examples of the results possible on these older machines requiring CPU-driven video include effects such as Commodore 64/128'
FLImode, or
Rainbow Processing on the ZX Spectrum.
Usage in OpenGL
To delimit a display list, the
glNewList
and
glEndList
functions are used, and to execute the list, the
glCallList
function is used. Almost all rendering commands that occur between the function calls are stored in the display list. Commands that affect the client state are not stored in display lists.
Display lists are named with an integer value, and creating a display list with the same name as one already created overrides the first.
The
glNewList
function expects two arguments: an integer representing the name of the list, and an enumeration for the compilation mode. The two modes include
GL_COMPILE_AND_EXECUTE
, which compiles and immediately executes, and
GL_COMPILE
, which only compiles the list.
Display lists enable the use of the
retained mode rendering pattern, which is a system in which graphics commands are recorded (retained) to execute in succession at a later time. This is contrary to
immediate mode, where graphics commands are immediately executed on client calls.
Usage in Direct3D 12
Command lists are created using the
ID3D12Device::CreateCommandList
function.
Command lists may be created in several types: direct, bundle, compute, copy, video decode, video process, and video encoding. Direct command lists specify that a command list the GPU can execute, and doesn't inherit any GPU state.
Bundles, are best used for storing and executing small sets of commands any number of times. This is used differently than regular command lists, where commands stored in a command list are typically executed only once.
Compute command lists are used for general computations, with a common use being calculating
mipmap
In computer graphics, a mipmap (''mip'' being an acronym of the Latin phrase ''multum in parvo'', meaning "much in little") is a pre-calculated, optimized sequence of images, each of which has an image resolution which is a factor of two small ...
s.
A copy command list is strictly for copying and the video decode and video process command lists are for video decoding and processing respectively.
Upon creation, command lists are in the recording state. Command lists may be re-used by calling the
ID3D12GraphicsCommandList::Reset
function. After recording commands, the command list must be transitioned out of the recording state by calling
ID3D12GraphicsCommandList::Close
. The command list is then executed by calling
ID3D12CommandQueue::ExecuteCommandLists
.
See also
*
List of home computers by video hardware
*
Scanline rendering
Scanline rendering (also scan line rendering and scan-line rendering) is an algorithm for visible surface determination, in 3D computer graphics, that works on a row-by-row basis rather than a polygon-by-polygon or pixel-by-pixel basis. All of ...
Further reading
* White, Steven; Danielsson, David; Jenks, Alma; Satran, Michael (2023-03-08). "Design Philosophy of Command Queues and Command Lists - Win32 apps". ''learn.microsoft.com''. Retrieved 2024-01-26.
References
{{reflist
Computer graphics
OpenGL
DirectX