Tracking pixel lineage in variable rate shading
AssigneeMicrosoft Technology Licensing, LLC
InventorsIvan Nevraev, Martin J. I. Fuller, Mark S. Grossman
Life of this patent
Estimating the term…
Abstract
Methods and devices for performing variable rate shading are described. Invocation information and lineage information for each pixel of a plurality of pixels of a primitive are stored in an invocation buffer and a lineage buffer of a graphics processing unit. One or more deferred shading or post-processing operations are performed on the image based at least in part on the invocation information and the lineage information associated with each pixel of the plurality of pixels.
Claims22
A method of variable rate shading, comprising:
- rasterizing, by a graphics processing unit (GPU), a primitive of an image based on one or more corresponding shading rates, wherein the primitive includes a plurality of pixels;
- generating, based on the rasterizing, metadata that identifies whether each pixel of the plurality of pixels is one of an anchor pixel, a broadcast pixel, or an orphan pixel, wherein each anchor pixel is a pixel for which a pixel shader was previously invoked, wherein each broadcast pixel includes shading information copied from a referenced anchor pixel, and wherein each orphan pixel includes shading information copied from a previously referenced anchor pixel that was overwritten;
- tracking, by the GPU, a shading state for each pixel of the plurality of pixels based on the metadata by generating invocation information stored in an invocation buffer and lineage information stored in a lineage buffer, wherein the invocation information includes information about the pixel shader to indicate whether a respective pixel is the anchor pixel, wherein the lineage information includes pointer information identifying one of the plurality of pixels from which shading information originated to indicate whether the respective pixel is the broadcast pixel, and wherein a combination of the invocation information and the lineage information indicates whether the respective pixel is the orphan pixel;
- and
- performing one or more deferred shading or post-processing operations on at least one pixel of the plurality of pixels of the image based at least in part on the shading state of the at least one pixel as tracked by the invocation information and the lineage information.
A computer device for variable rate shading, comprising:
- a memory;
- and
- a graphics processing unit (GPU) in communication with the memory, wherein the GPU is configured to:
- rasterize, by a graphics processing unit (GPU), a primitive of an image based on one or more corresponding shading rates, wherein the primitive includes a plurality of pixels;
- generate, based on the rasterization, metadata that identifies whether each pixel of the plurality of pixels is one of an anchor pixel, a broadcast pixel, or an orphan pixel, wherein each anchor pixel is a pixel for which a pixel shader was previously invoked, wherein each broadcast pixel includes shading information copied from a referenced anchor pixel, and wherein each orphan pixel includes shading information copied from a previously referenced anchor pixel that was overwritten;
- track, by the GPU, a shading state for each pixel of the plurality of pixels based on the metadata by generating invocation information stored in an invocation buffer and lineage information stored in a lineage buffer, wherein the invocation information includes information about the pixel shader to indicate whether a respective pixel is the anchor pixel, wherein the lineage information includes pointer information identifying one of the plurality of pixels from which shading information originated to indicate whether the respective pixel is the broadcast pixel, and wherein a combination of the invocation information and the lineage information indicates whether the respective pixel is the orphan pixel;
- and
- perform one or more deferred shading or post-processing operations on at least one pixel of the plurality of pixels of the image based at least in part on the shading state of the at least one pixel as tracked by the invocation information and the lineage information.
A computer-readable medium storing computer-executable instructions executable by a processor for variable rate shading, comprising instructions to:
- rasterize, by a graphics processing unit (GPU), a primitive of an image based on one or more corresponding shading rates, wherein the primitive includes a plurality of pixels;
- generate, based on the rasterization, metadata that identifies whether each pixel of the plurality of pixels is one of an anchor pixel, a broadcast pixel, or an orphan pixel, wherein each anchor pixel is a pixel for which a pixel shader was previously invoked, wherein each broadcast pixel includes shading information copied from a referenced anchor pixel, and wherein each orphan pixel includes shading information copied from a previously referenced anchor pixel that was overwritten;
- track, by the GPU, a shading state for each pixel of the plurality of pixels based on the metadata by generating invocation information stored in an invocation buffer and lineage information stored in a lineage buffer, wherein the invocation information includes information about the pixel shader to indicate whether a respective pixel is the anchor pixel, wherein the lineage information includes pointer information identifying one of the plurality of pixels from which shading information originated to indicate whether the respective pixel is the broadcast pixel, and wherein a combination of the invocation information and the lineage information indicates whether the respective pixel is the orphan pixel;
- and
- perform one or more deferred shading or post-processing operations on at least one pixel of the plurality of pixels of the image based at least in part on the shading state of the at least one pixel as tracked by the invocation information and the lineage information.
Dependencies are inferred from the claim text.