Method of processing graphics primitives, graphics processing system and storage medium

By dividing the rendering output into multiple regions and storing image data independently in each region, the problem of inefficient storage space utilization in graphics processing systems is solved, resulting in faster rendering speeds and higher storage space utilization.

CN112862661BActive Publication Date: 2026-04-21ARM LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ARM LTD
Filing Date
2020-11-27
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing graphics processing systems suffer from inefficient storage utilization during rendering, especially in tile-based rendering systems, which require waiting for all geometric data of the entire rendering output to be processed before rendering can begin, resulting in latency and wasted storage space.

Method used

The rendering output is divided into multiple regions, and the geometric data and state data of primitives are stored in independent data structures in each region. This allows for independent processing and rendering of primitive data in each region, and dynamically allocates storage space to improve efficiency.

Benefits of technology

By dynamically storing and allocating storage space, the amount of storage space required at any given time is reduced, improving storage space utilization efficiency and rendering speed. It is applicable to various memory types and enhances the performance and power efficiency of graphics processing systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112862661B_ABST
    Figure CN112862661B_ABST
Patent Text Reader

Abstract

This disclosure relates to methods, graphics processing systems, and storage media for processing graphic primitives. Specifically, when processing graphic primitives in a graphics processing system, a rendering output is divided into multiple regions for rendering, each region including a corresponding area of ​​the rendering output; and for a set of one or more primitives to be rendered, it is determined which regions of the multiple regions of the rendering output should be rendered; and for each region of the rendering output determined to be rendered, the geometric data of the primitive, together with an indication of state data to be used for rendering the primitive in that region, is stored in a corresponding data structure in memory, such that the geometric data of the primitives to be rendered is stored in corresponding different data structures for each different region of the rendering output determined to be rendered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The techniques described in this article relate to computer graphics processing, and in particular to the processing of graphics primitives during the rendering phase of the output. Background Technology

[0002] Normally, graphics processing begins by dividing the graphics processing (rendering) output (such as a frame to be displayed) into multiple similar basic components (so-called "primitives") to make graphics processing operations easier. These "primitives" are usually in the form of simple polygons, such as triangles.

[0003] At this level, primitives are typically defined and represented by a set of vertices. Each vertex of a primitive is associated with a dataset representing that vertex (such as position, color, texture, and other attribute data). This "vertex data" is then used, for example, when rasterizing and rendering the primitives associated with that vertex, to generate the desired rendering output for the graphics processing system.

[0004] For a given output to be generated by a graphics processing system (e.g., a frame to be displayed), it is typically defined as a set of vertices for that output. The primitives to be processed for that output are then indicated as a set of vertices from the vertex set of the graphics processing output being generated. Typically, the overall output (e.g., the frame to be generated) is divided into smaller processing units (called "draw calls"). Each draw call will have a corresponding set of vertices defined for it and a set of primitives that use those vertices. For a given frame, for example, there might be approximately several hundred draw calls and hundreds of thousands of primitives.

[0005] Once primitives and their vertices are generated and defined, they can be processed by the graphics processing system to generate the desired graphics processing output (rendering target), such as a frame for display. This essentially involves determining which sample points in an array of sample points associated with the area of ​​the rendered output to be processed are covered by primitives, and then determining the appearance (e.g., based on its color, etc.) that each sample point should have to represent the primitive at that sample point. These processes are collectively referred to as rasterization and rendering, respectively. (Sometimes the term "rasterization" is used to refer to the conversion of primitive data into sample locations and rendering. However, in this paper, "rasterization" simply refers to the conversion of primitive data into sample point addresses.)

[0006] Rasterization and rendering processes utilize vertex attributes associated with the vertices of the primitives being processed. To facilitate this operation, the attributes of vertices defined for a given graphics processing output (e.g., a drawing call) typically undergo an initial so-called "vertex shading" operation before the primitives are rasterized and rendered. This "vertex shading" operation transforms the attributes of individual vertices into a desired form for subsequent graphics processing operations. For example, this could include transforming vertex position attributes from their initially defined world or user space to the screen space where the graphics processing system's output is to be displayed.

[0007] Therefore, a graphics processing pipeline will typically include a vertex shader stage (vertex shader) that performs vertex shading calculations on initial vertex attribute values ​​defined for the vertices to generate the desired set of output vertex attributes (i.e., properly "shaded" attributes) for use by subsequent processing stages in the graphics processing pipeline.

[0008] Once the vertex attributes are colored, the "colored" attributes will then be used when processing the vertices (and their associated primitives) in the rest of the graphics processing pipeline.

[0009] One form of graphics processing uses so-called "tile-based" rendering. In tile-based rendering, the output of a 2D rendering (i.e., the output of the rendering process, such as the output frame to be displayed) is rendered as multiple smaller areas, often referred to as "tiles." In such an arrangement, the rendering output is typically divided (by area) into rendering tiles of regular size and shape (they are typically squares or rectangles, for example). Other terms commonly used for "tile-based" and "tile-based" rendering include "chunking" (the rendered tiles are called "chunks") and "bucket" rendering. For convenience, the terms "tile" and "tile-based" will be used below. However, it should be understood that these terms are intended to cover all alternative and equivalent terms and techniques in which the rendering output is rendered as multiple smaller areas.

[0010] In a tile-based graphics processing pipeline, the geometry (primitives) of the generated render output are categorized into regions of the render output area to identify the geometry (primitives) that need to be processed for each render tile. This categorization allows for the identification of the primitives that need to be processed for a given render tile (in order to, for example, avoid unnecessarily rendering primitives that do not actually exist in the tile). A list of primitives to be rendered for each region of the generated render output is categorized (often called a "primitive list"). Once the primitive list is prepared for all render output regions, each render tile is processed by rasterizing and rendering it as the primitives listed in the render tile list.

[0011] Therefore, the process of preparing a list of primitives for each rendering output region essentially involves determining the primitives that should be rendered for a given rendering output region. This process is typically performed by identifying (to the desired level of accuracy) the primitives that intersect (i.e., those that will appear (at least partially) within the rendering output region in question), and then preparing a list of these primitives for future use by the graphics processing system.

[0012] It should be noted that when a primitive falls into more than one rendering output region (which is usually the case), the primitive is included in the primitive list of each region it falls into. The rendering output region with the primitive list prepared can be a single rendering tile, or a group of multiple rendering tiles, etc.

[0013] In fact, each rendering output region can be considered to have a bin (a list of primitives). Any primitive found to fall into that region (i.e., intersect with that region) is placed into that bin (in fact, the process of classifying primitives region by region in this way is commonly referred to as "binning").

[0014] It is known that binning is implemented in a hierarchical manner, using various different region sizes (levels in the hierarchy) (e.g., descending to the rendering tile size (the lowest level)). However, binning can be performed in more or less complex ways as needed.

[0015] Therefore, in tile-based processing systems, there will be a first pass, which is essentially classifying the graphic primitives (and / or other graphic entities, geometric shapes, etc.) to be processed into regions that have already been divided for the purpose of classification and rendering output.

[0016] These tiles are then rendered individually and subsequently reassembled to provide a complete rendering output (e.g., a frame for display). The rendering of the tiles' primitives is typically performed using a geometric dataset representing the primitives and state data indicating the operations to be performed during rasterization / rendering of the primitives.

[0017] Therefore, in a tile-based rendering system, the primitive list reflects the spatial distribution of primitives in the rendered output; that is, it specifies which primitives should be rendered for which regions / tiles. Thus, all geometric data used for the rendered output is stored together in a data structure for the rendered output in memory, and the relevant primitive data for rendering the tiles is retrieved from this data structure by referring to the primitive list. Then, any state data is stored in another data structure.

[0018] The applicant believes that there is still a range of alternative and improved graphics processing systems available. Summary of the Invention

[0019] A first embodiment of the technology described herein includes a method for processing graphic primitives using a graphics processing system, the graphics processing system including a memory and a graphics processor communicating with the memory, wherein the graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated graphic data, the associated graphic data including geometric data representing the primitive and state data indicating operations to be performed when rasterizing and / or rendering the primitive, the method including the following steps:

[0020] The rendering output is divided into multiple regions for rendering, each region comprising a corresponding area of ​​the rendering output; and

[0021] For a received set of one or more primitives to be processed:

[0022] Obtain the associated geometric data used to render the set of one or more primitives;

[0023] Determine which regions among the plurality of regions of the rendered output should render the set of one or more primitives; and

[0024] For each region in the rendering output that is determined to be rendered from the set of one or more primitives, the geometric data of the one or more primitives, along with an indication of the associated state data to be used for rasterizing and / or rendering the set of one or more primitives, are stored in memory in a corresponding data structure for that region.

[0025] This allows the indication of associated state data and geometric data for the set of one or more primitives to be rendered to be stored in corresponding different data structures for different regions of the set of one or more primitives that are determined to be rendered in the rendering output.

[0026] A second embodiment of the technology described herein includes a graphics processing system comprising a memory and a graphics processor communicating with the memory, wherein the graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated primitive data, the associated primitive data including geometric data representing the primitive and state data indicating operations to be performed when rasterizing and / or rendering the primitive, the graphics processor comprising:

[0027] A primitive classification circuit, wherein the primitive classification circuit is configured to:

[0028] For a received set of one or more primitives to be processed:

[0029] Obtain the associated geometric data used to render the set of one or more primitives;

[0030] Determine which regions, among multiple regions into which the rendering output has been divided for rendering purposes, should render the set of one or more primitives, each region including a corresponding area of ​​the rendering output; and

[0031] The image data storage circuit is configured to:

[0032] For each region in the rendering output that the primitive classification circuit determines should be rendered with one or more primitives, the geometric data of the one or more primitives, along with an indication of the associated state data to be used for rasterizing and / or rendering the one or more primitives, is stored in the memory in a corresponding data structure for that region.

[0033] This allows the indication of associated state data and geometric data for a set of one or more primitives to be rendered to be stored in corresponding different data structures for different regions of the set of one or more primitives that are determined to be rendered in the rendering output.

[0034] In the techniques described herein, the rendering output (which may include, for example, at least a portion of a frame to be displayed) is divided into multiple regions for rendering, each region comprising a corresponding area of ​​the rendering output. Then, for example, in a common manner, the graphical primitives used for the rendering output (in embodiments, these graphical primitives are initially represented by a set of vertices of individual primitives) are acquired and processed to determine associated geometric data (e.g., this geometric data may include, and in embodiments does include, a set of transformed or “colored” vertices of the individual primitives in the primitives) in a form that can be used by a graphics processor to rasterize / render the primitives.

[0035] Once the primitive's (e.g., transformed) geometric data (e.g., from the graphics processor's vertex shading circuitry) has been acquired, the next step is to determine which regions of the rendered output should be rendered with the primitives. In this implementation, this is done by examining which regions of the rendered output are at least partially covered by the primitives in question.

[0036] Then, the geometric data required for rendering the primitives is stored in a separate data structure in memory, which is for each region in the corresponding different regions of the primitives in question to be rendered in the rendering output. That is, the geometric data is stored and organized on a "per region" basis, where the geometric data of any primitives that need to be rendered in a particular rendering output region is stored in an associated data structure for that region.

[0037] Therefore, when it is determined that primitives should be rendered in multiple different regions of the rendering output, the geometric data of the primitives is copied and stored in the corresponding different data structures of each region (the region where the primitives have been determined to be rendered) within that region of the rendering output.

[0038] It is also possible to store indications of associated state (control) data that may require rasterization / rendering of primitives in a corresponding data structure. For example, such state data may be defined for groups of multiple primitives per drawing call (and shared by all primitives in the group in question (e.g., drawing call) and used for that primitive). Therefore, in an implementation, when a group of primitives to be processed (e.g., a drawing call) is received, associated state data for rasterizing and / or rendering the primitives is obtained (this associated state data may be shared by all primitives within the group).

[0039] In the implementation, the indication of the state data of a specific primitive (e.g., the state data may also be shared by a group of primitives) is also stored and organized on a "per region" basis, wherein, as needed, the indication of the associated state data is copied for each region in the rendering output that is determined to be associated primitives to be rendered.

[0040] Therefore, for a specific region of the rendered primitives in the rendering output, "data primitives" in the form of geometric data representing the primitives and indications of associated state data for rasterization and / or rendering of the primitives are stored in such a "per-region" data structure (this state data can be shared by multiple primitives, for example, within a drawing call). According to the technique described herein, the rendering output is thus divided into multiple smaller regions for rendering, and the data primitives of the rendered output are stored in memory in corresponding data structures associated with different rendering output regions (and these data structures are associated only with specific regions, allowing data primitives to be stored separately for different rendering regions).

[0041] For example, while various implementations have been described with reference to the processing of individual primitives and the processing of primitive data associated with those primitives, it should be appreciated that these steps are typically repeated for multiple primitives to be rendered when generating the rendering output. The processing of primitives and the processing of storing associated primitive data can be performed individually for each primitive, or a set of multiple primitives (which may include, for example, primitive meshes / strips) can be processed together. Various arrangements are possible in this regard. Thus, generally speaking, the processing may include processing a set of one or more primitives.

[0042] When a new primitive or set of primitives to be processed is received, the new primitive or set of primitives is then processed in the same manner as described above, and the associated primitive data is written into an appropriate data structure in memory based on determining which rendering output regions(s) the primitive(s) (or set of primitives) at least partially fall into.

[0043] Therefore, multiple such data structures are generated, and thus at any given time, there may be (and usually will be) multiple data structures in memory that are associated with multiple different regions of the rendered output and contain corresponding graph data for those multiple different regions of the rendered output.

[0044] The effect of this arrangement is that, because the metadata of each render output region can be stored (and stored separately) individually, the corresponding set of one or more primitives of each render output region (the region that stores the metadata) can then be read from the associated data structure and further processed by the graphics processor independently of any other render output region. That is, the individual render output regions that store data can be processed independently of other regions using the corresponding data structure for each render output region.

[0045] For example, once the metadata for a specific region has been written into the appropriate data structure in memory, the data can then be used to render the primitives of the region that stored the metadata, without waiting for any other primitives (or any other regions) to be processed. This means that at least some of the primitives in the region to be rendered can be rendered (in some implementations) earlier, even if other primitives in the region may still be pending rendering.

[0046] Therefore, this method contrasts with traditional tile-based rendering systems, where all geometric data of the entire rendering output must typically be preprocessed during the initial processing pass when generating the primitive list (because only once have all the geometry been classified into the region of all the geometry to be processed for the given tile).

[0047] In such a tile-based rendering system, once all the initial processing, such as classifying geometry into regions (e.g., tiles), has been completed, only the primitives in the tiles are rasterized and rendered to generate the rendering output, and thus it is actually "delayed" until the initial processing of primitives into a primitive list has been completed.

[0048] Therefore, in traditional tile-based rendering systems, the metadata of all primitives in the rendering output is usually stored together in such a way that it is impossible to identify which primitives need to be rendered for which tiles from the metadata itself, and this can only be done by referring to an additional data structure (i.e., a primitive list) that describes the spatial distribution of primitives.

[0049] In contrast, in the technique described herein, instead, map data is organized and stored on a per-region basis, as explained above. Therefore, as new map data that needs to be stored for a region is generated, separate data structures for each region within those regions can be generated (and then used), wherein the data structure for a specific region contains only the map data for that region.

[0050] Accordingly, since the map data is stored and organized for the corresponding region, there is no need for a separate data structure that describes the spatial distribution of map elements (e.g., a collection of map element lists).

[0051] It should be recognized that this means the data for the same primitive may therefore need to be stored in multiple locations; that is, copies of the primitive data should be (and in implementation) stored in the corresponding data structures for each render output region that needs to render the primitive. (In conventional tile-based methods, the primitive data for each primitive may only need to be stored once because the spatial distribution (locality) of primitives is specified by a primitive list.)

[0052] However, this also means that metadata stored for a specific region (in a corresponding data structure for that specific region) can be discarded after use. The effect of storing data in this way (where metadata is organized and stored in separate data structures for the corresponding regions of the rendered output) is that it ensures that any metadata stored for a specific region (in its corresponding data structure) must have the same locality (i.e., be associated with the same rendered output region) and the same "lifetime".

[0053] Therefore, this means that it can be guaranteed that once the graph data has been used, any (and all) graph data stored in the corresponding data structure for a specific region can be discarded without affecting any subsequent rendering of any rendering output region in the same rendering output region or any rendering output region in other rendering output regions.

[0054] Therefore, the benefit of the technique described herein is that even during the processing of a given rendering output unit (e.g., a drawing call), graph data stored in any one or more data structures can be used and then discarded, for example, freeing up storage space as new data is needed when processing subsequent graphs.

[0055] The techniques described in this paper thus enable (more efficient) use of storage space, as will be further explained below. In particular, since it is no longer necessary to wait for the processing of all geometry data for the entire rendering output unit to be completed before starting to use the geometry data to begin rendering the output, the geometry data can be used, and associated storage space is reallocated in a more dynamic manner as needed.

[0056] For example, in the techniques described herein, rendering can actually be performed in a “partially deferred” manner, wherein metadata stored for at least some regions of the area can be processed and used to render those regions (at least partially) without waiting for the processing of any other data (and independent of any other stored data and / or data yet to be processed).

[0057] The rendered output generated according to the techniques described herein may, for example, include frames for display (at least a portion of the frames for display). For instance, the rendered output may include a (complete) frame, or another desired rendering unit of that frame (e.g., a drawing call). The rendered output is then generated by rendering one or more primitives used for rendering the output. The graphics processor uses associated state and geometric data when rendering the primitives, for example, in a common manner.

[0058] For example, a primitive can initially be defined and represented as a set of vertices. Each vertex of a primitive is already associated with a dataset representing that vertex (such as position, color, texture, and other attribute data).

[0059] Therefore, in implementations, the attributes of vertices initially defined for a given graphics processing output (e.g., a drawing call) typically undergo an initial so-called "vertex shading" operation, which transforms the attributes of each initially defined vertex into a desired form for subsequent graphics processing operations. The initial processing for primitives used to generate associated geometric data can thus include, for example, transforming the initially defined vertex position attributes from the world or user space where they were initially defined to the screen space where the output of the graphics processing system is to be displayed.

[0060] Therefore, in this implementation, the initial processing of primitives includes the step of vertex shading to generate transformed geometric data. Thus, the geometric data stored in a corresponding data structure for the rendered output region may include such transformed geometric data. Therefore, in this implementation, geometric data is obtained from the vertex shading level (pipeline) of the graphics processor.

[0061] However, generally, any other geometry-related processing that is typically or desirable to be performed in a graphics processing system can be performed at this level to generate (e.g., transformed) geometric data and other such data defining the display aspects of primitives in a form suitable for use in rasterizing and rendering primitives.

[0062] The state data of primitives includes parameters for processing primitives, such as control data specifying which operations are performed during the rasterization / rendering of primitives. In implementations, any suitable state (control) information typically or desired during the rasterization and rendering of graphical primitives (and indications of such state information stored in the manner described above) can be used. (It should be appreciated that in the techniques described herein, the state data storing the indications is state data for rasterization and / or rendering of primitives, for example, state data indicating the following rasterization and rendering operations: determining that sample points in the sample point array associated with the rendering output to be processed are covered by primitives, and then determining the appearance that each sample point should have to represent the primitive of that sample point. On the other hand, any state data indicating, for example, vertex shading or other geometric processing operations, does not need to be stored in the "per-region" data structure (because the geometric state data has already been used when performing geometric processing). Therefore, after the desired geometric processing has been performed and the geometric data has been properly categorized into the "per-region" data structure, the geometric state data can be discarded (and in this implementation, geometric state data is discarded)).

[0063] As described above, according to the techniques described herein, the rendering output (e.g., a frame or a portion of a frame) is divided into multiple regions. In one implementation, the rendering output is divided into multiple regions of uniform size (e.g., rectangular (e.g., square)). However, other arrangements are of course also possible.

[0064] These regions can typically be of any size, depending on the requirements. For example, in some implementations, the individual regions may correspond to a 32×32 or 64×64 array of segments (therefore, it should be appreciated that these regions can be larger than the typical rendering tile size of a conventional tile-based graphics processing system). However, this is not necessary.

[0065] When processing primitives using the techniques described in this paper, it is necessary to determine which regions of primitives need to be rendered. This can be done, for example, by determining the intersections of primitives with regions of the rendered output (similar to how this is done in more traditional tile-based rendering methods when binning primitives into their corresponding regions for rendering).

[0066] For each region that needs to render primitives, a data structure is generated and stored in the storage space, and primitive data is added to the corresponding region's data structure as needed. Therefore, each region of the rendered output has an independent data structure with a clear lifecycle and data ownership.

[0067] The data structure for a region can store map data in any suitable manner. For example, data can be stored directly or indirectly, and in compressed or uncompressed (raw) formats as needed.

[0068] Therefore, the stored state data may be the state data itself (or some or all of the state data), and / or may include references (e.g., in the form of pointers) to some or all of the state data stored elsewhere (e.g., in one or more separate data structures). Various arrangements are possible in this regard.

[0069] As mentioned above, some or all of the state data can be "shared" among multiple primitives (or sets of primitives), for example, in cases where state data is defined on a per-draw call basis. Therefore, an indication of the state data stored for a particular primitive (or set of primitives) can be a shared reference (e.g., a draw call) to a group of primitives sharing associated state data. In this case, it is not necessary to copy the reference to the state data for each primitive in the primitives associated with it, where the primitive data is stored in a "per-region" data structure. For example, if a reference to the associated state data of a primitive is already stored in the per-region data structure (where the primitive data is to be stored in the "per-region" data structure), then it is not necessary to copy that reference (and thus, in this implementation, this operation is not performed).

[0070] In this implementation, primitive data is written into an appropriate data structure in the order in which the received primitives are used for processing, such that the primitive order is maintained within the data structure when (new) primitive data is written into the appropriate data structure (preserving the primitive drawing order, such as the primitive drawing order specified by the API). Therefore, in this implementation, the data structure for a specific region includes an in-order list of primitives to be rendered in that region.

[0071] Although it is possible to store all the geographic data of a region sequentially in blocks (of the data structure), and all the data of a primitive is stored after the data of the previous primitive, in the implementation, the geometric data is stored in a different region of the data structure than the state data (i.e., the indicator of the state data).

[0072] For example, in one implementation, the geometric data may include: a set of vertex indices that identify (e.g., respective primitive identifiers) the vertices of the primitive (or primitives) in question; and (transformed) vertex data of the primitive. In this case, in one implementation, the primitive indices and state data (indicators) are stored in a first region (a first memory location / address set) of the data structure, while the vertex data is stored in a second separate region (a second memory location / address set) of the data structure.

[0073] For example, a first region may contain an index list scattered with state data (indicators) of primitives (such as indicating, for example, state data indicating a drawing call, followed by indices of multiple primitives for that drawing call, followed by new state data (e.g., for a new drawing call), followed by another sequence of indices of primitives, etc.), and a second region contains associated vertex data of the primitives. In cases where the geometric data includes a set of vertex indices that identify the vertices of primitives to be used in the rendering output region in question, in an implementation, the vertices indicated in the data structure for the rendering output region in question are indexed within the vertex set of the rendering output region in question (in contrast to indexing relative to the vertex set of the rendering output as a whole) to ensure the independence of the data structure for each region.

[0074] Index / state data can be written from top to bottom, for example, so that the list of index / state data grows "downward" starting from the first available storage location. On the other hand, vertex data can "grow" upward starting from the last available storage location.

[0075] However, other arrangements are certainly possible.

[0076] In implementation, the storage space allocated to (and available for allocation to) the region includes storage space from a suitable pool of free storage (“heap”) for use by the graphics processor.

[0077] The pool can therefore include multiple storage space “blocks,” each of which can be used to allocate regions to the rendering output. Data structures for specific regions can therefore include a collection of one or more such storage space blocks. In some implementations, these are fixed-size storage space blocks. However, this is not necessary, and it is also conceivable, for example, that the size of the storage blocks can be variable.

[0078] Once a storage block is allocated for a specific region, any metadata for that region can then be added to that block (at least until the block is full). In this implementation, this is done in the manner described above, where index / state data is written from one end of the block (e.g., from the top of the block downwards), while vertex data is written from the other end of the block (e.g., from the end of the block upwards).

[0079] When a block is full, another block of storage space from the free storage pool can be allocated to that region, and a suitable pointer from the end of the first block to the new block can be generated, etc., to store the region's graph data. The data structure for a specific region can therefore include a linked set of storage blocks.

[0080] In this context, each storage block constituting the data structure for the rendering output region actually stores its own primitive set for the rendering output region, and specifically, in the implementation, for a given subset of primitives within the total primitive set stored in the data structure for the rendering output region, primitive data including indications of geometric data and associated state data is stored. In the implementation, each storage block itself includes an "independent" dataset that can be processed independently of other storage blocks in the data structure for the rendering output region (and thus has its own independent lifecycle).

[0081] Therefore, for example, if the geometric data includes a set of vertex indexes that identify the vertices of the primitives to be used in the rendering output region in question, then in the implementation, the vertices to be indicated in the data structure for the rendering output region in question are indexed not only in the vertex set of the rendering output region in question but also in the vertex sets of the individual memory blocks. However, this is not necessary as long as the data structure for a specific region as a whole has its own independent lifecycle.

[0082] In this implementation, allocating storage space within the storage pool to primitive data (for rendering output regions) is performed by the following steps: first, allocating a storage space block to a region, then allocating the space within that block to individual primitives that are determined to fall into that region (and therefore the primitives that the region should render), until the block is full (at this point, if there is still space in the storage pool, another block is allocated, and then the primitive data is gradually filled, and so on, until there is no more space in the storage pool).

[0083] Therefore, in this implementation, the storage pool includes multiple storage blocks, and the step of generating a data structure for a region includes: allocating a first storage block for the region and adding the region's metadata to the first storage block until the first storage block is full; and when the first storage block is full, allocating a second storage block for the region and linking the first and second storage blocks, such that the data structure includes a set of linked storage blocks. In this implementation, if the second storage block becomes full / when the second storage block becomes full, this step is repeated, wherein a third storage block is then allocated and linked to the second storage block, and so on.

[0084] Accordingly, the graph data storage circuit is configured to generate a region-specific data structure by the following steps: allocating a first storage block for the region and adding the region's graph data to the first storage block until the first storage block is full; and when the first storage block is full, allocating a second storage block for the region and linking the first storage block and the second storage block, such that the data structure includes a set of linked storage blocks.

[0085] In this implementation, the blocks from the storage pool are of the same size and are configured to always be an integer number of cache lines (e.g., an integer number of 64-byte cache lines). This means that the beginning of each new block is cache-line aligned. This arrangement can, for example, facilitate more efficient memory access by enabling the use of full cache lines for graph data stored for each region.

[0086] Therefore, the storage space can be dynamically partitioned into a list of unallocated "free" storage blocks and multiple lists of "active" storage blocks already allocated to different regions. As blocks are allocated, they are then removed from the free list and added to the active list of the associated region. Accordingly, after data in an active block has been used, the data can then be discarded, and the block can be made available for reallocation and moved back to the free list.

[0087] For example, the applicant has recognized that while in some cases the available storage space may be large enough to store all the metadata to be generated for the rendering output (so that all the metadata can be written sequentially into various data structures and then passed to the next level of the graphics processor (e.g., rasterization / rendering as needed) only after all the data has been processed), in other cases there may be only a fixed amount of storage available for the data structures of different rendering output areas (and this is the case in the implementation), so the fixed amount of storage can therefore become full as new data is added and storage space is exhausted.

[0088] If sufficient storage space is available, the techniques described in this article can be used to perform fully “deferred” rendering processes.

[0089] For example, this might be the case when map data is stored in a portion of main (system) memory (e.g., DRAM). In this case, the storage space can grow over time as additional storage is needed and as more storage is required. Therefore, in some implementations, it is possible to continuously write map data into such a data structure in memory until all primitives have been processed.

[0090] However, in other cases, available memory can become full as new data is added and storage space is exhausted. That is, in some implementations, the amount of storage space available for allocating to graph data is less than the amount (intended) needed to store all graph data that will be generated for the entire rendering output unit being processed.

[0091] For example, this might be the case where the memory includes a dedicated fixed-footprint portion of SRAM, or where you want to store graphics data more locally to the graphics processor in a suitable local caching system.

[0092] In fact, the advantage of the technique described in this article is that, because storage space can be allocated "on demand" for the region when determining the primitives of the region to be rendered, and storage space can be allocated for the region in the implementation, for example, less storage space can be reserved for storing primitive data, while in a traditional tile-based layout, the primitive data of the entire rendered output must be stored before any data in such data can be used.

[0093] For example, in modern tile-based graphics processing systems, primitive (geometric) data is becoming increasingly large, making it impossible to efficiently cache locally on the graphics processor. In contrast, in the technique described in this paper, storage space can be dynamically allocated and then reallocated as data structures run out of space, freeing up their associated storage for new data. This allows for more efficient local caching of primitive data using a relatively small amount of storage while maintaining throughput.

[0094] In other words, the techniques described in this article can help reduce the amount of "in-flight" data that needs to be stored in storage at any given time. This, in turn, can facilitate more efficient use of available storage space and / or power or performance improvements.

[0095] Therefore, the techniques described herein can be advantageously implemented using a range of different (size) memory systems, and can be optimized in various ways for power and performance in each case. Thus, the benefit of the techniques described herein is that they provide a highly scalable approach that can be used in conjunction with a range of memory types, such as DRAM, SRAM, cache, etc.

[0096] Therefore, when new metadata for a primitive (or a set of primitives) associated with a specific region needs to be written to memory, in this implementation, it is first determined whether storage space (data structure) has already been allocated for that region. If storage space has already been allocated for that region, i.e., such that a data structure for that region already exists in memory, then the metadata can be added to the appropriate data structure in the allocated storage space for that region. In this implementation, the data structure includes multiple storage blocks. When the current storage block is full, a new free storage block can then be allocated and linked to the data structure.

[0097] On the other hand, if storage space has not yet been allocated for the region (and a data structure does not yet exist), storage space can be allocated for the region, and a new data structure for the region can be generated. Then, the geometric (and status (indicator)) data of the primitives can be added to this data structure. In this implementation, this is done by allocating free blocks of storage space for the region in question.

[0098] Therefore, in an implementation, the step of storing map data in a corresponding data structure for a region includes: determining (e.g., via the map data storage circuitry of the graphics processor) whether a data structure for the region already exists in memory, and if a data structure for the region already exists in memory, adding the map data to the existing data structure; and if no data structure for the region exists, the method includes the step of generating a new data structure for the region.

[0099] Accordingly, the image data storage circuit can be configured to, when storing image data in the corresponding data structure for a region: determine whether a data structure for that region already exists in the memory, and if a data structure for that region already exists in the memory, add the image data to the existing data structure; and if no data structure for that region exists, configure the image data storage circuit to generate a new data structure for that region.

[0100] It should be recognized that in any of these situations, new storage blocks will need to be allocated periodically to store graph data (whether to expand the capacity of an existing region data structure or to start a new region data structure). Thus, as data structures are generated and stored, the available storage pool will gradually be exhausted (e.g., as storage blocks are allocated and moved from the "free" list to the "active" list).

[0101] The applicant has recognized that when it is determined that the available storage pool is becoming full (or nearly full), it may be desirable to "flush out" at least some of the existing data structures in memory. For example, when new graph data (for a new region or a region where a data structure already exists in memory) is to be written to memory, but the storage space is full (or nearly full), it may be desirable to begin using (and flush out) some of the data currently stored in memory, for example, to allow for continuous throughput of graph data.

[0102] That is, when it is determined that there is no available memory or less than the available threshold amount of memory, some active blocks in the active blocks can (and in the implementation) be flushed from the memory used by the graphics processor and then discarded to free up storage space for new data. This can be done, for example, when it is determined that the available storage space is less than a (e.g., a predetermined) threshold (e.g., less than the threshold number of free storage blocks).

[0103] The technique described in this article facilitates this operation because the map data is stored on a per-region basis, allowing the data in one or more regions to be selectively (and independently) cleared, ensuring that the data is usable and then discarded to free up storage space without affecting any subsequent operations.

[0104] Therefore, in one implementation, when new image data is to be written to memory, but the memory is full (or more often, nearly full), one or more of these regions are selected for rendering, and then the data in the associated data structure for the selected region in memory is processed (used), so that the associated data structure for the selected region in memory can then be cleared from memory (discarding the stored data).

[0105] Therefore, in an implementation, the method further includes the steps of: tracking available storage space and determining whether it is less than an available storage space threshold. When it is determined that it is less than the available storage space threshold, the method may include the steps of: selecting one or more regions to be rendered, reading data stored in a data structure for the selected regions, and then discarding the data structure for the selected regions to allow new data to be written to the storage space.

[0106] Specifically, in one implementation, when attempting to allocate a new storage block (either allocating it to an existing data structure for a region or creating a new data structure), the implementation determines whether the available storage space threshold is less than a certain threshold, and if it is less than the available storage space threshold: one or more regions are selected from memory for clearing, the data structures for the one or more regions already existing in the memory; data for use by the graphics processor is read from the data structure for the selected region; and then the data structure for the selected region is discarded from the memory to free up storage space.

[0107] Accordingly, when it is determined that new metadata for a primitive (or a set of primitives) should be stored in one or more data structures in memory, the metadata storage circuitry is configured to: determine whether the available space is less than a memory available space threshold, and when the available space is less than the memory available space threshold, the readout circuitry is configured to: select one or more regions from memory for clearing, the data structures for which the one or more regions already exist in the memory; read data for use by the graphics processor from the data structures for the selected regions; and then discard the data structures for the selected regions from the memory to free up storage space.

[0108] The regions (blocks) to be cleared (used) can be selected based on any suitable criteria. For example, in one implementation, the region(s)(s) of the largest data structure are determined (e.g., containing the largest number of storage blocks and / or the largest amount of graph data), and that data structure is then selected for clearing (use). Therefore, in one implementation, one or more regions(s) to be cleared are selected based on which region(s)(s) of memory currently contain the largest amount of graph data. Thus, the readout circuitry can be configured to select the regions(s) to be cleared based on which region(s) of memory currently contain the largest amount of graph data. However, the determination can be performed in a more complex or less complex manner as needed.

[0109] For example, this can be determined based on which areas have already been at least partially rendered. For instance, the system can track how many primitives have been processed for different areas and take this into account when selecting which areas(s) to clear.

[0110] However, other arrangements are certainly possible. For example, the system can select the areas to be cleared based on any suitable factors such as lifecycle or strategy.

[0111] For example, for system maintenance purposes and / or at the end of a frame, it may also be desirable to be able to explicitly clear (all) data structures from memory, and this can be done in the implementation.

[0112] In one implementation, data from a data structure for the selected region is read from memory and then used to rasterize / render the primitives of that region. For example, the data can be read and then passed to the rasterization circuitry of the graphics processor, where, in this implementation, the primitives are rasterized (optionally after any primitive setup has been performed) and then rendered for output if necessary.

[0113] Therefore, the readout circuitry of the graphics processor can be configured to read data for use by the graphics processor from a data structure for a selected region by the following steps: passing geometric data and state data to the graphics processor to render primitives for which the state data and the geometric data are stored in the data structure for the selected region.

[0114] Therefore, the graphics processor can begin to render the selected rendering output region using the data stored in the associated data structure for the selected rendering output region.

[0115] It should be recognized that, since only the primitives currently storing data for this region are being cleared at this point (potentially fewer than all the primitives that will eventually need to be rendered in the region), only a portion of the region can be rendered at this stage. However, there may still be other primitives in the region that need to be rendered, which have not yet been processed. In this case, when processing such primitives, a new data structure for the region can be generated in the manner described herein, and then used / cleared, etc., until all primitives have been processed.

[0116] Therefore, in an implementation, the method may include the following steps: selecting a first region to be cleared; rendering the one or more primitives using geometric and state data stored in a corresponding data structure for the first region; and (after the data in the data structure has been used) discarding the data structure for the first region. When it is determined that subsequent primitives of the first region should be rendered, the method then includes the following steps: generating a new data structure for the first region in memory, etc.

[0117] Accordingly, the readout circuitry can be configured to select a first region to be cleared, and then read the metadata stored in the corresponding data structure for the first region, so that the metadata can then be used to render one or more primitives of the first region. Once the data has been used, the data structure can be discarded. When it is determined that subsequent primitives of the first region should be rendered, the metadata storage circuitry is then configured to generate a new data structure for the first region in memory.

[0118] Of course, in general, this can be performed on any region or multiple regions. Therefore, at any given time, multiple data structures can exist for the corresponding multiple regions, and these data structures can be cleared and new data structures can be generated as needed.

[0119] However, other arrangements are certainly possible. For example, the cleared data does not need to be directly (immediately) used by the graphics processor for operations such as rasterization of primitives, and at least some of the data can be transferred to and temporarily stored in other storage units such as intermediate buffers, or in different parts of (e.g., DRAM) memory, or similar storage units. In this case, by moving the data to other storage units, the associated memory blocks can be freed up. Then, for example, the cleared data can be rendered from the other storage units at an appropriate time.

[0120] As discussed above, the advantage of the technique described herein lies in storing graph data separately for each region, allowing the data to be used independently. Therefore, in an implementation where it is determined that no memory is available or less than a threshold amount of available memory, one or more data structures (for the corresponding regions of the rendered output) are read from memory and passed to the next level of the graphics processor, for example, for rasterization and rendering. This helps ensure continuous throughput of graph data and more efficient use of available storage space.

[0121] Furthermore, since the data is stored on a per-region basis, it can be ensured that once the data has been used, it is no longer needed (for example, for another region, since the data has already been stored separately in the appropriate data structure for that other region), and thus the data can be discarded at that time.

[0122] Therefore, as new graph data is generated, and as new graph data is generated, storage space can be dynamically reallocated over time. For example, in the case of a fixed region of memory partitioned into multiple fixed-size blocks, the block can be allocated, used, and reallocated accordingly as the free list is consumed to maintain throughput while still allowing all data to be used without affecting any other operations.

[0123] This arrangement provides more efficient use of memory that can be easily implemented (and scaled) based on the amount of available storage space.

[0124] It is reasonable to believe that this mechanism of selectively clearing data structures from memory is novel and has its own advantages.

[0125] Another embodiment of the technology described herein includes a method for processing graphic primitives using a graphics processing system, the graphics processing system including a memory and a graphics processor communicating with the memory, wherein the graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated graphic data, the associated graphic data including geometric data representing the primitive and state data indicating operations to be performed when rasterizing and / or rendering the primitive, wherein the rendered output is divided into a plurality of regions for rendering, each region including a corresponding area of ​​the rendered output, and wherein the indication of the associated state data to be used for rasterizing and / or rendering the primitive and the geometric data are stored in the memory in corresponding different data structures for different regions, the method comprising the following steps:

[0126] When new data for a set of one or more primitives is to be stored in memory, it is determined whether the available space in the memory is less than a threshold of available space for that data, and if it is less than the threshold of available space in the memory, the following operations are performed:

[0127] Select one or more regions from memory for clearing, the data structures of which already exist in the memory; read data for use by the graphics processor from the data structures for the selected regions; then discard the data structures for the selected regions from the memory to free up storage space.

[0128] Another embodiment of the technology described herein includes a graphics processing system comprising a memory system and a graphics processor, wherein the graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated primitive data, the associated primitive data including geometric data representing the primitive and state data indicating operations to be performed when rasterizing and / or rendering the primitive, wherein the rendered output is divided into a plurality of regions for rendering, each region comprising a corresponding area of ​​the rendered output, and wherein the indications of the associated state data to be used for rasterizing and / or rendering the primitives and the geometric data are stored in the memory in corresponding different data structures for different regions, the graphics processor comprising:

[0129] The image data storage circuit is configured to:

[0130] Track available storage space to generate the desired output in the memory; and

[0131] A readout circuit is configured to, when the image data storage circuit determines that the available storage space is less than the available space threshold of the memory:

[0132] Select one or more regions from memory for clearing, the data structures of which already exist in the memory; read data for use by the graphics processor from the data structures for the selected regions; then discard the data structures for the selected regions from the memory to free up storage space.

[0133] Another embodiment of the technology described herein includes a method for processing graphic primitives using a graphics processing system, the graphics processing system including a memory and a graphics processor communicating with the memory, wherein the graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated graphic data, the associated graphic data including geometric data representing the primitive and state data indicating operations to be performed when rasterizing and / or rendering the primitive, the method comprising the following steps:

[0134] The rendering output is divided into multiple regions for rendering, each region comprising a corresponding area of ​​the rendering output; and

[0135] For a collection of one or more primitives to be rendered:

[0136] Obtain the associated geometric data used to render the set of one or more primitives;

[0137] Determine which regions among the plurality of regions of the rendered output should render the set of one or more primitives; and

[0138] For each region in the rendering output that is determined to be rendered of the set of one or more primitives, the geometric data of the one or more primitives, together with an indication of the associated state data to be used for rasterizing and / or rendering the set of one or more primitives, are stored in a corresponding data structure in memory for that region, such that the indication of the associated state data and the geometric data for the set of one or more primitives to be rendered are stored in corresponding different data structures for the different regions of the rendering output that are determined to be rendered of the set of one or more primitives.

[0139] The method further includes the following steps:

[0140] When new data for a set of one or more primitives is to be stored in memory, it is determined whether it is less than a threshold of available space in the memory for that data, and if it is less than the threshold of available space in the memory:

[0141] Select one or more regions from memory for clearing, the data structures of which already exist in the memory; read data for use by the graphics processor from the data structures for the selected regions; then discard the data structures for the selected regions from the memory to free up storage space.

[0142] Another embodiment of the technology described herein includes a graphics processing system comprising a memory and a graphics processor communicating with the memory, wherein the graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated primitive data, the associated primitive data including geometric data representing the primitive and state data indicating operations to be performed when rasterizing and / or rendering the primitive, the graphics processor comprising:

[0143] A primitive classification circuit, wherein the primitive classification circuit is configured to:

[0144] For a set of one or more primitives to be processed:

[0145] Obtain the associated geometric data used to render the set of one or more primitives;

[0146] Determine which regions among the multiple regions into which the rendering output has been divided for rendering purposes should render the set of one or more primitives, each region including the corresponding area of ​​the rendering output;

[0147] The image data storage circuit is configured to:

[0148] For each region in the rendering output that the primitive classification circuit determines should be rendered of a set of one or more primitives, the geometric data of the one or more primitives, together with an indication of associated state data to be used for rasterizing and / or rendering the set of one or more primitives, is stored in the memory in a corresponding data structure for that region. This is such that the indication of associated state data and the geometric data for the set of one or more primitives to be rendered are stored in corresponding different data structures for each different region of the rendering output that is determined to be rendered of the one or more primitives.

[0149] Track available storage space to determine if it falls below a threshold; and

[0150] A readout circuit is configured to, when the image data storage circuit determines that the available storage space is less than the available space threshold of the memory:

[0151] Select one or more regions from memory for clearing, the data structures of which already exist in the memory; read data for use by the graphics processor from the data structures for the selected regions; then discard the data structures for the selected regions from the memory to free up storage space.

[0152] Therefore, it should be recognized that the technique described in this paper offers several advantages compared to more traditional tile-based methods.

[0153] In some implementations, each received primitive to be processed is processed in the same manner as described above, i.e., by determining which rendering output regions of the primitive should be rendered, and then storing the primitive data in the corresponding data structure for each region where the primitive has been determined to be rendered (such that if the primitive falls into multiple different regions, a copy of the primitive's primitive data is stored in the corresponding data structure for each region).

[0154] However, it is also envisioned that fewer than all primitives can be processed in this way. For example, in some cases, it may be desirable to process some of these primitives differently and store them in separate data structures, for example, allocated to multiple regions of the rendered output or the entire rendered output. Therefore, in some embodiments, when a new primitive to be processed is received, the method may further include the step of: first checking whether the primitive should be processed in the manner described above (and if so, proceeding to do so). In this regard, various options will be possible.

[0155] The techniques described in this article can be used by graphics processors to generate all forms of output, such as frames for display, rendering to texture output, etc.

[0156] In one implementation, the graphics processor executes a graphics processing pipeline, which may include any suitable and desired processing stages that a graphics processing pipeline can typically include.

[0157] In some embodiments, the graphics processor includes one or more memory and / or memory devices for storing data described herein (such as primitive (geometric and state) data) and / or storing software for performing the processing described herein, and / or communicating with said one or more memory and / or memory devices. The graphics processing pipeline may also communicate with a host microprocessor and / or with a display for displaying images based on data generated by the graphics processor.

[0158] In implementation, the various functions of the technology described herein are performed on a single graphics processing platform that generates and outputs rendered fragment data (which is written, for example, to a frame buffer for a display device).

[0159] The techniques described herein can be implemented in any suitable system, such as a system based on a properly configured microprocessor. In implementation, the techniques described herein are implemented in a computer and / or microprocessor-based system.

[0160] The various functions of the technology described herein can be performed in any desired and suitable manner. For example, the functions of the technology described herein can be implemented in hardware or software as desired. Thus, for example, the various functional components, stages, and pipelines of the technology described herein may include suitable one or more processors, one or more controllers, functional units, circuits / circuit systems, processing logic, microprocessor layouts, etc., operable to perform various functions, such as dedicated hardware components or processing circuits / circuit systems that can be programmed to operate in a desired manner, and / or programmable hardware components or processing circuits / circuit systems.

[0161] It should also be noted that, as those skilled in the art will recognize, the various functions of the techniques described herein can be copied and / or executed in parallel on a given processor. Similarly, various processing levels can share processing circuitry / circuit systems, etc., if desired.

[0162] Therefore, the technology described herein extends to graphics processors and graphics processing platforms, including devices or devices operating according to any or more embodiments of the technology described herein. For the purpose of any hardware necessary to perform the specific functions described above, such a graphics processor may otherwise include any or all of the common functional units included in such a graphics processor.

[0163] Those skilled in the art will also recognize that all the embodiments of the technology described herein may, where appropriate, include (and do include) any one or more or all of the optional features described herein.

[0164] The methods described herein can be implemented at least in part using software (e.g., computer programs). Thus, it can be seen that, when viewed from other embodiments, the techniques described herein include: computer software, which, when installed on a data processor, is specifically adapted to perform the methods described herein; a computer program component including computer software code for performing the methods described herein when the program component is run on the data processor; and a computer program including code means adapted to perform all steps of the methods described herein, or all steps of one of the methods, when the program is run on a data processing system. The data processor may be a microprocessor system, a programmable FPGA (Field-Programmable Gate Array), etc.

[0165] The techniques described herein are also extended to computer software carriers that, when used to operate a graphics processor, renderer, or microprocessor system including a data processor, cause the steps of the methods described herein to be performed in conjunction with said data processor, said processor, renderer, or system. Such computer software carriers can be physical storage media, such as ROM chips, RAM, flash memory, CD-ROMs, or disks, or they can be signals, such as electronic signals transmitted via wires, optical signals such as satellite signals, or radio signals.

[0166] It should also be recognized that not all steps of the methods described herein require execution by computer software, and thus, according to another broad implementation, the techniques described herein include computer software for performing at least one step of the methods set forth herein and such software installed on a computer software carrier.

[0167] Therefore, the techniques described herein can be suitably implemented as computer program products for use with computer systems. Such implementations may include a series of computer-readable instructions fixed on a tangible medium such as a non-transitory computer-readable medium (e.g., floppy disk, CD-ROM, ROM, RAM, flash memory, or hard disk). Such implementations may also include a series of computer-readable instructions that can be invisibly transmitted to a computer system via a modem or other interface device through a tangible medium (including, but not limited to, optical or analog communication lines) or using wireless technologies (including, but not limited to, microwave, infrared, or other transmission technologies). This series of computer-readable instructions implements all or part of the functions previously described herein.

[0168] Those skilled in the art will recognize that such computer-readable instructions can be written in many programming languages ​​for use with many computer architectures or operating systems. Furthermore, such instructions can be stored using any current or future memory technology (including, but not limited to, semiconductor, magnetic, or optical memory technologies), or transmitted using any current or future communication technology (including, but not limited to, optical, infrared, or microwave communication technologies). It is envisioned that such computer program products can be distributed as removable media (e.g., shrink-wrapped software) with accompanying printed or electronic documentation, pre-installed with computer systems (e.g., on system ROM or a fixed disk), or distributed from servers or electronic bulletin boards via networks (e.g., the Internet or the World Wide Web). Attached Figure Description

[0169] Now, various embodiments will be described by way of example only and with reference to the accompanying drawings, in which:

[0170] Figure 1 , Figure 2 as well as Figure 3 The operation of a traditional tile-based graphics processing system is illustrated schematically.

[0171] Figure 4 An example of how graph data can be organized according to an implementation method is shown;

[0172] Figure 5 The illustration schematically shows how graph data can be used when generating render output according to an embodiment;

[0173] Figure 6 An example of a data structure that can be generated according to an implementation method is illustrated schematically;

[0174] Figure 7 Another example of a data structure that can be generated according to the implementation method is illustrated schematically;

[0175] Figure 8 The allocation of storage space according to the implementation method is illustrated schematically;

[0176] Figure 9 A graphics processing pipeline that can be executed by a graphics processor according to an embodiment is schematically shown;

[0177] Figure 10 This is a flowchart showing in more detail how the image data is binned according to the implementation method;

[0178] Figure 11A and Figure 11B The illustration schematically shows how data to be written is selected from memory according to various implementations; and

[0179] Figure 12 This is a flowchart that shows in more detail how the data is used according to the implementation method.

[0180] In the accompanying drawings, the same reference numerals are used for the same elements where appropriate. Detailed Implementation

[0181] The techniques described herein generally relate to methods for processing graphic primitives, wherein a rendering output is divided into multiple smaller regions (areas) for rendering. In this embodiment, primitive data is stored and organized on a per-region basis. When primitives are received for processing, it is determined which(s) of the multiple regions into which the rendering output has been divided should be rendered. Then, the primitive's primitive data (e.g., geometric data representing the primitive and any state data representing the operations to be performed when rendering the primitive) is stored in corresponding different data structures for each different region of the rendering output, as will be further explained below.

[0182] However, for comparison, firstly, refer to Figure 1 , Figure 2 as well as Figure 3 This describes a more traditional tile-based rendering system. In a tile-based rendering system, the rendering output is divided into multiple tiles for rendering. The tiles are then rendered individually to generate the final rendering output. To do this, primitives must first be categorized based on which tiles should be rendered.

[0183] Thus, primitive vertices are obtained, and common geometric processing (e.g., vertex shading) is performed on all primitives to generate post-transformed geometric data (e.g., transformed vertices).

[0184] To determine which tiles should render which primitives, the processing needs to be performed pre-processed for all primitives to be processed. For example... Figure 1As shown, the result of this process is that all the geometric data generated from the geometry process 10 is then stored in a first data structure 16 in memory 12. The primitive list is stored in a separate data structure 18, and any pixel state data is stored in another data structure 14.

[0185] like Figure 2 As shown, once all geometric processing for the rendered output has been completed, the data is then read from memory and subjected to another graphics processing step 20 to generate the rendered output, which can be written to the frame buffer 22, for example. Other arrangements are, of course, also possible.

[0186] Specifically, graphics processing 20 is performed by using a primitive list 18 to determine which primitives should be rendered, and then using the stored geometric data 16 and associated pixel state information 14 to render these primitives appropriately. Figure 3 The rendering process is illustrated in the diagram. Figure 3 This illustrates hierarchical binning, where map data is binned at multiple different levels (tile size), although this is not mandatory, and binning can often be performed in more or less complex ways as needed.

[0187] In the traditional tile-based graphics processing operation described above, all geometric processing for the rendering output is performed once in the initial pass. Then, the data is used in the second pass, during which the rendering output is generated by rasterizing / rendering the primitive using its associated geometry.

[0188] For modern graphics processors, the rendered metadata can be relatively large, making it difficult to efficiently cache it in the local memory associated with the graphics processor. Therefore, the metadata is typically written back to main (system) memory, or at least to a relatively large cache in the memory hierarchy.

[0189] This implementation provides more efficient use of memory. Specifically, instead of storing all state and geometric data of the rendered output together with a separate binned data structure (e.g., a primitive list) describing the spatial distribution of primitives, the rendered output (e.g., a frame buffer) is divided into multiple smaller regions, and the state and geometric data are stored in separate data structures for each rendered output region.

[0190] Therefore, as Figure 4As shown, each region 40 of the rendered output (e.g., a framebuffer) is associated with a corresponding data structure 42 in memory, which contains (only) the pixel state and geometric data of that region. This means that each region can be processed independently using the data stored in its corresponding data structure 42, such as... Figure 5 As shown.

[0191] Figure 6 An example of a data structure 60 for a rendering output region according to this embodiment is shown. The data structure 60 includes an ordered list of state data and geometric data of any primitives for which it has been determined that rendering should be performed for the rendering output region associated with the data structure 60.

[0192] Specifically, state data, along with primitive vertex index references, is stored in a first region (i.e., the first available storage location) of data structure 60, which grows downwards from the top of the data structure. Thus, the complete state set 62 of the first primitive (or set of primitives) is stored, followed by the appropriate vertex index references 64 for that primitive. Then, the state set 63 of the next primitive is added, followed by the appropriate vertex index references 64, and so on. Vertex data 66 itself (e.g., transformed vertex positions, etc.) is stored in a second region of data structure 60, which grows upwards from the bottom of the data structure.

[0193] In this embodiment, the storage space can be partitioned into multiple memory storage "blocks" (or "chunks"). Therefore, when generating the data structure for a region, storage blocks can be allocated from the available storage block pool accordingly. As new graph data for that region is processed, the storage block may become full.

[0194] therefore, Figure 6 The data structure 60 shown can represent a single storage block. As the storage block becomes full, a second storage block can be allocated for the rendering output area, and the links included in the first storage block point to the next storage block, and so on. Figure 7 As shown. Data structures for a specific region can therefore include a list of linked storage blocks.

[0195] Figure 8 The allocation of storage blocks according to this embodiment is illustrated. In particular, storage space 12 includes a storage block pool 120, where each storage block is initially available for data allocation. Initially, all storage blocks are “free” to be allocated to data. However, as storage blocks are allocated to regions, they then become “active” and move from the “free list” 122 to the “active list” 124 of that region.

[0196] Storage space can have a fixed size (fixed occupancy). However, it is also envisioned that storage space can grow over time. For example, depending on the implementation, more storage space may be available at any given time as needed (e.g., allowing for fully deferred rendering).

[0197] Now, referring to Figure 9 This describes the overall operation of the graphics processing system according to this embodiment.

[0198] Figure 9 An example of a graphics processing pipeline that can execute on a graphics processor communicating with a memory system is shown. This memory system may be a cache, or may include a dedicated portion of SRAM or DRAM.

[0199] The first stage of the graphics processing pipeline includes a command processor 80, which receives and processes commands, such as those from an application requesting graphics processing operations. These commands can specify the rendered output, for example, by referencing primitives that need to be rendered.

[0200] Therefore, in the next level, the vertices of the primitives are obtained and then processed accordingly, for example by coloring the vertices and / or primitives in a common manner.

[0201] After the vertex and primitive shader level 81, the initial steps 82 of primitive assembly and culling can then be performed based on the primitive data.

[0202] Then, primitives are classified based on which regions should be rendered, and the primitive data is then appropriately written into the corresponding memory data structure.

[0203] Figure 10 The primitive binning 83 according to this embodiment is illustrated in more detail. As shown, for each primitive being processed (passed through the graphics processing pipeline), it is first determined which region(s) of the frame buffer should be rendered.

[0204] For example, this can be done by intersecting the primitives with the framebuffer and determining any regions at least partially covered by the primitives that should be rendered (step 90). The primitive data should then be written into the appropriate data structures for the regions where the primitives have been determined to be rendered.

[0205] To do this, attempt to allocate storage space for the map data (step 91). If there is sufficient available memory, the map data can be appropriately compressed (step 92), the status (control) data of the map element can be appropriately encoded (step 93), and then the map element can be written into an existing data structure for the corresponding region (if such an existing data structure exists) or into a new data structure generated for the region (if such a data structure does not yet exist) (step 94).

[0206] On the other hand, when it is determined that there is no available storage space, or at least the available storage space is less than the available storage space threshold, some data in the currently stored data is selected to be cleared from the memory.

[0207] Specifically, one or more frame buffers are cleared, and then bin reader 85 is started to read data from those areas (step 95).

[0208] Figure 11A and Figure 11B This illustrates two possible methods for selecting which areas should be cleared. Figure 11A In the method shown, “n” regions with the largest number of storage blocks are selected for clearing (step 100), and then “n” corresponding clear signals are generated to clear the storage blocks associated with those regions from the memory and release them for reallocation to new data (step 102).

[0209] exist Figure 11B In the process, referring to the rendering output 103 (e.g., frame buffer buffer) to further determine which regions (if any) are currently being processed or have been previously processed, and assigning priority to regions that are in the process of being at least partially rendered or have been at least partially rendered (step 101).

[0210] Other arrangements are also possible. For example, another approach is to select “n” regions containing the maximum amount of metadata that can be tracked, for example, through a suitable “subject counter”.

[0211] Once the data has been used (read), the corresponding storage block can be released for reuse to free up storage space, which can then be allocated to new graph data (step 95).

[0212] The read data is then passed to the appropriate primitive setting / rasterization circuit 86, and then, if appropriate, to the pixel shader 87 before being blended and written to the frame buffer by the appropriate blending and pixel write-out stage 88.

[0213] This is Figure 12 More detailed examples are provided below. For instance... Figure 12As shown, the data read from memory 12 is processed to extract geometric data (step 85-1), then the pixel state is extracted (step 85-2), and then the data is rasterized and rendered as described above.

[0214] Therefore, the area can be cleared and the associated data can be used independently (e.g., such as...). Figure 5 (As shown).

[0215] The foregoing detailed description has been presented for purposes of illustration and description. It is not intended to be exclusive or to limit the technology described herein to the precise forms disclosed. Many modifications and variations are possible in light of the foregoing teachings. The described embodiments were chosen to best illustrate the principles of the technology described herein and its practical application, thereby enabling others skilled in the art to best utilize the technology described herein in various embodiments and with various modifications as suited to the intended particular use. The scope of protection is intended to be defined by the appended claims.

Claims

1. A method for processing graphic primitives using a graphics processing system, the graphics processing system comprising a memory and a graphics processor communicating with the memory, wherein, The graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated primitive data, the associated primitive data including geometric data representing the primitives and state data indicating operations to be performed when rasterizing and / or rendering the primitives, the method comprising the following steps: The rendering output is divided into multiple regions for rendering, each region comprising a corresponding area of ​​the rendering output; and For a received set of one or more primitives to be processed, perform the following operations: Obtain the associated geometric data used to render the set of one or more primitives; Determine which regions among the plurality of regions of the rendered output should render the set of one or more primitives; and For each region in the rendering output that is determined to be rendered from the set of one or more primitives, the geometric data of the one or more primitives, along with an indication of the associated state data to be used for rasterizing and / or rendering the set of one or more primitives, are stored in memory in a corresponding data structure for that region. This causes the indication of the associated state data for the set of one or more primitives to be rendered, as well as the geometric data, to be stored in corresponding different data structures for different regions of the set of one or more primitives that are determined to be rendered in the rendering output.

2. The method according to claim 1, wherein, The step of storing the geometric data and state data in a corresponding data structure for the region includes: determining whether a data structure for the region already exists in the memory, and if a data structure for the region already exists in the memory, adding the graphic data to the existing data structure; if no data structure for the region exists, the method includes the step of generating a new data structure for the region.

3. The method according to claim 2, wherein the method comprises the following steps: When it is determined that new geometric and state data for a set of one or more primitives should be stored in one or more data structures in memory, it is determined whether the available space is less than the available space threshold of the memory, and when the available space is less than the available space threshold of the memory, the following operations are performed: Select one or more regions from memory for clearing, where the data structure for the selected regions already exists in the memory; read data from the data structure for the selected regions for use by the graphics processor; Then, the data structure for the selected region is discarded from the memory to free up storage space.

4. A method for processing graphic primitives using a graphics processing system, the graphics processing system comprising a memory and a graphics processor communicating with the memory, wherein, The graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated primitive data, the associated primitive data including geometric data representing the primitives and state data indicating operations to be performed when rasterizing and / or rendering the primitives, wherein the rendered output is divided into a plurality of regions for rendering, each region including a corresponding area of ​​the rendered output, and wherein the indication of the state data to be used for rendering the primitives and the geometric data are stored in a memory in corresponding different data structures for different regions, the method comprising the following steps: When new data for a set of one or more primitives is to be stored in memory, it is determined whether the available space is less than a threshold of available space in the memory for that data, and if the available space is less than the threshold of available space in the memory, the following operations are performed: Select one or more regions from memory for clearing, the data structures of which already exist in the memory; read data for use by the graphics processor from the data structures for the selected regions; then discard the data structures for the selected regions from the memory to free up storage space.

5. The method according to claim 3 or 4, wherein, The region to be cleared is selected based on which region in the memory currently stores the largest amount of map data.

6. The method according to claim 3 or 4, wherein, The step of reading data for use by the graphics processor from a data structure for a selected region includes: passing the indication of the state data and the geometric data to the graphics processor to render primitives in which the indication of the state data and the geometric data are stored in the data structure for the selected region.

7. The method according to claim 3 or 4, wherein the method comprises the following steps: Select the first area to clear; The geometric data and associated state data stored in the corresponding data structure for the first region for one or more primitives are used to render the one or more primitives; And discard the data structure for the first region. The method further includes the following steps: when it is determined that subsequent primitives of the first region should be rendered, generating a new data structure for the first region in the storage.

8. The method according to any one of claims 1 to 4, wherein, The memory includes multiple storage blocks, and the step of generating a data structure for a region includes: allocating a first storage block for the region and adding the region's metadata to the first storage block until the first storage block is full; and when the first storage block is full, allocating a second storage block for the region and linking the first storage block and the second storage block, such that the data structure includes a set of linked storage blocks.

9. A method for processing graphic primitives using a graphics processing system, the graphics processing system comprising a memory and a graphics processor communicating with the memory, wherein, The graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated primitive data, the associated primitive data including geometric data representing the primitives and state data indicating operations to be performed when rasterizing and / or rendering the primitives, the method comprising the following steps: The rendering output is divided into multiple regions for rendering, each region comprising a corresponding area of ​​the rendering output; and For a received set of one or more primitives to be processed: Obtain the associated geometric data used to render the set of one or more primitives; Determine which regions among the plurality of regions of the rendered output should render the set of one or more primitives; and For each region in the rendering output that is determined to be rendered of the set of one or more primitives, the geometric data of the one or more primitives, together with an indication of the associated state data to be used for rasterizing and / or rendering the set of one or more primitives, are stored in a corresponding data structure in memory for that region, such that the indication of the associated state data for the set of one or more primitives to be rendered and the geometric data are stored in corresponding different data structures for the different regions of the rendering output that are determined to be rendered of the set of one or more primitives. The method further includes the following steps: When new data for a set of one or more primitives is to be stored in memory, it is determined whether the available space is less than a threshold of available space in the memory for that data, and if the available space is less than the threshold of available space in the memory, the following operations are performed: Select one or more regions from memory for clearing, the data structures of which already exist in the memory; read data for use by the graphics processor from the data structures for the selected regions; then discard the data structures for the selected regions from the memory to free up storage space.

10. A graphics processing system, the graphics processing system comprising a memory and a graphics processor communicating with the memory, wherein, The graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the primitives are rendered by the graphics processor using associated primitive data, the associated primitive data including geometric data representing the primitives and state data indicating operations to be performed when rasterizing and / or rendering the primitives, the graphics processor comprising: A primitive classification circuit, wherein the primitive classification circuit is configured to: For a received set of one or more primitives to be processed, perform the following operations: Obtain the associated geometric data used to render the set of one or more primitives; Determine which regions, among multiple regions into which the rendering output has been divided for rendering purposes, should render the set of one or more primitives, each region including a corresponding area of ​​the rendering output; and The image data storage circuit is configured to: For each region in the rendering output that the primitive classification circuit determines should be rendered, the geometric data of the one or more primitives, together with an indication of the associated state data to be used for rasterizing and / or rendering the one or more primitives, are stored in the memory in a corresponding data structure for that region. This allows the indication of associated state data for a set of one or more primitives to be rendered, along with the geometric data, to be stored in corresponding different data structures for different regions of the set of one or more primitives that are determined to be rendered in the rendering output.

11. The graphics processing system according to claim 10, wherein, The image data storage circuit is configured to, when storing the indication of the state data and the geometric data in the corresponding data structure for a region: determine whether a data structure for that region already exists in the memory. Furthermore, if a data structure for the region already exists in the memory, the image data is added to the existing data structure; if no data structure for the region exists, the image data storage circuit is configured to generate a new data structure for the region.

12. The graphics processing system according to claim 11, wherein: When it is determined that new geometric and state data for a set of one or more primitives should be stored in one or more data structures in memory, the primitive data storage circuitry is configured to: Determine whether the available space is less than the available space threshold of the memory, and when the available space is less than the available space threshold of the memory, configure the read circuit to: select one or more regions from the memory for clearing, wherein the data structure of the one or more regions already exists in the memory; Read data from the data structure for the selected region for use by the graphics processor; Then, the data structure for the selected region is discarded from the memory to free up storage space.

13. A graphics processing system, the graphics processing system comprising a memory system and a graphics processor, wherein, The graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated primitive data, the associated primitive data including geometric data representing the primitives and state data indicating operations to be performed when rasterizing and / or rendering the primitives, wherein the rendered output is divided into a plurality of regions for rendering, each region including a corresponding area of ​​the rendered output, and wherein the indication of the state data to be used for rendering the primitives and the geometric data are stored in the memory in corresponding different data structures for different regions, the graphics processor comprising: Map data storage circuit, configured to track available storage space to determine whether the available storage space is less than an available storage space threshold; and A readout circuit, configured to perform the following operation when the image data storage circuit determines that the available storage space is less than the available storage space threshold of the memory: One or more regions are selected from the memory for clearing, the data structures of the one or more regions already existing in the memory; data for use by the graphics processor is read from the data structures for the selected regions; then, the data structures for the selected regions are discarded from the memory to free up storage space.

14. The graphics processing system according to claim 12 or 13, wherein, The readout circuit is configured to select the region to be cleared based on which region in the memory currently stores the largest amount of image data.

15. The graphics processing system according to claim 12 or 13, wherein, The readout circuit is configured to read data for use by the graphics processor from a data structure for a selected region by the following steps: passing the indication of the state data and the geometric data to the graphics processor to render primitives in which the indication of the state data and the geometric data are stored in the data structure for the selected region.

16. The graphics processing system according to claim 12 or 13, wherein, The readout circuit is configured to select a first region to be cleared; Read the indication of the associated state data and the geometric data stored in the corresponding data structure for the first region, enabling the indication of the associated state data and the geometric data to be used for rendering one or more primitives; and discard the data structure for the first region. Furthermore, when it is determined that subsequent primitives of the first region should be rendered, the primitive data storage circuit is configured to generate a new data structure for the first region in the memory.

17. The graphics processing system according to any one of claims 10 to 13, wherein, The memory includes multiple storage blocks, and the image data storage circuit is configured to generate a region-specific data structure by means of the following steps: allocating a first storage block for the region and adding image data of the region to the first storage block until the first storage block is full; and when the first storage block is full, allocating a second storage block for the region and linking the first storage block and the second storage block, such that the data structure includes a set of linked storage blocks.

18. A graphics processing system, the graphics processing system comprising a memory and a graphics processor communicating with the memory, wherein, The graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the primitives are rendered by the graphics processor using associated primitive data, the associated primitive data including geometric data representing the primitives and state data indicating operations to be performed when rasterizing and / or rendering the primitives, the graphics processor comprising: A primitive classification circuit, wherein the primitive classification circuit is configured to: For a received set of one or more primitives to be processed, perform the following operations: Obtain the associated geometric data used to render the set of one or more primitives; Determine which regions among the multiple regions into which the rendering output has been divided for rendering purposes should render the set of one or more primitives, each region including the corresponding area of ​​the rendering output; The image data storage circuit is configured to: For each region in the rendering output that the primitive classification circuit determines should be rendered of a set of one or more primitives, the geometric data of the one or more primitives, together with an indication of associated state data to be used for rasterizing and / or rendering the set of one or more primitives, is stored in the memory in a corresponding data structure for that region, such that the indication of associated state data for the set of one or more primitives to be rendered and the geometric data are stored in corresponding different data structures for the different regions of the rendering output that are determined to be rendered of the set of one or more primitives; and Track available storage space to determine if the available storage space is less than an available storage space threshold; and A readout circuit, configured to perform the following operation when the image data storage circuit determines that the available storage space is less than the available storage space threshold of the memory: One or more regions are selected from the memory for clearing, the data structures of the one or more regions already existing in the memory; data for use by the graphics processor is read from the data structures for the selected regions; then, the data structures for the selected regions are discarded from the memory to free up storage space.

19. A non-transitory computer-readable storage medium storing software code, which, when executed on a data processor, performs a method of processing graphical primitives using a graphics processing system, the graphics processing system including a memory and a graphics processor in communication with the memory, wherein... The graphics processor is configured to generate the rendered output by rendering a plurality of primitives for rendering output, wherein the graphics processor renders the primitives using associated primitive data, the associated primitive data including geometric data representing the primitives and state data indicating operations to be performed when rasterizing and / or rendering the primitives, the method comprising the following steps: The rendering output is divided into multiple regions for rendering, each region comprising a corresponding area of ​​the rendering output; and For a received set of one or more primitives to be processed, perform the following operations: Obtain the associated geometric data used to render the set of one or more primitives; Determine which regions among the plurality of regions of the rendered output should render the set of one or more primitives; and For each region in the rendering output that is determined to be rendered from the set of one or more primitives, the geometric data of the one or more primitives, together with an indication of the associated state data to be used for rasterizing and / or rendering the set of one or more primitives, are stored in memory in a corresponding data structure for that region. This causes the indication of the associated state data for the set of one or more primitives to be rendered, as well as the geometric data, to be stored in corresponding different data structures for different regions of the set of one or more primitives that are determined to be rendered in the rendering output.

Citation Information

Patent Citations

  • Graphics processing

    US20190012829A1

  • Geometry to Tiling Arbiter for Tile-Based Rendering System

    US20190108671A1