# US 2025/0148565 A1 · Progressive material caching

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

- Number: US 2025/0148565 A1
- Document ID: US20250148565A1
- Status: Published application
- Kind: A1
- Application number: 18/503,934
- Filed: 2023-11-07
- Published: 2025-05-08
- Earliest claimed: 2023-11-07
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Takahiro Harada; Shin Fujieda
- Web page: https://patentgrep.com/patent/US20250148565A1

## CPC

- G06T 1/60: Memory management
- G06F 16/2255: {Hash tables}
- G06T 15/005: {General purpose rendering architectures}
- G06T 15/04: Texture mapping
- G06T 15/06: Ray-tracing
- G06T 17/005: {Tree description, e.g. octree, quadtree}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

With minimal preprocessing of trees of materials in textures, this approach progressively caches outputs of some material nodes that are evaluated while rendering a scene. A node may be the root of a subtree, and the node may generate a value of a texel based on values of other nodes in the subtree. The subtree of a cacheable node contains no shading-point dependent node as a descendant other than texture coordinates. When reaching the cacheable node during a material evaluation for rendering, a descriptor of the node is used as a key to store or reuse the texel value of the cacheable node in a materials cache in memory. By defining cacheable nodes at highest possible levels in a tree, repeated evaluation of most nodes in the tree is avoided. For multithreaded acceleration, a materials cache is designed for thread-safe operation with an atomic instruction.

## Claims

### Claim 1

A device comprising:
a processor; and
a path tracer configured to use a descriptor of a node in a directed acyclic graph (DAG) that represents a material to retrieve a texel value from a materials cache in a memory.

### Claim 2 (depends on 1)

The device of claim 1, wherein the path tracer is further configured to:
generate, based on the descriptor of the node in the DAG that represents the material, a first hash value and a second hash value;
detect whether the second hash value is stored in a hash cell that is identified by the first hash value.

### Claim 3 (depends on 2)

The device of claim 2, further configured to use an atomic hardware instruction to store, into the hash cell, at least one selected from the group consisting of the second hash value and the texel value.

### Claim 4 (depends on 2)

The device of claim 2, further configured to store, into the hash cell, a machine word that contains the second hash value and the texel value.

### Claim 5 (depends on 2)

The device of claim 2, wherein the path tracer is further configured to:
detect that the a second hash value of a descriptor of a second node in the DAG that represents the material is not in a hash cell that is identified by a first hash value of the descriptor of the second node;
detect that the hash cell is full;
wherein the device is not configured to evict a texel value from the materials cache in response to the hash cell being full.

### Claim 6 (depends on 2)

The device of claim 2, wherein a value range for the first hash value is larger than a value range for the second hash value.

### Claim 7 (depends on 2)

The device of claim 2, wherein the first hash value is based on a UV value.

### Claim 8 (depends on 1)

The device of claim 1, wherein the descriptor of the node in the DAG that represents the material specifies at least one selected from the group consisting of a mipmap level and texel indices for a virtual texture.

### Claim 9 (depends on 1)

The device of claim 1, wherein the path tracer is further configured to in sequence:
a) perform a texel operation selected from the group consisting of:
generate the texel value for a particular texture coordinates,
store, into the materials cache, the texel value for a particular texture coordinates, and
render, based on the texel value for a particular texture coordinates from the materials cache, the node of the DAG of the material;
b) generate a second texel value for a second particular texture coordinates in a second node of the DAG of the material.

### Claim 10 (depends on 1)

The device of claim 1, further configured to in sequence:
detect a subset of nodes of the DAG of the material that should not be cached;
store the texel value in the materials cache.

### Claim 11 (depends on 1)

The device of claim 1, further configured to detect that the node of the DAG of the material is a root of a subgraph of the DAG that does not contain a node that depends on an attribute of a shading point that is not a texture coordinates of the shading point.

### Claim 12 (depends on 1)

The device of claim 1, further configured to:
dynamically generate a new virtual texture for a particular resolution;
store, in the materials cache and based on the particular resolution of the new virtual texture, said texel value for a particular texture coordinates in the node of the DAG of the material.

### Claim 13 (depends on 1)

The device of claim 1, further configured to multithread the materials cache without a lock.

### Claim 14 (depends on 1)

The device of claim 1, wherein the path tracer is not configured for dynamic kernel generation for an individual material.

### Claim 15 (depends on 1)

The device of claim 1, wherein the processor comprises at least one selected from a group consisting of the path tracer, a central processing unit, a graphics processing unit, and a programmed controller.

### Claim 16

A method comprising:
retrieving, by a path tracer having a descriptor of a node in a directed acyclic graph (DAG) that represents a material, a texel value from a materials cache in a memory.

### Claim 17 (depends on 16)

The method of claim 16, further comprising performing by the path tracer:
generating, based on the descriptor of the node in the DAG that represents the material, a first hash value and a second hash value;
detecting whether the second hash value is stored in a hash cell that is identified by the first hash value.

### Claim 18 (depends on 16)

The method of claim 16, further comprising performing in sequence by the path tracer:
a) performing a texel operation selected from the group consisting of:
generating the texel value for a particular texture coordinates,
storing, into the materials cache, the texel value for a particular texture coordinates, and
rendering, based on the texel value for a particular texture coordinates from the materials cache, the node of the DAG of the material;
b) generating a second texel value for a second particular texture coordinates in a second node of the DAG of the material.

### Claim 19 (depends on 16)

The method of claim 16, further comprising detecting that the node of the DAG of the material is a root of a subgraph of the DAG that does not contain a node that depends on an attribute of a shading point that is not a texture coordinates of the shading point.

### Claim 20 (depends on 16)

The method of claim 16, further comprising:
dynamically generating a new virtual texture for a particular resolution;
storing, in the materials cache and based on the particular resolution of the new virtual texture, said texel value for a particular texture coordinates in the node of the DAG of the material.
