Dynamic ray return for mid-traversal and post-traversal shading
AssigneeAdvanced Micro Devices, Inc.
InventorsMichael John Livesley, Sean Keely, J. Stephen Junkins
Life of this patent
Estimating the term…
Abstract
Techniques herein involve operations for reducing divergence for ray tracing. In ray tracing on parallel hardware, rays are processed in “wavefronts” which include multiple threads that execute in lockstep. High divergence can occur in ray tracing as ray processing can have very outcomes. Techniques presented herein reduce divergence by swapping rays between wavefronts at intermediate processing points. The swapping groups more coherent rays together, thereby reducing divergence and increasing efficiency.
Claims20
A method comprising:
- requesting traversal of a BVH for one or more first rays of a wavefront, wherein the requesting is transmitted by a shader core to a traversal circuit;
- in response to the traversal circuit arriving at a shading point for the one or more first rays, recording that the one or more first rays are ready to be returned to the shader core;
- identifying one or more second rays that are ready to be returned to the shader core, wherein the one or more second rays originate from different wavefronts;
- and
- returning the one or more second rays to the shader core to be executed by the wavefront.
A system comprising:
- a shader core;
- and
- a traversal circuit,
- wherein the shader core is configured to:
- request traversal of a BVH for one or more first rays of a wavefront, wherein the requesting is transmitted by the shader core to the traversal circuit;
- and
- wherein the traversal circuit is configured to:
- in response to the traversal circuit arriving at a shading point for the one or more first rays, record that the one or more first rays are ready to be returned to the shader core;
- identify one or more second rays that are ready to be returned to the shader core, wherein the one or more second rays originate from different wavefronts;
- and
- return the one or more second rays to the shader core to be executed by the wavefront.
A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform operations comprising:
- requesting traversal of a BVH for one or more first rays of a wavefront, wherein the requesting is transmitted by a shader core to a traversal circuit;
- in response to the traversal circuit arriving at a shading point for the one or more first rays, recording that the one or more first rays are ready to be returned to the shader core;
- identifying one or more second rays that are ready to be returned to the shader core, wherein the one or more second rays originate from different wavefronts;
- and
- returning the one or more second rays to the shader core to be executed by the wavefront.
Dependencies are inferred from the claim text.