# US 2021/0287419 A1 · Speculative execution of hit and intersection shaders on programmable ray tracing architectures

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

- Number: US 2021/0287419 A1
- Document ID: US20210287419A1
- Status: Published application
- Kind: A1
- Application number: 17/159,399
- Filed: 2021-01-27
- Published: 2021-09-16
- Earliest claimed: 2018-12-28
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Gabor LIKTOR; Karthik VAIDYANATHAN; Jefferson AMSTUTZ; Atsuo KUWAHARA; Michael DOYLE; Travis SCHLUESSLER
- Web page: https://patentgrep.com/patent/US20210287419A1

## CPC

- G06T 15/005: {General purpose rendering architectures}
- G06T 1/60: Memory management
- G06T 15/06: Ray-tracing
- G06T 2210/21: Collision detection, intersection
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Apparatus and method for speculative execution of hit and intersection shaders on programmable ray tracing architectures. For example, one embodiment of an apparatus comprises: single-instruction multiple-data (SIMD) or single-instruction multiple-thread (SIMT) execution units (EUs) to execute shaders; and ray tracing circuitry to execute a ray traversal thread, the ray tracing engine comprising: traversal/intersection circuitry, responsive to the traversal thread, to traverse a ray through an acceleration data structure comprising a plurality of hierarchically arranged nodes and to intersect the ray with a primitive contained within at least one of the nodes; and shader deferral circuitry to defer and aggregate multiple shader invocations resulting from the traversal thread until a particular triggering event is detected, wherein the multiple shaders are to be dispatched on the EUs in a single shader batch upon detection of the triggering event.

## Claims

### Claim 1

(canceled)

### Claim 2

An apparatus comprising:
execution circuitry to execute shaders; and
ray tracing circuitry to execute a ray traversal thread, the ray tracing circuitry is to:
responsive to the ray traversal thread, traverse a single ray through an acceleration data structure comprising a plurality of hierarchically arranged nodes and intersect the single ray with a primitive contained within at least one of the plurality of hierarchically arranged nodes; and
defer and aggregate multiple shader invocations resulting from the ray traversal thread traversing the single ray until a particular triggering event is detected, wherein the aggregated multiple shader invocations resulting from the ray traversal thread traversing the single ray cause a single shader batch to be dispatched to the execution circuitry.

### Claim 3 (depends on 2)

The apparatus of claim 2, wherein the particular triggering event comprises a particular temporal event or processing event.

### Claim 4 (depends on 2)

The apparatus of claim 2, further comprising:
a scheduler to dispatch the single shader batch on the execution circuitry responsive to the particular triggering event.

### Claim 5 (depends on 2)

The apparatus of claim 2, wherein the ray traversal thread is to be suspended pending execution results of shader batch executed on the execution circuitry, wherein a first traversal context of the ray traversal thread is to be maintained while the ray traversal thread is suspended.

### Claim 6 (depends on 5)

The apparatus of claim 5, wherein the ray tracing circuitry is to aggregate the multiple shader invocations based on the multiple shader invocations being associated with the first traversal context.

### Claim 7 (depends on 2)

The apparatus of claim 2, wherein a primary ray shader thread executed on the execution circuitry is to spawn the ray traversal thread.

### Claim 8 (depends on 2)

The apparatus of claim 2, further comprising:
sorting circuitry to regroup data associated with the single shader batch to increase occupancy for operations performed by the execution circuitry.

### Claim 9 (depends on 2)

The apparatus of claim 2, wherein deferring and aggregating multiple shader invocations comprises storing a data entry in a data structure in a memory, the data structure comprising at least one entry for each shader, each entry usable to identify shader information required to execute a corresponding shader.

### Claim 10

A method comprising:
executing shaders on execution circuitry;
executing a ray traversal thread on a ray tracing engine;
responsive to the ray traversal thread, traversing a single ray through an acceleration data structure comprising a plurality of hierarchically arranged nodes;
intersecting the single ray with a primitive contained within at least one of the plurality of hierarchically arranged nodes;
deferring and aggregating multiple shader invocations resulting from the ray traversal thread traversing the single ray until a particular triggering event is detected; and
dispatching the aggregated shader invocations resulting from the ray traversal thread traversing the single ray on the execution circuitry in a single shader batch upon detection of the particular triggering event.

### Claim 11 (depends on 10)

The method of claim 10, wherein the particular triggering event comprises a particular temporal event or processing event.

### Claim 12 (depends on 10)

The method of claim 10 further comprising:
dispatching the single shader batch on the execution circuitry responsive to the particular triggering event.

### Claim 13 (depends on 10)

The method of claim 10, wherein the ray traversal thread is to be suspended pending execution results of shader batch executed on the execution circuitry, wherein a first traversal context of the ray traversal thread is to be maintained while the ray traversal thread is suspended.

### Claim 14 (depends on 13)

The method of claim 13, wherein the multiple shader invocations are to be aggregated based on the multiple shader invocations being associated with the first traversal context.

### Claim 15 (depends on 10)

The method of claim 10, wherein a primary ray shader thread executed on the execution circuitry is to spawn the ray traversal thread.

### Claim 16 (depends on 10)

The method of claim 10 further comprising:
regrouping data associated with the single shader batch to increase occupancy for operations performed by the execution circuitry.

### Claim 17

A non-transitory machine-readable medium having program code stored thereon which, when executed by a machine, capable of causing the machine to perform:
executing shaders on execution circuitry;
executing a ray traversal thread on a ray tracing engine;
responsive to the ray traversal thread, traversing a single ray through an acceleration data structure comprising a plurality of hierarchically arranged nodes;
intersecting the single ray with a primitive contained within at least one of the plurality of hierarchically arranged nodes;
deferring and aggregating multiple shader invocations resulting from the ray traversal thread traversing the single ray until a particular triggering event is detected; and
dispatching the aggregated shader invocations resulting from the ray traversal thread traversing the single ray on the execution circuitry in a single shader batch upon detection of the particular triggering event.

### Claim 18 (depends on 17)

The non-transitory machine-readable medium of claim 17, wherein the particular triggering event comprises a particular temporal event or processing event.

### Claim 19 (depends on 17)

The non-transitory machine-readable medium of claim 17, further comprising program code capable of causing the machine to perform:
dispatching the single shader batch on the execution circuitry responsive to the particular triggering event.

### Claim 20 (depends on 19)

The non-transitory machine-readable medium of claim 19, wherein the ray traversal thread is to be suspended pending execution results of shader batch executed on the execution circuitry, wherein a first traversal context of the ray traversal thread is to be maintained while the ray traversal thread is suspended.

### Claim 21 (depends on 20)

The non-transitory machine-readable medium of claim 20, wherein the multiple shader invocations are to be aggregated based on the multiple shader invocations being associated with the first traversal context.
