Graphics processor, system, device, equipment and method

By optimizing the cache replacement strategy in the graphics processor according to the number of tiles covered by the primitive, the memory bandwidth and delay problems when the primitive covers multiple tiles are solved, and the cache hit rate and storage utilization of primitive variable information are improved. Rate.

CN116860782BActive Publication Date: 2024-10-15上海象帝先计算技术有限公司
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202210310295.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2024-10-15
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

When the tile-based graphics rendering architecture covers multiple tiles, the tile variable information is frequently read from the system memory, which increases the memory bandwidth requirements and tile processing delay.

Method used

A graphics processor is designed. When the primitive variable information in the cache space needs to be replaced through the cache module, the replaced primitive variable information is selected according to the number of tiles covered by the primitive, thereby optimizing the cache replacement strategy and improving the primitive variable information. Hit rate and storage utilization of variable information.

Benefits of technology

It reduces memory bandwidth requirements and tile processing delays, improves the cache hit rate of primitive variable information, and reduces the number of memory reads when switching tiles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116860782B_ABST
    Figure CN116860782B_ABST
Patent Text Reader

Abstract

The present disclosure provides a graphics processor, system, device, equipment and method. The graphics processor includes: a cache module, the cache module is configured to: when it is necessary to replace cached primitive variable information, select the replaced primitive variable information according to first primitive coverage information; delete the replaced primitive variable information from the cache space, the first primitive coverage information is used to indicate the number of tiles covered by the primitive within a specified range; the fewer the number of tiles covered within the specified range, the higher the priority of the primitive variable information to be replaced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of GPU (Graphics Processing Unit), and in particular to a graphics processor, a graphics processing system, an electronic device, an electronic device, and a graphics processing method. Background Art

[0002] The tile-based graphics rendering process can reduce memory bandwidth requirements. Related rendering architectures include TBR (Tilebased render) architecture and TBDR (Tile-based Deferred Rendering) architecture.

[0003] For tile-based image rendering architectures such as the TBR architecture and TBDR architecture, rasterization and pixel processing are performed tile by tile, and on-chip buffers are used to store information such as the depth buffer and color buffer of pixels in a tile. Since all pixel processing processes of a tile are performed in the on-chip buffer, there is no need to interact with the system memory, which can reduce the demand for system memory bandwidth during rendering. Among them, the size of the on-chip buffer determines the size of the tile. For example, if the tile is divided into 16×16 tiles, the on-chip buffer needs to provide information storage capacity of 16×16 pixels.

[0004] Since tiles are divided based on screen coordinates, the hardware tile division of a frame of image occurs after geometry processing, that is, the coordinates of the primitives have been converted to screen coordinates. When processing tiles, the primitive variables (also known as attributes) of the primitives contained in the tile are read from the system memory to the on-chip buffer. Taking the TBR architecture as an example, after a tile is processed, the primitive variable information contained in the tile will be released to the system memory, and the on-chip buffer is used to store the primitive variable information involved in the next tile. However, a primitive usually covers multiple tiles. If the same primitive covers multiple tiles, the primitive variable information of the primitive needs to be repeatedly read from the system memory to the on-chip buffer, which increases the memory bandwidth requirement and tile processing delay. Summary of the invention

[0005] The purpose of the present disclosure is to provide a graphics processor, a graphics processing system, an electronic device, an electronic device and a graphics processing method to improve the hit rate of primitive variable information in the cache and reduce the memory bandwidth requirement and tile processing delay.

[0006] According to one aspect of the present disclosure, a graphics processor is provided, the graphics processor comprising:

[0007] The cache module is configured to: when it is necessary to replace the primitive variable information in the cache space, select the primitive variable information to be replaced according to the first primitive coverage information; delete the replaced primitive variable information from the cache space, the first primitive coverage information is used to indicate the number of tiles covered by the primitive within the specified range; the fewer the number of tiles covered within the specified range, the higher the priority of replacing the primitive variable information.

[0008] In some embodiments, the first primitive coverage information is used to indicate the number of tiles covered by the primitive in a single macro-tile, and the macro-tile is divided according to the processing order of the tiles.

[0009] Correspondingly, the graphics processor may further include a tile division module and a tile processing module; the tile division module is configured to: determine the tiles covered by the primitive and the first primitive coverage information corresponding to the tiles covered by the primitive, the first primitive coverage information corresponding to the tiles being used to indicate the number of tiles covered by the primitive in the macro-tile where the tile is located; the first primitive coverage information is associated with the tile information of the corresponding tile and the primitive variable information of the primitive and stored in the memory; the tile processing module is configured to: read and process the primitive variable information corresponding to the tiles one by one.

[0010] Correspondingly, the cache module can also be configured to: in response to a read request from the tile processing module, search for the primitive variable information corresponding to the current tile from the cache space; if not found, read the primitive variable information and the first primitive coverage information associated with the tile information of the current tile from the memory, send the read primitive variable information to the tile processing module, and cache the read primitive variable information and the first primitive coverage information to the cache space.

[0011] Furthermore, the cache module may include a cache space, a counter marking submodule and a cache replacement submodule.

[0012] Among them, primitive variable information is cached in the cache space; the counter marking submodule is configured as: in response to primitive variable information being cached in the cache space, setting the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of blocks indicated by the target first primitive coverage information, and the target first primitive coverage information is the first primitive coverage information corresponding to the current macro block; in response to all the blocks in the current macro block being processed, at least clearing the count value of the coverage counter of the primitive corresponding to the current macro block; the cache replacement submodule is configured as: in the case where the primitive variable information in the cache space needs to be replaced, selecting the primitive variable information to be replaced according to the count value of the coverage counter maintained by the counter marking submodule.

[0013] Furthermore, the first primitive coverage information can be saved in the first position in the primitive information, and the block processing module is also configured to: send the first position to the counter marking submodule; the counter marking submodule is also configured to: obtain the first primitive coverage information from the primitive information according to the received first position.

[0014] In some embodiments, the first primitive coverage information is used to indicate the number of unprocessed tiles covered by the primitive in a single macro tile.

[0015] Correspondingly, the graphics processor may further include a tile partitioning module and a tile processing module.

[0016] Among them, the tile division module is configured to: determine the tiles covered by the primitive and the initial first primitive coverage information corresponding to the tiles covered by the primitive, the initial first primitive coverage information corresponding to the tiles is used to indicate the number of tiles covered by the primitive within the macro block where the tile is located; associate the initial first primitive coverage information with the tile information of the corresponding tile and the primitive variable information of the primitive and save them in the memory.

[0017] The block processing module is configured to read and process the primitive variable information corresponding to each block one by one.

[0018] Correspondingly, the cache module can also be configured to: respond to a read request from the tile processing module, search for the primitive variable information corresponding to the current tile from the cache space; if not found, read the primitive variable information and the initial first primitive coverage information associated with the tile information of the current tile from the memory, send the read primitive variable information to the tile processing module, and cache the read primitive variable information and the initial first primitive coverage information to the cache space.

[0019] Furthermore, the cache module may include a cache space, a counter marking submodule and a cache replacement submodule. Among them, the cache space caches primitive variable information; the counter marking submodule is configured to: in response to primitive variable information being cached in the cache space, set the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of blocks indicated by the target initial first primitive coverage information minus 1, and the target initial first primitive coverage information is the initial first primitive coverage information corresponding to the current macroblock; in response to primitive variable information in the cache space being read, reduce the count value of the coverage counter of the primitive corresponding to the read primitive variable information by 1; the cache replacement submodule is configured to: in the case where the primitive variable information in the cache space needs to be replaced, select the replaced primitive variable information according to the count value of the coverage counter maintained by the counter marking submodule.

[0020] On this basis, the initial first primitive coverage information is stored in the first position in the primitive information, and the tile processing module may be further configured to: send the first position to the counter marking submodule.

[0021] Correspondingly, the counter marking submodule may also be configured to: obtain initial first primitive coverage information from the primitive information according to the first position.

[0022] In some embodiments, the first primitive coverage information is used to indicate the number of unprocessed tiles covered by the primitive.

[0023] Correspondingly, the graphics processor may further include a tile partitioning module and a tile processing module.

[0024] The block division module is configured to: determine the block covered by the primitive and the initial first primitive coverage information of the primitive; associate the initial first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and save them in the memory;

[0025] The block processing module is configured to read and process the primitive variable information corresponding to each block one by one.

[0026] Correspondingly, the cache module can also be configured to: respond to a read request from the tile processing module, search for the primitive variable information corresponding to the current tile from the cache space; if not found, read the primitive variable information and the initial first primitive coverage information associated with the tile information of the current tile from the memory, send the read primitive variable information to the tile processing module, and cache the read primitive variable information and the initial first primitive coverage information to the cache space.

[0027] On this basis, the cache module may include a cache space, a counter marking submodule and a cache replacement submodule.

[0028] Among them, primitive variable information is cached in the cache space; the counter marking submodule is configured to: in response to primitive variable information being cached in the cache space, set the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of blocks indicated by the initial first primitive coverage information minus 1; in response to the cached primitive variable information being read, reduce the count value of the coverage counter of the primitive corresponding to the read primitive variable information by 1; the cache replacement submodule is configured to: when it is necessary to replace the primitive variable information in the cache space, select the replaced primitive variable information according to the count value of the coverage counter maintained by the counter marking submodule.

[0029] According to another aspect of the present disclosure, the present disclosure provides a graphics processor, which includes a cache module, and the cache module is configured to: when it is necessary to replace primitive variable information in the cache space, select the replaced primitive variable information according to second primitive coverage information; delete the replaced primitive variable information from the cache space, the second primitive coverage information is used to indicate the number of tiles covered by the primitive; the fewer the number of covered tiles, the higher the priority of replacing the primitive variable information.

[0030] Furthermore, the graphics processor may also include a tile partitioning module and a tile processing module.

[0031] The block division module is configured to: determine the block covered by the primitive and the second primitive coverage information of the primitive; associate the second primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and save them in the memory;

[0032] The block processing module is configured to read and process the primitive variable information corresponding to each block one by one.

[0033] Correspondingly, the cache module can also be configured to: in response to a read request from the tile processing module, search for the primitive variable information corresponding to the current tile from the cache space; if not found, read the primitive variable information and the second primitive coverage information associated with the tile information of the current tile from the memory, send the read primitive variable information to the tile processing module, and cache the read primitive variable information and the second primitive coverage information to the above-mentioned cache space.

[0034] Furthermore, the cache module may include a cache space, a counter marking submodule and a cache replacement submodule.

[0035] Among them, primitive variable information is cached in the cache space; the counter marking submodule is configured to: in response to primitive variable information being cached in the cache space, set the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of tiles indicated by the second primitive coverage information; the cache replacement submodule is configured to: when it is necessary to replace the primitive variable information in the cache space, select the replaced primitive variable information according to the count value of the coverage counter maintained by the counter marking submodule.

[0036] According to another aspect of the present disclosure, a graphics processing system is provided, comprising the graphics processor described in any one of the above embodiments.

[0037] According to another aspect of the present disclosure, an electronic device is provided, comprising the graphics processing system described in any one of the above embodiments.

[0038] According to another aspect of the present disclosure, an electronic device is provided, comprising the electronic device described in any one of the above embodiments.

[0039] According to another aspect of the present disclosure, a graphics processing method is provided, the method comprising the following cache information processing process:

[0040] In the case where the primitive variable information of the cache space needs to be replaced, the primitive variable information to be replaced is selected according to the first primitive coverage information;

[0041] Delete the replaced primitive variable information from the cache space.

[0042] The first primitive coverage information is used to indicate the number of tiles covered by the primitive within the specified range; the fewer the number of tiles covered within the specified range, the higher the priority of replacing the primitive variable information of the primitive.

[0043] In some embodiments, the first primitive coverage information is used to indicate the number of tiles covered by the primitive in a single macro-tile, wherein the macro-tile is divided according to the processing order of the tiles.

[0044] Furthermore, the above method may also include a block division process and a block processing process.

[0045] The block division process includes the following steps: determining the block covered by the primitive and the first primitive coverage information corresponding to the block covered by the primitive, the first primitive coverage information corresponding to the block is used to indicate the number of blocks covered by the primitive in the macro block where the block is located; associating the first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and saving them in the memory;

[0046] The block processing process includes the following steps: reading and processing the primitive variable information corresponding to each block one by one.

[0047] Correspondingly, the cache information processing process can also include the following operations: in response to a read request, searching for the primitive variable information corresponding to the current tile from the cache space; if not found, reading the primitive variable information and the first primitive coverage information associated with the tile information of the current tile from the memory, and caching the read primitive variable information and the first primitive coverage information into the cache space.

[0048] Furthermore, the cache information processing process may also include:

[0049] In response to primitive variable information being cached into the cache space, the count value of the coverage counter of the primitive corresponding to the cached primitive variable information is set to the number of tiles indicated by the target first primitive coverage information, and the target first primitive coverage information is the first primitive coverage information corresponding to the current macro block; in response to all tiles in the current macro block being processed, at least the count value of the coverage counter of the primitive corresponding to the current macro block is cleared to zero.

[0050] Correspondingly, selecting the replaced primitive variable information according to the first primitive coverage information may include: selecting the replaced primitive variable information according to the count value of the coverage counter.

[0051] In some embodiments, the first primitive coverage information is used to indicate the number of unprocessed tiles covered by the primitive in a single macro tile.

[0052] Correspondingly, the above method may further include a block division process and a block processing process.

[0053] The block division process may include the following steps: determining the block covered by the primitive and the initial first primitive coverage information corresponding to the block covered by the primitive, the initial first primitive coverage information corresponding to the block is used to indicate the number of blocks covered by the primitive in the macro block where the block is located; associating the initial first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and saving them in the memory;

[0054] The block processing process includes: reading and processing the primitive variable information corresponding to each block one by one.

[0055] Correspondingly, the cache information processing process may also include: in response to a read request, searching for primitive variable information corresponding to the current tile from the cache space; if not found, reading the primitive variable information and initial first primitive coverage information associated with the tile information of the current tile from the memory, and caching the read primitive variable information and initial first primitive coverage information into the cache space.

[0056] Furthermore, the cache information processing process may also include:

[0057] In response to primitive variable information being cached into the cache space, the count value of the coverage counter of the primitive corresponding to the cached primitive variable information is set to the number of blocks indicated by the target initial first primitive coverage information minus 1, and the target initial first primitive coverage information is the initial first primitive coverage information corresponding to the current macro block; in response to cached primitive variable information being read, the count value of the coverage counter of the primitive corresponding to the read primitive variable information is subtracted by 1.

[0058] Correspondingly, selecting the replaced primitive variable information according to the first primitive coverage information may include: selecting the replaced primitive variable information according to the count value of the coverage counter.

[0059] In some embodiments, the first primitive coverage information is used to indicate the number of unprocessed tiles covered by the primitive.

[0060] Correspondingly, the above method may further include a block division process and a block processing process.

[0061] The block division process may include the following steps: determining the block covered by the primitive and the initial first primitive coverage information of the primitive; associating the initial first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and saving them in the memory;

[0062] The block processing process may include the following steps: reading and processing the primitive variable information corresponding to each block one by one.

[0063] Correspondingly, the cache information processing process can also include the following steps: in response to a read request, searching for the primitive variable information corresponding to the current tile from the cache space; if not found, reading the primitive variable information and the initial first primitive coverage information associated with the tile information of the current tile from the memory, and caching the read primitive variable information and the initial first primitive coverage information into the cache space.

[0064] Furthermore, the cache information processing process may also include:

[0065] In response to primitive variable information being cached into the cache space, the count value of the coverage counter of the primitive corresponding to the cached primitive variable information is set to the number of blocks indicated by the initial first primitive coverage information minus 1; in response to cached primitive variable information being read, the count value of the coverage counter of the primitive corresponding to the read primitive variable information is subtracted by 1.

[0066] Correspondingly, selecting the replaced primitive variable information according to the first primitive coverage information includes: selecting the replaced primitive variable information according to the count value of the coverage counter. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 A schematic diagram of the structure of a GPU provided by an embodiment of the present disclosure;

[0068] Figure 2 A schematic diagram of a macro block division method provided in one embodiment of the present disclosure;

[0069] Figure 3 A schematic diagram of the structure of a graphics processing system provided by an embodiment of the present disclosure;

[0070] Figure 4 A flowchart of a graphics processing method provided by one embodiment of the present disclosure. DETAILED DESCRIPTION

[0071] Before introducing the embodiments of the present disclosure, it should be noted that:

[0072] Some embodiments of the present disclosure are described as processing flows. Although the various operation steps of the flow may be given sequential step numbers, the operation steps therein may be implemented in parallel, concurrently or simultaneously.

[0073] In the embodiments of the present disclosure, the terms "first", "second", etc. may be used to describe various features, but these features should not be limited by these terms. These terms are used only to distinguish one feature from another.

[0074] The term “and / or” may be used in embodiments of the present disclosure. “And / or” includes any and all combinations of one or more of the associated features listed.

[0075] It should be understood that when describing the connection or communication relationship between two components, unless it is explicitly stated that the two components are directly connected or directly communicating, the connection or communication between the two components can be understood as direct connection or communication, or as indirect connection or communication through an intermediate component.

[0076] In order to make the technical solutions and advantages of the embodiments of the present disclosure more clearly understood, the exemplary embodiments of the present disclosure are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0077] The purpose of the present disclosure is to provide a primitive variable information replacement scheme in a GPU on-chip buffer, aiming to formulate a cache replacement strategy for primitive variable information according to the coverage characteristics of primitives on tiles. Specifically, the number of tiles covered by the primitive reflects the probability of the primitive variable information appearing in the subsequently processed tiles. The fewer tiles covered by the primitive, the smaller the probability of its appearing in the subsequently processed tiles, and its primitive variable information is replaced first; conversely, the more tiles covered by the primitive, the greater the probability of its appearing in the subsequently processed tiles, and its primitive variable information is not replaced as much as possible. Through this replacement strategy, the utilization rate of the on-chip buffer for storing primitive variable information can be improved, and the number of times the primitive variable information is read from the memory when the tiles are switched is reduced, thereby reducing the memory bandwidth requirement and reducing the delay in tile processing.

[0078] An embodiment of the present disclosure provides a graphics processor, such as Figure 1 As shown, the graphics processor 100 at least includes a tile partitioning module 101 , a tile processing module 102 and a cache module 103 .

[0079] The tile division module 101 is configured to: determine the tile covered by the primitive, and associate the tile information of the tile with the primitive variable information of the primitive covering the tile and store them in the memory 200 .

[0080] The present disclosure does not limit the specific data structure, data content, etc. of the primitive variable information. As an example but not a limitation, the primitive variable information of the primitive is stored in a fixed position of the primitive information.

[0081] The present disclosure does not limit the association method between tile information and primitive variable information, and can be implemented by using existing association methods. As an example and not a limitation, tile information can include, but is not limited to, the index of primitive variable information of the primitive covering the tile (or the index of the primitive information where the primitive variable information is located), and the association between the primitive variable information of the primitive and the tile information of the tile can be achieved in the form of an index.

[0082] The block processing module 102 is configured to read and process the primitive variable information corresponding to each block one by one.

[0083] It should be noted that the tile processing module 102 may be any module that needs to read and process primitive variable information during the graphics rendering process. For example, the tile processing module 102 may be a rasterization module.

[0084] The block processing module 102 sends a read request to the cache module 103 to read the primitive variable information of the primitive covering the current block. Specifically, the read request can be implemented by using existing technologies.

[0085] Among them, the cache module 103 is configured as follows: after receiving the above-mentioned read request sent by the tile processing module 102, search for the primitive variable information corresponding to the current tile (that is, the primitive variable information of the primitive covering the current tile) from the cache space (that is, the on-chip buffer); if found, it means a cache hit, and the tile processing module 102 reads the required primitive variable information from the cache space; if not found, it means a cache miss, and the cache module 103 reads the primitive variable information corresponding to the current tile from the memory 200 and sends it to the tile processing module 102, and caches the primitive variable information read from the memory into the cache space.

[0086] When new primitive variable information needs to be cached, if the cache space is insufficient, the primitive variable information in the cache space needs to be replaced. In this case, the cache module 103 is also configured to: select the replaced primitive variable information according to the primitive coverage information; and delete the replaced primitive variable information selected above from the cache space.

[0087] In some embodiments, the primitive coverage information includes first primitive coverage information, which is used to indicate the number of tiles covered by the primitive within a specified range; the fewer the number of tiles covered within the specified range, the higher the priority of replacing the primitive variable information of the primitive.

[0088] For example, the primitive variable information of the primitive that covers the least number of tiles within the specified range is selected as the primitive variable information to be replaced. If there is more than one primitive that covers the least number of tiles within the specified range, then other replacement strategies can be used to select the primitive variable information to be replaced. As an example and not a limitation, the LRU (Least Recently Used) strategy can be used to select the primitive variable information to be replaced from the primitive variable information of multiple primitives that cover the least number of tiles within the specified range.

[0089] In some other embodiments, the primitive coverage information includes second primitive coverage information, and the second primitive coverage information is used to indicate the number of tiles covered by the primitive; the fewer the number of covered tiles, the higher the priority of replacing the primitive variable information of the primitive.

[0090] For example, the primitive variable information of the primitive with the least number of tiles covered is selected as the primitive variable information to be replaced. If there is more than one primitive with the least number of tiles covered, then other replacement strategies can be used to select the primitive variable information to be replaced. As an example and not a limitation, the LRU strategy can be used to select the primitive variable information to be replaced from the primitive variable information of multiple primitives with the least number of tiles covered.

[0091] In the present disclosure, a primitive covering a tile may mean that the tile completely falls within the primitive range, or that the tile partially falls within the primitive range.

[0092] Among them, the graphics processor refers to a processor that is implemented through hardware and has computing functions, which includes components such as a computing unit, an on-chip buffer, etc. It can be a GPGPU (general-purpose graphics processing unit) or a GPU.

[0093] Among them, the functions of the cache module, the tile division module, and the tile processing module can be implemented through hardware circuits, software, or a combination of software and hardware, and the present disclosure does not limit this.

[0094] In the embodiment of the present disclosure, the cache module may also be configured to: maintain a coverage counter of the primitive corresponding to the primitive variable information cached in the cache space, wherein the count value of the coverage counter is the number of tiles indicated by the primitive coverage information. Accordingly, the cache module may specifically select the primitive variable information to be replaced according to the count value of the coverage counter.

[0095] In the tile-based rendering process, each tile is processed one by one in a predetermined order. There may be multiple tile processing orders. As an example and not a limitation, a possible tile processing order is as follows: Figure 2 shown. Figure 2 Some picture elements (221 and 222) in the image frame and the picture blocks (201 to 208) covered by these picture elements are shown. In this embodiment, Figure 2 As shown by the broken lines in , the order in which the tiles are processed is: 201-202-203-204-205-206-207-208.

[0096] from Figure 2 It can be seen that although primitive 222 covers four tiles 202, 204, 205, and 207, the processing interval of these four tiles is relatively long due to the processing order. Assuming that cache replacement is required when processing tile 202, if the replacement object is selected based on the number of tiles actually covered by the primitive, then the primitive variable information of primitive 221 will be replaced before the primitive variable information of primitive 222. This is obviously not reasonable. Figure 2 It can be seen from the processing sequence shown that the primitive variable information of primitive 221 is needed in both the block 203 and the block 204 to be processed next. If the primitive variable information of primitive 221 is replaced, it is necessary to frequently read the primitive variable information from the memory.

[0097] Therefore, in some embodiments, macrotiles may be divided according to the tile processing order, and accordingly, the first primitive coverage information is specifically used to indicate the number of tiles covered by the primitive in a single macrotile. A macrotile covers multiple tiles, and the macrotiles do not overlap, that is, the tiles are grouped according to the processing order, and each group constitutes a macrotile. Figure 2 As shown, macroblock 211 and macroblock 212 are divided according to the tile processing order. Accordingly, the first primitive coverage information of primitive 221 indicates that the number of tiles covered by primitive 221 in macroblock 211 is 3. Primitive 222 has two first primitive coverage information, one of which indicates that the number of tiles covered by primitive 222 in macroblock 211 is 2, and the other first primitive coverage information indicates that the number of tiles covered by primitive 222 in macroblock 212 is 2.

[0098] On this basis, the tile division module is also configured to: determine the first primitive coverage information corresponding to the tile covered by the primitive, wherein the first primitive coverage information corresponding to the tile is used to indicate the number of tiles covered by the primitive within the macro block where the tile is located; associate the first primitive coverage information with the tile information of the corresponding block and the primitive variable information of the primitive and save them in the memory.

[0099] Still Figure 2For example, the tile division module determines which primitives are covered by each tile one by one, and the first primitive coverage information corresponding to these primitives in the macro tile where the current tile is located. Taking tile 201 as an example, the tile division module determines that tile 201 is covered by primitive 221, and determines that the number of covered tiles corresponding to the first primitive coverage information of primitive 221 is 3, and associates the first primitive coverage information of primitive 221 with the information of tile 201 and the primitive variable information of primitive 221 in the memory and saves it. Taking tile 222 as an example, the tile division module determines that tile 202 is covered by primitive 222, and determines that the number of covered tiles corresponding to the first primitive coverage information of primitive 222 is 2, and associates the first primitive coverage information of primitive 222 with the information of tile 202 and the primitive variable information of primitive 222 in the memory and saves it. Taking block 205 as an example, the block division module determines that block 205 is covered by primitive 222, and determines that the number of covered blocks corresponding to the first primitive coverage information of primitive 222 is 2, and associates the first primitive coverage information of primitive 222 with the information of block 205 and the primitive variable information of primitive 222 in the memory and saves them.

[0100] In practical applications, the first primitive coverage information and the primitive variable information can be stored in one data structure or in different data structures. At present, the primitive variable information is stored in the data structure of the primitive information, so the first primitive coverage information can also be stored in the data structure of the primitive information. Specifically, a fixed position in the data structure (hereinafter referred to as the first position) can be assigned to the first primitive coverage information. Correspondingly, after the first primitive coverage information of the primitive is determined, the first primitive coverage information is written into the first position of the primitive information. Taking primitive 222 as an example, since primitive 222 spans two macroblocks, there are two first primitive coverage information. Then, multiple fixed positions can be reserved in the data structure to store different first primitive coverage information respectively. For example, N bits are reserved to sequentially store the first primitive coverage information corresponding to each macroblock. If the primitive has only one first primitive coverage information, the remaining bits are set to the default value.

[0101] Based on any embodiment based on macroblock division, the specific implementation method of the cache module maintaining the coverage counter may include: in response to primitive variable information being cached in the cache space, setting the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of tiles indicated by the target first primitive coverage information, the target first primitive coverage information being the first primitive coverage information corresponding to the current macroblock; in response to all tiles in the current macroblock being processed, at least clearing the count value of the coverage counter of the primitive corresponding to the current macroblock.

[0102] refer to Figure 2, assuming that the tile currently processed by the tile processing module is tile 202, and the primitive variable information of primitive 222 covering tile 202 is not hit in the cache space, it is necessary to read the primitive variable information from the memory and cache the primitive variable information to the cache space, then, the count value of the coverage counter corresponding to primitive 222 is set to the number of tiles indicated by the first primitive coverage information corresponding to macro tile 211 (that is, 2).

[0103] Continue to refer Figure 2 , assuming that the tile currently processed by the tile processing module is tile 204, and the primitive variable information of primitive 222 covering tile 204 hits in the cache space, in this embodiment, it is not necessary to modify the count value of the coverage counter of primitive 222. When the processing of tile 204 is completed, the cache module clears the count value of the coverage counter of primitive 222.

[0104] It should be noted that, in actual applications, in the case of a cache hit, that is, in response to reading primitive variable information from the cache space, the corresponding coverage counter may also be assigned a value with reference to the above implementation.

[0105] In some embodiments, the cache module reads the primitive information from the memory, the first position of the primitive information stores the first primitive coverage information, and the second position of the primitive information stores the primitive variable information. The cache module reads the first primitive coverage information from the first position of the primitive information, thereby assigning a value to the corresponding coverage counter. If a primitive corresponds to multiple first primitive coverage information, and there are multiple first positions in the primitive information, respectively storing different first primitive coverage information, then the cache module reads the first primitive coverage information from the first position corresponding to the current macroblock. In practical applications, existing technical means can be used to implement the cache module to identify the first position corresponding to the macroblock.

[0106] In practical applications, the cache module can address the first position according to the pre-agreed first position to read the first primitive coverage information. In another implementation, the tile processing module sends the first position to the cache module, and the cache module addresses the primitive information according to the received first position to obtain the first primitive coverage information.

[0107] In some embodiments, the cache module reads the primitive variable information and the corresponding first primitive coverage information from the memory respectively. The cache module assigns a value to the corresponding coverage counter according to the read first primitive coverage information. Furthermore, the cache module can store the read primitive variable information and the corresponding first primitive coverage information in different locations in the same data structure.

[0108] The disclosed embodiment does not limit the specific implementation method of how the cache module knows whether all the tiles in the macro block have been processed. In one implementation method, the tile processing module of the graphics processor informs, and accordingly, the tile processing module can also be configured as follows: when the last tile in the macro block is processed, an instruction is sent to the cache module; the cache module responds to the instruction and at least clears the count value of the overlay counter corresponding to the tile in the macro block. In another implementation method, the cache module maintains a tile processing counter, and each time a search for primitive variable information is performed in the cache space, the count value of the tile processing counter is increased by 1. When the count value of the tile processing counter reaches a specified value (the specified value is 1 greater than the tile value included in the macro block), it indicates that all the tiles in the macro block have been processed. Then, the tile processing counter is cleared to count again.

[0109] In some embodiments, the coverage counter may not be maintained. Accordingly, the cache module directly selects the replaced primitive variable information according to the first primitive coverage information cached in the cache space.

[0110] Continue to refer Figure 1 In some embodiments, the cache module 103 may include a cache space 1031, a counter marking submodule 1032, and a cache replacement submodule 1033. The cache space 1031 caches primitive variable information; the counter marking submodule 1032 is configured to: maintain the coverage counter of the primitive corresponding to the primitive variable information cached in the cache space 1031; the cache replacement submodule 1033 is configured to: when the primitive variable information in the cache space 1031 needs to be replaced, select the primitive variable information to be replaced according to the count value of the coverage counter maintained by the counter marking submodule 1032.

[0111] Continue to refer Figure 1 In some embodiments, the above-mentioned block processing module 102 may include a block tracking submodule 1021 and a primitive address marking submodule 1022. The block tracking submodule 1021 is configured to identify that the last block of the macro block has been processed. The primitive address marking submodule 1022 is configured to mark the starting address of the primitive information in the memory so that the cache module can perform addressing according to the starting address.

[0112] In some embodiments, the first primitive coverage information is specifically used to indicate the number of unprocessed tiles covered by the primitive in a single macro tile.

[0113] On this basis, the tile division module is also configured to: determine the initial first primitive coverage information corresponding to the tile covered by the primitive, wherein the initial first primitive coverage information corresponding to the tile is used to indicate the number of tiles covered by the primitive within the macro block where the tile is located; associate the initial first primitive coverage information with the tile information of the corresponding tile and the primitive variable information of the primitive and save them in the memory.

[0114] The specific implementation method can refer to the description of the above embodiment and will not be repeated here.

[0115] Correspondingly, the specific implementation method of the cache module maintaining the coverage counter may include: in response to primitive variable information being cached in the cache space, setting the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of blocks indicated by the target initial first primitive coverage information minus 1, and the target initial first primitive coverage information is the initial first primitive coverage information corresponding to the current macro block; in response to primitive variable information in the cache space being read, subtracting the count value of the coverage counter of the primitive corresponding to the read primitive variable information by 1.

[0116] refer to Figure 2 , assuming that the tile currently processed by the tile processing module is tile 204 , and the primitive variable information of primitive 222 covering tile 204 hits in the cache space, the count value of the coverage counter corresponding to primitive 222 is reduced by 1.

[0117] In some embodiments, the first primitive coverage information is specifically used to indicate the number of unprocessed tiles covered by the primitive.

[0118] On this basis, the tile division module is further configured to: determine the initial first primitive coverage information of the primitive; associate the initial first primitive coverage information with the tile information of the corresponding tile and the primitive variable information of the primitive and save them in the memory.

[0119] The specific implementation method can refer to the description of the above embodiment and will not be repeated here.

[0120] Correspondingly, the specific implementation method of the cache module maintaining the coverage counter may include: in response to primitive variable information being cached into the cache space, setting the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of blocks indicated by the initial first primitive coverage information minus 1; in response to cached primitive variable information being read, subtracting the count value of the coverage counter of the primitive corresponding to the read primitive variable information by 1.

[0121] In some embodiments, the tile division module can be configured to: determine the second primitive coverage information of the primitive; associate the second primitive coverage information with the tile information of the corresponding tile and the primitive variable information of the primitive and save them in the memory. Correspondingly, the cache module can also be configured to: in response to the read request of the tile processing module, search for the primitive variable information corresponding to the current tile from the cache space, if not found, read the primitive variable information and the second primitive coverage information associated with the tile information of the current tile from the memory, send the read primitive variable information to the tile processing module, and cache the read primitive variable information and the second primitive coverage information to the cache space.

[0122] Furthermore, the cache module may include a cache space, a counter marking submodule and a cache replacement submodule. The cache space caches primitive variable information; the counter marking submodule is configured to: in response to primitive variable information being cached in the cache space, set the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of tiles indicated by the second primitive coverage information; the cache replacement submodule is configured to: in the case where the primitive variable information in the cache space needs to be replaced, select the primitive variable information to be replaced according to the count value of the coverage counter maintained by the counter marking submodule.

[0123] Based on the same inventive concept, the embodiment of the present disclosure also provides a graphics processing system, which can be a die (tube core), or a SOC (System on Chip) with multiple dies interconnected, or other organizational forms.

[0124] The following uses a die as an example to illustrate the architecture and working principle of the graphics processing system provided by the present disclosure.

[0125] exist Figure 3 In one embodiment shown, a single-die graphics processing system includes multiple GPU cores (ie, the graphics processors described in any of the above embodiments).

[0126] Each GPU core is used to process drawing commands, and according to the drawing commands, execute the image rendering pipeline, and can also be used to execute other calculation commands; multiple GPU cores complete the execution of drawing or other computing tasks as a whole. Each GPU core further includes: a computing unit, which is used to execute instructions compiled by the shader, and is a programmable module composed of a large number of ALUs; a cache (Cache), which is used to cache GPU core data to reduce memory access; a rasterization module, a fixed stage of the 3D rendering pipeline; a slicing (Tilling) module, which performs slicing processing on a frame in the TBR and TBDR GPU architectures; a cropping module, a fixed stage of the 3D rendering pipeline, which crops out the primitives outside the observation range or that are not displayed on the back; a post-processing module, which is used to scale, crop, rotate, and other operations on the drawn image; a micro core (Micro core), which is used for scheduling between various pipeline hardware modules on the GPU core, or for task scheduling of multiple GPU cores.

[0127] like Figure 3 As shown, the graphics processing system may also include:

[0128] The on-chip network is used for data exchange between various IP cores on the graphics processing system;

[0129] General DMA (Direct Memory Access) is used to perform data transfer between host memory and graphics processing system memory (such as graphics card memory). For example, DMA is used to move vertex data of 3D drawings from host memory to graphics processing system memory.

[0130] PCIe controller, an interface for communicating with the host, implements the PCIe protocol, and enables the graphics processing system to be connected to the host through the PCIe interface. The host runs programs such as the graphics API and graphics card driver;

[0131] The application processor is used to schedule tasks of various modules on the graphics processing system. For example, after the GPU renders a frame of image, it notifies the application processor, and the application processor then starts the display controller to display the image drawn by the GPU on the screen.

[0132] Memory controller, used to connect to the system memory and save data on the SOC;

[0133] Display controller, which controls the output of the frame buffer in the system memory to the display via the display interface (HDMI, DP, etc.);

[0134] Video decoding, which can decode the encoded video on the host hard disk into a displayable picture;

[0135] Video encoding can encode the original video code stream on the host hard disk into a specified format and return it to the host.

[0136] based on Figure 3 In the graphics processing system shown, in one embodiment, a slicing module in a main GPU core among multiple GPU cores determines the tiles covered by the primitives and the first primitive coverage information corresponding to the tiles covered by the tiles. In this embodiment, the first primitive coverage information corresponding to the tiles is used to indicate the number of tiles covered by the primitive in the macro-tile where the tile is located. Furthermore, the slicing module saves a primitive list corresponding to each tile in the system memory, and the primitive list indicates which primitives cover the tile. The primitive list is used to associate and save the tile information, the first primitive coverage information, and the primitive variable information of the tile in the system memory. Still with Figure 2 Taking the shown example, two pieces of primitive information are saved for primitive 222 in the system memory. The primitive information indicated in the primitive list of block 202 carries the first primitive coverage information corresponding to macro block 211, and the primitive information indicated in the primitive list of block 205 carries the first primitive coverage information corresponding to macro block 212.

[0137] In the rasterization stage, the rasterization module in a GPU core that performs rasterization processing performs rasterization processing tile by tile. Figure 2 Taking the block 202 in the GPU core as an example, the rasterization module sends a read request to the cache module in the GPU core to read the primitive variable information of the primitive covering the block 202. The cache module determines that the primitive variable information of the primitive 222 is needed according to the primitive list corresponding to the block 202, and the cache module first searches for the primitive variable information of this primitive from the cache space. In this embodiment, the primitive variable information of the primitive 222 is not cached, so the cache module searches the system memory for the primitive information of the primitive 222 indicated by the primitive list of the block 202 through the memory controller, sends the found primitive information of the primitive 222 to the rasterization module, and caches the primitive information of the primitive 222.

[0138] In this embodiment, the cache space is insufficient to cache the primitive information of primitive 222 , and the cache module searches for the count values ​​of each coverage counter and deletes the primitive variable information corresponding to the minimum count value to cache the primitive information of primitive 222 .

[0139] The cache module caches the primitive information of primitive 222, reads the first primitive coverage information from the first position of the primitive information of primitive 222, and sets the count value of the coverage counter corresponding to primitive 222 to the number of tiles indicated by the first primitive coverage information.

[0140] After the rasterization module processes the block 202, it sequentially processes the block 203 and the block 204. After processing the block 204, the rasterization module sends an instruction to the cache module to inform the macro block 211 that the processing is completed. In response to the instruction, the cache module clears the count value of the coverage counter corresponding to the primitive 221 and the primitive 222.

[0141] It should be pointed out that the above is only Figure 3 The specific structure shown is taken as an example to exemplify the implementation of the graphics processing system provided by the embodiment of the present disclosure. In practical applications, the specific implementation of the graphics processor that the graphics processing system may include can refer to any of the above embodiments, which will not be repeated here.

[0142] Based on the same inventive concept, the embodiment of the present disclosure also provides an electronic device, which includes the graphics processing system described in any of the above embodiments. In some usage scenarios, the product form of the electronic device is embodied as a graphics card; in other usage scenarios, the product form of the electronic device is embodied as a CPU motherboard.

[0143] Based on the same inventive concept, the disclosed embodiment also provides an electronic device, which includes the above-mentioned electronic device. In some usage scenarios, the product form of the electronic device is a portable electronic device, such as a smart phone, a tablet computer, a VR device, etc.; in some usage scenarios, the product form of the electronic device is a personal computer, a game console, etc.

[0144] Based on the same inventive concept, the embodiment of the present disclosure further provides a graphics processing method, which may include: Figure 4 The cache information processing process shown. The cache information processing process includes the following steps:

[0145] Step 401: When it is necessary to replace the primitive variable information in the cache space, select the primitive variable information to be replaced according to the first primitive coverage information;

[0146] Step 402: Delete the replaced primitive variable information from the cache space.

[0147] The first primitive coverage information is used to indicate the number of tiles covered by the primitive within the specified range; the fewer the number of tiles covered within the specified range, the higher the priority of replacing the primitive variable information of the primitive.

[0148] In some embodiments, the first primitive coverage information is used to indicate the number of tiles covered by the primitive in a single macro-tile, wherein the macro-tile is divided according to the processing order of the tiles.

[0149] Furthermore, the above method may also include a block division process and a block processing process.

[0150] The block division process includes the following steps: determining the block covered by the primitive and the first primitive coverage information corresponding to the block covered by the primitive, the first primitive coverage information corresponding to the block is used to indicate the number of blocks covered by the primitive in the macro block where the block is located; associating the first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and saving them in the memory;

[0151] The block processing process includes the following steps: reading and processing the primitive variable information corresponding to each block one by one.

[0152] Correspondingly, the cache information processing process can also include the following operations: in response to a read request, searching for the primitive variable information corresponding to the current tile from the cache space; if not found, reading the primitive variable information and the first primitive coverage information associated with the tile information of the current tile from the memory, and caching the read primitive variable information and the first primitive coverage information into the cache space.

[0153] Furthermore, the cache information processing process may also include:

[0154] In response to primitive variable information being cached into the cache space, the count value of the coverage counter of the primitive corresponding to the cached primitive variable information is set to the number of tiles indicated by the target first primitive coverage information, and the target first primitive coverage information is the first primitive coverage information corresponding to the current macro block; in response to all tiles in the current macro block being processed, at least the count value of the coverage counter of the primitive corresponding to the current macro block is cleared to zero.

[0155] Correspondingly, selecting the replaced primitive variable information according to the first primitive coverage information may include: selecting the replaced primitive variable information according to the count value of the coverage counter.

[0156] In some embodiments, the first primitive coverage information is used to indicate the number of unprocessed tiles covered by the primitive in a single macro tile.

[0157] Correspondingly, the above method may further include a block division process and a block processing process.

[0158] The block division process may include the following steps: determining the block covered by the primitive and the initial first primitive coverage information corresponding to the block covered by the primitive, the initial first primitive coverage information corresponding to the block is used to indicate the number of blocks covered by the primitive in the macro block where the block is located; associating the initial first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and saving them in the memory;

[0159] The block division process includes: reading and processing the primitive variable information corresponding to each block one by one.

[0160] Correspondingly, the cache information processing process may also include: in response to a read request, searching for primitive variable information corresponding to the current tile from the cache space; if not found, reading the primitive variable information and initial first primitive coverage information associated with the tile information of the current tile from the memory, and caching the read primitive variable information and initial first primitive coverage information into the cache space.

[0161] Furthermore, the cache information processing process may also include:

[0162] In response to primitive variable information being cached into the cache space, the count value of the coverage counter of the primitive corresponding to the cached primitive variable information is set to the number of blocks indicated by the target initial first primitive coverage information minus 1, and the target initial first primitive coverage information is the initial first primitive coverage information corresponding to the current macro block; in response to cached primitive variable information being read, the count value of the coverage counter of the primitive corresponding to the read primitive variable information is subtracted by 1.

[0163] Correspondingly, selecting the replaced primitive variable information according to the first primitive coverage information may include: selecting the replaced primitive variable information according to the count value of the coverage counter.

[0164] In some embodiments, the first primitive coverage information is used to indicate the number of unprocessed tiles covered by the primitive.

[0165] Correspondingly, the above method may further include a block division process and a block processing process.

[0166] The block division process may include the following steps: determining the block covered by the primitive and the initial first primitive coverage information of the primitive; associating the initial first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and saving them in the memory;

[0167] The block processing process may include the following steps: reading and processing the primitive variable information corresponding to each block one by one.

[0168] Correspondingly, the cache information processing process can also include the following steps: in response to a read request, searching for the primitive variable information corresponding to the current tile from the cache space; if not found, reading the primitive variable information and the initial first primitive coverage information associated with the tile information of the current tile from the memory, and caching the read primitive variable information and the initial first primitive coverage information into the cache space.

[0169] Furthermore, the cache information processing process may also include:

[0170] In response to primitive variable information being cached into the cache space, the count value of the coverage counter of the primitive corresponding to the cached primitive variable information is set to the number of blocks indicated by the initial first primitive coverage information minus 1; in response to cached primitive variable information being read, the count value of the coverage counter of the primitive corresponding to the read primitive variable information is subtracted by 1.

[0171] Correspondingly, selecting the replaced primitive variable information according to the first primitive coverage information includes: selecting the replaced primitive variable information according to the count value of the coverage counter.

[0172] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present disclosure.

[0173] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.

Claims

1. A graphics processor, comprising: A cache module, wherein the cache module is configured to: when it is necessary to replace the primitive variable information in the cache space, select the primitive variable information to be replaced according to the first primitive coverage information; delete the replaced primitive variable information from the cache space, the first primitive coverage information is used to indicate the number of tiles covered by the primitive across macroblocks in a single macroblock or to indicate the number of unprocessed tiles covered by the primitive across macroblocks in a single macroblock, the macroblocks are divided according to the processing order of the tiles, different macroblocks do not overlap, each macroblock covered by the primitive corresponds to a first primitive coverage information; the fewer the number of tiles covered in a single macroblock or the fewer the number of unprocessed tiles covered in a single macroblock, the higher the priority of replacing the primitive variable information.

2. The graphics processor according to claim 1, further comprising a tile partitioning module and a tile processing module; The block division module is configured to: determine the block covered by the primitive and the first primitive coverage information corresponding to the block covered by the primitive, wherein the first primitive coverage information corresponding to the block is used to indicate the number of blocks covered by the primitive in the macro block where the block is located; associate the first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and save them in the memory; The block processing module is configured to: read and process the primitive variable information corresponding to each block one by one; The cache module is also configured to: in response to a read request from the tile processing module, search for primitive variable information corresponding to the current tile from the cache space; if not found, read primitive variable information and first primitive coverage information associated with the tile information of the current tile from the memory, send the read primitive variable information to the tile processing module, and cache the read primitive variable information and first primitive coverage information to the cache space.

3. The graphics processor according to claim 2, wherein the cache module comprises a cache space, a counter marking submodule and a cache replacement submodule; The cache space caches the primitive variable information; The counter marking submodule is configured to: in response to the primitive variable information being cached in the cache space, set the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of blocks indicated by the target first primitive coverage information, wherein the target first primitive coverage information is the first primitive coverage information corresponding to the current macroblock; in response to the completion of all processing of the blocks in the current macroblock, at least clear the count value of the coverage counter of the primitive corresponding to the current macroblock; The cache replacement submodule is configured to: when it is necessary to replace the primitive variable information in the cache space, select the primitive variable information to be replaced according to the count value of the coverage counter maintained by the counter marking submodule.

4. The graphics processor according to claim 3, wherein the first primitive coverage information is stored in a first position in the primitive information, and the tile processing module is further configured to: send the first position to the counter marking submodule; The counter marking submodule is further configured to obtain first primitive coverage information from the primitive information according to the first position.

5. The graphics processor according to claim 1, further comprising a tile partitioning module and a tile processing module; The block division module is configured to: determine the block covered by the primitive and the initial first primitive coverage information corresponding to the block covered by the primitive, wherein the initial first primitive coverage information corresponding to the block is used to indicate the number of blocks covered by the primitive in the macro block where the block is located; associate the initial first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and save them in the memory; The block processing module is configured to: read and process the primitive variable information corresponding to each block one by one; The cache module is also configured to: in response to a read request from the tile processing module, search for primitive variable information corresponding to the current tile from the cache space; if not found, read primitive variable information and initial first primitive coverage information associated with the tile information of the current tile from the memory, send the read primitive variable information to the tile processing module, and cache the read primitive variable information and initial first primitive coverage information to the cache space.

6. The graphics processor according to claim 5, wherein the cache module comprises a cache space, a counter marking submodule and a cache replacement submodule; The cache space caches the primitive variable information; The counter marking submodule is configured to: in response to the primitive variable information being cached in the cache space, set the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of blocks indicated by the target initial first primitive coverage information minus 1, wherein the target initial first primitive coverage information is the initial first primitive coverage information corresponding to the current macro block; In response to the primitive variable information in the cache space being read, the count value of the coverage counter of the primitive corresponding to the read primitive variable information is reduced by 1; The cache replacement submodule is configured to: when it is necessary to replace the primitive variable information in the cache space, select the primitive variable information to be replaced according to the count value of the coverage counter maintained by the counter marking submodule.

7. The graphics processor according to claim 6, wherein the initial first primitive coverage information is stored in a first position in the primitive information, and the tile processing module is further configured to: send the first position to the counter marking submodule; The counter marking submodule is further configured to obtain initial first primitive coverage information from the primitive information according to the first position.

8. A graphics processing system, comprising the graphics processor according to any one of claims 1 to 7.

9. An electronic device comprising the graphics processing system according to claim 8.

10. An electronic device comprising the electronic device according to claim 9.

11. A graphics processing method, comprising a cache information processing process: In the case where the primitive variable information of the cache space needs to be replaced, the primitive variable information to be replaced is selected according to the first primitive coverage information; The replaced primitive variable information is deleted from the cache space, wherein the first primitive coverage information is used to indicate the number of tiles covered by the cross-macroblock primitive in a single macroblock or to indicate the number of unprocessed tiles covered by the cross-macroblock primitive in a single macroblock, the macroblocks are divided according to the processing order of the tiles, and different macroblocks do not overlap, and each macroblock covered by the primitive corresponds to a first primitive coverage information; the fewer the number of tiles covered in a single macroblock or the fewer the number of unprocessed tiles covered in a single macroblock, the higher the priority of the primitive variable information being replaced.

12. The method according to claim 11, further comprising a block division process and a block processing process; The block division process includes: Determine the block covered by the primitive and first primitive coverage information corresponding to the block covered by the primitive, where the first primitive coverage information corresponding to the block is used to indicate the number of blocks covered by the primitive in the macro block where the block is located; Associating the first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and saving them in a memory; The block processing process includes: reading and processing the primitive variable information corresponding to each block one by one; The cache information processing process also includes: in response to a read request, searching for primitive variable information corresponding to the current tile from the cache space; if not found, reading primitive variable information and first primitive coverage information associated with the tile information of the current tile from the memory, and caching the read primitive variable information and first primitive coverage information into the cache space.

13. The method according to claim 12, wherein the cache information processing process further comprises: In response to primitive variable information being cached in the cache space, setting the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of tiles indicated by the target first primitive coverage information, wherein the target first primitive coverage information is the first primitive coverage information corresponding to the current macro tile; In response to the completion of processing all the picture blocks in the current macro picture block, at least clearing the count value of the coverage counter of the picture element corresponding to the current macro picture block; The selecting the replaced primitive variable information according to the first primitive coverage information includes: selecting the replaced primitive variable information according to the count value of the coverage counter.

14. The method according to claim 11, further comprising a block partitioning process and a block processing process; The block division process includes: Determine the block covered by the primitive and initial first primitive coverage information corresponding to the block covered by the primitive, where the initial first primitive coverage information corresponding to the block is used to indicate the number of blocks covered by the primitive in the macro block where the block is located; Associating the initial first primitive coverage information with the block information of the corresponding block and the primitive variable information of the primitive and saving them in a memory; The block processing process includes: reading and processing the primitive variable information corresponding to each block one by one; The cache information processing process also includes: in response to a read request, searching for primitive variable information corresponding to the current tile from the cache space; if not found, reading primitive variable information and initial first primitive coverage information associated with the tile information of the current tile from the memory, and caching the read primitive variable information and initial first primitive coverage information into the cache space.

15. The method according to claim 14, wherein the cache information processing process further comprises: In response to primitive variable information being cached in the cache space, setting the count value of the coverage counter of the primitive corresponding to the cached primitive variable information to the number of tiles indicated by the target initial first primitive coverage information minus 1, wherein the target initial first primitive coverage information is the initial first primitive coverage information corresponding to the current macro tile; In response to the cached primitive variable information being read, the count value of the coverage counter of the primitive corresponding to the read primitive variable information is reduced by 1; The selecting the replaced primitive variable information according to the first primitive coverage information includes: selecting the replaced primitive variable information according to the count value of the coverage counter.

Citation Information

Patent Citations

  • Method and device for storing a compression ratio indication in a pixel value buffer in tile encoding

    CN103262531A

  • Tile-based graphics

    CN104103084A

  • Graphics processing method and system for processing sub-primitives

    CN106504181A

  • Generation of a control stream for a tile

    CN107341283A

  • Methods and systems for generating 3-dimensional computer images

    US20090066694A1