Advanced graphics driver architecture with extension capability5745761Abstract Disclosed is a support architecture that facilitates use of display device drivers containing a minimum of hardware-specific software code. A driver need support only a relatively few common functions, which act as building blocks for the larger, more complex operations typically requested by graphics engines. In order to mediate between the limited-instruction-set device driver and the various higher-level graphics engines, the invention includes a series of translation modules that simplify engine-originated instructions into simpler graphic components. A video manager supervises routing of instructions to the specific drivers they designate, and serializes access to hardware components so that graphic commands execute atomically (i.e., without interruption). The invention also includes a graphics library containing device-level instruction sets, as well as the on-board capability to execute those commands, for a broad range of graphic operations; and allows driver capability to be expanded by means of add-on extension modules, which relieve the designers of the need to fully rewrite a driver to test or implement an expanded function set. Claims What is claimed is: Description FIELD OF THE INVENTION
______________________________________
VMI.sub.-- CMD.sub.-- INIT
GHI.sub.-- CMD.sub.-- INIT
VMI.sub.-- CMD.sub.-- INITPROC
GHI.sub.-- CMD.sub.-- INITPROC
VMI.sub.-- CMD.sub.-- TERM
GHI.sub.-- CMD.sub.-- TERM
VMI.sub.-- CMD.sub.-- TERMPROC
GHI.sub.-- CMD.sub.-- TERMPROC
VMI.sub.-- CMD.sub.-- QUERYCAPS
GHI.sub.-- CMD.sub.-- QUERYCAPS
VMI.sub.-- CMD.sub.-- QUERYMODES
GHI.sub.-- CMD.sub.-- QUERYMODES
VMI.sub.-- CMD.sub.-- SETMODE
GHI.sub.-- CMD.sub.-- SETMODE
VMI.sub.-- CMD.sub.-- PALETTE
GHI.sub.-- CMD.sub.-- PALETTE
VMI.sub.-- CMD.sub.-- BITBLT
GHI.sub.-- CMD.sub.-- BITBLT
VMI.sub.-- CMD.sub.-- LINE
GHI.sub.-- CMD.sub.-- LINE
VMI.sub.-- CMD.sub.-- MOVEPTR
GHI.sub.-- CMD.sub.-- MOVEPTR
VMI.sub.-- CMD.sub.-- SETPTR
GHI.sub.-- CMD.sub.-- SETPTR
VMI.sub.-- CMD.sub.-- SHOWPTR
GHI.sub.-- CMD.sub.-- SHOWPTR
VMI.sub.-- CMD.sub.-- VRAMALLOC
GHI.sub.-- CMD.sub.-- VRAMALLOC
VMI.sub.-- CMD.sub.-- REQUESTHW
GHI.sub.-- CMD.sub.-- REQUESTHW
VMI.sub.-- CMD.sub.-- BANK
GHI.sub.-- CMD.sub.-- BANK
VMI.sub.-- CMD.sub.-- EXTENSION
GHI.sub.-- CMD.sub.-- EXTENSION
______________________________________
When manager 55 receives a request from a translation module, it examines the function number and either handles the operation directly or forwards it to the designated device driver after changing the prefix. The device driver, upon receiving the command, responds with a character string or signal indicating success, error, or a request for simulation. Accordingly, the only required features of a compatible device driver are (i) the ability to recognize GHI-prefixed commands; (ii) the ability to process the following "base function" set of commands, and (iii) the ability to return success, error, or simulate call to manager 55 in response to a command received from manager 55. GHI.sub.-- CMD.sub.-- INIT GHI.sub.-- CMD.sub.-- QUERYCAPS GHI.sub.-- CMD.sub.-- QUERYMODES GHI.sub.-- CMD.sub.-- SETMODE GHI.sub.-- CMD.sub.-- PALETTE These and related optional commands, and their VMI counterparts, perform the following functions. VMI.sub.-- CMD.sub.-- INIT, GHI.sub.-- CMD.sub.-- INIT: Causes manager 55 to recognize a translation module and accept subsequent commands from it. The GHI form of the instruction represents the first instruction a device driver receives from manager 55; in response, the device driver returns to manager 55 the number of function classes (a concept discussed below) that it supports. Manager 55 also assigns the device driver a unique identifier when it passes the GHI.sub.-- CMD.sub.-- INIT command. VMI.sub.-- CMD.sub.-- INITPROC, GHI.sub.-- CMD.sub.-- INITPROC: Causes manager 55 to recognize a command-issuing process (usually a translation module). The GHI form of the instruction informs the designated device driver of the existence of the process. This command can be used to enforce security, preventing unauthorized processes from obtaining access to the video hardware. VMI.sub.-- CMD.sub.-- TERM, GHI.sub.-- CMD.sub.-- TERM: Informs manager 55 that a translation module is being terminated. The GHI form of the instruction deactivates the associated device driver. VMI.sub.-- CMD.sub.-- TERMPROC, GHI.sub.-- CMD.sub.-- TERMPROC: Informs manager 55 and the designated device driver that a process is being terminated. VMI.sub.-- CMD.sub.-- QUERYCAPS, GHI.sub.-- CMD.sub.-- QUERYCAPS: This command is used to query the capabilities of a designated device driver; a translation module, for example, may utilize the response to learn which graphic commands a driver is capable of processing and thereby determine the range of allowed output. Manager 55 reformats this command and passes it directly to the driver, which responds by filling a data structure with identifiers for (or pointers to other data structures specifying) the function sets the driver supports. For example, all device drivers support the "base function" class, and may support others as well. VMI.sub.-- CMD.sub.-- QUERYMODES, GHI.sub.-- CMD.sub.-- QUERYMODES: When passed to a driver, causes the driver to return the video modes it is capable of supporting. A video mode specifies the screen resolution and color range. For example, a VGA adapter supports 16 colors and resolutions up to 640.times.480 pixels; super VGA mode supports 256 colors and resolutions of 1024.times.768 pixels and up. VMI.sub.-- CMD.sub.-- SETMODE, GHI.sub.-- CMD.sub.-- SETMODE: Called to set a graphics adapter to a specific video mode. VMI.sub.-- CMD.sub.-- PALETTE, GHI.sub.-- CMD.sub.-- PALETTE: Called to query or set the color palette of the graphics adapter. Manager 55 reformats this command and passes it directly to the designated driver, which returns the current palette or causes the adapter to adopt the palette specified in the function call. A flag associated with this function specifies which of these operations the driver is to perform. A device driver can be configured to process the following commands or to return an RC.sub.-- SIMULATE call to manager 55: GHI.sub.-- CMD.sub.-- BITBLT GHI.sub.-- CMD.sub.-- LINE GHI.sub.-- CMD.sub.-- SETPTR GHI.sub.-- CMD.sub.-- MOVEPTR GHI.sub.-- CMD.sub.-- SHOWPTR VMI.sub.-- CMD.sub.-- BITBLT, GHI.sub.-- CMD.sub.-- BITBLT: Requests rendering of a rectangle or series of rectangles by a bitbit operation according to parameters specified in an input data structure P.sub.in. Manager 55 reformats this command and passes it directly to the designated device driver along with the P.sub.in data structure, which specifies foreground and background colors of the rectangle; the dimensions and color format of the source and destination bitmaps and, if applicable, the pattern bitmap; and pre-clipped source and destination coordinates and extents. Additional parameters, such as graphic patterns, can be specified as well. A representative first data structure (BMAPINFO) is as follows:
______________________________________
typedef struct .sub.-- BMAPINFO { /* bmapinfo */
ULONG ulLength;
ULONG ulType;
ULONG ulWidth;
ULONG ulHeight;
ULONG ulBpp;
ULONG ulBytesPerLine;
PBYTE pBits
} BMAPINFO
typedef BMAPINFO *PBMAPINFO;
typedef struct .sub.-- BLTRECT { /* bltrect */
ULONG ulXOrg;
ULONG ulYOrg;
ULONG ulXExt;
ULONG ulYExt;
} BLTRECT *PBLTRECT;
______________________________________
where ulLenth is the length of the BMAPINFO data structure, in bytes; ulType is a description of the bit-block transfer as discussed below; ulWidth and ulHeight are the width and height, respectively, of the bitmap in pels; ulBpp is the number of bits per pel/color depth; ulBytesPerLine is the number of aligned bytes per line; pBits is a pointer to the bitmap bits; ulXOrg and ulYOrg are the X-origin and Y-origin, respectively, of the destination bit-block transfer; and ulXExt and ulYExt are the X and Y extents, respectively, of the bit-block transfer. A representative set of define statements for the ulType field of the BMAPINFO data structure is as follows:
______________________________________
#define BMAP.sub.-- VRAM
0X00000000
#define BMAP.sub.-- MEMORY
0x0000000l
______________________________________
where BMAP.sub.-- VRAM refers to bitmaps in video memory and BMAP.sub.-- MEMORY refers to bitmaps in system memory. A representative second data structure (BITBLTINFO) is as follows:
______________________________________
typedef struct.sub.-- BITBLTINFO { /* bitbltinfo */
ULONG ulLength;
ULONG ulBltFlags;
ULONG cBlits;
ULONG ulROP;
ULONG ulMonoBackROP;
ULONG ulSrcFGColor;
ULONG ulSrcBGColor;
ULONG ulPatFGColor;
ULONG ulPatBGColor;
PBYTE abColors;
PBMAPINFO pSrcBmapInfo;
PBMAPINFO pDstBmapInfo;
PBMAPINFO pPatBmapInfo;
PPOINTL aptlSrcOrg;
PPOINTL aptlPatOrg;
PBLTRECT abrDst
PRECTL prclSrcBounds
PRECTL prclDstBounds
BITBLTINFO;
typedef BITBLTINFO *PBITBLTINFO;
______________________________________
where ulLength is the length of the BITBLTINFO data structure in bytes; uIBItFlags are miscellaneous flags used by the graphics engine for rendering (and which indicate, for example, the direction of the bit-block transfer, whether the operation includes a source or pattern bitmap, and whether the source, destination and/or pattern bitmaps are transparent); cBlits is a count of bit-block transfers to be performed; ulROP designates a raster operation; ulMonoBackROP specifies a background mix; ulSrcFGColor specifies a monochrome source foreground color; ulSrcBGColor specifies a monochrome source background color and transparent color; ulPatFGColor and ulPatBGColor specify monochrome pattern foreground and background colors, respectively; abColors is a pointer to a color translation table; pSrcBmapInfo and pDstBmapInfo are pointers to BMAPINFO data structures for source and destination bitmaps, respectively; aptlSrcQrg and aptlPatOrg are pointers source and pattern origins, respectively; abrDst is a pointer to an array of bit-block transfer rectangles (specified by data structures including X and Y origins and extents); prclSrcBounds is a pointer to a source bounding rectangle of source bit-block transfers; and prclDstBounds is a pointer to a destination bounding rectangle of destination bit-block transfers. VMI.sub.-- CMD.sub.-- LINE, GHI.sub.-- CMD.sub.-- LINE: Requests rendering of a line according to parameters specified in an input data structure P.sub.in. Manager 55 reformats this command and passes it directly to the designated device driver along with the P.sub.in data structure, which specifies data such as line length, destination position and orientation, foreground and background colors, and whether the line is solid or patterned. A representative first data structure (LINEPACK), which contains line information on a per-line basis, is as follows:
______________________________________
typedef struct .sub.-- LINERACK { /* linepack */
ULONG ulStyleStep;
ULONG ulStyleValue;
ULONG ulFlags;
struct .sub.-- LINEPACK * plpkNext
ULONG ulAbsDeltaX; /* absolute (ptlStart.x - ptlEnd.x) */
ULONG ulAbsDeltaY; /* absolute (ptlStart.y - ptlEnd.y) */
POINTL ptlClipStart;
POINTL ptlClipEnd;
POINTL ptlStart;
POINTL pltEnd;
LONG 1ClipStartError;
} LINEPACK; /* lpk */
typedef LINPACK *PLINEPACK; /* plpk */
______________________________________
where ulStyleStep specifies the value to be added to ulStyleValue on each pel stepped along the style major direction; ulStyleValue specifies the style value (composed of an error value and a mask position) at the current pel; ulAbsDeltaX and ulAbsDeltaY specified clipped Bresenham Delta X and Y values, respectively; ptlClipStart and ptlClipEnd are pointers to starting and endling locations, respectively, for execution of the Bresenham algorithm; ptlStart and ptlEnd are starting and ending locations, respectively, for the line; IClipStartError is the standard Bresenham error at the clipped start point; and ulFlags are flags used for the LINEPACK data structure, as follows: LINE.sub.-- DO.sub.-- FIRST.sub.-- PEL (draws the first pel) LINE.sub.-- DIR.sub.-- Y.sub.-- POSITIVE (indicates line direction is bottom-to-top) LINE.sub.-- HORIZONTAL (indicates line is horizontal; no Bresenham algorithm) LINE.sub.-- X.sub.-- MAJOR (line is XMAJOR) LINE.sub.-- DIR.sub.-- X.sub.-- POSITIVE (line direction is right-to-left) LINE.sub.-- VERTICAL (line is vertical; no Bresenham algorithm) LINE.sub.-- STYLE.sub.-- X.sub.-- MAJOR (line style is XMAJOR) LINE.sub.-- SO.sub.-- LAST.sub.-- PEL (draws the last pel) A representative second data structure (LINEINFO) is as follows:
______________________________________
typedef struct .sub.-- LINEINFO { /* lineinfo */
ULONG ulLength;
ULONG ulType;
ULONG ulStyleMask;
ULONG cLines
ULONG ulFGColor;
ULONG ulBGColor;
USHORT usForeROP;
USHORT usBackROP;
PMAPINFO pDstBmapInfo;
PLINEPACK alpkLinePack;
PRECTL prclBounds;
} LINEINFO; /* linfo */
______________________________________
where ulLength specifies the length of the LINEINFO data structure; ulType defines the line type, as follows: LINE.sub.-- SOLID (line will be solid in foreground color) LINE.sub.-- INVISIBLE (line is not drawn) LINE.sub.-- ALTERNATE (line will be alternative foreground and background color; ignores style) ulStyleMask specifies a 32-bit style mask; cLines is a count of the lines to be drawn; ulFGColor and ulBGColor specify line foreground and background colors, respectively; ulForeROP and ulBackROP are line foreground and background mixes, respectively; pDstBmapInfo is a pointer to a destination surface bitmap; alpkLinePack is a pointer to the LINEPACK data structure; and prclBounds is a pointer to a bounding rectangle of a clipped line. Using these data structures and definitions, a line starts from ptlStart and ends at ptlEnd (inclusive). The IClipStartError parameter represents the standard Bresenham error at the clipped start point, and is calculated from the initial error at the start point and the error increments for major and diagonal steps. Horiztonal and vertical lines are drawn from the clipped start to the clipped end. Lines are styled using the ulStyleMask, ulStyleStep and ulStyleValue; the ulStyleMask is a 32-bit style mask, ulStyleValue is the style value at the current pixel (pel), and ulStyleStep is the value to be added to ulStyleValue on each pixel stepped along the style major direction. Manager 55 also supports a set of utility commands: VMI.sub.-- CMD.sub.-- VRAMALLOC, GHI.sub.-- CMD.sub.-- VRAMALLOC: Called to allocate off-screen video memory. VMI.sub.-- CMD.sub.-- REQUESTHW, GHI.sub.-- CMD.sub.-- REQUESTHW: An application (or translation module) uses this call to request access to the video hardware. This allows, for example, direct manipulation of frame buffer 52. In response to this command, manager 55 obtains a semaphore to ensure uninterrupted access to the video hardware, and establishes a data path between the requesting process and the appropriate graphics adapter or the frame buffer. This capability may be used, for example, by a multimedia application, which for performance reasons writes directly to frame buffer 52 when presenting software motion video. VMI.sub.-- CMD.sub.-- BANK, GHI.sub.-- CMD.sub.-- BANK: Called to designate a specific video memory bank. VMI.sub.-- CMD.sub.-- EXTENSION, GHI.sub.-- CMD.sub.-- EXTENSION: Called to send an extension command (discussed below) to a driver. The preferred data structure associated with this command is:
______________________________________
typedef struct .sub.-- HWEXTENSION {
ULONG ulLength;
ULONG ulXSubFunction;
ULONG cScrChangeRects;
PRECTL arectlScreen;
ULONG ulXFlags;
PVOID pExtPl;
} HWEXTENSION;
______________________________________
where ulLength is the size, in bytes, of the HWEXTENSION data structure; ulXSubFunction is an extension-specific function number; cSrcChangeRects is a count of screen rectangles affected by the extension; arectlScreen specifies an array of screen rectangles affected by the extension; ulXFlags, in the current embodiment, is a single flag facilitating hardware serialization; and pExtPI specifies an extension-specific input packet. VMI.sub.-- CMD.sub.-- QUERYCHAININFO: Called to obtain a pointer to a data structure containing capability and mode information for each device driver. The preferred data structure for each driver is:
______________________________________
typedef struct .sub.-- INFO { /* driver information */
ID identifier;
PSZ pszDriverName;
PFNHWENTRY pDriverEntry;
ULONG cModes;
struct .sub.-- GDDMODEINFO
pModeInfo;
struct .sub.-- CAPSINFO
pCapsInfo;
struct .sub.-- DRIVERINFO
pNextDriverInfo
} INFO ;
______________________________________
where ID is the driver identifier; pszDriverName is the driver name; cModes is a count of available graphics modes supported by the driver; pModeInfo points to a data structure specifying the modes supported by the driver; pCapsInfo points to a data structure specifying the capabilities of the driver; and pNextDriverInfo points to the next data structure in the driver chain (discussed below). In an illustrative embodiment, manager 55 is responsible for pointer management. Generally, the pointer will ultimately overwrite other on-screen material--if rendered objects are thought of as occupying planes arranged along a Z-axis, so that objects on higher-order planes occlude those on lower-order planes, the pointer generally occupies the highest Z-order plane--but will be the last object rendered; accordingly, the pointer is itself temporarily overwritten as lower-order objects are rendered. When it receives a VMI command, manager 55 first determines whether execution of the command will affect the pointer. If so, it clears the pointer, passes the command to the designated device driver (or to graphics library 60), and replaces the pointer when the driver (or graphics library 60) has finished executing the command. Manager 55 can also perform pointer operations in response to commands issued by applications 25. Manager 55 either executes these commands directly or passes them for execution to a designated device driver (equipped to handle pointer operations). The pointer commands supported are: VMI.sub.-- CMI.sub.-- MOVEPTR, GHI.sub.-- CMI.sub.-- MOVEPTR: In response to this command, which includes a reference to a data structure indicating the pointer destination, manager 55 either performs the move operation or reformats this command and passes it to a designated device driver. This arrangement applies to the remaining commands as well. VMI.sub.-- CMD.sub.-- SETPTR, GHI.sub.-- CMD.sub.-- SETPTR: Called to set the pointer AND, XOR masks and, for color pointers, to designate a bitmap. VMI.sub.-- CMD.sub.-- SHOWPTR, GHI.sub.-- CMD.sub.-- SHOWPTR: Called to set the visibility state of the pointer. 2. Graphics Library 60 The capabilities of graphics library module 60 (that is, the range of graphic functions it is able to execute) determine the extent to which high-level function calls from graphics engines must be translated. In the simplest and currently preferred approach, graphics library 60 supports the BITBLT and LINE drawing commands using the parameters discussed above. Although this requires translation modules 64a, 64b, 64c to decompose function calls into these primitives before they can be executed (assuming that the associated device drivers are incapable of processing higher-level function calls), it affords simplicity in system design. 3. Filters The present invention can also include one or more filter modules 70a, 70b interposed between each device driver and manager 55. These modules can enhance the overall functionality of a device driver or preprocess instructions before they reach the driver. For example, a filter can accommodate a device driver to the environment of the invention if the driver is capable of processing the base function command set but not according to the syntax recognized by the present invention. Instead the filter processes these commands, interacting with the device driver and manager 55 as necessary. For example, suppose the invention is to be used to test the capabilities of a device driver not otherwise intended for use with the invention. A filter module can be established with (i) a data structure specifying the driver's capabilities; (ii) the ability to generate output signals to the driver that determine or set its current video mode and palette; and (iii) the ability to process VMI commands and otherwise interact with manager 55. In this way, the device driver is integrated into the invention without special modification. The filter intercepts GHI commands, setting the driver mode and palette according to the instructions of manager 55, responding to GHI.sub.-- CMD.sub.-- QUERYCAPS and GHI.sub.-- CMD.sub.-- QUERYMODES commands, and otherwise converting GHI commands into forms consistent with the device driver's instruction set. A filter can also view commands and parameter information without modifying them. One application of such a filter is use as a performance monitor. For example, the filter can receive commands from manager 55 and timestamp them before transferring the commands to the associated device driver, then record the time when the operation is completed. The difference between these timestamps represents the time taken by the device driver to execute the instruction. For example, in the preferred embodiment, a filter calls the driver with which it is associated as a process, thereby registering its completion automatically. A filter can also screen commands, rejecting commands that the associated device driver is incapable of processing and signaling manager 55 accordingly. For example, the filter can be associated with a command template stored in a partition of memory 17, and configured to pass to the device driver only those commands conforming to a template entry. If a command fails to so conform, the filter can return a simulation request to manager 55. Once again, this approach eases compatibility between the invention and a device driver not specifically designed for operation with the invention. This screening function can also be combined with processing capability. For example, a filter can analyze function parameters associated with a command (e.g., the data structures of the LINE or BITBLT instructions) for conformance to a template prior to transferring it to a device driver. The template can contain, for example, data specifying parameters that must contain arguments, as well as the form of argument (e.g., numerical) or its proper scope (e.g., a numerical range). In this way, the filter can act as a real-time debugger, rejecting commands that fail to satisfy basic structural requirements or which specify impossible arguments (e.g., a BITBLT larger than the frame buffer) and alerting manager 55 thereto. Filters are also useful in conjunction with accessory modules such as remote screen monitoring utilities (such as the IBM Distributed Console Access Facility, or "DCAF"). These facilities operate over wide-area or local-area computer networks, conforming a target computer screen to the appearance of a base screen. DCAF transmits an initial pixelmap to the frame buffer of the target computer. Instead of retransmitting the entire screen each time it changes, however, DCAF instead transmits only rectangle changes. A receiving DCAF module on the target computer modifies the display based on the transmitted changes. A filter can be used to monitor the flow of commands to a device driver and to transmit those affecting screen appearance to a DCAF accessory module 80 as well as to the device driver. Accessory module 80 sends these commands to the DCAF receiving module on the target computer, either directly or after processing them to determine the precise rectangle changes they produce. 4. Extensions The architecture of the present invention allows for extensions to accommodate or take the fullest possible advantage of future hardware. Particularly if the components of the invention are used as part of an operating system (and not solely for driver design and development), the invention should allow for future enhancement of a driver command set or addition to a driver of an extension module that provides advanced capabilities. In the former case, the entire driver and its associated function class(es) can simply be replaced. More typically, however, designers of drivers will make expansion modules available. The user of an existing driver may purchase the expansion module to enhance graphic capabilities, or may instead choose to retain the original driver. This approach not only avoids replacement of an entire driver, but also avoids the potential code corruption that might occur were only a single module of the driver replaced. The invention facilitates driver expansion by providing for "virtual" or extension drivers within the above-described component architecture. Specifically, each enhancement, having a distinct repertoire of executable graphic functions, is treated as a separate function class. As mentioned above, a driver, in response to a GHI.sub.-- CMD.sub.-- INIT command, returns to manager 55 the function classes the driver supports. Manager 55 allocates one INFO data structure for each supported class, and assigns each class an identifier as if the class were itself a separate driver. Thus, as shown in FIG. 2, each driver 50a, 50b can be associated with an extension driver 74a, 74b. Extension drivers 74a, 74b each have separate a associated ID and therefore respond to commands specifying the ID as a separate driver module. However, each remains associated with the same graphics adapter 38a, 38b as the original driver. Although each extension may theoretically be addressed directly, as a separate driver, practical considerations dictate use of the VMI.sub.-- CMD.sub.-- EXTENSION command, which designates the base driver with which the extension is associated as well as the extension itself. For example, a DCAF filter associated with the base device driver may not be associated with the extension; the cScrChangeRects field of the HWEXTENSION data structure provides the information accessory 80 will need to update the target screen. In addition, if manager 55 is to retain control of the pointer without being programmed to recognize all commands recognized by each extension--a requirement inconsistent with the generality afforded by the invention--it must be furnished with sufficient information (such as that contained in the HWEXTENSION data structure) regarding each extension command to derive necessary pointer operations. 5. Chains of Device Drivers Each set of associated device drivers and associated graphics adapters and filters represents a "chain." In FIG. 2, driver 50a, adapter 38a and filter 70a are one chain, and driver 50b, adapter 38b and filter 70b a second chain. For example, one chain might be dedicated to graphics support of the IBM Presentation Manager.RTM. ("PM") GUI and the other to support of Microsoft Windows.TM.. Two device drivers can also share a single graphics adapter and exist, in the present invention, as separate chains. Thus, continuing the previous example, device driver 50a might be dedicated to PM command processing and driver 50b to Windows command processing, but both commonly drive graphics adapter 38a. Chains can be simultaneously resident in an operational sense, being independently actuated by commands designating particular device drivers. Chain selection commands can originate with an application, manager 55 or, preferably, a translation module, which selects the chain of the driver best suited to executing the translated command(s). This arbitration capability is implemented using templates and decision logic. In particular, a field of the INFO data structure associated with each driver 50a, 50b identifies all function classes (including extension modules) supported by that driver. This structure is returned in response to the VMI.sub.-- CMD.sub.-- QUERYCAPS command, furnishing the requesting process with complete capability information for each driver and its extensions. Preferably, however, manager 55 supports an additional command, VMI.sub.-- CMD.sub.-- QUERYCHAININFO, which returns the INFO data structures associated with all registered device drivers. In the case of multiple active chains, a CHAININFO structure contains pointers to a linked list of all INFO data structures. These data structures provide the templates according to which a translation module selects driver chains. The decision logic depends on the capabilities of the various drivers, the costs (e.g., time overhead) associated with each, and the needs of particular applications. For example, a GUI might require only a moderate resolution and palette range, so that a chain implementing VGA will suffice; a computer-aided design or image-processing program, by contrast, can require much more extensive--but also slower--graphics capabilities, necessitating use of a driver capable of fine resolution and a large palette. Driver chain selection can take place serially or in parallel. In a serial configuration, each separate chain performs temporally separate operation on frame buffer 52; in other words, each chain, responding to commands from one or more translation modules, "owns" frame buffer 52 within timeslices allocated by manager 55. As described previously, manager 55 serializes interaction with frame buffer 52 to prevent overlap of graphics operations; a requested operation must be completed before manager 55 will pass another command down a chain or accord a process access to frame buffer 52. Parallel operation can take different forms. In one implementation, different chains can control different regions (e.g., separate windows) within frame buffer 52. To return to a previous example, a GUI requiring only VGA support can have commands routed down a chain to a VGA adapter, while an image-processing program, operative within a discrete screen window, can have commands routed down a chain to a more powerful adapter. Each chain will operate on different pixel regions of frame buffer 52: the more powerful driver within the geometric confines of the program window, and the VGA driver to the remainder of the frame. Another parallel operation involves multiple screens, wherein a single image is divided into segments for display on a matrix of contiguous screen displays. Each screen display is driven by a separate screen buffer 52. The use of multiple screens not only enlarges the user's view, but effectively multiplies the obtainable output resolution by the number of separate screens. Multiple-screen output can be implemented by means of a GUI expressly configured therefor or through the use of a filter configured to process the output of a normal-resolution GUI (e.g., by computationally projecting a pixel array onto a larger array, algorithmically adjusting for distortions and filling in dead space). It will therefore be seen that the foregoing represents a highly extensible and advantageous approach to accommodation of multiple device drivers having varying capabilities and interoperabilities. The terms and expressions employed herein are used as terms of description and not of limitation, and there is no intention, in the use of such terms and expressions, of excluding any equivalents of the features shown and described or portions thereof, but it is recognized that various modifications are possible within the scope of the invention claimed. For example, the various modules of the invention can be implemented on a general-purpose computer using appropriate software instructions, or as hardware circuits.
|
Same subclass Same class Consider this |
||||||||||
