Search

CN-122003699-A - Compact geometric format

CN122003699ACN 122003699 ACN122003699 ACN 122003699ACN-122003699-A

Abstract

Systems and methods for storing primitive data for ray tracing and/or rasterization are described herein. Data is efficiently encoded into an array of fixed-size data blocks using a data format that can be directly consumed for ray traversal or rasterization. The vertex data in the block is pre-quantized and stored using a fixed-bit quantization grid. Mesh connectivity is encoded using triangle strips based on control values representing triangle interconnectivity and a compressed index buffer storing indices of vertices in each strip. Further, the triangle identifier is derived from the position of the triangle in the stripe. The block may also store a geometric identifier and an opacity map corresponding to the primitive data.

Inventors

  • Joshua David Balchak
  • Mohammed Ahmed Munim Al Kabidi
  • DAVID KIRK MCALLISTER
  • Trevor James. Hedstrom

Assignees

  • 超威半导体公司

Dates

Publication Date
20260508
Application Date
20240614
Priority Date
20240613

Claims (20)

  1. 1. An apparatus, the apparatus comprising: A circuit configured to encode mesh data comprising a plurality of primitives, wherein to encode the mesh data, the circuit is configured to: Generating control values, wherein each control value indicates a position of a geometric primitive relative to one or more other geometric primitives; Generating an index buffer comprising a plurality of index bits, wherein each index bit indicates a first reference and a non-first reference to a given vertex of the geometric primitive, and Encoded trellis data corresponding to the control value and the index buffer is stored.
  2. 2. The apparatus of claim 1, wherein a length of the index buffer is determined based at least in part on a content of each of the control values.
  3. 3. The apparatus of claim 1, wherein the plurality of index bits comprises at least in part: one bit per vertex of the geometric primitive, wherein the bit indicates whether the given vertex is referenced a first time, and A predefined number of bits for storing each non-first reference of the given vertex, wherein the predefined number of values.
  4. 4. The apparatus of claim 1, wherein the identifier corresponding to each geometric primitive is calculated by adding a predefined bit value to a value representing the location of the geometric primitive in a primitive stripe.
  5. 5. The apparatus of claim 1, wherein for each geometric primitive, each of the control values comprises one of: A first control value indicating initiation of a new primitive stripe; a second control value indicating that the first edge of the leading geometry primitive is reused as an edge of a new geometry primitive in the existing primitive stripe; A third control value indicating that a second edge of the leading geometric primitive is reused as an edge of the new geometric primitive in the existing primitive stripe, and A fourth control value indicating that the opposite edge of the leading geometry primitive that was leading is reused as an edge of the new geometry primitive.
  6. 6. The apparatus of claim 1, wherein to encode the mesh data, the circuitry is further configured to generate, for each vertex of a given geometric primitive: a fixed base position of each coordinate of the vertex in three-dimensional space, and The vertex is offset from the base position by a variable width.
  7. 7. The apparatus of claim 6, wherein the circuitry is further configured to generate a power of two scale factor to map the fixed bit base position of each coordinate of each vertex to a corresponding floating point coordinate.
  8. 8. A method for encoding mesh data comprising a plurality of primitives, the method comprising: generating, by the processing circuitry, control values, wherein each control value indicates a position of a geometric primitive relative to one or more previously stored geometric primitives; Generating, by the processing circuitry, an index buffer comprising a plurality of index bits, wherein each index bit indicates a first reference or a non-first reference to a given vertex of the geometric primitive, and Encoded trellis data corresponding to the control value and the index buffer are stored in a data block by the processing circuit.
  9. 9. The method of claim 8, wherein a length of the index buffer is determined based at least in part on a content of each of the control values.
  10. 10. The method of claim 8, wherein the plurality of index bits comprises at least in part: One bit per vertex of the geometric primitive, the one bit identifying whether the given vertex is referenced a first time, and A predefined number of bits for storing each non-first reference of the given vertex, wherein the predefined number of values is stored in a header portion of the data block.
  11. 11. The method of claim 8, wherein the identifier corresponding to each geometric primitive is calculated by adding a predefined bit value to a value representing the location of the geometric primitive in a primitive stripe.
  12. 12. The method of claim 8, wherein for each geometric primitive, the control value comprises one of: A first control value indicating initiation of a new primitive stripe; a second control value indicating that the first edge of the leading geometry primitive is reused as an edge of a new geometry primitive in the existing primitive stripe; A third control value indicating that a second edge of the leading geometric primitive is reused as an edge of the new geometric primitive in the existing primitive stripe, and A fourth control value indicating that the opposite edge of the leading geometry primitive that was leading is reused as an edge of the new geometry primitive.
  13. 13. The method of claim 8, further comprising generating, by the processing circuitry, for each vertex of a given geometric primitive: a fixed base position of each coordinate of the vertex in three-dimensional space, and The vertex is offset from the base position by a variable width.
  14. 14. The method of claim 13, further comprising generating a power of two scale factor to map fixed bit coordinates of each vertex to corresponding floating point coordinates.
  15. 15. A ray tracing system, the ray tracing system comprising: a memory configured to store mesh data including a plurality of primitives, and An encoding circuit configured to: Retrieving the grid data from the memory; generating control values, wherein each control value indicates a position of a geometric primitive relative to one or more previously stored geometric primitives; Generating a compressed index buffer comprising a plurality of index bits, each index bit indicating one of a first reference or a non-first reference to a given vertex of the geometric primitive, and The control value and the compressed index buffer are stored in a data block.
  16. 16. The ray tracing system of claim 15 wherein said plurality of index bits comprises at least in part: One bit per vertex of the geometric primitive, the one bit identifying whether the given vertex is referenced a first time, and A predefined number of bits for storing each non-first reference of the given vertex, wherein the predefined number of values is stored in a header portion of the data block.
  17. 17. The ray tracing system of claim 15, wherein the identifier corresponding to each geometric primitive is calculated by adding a predefined bit value to a value representing the location of the geometric primitive in a primitive stripe.
  18. 18. The ray tracing system of claim 15, wherein for each geometric primitive, said control value comprises one of: A first control value indicating initiation of a new primitive stripe; a second control value indicating that the first edge of the leading geometry primitive is reused as an edge of a new geometry primitive in the existing primitive stripe; A third control value indicating that a second edge of the leading geometric primitive is reused as an edge of the new geometric primitive in the existing primitive stripe, and A fourth control value indicating that the opposite edge of the leading geometry primitive that was leading is reused as an edge of the new geometry primitive.
  19. 19. The ray tracing system of claim 15, wherein to encode the mesh data, the encoding circuit is further configured to generate, for each vertex of a given geometric primitive: a fixed base position of each coordinate of the vertex in three-dimensional space, and The vertex is offset from the base position by a variable width.
  20. 20. The ray tracing system of claim 19, wherein said encoding circuit is further configured to generate a power of two scale factor to map the fixed bit coordinates of each vertex to corresponding floating point coordinates.

Description

Compact geometric format Cross Reference to Related Applications The present application claims priority from provisional patent application serial No. 63/591,964, entitled "Dense Geometry Format (dense geometry format)" filed on 10/20/2023, the entire contents of which are incorporated herein by reference. Background Description of the Related Art Ray tracing involves using a physics-based rendering method to simulate how light moves through a scene. Although this technique has been widely used for movie-level rendering, it has not been considered too demanding for real-time applications until recently. A key aspect of ray tracing is the computation of the visibility of ray-scene intersections through a process called "ray traversal". This involves calculating the intersection between a ray and a scene object by navigating through and intersecting nodes organized in a Bounding Volume Hierarchy (BVH). Standard methods for performing ray tracing or rasterizing operations typically involve executing a graphics processing pipeline consisting of a series of stages dedicated to graphics operations. For example, during each stage of the pipeline, the GPU may perform various graphics-oriented processing tasks. In one stage, the GPU may collect a set of geometric primitives that depict a graphics scene, and in a subsequent stage, it may perform shading operations using vertices linked to those primitives. Eventually, the GPU will convert these vertices into pixels through a process known as rasterization, rendering the graphics scene. For each graphics primitive or geometric object created, the geometry shader generates vertex information for each vertex linked to the graphics primitive or geometric object. For example, when processing a triangle, the geometry shading unit will provide vertex information for each of the three vertices of the triangle. The vertex data may include details such as the location of the vertex within the scene, coverage data associated with the vertex, or a set of attributes linked to the vertex, and so forth. When a geometry shader generates a graphics primitive or a geometry object, it typically organizes each generated graphics primitive or each primitive that forms part or all of the generated geometry object into a set of vertices associated with the primitive, and corresponding vertex data for each vertex within the set. However, in various scenarios, geometry shaders typically maintain multiple redundant copies of vertex data that are linked to vertices shared between graphics primitives or geometric objects. This approach becomes problematic because of the potentially large number of shared vertices in a typical graphics scene. Thus, conventional geometry shaders may ultimately store millions of duplicate copies of data. Processing such redundant data may consume computational resources inefficiently and may hamper the rendering speed of the graphics scene. Conventional methods for compressing geometric data may impose significant constraints on ray tracing or rasterization applications. These methods may include compressing data using lossy compression without providing any fine-grained control over content authoring. Conventional approaches may also involve generating a fixed mesh topology, resulting in limited flexibility and inefficient memory management. Furthermore, these methods typically involve expensive and complex pre-processing of the data before it is available for rendering purposes. In view of the foregoing, there is a need for improved systems and methods for compressing primitive data. Drawings The advantages of the methods and mechanisms described herein may be better understood by reference to the following description in conjunction with the accompanying drawings in which: FIG. 1 is a block diagram of one implementation of a computing system. FIG. 2 illustrates details of a computing system. Fig. 3 is an illustration of a Bounding Volume Hierarchy (BVH) according to an implementation. FIG. 4 is a block diagram illustrating encoding of primitive data for generating acceleration structures. Fig. 5 illustrates a Dense Geometry Format (DGF) block for storing encoded primitive data. Fig. 6 illustrates triangle strips for encoding mesh topology data. FIG. 7 is a block diagram illustrating generation of a compressed index buffer based on mesh topology data. Fig. 8 illustrates a method of storing geometric primitive data using fixed-size data blocks. Detailed Description In the following description, numerous specific details are set forth in order to provide a thorough understanding of the methods and mechanisms presented herein. However, it will be recognized by one of ordinary skill in the art that the various implementations may be practiced without these specific details. In some instances, well-known structures, components, signals, computer program instructions, and techniques have not been shown in detail in order to avoid obscuring the methods described herei