# US 9,355,430 B2 · Techniques for interleaving surfaces

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

- Number: US 9,355,430 B2
- Document ID: US9355430B2
- Status: Granted
- Kind: B2
- Application number: 14/033,389
- Filed: 2013-09-20
- Published: 2015-03-26
- Granted: 2016-05-31
- Earliest claimed: 2013-09-20
- Assignees: NVIDIA Corporation
- Applicants: Nvidia Corporation
- Inventors: Eric B. Lum; Cass W. Everitt; Henry Packard Moreton; Yury Y. Uralsky; Cyril Crassin; Jerome F. Duluk, Jr.
- Web page: https://patentgrep.com/patent/US9355430B2

## CPC

- G06T 1/60: Memory management
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

One embodiment sets forth a method for allocating memory to surfaces. A software application specifies surface data, including interleaving state data. Based on the interleaving state data, a surface access unit bloats addressees derived from discrete coordinates associated with the surface, creating a bloated virtual address space with a predictable pattern of addresses that do not correspond to data. Advantageously, by creating predictable regions of addresses that do not correspond to data, the software application program may configure the surface to share physical memory space with one or more other surfaces. In particular, the software application may map the virtual address space together with one or more virtual address spaces corresponding to complementary data patterns to the same physical base address. And, by overlapping the virtual address spaces onto the same pages in physical address space, the physical memory may be more densely packed than by using prior-art allocation techniques.

## Claims

### Claim 1

A method for allocating memory to surfaces, the method comprising:
receiving first surface data related to a first surface;
receiving first surface interleaving state data related to the first surface;
computing a first bloat based on the first surface interleaving state data;
mapping the first surface data to a first surface virtual address space based on the first bloat; and
mapping one or more pages included in the first surface virtual address space to a physical address space.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first surface interleaving state data specifies a location and a value of one or more interleaving bits with respect to a first coordinate associated with the first surface data and a second surface associated with the first surface data.

### Claim 3 (depends on 2)

The method of claim 2, wherein computing the first bloat comprises inserting the one or more interleaving bits into bits that represent coordinates associated with the first surface data.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
receiving second surface data related to a second surface;
receiving second surface interleaving state data related to the second surface;
computing a second bloat based on the second surface interleaving state data;
mapping the second surface data to a second surface virtual address space based on the second bloat; and
mapping one or more pages included in the second surface virtual address space to the physical address space.

### Claim 5 (depends on 4)

The method of claim 4, wherein the first surface interleaving state data and the second surface interleaving state data specify that the first surface and the second surface map to the same base address in the physical address space.

### Claim 6 (depends on 5)

The method of claim 5, wherein the first surface data includes information related to a position in the first surface and the second surface data does not include information related to a corresponding position in the second surface.

### Claim 7 (depends on 5)

The method of claim 5, wherein the first surface and the second surface differ in at least one of shape and size.

### Claim 8 (depends on 1)

The method of claim 1, wherein the first surface comprises a texture.

### Claim 9 (depends on 8)

The method of claim 8, wherein the texture comprises a level of a mipmap.

### Claim 10

A non-transitory computer-readable storage medium including instructions that, when executed by a processing unit, cause the processing unit to allocate memory to surfaces by performing the steps of:
receiving first surface data related to a first surface;
receiving first surface interleaving state data related to the first surface;
computing a first bloat based on the first surface interleaving state data;
mapping the first surface data to a first surface virtual address space based on the first bloat; and
mapping one or more pages included in the first surface virtual address space to a physical address space.

### Claim 11 (depends on 10)

The computer-readable storage medium of claim 10, wherein the first surface interleaving state data specifies a location and a value of one or more interleaving bits with respect to a first coordinate associated with the first surface data and a second surface associated with the first surface data.

### Claim 12 (depends on 11)

The computer-readable storage medium of claim 11, wherein computing the first bloat comprises inserting the one or more interleaving bits into bits that represent coordinates associated with the first surface data.

### Claim 13 (depends on 10)

The computer-readable storage medium of claim 10, further comprising:
receiving second surface data related to a second surface;
receiving second surface interleaving state data related to the second surface;
computing a second bloat based on the second surface interleaving state data;
mapping the second surface data to a second surface virtual address space based on the second bloat; and
mapping one or more pages included in the second surface virtual address space to the physical address space.

### Claim 14 (depends on 13)

The computer-readable storage medium of claim 13, wherein the first surface interleaving state data and the second surface interleaving state data specify that the first surface and the second surface map to the same base address in the physical address space.

### Claim 15 (depends on 14)

The computer-readable storage medium of claim 14, wherein the first surface data includes information related to a position in the first surface and the second surface data does not include information related to a corresponding position in the second surface.

### Claim 16 (depends on 14)

The computer-readable storage medium of claim 14, wherein the first surface and the second surface differ in at least one of shape and size.

### Claim 17 (depends on 10)

The computer-readable storage medium of claim 10, wherein the first surface comprises a texture.

### Claim 18 (depends on 17)

The computer-readable storage medium of claim 17, wherein the texture comprises a level of a mipmap.

### Claim 19

A system configured to allocate memory to surfaces, the system comprising:
a surface access unit configured to:
receive first surface data related to a first surface,
receive first surface interleaving state data related to the first surface,
compute a first bloat based on the first surface interleaving state data, and
map the first surface data to a first surface virtual address space based on the first bloat; and
a memory management unit configured to:
map one or more pages included in the first surface virtual address space to a physical address space.

### Claim 20 (depends on 19)

The system of claim 19, wherein the first surface interleaving state data specifies a location and a value of one or more interleaving bits with respect to a first coordinate associated with the first surface data and a second surface associated with the first surface data.
