Graphics processing unit traversal engine
Accelerating ray tracing operations through a hardware traversal engine solves the problem of ray tracing consuming resources and time in the existing technology and improves image quality.
Patent Information
- Application Number
- CN202280084357.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2021-12-28
- Filing Date
- 2022-12-20
- Publication Date
- 2024-09-06
AI Technical Summary
Existing ray tracing technology consumes a lot of system resources and time when traversing the Bounding Box Hierarchy (BVH) tree, which limits the quality of the image.
A hardware traversal engine is used to accelerate ray tracing operations, the state information and data are stored through the memory module, and the control logic is used to execute the traversal process, thereby reducing dependence on the processing unit and reducing the overhead of the traversal process.
It improves the efficiency of ray tracing operations, reduces the consumption of processing resources, and improves the overall quality of the image.
Smart Images

Figure CN118613836A
Abstract
Description
Background Art
[0001] To improve the fidelity and quality of the generated images, some software and associated hardware implement ray tracing operations, in which images are generated by tracing the paths of rays associated with the images. Some of these ray tracing operations employ a tree structure such as a bounding box hierarchy (BVH) tree to represent a set of geometric objects within a scene to be rendered. Geometric objects (e.g., triangles or other primitives) are enclosed in bounding boxes or other bounding boxes that form leaf nodes of the tree structure, and then these nodes are grouped into small groups, each of which is enclosed in their own bounding boxes represented by parent nodes on the tree structure, and these small groups are then bound to larger groups that are also enclosed in their own bounding boxes representing higher parent nodes on the tree structure, and so on, until there is a single bounding box that represents the top node of the tree structure and encompasses all lower level bounding boxes.
[0002] To perform some ray tracing operations, the tree structure is then used to identify potential intersections between generated rays and geometric objects in the scene by traversing the nodes of the tree, where at each node being traversed, the ray of interest is compared to the bounding box of the node to determine if an intersection exists, and if so, continuing to the next node in the tree, where the next node is identified based on a traversal algorithm, and so on. However, conventional methods of traversing a tree structure sometimes consume relatively large amounts of system resources, or require relatively large amounts of time, thereby limiting the overall quality of the resulting image. BRIEF DESCRIPTION OF THE DRAWINGS
[0003] The present disclosure may be better understood, and its numerous features and advantages made apparent to those skilled in the art by referencing the accompanying drawings.The use of the same reference numbers in different drawings indicates similar or identical items.
[0004] Figure 1 is a block diagram of a graphics processing unit (GPU) that employs a hardware traversal engine to traverse a ray tracing structure, according to some embodiments.
[0005] Figure 2 According to some embodiments Figure 1 A block diagram of a traversal engine that loops the identified nodes of the ray tracing structure to the texture hardware of the GPU.
[0006] Figure 3 According to some embodiments Figure 1 The traversal engine provides a block diagram of shader commands to the GPU scheduler.
[0007] Figure 4 According to some embodiments Figure 1 Block diagram of the traversal engine.
[0008] Figure 5 is a flow chart of a method of traversing a ray tracing structure using a hardware traversal engine, according to some embodiments. DETAILED DESCRIPTION
[0009] Figures 1 to 5 Techniques for employing a hardware traversal engine at a processing unit to traverse an acceleration structure, such as a ray tracing structure, are shown. The hardware traversal engine includes: one or more memory modules to store state information and other data for structure traversal; and control logic to perform a traversal process based on the stored data and based on received information indicating a source node of the acceleration structure to be used for the traversal process. By employing the hardware traversal engine, the processing unit is able to perform the traversal process more quickly and efficiently, thereby saving processing resources and improving overall processing efficiency.
[0010] To illustrate, conventional GPUs employ software shaders that execute at a shader processor to control ray tracing operations. To implement a BVH traversal for ray tracing (i.e., a traversal of a BVH tree), the GPU employs a loop in which the shader provides a ray address and a BVH node address to the GPU's texture addressing hardware, the texture address hardware provides the corresponding ray and BVH node to the intersection engine to identify any intersections between the ray and the BVH node, and returns the intersection result to the shader to determine the next node of the BVH tree to be processed. Therefore, the shader initiates each iteration of the tree traversal process, thereby increasing the overhead of each iteration.
[0011] Compared with conventional methods, using the technology described herein, GPU can adopt the hardware traversal engine of at least some iterations of starting tree traversal process, thereby reducing the overall overhead associated with tree traversal.For example, in some embodiments, the traversal engine is configured to receive intersection information from the intersection engine, and identifies the next step in the traversal process based on the intersection information, including continuing the tree traversal by sending the next light node intersection to the texture addressing hardware in some cases.Therefore, for these iterations of tree traversal, the shader is removed from the traversal process, thereby reducing the overhead associated with the traversal process.In other cases, the traversal engine returns the light node intersection information to the shader to perform a specified operation (for example, any hit shader).When the operation is completed, the shader uses the traversal state information stored at the traversal engine itself to indicate that the traversal engine resumes the tree traversal process.Therefore, using the technology described herein, the control flow of the tree traversal process is unloaded from the shader to the traversal engine hardware, thereby improving the overall processing efficiency.
[0012] In some embodiments, the traversal engine includes a plurality of memory modules for storing data for the traversal process. The traversal engine is thus able to perform operations quickly and further reduce the impact of the traversal process on the memory access traffic at the processing unit, such as by reducing the number of accesses to the cache or local data repository of the processing unit. In some embodiments, examples of these memory modules include an initial data repository configured to store data extracted from an initial ray tracing call, a TLAS data repository configured to store data of rays in a top-level acceleration structure (TLAS) coordinate space, a BLAS data repository configured to store data of rays in a bottom-level acceleration structure (BLAS) coordinate space, a traversal state memory configured to store temporary data associated with the current iteration of the traversal process, a recent hit memory configured to store the most recent hit value of the ray in a tree structure, and a traversal stack configured to store a stack of node addresses of the current ray for the next intersection of the ray.
[0013] For descriptive purposes, the example in which the traversal engine is implemented at the GPU and performs a traversal process to traverse the BVH tree is described. Figures 1 to 5 However, it should be understood that in other embodiments, the techniques described herein are implemented at different types of processing units, implemented to traverse different types of acceleration structures, or any combination thereof.
[0014] Figure 1 A block diagram of a GPU 100 is shown that is generally configured to perform ray tracing and other graphics operations on behalf of a processing system according to some embodiments. A processing system is generally configured to execute a set of instructions (e.g., a computer program) to perform specified tasks on behalf of an electronic device. Thus, in various embodiments, the GPU 100 is incorporated into any of a variety of electronic devices, such as a desktop computer, a laptop computer, a server, a smart phone, a tablet computer, a game console, etc.
[0015] The GPU 100 is configured to receive commands (e.g., drawing commands) from another processing unit (not shown) of the processing system, generate one or more commands based on the received commands, and execute the generated commands by performing one or more graphics operations. At least some of the generated commands require texture operations, including ray tracing operations. To facilitate the execution of texture operations, the GPU 100 includes a scheduler 102, a shader processor 104, a local data repository 106, a texture addressing (TA) module 108, a texture data (TD) module 110, and a cache 112.
[0016] Scheduler 102 is generally configured to schedule or sequence commands (e.g., commands 103) for execution at various modules of GPU 100, including TA module 108, shader processor 104, and LDS 106. In at least some embodiments, scheduler 102 is configured to receive commands for scheduling from one or more of these same modules or from another module of GPU 100, such as from a command processor (not shown).
[0017] The shader processor 104 includes one or more processing elements that are collectively configured to perform shading operations based on commands received from the scheduler 102. Examples of these shading operations include execution of material shaders, tessellation shaders, hull shaders, vertex shaders, ray tracing shaders, etc. In the process of performing these shading operations, in at least some cases, the shader processor generates data for supply to other modules of the GPU 100 and commands for supply to the scheduler 102.
[0018] LDS 106 is a memory that is generally configured to store data shared between operations executed at GPU 100. For example, in some embodiments, LDS 106 stores data shared between thread groups executing at GPU 100.
[0019] Cache 112 is a memory configured to store cache data for operations at GPU 100, including ray tracing and other texture operations. In the depicted embodiment, cache 112 stores a BVH tree 107 (hereinafter referred to as BVH 107) employed by GPU 100 to implement ray tracing operations. BVH 107 includes a plurality of nodes organized as a tree, with bounding boxes or other bounding boxes forming leaf nodes of the tree structure, and then these nodes are grouped into small groups, each group is enclosed in their own bounding box representing a parent node on the tree structure, and these small groups are then bounded into larger groups that are also enclosed in their own bounding boxes representing higher parent nodes on the tree structure, and so on, until there is a single bounding box representing the top node of BVH 107 and encompassing all lower level bounding boxes.
[0020] The TA module 108 is generally configured to perform addressing tasks associated with texture operations, including ray tracing operations, based on commands received from the scheduler 102. For example, in some embodiments, the TA module 108 receives a ray tracing command indicating specific data to be used for ray tracing, such as ray data and BVH node data. The TA module 108 identifies the memory address associated with the data and provides the memory address to the cache 112 for retrieving the ray tracing data. The TA module 108 then provides the ray tracing data to the TD module 110.
[0021] The TD module 110 includes one or more circuits that are collectively configured to perform ray tracing and other texture operations based on data received from the TA module 108. Specifically, the TD module 110 is configured to perform intersection operations to identify whether a given ray intersects a given BVH node, and to perform traversal operations to traverse the BVH 107 based on the intersection operations. To facilitate these operations, the TD 110 includes an intersection engine 114 and a traversal engine (TE) 115.
[0022] The intersection engine 114 is configured to receive ray data identifying a particular ray to be used for ray tracing and node data indicating nodes of the BVH tree 107. The intersection engine 114 performs a node intersection process to identify whether the ray intersects the node (referred to as an intersection hit) or does not intersect the node (referred to as an intersection miss). The intersection engine 114 provides the intersection miss and intersection hit data to the TE 115 along with the ray data and the BVH node data.
[0023] TE 115 is a hardware engine, which includes one or more circuits configured to perform tree traversal operations. Specifically, TE 115 is configured to receive intersection information (hit data, miss data, light data and BVH node data) from intersection engine 114. Based on the intersection information, TE 115 performs a traversal process. For example, in some embodiments, TE implements a depth-first BVH traversal process based on a stack, wherein the traversal stack is used to store the address of the next node for the intersection of light. Tree nodes are accessed in a depth-first order, and for each intersecting internal node, the intersecting child nodes are sorted based on their distance from the origin of the light. The farthest node is pushed onto the stack, and the nearest node is used as the next intersection of the next iteration of the traversal loop. In some embodiments, a state machine is used to implement the traversal loop so that TE 115 can process different light rays in each sequential clock cycle. In other embodiments, TE implements a stackless traversal process, a while-while traversal process, etc. In some embodiments, depending on the traversal process, TE 115 identifies one of three possible outcomes: 1) the next node of BVH 107 to test for intersection with the ray; 2) the shader to execute (e.g., any hit shader); 3) the end of the tree traversal process for the current ray.
[0024] In response to identifying the next node of BVH 107 to be tested, TE 115 provides TA 108 with address information of the next node. Figure 2An example according to some embodiments is shown. In the depicted example, the TA receives a command 103 to initiate a traversal of the BVH 107. In response, the TA 108 provides ray and node address information to the intersection engine 114, which retrieves the corresponding ray and node data from the cache 112. Using the ray and node data, the intersection engine 114 determines intersection information for the ray and the node and provides the intersection information to the TE 115. Based on the intersection information, and in accordance with the tree traversal process, the TE 115 determines a next node 220, which represents the next node of the BVH 107 to test for intersection with the ray.
[0025] TE 115 provides the address information of next node 220 directly to TA block 108, and also provides any metadata required for traversal, such as ray identification. In response, TA 108 sends a request for node data for next node 220 to cache 112, and sends the next node address and other parameters to intersection engine 114, which determines intersection information based on next node 220 and ray data provided by cache 112. Figure 2 In the example of , TE loops next node 220 directly to TA 108, thereby triggering the next iteration of the traversal process and bypassing both scheduler 102 and shader processor 104. The overhead associated with the next iteration of the traversal process is thus reduced, thereby improving the overall efficiency of the traversal process.
[0026] Return to Figure 1 In some cases, for some iterations of the traversal process, the TE 115 identifies a shader to be executed for the current node and the current ray of the BVH 107. Examples of shaders to be executed include any hit shaders, pass shaders, etc. In response, the TE 115 provides a command to the scheduler 102 to trigger the execution of the identified shader. In some embodiments, the TE 115 provides the shader type to the shader processor 104, which determines the address of the shader function to be called. Figure 3 Examples according to some embodiments are shown.
[0027] exist Figure 3 In the example of FIG. 1 , the TA receives a command 103 to start a traversal of the BVH 107. Figure 2As in the example of , in response to command 103, TA 108 provides ray and node address information to intersection engine 114, which retrieves corresponding ray and node data from cache 112. Using the ray and node data, intersection engine 114 determines intersection information of the ray and node and provides the intersection information to TE 115. Based on the intersection information, and according to the tree traversal process, TE 115 determines a return command 322, which represents a command to execute a particular shader. TE 115 provides return command 322 to scheduler 102, which schedules the command at shader processor 104 for execution.
[0028] In some embodiments, in conjunction with issuing the return command 322, the TE 115 saves state information indicating the current state of the traversal process at the local data repository. When the shader indicated by the return command 322 is completed, the shader processor 104 issues a command to resume the traversal process to the TE 115 via the scheduler 102. In response to the resume command, the TE 115 loads the stored state data and resumes the traversal of the BVH 107.
[0029] Return to Figure 1 At a given point in the traversal process, the TE 115 determines that the traversal of the BVH 107 is complete. In response, the TE 115 returns data such as hit data (which node was hit (if any)), distance from the ray origin, BVH node address, data tags, bookkeeping data (e.g., memory data), and any BVH information required by the shader processor 104, such as by storing the BVH information at the LDS 106. The shader processor 104 employs this information to, for example, initiate additional ray tracing operations, such as initiating a traversal of the BVH 107 based on another ray.
[0030] Figure 4 A block diagram of TE 115 is shown according to some embodiments. In the depicted example, TE 115 includes a traversal decoding module 430 and a plurality of memory structures including a traversal stack 434, a most recent hit memory 436, a traversal state memory 438, and a per-ray storage device memory 440. TE 115 also includes a next node matching module 432.
[0031] The traversal decoding module 430 is a group of circuits that are collectively configured to implement the traversal process of a BVH (e.g., BVH 107) in hardware. In some embodiments, the traversal decoding module 430 is configured as a state machine that implements the traversal process, including an initial state and one or more result states (states that cause the traversal decoding module 430 to generate results to be provided to the TA module 108, the scheduler 102, or other modules). The intersection engine 114 provides the traversal decoding module 430 with intersection results, each of which includes intersection data for a specific ray and a specific BVH node. In response to receiving the intersection data, the traversal engine 115 places the traversal state of the corresponding intersection result in the initial state. Based on the intersection data and the nodes of the BVH tree 107, the traversal decoding engine 430 changes the state of the intersection result until the result reaches one or more specified final states, such as a result state. As the intersection result continues through the different states of the state machine, the traversal decoding engine 430 generates and provides any output information indicated by the state of the intersection result, including generating the next node 220, the return command 322, etc. In some embodiments, the traversal decoding module 430 is timed by a specified clock signal, and for each cycle of the clock signal, the state of the intersection result is set by the traversal decoding module 430. Furthermore, in some embodiments, the traversal decoding module 430 is configured as a pipeline, where the traversal decoding module 430 processes multiple intersection results for different rays, different BVH nodes, or both simultaneously.
[0032] The next node matching module 432 is configured to receive BVH node information from the traversal decoding module 430. Based on the received BVH node information, when subsequent rays are intended to intersect with the same BVH node, the next node matching module 432 improves the cache utilization when fetching BVH node data. In some embodiments, the next node matching module 432 groups the rays based on the next node addresses of the rays provided by the traversal decoding module 430. The next node matching module 432 then reorders the rays based on the next node requests of the rays sent for the next traversal iteration (intersection). For example, in the case of a ray at the end of a traversal decoding block, if the ray requires a node address that the TE 115 has just sent to the TA 108, the TE 115 sends the ray id throughout the loop without queuing for any memory fetch for the cache 112. This allows the cache 112 to be used for the loop in a non-traversal manner. If the ray requires a different node address, the TE 115 adds it to a queue (not shown) corresponding to its node address and sends a different ray for intersection matching the node address requested in the previous cycle. If the queue is empty, the TE selects another queue to request intersection.
[0033] The traversal stack 434 includes a traversal stack for each ray processed by the traversal decoding module 430. In at least some embodiments, the number of entries assigned to a given ray at the traversal stack 434 is a programmable value. Depending on the state of the ray intersection data at the traversal decoding module 430, the traversal decoding module writes an element to the stack for the ray or reads an element from the stack for the ray. The traversal stack 434 thus enables the traversal decoding module 430 to implement a recursive traversal process using an iterative process.
[0034] The most recent hit memory 436 stores the most recent hit value for each ray processed at the traversal decode module 430. The most recent hit memory 436 is initialized to a specified maximum distance value, and as the traversal decode module 430 processes the intersection data for a given ray and finds a new intersection or hit with a node of the BVH tree 107, the traversal decode module 430 updates the most recent hit memory 436 to reflect the minimum ray hit distance for the ray relative to the node of the BVH 107. In some embodiments, in response to a ray completing a traversal of the BVH 107, the minimum ray hit distance for the ray is returned to the shader processor 108.
[0035] The traversal state memory 438 is configured to store temporary data associated with the traversal process. The traversal decoding module 430 employs the temporary data to determine the current traversal state of a single ray, and thus determines the next state of the ray based on the intersection information provided by the intersection engine 114. Examples of temporary information include the current node of the BVH tree 107 associated with the ray, the previous node of the BVH tree 107 associated with the ray, pointer information of the traversal stack 434, TLAS and BLAS information indicating the level of the BVH tree 107 used for traversal, and the like.
[0036] Per-ray storage 440 stores ray definition data for rays processed at traversal decode engine 430. In some embodiments, per-ray storage 440 stores BLAS definitions for rays, and a separate data storage (not shown) at TD module 110 stores TLAS definition data used by intersection engine 114.
[0037] Figure 5 A method 500 of traversing an acceleration structure using a hardware traversal engine is shown according to some embodiments. Figure 1 Method 500 is described with reference to an exemplary implementation at GPU 100 of the present invention, but it should be understood that in other embodiments, the techniques reflected by method 500 are implemented in other types of processing units, or at processing units having different configurations.
[0038] At block 502, the TA 108 receives a trace ray command from the scheduler 102 indicating a ray to traverse the BVH 107. In response, the TA 108 generates address information for the ray and the initial node of the BVH 107. Based on the address information, the cache 112 provides the ray data and the BVH node data to the intersection engine 114. In response, the intersection engine 114 generates intersection data based on the ray data and the node data. Based on the intersection data, the TE 115 identifies the next node 220 of the BVH 107. At block 503, the TE 115 provides the next node 220 to the TA module 108, which generates the address information for the next node. Based on the address information, the cache 112 provides the data for the next node 220 to the intersection engine 114, which in turn generates intersection data for the next node and the current ray. Therefore, the traversal engine 115 loops the next node 220 directly to the TA module 108, thereby bypassing the scheduler 102 and the shader processor 104, thereby improving the speed and efficiency of the BVH traversal process.
[0039] As the TE 115 traverses the BVH 107, at block 504, the TE 115 returns a command to the scheduler 102. In response, the scheduler 102 schedules the command for execution at the shader processor 104. The specific command returned by the TE 115 depends on the current node of the BVH 107 being processed, and is, in different cases, an Any Hit Shader (AHS) command (block 506), a Program Shader (PS) command (block 512), a Traversal Interrupt command (block 516), and a Traversal Complete command (block 518). Each of these commands is discussed below.
[0040] At block 506, the TE 115 returns the AHS command. In response, at block 508, the shader processor 104 executes the AHS indicated by the AHS command. At block 510, the shader processor 104 post-processes the BVH hit data generated by the TE 115. The shader processor 104 then generates a BVH traversal continue command, and in response, the method flow returns to block 503 and the TE 115 continues to traverse the BVH 107. In some embodiments, the continue command terminates the traversal, such as when the AHS accepts a hit and determines that the traversal should stop.
[0041] At block 512, TE 115 returns the PS command. In response, at block 514, shader processor 104 executes the PS indicated by the PS command. At block 510, shader processor 104 post-processes the BVH hit data generated by TE 115. Shader processor 104 then generates a BVH traversal continue command, and in response, method flow returns to block 503 and TE 115 continues traversing BVH 107. In some embodiments, the continue command terminates the traversal.
[0042] At block 516 , the TE 115 returns a traversal interrupt command to indicate that the traversal of the BVH 107 is interrupted. In response, the shader processor 104 generates a BVH traversal resume command, and in response, method flow returns to block 503 and the TE 115 continues traversing the BVH 107 .
[0043] At block 518, the TE 115 returns a traversal completion command to indicate the completion of the traversal of the BVH 107 for the given ray. The TE 115 indicates via the traversal completion command the most recent hit node of the BVH 107 (as stored at the most recent hit memory 436) or an indication of the node that the ray missed the BVH 107. In response, the shader processor 104 determines whether another ray is to be traced, and if so, the method flow returns to block 502, and the shader processor 104 issues a new ray tracing command for the new ray. If not, the method flow moves to block 522, and the shader processor 104 returns hit data (i.e., data indicating the nodes of the BVH 107 that have been intersected by the ray) and other data (such as the hit distance from the ray origin, center of gravity information, etc.) to the thread or process requesting the ray tracing.
[0044] It should be understood that method 500 is merely an example of employing TE 115 to assist in ray tracing, and in other embodiments, TE 115 is employed in other ways. For example, in some embodiments, hits at BVH 107 are processed within the shader itself (i.e., at shader processor 104) without returning hit data to the callee. In these embodiments, TE does not return any traversal interruption commands, but instead traverses all rays associated with a given wavefront until a BVH hit is found or the traversal of BVH 107 is completed.
[0045] As disclosed herein, in some embodiments, a processing unit includes: a scheduler for scheduling commands for execution at a module of the processing unit; a hardware traversal engine configured to traverse a ray tracing structure in response to a first command from the scheduler, the hardware traversal engine bypassing the scheduler in response to identifying a first node of the ray tracing structure. In one aspect, the processing unit includes: a shader processor for performing shading operations; and wherein the hardware traversal engine will bypass the shader processor in response to identifying the first node of the ray tracing structure. In another aspect, the processing unit includes: a texture addressing module configured to identify address information of the ray tracing structure in response to the first command. In another aspect, the hardware traversal engine will bypass the scheduler in response to the first command by providing information associated with the first node to the texture addressing module. In another aspect, the hardware traversal engine will return a command to the scheduler in response to identifying a second node of the ray tracing structure.
[0046] In one aspect, the command comprises a command to execute a specified shader at a shader processor of the processing unit. In another aspect, the specified shader is any hit shader. In yet another aspect, the ray tracing structure comprises a bounding box hierarchy (BVH).
[0047] In some embodiments, a system includes: a scheduler to provide ray tracing commands; a memory to store ray tracing data for a ray tracing structure; and a hardware traversal engine to traverse the ray tracing structure in response to the ray tracing command, wherein traversing the ray tracing structure includes bypassing the scheduler for at least one node of the ray tracing structure. In one aspect, the hardware traversal engine includes a traversal stack memory to store node addresses of the ray tracing structure. In another aspect, the hardware traversal engine includes a recent hit memory to store information indicating the nearest node of the ray tracing structure relative to the ray associated with the ray tracing command. In yet another aspect, the hardware traversal engine includes a traversal state memory to store state information of the ray associated with the ray tracing command. In one aspect, the system includes a shader processor; and wherein traversing the ray tracing structure includes bypassing the shader processor for the at least one node of the ray tracing structure.
[0048] In some embodiments, a method includes: scheduling, at a scheduler of a processing unit, commands for execution at a module of the processing unit; traversing a ray tracing structure at a hardware traversal engine of the processing unit in response to a first command from the scheduler, the hardware traversal engine bypassing the scheduler in response to identifying a first node of the ray tracing structure. In one aspect, the method includes: the hardware traversal engine bypassing a shader processor of the processing unit in response to identifying the first node of the ray tracing structure. In another aspect, the method includes: identifying, at a texture addressing module of the processing unit in response to the first command, address information of the ray tracing structure.
[0049] In one aspect, the hardware traversal engine will bypass the scheduler in response to the first command by providing information associated with the first node to the texture addressing module. In another aspect, the method includes returning a command from the hardware traversal engine to the scheduler in response to identifying a second node of the ray tracing structure. In yet another aspect, the command includes a command to execute a specified shader at a shader processor of the processing unit. In yet another aspect, the ray tracing structure includes a bounding box hierarchy (BVH).
[0050] In some embodiments, certain aspects of the above-mentioned technology can be implemented by one or more processors of a processing system that executes software. Software includes one or more sets of executable instructions, which are stored in or otherwise tangibly embodied on a non-transient computer-readable storage medium. Software may include instructions and certain data, which manipulate one or more processors to perform one or more aspects of the above-mentioned technology when executed by one or more processors. Non-transient computer-readable storage media may include, for example, magnetic or optical disk storage devices, solid-state storage devices such as flash memory, cache, random access memory (RAM) or other one or more non-volatile memory devices, etc. The executable instructions stored on the non-transient computer-readable storage medium may be source code, assembly language code, object code, or other instruction formats interpreted or otherwise executed by one or more processors.
[0051] It should be noted that not all activities or elements described above in the general description are required, a portion of a particular activity or device may not be required, and one or more additional activities may be performed, or elements may be included in addition to those described. Furthermore, the order in which the activities are listed is not necessarily the order in which they are performed. In addition, these concepts have been described with reference to specific embodiments. However, it is understood by those of ordinary skill in the art that various modifications and changes may be made without departing from the scope of the present disclosure as set forth in the following claims. Therefore, the specification and drawings are to be regarded as illustrative rather than restrictive, and all such modifications are intended to be included within the scope of the present disclosure.
[0052] Benefits, other advantages and solutions to problems have been described above with respect to specific embodiments. However, benefits, advantages, solutions to problems, and any features that may cause any benefit, advantage or solution to appear or become more significant should not be interpreted as key, essential or basic features of any or all claims. In addition, the specific embodiments disclosed above are merely illustrative, as the disclosed subject matter may be modified and practiced in different but equivalent ways that are obvious to those skilled in the art who benefit from the teachings herein. Except as described in the following claims, it is not intended to limit the details of the construction or design shown herein. Therefore, it is apparent that the specific embodiments disclosed above may be changed or modified, and all such changes are considered to be within the scope of the disclosed subject matter. Therefore, the protection sought herein is as set forth in the following claims.
Claims
1. A processing unit, the processing unit include: a scheduler for scheduling commands for execution at modules of the processing unit; A hardware traversal engine is configured to traverse a ray tracing structure in response to a first command from the scheduler, the hardware traversal engine bypassing the scheduler in response to identifying a first node of the ray tracing structure.
2. The processing unit according to claim 1, wherein the processing unit further include: A shader processor, the shader processor is used to perform a shading operation; and The hardware traversal engine is to bypass the shader processor in response to identifying the first node of the ray tracing structure.
3. The processing unit according to claim 1 or claim 2, wherein the processing unit further include: A texture addressing module is configured to identify address information of the ray tracing structure in response to the first command.
4. The processing unit according to claim 3, in: The hardware traversal engine will bypass the scheduler in response to the first command by providing information associated with the first node to the texture addressing module.
5. The processing unit according to any one of claims 1 to 4, in: The hardware traversal engine will return commands to the scheduler in response to identifying the second node of the ray tracing structure.
6. The processing unit according to claim 5, in: The commands include commands to execute a specified shader at a shader processor of the processing unit.
7. The processing unit of claim 6, wherein the specified shader is an any-hit shader.
8. The processing unit of any one of claims 1 to 7, wherein the ray tracing structure comprises a bounding volume hierarchy (BVH).
9. A system, wherein the system include: A scheduler, the scheduler being used to provide ray tracing commands; A memory for storing ray tracing data for a ray tracing structure; and A hardware traversal engine is configured to traverse the ray tracing structure in response to the ray tracing command, wherein traversing the ray tracing structure includes bypassing the scheduler for at least one node of the ray tracing structure.
10. The system according to claim 9, in: The hardware traversal engine comprises a traversal stack memory, and the traversal stack memory is used to store node addresses of the ray tracing structure.
11. A system according to claim 9 or claim 10, in: The hardware traversal engine includes a most recent hit memory to store information indicating a most recent node of the ray tracing structure relative to a ray associated with the ray tracing command.
12. A system according to any one of claims 9 to 11, in: The hardware traversal engine includes a traversal state memory for storing state information of rays associated with the ray tracing command.
13. The system according to any one of claims 9 to 12, further comprising: include: Shader processor; and Wherein traversing the ray tracing structure comprises bypassing the shader processor for the at least one node of the ray tracing structure.
14. A method, the method comprising: include: scheduling, at a scheduler of a processing unit, commands for execution at a module of the processing unit; A ray tracing structure is traversed at a hardware traversal engine of the processing unit in response to a first command from the scheduler, the hardware traversal engine bypassing the scheduler in response to identifying a first node of the ray tracing structure.
15. The method according to claim 14, further comprising: include: The hardware traversal engine bypasses a shader processor of the processing unit in response to identifying the first node of the ray tracing structure.
16. The method according to claim 14 or claim 15, further comprising: include: Address information of the ray tracing structure is identified at a texture addressing module of the processing unit in response to the first command.
17. The method according to claim 16, in: The hardware traversal engine will bypass the scheduler in response to the first command by providing information associated with the first node to the texture addressing module.
18. The method according to any one of claims 14 to 17, further comprising: include: Commands are returned from the hardware traversal engine to the scheduler in response to identifying a second node of the ray tracing structure.
19. The method according to claim 18, in: The commands include commands to execute a specified shader at a shader processor of the processing unit.
20. The method of any one of claims 14 to 19, wherein the ray tracing structure comprises a bounding volume hierarchy (BVH).
