Apparatus and method for fragment operations in a 3D-graphics pipeline
First Claim
1. A method for rendering a graphics image, said method comprising:
- receiving first data associated with a fragment having pixel-level resolution;
performing a first fragment operation on said fragment on a per-pixel basis using said first data;
receiving second data associated with said fragment having sample-level resolution wherein said sample-level resolution is different than said pixel-level resolution; and
performing a second fragment operation on said fragment on a per-sample basis using said second data.
3 Assignments
0 Petitions
Accused Products
Abstract
Apparatus and methods for rendering 3D graphics images. The apparatus include a port for receiving commands from a graphics application, an output for sending a rendered image to a display and a fragment-operations pipeline, coupled to the port and to the output, the pipeline including a stage for performing a fragment operation on a fragment on a per-pixel basis, as well as a stage for performing a fragment operation on the fragment on a per-sample basis. The stage for performing on a per-pixel basis is one of the following: a scissor-test stage, a stipple-test stage, an alpha-test stage or a colorest stage, and the stage for performing on a per-sample basis is one of the following: a Z-test stage, a blending stage or a dithering stage. The apparatus programmatically selects whether to perform a stencil test on a per-pixel or a per-sample basis and performs the stencil test on the selected basis. The apparatus also programmatically selects pixel samples for per-sample operations, where the sample selections differ with different instances of the same per-sample operation. The apparatus also programmatically selects a set of subdivisions of a pixel as samples for use in the per-sample fragment operation, programmatically assigns different weights to at least two samples in the set and performs the per-sample fragments operation on the fragment using the programmatically selected and differently weighted samples.
-
Citations
32 Claims
-
1. A method for rendering a graphics image, said method comprising:
-
receiving first data associated with a fragment having pixel-level resolution;
performing a first fragment operation on said fragment on a per-pixel basis using said first data;
receiving second data associated with said fragment having sample-level resolution wherein said sample-level resolution is different than said pixel-level resolution; and
performing a second fragment operation on said fragment on a per-sample basis using said second data. - View Dependent Claims (2, 3, 4, 5, 6)
performing one of the following fragment operations on a per-pixel basis;
scissor test, stipple test, alpha test, color test;
wherein said step of performing on a per-sample basis comprises;
performing one of the following fragment operations on a per-sample basis;
Z test blending, dithering.
-
-
3. The method of claim 1, wherein said step of performing on a per-sample basis comprises:
-
programmatically selecting a set of subdivisions of a pixel as samples for use in said fragment operation on a per-sample basis, and wherein said method further comprises; then programmatically selecting a different set of subdivisions of a pixel as samples for use in a second fragment operation on a per-sample basis; and
then performing said second fragment operation on a fragment on a per-sample basis, using said programmatically selected samples.
-
-
4. The method of claim 1, wherein said step of performing on a per-sample basis comprises:
-
programmatically selecting a set of subdivisions of a pixel as samples for use in said fragment operation on a per-sample basis;
programmatically assigning different weights to two samples in said set; and
performing said fragment operation on said fragment on a per-sample basis, using said programmatically selected and differently weighted samples.
-
-
5. The method of claim 1, the method further comprising:
-
dividing the area of an image being rendered into a plurality of tiles, each tile comprising a multiplicity of pixels in the Image;
storing, for a selected one of the tiles, a plurality of per-sample color values for each pixel;
rendering, for the selected tile, graphics data, generating per-sample color value;
converting, when the rendering for the selected tile is completed, for each pixel in the selected tile, the per-sample color values to per-pixel color values by blending the plurality of per-sample color values; and
storing the per-pixel color values in a frame buffer.
-
-
6. The method of claim 5, the method further comprising:
-
spatially sorting said graphics data into said plurality of tiles, generating a list for each of said tiles of said graphics data that overlap said tiles;
selecting a current tile from said plurality of tiles; and
determining visible said fragments of said geometry data in said current tile.
-
-
7. A method for rendering a graphics image, said method comprising:
-
performing one of the following fragment operations on a fragment on a per-pixel basis;
scissor test, stipple test, alpha test, color test;
programmatically selecting, based on a state parameter, whether to perform a stencil test on a per-pixel or a per-sample basis, and performing said stencil test on said selected basis; and
programmatically selecting a set of subdivisions of a pixel as samples for use in a fragment operation on a per-sample basis;
programmatically assigning different weights to two samples in said set; and
performing one of the following fragment operations on a per-sample basis, using said programmatically selected and differently weighted samples;
Z test, blending, dithering;
then programmatically selecting a different set of subdivisions of a pixel as samples for use in a second fragment operation on a per-sample basis; and
then performing said second fragment operation on a fragment on a per-sample basis, using said programmatically selected samples.
-
-
8. A computer-readable medium for data storage wherein is located a computer program for causing a graphics-rendering system to render an image by:
-
performing one of the following fragment operations on a fragment on a per-pixel basis;
scissor test, stipple test, alpha test, color test;
programmatically selecting, based on a state parameter, whether to perform a stencil test on a per-pixel or a per-sample basis, and performing said stencil test on said selected basis; and
programmatically selecting a set of subdivisions of a pixel as samples for use in a fragment operation on a per-sample basis, performing one of the following fragment operations on a per-sample basis, using said programmatically selected samples;
Z test, blending, dithering;
then programmatically selecting a different set of subdivisions of a pixel as samples for use in a second fragment operation on a per-sample basis; and
then performing said second fragment operation on a fragment on a per-sample basis, using said programmatically selected samples.
-
-
9. A system for rendering graphics images, said system comprising:
-
a port for receiving commands from a graphics application;
an output for sending a rendered image to a display; and
a fragment-operations pipeline, coupled to said port and to said output, said fragment-operations pipeline comprising;
a stage for performing a fragment operation on a fragment on a per-pixel basis based on data having per-pixel resolution; and
a stage for performing a fragment operation on said fragment on a per-sample basis based on data having per-sample resolution wherein said per-sample resolution is different than said per-pixel resolution. - View Dependent Claims (10, 11)
-
-
12. A graphics rendering method for forming a rendered image in a frame buffer, the graphics rendering method comprising the steps:
-
receiving graphics data comprising graphics primitives;
spatially sorting the received graphics primitives into a plurality of tiles, each tile comprising a muliplicity of pixel locations within the image;
selecting a current tile from the plurality of tiles;
generating primitive fragments of the graphics primitives in the current tile;
reading previously stored per-pixel color data from the frame buffer;
converting the read per-pixel color data into per-sample color data;
storing the per-sample color data in a sample buffer, wherein said sample buffer is separate from said frame buffer;
performing per-sample fragment operations on the primitive fragments and the stored per-sample color data, generating updated per-sample color data, the updated per-sample color data being stored in the sample buffer;
converting the per-sample color data in the sample buffer into updated per-pixel color data; and
storing the updated per-pixel color data into the frame buffer. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
determining visible primitive fragments from the generated primitive fragments, using only the visible primitive fragments as the primitive fragments in the step performing per-sample fragment operations, thereby avoiding performing per-sample fragment operations on generated primitive fragments that are not visible primitive fragments.
-
-
14. The graphics rendering method of claim 13, further comprising the steps:
generating color values for the visible primitive fragments, thereby avoiding generating color values for any of the generated primitive fragments that are not visible primitive fragments.
-
15. The graphics rendering method of claim 13, further comprising the step:
performing per-pixel fragment operations on the primitive fragments to generate resultant fragments, the resultant fragments used as the primitive fragments in the step of performing per-sample fragment operations.
-
16. The graphics rendering method of claim 15, further comprising the steps:
-
programmatically selecting whether to perform a stencil test on a per-pixel or on a per-sample basis;
if the per-pixel basis for stencil test is selected, performing a per-pixel stencil method, the per-pixel stencil method comprising the steps;
(a) reading previously stored per-pixel stencil data from the frame buffer;
(b) storing the per-pixel stencil data in the sample buffer;
(c) performing the stencil test on the primitive fragments and the stored per-pixel stencil data, generating updated per-pixel stencil data, the updated per-pixel stencil data being stored in the sample buffer; and
(d) storing the updated per-pixel stencil data into the frame buffer; and
if the per-sample basis for stencil test is selected, performing a per-sample stencil method, the per-sample stencil method comprising the steps;
(a) reading previously stored per-sample stencil data from the frame buffer;
(b) storing the per-sample stencil data in the sample buffer;
(c) performing the stencil test on each sample in the primitive fragments and the stored per-sample stencil data, generating updated per-sample stencil data, the updated per-sample stencil data being stored in the sample buffer; and
(d) storing the updated per-sample stencil data into the frame buffer.
-
-
17. The graphics rendering method of claim 16, further comprising the steps:
-
detecting a condition of an application program specifying a buffer clear operation such that the previously stored stencil data from the frame buffer has substantially no effect on the stencil data stored into the frame buffer; and
skipping the step of reading previously stored per-pixel color data from the frame buffer when the detected condition exists.
-
-
18. The graphics rendering method of claim 12, further comprising the steps:
-
reading previously stored per-pixel depth data from the frame buffer;
converting the read per-pixel depth data Into per-sample depth data;
storing the per-sample depth data in the sample buffer;
performing per-sample fragment operations on the primitive fragments and the stored per-sample depth data, generating updated per-sample depth data, the updated per-sample depth data being stored in the sample buffer;
programmatically selecting a choosing criteria to choose amongst per-sample depth data so as to generate a per-pixel depth data;
choosing the per-sample depth data in the sample buffer according to the programmatically selected choosing criteria as updated per-pixel depth data; and
storing the updated per-pixel depth data into the frame buffer.
-
-
19. The graphics rendering method of claim 18, further comprising the steps:
-
detecting a condition of an application program specifying a buffer clear operation such that the previously stored per-pixel depth data from the frame buffer has substantially no effect on the per-pixel depth data stored in the step of storing the updated per-pixel depth data into the frame buffer; and
skipping the step of reading previously stored per-pixel depth data from the frame buffer when the detected condition exists.
-
-
20. The graphics rendering method as in claim 19, further comprising the step:
after the step of reading previously stored per-pixel color data from the frame buffer and before converting the read per-pixel color data into per-sample color data, storing the read per-pixel color data into one of a plurality of pixel tile buffers, the plurality of pixel tile buffers storing per-pixel data corresponding to a plurality of tiles; and
wherein the step of storing the per-sample color data in a sample buffer further comprises the step of selecting one of a plurality of sample buffers for storing per-sample color data;
the step of converting the per-sample color data in the sample buffer into updated per-pixel color data further comprises the step weighting each of the samples in a pixel by a programmatically selected weight.
-
21. The graphics rendering method of claim 20, further comprising the steps:
-
selecting one of the plurality of pixel tile buffers for storing the read per-pixel color data corresponding to the current file; and
setting handshaking bits indicating when the selected pixel tile buffer is empty and when reading previously stored per-pixel color data from the frame buffer is completed.
-
-
22. The graphics rendering method as in claim 12 further comprising the steps:
-
caching a plurality of pipeline state information settings; and
selecting one of the pipeline state information settings as parameters for use In the per-sample fragment operations.
-
-
23. A graphics rendering method for forming a rendered image in a frame buffer, the graphics rendering method comprising the steps:
-
receiving graphics data comprising graphics primitives;
spatially sorting the received graphics primitives into a plurality of tiles, each tile comprising a multiplicity of pixel locations within the image;
selecting a current tile from the plurality of tiles;
generating primitive fragments of the graphics primitives in the current tile;
performing per-sample fragment operations on the primitive, generating per-sample color data;
storing the generated per-sample color data in one of a plurality of sample buffers;
converting the stored per-sample color data into per-pixel color data;
storing the per-pixel color data, and not the per-sample color data, into one of a plurality of pixel tile buffers; and
.transferring the per-pixel color data from the one of a plurality of pixel tile buffer to the frame buffer. - View Dependent Claims (24)
determining visible primitive fragments from the generated primitive fragments, using only the visible primitive fragments as the primitive fragments in the step performing per-sample fragment operations, thereby avoiding performing per-sample fragment operations on generated primitive fragments that are not visible polygon fragments; and
generating color values for the visible primitive fragments, thereby avoiding generating color values for any of the generated primitive fragments that are not visible primitive fragments.
-
-
25. A graphics pipeline forming a rendered image in a frame buffer, the graphics pipeline comprising:
-
logic receiving graphics data comprising graphics primitives;
logic spatially sorting the received graphics primitives into a plurality of tiles, each tile comprising a multiplicity of pixel locations within the image;
a first memory storing the sorted graphics primitives;
logic selecting a current tile from the plurality of tiles;
logic generating primitive fragments of the graphics primitives in the current tile;
read logic reading previously stored per-pixel color data for the current tile from the frame buffer;
a second memory storing the per-pixel color for the current tile;
logic converting the per-pixel color data in the second memory into per-sample color data;
a third memory storing the per-sample color data;
fragment logic comprising logic performing per-sample fragment operations on the primitive fragments and the stored per-sample color data, generating updated per-sample color data, the updated per-sample color data being stored in the third memory;
logic converting the per-sample color data in the third memory into updated per-pixel color data; and
logic storing the updated per-pixel color data into the frame buffer. - View Dependent Claims (26, 27)
logic determining visible primitive fragments from the generated primitive fragments;
the fragment logic further comprising logic performing per-sample fragment operations on only the visible primitive fragments, thereby avoiding performing per-sample fragment operations on generated primitive fragments that are not visible primitive fragments;
logic generating color values for the visible primitive fragments, thereby avoiding generating color values for any of the generated primitive fragments that are not visible primitive fragments;
logic detecting a condition of an application program specifying a buffer clear operation such that the previously stored per-pixel color data from the frame buffer has substantially no effect on the updated per-pixel color data;
the read logic skipping the reading of previously stored per-pixel color data from the frame buffer when the detected condition exists; and
logic performing per-pixel fragment operations on the primitive fragments to generate resultant fragments, the resultant fragments used as the primitive fragments by the fragment logic;
the read logic reading previously stored per-pixel depth data from the frame buffer;
logic converting the read per-pixel depth data into per-sample depth data;
the third memory storing the per-sample depth data;
the fragment logic further comprising logic performing per-sample fragment operations on the primitive fragments and the stored per-sample depth data, generating updated per-sample depth data, the updated per-sample depth data being stored in the third memory;
a register storing a programmatically set value selecting a criteria to choose amongst per-sample depth data;
logic choosing the updated per-sample depth data according to the programmatically set value so as to generate updated per-pixel depth data; and
logic storing the updated per-pixel depth data into the frame buffer.
-
-
27. The graphics pipeline of claim 26, further comprising:
-
a register storing a programmatically set value selecting whether to perform a stencil test on a per-pixel basis or on a per-sample basis;
the read logic reading previously stored stencil data from the frame buffer;
logic storing the read stencil data into the second memory;
the fragment logic further comprising logic performing the stencil test and generating updated stencil date, the stencil test being performed on;
(1) a per-pixel basis if the set value indicates the per-pixel basis, or (2) a per-sample basis if the set value indicates the per-sample basis;
logic storing the updated stencil data into the frame buffer;
logic detecting a condition of an application program specifying a buffer clear operation such that the previously stored stencil data from the frame buffer has substantially no effect on the updated stencil data; and
the read logic skipping the reading of previously stored stencil data from the frame buffer when the detected condition exists.
-
-
28. A graphics pipeline forming a rendered image in a frame buffer, the graphics pipeline comprising:
-
logic receiving graphics data comprising graphics primitives;
logic spatially sorting the received graphics primitives into a plurality of tiles, each tile comprising a multiplicity of pixel locations within the image;
a first memory storing the sorted graphics primitives;
logic selecting a current tile from the plurality of tiles;
logic generating primitive fragments of the graphics primitives in the current tile;
a plurality of second memories storing per-sample color data;
fragment logic performing per-sample fragment operations on the primitive fragments and generating per-sample color data, storing the per-sample color data in a selected one of the second memories;
a plurality of third memories storing per-pixel color values, and not per-sample color values;
logic converting the per-sample color data in the selected second memory into per-pixel color data, storing the per-pixel color data, and not per-sample color data, into a selected one of the third memories; and
logic storing the per-pixel color data into the frame buffer. - View Dependent Claims (29, 30)
logic determining visible primitive fragments from the generated primitive fragments;
the fragment logic further comprising logic performing per-sample fragment operations on only the visible primitive fragments, thereby avoiding performing per-sample fragment operations on generated primitive fragments that are not visible primitive fragments.
-
-
30. The graphics pipeline of claim 29, further comprising:
logic generating color values for the visible primitive fragments, thereby avoiding generating color values for any of the generated primitive fragments that are not visible primitive fragments.
-
31. A method for rendering a graphics image, said method comprising:
-
programmatically selecting whether to perform a stencil test on a per-pixel or a per-sample basis, and performing said stencil test on said selected basis.
-
-
32. A computer-readable medium for data storage wherein is located a computer program for causing a graphics-rendering system to render an image by:
-
receiving first data associated with a fragment having pixel-level resolution;
performing a first fragment operation on said fragment on a per-pixel basis using said first data;
receiving second data associated with said fragment having sample-level resolution wherein said per-sample resolution is different than said per-pixel resolution; and
performing a second fragment operation on said fragment on a per-sample basis using said second data.
-
Specification