Coalescing to avoid read-modify-write during compressed data operations
AssigneeNVIDIA Corporation
InventorsJohn H. Edmondson, Robert A. Alfieri, Michael F. Harris, Steven E. Molnar
Life of this patent
Estimating the term…
Abstract
Write operations to a unit of compressible memory, known as a compression tile, are examined to see if data blocks to be written completely cover a single compression tile. If the data blocks completely cover a single compression tile, the write operations are coalesced into a single write operation and the single compression tile is overwritten with the data blocks. Coalescing multiple write operations into a single write operation improves performance, because it avoids the read-modify-write operations that would otherwise be needed.
Claims20
A method for writing a sequence of data blocks, wherein the size of the data blocks is smaller than the size of data stored in a unit of compressible memory, said method comprising the steps of:
- receiving a first data block to be written;
- temporarily holding the first data block in a buffer for a fixed number of clock cycles;
- subsequently receiving one or more additional data blocks to be written;
- temporarily holding the one or more additional data blocks in the buffer for the fixed number of clock cycles;
- determining if the received data blocks are sufficient to completely cover the same unit of compressible memory;
- and
- if the received data blocks are not sufficient to completely cover the same unit of compressible memory, reading the data in the same unit of compressible memory to which the first data block is to be written, decompressing the data, modifying the decompressed data with the first data block, and writing the modified data into the same unit of compressible memory;
- or
- if the received data blocks are sufficient to completely cover the same unit of compressible memory, combining the first data block and the one or more additional data blocks into a single coalesced write operation to the same unit of compressible memory without first reading the data in the same unit of compressible memory.
In a graphics processing unit having a frame buffer, a frame buffer interface, and a raster operations pipeline, a method for writing output data into a unit of compressible memory stored in the frame buffer using the raster operations pipeline and the frame buffer interface, said method comprising the steps of:
- transmitting first output data to the frame buffer interface using the raster operations pipeline;
- receiving the first output data at the frame buffer interface;
- temporarily storing the first output data at the frame buffer interface for a fixed number of clock cycles;
- transmitting one or more additional output data to the frame buffer interface using the raster operations pipeline;
- receiving the one or more additional output data at the frame buffer interface;
- temporarily storing the one or more additional data blocks at the frame buffer interface for the fixed number of clock cycles;
- determining if the received data blocks are sufficient to completely cover the same unit of compressible memory;
- and
- if the received output data are not sufficient to completely cover the same unit of compressible memory, reading the data in the unit of compressible memory to which the first output data is to be written, decompressing the data, modifying the decompressed data with the first output data, and writing the modified data into said unit of compressible memory;
- or
- if the received output data are sufficient to completely cover the same unit of compressible memory, combining the first output data and the one or more additional output data to generate a single coalesced write operation, and writing the combined output data into the same unit of compressible memory without first reading the data in the same unit of compressible memory.
A processing unit comprising:
- a frame buffer storing a plurality of compression tiles;
- a frame buffer interface coupled to the frame buffer for controlling reads from and writes into the frame buffer;
- and
- a rendering pipeline for transferring a sequence of data blocks to be stored in the frame buffer, wherein the size of the data blocks is less than the size of the compression tiles,
- wherein the frame buffer interface is configured to:
- (i) receive the sequence of data blocks from the rendering pipeline and determine that multiple number of data blocks correspond to a single compression tile;
- (ii) temporarily store each data block in the sequence of data blocks for a fixed number of clock cycles;
- (iii) determine that the multiple number of data blocks are sufficient to completely cover a single compression tile;
- and (iv) combine the multiple number of data blocks into a single coalesced write operation to the single compression tile without first reading data in the single compression tile.
Dependencies are inferred from the claim text.