The invention generally relates to computer systems and, more particularly, the invention relates to processing graphics request data for display on a computer display device.
Many conventional three dimensional graphics processing programs apply textures to graphical images to provide more realistic images. Textures typically are applied to graphical images by mapping a texture map to the graphical image. Texture maps typically are stored in volatile texture memory on a graphics accelerator and applied to graphical images by a local texture processor.
When a selected texture map is required, a program typically determines the location and type of texture map (e.g., its dimensional type) in the texture memory. Once this information is determined, the program transmits a message to the texture processor with this information. Upon receipt of the message by the texture processor, the texture map is retrieved and applied to a graphical image of interest. Transmitting the message to the texture processor, however, requires bus bandwidth that preferably is utilized for transmitting other graphics request code.
In addition, texture memory commonly is configured as linear memory (i.e., one dimensional). Many texture maps, however, are two and three dimensions. Storing a higher dimensioned texture map (i.e., higher than one dimension) in linear texture memory thus often results in an inefficient allocation of memory resources. More particularly, many memory locations undesirably are not used when storing higher dimensioned texture maps in linear texture memory.
In accordance with one aspect of the invention, a graphics accelerator for processing a graphical image includes a texture buffer for storing texture maps and data relating to the texture maps stored in the texture buffer, and a texture processor that performs texturing operations on the graphical image. The texture processor includes a fetching engine that retrieves texture packets, where each texture packet is stored in the texture buffer and associated with a texture map. Each texture packet includes data relating to the location of its associated texture map in the texture buffer.
In preferred embodiments of the invention, each texture packet is associated with a texture map that is different than the texture maps associated with any other texture packet in the texture buffer. Moreover, each texture packet may include data relating to the dimensional type of its associated texture map. Among other things, the dimensional type of each texture map may be one of a one dimensional texture map, a two dimensional texture map, and a three dimensional texture map.
In other embodiments, the texture processor further includes an input for receiving a texture message indicating that a texture map is to be utilized by the texture processor. The fetching engine retrieves selected texture packets from the texture buffer in response to receipt of the texture message. The texture processor also may include a parsing engine for parsing a fetched texture packet and determining information relating to the texture map associated with the fetched texture packet. In preferred embodiments, the information relates to the location in the texture buffer of the texture map associated with the fetched texture packet. The information also may relate to the number of dimensions of the texture map associated with the fetched texture packet.
In accordance with other aspects of the invention, a graphics accelerator for processing a graphical image includes a texture buffer for storing texture maps and data relating to the texture maps stored in the texture buffer, and a texture processor that performs texturing operations on the graphical image. The texture processor includes a texture packet generator that produces texture packets, where each texture packet is stored in the texture buffer and associated with a texture map. Each texture packet includes data relating to the dimensional type of its associated texture map.
In accordance with still other aspects of the invention, a graphics accelerator stores a texture map in linear texture memory of a graphics accelerator by first determining the dimension of the texture map, and then converting the texture map to a one dimensional texture map if the dimension of the texture map is determined to be more than one dimensional. The one dimensional texture map has a first number of consecutive data blocks. A second number of consecutive memory locations in the texture memory then are located, where the first number is equal to the second number. Once the consecutive memory locations are located, then the one dimensional texture map is stored in the located memory locations in the texture memory.
In preferred embodiments, a texture map is converted to a one dimensional texture map by first defining a plurality of data blocks within the texture map, and then assigning a sequence number to each of the data blocks. The sequence numbers preferably are consecutive numbers. In preferred embodiments, each consecutive data block of the one dimensional texture map is consecutively stored in the located memory locations.
In accordance with another aspect of the invention, an apparatus and method of applying a texture to a graphical image first locates a texture packet identifying the location of a texture map in a memory device. The texture packet then is parsed to determine the location of the texture map in the memory device. Once its location is determined, the texture map is retrieved and applied to the graphical image.
In accordance with still another aspect of the invention, a data structure is utilized to store data relating to a texture map. More particularly, the data structure includes a location field identifying the location of the texture map in a memory device, and a dimension field identifying the dimension of the texture map.
The foregoing and other objects and advantages of the invention will be appreciated more fully from the following further description thereof with reference to the accompanying drawings wherein:
In alternative embodiments (not shown), a single texture memory is utilized by each of the different texture processors 302A and 302B. The single texture memory may be partitioned and each partition may be assigned to a single texture processor. Alternatively, the texture map data may be arbitrarily stored in any location of the single texture memory by any of the texture processors on the graphics accelerator.
In accordance with preferred embodiments of the invention, texture maps of varying dimensions may be stored in either of the texture memories 304A and 304B. For example, texture maps of two dimensions, three dimensions, four dimensions and higher dimensions may be stored in either of the one dimensional texture memories. This enables either of the texture processors 302A and 302B to store data in their respective texture memories 304A and 304B in a more efficient manner.
The process begins at step 400 in which a texture map is retrieved by the host processor 104 (in response to instructions from a drawing or configuration program) from a library of texture maps in a nonvolatile memory. For example, such library may be stored on a hard disk in the computer system 100. The dimension of the texture map then may be determined by the host processor 104 (e.g., by means of a driver application program executed by the host processor 104) and transmitted to the texture processor 302A with the texture map via a message (step 402).
In response to receipt of the texture map, the texture processor 302A responsively converts the texture map into a one dimensional texture map of one or more texture data blocks (step 404). In preferred embodiments, a texture data block (“block”) includes data representing a maximum of 512 texels of a texture map.
When converting a two dimensional texture map, each of the blocks of data in the map may be assigned a consecutive sequence number on a block by block basis. This may be completed in any number of ways as known in the art. For example, as shown in
If a texture map is a three dimensional texture map, it may be converted into a two dimensional texture map by dividing it into a plurality of two dimensional texture map planes, and then converting each of the two dimensional map planes into one dimensional texture maps as described above. Higher dimensioned texture maps (e.g., four dimensional texture maps) also may be converted into one dimensional texture maps by utilizing the above noted two and three dimensional conversion methods. It should be noted that other methods known in the art may be utilized.
The process then continues to step 406 in which a plurality of consecutive data blocks in the texture memory 304A are located. The process preferably is done via software executing on the texture processor 302A. Of course, the located data blocks must equal at least the number of resultant data blocks of the converted texture map. For example, at least twenty data consecutive data locations must be located in the texture memory 304A for storing the texture map shown in
Once the appropriate data blocks are located, the process continues to step 408 in which the converted one dimensional texture maps are stored in the located data locations (i.e., the appropriate blocks) in the texture memory 304A. In preferred embodiments, the texture processor 302A is configured via hardware to store the converted texture map in the texture memory 304A. A texture packet (discussed below and shown in
Among other data, the texture packet may include the location of the stored converted texture map in the texture memory 304A, and the dimensional size of the texture map prior to being converted. For example, a texture packet may contain data indicating that the texture map shown in
It should be noted that the steps of the process shown in
Accordingly, this process enables the texture memory to store texture maps of different dimensions. For example, preferred embodiments of a given texture memory 304A can store texture data for one, two, three and four dimensional texture maps. To that end, the texture memory 304A preferably is logically structured as two banks of linear arrays of memory blocks. Each memory block has a size that corresponds to the size of the texture blocks described above. Accordingly, each block includes 512 data locations that can store up to 512 texels of data. Any block may be located in the texture memory address space by using a map address format that contains a bank select bit, a block address field, and a displacement field. The bank select bit and block address field together form a linear address that points to a unique block within the texture memory 304A. The displacement field locates a given texel within the block.
Each block in a group of blocks that encompass any texture map preferably is logically arranged to correspond with the dimension of the texture map being stored. The following list shows the texture space geometry for one dimensional, two dimensional, and three dimensional memory blocks. The terms depth, width, and height respectively refer to the well known texture space directions known in the art as “R”, “S”, and “T”:
One dimensional texture map: 512 (width) texels;
Two dimensional texture map: 16 (width) by 32 (height) texels; and
Three dimensional texture map: 8 (width) by 8 (height) by 8 (depth) texels.
Even though texture maps are divided into blocks, preferred embodiments permit each such block to be stored across two blocks in memory. Accordingly, the beginning of a block of a texture map may be identified at an offset within a memory block. Below are formulas for determining how many blocks of memory are required by a texture map:
One Dimensional Texture Map
N=(2R+2*B+D+511)/512
where the division is integral and:
where the division is integral and:
where the division is integral and:
The texture processor 302A then parses the data in the texture packet to determine the location of its associated texture map and/or the dimension of such map. Continuing with the above example, the texture packet associated with the texture map shown in
The texture map then is retrieved from the texture memory 304A by the texture processor 302A based upon the information in the texture packet (step 608). It then is determined at step 610 if the texture map is one dimensional. If it is a one dimensional texture map, then the process ends. If, however, it is determined that the texture map is not one dimensional, then the texture processor 302A reconstructs the texture map in accord with conventional processes (step 612). For example, the texture processor 302A may perform opposite operations to those executed when converting the texture map to a one dimensional map. Once the texture map is reconstructed and/or retrieved (as the case may be), it may be applied to a graphical image in accordance with conventional processes.
Preferred embodiments of the texture processors 302A and 302B include a plurality of texture registers that collectively define the state of the entire texturing system. Among those registers are a texture configuration register that specifies data relating to texture maps sizes, valid maps, borders, and texel format. A texture environment register specifies other information about a given texture, such as the blend environment, clamp mode, and a level of detail clamp enable. Both of these registers are loaded via a load texture registers request that loads all registers associated with the texture processor 302A. Additional texture registers specify other texturing information, such as the base address of all texture maps, level of detail calculation clamping, and the border and environment blend colors. These additional registers may be loaded with the above noted load texture registers request, or preferably as a group with a setup texture registers request.
Portions of the disclosed apparatus and method may be implemented as a computer program product for use with a computer system. Such implementation may include a series of computer instructions fixed either on a tangible medium, such as a computer readable medium (e.g., a diskette, CD-ROM, ROM, or fixed disk) or transmittable to a computer system, via a modem or other interface device, such as a communications adapter connected to a network over a medium. The medium may be either a tangible medium (e.g., optical or analog communications lines) or a medium implemented with wireless techniques (e.g., microwave, infrared or other transmission techniques). The series of computer instructions embodies all or part of the functionality previously described herein with respect to the system. Those skilled in the art should appreciate that such computer instructions can be written in a number of programming languages for use with many computer architectures or operating systems. Furthermore, such instructions may be stored in any memory device, such as semiconductor, magnetic, optical or other memory devices, and may be transmitted using any communications technology, such as optical, infrared, microwave, or other transmission technologies. It is expected that such a computer program product may be distributed as a removable medium with accompanying printed or electronic documentation (e.g., shrink wrapped software), preloaded with a computer system (e.g., on system ROM or fixed disk), or distributed from a server or electronic bulletin board over the network (e.g., the Internet or World Wide Web). Of course, some embodiments of the invention may be implemented as a combination of both software (e.g., a computer program product) and hardware. Still other embodiments of the invention are implemented as entirely hardware, or entirely software (e.g., a computer program product).
Although various exemplary embodiments of the invention have been disclosed, it should be apparent to those skilled in the art that various changes and modifications can be made which will achieve some of the advantages of the invention without departing from the true scope of the invention. These and other obvious modifications are intended to be covered by the appended claims.
This application claims priority from U.S. provisional patent application Ser. No. 60/093,159, filed Jul. 17, 1998, entitled “GRAPHICS PROCESSOR WITH TEXTURE MEMORY ALLOCATION SYSTEM”, the disclosure of which is incorporated herein, in its entirety, by reference.
| Number | Name | Date | Kind |
|---|---|---|---|
| 4434437 | Strolle et al. | Feb 1984 | A |
| 4615013 | Yan et al. | Sep 1986 | A |
| 4646232 | Chang et al. | Feb 1987 | A |
| 4908780 | Priem et al. | Mar 1990 | A |
| 4918626 | Watkins et al. | Apr 1990 | A |
| 4991122 | Sanders | Feb 1991 | A |
| 5107415 | Sato et al. | Apr 1992 | A |
| 5123085 | Wells et al. | Jun 1992 | A |
| 5239654 | Ing-Simmons et al. | Aug 1993 | A |
| 5287438 | Kelleher | Feb 1994 | A |
| 5293480 | Miller et al. | Mar 1994 | A |
| 5313551 | Labrousse et al. | May 1994 | A |
| 5363475 | Baker et al. | Nov 1994 | A |
| 5371840 | Fischer et al. | Dec 1994 | A |
| 5394524 | DiNicola et al. | Feb 1995 | A |
| 5398328 | Weber et al. | Mar 1995 | A |
| 5446479 | Thompson et al. | Aug 1995 | A |
| 5461712 | Chelstowski et al. | Oct 1995 | A |
| 5485559 | Sakaibara et al. | Jan 1996 | A |
| 5495563 | Winser | Feb 1996 | A |
| 5511165 | Brady et al. | Apr 1996 | A |
| 5519823 | Barkans | May 1996 | A |
| 5544294 | Cho et al. | Aug 1996 | A |
| 5550961 | Chimoto | Aug 1996 | A |
| 5555359 | Choi et al. | Sep 1996 | A |
| 5557734 | Wilson | Sep 1996 | A |
| 5561749 | Schroeder | Oct 1996 | A |
| 5572713 | Weber et al. | Nov 1996 | A |
| 5631693 | Wunderlich et al. | May 1997 | A |
| 5664114 | Krech, Jr. et al. | Sep 1997 | A |
| 5666520 | Fujita et al. | Sep 1997 | A |
| 5684939 | Foran et al. | Nov 1997 | A |
| 5701365 | Harrington et al. | Dec 1997 | A |
| 5706481 | Hannah et al. | Jan 1998 | A |
| 5721812 | Mochizuki | Feb 1998 | A |
| 5737455 | Harrington et al. | Apr 1998 | A |
| 5757375 | Kawase | May 1998 | A |
| 5757385 | Narayanaswami et al. | May 1998 | A |
| 5761401 | Kobayashi et al. | Jun 1998 | A |
| 5764237 | Kaneko | Jun 1998 | A |
| 5790130 | Gannett | Aug 1998 | A |
| 5793376 | Tanaka et al. | Aug 1998 | A |
| 5801708 | Alcorn et al. | Sep 1998 | A |
| 5821950 | Rentschler et al. | Oct 1998 | A |
| 5831637 | Young et al. | Nov 1998 | A |
| 5841444 | Mun et al. | Nov 1998 | A |
| 5870567 | Hausauer et al. | Feb 1999 | A |
| 5877771 | Drebin et al. | Mar 1999 | A |
| 5883641 | Krech, Jr. et al. | Mar 1999 | A |
| 5886705 | Lentz | Mar 1999 | A |
| 5914711 | Mangerson et al. | Jun 1999 | A |
| 5917497 | Saunders | Jun 1999 | A |
| 6005583 | Morrison | Dec 1999 | A |
| 6046747 | Saunders et al. | Apr 2000 | A |
| 6052126 | Sakuraba et al. | Apr 2000 | A |
| 6104415 | Gossett | Aug 2000 | A |
| 6121974 | Shaw | Sep 2000 | A |
| 6130680 | Cox et al. | Oct 2000 | A |
| 6141025 | Oka et al. | Oct 2000 | A |
| 6144392 | Rogers | Nov 2000 | A |
| 6184888 | Yuasa et al. | Feb 2001 | B1 |
| 6191794 | Priem et al. | Feb 2001 | B1 |
| 6233647 | Bentz et al. | May 2001 | B1 |
| 6362828 | Morgan | Mar 2002 | B1 |
| Number | Date | Country |
|---|---|---|
| 0 311 798 | Apr 1989 | EP |
| 0 397 180 | Nov 1990 | EP |
| 0 438 194 | Jun 1991 | EP |
| 0 448 286 | Sep 1991 | EP |
| 0 463 700 | Jan 1992 | EP |
| 0 566 229 | Oct 1993 | EP |
| 0 627 682 | Dec 1994 | EP |
| 0 631 252 | Dec 1994 | EP |
| 0 693 737 | Jan 1996 | EP |
| 0 734 008 | Sep 1996 | EP |
| 0 735 463 | Oct 1996 | EP |
| 0 810 553 AS | Dec 1997 | EP |
| 0 817 009 | Jan 1998 | EP |
| 0 825 550 | Feb 1998 | EP |
| 0 840 279 | May 1998 | EP |
| WO 8607646 | Dec 1986 | WO |
| WO 9200570 | Jan 1992 | WO |
| WO 9306553 | Apr 1993 | WO |
| WO 9721192 | Jun 1997 | WO |
| Number | Date | Country | |
|---|---|---|---|
| 60093159 | Jul 1998 | US |