# US 2021/0287422 A1 · Partially resident bounding volume hierarchy

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

- Number: US 2021/0287422 A1
- Document ID: US20210287422A1
- Status: Published application
- Kind: A1
- Application number: 16/819,014
- Filed: 2020-03-13
- Published: 2021-09-16
- Earliest claimed: 2020-03-13
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Skyler Jonathon Saleh; Fataneh Ghodrat
- Web page: https://patentgrep.com/patent/US20210287422A1

## CPC

- G06T 15/06: Ray-tracing
- G06F 18/243: relating to the number of classes
- G06T 1/60: Memory management
- G06T 15/005: {General purpose rendering architectures}
- G06T 17/10: Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for performing ray tracing for a ray are provided. The techniques include, based on first traversal of a bounding volume hierarchy, identifying a first memory page that is classified as resident, obtaining a first portion of the bounding volume hierarchy associated with the first memory page, traversing the first portion of the bounding volume hierarchy according to a ray intersection test, based on second traversal of the bounding volume hierarchy, identifying a second memory page that is classified as valid and non-resident, and in response to the second memory page being classified as valid and non-resident, determining that a miss occurs for each node of the bounding volume hierarchy within the second memory page.

## Claims

### Claim 1

A method for performing ray tracing for a ray, the method comprising:
based on first traversal of a bounding volume hierarchy, identifying a first memory page that is classified as resident;
obtaining a first portion of the bounding volume hierarchy associated with the first memory page;
traversing the first portion of the bounding volume hierarchy according to a ray intersection test;
based on second traversal of the bounding volume hierarchy, identifying a second memory page that is classified as valid and non-resident;
in response to the second memory page being classified as valid and non-resident, determining that a miss occurs for each node of the bounding volume hierarchy within the second memory page.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first traversal of the bounding volume hierarchy comprises:
determining that the ray intersects with a first parent node that is a parent of one or more nodes of the first memory page; and
obtaining a page address for the one or more nodes from within data of the first parent node.

### Claim 3 (depends on 2)

The method of claim 2, wherein identifying the first memory page that is classified as resident comprises:
determining that the page address is indicated as being resident.

### Claim 4 (depends on 1)

The method of claim 1, wherein the second traversal of the bounding volume hierarchy comprises:
determining that the ray intersects with a second parent node that is a parent of one or more nodes of the second memory page; and
obtaining a page address for the one or more nodes from within data of the second parent node.

### Claim 5 (depends on 4)

The method of claim 4, wherein identifying the second memory page that is classified as valid and non-resident comprises:
determining that the page address is indicated as being valid and non-resident.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
based on third traversal of the bounding volume hierarchy, identifying a third memory page that is classified as invalid; and
raising a fault for the third memory page.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
in response to determining that the miss occurs for each node of the bounding volume hierarchy within the second memory page, executing no hit shader for any triangle node that is a descendant of any node within the second memory page.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
in response to determining that the miss occurs for each node of the bounding volume hierarchy within the second memory page, and that no hit occurs for the ray against any triangle within the bounding volume hierarchy, executing a miss shader for the ray.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
updating the status of memory pages of the bounding volume hierarchy based on migration of the memory pages.

### Claim 10

A system for performing ray tracing for a ray, the system comprising:
a memory storing memory pages of a bounding volume hierarchy; and
a processor configured to:
based on first traversal of a bounding volume hierarchy, identify a first memory page that is classified as resident;
obtain a first portion of the bounding volume hierarchy associated with the first memory page;
traverse the first portion of the bounding volume hierarchy according to a ray intersection test;
based on second traversal of the bounding volume hierarchy, identify a second memory page that is classified as valid and non-resident;
in response to the second memory page being classified as valid and non-resident, determine that a miss occurs for each node of the bounding volume hierarchy within the second memory page.

### Claim 11 (depends on 10)

The system of claim 10, wherein the first traversal of the bounding volume hierarchy comprises:
determining that the ray intersects with a first parent node that is a parent of one or more nodes of the first memory page; and
obtaining a page address for the one or more nodes from within data of the first parent node.

### Claim 12 (depends on 11)

The system of claim 11, wherein identifying the first memory page that is classified as resident comprises:
determining that the page address is indicated as being resident.

### Claim 13 (depends on 10)

The system of claim 10, wherein the second traversal of the bounding volume hierarchy comprises:
determining that the ray intersects with a second parent node that is a parent of one or more nodes of the second memory page; and
obtaining a page address for the one or more nodes from within data of the second parent node.

### Claim 14 (depends on 13)

The system of claim 13, wherein identifying the second memory page that is classified as valid and non-resident comprises:
determining that the page address is indicated as being valid and non-resident.

### Claim 15 (depends on 10)

The system of claim 10, wherein the processor is further configured to:
based on third traversal of the bounding volume hierarchy, identify a third memory page that is classified as invalid; and
raise a fault for the third memory page.

### Claim 16 (depends on 10)

The system of claim 10, wherein the processor is further configured to:
in response to determining that the miss occurs for each node of the bounding volume hierarchy within the second memory page, execute no hit shader for any triangle node that is a descendant of any node within the second memory page.

### Claim 17 (depends on 10)

The system of claim 10, wherein the processor is further configured to:
in response to determining that the miss occurs for each node of the bounding volume hierarchy within the second memory page, and that no hit occurs for the ray against any triangle within the bounding volume hierarchy, execute a miss shader for the ray.

### Claim 18 (depends on 10)

The system of claim 10, wherein the processor is further configured to:
update the status of memory pages of the bounding volume hierarchy based on migration of the memory pages.

### Claim 19

A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform ray tracing for a ray, by:
based on first traversal of a bounding volume hierarchy, identifying a first memory page that is classified as resident;
obtaining a first portion of the bounding volume hierarchy associated with the first memory page;
traversing the first portion of the bounding volume hierarchy according to a ray intersection test;
based on second traversal of the bounding volume hierarchy, identifying a second memory page that is classified as valid and non-resident;
in response to the second memory page being classified as valid and non-resident, determining that a miss occurs for each node of the bounding volume hierarchy within the second memory page.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, wherein the first traversal of the bounding volume hierarchy comprises:
determining that the ray intersects with a first parent node that is a parent of one or more nodes of the first memory page; and
obtaining a page address for the one or more nodes from within data of the first parent node.
