# US 2022/0036638 A1 · SIMD Group Formation Techniques for Primitive Testing associated with Ray Intersect Traversal

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

- Number: US 2022/0036638 A1
- Document ID: US20220036638A1
- Status: Published application
- Kind: A1
- Application number: 17/103,406
- Filed: 2020-11-24
- Published: 2022-02-03
- Earliest claimed: 2020-07-30
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Ali Rabbani Rankouhi; Christopher A. Burns; Justin A. Hensley; Luca Iuliano; Jonathan M. Redshaw
- Web page: https://patentgrep.com/patent/US20220036638A1

## CPC

- G06T 15/06: Ray-tracing
- G06F 9/3887: {controlled by a single instruction for multiple data lanes [SIMD]}
- G06F 9/3888: {controlled by a single instruction for multiple threads [SIMT] in parallel}
- G06F 9/38885: {Divergence aspects}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/5016: {the resource being the memory}
- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 16/2246: {Trees, e.g. B+trees}
- G06F 30/31: Design entry, e.g. editors specifically adapted for circuit design
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06T 1/60: Memory management
- G06T 15/005: {General purpose rendering architectures}
- G06T 17/005: {Tree description, e.g. octree, quadtree}
- G06Q 10/101: Collaborative creation, e.g. joint development of products or services
- G06Q 50/04: Manufacturing
- G06T 17/00: Three-dimensional [3D] modelling for computer graphics
- G06T 17/10: Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
- G06T 2210/12: Bounding box
- G06T 2210/21: Collision detection, intersection
- G16H 40/67: for remote operation
- Y02P 90/30: Computing systems specially adapted for manufacturing
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G16H: HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- Y02P: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS

## Abstract

Disclosed techniques relate to primitive testing associated with ray intersection processing for ray tracing. In some embodiments, shader circuitry executes a first SIMD group that includes a ray intersect instruction for a set of rays. Ray intersect circuitry traverses, in response to the ray intersect instruction, multiple nodes in a spatially organized acceleration data structure (ADS). In response to reaching a node of the ADS that indicates one or more primitives, the apparatus forms a second SIMD group that executes one or more instructions to determine whether a set of rays that have reached the node intersect the one or more primitives. The shader circuitry may execute the first SIMD group to shade one or more primitives that are indicated as intersected based on results of execution of the second SIMD group. Thus, disclosed techniques may use both dedicated ray intersect circuitry and dynamically formed SIMD groups executed by shader processors to detect ray intersection.

## Claims

### Claim 1

An apparatus, comprising:
shader circuitry configured to execute a ray intersect instruction for a first SIMD group, wherein the instruction indicates coordinate information for a first set of rays in a graphics scene; and
ray intersect circuitry configured to traverse, in response to the ray intersect instruction, multiple nodes in a spatially organized acceleration data structure, wherein the nodes include multiple nodes that indicate coordinates of bounding regions and multiple nodes that indicate primitives in the graphics scene;
wherein the apparatus is configured to form in response to reaching a node of the acceleration data structure that indicates one or more primitives, a second SIMD group that operates on a second set of rays that only partially overlaps with the first set of rays, wherein the second SIMD group includes one or more instructions to determine whether rays in the second set of rays intersect the one or more primitives; and
wherein the shader circuitry is configured to shade one or more primitives that are indicated as intersected based on results of execution of the second SIMD group.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the shader circuitry is configured to indicate to the ray intersect circuitry whether to continue traversal for a ray of the one or more rays based on intersect results of executing the second SIMD group.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the first SIMD group and the second SIMD group operate on a first data structure that stores information for a first ray of the one or more rays, wherein the first data structure is stored in a shader memory space that is also accessible to the ray intersect circuitry.

### Claim 4 (depends on 3)

The apparatus of claim 3, wherein the second SIMD group is configured to access thread data from a buffer in the shader memory space identified by the ray intersect circuitry for the second SIMD group.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the second SIMD group includes different threads configured to test a first ray against multiple different primitives.

### Claim 6 (depends on 5)

The apparatus of claim 5, wherein the second SIMD group includes a SIMD reduction instruction that performs an operation based on input values from multiple threads that operate on the first ray.

### Claim 7 (depends on 1)

The apparatus of claim 1, further comprising bounding region test circuitry configured to test in parallel, during the traversal, whether a ray intersects multiple different ones of the bounding regions indicated by a node of the acceleration data structure.

### Claim 8 (depends on 1)

The apparatus of claim 1, wherein the shader circuitry is configured to pause execution of the first SIMD group and resume execution of the first SIMD group to shade the one or more primitives after receiving intersect results from the second SIMD group.

### Claim 9 (depends on 1)

The apparatus of claim 1, wherein the apparatus is a computing device that includes:
a graphics unit that includes the shader circuitry and the ray intersect circuitry;
a central processing unit; and
network interface circuitry.

### Claim 10

A method, comprising:
executing, by shader circuitry, a ray intersect instruction for a first SIMD group, wherein the instruction indicates coordinate information for a first set of rays in a graphics scene; and
traversing, by ray intersect circuitry in response to the ray intersect instruction, multiple nodes in a spatially organized acceleration data structure, wherein the nodes include multiple nodes that indicate coordinates of bounding regions and multiple nodes that indicate primitives in the graphics scene;
forming, in response to reaching a node of the acceleration data structure that indicates one or more primitives, a second SIMD group that operates on a second set of rays that only partially overlaps with the first set of rays, wherein the second SIMD group executes one or more instructions to determine whether rays in the second set of rays intersect the one or more primitives; and
shading, by the shader circuitry, one or more primitives that are indicated as intersected based on results of execution of the second SIMD group.

### Claim 11 (depends on 10)

The method of claim 10, further comprising:
indicating by the shader circuitry to the ray intersect circuitry whether to continue traversal for a ray of the one or more rays based on intersect results of executing the second SIMD group.

### Claim 12 (depends on 10)

The method of claim 10, wherein the first SIMD group and the second SIMD group operate on a first data structure that stores information for a first ray of the one or more rays, wherein the first data structure is stored in a shader memory space that is also accessible to the ray intersect circuitry.

### Claim 13 (depends on 10)

The method of claim 10, further comprising:
testing in parallel, during the traversing, whether a ray intersects multiple different ones of the bounding regions indicated by a node of the acceleration data structure.

### Claim 14 (depends on 10)

The method of claim 10, wherein the shader circuitry pauses execution of the first SIMD group and resumes executing the first SIMD group to shade the one or more primitives after receiving intersect results from the second SIMD group.

### Claim 15

A non-transitory computer readable storage medium having stored thereon design information that specifies a design of at least a portion of a hardware integrated circuit in a format recognized by a semiconductor fabrication system that is configured to use the design information to produce the circuit according to the design, wherein the design information specifies that the circuit includes:
shader circuitry configured to execute a ray intersect instruction for a first SIMD group, wherein the instruction indicates coordinate information for a first set of rays in a graphics scene; and
ray intersect circuitry configured to traverse, in response to the ray intersect instruction, multiple nodes in a spatially organized acceleration data structure, wherein the nodes include multiple nodes that indicate coordinates of bounding regions and multiple nodes that indicate primitives in the graphics scene;
wherein the circuit is configured to form in response to reaching a node of the acceleration data structure that indicates one or more primitives, a second SIMD group that operates on a second set of rays that only partially overlaps with the first set of rays, wherein the second SIMD group includes one or more instructions to determine whether rays in the second set of rays intersect the one or more primitives; and
wherein the shader circuitry is configured to shade one or more primitives that are indicated as intersected based on results of execution of the second SIMD group.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the shader circuitry is configured to indicate to the ray intersect circuitry whether to continue traversal for a ray of the one or more rays based on intersect results of executing the second SIMD group.

### Claim 17 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the first SIMD group and the second SIMD group operate on a first data structure that stores information for a first ray of the one or more rays, wherein the first data structure is stored in a shader memory space that is also accessible to the ray intersect circuitry.

### Claim 18 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the shader memory space includes:
a memory region for buffers to store thread data for dynamically-formed SIMD groups;
a memory region for ray data; and
a memory region for ray stack data.

### Claim 19 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the ray intersect circuitry includes bounding region test circuitry configured to test in parallel, during the traversal, whether a ray intersects multiple different ones of the bounding regions indicated by a node of the acceleration data structure.

### Claim 20 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the shader circuitry is configured to pause execution of the first SIMD group and resume execution of the first SIMD group to shade the one or more primitives after receiving intersect results from the second SIMD group.
