A method and apparatus for processing a primitive for potential display on a display device (having a plurality of pixels) determines if the primitive intersects at least a predetermined number of pixel fragments on the display device. The predetermined number is no less than one. The method and apparatus then cull the primitive as a function of whether the primitive intersects at least the predetermined number of pixel fragments. If it is culled, the primitive is not raster processed (i.e., not subjected to raster processing, whether or not complete).
|
1. A method of processing a primitive, using a graphics processor implemented in either hardware or a combination of hardware and software, for potential display on a display device having a plurality of pixels, the method comprising:
forming, using the graphics processor, a bounding box based defined by a minimum and maximum x values and a minimum and maximum y values of the primitive;
determining, using the graphics processor, if the bounding box bounds at least one pixel fragment;
if the bounding box does not bound the at least one pixel fragment discarding the primitive without further culling processing;
if the bounding box does bound the at least one pixel fragment, determining if the bounding box bounds a predetermined number of pixel fragments;
if the bounding box bound does bound the predetermined number of pixel fragments forwarding the primitive to be further raster processed;
if the bounding box does not bound the predetermined number of pixel fragments determining, using the graphics processor, if the primitive intersects at least a second predetermined number of pixel fragments on the display device, the second predetermined number being no less than one; and
culling the primitive as a function of whether the primitive intersects at least the predetermined number of pixel fragments on the display device, the primitive not being raster processed if culled
if the primitive intersects the second predetermined number of pixel fragments forwarding the primitive to be further raster processed; and
if the primitive does not intersect the second predetermined number of pixel fragments, discarding the primitive without further culling processing.
15. A computer program product for use on a computer system for processing a primitive for potential display on a display device having a plurality of pixels, the computer program product comprising a non-transitory computer usable readable storage medium having computer readable program code stored thereon, the computer readable program code comprising:
program code for forming a bounding box defined by a minimum and maximum x values and a minimum and maximum y values of the primitive;
first program code for determining if the bounding box bounds at least one pixel fragment;
second program code for discarding the primitive without further culling processing, if the bounding box does not bound the at least one pixel fragment;
third program code for determining if the bounding box bounds a predetermined number of pixel fragments, if the bounding box bounds the at least one pixel fragment;
fourth program code for forwarding the primitive to be further raster processed if the primitive bounds the predetermined number of pixel fragments;
fifth program code for determining if the primitive intersects at least bounding box bounds a second predetermined number of pixel fragments on the display device, the second predetermined number being no less than one; and
program code for culling the primitive as a function of whether the primitive intersects at least the predetermined number of pixel fragments on the display device, the primitive not being raster processed if culled, if the bounding box does not bound the predetermined number of pixel fragments;
sixth program code for forwarding the primitive to the further raster processed if the primitive intersects the second predetermined number of pixel fragments; and
seventh program code for discarding the primitive without further culling processing if the primitive does not intersect the second predetermined number of pixel fragments.
0. 21. An apparatus for processing a primitive for potential display on a display device having a plurality of pixels, the apparatus comprising:
a graphics processor implemented in either hardware or a combination of hardware and software, the graphic processor comprising:
a geometry stage capable of performing geometry operations on the primitive, the geometry stage also being capable of forming, using the graphics processor, a bounding box defined by a minimum and maximum x values and a minimum and maximum y values of the primitive, determining, using the graphics processor, if the bounding box bounds at least one pixel fragment, if the bounding box does not bound the at least one pixel fragment, discarding the primitive without further culling processing, if the bounding box does bound the at least one pixel fragment, determining if the bounding box bounds at least a predetermined number of pixel fragments, if the bounding box does bound the predetermined number of pixel fragments, forwarding the primitive to be further raster processed, if the bounding box does not bound the predetermined number of pixel fragments determining, using the graphics processor, if the primitive intersects at least a second predetermined number of pixel fragments, the second predetermined number being no less than one, if the primitive intersects the second predetermined number of pixel fragments, forwarding the primitive to be further raster processed, if the primitive does not intersect the second predetermined number of pixel fragments, discarding the primitive without further culling processing; and
a raster stage operatively coupled with the geometry stage, the raster stage being capable of raster processing the primitive if the geometry stage does not discard the primitive.
9. An apparatus for processing a primitive for potential display on a display device having a plurality of pixels, the apparatus comprising:
a graphics processor implemented in either hardware or a combination of hardware and software, the graphic processor comprising:
a geometry stage capable of performing geometry operations on the primitive, the geometry stage also being capable of forming, using the graphics processor, a bounding box defined by a minimum and maximum x values and a minimum and maximum y values of the primitive, determining, using the graphics processor, if the bounding box bounds at least one pixel fragment, if the bounding box does not bound the at least one pixel fragment, discarding the primitive without further culling processing, if the bounding box does bound the at least one pixel fragment, determining if the primitive intersects bounding box bounds at least a predetermined number of pixel fragments on the display device, the geometry stage being configured to cull the primitive as a function of whether the primitive intersects at least the predetermined number of pixel fragments on the display device, the predetermined number being no less than one; if the bounding box bound does bound the predetermined number of pixel fragments forwarding the primitive to be further raster processed, if the bounding box does not bound the predetermined number of pixel fragments determining, using the graphics processor, if the primitive intersects at least a second predetermined number of pixel fragments, the second predetermined number being no less than one, if the primitive intersects the second predetermined number of pixel fragments forwarding the primitive to be further raster processed, if the primitive does not intersect the second predetermined number of pixel fragments, discarding the primitive without further culling processing; and
a raster stage operatively coupled with the geometry stage, the raster stage being capable of raster processing the primitive if the geometry stage does not cull discard the primitive.
2. The method as defined by
3. The method as defined by
0. 4. The method as defined by
0. 5. The method as defined by
0. 6. The method as defined by
forming a bounding box based upon positional data of the primitive.
7. The method as defined by claim 6 1 further wherein the primitive has an associated equation defining its position on the display device, the method further comprising:
determining if the bounding box bounds more than a prespecified number of pixel fragments; and
if the bounding box does not bound more than the prespecified number of pixel fragments, then using the equation to determine if the primitive intersects at least the predetermined number of pixel fragments.
0. 8. The method as defined by
0. 10. The apparatus as defined by
0. 11. The apparatus as defined by
12. The apparatus as defined by
a bounding box module capable of forming a the bounding box based upon positional data of the primitive.
13. The apparatus as defined by
0. 14. The apparatus as defined by
0. 16. The computer program product as defined by
0. 17. The computer program product as defined by
0. 18. The computer program product as defined by
program code for forming a bounding box based upon positional data of the primitive.
0. 19. The computer program product as defined by
program code for determining if the bounding box bounds more than a prespecified number of pixel fragments; and
program code for using the equation to determine whether the primitive intersects at least the predetermined number of pixel fragments, the program code for using being executed if the bounding box does not bound more than the prespecified number of pixel fragments.
0. 20. The computer program product as defined by
0. 22. The apparatus as defined by claim 21 wherein the geometry stage comprises:
a bounding box module capable of forming the bounding box based upon positional data of the primitive.
0. 23. The apparatus as defined by claim 22 further wherein the primitive has an associated equation defining its position on the display device, the geometry stage using the equation to determine whether the primitive intersects at least one pixel fragment if the bounding box bounds fewer than the first number of pixel fragments.
|
This patent application is related to United States patent application Ser. No. 10/715,882 filed on even date, entitled, “METHOD AND APPARATUS FOR PROCESSING PRIMITIVE DATA FOR POTENTIAL DISPLAY ON A DISPLAY DEVICE,” and naming Stephen Moffitt and Eng Lin Goh as inventors, the disclosure of which is incorporated Herein, in its entirety, by reference.
The invention generally relates to graphics processing and, more particularly, the invention relates to processing graphics primitives for potential display on a display device.
Many computer systems have a specialized graphics subsystem for producing vivid graphical images. At the core of these subsystems typically is a graphics processor that processes graphics data in a highly streamlined manner. In simplified terms, the graphics processor converts substantially unprocessed graphics data into a format that can be displayed on a conventional display device (e.g., a cathode ray tube display or a liquid crystal display).
Undesirably, graphics subsystems often process large amounts of graphical data for portions of objects that are not going to be displayed. For example, 3D graphics subsystems implementing OPENGL typically produce graphical data (e.g., attribute data, such as normal and texture data) for most primitives in an image—even for those primitives that are too small to light any pixels on the display device. Graphics processors in those subsystems nevertheless typically at least begin rasterizing such primitives before determining that they are too small to render.
Making that determination that late in the rendering process (i.e., during rasterization) can create processing inefficiencies. For example, before determining that the primitive is too small, the graphics processor may have performed geometry processes, calculated gradient information, and determined color information for the portion of the primitive between the vertices. Of course, calculating all that data is unnecessary if the primitive is too small to render. As a result, processing time is longer than necessary, consequently inhibiting system performance.
In accordance with one aspect of the invention, a method and apparatus for processing a primitive for potential display on a display device (having a plurality of pixels) determines if the primitive intersects at least a predetermined number of pixel fragments on the display device. The predetermined number is no less than one. The method and apparatus then cull the primitive as a function of whether the primitive intersects at least the predetermined number of pixel fragments. If it is culled, the primitive is not raster processed (i.e., not subjected to raster processing, whether or not complete).
In some embodiments, a graphics processor has 1) a raster stage capable of raster processing the primitive and 2) a geometry stage capable of forwarding primitive attribute data to the raster stage for raster processing. In such cases, the apparatus and method may determine if the primitive intersects at least the predetermined number of pixel fragments on the display device before forwarding primitive attribute data from the geometry stage to the raster stage.
Those skilled in the art understand that a 2D image is generated from pixel fragments stored in a frame buffer.
Other embodiments do not cull the primitive if the primitive is determined to intersect at least the predetermined number of pixel fragments on the display device. Conversely, some embodiments cull the primitive if the primitive is determined to not intersect at least the predetermined number of pixel fragments on the display device.
A number of methods may be used to determine if the primitive intersects at least one pixel fragment on the display device. For example, a bounding box may be formed based upon potential data of the primitive. It then may be determined if the bounding box bounds more than a prespecified number of pixel fragments. If the bounding box does not bound more than the prespecified number of pixel fragments, then an equation defining the position of the primitive may be used to determine if the primitive intersects at least one pixel fragment. Moreover, the primitive may be culled if no pixel fragments are bounded by the bounding box.
In accordance with another aspect of the invention, an apparatus for processing a primitive for potential display on a display device having a plurality of pixels includes 1) a geometry stage capable of performing geometry operations on the primitive, and 2) a raster stage operatively coupled with the geometry stage. The geometry stage is capable of determining if the primitive intersects at least a predetermined number of pixel fragments on the display device. In addition, the geometry stage is configured to cull the primitive as a function of whether the primitive intersects at least the predetermined number of pixel fragments on the display device. The rater stage is capable of raster processing the primitive if the geometry stage does not cull the primitive.
Illustrative embodiments of the invention are implemented as a computer program product having a computer usable medium with computer reachable program code thereon. The computer readable code may be read and utilized by a computer system in accordance with conventional processes.
The foregoing and advantages of the invention will be appreciated more fully from the following further description thereof with reference to the accompanying drawings wherein:
Illustrative embodiments avoid unnecessary processing by configuring the geometry stage of a graphics processor to prevent further processing of primitives that are too small to be rendered on a display device. To that end, the geometry stage first determines if a given primitive intersects at least a predetermined number of pixel fragments (e.g., one pixel fragment) on the display device. If it does (and the given primitive is not culled by other culling operations), then the geometry stage permits the given primitive to be further processed by succeeding graphics processor stages, such as the rasterization stage.
Conversely, if the geometry stage determines that the given primitive does not intersect the predetermined number of pixel fragments, then various embodiments stop processing the primitive. In that case, rather than continuing to process the given primitive, the geometry stage may begin processing the next succeeding primitive of the graphical object. Details of illustrative embodiments are discussed below.
The computer system 10 also has 3D graphics subsystem 18 implementing the OPENGL standard, which was initially developed by Silicon Graphics, Inc. of Mountain View, Calif. It should be noted that discussion of such a computer system 10 and graphics subsystem 18 is exemplary and thus, is not intended to limit all embodiments of the invention. Accordingly, various embodiments of the invention can be applied to other graphics processing types and standards (e.g., DIRECT3D and 2D graphics subsystems).
As shown in
Those skilled in the art should understand that the descriptions following the noted components are generalizations of their function. Accordingly, in addition to the process discussed below with regard to
As noted above, the graphics processor 20 may be implemented in either hardware, software, or a combination of hardware and software. When implemented as software, each stage preferably is made up of a series of computer instructions that executes across one or more high speed parallel processors. When implemented as hardware, however, each stage illustratively may be a specially designed application specific integrated circuit that performs the required functions.
Of course, as known in the art, a primitive also can be culled by means of other culling processes, such as backface culling or occlusion culling processes. In illustrative embodiments, the system executes culling operations that are less computationally intensive (e.g., back-face culling) before executing the culling process discussed in
The process of
Of course, before forming the bounding box, the primitive coordinate processor 42 and primitive assembler 44 cooperate to assemble the primitive in a conventional manner. Among other ways, the positional data (and subsequently, the attribute data, if necessary) may be explicitly forwarded from the host thread 12, or from the buffer 14 by pointer. For additional details relating to forwarding vertex data, see the above noted co-incorporated patent application naming Stephen Moffitt and Eng Lim Goh as co-inventors.
After receiving the positional data, the primitive coordinate processor 42 performs conventional transformation processes and forwards its resultant data to the primitive assembler 44. The primitive assembler 44 then uses that resultant data to logically assemble the primitive. Of course, because it merely is logically assembled, the primitive is not rasterized or rendered at this point. As known by those in the art, when assembling a primitive, the primitive assembler 44 determines which vertices make up the primitive. Among other things, assembly of the primitive at this point in the process permits the graphics processor 20 to use the positional data to determine if the primitive ultimately will be visible on the display device 22 (as discussed below).
The visibility processor 46 then determines if the bounding box intersects (i.e., bounds) any pixel fragments (step 302). In other words, the visibility processor 46 determines if any pixel fragments are within or on the boundary of the bounding box. It should be noted that the term “pixel fragment” has a well known meaning in the art. Specifically, a pixel fragment is a sample point logically located on a pixel. There can be one sample point or a plurality of sample points on a single pixel. For example, anti-aliasing processes (also known as “multisampling” processes) typically sample a pixel multiple times. Systems that do not multisample a pixel generally are considered to sample each pixel once (e.g., at the pixel center).
Accordingly, if it is determined at step 302 that the bounding box does not intersect any pixel fragments (e.g., see
Among other ways, the primitive preprocessor 32 may affirmatively discard the vertex attribute data by forwarding a message to the host thread 12 indicating that the attribute data for that vertex is not needed. In illustrative embodiments, however, the primitive pre-processor 32 effectively discards the vertex attribute data simply by not forwarding the discarded primitive to the rasterization stage 28. Instead, the primitive preprocessor 32 simply begins processing another primitive.
At this point in the process, it should be pointed out that as the number of pixel fragments in the bounding box increases, the likelihood that its corresponding primitive intersects at least one pixel fragment also increases. Accordingly, if there are more than a prespecified number of pixel fragments in a bounding box, then various embodiments skip further culling processes. The implementation dictates the predetermined number. For example, in one implementation, if more than ten pixel fragments are within the bounding box (e.g., see
Accordingly, returning to step 302, if the bounding box bounds at least one pixel fragment, then the process continues to step 306, in which it is determined if more than the prespecified number of pixel fragments intersect the bounding box. If the bound box intersects more than the prespecified number, then the process skips to step 310, in which the receiving module 34 retrieves the attribute data for processing by the attribute processor 36. After processing is complete, the geometry stage 26 forwards the resulting transformed data to the rasterization stage 28.
After receipt of the resulting transformed data from the geometry stage 26, the rasterization stage 28 performs conventional rasterization processes. For example, the rasterization stage 28 illustratively rasterizes the primitive and, when processing is completed, forwards data representing the fully processed primitive to the frame buffer 30. If double buffered, the frame buffer 30 could store the data of a fully processed image in its display portion of memory while receiving the pixel data (for the image currently being formed) in its write portion of memory.
Returning to step 306, if the visibility processor 46 determines that the bounding box does not intersect more than the predetermined number of pixel fragments, then the process continues to step 308. Specifically, at step 308, the visibility processor 46 determines if the primitive intersects any pixel fragments. To that end, the visibility processor 46 tests each pixel fragment within the bounding box to determine if any are within the mathematical border of the primitive (e.g., using edge equations).
If the primitive intersects at least one pixel fragment, then the process continues processing the primitive in a conventional pipelined manner (step 310, discussed above). Conversely, if the primitive does not intersect at least one pixel fragment, then the vertex data for that primitive is effectively discarded (step 304, discussed above).
For illustrative purposes,
For simplicity,
It should be noted that although various embodiments are discussed as culling primitives if they do not intersect at least one pixel fragment, alternative embodiments still may cull a primitive if it intersects one or more pixel fragments (e.g., two or three fragments). In a similar manner, the bounding box steps also may require a higher number of pixel fragments. Accordingly, discussion of specific numbers of pixel fragments within either a primitive or a bounding box is exemplary and not intended to limit all embodiments of the invention.
Accordingly, various embodiments of the invention cull a primitive as a function of whether it intersects at least one pixel fragment. In other words, if a primitive does not intersect at least one pixel fragment, it is culled. If it does, however, then it is processed in a conventional manner for display on the display device 22. The rasterization stage 28 thus should not process primitive data for a primitive that is too small to be rendered on the display device 22. Consequently, the disclosed graphics processor 20, including its rasterization stage 28, should receive and process small graphics primitives in a more rapid and efficient manner than those within systems that do not implement the disclosed processes.
In alternative embodiments, rather than being within the geometry stage 26, the disclosed functionality may be performed by another module. For example, the disclosed functionality may be a preprocessing stage within the raster stage 28. Accordingly, in that case, the raster stage 28 preprocesses the primitive data in the specified manner before applying conventional rasterization processes. As a second example, the disclosed functionality may be within some other system component between the geometry stage 26 and the raster stage 28.
Some embodiments of the invention may be implemented at least in part in any conventional computer programming language. For example, some embodiments may be implemented in a procedural programming language (e.g., “C”), or in an object oriented programming language (e.g., “C++”). Other embodiments of the invention may be implemented as preprogrammed hardware elements (e.g., application specific integrated circuits, FPGAs, and digital signal processors), or other related components.
In an alternative embodiment, 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., WIFI, microwave, infrared or other transmission techniques).
The series of computer instructions can embody 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.
Among other things, 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.
Although the above discussion discloses various exemplary embodiments of the invention, it should be apparent that those skilled in the art can make various modifications that will achieve some of the advantages of the invention without departing from the true scope of the invention.
Goh, Eng Lim, Moffitt, Stephen
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
5579455, | Jul 30 1993 | Apple Inc | Rendering of 3D scenes on a display using hierarchical z-buffer visibility |
5600763, | Jul 21 1994 | Apple Inc | Error-bounded antialiased rendering of complex scenes |
5613052, | Sep 02 1993 | International Business Machines Corporation | Method and apparatus for clipping and determining color factors for polygons |
5986669, | Sep 10 1996 | RPX Corporation | Graphics processing with efficient clipping |
6052128, | Jul 23 1997 | International Business Machines Corp.; IBM Corporation | Method and apparatus for clipping convex polygons on single instruction multiple data computers |
6246415, | Apr 30 1998 | Microsoft Technology Licensing, LLC | Method and apparatus for culling polygons |
6480205, | Jul 22 1998 | Nvidia Corporation | Method and apparatus for occlusion culling in graphics systems |
6636215, | Jul 22 1998 | Nvidia Corporation | Hardware-assisted z-pyramid creation for host-based occlusion culling |
6646639, | Jul 22 1998 | Nvidia Corporation | Modified method and apparatus for improved occlusion culling in graphics systems |
6664959, | Aug 20 1998 | Apple Inc | Method and apparatus for culling in a graphics processor with deferred shading |
6686924, | Feb 02 2000 | ADVANCED SILICON TECHNOLOGIES, LLC | Method and apparatus for parallel processing of geometric aspects of video graphics data |
6894689, | Jul 22 1998 | Nvidia Corporation | Occlusion culling method and apparatus for graphics systems |
6967664, | Apr 20 2000 | ATI Technologies ULC | Method and apparatus for primitive processing in a graphics system |
7218331, | May 13 2003 | VIA Technologies, Inc. | Bounding box in 3D graphics |
7414635, | Aug 01 2000 | ATI Technologies ULC | Optimized primitive filler |
20020196251, | |||
20040196281, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Jul 20 2006 | RPX Corporation | (assignment on the face of the patent) | / | |||
Oct 17 2006 | Silicon Graphics, Inc | General Electric Capital Corporation | SECURITY INTEREST SEE DOCUMENT FOR DETAILS | 018545 | /0777 | |
Sep 26 2007 | General Electric Capital Corporation | MORGAN STANLEY & CO , INCORPORATED | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 019995 | /0895 | |
Jun 03 2009 | Silicon Graphics, Inc | GRAPHICS PROPERTIES HOLDINGS, INC | CHANGE OF NAME SEE DOCUMENT FOR DETAILS | 023304 | /0677 | |
Dec 24 2012 | GRAPHICS PROPERTIES HOLDINGS, INC | RPX Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 029564 | /0799 |
Date | Maintenance Fee Events |
Jan 06 2017 | REM: Maintenance Fee Reminder Mailed. |
May 31 2017 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Jun 24 2017 | 4 years fee payment window open |
Dec 24 2017 | 6 months grace period start (w surcharge) |
Jun 24 2018 | patent expiry (for year 4) |
Jun 24 2020 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jun 24 2021 | 8 years fee payment window open |
Dec 24 2021 | 6 months grace period start (w surcharge) |
Jun 24 2022 | patent expiry (for year 8) |
Jun 24 2024 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jun 24 2025 | 12 years fee payment window open |
Dec 24 2025 | 6 months grace period start (w surcharge) |
Jun 24 2026 | patent expiry (for year 12) |
Jun 24 2028 | 2 years to revive unintentionally abandoned end. (for year 12) |