Multi-view primitive block
By storing vertex data of multiple views in primitive blocks and sharing common data, the problem of low memory bandwidth and storage space efficiency during multi-view rendering in the tile-based graphics processing system is solved, achieving more efficient data storage and deal with.
Patent Information
- Application Number
- CN201811532042.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-12-14
- Filing Date
- 2018-12-14
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2038-12-14
Smart Images

Figure CN109979000B_ABST
Abstract
Description
Technical Field
[0001] The present application describes a data structure for storing metadata and a method and apparatus for generating the data structure. Background Art
[0002] A graphics processing system is used to process graphics data. For example, an application running on a computing system may need to render an image of a three-dimensional (3D) scene for display to a user. An application may send graphics data to a graphics processing system for rendering, wherein the graphics data describes the primitives to be rendered. As is known in the art, primitives are typically convex polygons, such as triangles or convex quadrilaterals, wherein primitives typically have their positions in a rendering space of a graphics processing system defined by the positions of their vertices, and may have their appearance defined by other attributes, such as color or texture attributes. Objects in a scene may be represented by one or more primitives. As graphics processing systems advance, their ability to render complex images has improved, and so applications take advantage of this and provide graphics processing systems with more complex images to render. This means that the number of primitives in an image tends to increase, so the ability of a graphics processing system to effectively process primitives becomes more important.
[0003] One known way to improve the efficiency of a graphics processing system is to render images in a tile-based manner. In this way, the rendering space in which the primitives are rendered is divided into multiple tiles, which can then be rendered independently of each other. In order to render the primitives, the rendering unit uses memory to store intermediate results (e.g., depth values and primitive identifiers, etc.) for different sample positions. If the rendering unit operates on one tile at a time, most (or all) of the memory can be located "on-chip", i.e., on the graphics processing unit (GPU), which may be unlikely if the entire rendering space is rendered at once. Therefore, in a tile-based graphics system, the number of read and write operations between the GPU and the off-chip memory (i.e., which can be referred to as "system memory") is generally reduced compared to a non-tile-based graphics system. Since read and write operations between the GPU and the system memory are generally very slow and use a lot of power (compared to operations performed inside the GPU), tile-based graphics systems are often more efficient (in terms of power and speed) than non-tile-based graphics systems.
[0004] A tile-based graphics system includes a tiling unit to tile primitives. That is, the tiling unit determines for a primitive in which tile of the rendering space the primitive is located. Then, when the rendering unit renders the tile, information indicating which primitives should be used to render the tile can be given. In some tile-based graphics systems, the tiling unit generates data blocks called primitive blocks, which contain primitive data, and the primitive data is written to a memory and read by a rendering unit. The primitive data in a primitive block can include data for multiple vertices and data for multiple primitives. As described above, primitives are defined by the positions of their vertices, and therefore the primitive data (e.g., in a primitive block) can refer to vertex data for multiple vertices within the same primitive block.
[0005] As the complexity and display speed of graphics data increase, the amount of vertex data used to render images per second in computer graphics systems increases, and the storage space used to store primitive blocks (which contain vertex data) used in 3D rendering can easily reach hundreds of MB.
[0006] The embodiments described below are provided by way of example only and are not limiting of implementations that address any or all disadvantages of known methods of generating and storing primitive blocks. Summary of the invention
[0007] This Summary is provided to introduce selected concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
[0008] The data structure includes primitive data about a plurality of primitives and vertex data about a plurality of vertices, wherein each primitive is defined with reference to at most one or more of the plurality of vertices. The vertex data includes data about one or more views, such as a left view and a right view, and vertex parameter values of a first set of vertex parameters are stored separately for each view, and vertex parameter values of a second set of non-overlapping vertex parameters are stored only once and used when rendering either or both views.
[0009] A first aspect provides a primitive block assembly module for assembling primitive data into primitive blocks in a graphics processing system, the primitive block assembly module being configured to: receive primitive data of one or more primitives of a scene for rendering multiple views of the scene, wherein the primitive data includes multiple parameters; and store the primitive data of the one or more primitives in the primitive block, wherein: for each parameter of a first subset of parameters, a corresponding parameter value is stored for multiple views; and, for each parameter of a second subset of parameters, a common parameter value is stored for sharing by multiple views.
[0010] A second aspect provides a primitive block assembly module for assembling primitives into primitive blocks in a graphics processing system, the primitive block assembly module comprising: an input end, which is configured to receive primitive data at least about a first view and a second view; processing logic, which is arranged to generate a primitive block, the primitive block comprising: vertex data of a plurality of vertices; and, primitive data of a plurality of primitives, wherein the primitive data comprises a reference to one or more vertices of the plurality of vertices; wherein, for each vertex of the plurality of vertices, the vertex data comprises: for each vertex parameter in a first plurality of vertex parameters, a vertex parameter value for the first view and a vertex parameter value for the second view; and, for each vertex parameter in a second plurality of vertex parameters, a single vertex parameter value for both the first view and the second view.
[0011] Processing logic arranged to generate a primitive block may include logic configured to: store primitive data for a plurality of primitives in the primitive block, and, for each vertex in a plurality of vertices: for each vertex parameter in a first plurality of vertex parameters, store a vertex parameter value for a first view and a vertex parameter value for a second view in the primitive block; and, for each vertex parameter in a second plurality of vertex parameters, store a single vertex parameter value for both the first view and the second view in the primitive block.
[0012] Processing logic arranged to generate a primitive block may include logic configured to determine which vertex parameters are in a first plurality of vertex parameters and which vertex parameters are in a second plurality of vertex parameters by: for each vertex and each vertex parameter, comparing a vertex parameter value with respect to a first view and a vertex parameter value with respect to a second view; for a vertex parameter, in response to determining that the vertex parameter value with respect to the first view of at least one vertex does not match the vertex parameter with respect to the second view of the same vertex, assigning the vertex parameter to the first plurality of vertex parameters; and, for the vertex parameter and for each vertex, in response to determining that the vertex parameter value with respect to the first view and the vertex parameter with respect to the second view match, assigning the vertex parameter to the second plurality of vertex parameters.
[0013] Processing logic arranged to generate a primitive block may include logic configured to determine which vertex parameters are in a first plurality of vertex parameters and which vertex parameters are in a second plurality of vertex parameters by, for each vertex parameter, checking code configured to generate a vertex parameter value for a first view and a vertex parameter value for a second view; for the vertex parameter, in response to determining that the code is capable of generating a vertex parameter value for at least one vertex for the first view that does not match a vertex parameter for the same vertex for the second view, assigning the vertex parameter to the first plurality of vertex parameters; and, for the vertex parameter, in response to determining that the code is not capable of generating a vertex parameter value for any vertex for the first view that does not match a vertex parameter for the same vertex for the second view, assigning the vertex parameter to the second plurality of vertex parameters.
[0014] The processing logic arranged to generate the primitive block may further comprise logic arranged to store control data identifying which vertex parameters are in the first plurality of vertex parameters and / or which vertex parameters are in the second plurality of vertex parameters.
[0015] The primitive block may include data for stereoscopic rendering, and the first view is a left view and the second view is a right view.
[0016] The first plurality of vertex parameters may include parameters defining the position of the vertex. The first plurality of vertex parameters may also include parameters defining reflection. The second plurality of vertex parameters may include attribute data.
[0017] The primitive block may include: a first portion including only vertex parameter values for a first plurality of vertex parameters for a first view; a second portion including only vertex parameter values for the first plurality of vertex parameters for a second view; and a third portion including only vertex parameter values for a second plurality of vertex parameters. The first portion and the second portion may be interleaved.
[0018] The processing logic may be implemented in hardware.
[0019] A third aspect provides a method for assembling metadata into a primitive block in a graphics processing system, the method comprising: receiving metadata of one or more primitives of a scene for rendering multiple views of the scene, wherein the metadata includes multiple parameters; and storing the metadata of the one or more primitives in the primitive block, wherein: for each parameter of a first subset of parameters, corresponding parameter values for multiple views are stored; and for each parameter of a second subset of parameters, a common parameter value is stored for sharing by multiple views.
[0020] A fourth aspect provides a method for assembling primitives into primitive blocks in a graphics processing system, the method comprising: receiving at least primitive data about a first view and a second view; generating a primitive block in a primitive block assembly module, the primitive block comprising: vertex data of multiple vertices; and primitive data of multiple primitives, wherein the primitive data comprises a reference to one or more vertices of the multiple vertices; wherein, for each vertex in the multiple vertices, the vertex data comprises: for each vertex parameter in a first plurality of vertex parameters, a vertex parameter value about the first view and a vertex parameter value about the second view; and, for each vertex parameter in a second plurality of vertex parameters, a single vertex parameter value for both the first view and the second view.
[0021] Generating a primitive block may include: storing primitive data for a plurality of primitives in the primitive block; and storing, for each vertex in a plurality of vertices, in the primitive block: for each vertex parameter in a first plurality of vertex parameters, a vertex parameter value for a first view and a vertex parameter value for a second view; and for each vertex parameter in a second plurality of vertex parameters, a single vertex parameter value for both the first view and the second view.
[0022] The method may also include: for each vertex and each vertex parameter, comparing the vertex parameter value with respect to the first view and the vertex parameter value with respect to the second view; for the vertex parameter, in response to determining that the vertex parameter value with respect to the first view of at least one vertex does not match the vertex parameter with respect to the second view of the same vertex, assigning the vertex parameter to the first plurality of vertex parameters; and for the vertex parameter and for each vertex, in response to determining that the vertex parameter value with respect to the first view and the vertex parameter with respect to the second view match, assigning the vertex parameter to the second plurality of vertex parameters.
[0023] The method may also include: for each vertex parameter, checking code configured to generate a vertex parameter value for the first view and a vertex parameter value for the second view; for the vertex parameter, in response to determining that the code is capable of generating a vertex parameter value for at least one vertex for the first view that does not match the vertex parameter for the same vertex for the second view, assigning the vertex parameter to the first plurality of vertex parameters; and, for the vertex parameter, in response to determining that the code is not capable of generating a vertex parameter value for any vertex for the first view that does not match the vertex parameter for the same vertex for the second view, assigning the vertex parameter to the second plurality of vertex parameters.
[0024] The method may further include storing control data in the primitive block, the control data identifying which vertex parameters are in the first plurality of vertex parameters and / or which vertex parameters are in the second plurality of vertex parameters.
[0025] The primitive block may include data for stereoscopic rendering, and the first view is a left view and the second view is a right view.
[0026] The first plurality of vertex parameters may include parameters defining vertex positions. The first plurality of vertex parameters may also include parameters defining reflections. The second plurality of vertex parameters may include attribute data.
[0027] The primitive block may include: a first portion including only vertex parameter values for a first plurality of vertex parameters for a first view; a second portion including only vertex parameter values for the first plurality of vertex parameters for a second view; and a third portion including only vertex parameter values for a second plurality of vertex parameters. The first portion and the second portion may be interleaved.
[0028] A fifth aspect provides a data structure stored in a memory element for storing metadata about multiple views of a scene, wherein the metadata includes multiple parameters, and the data structure includes: for each parameter of a first subset of parameters, corresponding parameter values for multiple views; and for each parameter of a second subset of parameters, a common parameter value shared by multiple views.
[0029] A sixth aspect provides a data structure stored in a memory element for storing metadata about at least a first view and a second view, the data structure comprising: vertex data for a plurality of vertices; and metadata for a plurality of primitives, wherein the metadata for the primitives comprises references to one or more vertices of the plurality of vertices; wherein, for each vertex of the plurality of vertices, the vertex data comprises: for each vertex parameter in a first plurality of vertex parameters, a vertex parameter value for the first view and a vertex parameter value for the second view; and, for each vertex parameter in a second plurality of vertex parameters, a single vertex parameter value for both the first view and the second view.
[0030] The data structure may include data for stereoscopic rendering, and wherein the first view is a left view and the second view is a right view.
[0031] The first plurality of vertex parameters may include parameters defining vertex positions. The first plurality of vertex parameters may also include parameters defining reflections. The second plurality of vertex parameters may include attribute data.
[0032] The data structure may also include: a first portion including only vertex parameter values for a first plurality of vertex parameters for a first view; a second portion including only vertex parameter values for the first plurality of vertex parameters for a second view; and a third portion including only vertex parameter values for a second plurality of vertex parameters. The first portion and the second portion may be interleaved.
[0033] A further aspect provides a graphics processing system configured to perform the method described herein and a graphics processing system including the primitive block assembly module described herein, wherein the graphics processing system can be implemented in hardware on an integrated circuit. A further aspect provides computer readable code and a computer readable storage medium having the computer readable code encoded thereon, the computer readable code being configured to cause the method described herein to be performed when the code is executed.
[0034] Further aspects provide a manufacturing method for using an integrated circuit manufacturing system to manufacture a graphics processing system as described herein and an integrated circuit definition data set, which, when processed in the integrated circuit manufacturing system, configures the integrated circuit manufacturing system to manufacture the graphics processing system as described herein.
[0035] Other aspects provide: a computer-readable storage medium having stored thereon a computer-readable description of an integrated circuit, which, when processed in an integrated circuit manufacturing system, causes the integrated circuit manufacturing system to manufacture a graphics processing system as described herein; an integrated circuit manufacturing system configured to manufacture a graphics processing system as described herein; and, an integrated circuit manufacturing system comprising: a non-transitory computer-readable storage medium having stored thereon a computer-readable description of an integrated circuit describing a graphics processing system; a layout processing system configured to process the integrated circuit description so as to generate a circuit layout description of the integrated circuit embodying the graphics processing system; and an integrated circuit generation system configured to manufacture a graphics processor system based on the circuit layout description, wherein the graphics processing system includes a graphics processing system of a primitive block assembly module as described herein.
[0036] A graphics processing system as described herein may be embodied in hardware on an integrated circuit. A method of manufacturing a graphics processing system at an integrated circuit manufacturing system may be provided. An integrated circuit definition data set may be provided that, when processed in an integrated circuit manufacturing system, configures the system to manufacture a graphics processing system. A non-transitory computer readable storage medium may be provided on which a computer readable description of an integrated circuit is stored that, when processed, causes a layout processing system to generate a circuit layout description for use in the integrated circuit manufacturing system to manufacture the graphics processing system.
[0037] An integrated circuit manufacturing system may be provided, comprising: a non-transitory computer-readable storage medium having stored thereon a computer-readable integrated circuit description describing a graphics processing system; a layout processing system configured to process the integrated circuit description to generate a circuit layout description of an integrated circuit embodying the graphics processing system; and an integrated circuit generation system configured to manufacture the graphics processing system based on the circuit layout description.
[0038] Computer program code for performing any of the methods described herein may be provided.A non-transitory computer-readable storage medium having computer-readable instructions stored thereon may be provided, which when executed at a computer system causes the computer system to perform any of the methods described herein.
[0039] As will be apparent to the skilled person, the above features may be combined as appropriate and with any aspects of the examples described herein. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Examples will now be described in detail with reference to the accompanying drawings, in which:
[0041] Figure 1 Some elements of a tile-based graphics processing system that may be used to render a stereoscopic image of a 3D scene are shown;
[0042] Figure 2 is a schematic diagram showing the structure of an example primitive block;
[0043] Figure 3 Is generated Figure 2 Flowcharts of two example methods for primitive blocks shown in;
[0044] Figure 4 is a schematic diagram showing the structure of another example primitive block;
[0045] Figure 5 is a schematic diagram showing the structure of yet another example primitive block;
[0046] Figure 6 A computer system in which a graphics processing system is implemented is shown; and
[0047] Figure 7 An integrated circuit manufacturing system for producing an integrated circuit embodying a graphics processing system is shown.
[0048] The accompanying drawings illustrate different examples. The skilled person will recognize that the element boundaries (e.g., boxes, groups of boxes, or other shapes) shown in the figures represent an example of boundaries. In some examples, it may be that an element may be designed as multiple elements, or multiple elements may be designed as one element. Where appropriate, common reference numerals are used throughout the accompanying drawings to indicate similar features. DETAILED DESCRIPTION
[0049] The following description is presented by way of example to enable those skilled in the art to make and use the invention. The present invention is not limited to the embodiments described herein, and various modifications to the disclosed embodiments will be apparent to those skilled in the art.
[0050] The embodiments will now be described by way of example only.
[0051] As described above, the amount of vertex data used to render an image per second in a computer graphics system can be very large, and this can affect the performance of the system, for example, it is limited by memory bandwidth (e.g., the bandwidth between a processing unit that generates a primitive block and a memory that stores the primitive block). When rendering multiple views of a scene, such as for stereo rendering, the amount of data increases further. As described above, a tiling unit in a tile-based graphics processing system generates a primitive block and also determines for the primitive in which tile of the rendering space the primitive is located. The data associating tiles and primitives with each other can be output from the tiling unit in the form of a display list (optionally, which can be referred to as a control list or stream). In a typical stereo rendering system, the tiling unit outputs twice the number of primitive blocks (e.g., a set of left primitive blocks and a set of right primitive blocks, where each left primitive block corresponds to one of the right primitive blocks, forming a pair of primitive blocks for a specific instance of the scene viewed from the left viewpoint and the right viewpoint) and twice the number of display lists (e.g., a set of left display lists and a set of right display lists, where each left display list corresponds to one of the right display lists, forming a pair of display lists for a specific instance of the scene viewed from the left viewpoint and the right viewpoint).
[0052] A more efficient method for generating primitive blocks for multi-view rendering is described herein, which reduces the total amount of data written to memory by tiling units and thus reduces the memory bandwidth used for memory writes. A new data structure is also described herein in the form of a new primitive block format for multi-view rendering, which improves the efficiency of data storage by reducing the total storage space required to store all primitive blocks for multi-view rendering. In particular, the primitive block format includes data about each view (e.g., right view and left view in stereo rendering) so that dedicated independent primitive blocks are not generated for independent views. Although these methods and data structures are described below in terms of stereo rendering (stereo rendering includes two views, left view and right view), these methods and data structures can be used regardless of how many views are actually rendered as long as there is vertex data about more than one view (e.g., a cube map). For example, a cube map represents six views of a scene, where each view generally includes visible scene geometry when looking outward from the center of the cube to each face of the cube. In the case of rendering a cube map, the proposed data structure will contain six sets of unique per-view data (e.g., per-view position data) and one set of common data.
[0053] Figure 1Some elements of a tile-based graphics processing system 100 that can be used to render a stereoscopic image of a 3D scene are shown. A stereoscopic image of a 3D scene can be created by rendering a "left view" and a "right view" of the scene, which correspond to the views of the scene that the viewer's left eye and right eye will see, respectively. By making the rendered left view visible to the viewer's left eye and making the rendered right view visible to the viewer's right eye, it is very useful to generate and display a 3D image to the viewer. This can be achieved in a variety of different ways, for example, using glasses worn by the viewer that allow the viewer's left eye and right eye to see different images. To name just a few examples, this can be achieved with polarized lenses, colored lenses, or lenses that can simulate fast shutter speeds. In another example, the viewer can wear a head-mounted display so that different images are visible to the viewer's corresponding eyes. This can be very useful in a virtual reality system or an augmented reality system.
[0054] Graphics processing system 100 includes a graphics processing unit (GPU) 102 and two portions of memory 104A and 104B. Note that the two portions of memory 104A and 104B may or may not be parts of the same physical memory, and both memory 104A and 104B may be located "off chip," i.e., not on the same chip as GPU 102. Communication between memory (104A and 104B) and GPU 102 may occur over a communication bus in system 100.
[0055] The GPU 102 includes a pre-processing module 106, a tiling unit 108, and a rendering unit 110. The tiling unit 108 includes processing logic 112 and a data store 114, and the rendering unit 110 includes a hidden surface elimination (HSR) module 116 and a texturing / shading module 118. The graphics processing system 100 is arranged so that graphics data describing a sequence of primitives provided by an application is received at the pre-processing module 106. The pre-processing module 106 performs functions such as geometry processing, including clipping and culling to remove primitives that do not fall within the visible view. The pre-processing module 106 may also project the primitives into screen space. The pre-processing module 106 outputs the primitives to the tiling unit 108.
[0056] The tiling unit 108 receives primitives from the pre-processing module 106 and determines which primitives exist in each tile of the rendering space of the graphics processing system 100. The primitives may be in one or more tiles of the rendering space. The tiling unit 108 assigns primitives to tiles of the rendering space by creating a display list for the tile, wherein the display list for the tile includes an indication of the primitives present in the tile (i.e., the primitive ID). The processing logic 112 of the tiling unit 108 performs the operations of the tiling unit 108, and the data storage 114 stores data of the intermediate results of the tiling process, such as the results of the tiling calculations and the partially filled display list. The processing logic 112 can be implemented with dedicated hardware specially designed to perform the operations of the tiling unit 108. Alternatively, at least some functions of the processing logic 112 can be implemented by executing software on a processor, wherein the software is written so that when it is executed, it causes the processor to perform the operations of the tiling unit 108.
[0057] In various examples, once all primitives for the renderer are tiled, the display lists are complete, and they and the primitive blocks are passed to the off-chip memory 104A for storage therein. In other examples, the tiling unit 108 may not use internal storage (such as storage 114) to store display lists, and instead, when tiling is performed, the primitive identifiers may be written directly to the display lists in the memory 104A. In addition, in some other examples, the internal storage 114 may be implemented in the tiling unit 108, but the internal storage 114 may not be large enough to store all display lists for all tiles at once. Therefore, the internal storage 114 can be used to collect the tiling results, which can then be written to the memory 104A in chunks (or "batches") when the tiling is performed. This can avoid inefficient memory access patterns when primitives are written to different control flows in the memory 104A.
[0058] The rendering unit 110 retrieves the display list for the tile and the primitives associated with the tile from the memory 104A (i.e., by reading data from the primitive block), and the HSR module 116 performs hidden surface elimination to remove fragments of the primitives that are hidden in the scene. The remaining fragments are passed to the texturing / shading module 118, which performs texturing and / or shading on the fragments to determine pixel color values for the rendered image that can be passed to the memory 104B for storage in the frame buffer. The rendering unit 110 processes the primitives in each tile, and when the entire image has been rendered and stored in the memory 104B, the image can be output from the graphics processing system 100 and displayed, for example, on a display.
[0059] Figure 1Also shown in more detail are example structures of the pre-processing module 106 and the processing logic 112 within the tiling unit 108. Figure 1 As shown in , the pre-processing module 106 may include a data acquisition module 122 for acquiring vertex data, a vertex processing module 124, a geometry shader 126, and a viewport conversion module 128. The viewport conversion module 128 converts the vertices into screen space coordinates in combination with perspective segmentation. Figure 1 As shown in FIG. 1 , the processing logic 112 within the tiling unit 108 may include a primitive block assembly module 130 that generates primitive blocks and a tiling engine 132 that generates a display list.
[0060] exist Figure 1 In the illustrated example, the tile-based graphics processing system 100 is a deferred rendering system, meaning that the rendering unit 110 performs hidden surface elimination on the primitive fragments before performing texturing and / or shading on the primitive fragments in order to render the scene. However, in other examples, the graphics processing system may not be a deferred rendering system, such that texturing and / or shading is performed on the primitive fragments before performing hidden surface elimination on the primitive fragments.
[0061] The method described herein for generating primitive blocks for multi-view rendering (eg, stereo rendering) is implemented within the tiling unit 108 of the graphics processing system 100, and this reduces the memory bandwidth of the memory 104A with respect to writing to the memory. The method and primitive block format can be referred to Figure 2 and Figure 3 To describe, Figure 2 and Figure 3 Stereoscopic rendering is involved (ie, two views per scene instance), but the approach can be easily extended to other multi-view rendering approaches, e.g., where more than two views per scene instance are rendered. Figure 2The structure of a primitive block 200 generated within a tiling unit 108 (e.g., within a primitive block assembly module 130) is shown. The primitive block 200 includes control data 202, primitive data 204, and vertex data 206-210; however, unlike known primitive blocks, instead of storing vertex data for different views (e.g., a left view and a right view) in separate primitive blocks, vertex data for both views are stored in the same primitive block, and some portions of the vertex data are only used when rendering one of the two views (i.e., the left view data 206 is only used when rendering the left view, and the right view data 208 is only used when rendering the right view), and other portions of the vertex data (i.e., common data 210) are used when rendering one or both of the two views (i.e., the primitive block 200 described herein can be used even where only one view is rendered). This reduces the amount of data written to memory. The two views may be generated in pre-processing module 106 (eg, within geometry shader 126, or within vertex processing module 124, or within viewport conversion module 128 which may convert vertices to different screen space coordinates for different viewpoints of different views).
[0062] The primitive data 204 defines a plurality of primitives. Each primitive is defined with reference to one or more of a plurality of vertices, and the vertex data 206-210 within the primitive block 200 relates to a plurality of vertices. For example, the primitive data may define a primitive by indexing a set of vertices (e.g., three vertices of a triangle primitive), the vertex data (206-210) of which is stored in the primitive block. Thus, the primitive data 204 may include a corresponding set of one or more indices defining the corresponding primitive, wherein the index is a reference to the vertex data (206-210) stored in the primitive block 200.
[0063] The left view data and the right view data of the vertices 206 and 208 include position data of each vertex in the plurality of vertices, so that the primitive block 200 includes two sets of position data about each vertex - one set of position data in the left view data 206 and another set of position data in the right view data 208, for example, the two sets of position data correspond to different positions of the vertex in the view rendering space due to different viewpoints of different views. Figure 2200, but in other examples, left view data 206 and right view data 208 may be interleaved, such that primitive block 200 includes left view data for vertex 1, followed by right view data for the same vertex (i.e., vertex 1), followed by left view data for the next vertex (vertex 2), followed by right view data for the same vertex (i.e., vertex 2), etc. If the left view and the right view are rendered simultaneously, interleaving data for the different views in this manner may reduce the amount of data read from memory (e.g., read from memory 104A by rendering unit 110), because data for the second view remains in the cache and can be used without being re-read.
[0064] The position data of the vertex (stored separately for the left view and the right view) may include X, Y, Z, and W parameters, where the X and Y parameters include X and Y coordinates to indicate the screen position, the Z parameter indicates the depth of the vertex, and the W parameter is the reciprocal homogeneous W (RHW) value used for texturing and shading. The homogeneous point given by the value (X, Y, Z, W) defines the position of the vertex in the projection space with respect to a particular view.
[0065] In various examples, the left view data and right view data 206, 208 for vertices may include additional parameters for each vertex (i.e., in addition to the position data described above), such as data related to screen-space reflections (e.g., because the left view and the right view may have different reflection vectors), view vectors, and / or any number of other parameters required by the technology being used by the application generating the data.
[0066] The common data 210 for the vertex includes those parameters that are the same for both the left view and the right view of each vertex in the plurality of vertices, and those parameters are stored only once in the primitive block 200. The common data may, for example, include attribute data, such as one or more parameters that can be used in a programmable shader language (e.g., by a pixel shader) to calculate the color of a pixel. For example, the vertex attribute data may be used in a pixel shader as a texture coordinate set U, V and S, T, color, normal, etc. U, V, S, and T are texture coordinates used to map a texture onto a primitive.
[0067] The values of the vertex parameter data for X, Y, Z, RHW and texture coordinates U, V, S and T can be in IEEE floating point format. An IEEE floating point value has 32 bits (4 bytes), 8 bits for the exponent, 23 bits for the mantissa and 1 bit for the sign.
[0068] In various examples, the vertex parameter data provided separately for each view may include 16 bytes of data for each vertex and for each view, while the vertex parameter data stored in the common data portion 210 and used for both views may be significantly larger, such as 64 bytes per vertex or more (e.g., in some examples, the total vertex data size, including the portion residing in each view and the common data portion, may be as much as 512 bytes). By using Figure 2 The primitive block structure shown in and described above avoids duplication of large common data portions 210 and thereby memory usage and memory bandwidth are reduced compared to having separate primitive blocks for different views.
[0069] In various examples, the division between vertex parameters that are stored separately for the left view and the right view (in the left view data portion 206 and the right view data portion 208 of the primitive block) and vertex parameters that are stored only once for both views (in the common data portion 210) can be the same for all primitive blocks and can be predetermined. However, in other examples, the control data 202 in the primitive block 200 can include data identifying which parameters are provided separately and / or which parameters are provided only once for both views.
[0070] Figure 3 Two flowcharts 300A and 300B are shown, which illustrate the steps of generating a primitive block 200 (eg, Figure 2 As described above, these methods are implemented by the tiling unit 108 within the GPU 102.
[0071] In the first flow chart 300A, the division between vertex parameters stored separately for the left view and the right view (a first subset of vertex parameters) and vertex parameters stored only once for both views (a second subset of vertex parameters) is predetermined and the same for all primitive blocks. The method includes receiving primitive data about the left view and the right view (block 302) and storing control data and primitive data (block 310). For the first subset of vertex parameters and for each vertex, for example, for each view, the vertex parameter values are stored (block 312) in the left view data portion 206 and the right view data portion 208 of the primitive block 200. In contrast, for the second subset of vertex parameters, for example, a single value is stored (block 314) for each vertex parameter for both views in the common data portion 210 of the primitive block 200. The first and second subsets of vertex parameters do not overlap, and each vertex parameter stored in the primitive block 200 for each vertex belongs to the first subset or the second subset.
[0072] In contrast, in the second flow chart 300B, the division between vertex parameters stored separately for the left view and the right view and vertex parameters stored only once for both views is not necessarily the same for all primitive blocks, but rather, as part of the method, an evaluation is made (in block 324) to determine whether to store two parameter values per vertex (one for the left view and one for the right view) or a single parameter per vertex (for both views). Figure 3 As shown in the second flowchart 300B in FIG. 300 , metadata for the left view and the right view is received (block 302), and the metadata is stored (block 320). Vertex parameters are then selected (block 322), and it is determined whether the vertex parameter value for the left view and the vertex parameter value for the right view are the same for each vertex in the primitive block (block 324). The vertex parameter values may be different for different vertices, and therefore the test (in block 324) only compares vertex parameter values associated with the same vertex. If the left and right values of the vertex parameter values are the same for each vertex in the primitive block (“yes” in block 324), a single vertex parameter value is stored in the primitive block for each vertex (block 326), such as in the common data portion 210 of the primitive block 200. However, if the left and right values of the vertex parameters do not match for all vertices in the primitive block (“No” in block 324), that is, if there are one or more vertices where the left value of the vertex parameter is different from the right value of the vertex parameter, then for each vertex, separate vertex parameter values for each view are stored in the primitive block (block 328), e.g., in the left view data portion 206 and the right view data portion 208 of the primitive block 200. The method is repeated for all vertex parameters (e.g., blocks 330-332), and when all vertex parameters have been stored (“Yes” in block 330), control data is stored that identifies which vertex parameters have been stored in the common data portion 210 and which vertex parameters have been stored in the left view data portion 206 and the right view data portion 208 of the primitive block (block 334).
[0073] Although the second flowchart 300B shows a comparison step (block 324) of comparing vertex parameter values, in other examples, the comparison may be performed in other ways. For example, the method may alternatively include examining the code that generates the parameter value (rather than examining the parameter itself) and determining the division between each view and the common data portion. Although the comparison of vertex parameters (such as Figure 3) is guaranteed to identify all identical parameters for both views, but inspection of the code that generates the vertex parameters (which may miss identical parameters where different code paths actually produce the same result for both views) can make the implementation less complex, for example because it can be performed offline and control data can be provided (e.g. by a compiler), and this avoids having to have hardware to compare the parameters in real time.
[0074] In the above example, for those vertex parameters that store two values for each vertex (i.e., one for the left view and one for the right view), the two values are stored separately and independently, i.e., the value for the left view is stored in the left view data portion 206, and the value for the right view is stored in the right view data portion 208, although as described above, these portions 206, 208 may not be separate contiguous portions, and in various examples, the left and right values (and thus the left view data portion 206 and the right view data portion 208) may be interleaved (e.g., as shown in FIG. 2 ). Figure 5 and described below).
[0075] However, in other examples, the values for the two views may not be stored independently, but rather one of the values (e.g., the value for the right view) may be stored as a difference relative to the other value (e.g., the difference between the right view value and the left view value). This can reduce the overall size of the primitive block, for example, where the difference value can be stored with fewer bits than the value itself. For example, the stored difference value can be a byte-lane integer difference to avoid the loss of precision that might otherwise be caused by subtracting one floating point number from another floating point number. In other examples, the value stored for the second value (i.e., the value that is not fully stored) can be some other value that can be used in conjunction with the first value (i.e., the fully stored value) to fully generate the second value.
[0076] In various examples, the storage of one value (e.g., the left value) and one value (e.g., the difference value) that can be used to determine (also using the first value) the second value can be used in conjunction with the interleaving of left and right view data (as described above) because this results in efficient memory access. For example, if only the second view (e.g., the right view) is rendered, the two values that need to be read to determine the parameter value of the second view (e.g., the first value and the difference value) are stored close to each other (e.g., logically adjacent).
[0077] The pre-processing unit 106 of the GPU 102 may generate Figure 3The left view and right view primitives used in the two exemplary methods 300A, 300B are shown (as received in block 302). In various examples, the data for the different views may be generated in the geometry shader 126 or the vertex processing module 124, or in a primitive assembly module ( Figure 1 124). In one example, the primitive assembly module may loop over the primitives for each view and resend them through the pipeline with a different set of transformations each time. In another example, the geometry shader 126 or vertex processing module 124 (e.g., using modified vertex shading processing code) may receive data about the primitives, read the vertex data, and then convert the input primitives into two output primitives, one for the left view space and one for the right view space. The two primitives are interleaved at the output of the geometry shader 126 / vertex processing module 124.
[0078] Although the above reference Figure 2 and Figure 3 The described method can be implemented regardless of where the metadata for the left view and the right view is generated, but if the data for the corresponding left and right primitives is available at the same time or close together in time, the method operates more efficiently and more accurately. This is the case if the interleaving of the left and right primitives causes the corresponding left and right primitives to be adjacent to each other. If the generation of the left and right primitives is performed in the geometry shader 126 or the vertex processing unit 124, the condition is met, thereby improving the efficiency of generating primitive blocks. In contrast, if the generation of the left and right primitives is performed by a primitive assembly module before the data acquisition module 122, the condition may not be met, which may result in an increase in the complexity of generating primitive blocks (for example, because the method may have to cache the metadata for a period of time until the data for the corresponding left and right primitives is available).
[0079] Although the above examples involve left and right views (for stereo rendering), these methods are also applicable when more than two views are rendered and / or vertex data is generated for more than two views (regardless of how many views are actually rendered). Figure 4 An exemplary primitive block 400 is shown for N views, where N>1, but is otherwise similar to Figure 2 The primitive block 200 shown in FIG. 1 is the same as that described above. Figure 4 As shown in FIG. 4 , the primitive block 400 includes independent view data 402, 404 for each view, and although these portions of the primitive block 400 are shown separately, in other examples, the view data for different views may be interleaved, such as Figure 5 As shown in Figure 5, primitive block 500 includes a portion 502 that includes interleaved parameters (where N>1) for each view (labeled 1-N) for each vertex, for example, the view for vertex 1 Figure 1 , followed by the parameters for each other view of the same vertex (i.e., up to and including view N), followed sequentially by the parameters for each view of vertex 2, sequentially by the parameters for each view of vertex 3, and so on. The interleaved data includes only the appropriate subset of all the parameters for the vertex, and the remaining vertex parameter values are stored only once per vertex (in the common data portion 210) and are used for all views. In other examples, if the primitive block format does not support the full number of views, the views can be grouped and replaced with Figure 2 and Figure 4 The per-view data shown in FIG. 206 is represented by data corresponding to different, non-overlapping subsets of views (e.g., the data about the views in a per-view data block 206). Figure 1 And Vision Figure 2 and the data about the view in another per-view data block 208 Figure 3 And Vision Figure 4 , and the common data about all four views in the common data block 210). Figure 4 and Figure 5 The primitive blocks 400, 500 shown in FIG. 4 may be used as described above and Figure 3 Generated by the method shown in .
[0080] Using the methods described herein and the primitive block formats described herein, the total amount of data written to memory by the tile units is reduced, and therefore this reduces the memory bandwidth for memory writes. The read bandwidth on the rasterization side can also be reduced because common data can reside in cache when rendering different views in an interleaved manner. The new primitive block format described herein, which can be used for stereo rendering or any other multi-view rendering, also improves the efficiency of data storage by reducing the total memory space required to store all primitive blocks for all primitives (and all views).
[0081] Figure 6 1 shows a computer system in which the graphics processing system described herein may be implemented. The computer system includes a GPU 102 (e.g. Figure 1 ), CPU 602, memory 606, and other devices 614 such as display 616, speaker 66, and camera 619. The components of the computer system can communicate with each other via a communication bus 620.
[0082] Figure 1The GPU 102, and in particular the processing logic 112 within the tile unit 108, is shown as including a plurality of functional blocks. This is merely illustrative, and is not intended to define a strict distinction between different logical elements of these entities. Each functional block may be provided in any suitable manner. It should be understood that intermediate values described herein as being formed by the GPU need not be physically generated by the GPU at any point, and may merely represent logical values that conveniently describe the processing performed by the GPU between its inputs and outputs.
[0083] The graphics processing system described herein can be embodied in hardware on an integrated circuit. The graphics processing system described herein can be configured to perform any of the methods described herein. Generally, any of the functions, methods, techniques, or components described above can be implemented in software, firmware, hardware (e.g., fixed logic circuits), or any combination thereof. The terms "module," "function," "component," "element," "unit," "block," and "logic" may be used herein to generally represent software, firmware, hardware, or any combination thereof. In the case of software implementation, a module, function, component, element, unit, block, or logic represents a program code that performs a specific task when executed on a processor. The algorithms and methods described herein can be performed by one or more processors that execute a code that causes the processor to perform the algorithm / method. Examples of computer-readable storage media include random access memory (RAM), read-only memory (ROM), optical disks, flash memory, hard disk storage, and other memory devices that can use magnetic, optical, and other technologies to store instructions or other data that can be accessed by a machine.
[0084] As used herein, the terms computer program code and computer readable instructions refer to any type of executable code for a processor, including code expressed in machine language, interpreted language, or scripting language. Executable code includes binary code, machine code, bytecode, code that defines an integrated circuit (such as a hardware description language or netlist), and code expressed in programming language code such as C, Java, or OpenCL. Executable code can be, for example, any type of software, firmware, script, module, or library that, when properly executed, processed, interpreted, compiled, executed in a virtual machine or other software environment, causes a processor of a computer system that supports the executable code to perform the tasks specified by the code.
[0085] Processor, computer or computer system can be any type of equipment, machine or special circuit or their collection or their part with processing power so that it can execute instruction.Processor can be any type of general processor or special processor, such as CPU, GPU, system on chip, state machine, media processor, application specific integrated circuit (ASIC), programmable logic array, field programmable gate array (FPGA), physical processing unit (PPU), radio processing unit (RPU), digital signal processor (DSP), general processor (such as general GPU), microprocessor, any processing unit designed to accelerate task outside CPU etc.Computer or computer system may include one or more processors.Those skilled in the art will recognize that such processing power is incorporated into many different equipments, and therefore term "computer" includes set-top box, media player, digital radio, PC, server, mobile phone, personal digital assistant and many other equipments.
[0086] It is also intended to include software that defines the configuration of hardware as described herein, such as HDL (Hardware Description Language) software, such as for designing integrated circuits, or for configuring programmable chips to perform desired functions. That is, a computer-readable storage medium may be provided having computer-readable program code encoded thereon in the form of an integrated circuit definition data set, which, when processed (e.g., run) in an integrated circuit manufacturing system, configures the system to manufacture a graphics processing system configured to perform any of the methods described herein, or to manufacture a graphics processing system including any of the apparatus described herein. The integrated circuit definition data set may, for example, be an integrated circuit description.
[0087] Thus, a method of manufacturing a graphics processing system as described herein at an integrated circuit manufacturing system may be provided. Furthermore, an integrated circuit definition data set may be provided which, when processed in an integrated circuit manufacturing system, causes a method of manufacturing a graphics processing system to be performed.
[0088] The integrated circuit definition data set may be in the form of computer code, for example, as a netlist, code for configuring a programmable chip, as a hardware description language defining an integrated circuit of any level, including as register transfer level (RTL) code, as a high-level circuit representation such as Verilog or VHDL, and as a low-level circuit representation such as OASIS (RTM) and GDSII. The higher-level representation (such as RTL) that logically defines the integrated circuit may be processed at a computer system that is configured to generate a manufacturing definition of the integrated circuit in the context of a software environment, including definitions of circuit elements and rules for combining such elements, so as to generate a manufacturing definition of the integrated circuit so defined by the representation. As is typically the case where software is executed at a computer system to define a machine, one or more intermediate user steps (e.g., providing commands, variables, etc.) may be required in order for a computer system configured to generate a manufacturing definition of an integrated circuit to execute code that defines the integrated circuit, thereby generating a manufacturing definition of the integrated circuit.
[0089] Now refer to Figure 7 An example of processing an integrated circuit definition data set at an integrated circuit manufacturing system to configure the system to manufacture a graphics processing system is described.
[0090] Figure 7 An example of an integrated circuit (IC) manufacturing system 702 configured to manufacture a graphics processing system as described in any of the examples herein is shown. Specifically, the IC manufacturing system 702 includes a layout processing system 704 and an integrated circuit generation system 706. The IC manufacturing system 702 is configured to receive an IC definition data set (e.g., defining a graphics processing system as described in any of the examples herein), process the IC definition data set, and generate an IC based on the IC definition data set (e.g., which embodies a graphics processing system as described in any of the examples herein). The processing of the IC definition data set configures the IC manufacturing system 702 to manufacture an integrated circuit embodying a graphics processing system as described in any of the examples herein.
[0091] The layout processing system 704 is configured to receive an IC definition data set and process it to determine a circuit layout. Methods for determining a circuit layout based on an IC definition data set are known in the art and may, for example, involve synthesizing RTL code to determine a gate-level representation of a circuit to be generated, for example, in terms of logic components (e.g., NAND, NOR, AND, OR, MUX, and FLIP-FLOP components). The circuit layout may be determined based on the gate-level representation of the circuit by determining location information for the logic components. This may be done automatically or with the aid of user intervention in order to optimize the circuit layout. When the layout processing system 704 determines the circuit layout, it may output the circuit layout definition to the IC generation system 706. For example, the circuit layout definition may be a circuit layout description.
[0092] The IC generation system 706 generates the IC according to the circuit layout definition, as is known in the art. For example, the IC generation system 706 may implement a semiconductor device manufacturing process to generate the IC, which may involve a multi-step sequence of photolithography and chemical processing steps during which electronic circuits are typically created on a wafer made of semiconductor material. The circuit layout definition may be in the form of a mask that may be used during a photolithography process to generate the IC according to the circuit definition. Optionally, the circuit layout definition provided to the IC generation system 706 may be in the form of a computer readable code that the IC generation system 706 may use to form an appropriate mask for use in generating the IC.
[0093] The different processes performed by the IC manufacturing system 702 can all be implemented at one location, such as by one party. Alternatively, the IC manufacturing system 702 can be a distributed system so that some of the processes can be performed at different locations and can be performed by different parties. For example, some of the steps are: (i) synthesizing RTL code representing an IC definition data set to form a gate-level representation of a circuit to be generated; (ii) generating a circuit layout based on the gate-level representation; (iii) forming a mask based on the circuit layout; and (iv) using the mask to manufacture the integrated circuit, which can be implemented at different locations and / or by different parties.
[0094] In other examples, processing of an integrated circuit definition data set at an integrated circuit manufacturing system may configure the system to manufacture a graphics processing system without processing the IC definition data set to determine the circuit layout. For example, the integrated circuit definition data set may define a configuration of a reconfigurable processor (e.g., an FPGA), and processing of the data set may configure the IC manufacturing system to generate a reconfigurable processor having the defined configuration (e.g., by loading the configuration data into the FPGA).
[0095] In some embodiments, when the integrated circuit manufacturing definition data set is processed in the integrated circuit manufacturing system, it can cause the integrated circuit manufacturing system to generate the device as described herein. Figure 7 Configuration by an integrated circuit manufacturing definition data set in the described manner may enable the device as described herein to be manufactured.
[0096] In some examples, an integrated circuit definition data set may include software that runs on or in combination with hardware defined in the data set. Figure 7In the example shown in , the IC generation system can also be configured by the integrated circuit definition data set to load firmware onto the integrated circuit when manufacturing the integrated circuit according to the program code defined in the integrated circuit definition data set, or otherwise provide program code to the integrated circuit for use with the integrated circuit.
[0097] Those skilled in the art will recognize that storage devices for storing program instructions can be distributed in a network. For example, a remote computer can store examples of processes described as software. A local or terminal computer can access the remote computer and download a portion or all of the software to run the program. Alternatively, a local computer can download fragments of the software on demand, or execute some software instructions at a local terminal and execute some software instructions at a remote computer (or computer network). Those skilled in the art will also recognize that all or part of the software instructions can be implemented by a dedicated circuit (e.g., DSP, programmable logic array, etc.) by utilizing conventional techniques known to those skilled in the art.
[0098] The methods described herein may be performed by a computer configured with software in a machine-readable form stored on a tangible storage medium, such as in the form of a computer program including computer-readable program code for configuring a computer to perform the components of the method, or in the form of a computer program including computer program code suitable for performing all the steps of any method described herein when the program is run on a computer, and wherein the computer program may be embodied on a computer-readable storage medium. Examples of tangible (or non-transitory) storage media include disks, thumb drives, memory cards, etc., and do not include propagating signals. The software may be suitable for execution on a parallel processor or a serial processor, so that the method steps may be executed in any suitable order or simultaneously.
[0099] The hardware components described herein may be generated by a non-transitory computer-readable storage medium having computer-readable program code encoded thereon.
[0100] The memory storing the machine executable data used in implementing the disclosed aspects may be a non-transitory medium. The non-transitory medium may be volatile or non-volatile. Examples of volatile non-transitory media include semiconductor-based memories, such as SRAM or DRAM. Examples of technologies that can be used to implement non-volatile memory include optical and magnetic memory technologies, flash memory, phase change memory, resistive RAM.
[0101] A specific reference to "logic" refers to a structure that performs a function or multiple functions. Examples of logic include circuits that are arranged to perform these functions. For example, such circuits may include transistors and / or other hardware elements available during the manufacturing process. As an example, such transistors and / or other elements may be used to form circuits or structures that implement and / or contain memory (e.g., registers, flip-flops, or latches), logic operators (e.g., Boolean operations), mathematical operators (e.g., adders, multipliers, or shifters) and interconnections. Such elements may be provided as custom circuits or standard cell libraries, macros, or at other abstract levels. Such elements may be interconnected in a specific arrangement. Logic may include fixed-function circuits, and the circuits may be programmed to perform a function or multiple functions; such programming may be provided by firmware or software updates or control mechanisms. Logic identified as performing a function may also include logic that implements constituent functions or subprocesses. In an example, hardware logic has a circuit that implements a fixed-function operation, or multiple operations, state machines, or processes.
[0102] As will be apparent to the skilled artisan, any range or device value given herein may be expanded or altered without losing the effect sought.
[0103] It will be understood that the benefits and advantages described above may relate to one embodiment or may relate to several embodiments. The embodiments are not limited to those that solve any or all of the stated problems or those that have any or all of the stated benefits and advantages.
[0104] Any reference to "a / an" item refers to one or more of those items. The term "comprising" is used herein to mean including the identified method blocks or elements, but such blocks or elements do not comprise an exclusive list, and an apparatus may include additional blocks or elements, and a method may include additional operations or elements. Furthermore, blocks, elements, and operations themselves are not implicitly closed.
[0105] The steps of the method described herein can be performed in any appropriate order or performed simultaneously when appropriate. The arrows between the frames in the accompanying drawings illustrate an example order of method steps, but are not intended to exclude the parallel execution of other orders or multiple steps. In addition, each block can be deleted from any method without departing from the spirit and scope of the subject matter described herein. The aspect of any example described above can be combined with any aspect of the other examples described to form other examples without losing the effect sought. When the elements of the accompanying drawings are shown as being connected by arrows, it will be appreciated that these arrows illustrate an example flow of communication (comprising data and control messages) only between elements. The flow between elements can be in either direction or in two directions.
[0106] The applicant hereby independently discloses each individual feature described herein and any combination of two or more such features, to the extent that such feature or combination can be implemented as a whole based on this specification in accordance with the common general knowledge of a person skilled in the art, regardless of whether such feature or combination of features solves any problem disclosed herein. In view of the above description, it will be apparent to a person skilled in the art that various modifications may be made within the scope of the invention.
Claims
1. A primitive block assembly module, used to assemble primitive data into primitive blocks in a graphics processing system, wherein the primitive block assembly module include: an input configured to receive metadata of one or more primitives of a scene for rendering a plurality of views of the scene, wherein the metadata comprises a plurality of parameters and the plurality of views comprises at least a first view and a second view; and processing logic arranged to store control data identifying which vertex parameters are in a first plurality of vertex parameters and which vertex parameters are in a second plurality of vertex parameters, and the processing logic arranged to generate a primitive block using the control data and to store primitive data for the one or more primitives and vertex data for a plurality of vertices in the primitive block, wherein for each vertex in the plurality of vertices, the vertex data comprises: for each vertex parameter in the first plurality of vertex parameters, a value of the vertex parameter for the first view and a value of the vertex parameter for the second view; and for each vertex parameter of a second plurality of vertex parameters, a single vertex parameter value for both the first view and the second view; The control data is determined in the offline process in the following manner: for each vertex parameter, examining code configured to generate a vertex parameter value for the first view and a vertex parameter value for the second view; For vertex parameters, in response to determining that the code is capable of generating a vertex parameter value for at least one vertex with respect to the first view that does not match a vertex parameter for the same vertex with respect to the second view, assigning the vertex parameter to the first plurality of vertex parameters; and For a vertex parameter, in response to determining that the code is unable to generate a vertex parameter value for any vertex with respect to the first view that does not match a vertex parameter for the same vertex with respect to the second view, assigning the vertex parameter to the second plurality of vertex parameters.
2. The primitive block assembly module according to claim 1, in, The primitive data of a primitive includes a reference to one or more vertices of the plurality of vertices.
3. The primitive block assembly module according to claim 1 or 2, in, The processing logic includes logic configured to: store primitive data for the plurality of primitives in a primitive block, and, for each vertex in the plurality of vertices: for each vertex parameter in the first plurality of vertex parameters, store a vertex parameter value for the first view and a vertex parameter value for the second view in the primitive block; And, for each vertex parameter of the second plurality of vertex parameters, storing the single vertex parameter value in the primitive block for both the first view and the second view.
4. The primitive block assembly module according to claim 1, in, The processing logic also includes logic arranged to store the control data.
5. The primitive block assembly module according to claim 1, in, The primitive block includes data for stereo rendering, and the first view is a left view and the second view is a right view.
6. The primitive block assembly module according to claim 1 or 2, in, The primitive block includes: a first portion including only vertex parameter values of the first plurality of vertex parameters for the first view; a second portion comprising only vertex parameter values of the first plurality of vertex parameters for the second view; and A third portion includes only vertex parameter values of the second plurality of vertex parameters.
7. A method for assembling primitive data into primitive blocks in a graphics processing system, the method include: Receiving metadata of one or more primitives of a scene for rendering a plurality of views of the scene, wherein the metadata comprises a plurality of parameters and the plurality of views comprises at least a first view and a second view; storing control data identifying which vertex parameters are in the first plurality of vertex parameters and which vertex parameters are in the second plurality of vertex parameters; and A primitive block is generated using the control data, and primitive data of the one or more primitives and vertex data of a plurality of vertices are stored in the primitive block, wherein for each vertex in the plurality of vertices, the vertex data comprises: for each vertex parameter in the first plurality of vertex parameters, a value of the vertex parameter for the first view and a value of the vertex parameter for the second view; and for each vertex parameter of a second plurality of vertex parameters, a single vertex parameter value for both the first view and the second view; The control data is determined in the offline process in the following manner: for each vertex parameter, examining code configured to generate a vertex parameter value for the first view and a vertex parameter value for the second view; For vertex parameters, in response to determining that the code is capable of generating a vertex parameter value for at least one vertex with respect to the first view that does not match a vertex parameter for the same vertex with respect to the second view, assigning the vertex parameter to the first plurality of vertex parameters; and For a vertex parameter, in response to determining that the code is unable to generate a vertex parameter value for any vertex with respect to the first view that does not match a vertex parameter for the same vertex with respect to the second view, assigning the vertex parameter to the second plurality of vertex parameters.
8. The method according to claim 7, in, The primitive data of a primitive includes a reference to one or more vertices of the plurality of vertices.
9. The method according to claim 7 or 8, in, Generating primitive blocks includes: storing primitive data of the plurality of primitives in a primitive block; and For each vertex in the plurality of vertices, store in the primitive block: for each vertex parameter of the first plurality of vertex parameters, a vertex parameter value for the first view and a vertex parameter value for the second view; and For each vertex parameter of the second plurality of vertex parameters, a single vertex parameter value for both the first view and the second view.
10. A graphics processing system, the graphics processing system include: The primitive block assembly module according to any one of claims 1 to 6; as well as A memory storing a data structure, wherein the data structure is used to store metadata of multiple views of a scene, wherein the metadata includes multiple parameters, and the data structure includes: for each parameter of the first subset of parameters, a corresponding parameter value for the plurality of views; and For each parameter of the second subset of parameters, a common parameter value shared by the plurality of views.
11. The graphics processing system according to claim 10, in, The data structure also includes: Vertex data for a plurality of vertices; and Element data of a plurality of primitives, wherein the element data of a primitive includes a reference to one or more vertices of the plurality of vertices.
12. The graphics processing system according to claim 10 or 11, in, The data structure includes data for stereoscopic rendering, and wherein the first view is a left view and the second view is a right view.
13. The graphics processing system according to claim 10 or 11, in, The first plurality of vertex parameters includes parameters defining positions of vertices.
14. The graphics processing system according to claim 10 or 11, in, The second plurality of vertex parameters includes attribute data.
15. A computer-readable storage medium having computer-readable program code encoded thereon in the form of an integrated circuit definition data set, which, when processed in an integrated circuit manufacturing system, configures the integrated circuit manufacturing system to manufacture a graphics processing system including a graphic element block assembly module according to any one of claims 1-6.
