Written by: Tom Curry
Participates: Patty Buchanan and Harris Phram
II. Summary of DirectX Architecture.
The DirectX architecture is comprised of two layers. The top level DirectX is the application level that links the features of DirectX with the rest of the system through Microsoft’s Component Object Model (COM) interface. The deeper level is a shared level consisting of two drivers that work as a team to unify the DirectX interface with the many variety of hardware configurations out there. These drivers are referred to as the Hardware Abstraction Layer (HAL), and the Hardware Emulation Layer (HEL). (To keep this research paper brief, I will henceforth refer to these components by their acronyms.) HAL is the driver that couples tightly with the DirectX ready hardware drivers provided by the hardware manufacturer. It is through this tight coupling that DirectX is able to take advantage of the various features of the different types of hardware through a common interface. Hardware drivers must be written by the manufacturer to support DirectX, meaning that their drivers must readily interface with the HAL layer of DirectX.
The HEL driver is designed to pick up any slack where HAL leaves off. Any functionality demanded by the game application that cannot be readily accessed through the hardware via HAL, is immediately channeled through HEL to be emulated by software. This gives DirectX great flexibility, in that it can support a wide variety of older and newer hardware configurations. Conceptually, newer applications requiring features present in newer hardware can run on older hardware using the HEL layer of DirectX to emulate some of the newer required features. Likewise, the more recent versions of DirectX take advantage of advancements made in computer hardware, so a game application written some type ago can automatically take advantage of the features of a newer hardware configuration through its integration with DirectX. One such example of this relationship is when Intel MMX technology became available. The newer version of DirectX was designed for all of its components to take full advantage of the benefits provided through MMX. As a result, all of the software titles written previous to the release of MMX could take advantage of the benefits of MMX, even though the concept might have been virtually unheard of when the software title was originally written. The converse of that is this. If a newer software title is specifically authored to take advantage of an MMX processor, and it is purchased for use on an older, non-MMX processor, the HEL driver can emulate most of the MMX functions through software, still giving the user the intended functionality.
These DirectX drivers integrate with the DirectX API through a series of buffer objects. Most of the output generated by any of the DirectX API components is written to its corresponding buffer object. It is this buffer that is processed and optimized according to the available hardware, by the two layers of the DirectX architecture, and systematically "dumped" to the appropriate output device in a machine level language that the device can understand. Not quite as "write to the metal" as most DOS game developers would have liked.