Patent ID: 8270736

Claim:
A method for selecting compression modes to be applied in a depth buffer, the method comprising: obtaining values corresponding to a tile of the depth buffer; selecting a first compression mode from a first plurality of compression modes; compressing the values of the tile, writing the compressed values into a first block, based on the first mode, and using a preset number of primary bits to store information related to at least one of the first mode and a compression size of the first block; selecting a set of secondary compression modes from a second plurality of compression modes; determining a number of sub-tiles, that make up the tile, compressing values of the sub-tiles, writing the compressed values into a second block, based on the set of secondary compression modes, and using the same preset number of primary bits to store information related to at least one of the set of secondary compression modes and a compression size of the second block; comparing the compression size of the first block to the compression size of the second block; choosing the first mode or the set of secondary modes and a corresponding tile size based on a result of the comparing; and storing the selected compressed tile or sub-tiles into the depth buffer and writing into the preset number of primary bits information related to the chosen first mode or set of secondary compression modes or a corresponding size.