# US 6,724,391 B1 · Mechanism for implementing Z-compression transparently

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 6,724,391 B1
- Document ID: US6724391B1
- Status: Granted
- Kind: B1
- Application number: 09/608,619
- Filed: 2000-06-30
- Granted: 2004-04-20
- Earliest claimed: 2000-06-30
- Assignees: Intel Corporation
- Inventors: Guy Peled; Zeev Sperber; Doron Orenstein; Guiliermo Savranski
- Web page: https://patentgrep.com/patent/US6724391B1

## CPC

- G06T 15/405: {using Z-buffer}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

The present invention provides a mechanism for implementing z-compression in a manner that is transparent to the user. Blocks of z-data are associated with storage locations in a z-data buffer in cleared, compressed, or uncompressed data states. Operations to the z-data buffer are monitored for selected operations. These operations may include clear or lock operations. If a selected operation is detected, a modified version of the selected operation is implemented to mask differences between the storage states of the data blocks.

## Claims

### Claim 1

A method for processing data comprising:
storing blocks of data in entries of a first memory location, each of the blocks of data being stored in one of a cleared, compressed, or uncompressed data states;
monitoring operations to the first memory location for a selected operation; and
if the selected operation is detected, implementing a modified version of the selected operation that masks differences between the data states of the data blocks, wherein implementing the modified version of the selected operation includes
saving a current processor state;
reading one or more data blocks according to their data states in response to the selected operation; and
writing the read data back into the entries of the first memory location in an uncompressed state before performing the selected operation on the data in the uncompressed state.

### Claim 2 (depends on 1)

The method of claim 1, wherein the selected operation is a read of specified data blocks, and implementing the modified read further comprises:
reading the converted data blocks according to their stored states.

### Claim 3 (depends on 1)

The method of claim 1, wherein the selected operation is a clear of entries of the first memory location and implementing the clear comprises setting the states of the data blocks in the first set of entries of the first memory location to the cleared state.

### Claim 4 (depends on 3)

The method of claim 3, further comprising updating a cleared state variable in a current processor state.

### Claim 5 (depends on 1)

The method of claim 1, wherein the selected operation is a clear of data blocks at specified entries of the first memory location and implementing the clear comprises:
setting the data states of the data blocks to the cleared state if the specified entries include all of the data blocks; and
writing a primitive to the specified entries of the first memory location if the specified entries do not include all of the data blocks.

### Claim 6 (depends on 5)

The method of claim 5, wherein the specified portion is a depth or a stencil portion of the data blocks.

### Claim 7

A method for processing z-data comprising:
determining whether z-compression is implemented;
implementing a selected operation if z-compression is not implemented; and
implementing a modified form of the selected operation if z-compression is implemented, wherein implementing the modified form of the selected operation comprises
saving a current processor state;
reading data blocks from entries of a first memory according to status bits of the data blocks; and
writing the read data blocks back into the entries of the first memory in an uncompressed state before executing the selected operation on the data blocks in the uncompressed state.

### Claim 8 (depends on 7)

The method of claim 7, wherein determining whether z-compression is implemented comprises:
allocating a first portion of memory to store z-data;
determining whether a memory system can support z-compression; and
allocating a second portion of the memory to store status bits for the z-data if the memory system can support depth-compression.

### Claim 9 (depends on 8)

The method of claim 8, wherein the z-data is organized as a plurality of data blocks and the status bits indicate an associated data block is compressed, uncompressed, or cleared.

### Claim 10 (depends on 9)

The method of claim 9, wherein the selected operation is a read of the entries of the first memory by an application.

### Claim 11 (depends on 9)

The method of claim 9, wherein the selected operation is a clear of the first memory, and implementing a modified form of the clear comprises setting the status bits in a second portion of the memory to a value that indicates the associated data is in a cleared state.

### Claim 12

A machine readable medium on which are stored instructions that are executable by an apparatus to implement a method comprising:
detecting a read or lock by an application on z-data blocks, each block of z-data having a data state indicated by an associated status field;
saving a processor state;
converting the z-data blocks to an uncompressed data state, wherein converting the z-data blocks to an uncompressed data state comprises
reading the z-data blocks according to their data states; and
writing the read z-data blocks in the uncompressed state before executing the read or lock;
restoring the processor state; and
executing the read or lock.

### Claim 13 (depends on 12)

The machine readable medium of claim 12, wherein converting the z-data blocks to an uncompressed data state further comprises:
updating status fields of the z-data blocks accordingly.

### Claim 14

A computer system comprising:
a processor core;
a data-buffer;
a status table associated with the data-buffer, to indicate a status value for each entry of the data-buffer; and
a machine-readable medium on which are stored instructions that are executable by the processor core to implement a method comprising:
intercepting a selected instruction that operates on the data-buffer;
saving a current state of the processor core;
modifying the data-buffer and the status table, as necessary, to place data in the data-buffer in a state expected by the selected instruction, wherein modifying the data buffer comprises
reading entries of the data buffer according to the status value associated with each of the entries,
decompressing the read entries, as necessary, and
writing the read entries to the data buffer in uncompressed form before executing the intercepted instruction on the read entries in uncompressed form; and
executing the intercepted instruction.

### Claim 15 (depends on 14)

The computer system of claim 14, wherein the selected instruction is a clear instruction.

### Claim 16 (depends on 15)

The computer system of claim 15, further comprising updating the status values of each of the read entries of the data-buffer in the status table.

### Claim 17 (depends on 15)

The computer system of claim 15, wherein reading entries of the data buffer comprises reading a cleared value from a local register for an entry having a cleared status value.

### Claim 18 (depends on 17)

The computer system of claim 17, further comprising writing the cleared value to the data buffer and updating the status table.
