CPU and graphics unit with shared cache
AssigneeAdvanced Micro Devices, Inc.
InventorJohn V. Sell
Life of this patent
Estimating the term…
Abstract
A method and mechanism for managing graphics data. A graphics unit is coupled to share a cache and a memory with a processor. The graphics unit is configured to partition rendered images into a plurality of subset areas. During the rendering of an image, data corresponding to subset areas of an image which require a relatively high number of accesses is deemed cacheable for a subsequent rendering. During a subsequent image rendering, if the graphics unit is required to evict data from a local buffer, the evicted data is only stored in the shared cache if a prior rendering indicated that the corresponding data is cacheable.
Claims23
An apparatus comprising:
- a processor;
- a graphics unit comprising a graphics unit cache configured to store graphics data;
- a memory coupled to the processor and the graphics unit, wherein the memory is configured to store processor data and graphics unit data;
- and
- a shared cache coupled to the processor, the graphics unit, and the memory, wherein the shared cache is configured to store processor data and graphics unit data;
- wherein the graphics unit is configured to:
- partition images to be rendered into a plurality of subset areas;
- track the number of times data corresponding to each of the subset areas is considered during the rendering of a first image;
- and
- determine for each of the subset areas whether data corresponding to a subset area is cacheable;
- wherein the graphics unit includes a plurality of entries, each entry corresponding to one of the subset areas and including an indicator which indicates whether the corresponding subset area is cacheable in the shared cache;
- wherein during the rendering of a second image, the graphics unit is further configured to store data evicted from the graphics unit cache in the shared cache only if an indicator in an entry which corresponds to the data evicted from the graphics unit cache indicates the data evicted from the graphics unit cache is cacheable in the shared cache, said indicator being set prior to initiating the rendering of the second image.
A method for managing graphics data, said method comprising:
- partitioning a first image to be rendered into a plurality of subset areas;
- storing a count corresponding to a first entry of a plurality of entries in response to considering graphics data corresponding to a subset area which corresponds to said first entry;
- providing an indication corresponding to said first entry subsequent to rendering said first image, wherein said indication indicates whether or not data corresponding to a subset area which corresponds to said first entry is cacheable in a shared cache;
- maintaining a plurality of entries, each entry corresponding to one of the subset areas and including an indication which indicates whether the corresponding subset area is cacheable in the shared cache;
- determining graphics data is to be evicted from a local cache;
- storing evicted data in the shared cache, in response to detecting an indication in an entry corresponding to said evicted data indicates said evicted data is cacheable in the shared cache;
- and
- storing the evicted data in a memory without storing the evicted data in the shared cache, in response to detecting the indication indicates the evicted data is not cacheable in the shared cache;
- wherein said shared cache is shared by a graphics unit and a processor.
A graphics unit comprising:
- a rendering unit;
- a local cache configured to store graphics data;
- and
- a prediction unit, wherein the prediction unit is configured to:
- partition images to be rendered into a plurality of subset areas;
- track the number of times data corresponding to each of the subset areas is considered during the rendering of a first image;
- and
- determine for each of the subset areas whether the corresponding subset area data is cacheable in a shared cache;
- wherein the graphics unit includes a plurality of entries, each entry corresponding to one of the subset areas and including an indicator which indicates whether the corresponding subset area is cacheable in the shared cache;
- wherein during the rendering of a second image, the graphics unit is further configured to store data evicted from the graphics unit cache in the shared cache only if an indicator in an entry which corresponds to the data evicted from the graphics unit cache indicates the data evicted from the graphics unit cache is cacheable in the shared cache, said indicator being set prior to initiating the rendering of the second image.
Dependencies are inferred from the claim text.