Compressing Box Nodes in a Bounding Volume Hierarchy

By compressing box nodes in the bounding volume hierarchy, the computational efficiency of ray tracing is improved, addressing the high computational cost of ray tracing while maintaining accuracy in rendering 3D scenes.

JP2024545213APending Publication Date: 2024-12-05ADVANCED MICRO DEVICES INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024535344
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-12-27
Filing Date
2022-11-03
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

Ray tracing techniques are computationally expensive compared to rasterization-based methods, despite producing more physically accurate results, and there is a need to improve efficiency in ray tracing operations.

Method used

Implementing a bounding volume hierarchy with compressed box nodes by sharing common exponents and mantissas across box data items to reduce the data size and improve traversal efficiency in ray tracing operations.

Benefits of technology

The compression of box nodes in the bounding volume hierarchy reduces the computational resources required for ray tracing, enhancing processing efficiency and accuracy in rendering 3D scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024545213000001_ABST
    Figure 2024545213000001_ABST
Patent Text Reader

Abstract

Techniques are provided for performing ray tracing operations, including combining one or more common exponent values ​​of a compressed box node with one or more minimum vertex mantissas of the compressed box node and one or more maximum vertex mantissas of the compressed box node to obtain one or more minimum vertices and one or more maximum vertices, and combining any minimum vertex of the one or more minimum vertices and any maximum vertex of the one or more maximum vertices to obtain a bounding box for a compressed box data item of the compressed box node.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] (CROSS REFERENCE TO RELATED APPLICATIONS) This application claims the benefit of U.S. Patent Application No. 17 / 562,889, filed December 27, 2021, the contents of which are incorporated herein by reference. [Background technology]

[0002] Ray tracing is a type of graphics rendering technique in which simulated rays are cast to test for object intersections, and pixels are colored based on the results of the ray cast. Ray tracing is more computationally expensive than rasterization-based techniques, but produces more physically accurate results. Improvements to ray tracing behavior are constantly being made.

[0003] A more detailed understanding may be had from the following description, given by way of example in conjunction with the accompanying drawings, in which: [Brief description of the drawings]

[0004] [Figure 1] 1 is a block diagram of an example device capable of implementing one or more features of the present disclosure. [Diagram 2] 2 is a block diagram of the accelerated processing device of FIG. 1 illustrating additional details regarding the execution of processing tasks in the device, according to one example. [Diagram 3] FIG. 1 illustrates a ray tracing pipeline for rendering graphics using ray tracing techniques, according to one example. [Figure 4] FIG. 2 illustrates a bounding volume hierarchy, according to an example. [Diagram 5] FIG. 2 illustrates an exemplary bounding volume hierarchy including box nodes. [Figure 6] FIG. 2 illustrates a box node compression scheme, according to an example. [Figure 7] 1 is a flow diagram of a method for compressing box nodes, according to an example. [Figure 8] 1 is a flow diagram of a method for unpacking a box node, according to an example. [Figure 9] 1 is a flow diagram of a method for testing rays for intersection utilizing compressed box nodes, according to an example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0005] Techniques are provided for performing ray tracing operations, including combining one or more common exponent values ​​of a compressed box node with one or more minimum vertex mantissas of the compressed box node and one or more maximum vertex mantissas of the compressed box node to obtain one or more minimum vertices and one or more maximum vertices, and combining any minimum vertex of the one or more minimum vertices and any maximum vertex of the one or more maximum vertices to obtain a bounding box for a compressed box data item of the compressed box node.

[0006] 1 is a block diagram of an example device 100 capable of implementing one or more features of the present disclosure. Device 100 may include, for example, a computer, a gaming device, a handheld device, a set-top box, a television, a mobile phone, or a tablet computer. Device 100 includes a processor 102, memory 104, storage 106, one or more input devices 108, and one or more output devices 110. Device 100 also optionally includes an input driver 112 and an output driver 114. It should be understood that device 100 may include additional components not shown in FIG. 1.

[0007] In various alternatives, the processor 102 includes a central processing unit (CPU), a graphics processing unit (GPU), a CPU and a GPU located on the same die, or one or more processor cores, each of which may be a CPU or a GPU. In various alternatives, the memory 104 is located on the same die as the processor 102 or is located separately from the processor 102. The memory 104 may include volatile or non-volatile memory (e.g., random access memory (RAM), dynamic RAM, cache).

[0008] Storage 106 includes fixed or removable storage (e.g., hard disk drive, solid state drive, optical disk, flash drive). Input devices 108 include, but are not limited to, a keyboard, a keypad, a touch screen, a touch pad, a detector, a microphone, an accelerometer, a gyroscope, a biometric scanner, or a network connection (e.g., a wireless local area network card for transmitting and / or receiving wireless IEEE 802 signals). Output devices 110 include, but are not limited to, a display device 118, a speaker, a printer, a haptic feedback device, one or more optics, antennas, or a network connection (e.g., a wireless local area network card for transmitting and / or receiving wireless IEEE 802 signals).

[0009] The input driver 112 communicates with the processor 102 and the input device 108, allowing the processor 102 to receive input from the input device 108. The output driver 114 communicates with the processor 102 and the output device 110, allowing the processor 102 to send output to the output device 110. It should be noted that the input driver 112 and the output driver 114 are optional components, and that the device 100 operates in the same manner when the input driver 112 and the output driver 114 are not present. The output driver 114 includes an Accelerated Processing Device (APD) 116 coupled to a display device 118. The APD 116 is configured to accept computational and graphic rendering commands from the processor 102, process the computational and graphic rendering commands, and provide pixel output to the display device 118 for display. As described in further detail below, the APD 116 includes one or more parallel processing units configured to perform computations according to the single-instruction-multiple-data (SIMD) paradigm. Thus, although various functions are described herein as being performed by or in conjunction with the APD 116, in various alternatives, the functions described as being performed by the APD 116 are additionally or alternatively performed by other computing devices having similar capabilities that are not driven by a host processor (e.g., the processor 102) and that are configured to provide (graphical) output to the display device 118. For example, it is contemplated that any processing system that performs processing tasks according to the SIMD paradigm can be configured to perform the functions described herein. Alternatively, it is contemplated that computing systems that do not perform processing tasks according to the SIMD paradigm perform the functions described herein.

[0010] 2 is a block diagram of device 100 showing additional details regarding the execution of processing tasks on APD 116. Processor 102 maintains, in system memory 104, one or more control logic modules for execution by processor 102. The control logic modules include operating system 120, drivers 122, and applications 126. These control logic modules control various aspects of the operation of processor 102 and APD 116. For example, operating system 120 communicates directly with hardware and provides an interface to the hardware for other software executing on processor 102. Driver 122 controls the operation of APD 116, for example, by providing an application programming interface (API) to software executing on processor 102 (e.g., applications 126) to access various features of APD 116. In some embodiments, driver 122 includes a just-in-time compiler that compiles programs for execution by processing components of APD 116 (such as SIMD unit 138, described in more detail below). In other embodiments, a just-in-time compiler is not used to compile the programs, and a regular application compiler compiles the shader programs for execution on the APD 116.

[0011] APD 116 executes commands and programs for selected functions, such as graphic and non-graphic operations that are suitable for parallel and / or out-of-order processing. APD 116 is used to perform graphics pipeline operations, such as pixel operations, geometry calculations, and rendering of images to display device 118, based on commands received from processor 102. APD 116 also performs computational operations not directly related to graphics operations, such as operations related to video, physics simulations, computational fluid dynamics, or other tasks, based on commands received from processor 102.

[0012] The APD 116 includes a computation unit 132 (along with parallel processing units 202) that includes one or more SIMD units 138 that perform operations in a parallel manner according to the SIMD paradigm at the request of the processor 102. The SIMD paradigm is one in which multiple processing elements share a single program control flow unit and program counter, and thus execute the same program, but can execute the program on different data. In one example, each SIMD unit 138 includes 16 lanes, each lane executing the same instruction simultaneously with the other lanes in the SIMD unit 138, but executing the instruction on different data. Lanes can be switched off with prediction when not all lanes need to execute a given instruction. Prediction can also be used to execute programs with branching control flow. More specifically, for programs with conditional branches or other instructions where the control flow is based on calculations made by individual lanes, prediction of the lane corresponding to the currently not executed control flow path and serial execution of the different control flow paths allows for arbitrary control flow. In an embodiment, each of the computation units 132 can have a local L1 cache. In an embodiment, multiple compute units 132 share an L2 cache.

[0013] The basic unit of execution within the compute units 132 is the work item. Each work item represents a single instantiation of a program that executes in parallel on a particular lane. Work items can execute simultaneously as a "wavefront" on a single SIMD unit 138. One or more wavefronts are included in a "workgroup," which includes a collection of work items designated to execute the same program. A workgroup is executed by executing each of the wavefronts that make up the workgroup. In the alternative, a wavefront executes sequentially on a single SIMD unit 138, or partially or fully in parallel on different SIMD units 138. A wavefront can be thought of as the largest collection of work items that can execute simultaneously on a single SIMD unit 138. Thus, if commands received from the processor 102 indicate that a particular program should be parallelized to an extent that the program cannot be run simultaneously on a single SIMD unit 138, the program is split into wavefronts that are either parallelized on two or more SIMD units 138, or serialized on the same SIMD unit 138 (or both parallelized and serialized, as appropriate). Scheduler 136 is configured to perform operations related to scheduling various wavefronts on different compute units 132 and SIMD units 138 .

[0014] The parallel processing provided by the computation units 132 is well suited to graphics-related operations, such as pixel value calculations, vertex transformations, and other graphics operations. Thus, in some cases, the graphics pipeline 134, which accepts graphics processing commands from the processor 102, provides computation tasks to the computation units 132 for execution in parallel.

[0015] Computation units 132 are also used to perform computational tasks that are not related to graphics or that are not performed as part of the "normal" operation of graphics pipeline 134 (e.g., custom operations performed to supplement the processing performed on the operation of graphics pipeline 134). Applications 126 or other software executing on processor 102 send programs defining such computational tasks to APD 116 for execution.

[0016] Computation units 132 perform ray tracing, which is a technique for rendering a 3D scene by testing intersections between simulated rays and objects in the scene. Much of the work involved in ray tracing is done by programmable shader programs executing on SIMD units 138 within computation units 132, as described in more detail below.

[0017] FIG. 3 illustrates a ray tracing pipeline 300 for rendering graphics using ray tracing techniques, according to an example. The ray tracing pipeline 300 provides an overview of the operations and entities involved in rendering a scene using ray tracing. The ray generation shader 302, any hit shader 306, closest hit shader 310, and miss shader 312 are shader implementation (execution) stages that represent ray tracing pipeline stages functioned by shader programs executing in the SIMD unit 138. Any of the specific shader programs at each specific shader implementation stage are defined by application-provided code (i.e., by code provided by the application developer that is pre-compiled by the application compiler and / or compiled by the driver 122). The acceleration structure traversal stage 304 performs ray intersection tests to determine whether a ray hits a triangle.

[0018] The various programmable shader stages (ray generation shader 302, any hit shader 306, closest hit shader 310, miss shader 312) are implemented as shader programs that run on the SIMD unit 138. The acceleration structure traversal stage 304 is implemented in software (e.g., as a shader program that runs on the SIMD unit 138), in hardware, or as a combination of hardware and software. The hit or miss unit 308 is implemented in any technically feasible manner, such as as part of any of the other units, or as a hardware accelerated structure, or as a shader program that runs on the SIMD unit 138. The ray tracing pipeline 300 may be organized partially or fully in software, or partially or fully in hardware, by the processor 102, the scheduler 136, by a combination thereof, or partially or fully by any other hardware and / or software unit. As used herein, the term "ray tracing pipeline processor" refers to a processor that executes software to perform the operations of ray tracing pipeline 300, a hardwired hardware circuit to perform the operations of ray tracing pipeline 300, or a combination of hardware and software that together perform the operations of ray tracing pipeline 300.

[0019] The ray tracing pipeline 300 operates in the following manner: A ray generation shader 302 is performed, which sets the data of the ray to be tested against a triangle and calls upon an acceleration geometry traversal stage 304 to test the ray for intersecting with the triangle.

[0020] The acceleration structure traversal stage 304 traverses the acceleration structure, which is a data structure that describes the scene volume and objects (such as triangles) in the scene, and tests the ray against triangles in the scene. In various examples, the acceleration structure is a bounding volume hierarchy. In some embodiments, a hit or miss unit 308, which is part of the acceleration structure traversal stage 304, determines whether the results of the acceleration structure traversal stage 304 (which may include raw data such as barycentric coordinates and possible hit times) actually indicate a hit. For triangles that are hit, the ray tracing pipeline 300 triggers the execution of any hit shaders 306. Note that multiple triangles may be hit by a single ray. The acceleration structure traversal stage is not guaranteed to traverse the acceleration structure in order from closest to the ray origin to furthest from the ray origin. The hit or miss unit 308 triggers the execution of the closest hit shader 310 for the triangle closest to the ray origin that the ray hits, or triggers a miss shader if the triangle was not hit.

[0021] It should be noted that any hit shader 306 may "reject" a hit from the ray intersection test unit 304, and thus the hit or miss unit 308 triggers the execution of the miss shader 312 if the hit is not found or accepted by the ray intersection test unit 304. An exemplary situation in which any hit shader 306 may "reject" a hit is when at least a portion of the triangle that the ray intersection test unit 304 reports as a hit is completely transparent. Because the ray intersection test unit 304 only tests geometry and not transparency, for a hit to a triangle that has at least some transparency, any hit shader 306 that is invoked may determine that the reported hit is not actually a hit because it "hit" a transparent portion of the triangle. A typical use of the closest hit shader 310 is to color a material based on the texture of the material. A typical use of the miss shader 312 is to color a pixel with a color set by the skybox. It should be appreciated that the shader programs defined for closest hit shader 310 and miss shader 312 may implement a wide variety of techniques for coloring pixels and / or performing other operations.

[0022] A typical way that the ray generation shader 302 generates rays is by using a technique called backward ray tracing. In backward ray tracing, the ray generation shader 302 generates rays that have their origin at a point on the camera. The point at which the ray intersects a plane defined to correspond to the screen defines a pixel on the screen where the ray is used to determine its color. If the ray hits an object, the pixel is colored based on the closest hit shader 310. If the ray does not hit an object, the pixel is colored based on the miss shader 312. Multiple rays may be cast for each pixel, and the final color of the pixel is determined by some combination of the colors determined for each of the pixel's rays. As described elsewhere herein, each individual ray can generate multiple samples, with each sample indicating whether the ray hits a triangle or does not hit the triangle. In one example, the ray is cast with four samples. Two such samples hit the triangle and two do not. Thus, the color of the triangle only partially contributes (e.g., 50%) to the final color of the pixel, and other parts of the color are determined based on the triangles hit by other samples, or by a miss shader if the triangle is not hit. In some examples, rendering the scene involves casting at least one ray for each of multiple pixels of the image to obtain a color for each pixel. In some examples, multiple rays are cast per pixel to obtain multiple colors per pixel for a multi-sample render target. In some such examples, at some later time, the multi-sample render target is compressed through color blending to obtain a single sample image for display or further processing. Although it is possible to obtain multiple samples per pixel by casting multiple rays per pixel, techniques are provided herein for obtaining multiple samples per ray, such that multiple samples per pixel are obtained by casting only one ray. Such a task can be performed multiple times to obtain additional samples per pixel.More specifically, it is possible to cast multiple rays per pixel and obtain multiple samples per ray such that the total number of samples obtained per pixel is the number of samples per ray multiplied by the number of rays per pixel.

[0023] Any of the hit shaders 306, the nearest hit shader 310, and the miss shader 312 can spawn their own rays that enter the ray tracing pipeline 300 at ray test points. These rays can be used for any purpose. One common use is to implement ambient lighting or reflections. In one example, when the nearest hit shader 310 is called, it spawns rays in various directions. For each object or light hit by the spawned ray, the nearest hit shader 310 adds lighting intensity and color to the pixel that corresponds to the nearest hit shader 310. Although several examples of how the various components of the ray tracing pipeline 300 can be used to render a scene are described, it should be understood that any of a wide variety of techniques can be used alternatively.

[0024] As mentioned above, determining whether a ray hits an object is referred to herein as a "ray intersection test." Ray intersection testing involves firing a ray from an origin and determining whether the ray hits a triangle, and if so, how far from the origin the triangle hit is. To increase efficiency, ray tracing testing uses a representation of space called a bounding volume hierarchy. This bounding volume hierarchy is the "acceleration structure" mentioned above. In a bounding volume hierarchy, each non-leaf node represents an axis aligned bounding box that bounds the geometry of all of the node's children. In one example, a base node represents the maximum extent of the entire region over which ray intersection testing is being performed. In this example, the base node has two children, each of which represents a mutually exclusive axis aligned bounding box that sub-divides the entire region. Each of those two children has two child nodes that represent axis aligned bounding boxes that sub-divide their parent's space, and so on. Leaf nodes represent triangles over which ray testing can be performed.

[0025] The bounding volume hierarchical data structure allows the number of ray-triangle intersections (which are complex and therefore expensive in terms of processing resources) to be reduced compared to a scenario in which such a data structure is not used and therefore all triangles in the scene need to be tested for the ray. Specifically, if a ray does not intersect with a particular bounding box and that bounding box bounds a large number of triangles, all triangles within that box can be eliminated from testing. Thus, ray intersection testing is performed as a series of tests of the ray against axis-aligned bounding boxes, followed by tests against the triangles.

[0026] 4 is a diagram illustrating a bounding volume hierarchy, according to an example. For simplicity, the hierarchy is shown in 2D. However, it should be understood that extension to 3D is straightforward and the tests described herein are generally performed in three dimensions.

[0027] A spatial representation 402 of the bounding volume hierarchy is shown on the left side of Figure 4, and a tree representation 404 of the bounding volume hierarchy is shown on the right side of Figure 4. In both the spatial representation 402 and the tree representation 404, non-leaf nodes are represented by the letter "N" and leaf nodes are represented by the letter "O". A ray intersection test is performed by traversing through the tree 404, and for each non-leaf node tested, if the box test for that non-leaf node fails, then a branch below that node is eliminated. For leaf nodes that are not eliminated, a ray-triangle intersection test is performed to determine if the ray intersects a triangle at that leaf node.

[0028] In one example, the ray intersects O5 but not any other triangles. A test tests against N1 and determines that the test succeeds. A test tests against N2 and determines that the test fails (because O5 is not in N1). Note that the test eliminates all subnodes of N2 and tests against N3 and that test succeeds. Note that the test tests N6 and N7 and N6 succeeds but N7 fails. Note that the test tests O5 and O6 and O5 succeeds but O6 fails. Instead of testing eight triangle tests, two triangle tests (O5 and O6) and five box tests (N1, N2, N3, N6, N7) are done.

[0029] FIG. 5 illustrates an exemplary bounding volume hierarchy 500 that includes a box node 502. A node, such as the box node 502, represents a unit of data that includes data for multiple geometric elements (such as a bounding box). The box node 502 includes box data items 504. The box data items 504 describe a bounding box, similar to the box (N) in FIG. 4. Each box data item 504 includes a description of the bounding box's geometry (e.g., minimum and maximum vertices) and a pointer to another box node 502 or a triangle node (not shown in FIG. 5). The bounding box of a box data item 504 encloses the geometry in the node to which the pointer points. In other words, the box data item 504 of a bounding box points to a node whose geometry falls within its bounding box. A triangle block (not shown) includes data for one or more triangles, similar to the triangle (O) in FIG. 4.

[0030] To traverse the illustrated BVH 500, the ray tracing pipeline 300 begins at a box node 502 and tests the ray for intersection with the bounding boxes of the box data items of that box node 502. If the intersection test fails, the ray tracing pipeline 300 removes all children of that box data item 504 from consideration. If the intersection does not fail, the ray tracing pipeline 300 tests the children of that box data item 504. Some box data items 504 point to box nodes 502 and some box data items 504 point to triangle nodes. In response to the ray tracing pipeline 300 arriving at a triangle node, the ray tracing pipeline 300 performs a ray intersection test to determine whether the ray intersects with one or more triangles of the triangle node. In response to the ray tracing pipeline 300 arriving at a box node, the ray tracing pipeline 300 tests the children of that box node, as described above.

[0031] FIG. 6 illustrates a compression scheme for box nodes 502, according to one example. Compressor 610 converts box nodes 502 into compressed box nodes 620 that consume less data than uncompressed box nodes 502. Compressor 610 is any technically feasible entity capable of performing the compression described herein. In some examples, compressor 610 is software, hardware, or a combination thereof. In some examples, compressor 610 is part of a computer system belonging to an application developer that generates bounding volume hierarchies "offline" (i.e., while the application is not running on the end user device). In other examples, compressor 610 is part of a computer system that runs the application for the end user. In some examples, compressor 610 compresses box nodes 502 while the application is running on the end user device or another device. In some examples, compressor 610 is software running on processor 102, APD 116, or another processor. In some examples, the compressor 610 is or is part of a hardwired circuit present within any device, such as the device 100 (e.g., within the processor 102, within the APD 116, or within another part).

[0032] The box node 502 includes a number of box data items 504 (e.g., four box data items 504). Each box data item 504 includes a minimum vertex 501 and a maximum vertex 503, which together specify a bounding box. In some embodiments, the bounding box specified by the box data items 504 is axis-aligned, meaning that each face is aligned to an axis plane. Such a bounding box may be defined by a minimum vertex 501 that defines the minimum extent of the box in each axis, and a maximum vertex 503 that defines the maximum extent of the box in each axis. Each of the minimum vertex 501 and maximum vertex 503 is defined by an x ​​component, a y component, and a z component. In the illustrated example, the minimum vertex 501 includes a minimum X component 605(X), a minimum Y component 605(Y), and a minimum Z component 605(Z). Additionally, the maximum vertex 503 includes a maximum X component 607(X), a maximum Y component 607(Y), and a maximum Z component 607(Z).

[0033] Each minimum component 605 and maximum component 607 is a floating point number and therefore includes an exponent 602 and a mantissa 604. The box data item 504 also includes multiple child pointers 606. Because a single box data item 504 is associated with one single node (i.e., a box node or a triangle node), each child pointer 606 in a box data item 504 points to a different box data item 504 of the same node. Although not shown, other box data items 504 in the illustrated box node 502 also include a minimum vertex 501, a maximum vertex 503, and child pointers 606.

[0034] Typically, the exponent values ​​for each axis are very similar across the box data items 504. Thus, the compressor 610 generates the compressed box node 620 by removing the exponents from the individual box data items 628 and including a common exponent for the X component 622, a common exponent for the Y component 624, and a common exponent for the Z component 626. Thus, each compressed box data item 628 that replaces a box data item 504 in the uncompressed box node 502 includes an X minimum mantissa 630, an X maximum mantissa 632, a Y minimum mantissa 634, a Y maximum mantissa 636, a Z minimum mantissa 638, and a Z maximum mantissa. The X minimum mantissa 630 and the common exponent for the X components 622 form the X component of the minimum vertex 501 of the uncompressed box node 502. Similarly, the Y min mantissa 634 and the common exponent of the Y component 624 form the Y component of the min vertex 501 of the uncompressed box node 502, and the Z min mantissa 638 and the common exponent of the Z component 626 form the Z component of the min vertex 501 of the uncompressed box node 502. Similarly, the X max mantissa 632 and the common X exponent 622 form the X component for the max vertex 503 of the uncompressed box node 502, the Y max mantissa 636 and the common Y component 624 form the Y component for the max vertex 503, and the Z max mantissa 640 and the common Z component 626 form the Z component for the max vertex 503. The common X exponent 622, the common Y component 624 and the common Z component 626 are shared across compressed box data items 628 in the compressed box node 620, so the exponents do not need to be stored separately for each component.

[0035] In general, because the scales of different bounding boxes in a box node 502 are approximately the same, it is possible to share exponents with the smallest and largest components in different compressed box data items 628. Sharing exponent values ​​reduces the amount of space required for a compressed box node 620 by significantly reducing the number of exponent values ​​contained in the compressed box node 620.

[0036] In addition to the above, in some embodiments, the child pointer 606 is compressed. Specifically, by contiguously arranging all compressed box data items 628 in a compressed box node 620 in memory, it is possible to store a pointer to the first box data item 628 along with implicit or explicit size information for calculating an offset from that pointer address. More specifically, as described elsewhere herein, in an uncompressed box node 502, the box data items 504 associated with the child box node 502 include child pointers 606 to each of the box data items 504 of the child box node. To use this information to access any particular box data item 504 in the child box node, the child pointer 606 is used to find the memory location of that box data item 504. The compressed box node 620 includes a first child pointer 650 and additional child information 652. The first child pointer 650 points to the first compressed box data item 628 of the child node. The additional child information 652 includes information for finding other compressed box data items 628 of the child compressed box node 620. In some examples, the additional child information 652 includes information indicating the size of the compressed box data item 628. This size information allows access to a particular compressed box data item 628 of the child by adding the sizes of all compressed box data items 628 that precede the particular compressed box data item 628 to the address specified by the first child pointer 650. In some examples, the additional child information 652 includes type information that specifies the type of compressed box data item 628 contained in the child compressed box node 620. This type information implicitly describes the size of the compressed box data item 628 in the child node. Thus, any compressed box data item 628 can be accessed by adding the size of each compressed box data item 628 that precedes the desired compressed box data item 628 to the address of the first child pointer 650, where the size is determined by the type information.

[0037] In some embodiments, other techniques are alternatively or additionally applied to compress the box node 502 to generate the compressed box node 620. In some examples, the mantissa in the compressed box node 620 is smaller than the mantissa 604 in the uncompressed box node 502.

[0038] 7 is a flow diagram of a method 700 for compressing a box node 502 to generate a compressed box node 620, according to one example. Although described with respect to the system of claims 1-6, one skilled in the art will understand that any system configured to perform the steps of method 700 in any technically feasible order is within the scope of the present disclosure.

[0039] The compressor 610 generates compressed box nodes 620 from box nodes 502 as follows: At 702, the compressor 702 extracts a common exponent of the box data items 504 in the box node 502. More specifically, the compressor 610 identifies a single exponent value for each of the x, y and z components of each of the box data items 504 to be used as the common X exponent 622, the common Y exponent 624 and the common Z exponent 626. In some examples, the compressor 610 identifies an exponent value 602 of at least one component value of the minimum vertex 501 or the maximum vertex 503 of one of the box data items 504 as the exponent for either component. In other examples, the compressor 610 identifies an intermediate value between, but not equal to, the exponent values ​​of each component found in each box data item 504 as the exponent for either component. As an example, if the exponents are 10, 10, 10, 11, 11, 11, 13, 15 for the X components of the minimum and maximum vertices of the box data item 504, the compressor 610 may include one value (e.g., 11) as the common X exponent 622 or may use an intermediate value such as 14 as the common X exponent 622. Any other technically feasible means for identifying a common exponent from the set of box node exponents 622 are possible. In step 704, the compressor 610 stores the common components in the compressed box node 620 along with the mantissa of each compressed box data item.

[0040] The compressor 610 also generates a first child pointer 650 for the compressed box data item 628. The first child pointer 650 points to the first compressed box data item 628 in the box node 620 associated with each particular compressed box data item 628. The compressor 610 also stores additional child information 652 in the compressed box data item 628. In addition to the above, in some implementations the compressor 610 reduces the size of the mantissa to generate the compressed mantissa in the compressed box node 620.

[0041] 8 is a flow diagram of a method 800 for decompressing a compressed box node 620 to generate a box node 502. Although described with respect to the system of claims 1-6, one skilled in the art will understand that any system configured to perform the steps of method 800 in any technically feasible order is within the scope of the present disclosure.

[0042] The decompressor 611 generates the decompressed box nodes 502 from the compressed box nodes 620. The decompressor 611 may be embodied as software, hardware, or a combination thereof. In various examples, the decompressor 611 is in (or executes on) either the processor 102, the APD 116, or another entity. In various examples, at least a portion of the decompressor 611 is a hardware circuit included, for example, in the APD 116, the processor 102, or another entity. In some examples, the decompressor 611 interfaces with a memory that stores at least a portion of the bounding volume hierarchy while the ray tracing pipeline 300 traverses the acceleration structure. For example, when the ray tracing pipeline 300 requests to read a box node, the decompressor 611 decompresses the compressed box node 620 to generate the decompressed box node 502. To decompress a compressed box node 620, in step 802, the decompressor 611 combines the common exponents for each of the X, Y, and Z components with the minimum X, minimum Y, minimum Z, maximum X, maximum Y, and maximum Z mantissas to generate the X, Y, and Z components of the minimum vertex and the X, Y, and Z components of the maximum vertex. In some embodiments, there is no need to reconstruct the child pointers, and the decompressor 611 simply uses the compressed child pointer information (first child pointer 650 and additional child information 652) to read the appropriate compressed box data item 628 and generate the corresponding floating point number. However, in other embodiments or modes of operation, the decompressor 611 reconstructs the child pointer 606 by generating a new child pointer 606 that points to the decompressed box data item 504. In instances where the size of the mantissa is reduced, the decompressor 611 increases the size of the mantissa through any technically feasible technique, such as using padding. In step 804, the decompressor 611 combines the min and max vertices to obtain a box description.In some examples, this box description includes the uncompressed box data items 504, but in other examples, the box description is used directly by entities (such as the ray tracing pipeline 300) that require bounding box information rather than in the form of box data items 504.

[0043] 9 is a flow diagram of a method 900 for testing rays for intersections utilizing a compression box node 502, according to one example. Although described with respect to the system of claims 1-6, one skilled in the art will understand that any system configured to perform the steps of method 900 in any technically feasible order falls within the scope of the present disclosure.

[0044] In step 902, an entity such as a processor (e.g., processor 102 or APD 116) decompresses the compressed box nodes to obtain box information. In some examples, the decompression is performed as described with respect to Figure 8. In step 904, an entity such as ray tracing pipeline 300 tests the ray against the obtained decompressed box nodes, as described elsewhere herein.

[0045] Note that although this disclosure sometimes refers to triangles as being within the leaf nodes of the bounding volume hierarchy, any other geometric shape may alternatively be used within the leaf nodes, in which case the compressed triangle block will contain two or more such primitives that share at least one vertex.

[0046] Each of the units illustrated in the figure represents hardware circuitry configured to perform the operations described herein, software configured to perform the operations described herein, or a combination of software and hardware configured to perform the steps described herein. For example, the ray tracing pipeline 300, the ray generation shader 302, the optional hit shader 306, the hit or miss unit 308, the miss shader 312, the nearest hit shader 310, and the accelerated structure traversal stage 304 may be implemented entirely in hardware, entirely in software running on a processing unit (such as the computation unit 132), or as a combination thereof. In some examples, the accelerated structure traversal stage 304 may be implemented partially as hardware and partially as software. In some examples, the portion of the accelerated structure traversal stage 304 that traverses the bounding volume hierarchy is software running on a processor, and the portion of the accelerated structure traversal stage 304 that performs ray-box intersection tests and ray-triangle intersection tests is implemented in hardware.

[0047] It should be understood that many variations are possible based on the disclosure herein, and although features and elements have been described above in particular combinations, each feature or element can be used alone without the other features and elements, or in various combinations with or without the other features and elements.

[0048] The provided methods can be implemented in a general purpose computer, processor, or processor core. Suitable processors include, by way of example, general purpose processors, special purpose processors, conventional processors, digital signal processors (DSPs), multiple microprocessors, one or more microprocessors associated with a DSP core, controllers, microcontrollers, Application Specific Integrated Circuits (ASICs), Field Programmable Gate Array (FPGA) circuits, any other type of integrated circuit (IC), and / or state machines. Such processors can be manufactured by configuring a manufacturing process using the results of processed hardware description language (HDL) instructions and other intermediate data including netlists (instructions that can be stored on a computer readable medium). The results of such processing can be a mask work, which is then used in a semiconductor manufacturing process to manufacture a processor implementing aspects of the embodiments.

[0049] The methods or flow charts provided herein may be implemented in a computer program, software, or firmware embodied in a non-transitory computer-readable storage medium for execution by a general purpose computer or processor. Examples of non-transitory computer-readable storage media include read-only memory (ROM), random access memory (RAM), registers, cache memory, semiconductor memory devices, magnetic media such as internal hard disks and removable disks, magneto-optical media, and optical media such as CD-ROM disks and digital versatile disks (DVDs).

Claims

1. 1. A method for performing a ray tracing operation, comprising: combining one or more common exponent values ​​of a compressed box node with one or more minimum vertex mantissas of the compressed box node and one or more maximum vertex mantissas of the compressed box node to obtain one or more minimum vertices and one or more maximum vertices; and combining any minimum vertex of the one or more minimum vertices with any maximum vertex of the one or more maximum vertices to obtain a bounding box of a compressed box data item of the compressed box node. method.

2. the common exponent values ​​include one common exponent value for each coordinate component; 2. The method of claim 1.

3. the common exponent value is shared across multiple box data items of a box node.

2. The method of claim 1.

4. the common exponent value being shared between a minimum and a maximum vertex mantissa of a box node; 2. The method of claim 1.

5. obtaining a pointer to a child compressed box data item in a child box node of the compressed box node by combining a first child pointer of the compressed box data item with information about other child compressed box data items of the child box node; 2. The method of claim 1.

6. expanding the one or more minimum vertex mantissas of the compressed box node and the one or more maximum vertex mantissas of the compressed box node to obtain the one or more minimum vertices and the one or more maximum vertices.

2. The method of claim 1.

7. compressing a box node to generate said compressed box node.

2. The method of claim 1.

8. compressing the box node includes identifying a common exponent for each coordinate component of the box node. The method of claim 7.

9. performing a ray-box intersection test using the bounding box; 2. The method of claim 1.

10. 1. A system comprising: a memory configured to store the compressed box node; a processor, coupled to the memory, configured to perform operations; The operation includes: combining one or more common exponent values ​​of the compressed box node with one or more minimum vertex mantissas of the compressed box node and one or more maximum vertex mantissas of the compressed box node to obtain one or more minimum vertices and one or more maximum vertices; and combining any minimum vertex of the one or more minimum vertices with any maximum vertex of the one or more maximum vertices to obtain a bounding box for a compressed box data item of the compressed box node. system.

11. the common exponent values ​​include one common exponent value for each coordinate component; The system of claim 10.

12. the common exponent value is shared across multiple box data items of a box node. The system of claim 10.

13. the common exponent value being shared between a minimum and a maximum vertex mantissa of a box node; The system of claim 10.

14. The processor, configured to obtain a pointer to a child compressed box data item in a child box node of the compressed box node by combining a first child pointer of the compressed box data item with information about other child compressed box data items of the child box node. The system of claim 10.

15. The processor, expanding the one or more minimum vertex mantissas of the compressed box node and the one or more maximum vertex mantissas of the compressed box node to obtain the one or more minimum vertices and the one or more maximum vertices. The system of claim 10.

16. The processor, configured to compress a box node to generate the compressed box node. The system of claim 10.

17. compressing the box node includes identifying a common exponent for each coordinate component of the box node.

17. The system of claim 16.

18. The processor, configured to perform a ray-box intersection test using the bounding box. The system of claim 10.

19. A computer-readable storage medium storing instructions, comprising: The instructions, when executed by a processor, combining one or more common exponent values ​​of a compressed box node with one or more minimum vertex mantissas of the compressed box node and one or more maximum vertex mantissas of the compressed box node to obtain one or more minimum vertices and one or more maximum vertices; combining any minimum vertex of the one or more minimum vertices with any maximum vertex of the one or more maximum vertices to obtain a bounding box of a compressed box data item of the compressed box node; causing the processor to perform operations including: A computer-readable storage medium.

20. the common exponent values ​​include one common exponent value for each coordinate component; 20. The system of claim 19.

Citation Information

Patent Citations

  • Apparatus and method for ray tracing with block floating point data

    US20090244058A1

  • Block floating point compression of signal data

    US20110099295A1