Spatial Hierarchy Traversal Using Short Stack for GPU Ray Tracing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing ray tracing systems face inefficiencies in traversing spatial hierarchies on parallel processing architectures like GPUs, particularly due to high memory bandwidth and storage costs associated with traditional stack-based traversal methods, which hinder performance for BVHs and k-d trees.
Innovation Solution
Implementing a memory-efficient spatial hierarchy traversal method that uses a short stack or stackless approach, where the number of nodes traversed at each level is stored, allowing for efficient traversal of BVHs and k-d trees by restarting from the root node when necessary, and utilizing a 1-bit or 32-bit register to track the traversal process, reducing memory usage and latency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a full stack is used for BVH traversal, then traversal correctness is maintained, but memory consumption and bandwidth costs increase significantly
Solution Approach 1:
The patent extracts only the essential information needed for traversal (node pointer and intersection status) while discarding unnecessary stack frame details. By using a minimal stack entry structure that only stores the next node to visit and whether it was the first child, the solution maintains traversal correctness while dramatically reducing memory consumption per stack entry.
Solution Approach 2:
The patent changes the parameter representation from full stack frames to minimal traversal state. Instead of storing complete function call stacks with all local variables and frame pointers, the system stores only the critical traversal parameters (node pointer, child index, intersection status), reducing memory requirements while preserving traversal logic.
2Reliability
If a full stack is used for k-d tree traversal, then traversal correctness is maintained, but storage and bandwidth costs increase
Solution Approach 1:
The patent extracts only the essential traversal state information from full stack frames, storing only the node pointer and traversal status in the stack. This minimal representation maintains correctness while reducing the data transferred between memory and processing units, thereby lowering bandwidth consumption.
3Device complexity
If k-d restart is used, then stackless traversal is achieved, but work quantity and memory bandwidth increase significantly
Solution Approach 1:
The patent uses a partial stack approach where only a limited number of stack entries are maintained (enough to cover the maximum depth of the spatial hierarchy). This partial stack stores only the essential traversal state, avoiding the need for complete stack frames while preventing the excessive restarts of k-d restart, thus balancing complexity reduction with efficiency maintenance.
4Quantity of substance
If a short stack is used for BVH traversal, then memory consumption is reduced, but traversal correctness may be compromised due to node overlap
Solution Approach 1:
The patent implements feedback mechanisms where the stack stores not only node pointers but also traversal status information (whether a node's first child was visited). This feedback allows the system to correctly handle node overlaps and ensure all relevant nodes are visited exactly once, maintaining correctness while using minimal stack space.
Data Source
AI summary
A system, method, and computer program product are provided for spatial hierarchy traversal. In operation, a spatial hierarchy is traversed for ray tracing. Additionally, a number of nodes traversed in each of a plurality of levels of the spatial hierarchy is stored.


