Graphics Reference
In-Depth Information
The distinction between an abstraction and its implementation, and the value
conferred by this distinction, are familiar concepts in software development. Infor-
mation hiding was introduced by Parnas in 1972 [Par72]. Today C++ develop-
ers isolate implementation details behind interfaces constructed using abstract
classes. Prior to the development of C++, C programmers were trained to use
functions, header files, and isolated code files to achieve many of the benefits that
C++ classes came to provide.
The importance of separating interface and implementation was identified
even earlier by computer hardware developers. Gerrit Blaauw and Fred Brooks,
who with Gene Amdahl and others brought computing into the modern age with
the creation of the IBM System/360 in 1964 [ABB64], define the architecture of
a system as “the system's functional appearance to its immediate user, its concep-
tual structure and functional behavior as seen by one who programs in machine
language” [BJ97]. They use the terms implementation and realization to refer
to the logical organization and physical embodiment of a system. Careful dis-
tinction between architecture and implementation 2 allowed the System/360 to be
implemented as a family of computers, with differing implementations and real-
izations (and correspondingly different costs and performances), but a single inter-
face exposed to programmers. Code written for one member of the family was
guaranteed to run correctly on all other family members.
By analogy, Direct3D, which was introduced in Chapter 16 and further dis-
cussed in Section 15.7, and OpenGL specify the architecture of modern GPUs.
They enable code portability just as the System/360 architecture did. But the anal-
ogy runs deeper. Both GPU architectures and CPU architectures do the following.
• They allow for differences in configuration, which for CPUs includes
memory size, disk storage capacity, and I/O peripherals, and for GPUs
includes framebuffer size, texture memory capacity, and specific color cod-
ings available in each.
• They make no specification of absolute performance, allowing implemen-
tations to cover a wide gamut of cost and optimization.
• They tightly specify the semantics of all inputs, both valid and invalid, to
further ensure code compatibility.
An important way that GPU and CPU architectures differ is in level: Direct3D
and OpenGL are specified as libraries of function calls, which are compiled into
application code, while CPUs are described by instruction set architectures, or
ISAs, for which instructions are generated by a compiler. The relatively higher
level of abstraction of GPU architecture has given GPU implementors more room
to innovate, and it is probably a factor in the historically greater rate of GPU per-
formance increase discussed in the previous section. Both Direct3D and OpenGL
were carefully designed to allow highly parallel implementations, for example.
38.3.1 GPU Architecture
While both Direct3D and OpenGL specify their abstractions in exacting detail,
as befits an architectural specification, here we do not completely define either
2. Modern usage of the term “architecture” sometimes includes implementation, but we
will maintain the distinction carefully in this chapter.
 
 
Search WWH ::




Custom Search