Tile processing method and device, computer device, storage medium and program product

By marking the background of sub-blocks in the rasterization process of the tile, the target sub-blocks that are not completely covered by primitives are selected, which solves the problem of the disproportion between the scanning cycle and the effective output within the tile and improves the background rendering efficiency.

CN122265616APending Publication Date: 2026-06-23MOORE THREADS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MOORE THREADS TECH CO LTD
Filing Date
2026-03-13
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In tile-based deferred rendering systems, the scan cycle within a tile is disproportionate to the effective output, resulting in high background rendering latency and impacting GPU performance.

Method used

By marking the background of sub-blocks in the rasterization process, target sub-blocks that are not completely covered by primitives are filtered out, reducing invalid scans and optimizing the scanning strategy to improve scanning efficiency.

Benefits of technology

It reduces scanning latency within tiles, improves overall efficiency of background rendering, reduces invalid scans, and increases GPU processing speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265616A_ABST
    Figure CN122265616A_ABST
Patent Text Reader

Abstract

The application relates to a tile processing method and device, computer equipment, a storage medium and a program product. The method comprises the following steps: in response to a background rendering instruction, acquiring background flags of each sub-block in each tile, the background flag being used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive; determining a target sub-block from each sub-block based on the background flags of the sub-blocks; wherein the target sub-block is a sub-block that is not completely covered by a primitive, and the target sub-block is used for background rendering. That is, in the method, the background flags of each sub-block in the tile are set, and the background flag can indicate whether the sub-block is completely covered by a primitive. The sub-blocks that need to be rendered in the background are screened out through the background flags, and the scanning operation can be directly skipped for the sub-blocks that do not need to be rendered in the background, thereby reducing the number of invalid scans, reducing the scanning time, improving the tile processing efficiency, and further reducing the tile rendering delay and improving the overall efficiency of the background rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display technology, and in particular to a tile processing method, apparatus, computer equipment, storage medium, and program product. Background Technology

[0002] In the Tile-Based Deferred Rendering (TBDR) architecture, the Graphics Processing Unit (GPU) typically divides the scene into tiles and organizes the rasterization and shading processes accordingly.

[0003] In related technologies, for background rendering, after the rasterization stage and before the shading stage, the GPU performs a visibility judgment on the tiles. Specifically, the tiles are subdivided into multiple smaller sub-tiles, and each sub-tile is checked to see if it is completely covered by existing primitives. Only sub-tiles that are not completely covered by existing primitives need to enter the shader for background shading and rendering.

[0004] However, the traversal scanning method in related technologies takes too much time, increases rendering latency, and results in low efficiency of background rendering. Summary of the Invention

[0005] Therefore, it is necessary to provide a tile processing method, apparatus, computer device, computer-readable storage medium, and computer program product that can reduce the scanning time of the GPU, thereby reducing rendering latency, improving scanning efficiency, and thus improving background rendering efficiency, in order to address the above-mentioned technical problems.

[0006] Firstly, this application provides a block processing method, including:

[0007] In response to the background rendering command, obtain the background flag of each sub-block in each tile; the background flag is used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive;

[0008] Based on the background markers of each sub-block, the target sub-block is determined from each sub-block; wherein, the target sub-block is the sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering.

[0009] In one embodiment, before obtaining the background markers of each sub-block in each tile in response to a background rendering instruction, the method further includes:

[0010] For each map block, the background markers of each sub-block within the map block are determined based on the primitive coverage status of the map block.

[0011] In one embodiment, the background markers of each sub-block within a tile are determined based on the primitive coverage state of the tile, including:

[0012] In response to a tile being covered by a primitive, determine the first sub-tile in the tile that is completely covered by the primitive;

[0013] The second sub-block is determined based on all sub-blocks of the tile and the first sub-block, and the background flag of the second sub-block is set to a value used to indicate that it is not completely covered by the primitive.

[0014] In one embodiment, the background markers of each sub-block within a tile are determined based on the primitive coverage state of the tile, including:

[0015] In response to a tile being covered by multiple primitives, determine the set of sub-tiles in the tile that are completely covered by each primitive;

[0016] The first target set is determined based on each set of sub-blocks and all sub-blocks of the map;

[0017] Set the background flag of each sub-block in the first target set to a value that indicates that it is not completely covered by primitives.

[0018] In one embodiment, determining a first target set based on each set of sub-blocks and all sub-blocks of a tile includes:

[0019] The second target set is obtained by taking the union of the sets of each sub-block;

[0020] The first target set is determined based on the second target set and all sub-blocks of the tile.

[0021] In one embodiment, the background markers of each sub-block within a tile are determined based on the primitive coverage state of the tile, including:

[0022] For each sub-block in the map, the background marker of the sub-block is determined based on the coverage state of each pixel in the sub-block by each primitive of the map covering the map.

[0023] In one embodiment, after determining the target sub-block from each sub-block based on the background flags of each sub-block, the method further includes:

[0024] Identify the target pixels in each target sub-block that are not covered by any primitives. These target pixels are used for background rendering.

[0025] Secondly, this application also provides a tile processing apparatus, comprising:

[0026] The acquisition module is used to acquire the background flag of each sub-block in each tile in response to the background rendering command; the background flag is used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive;

[0027] The first determining module is used to determine the target sub-block from each sub-block based on the background marker of each sub-block; wherein, the target sub-block is a sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering.

[0028] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the tile processing method in the first aspect described above.

[0029] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the tile processing method described in the first aspect above.

[0030] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the tile processing method described in the first aspect above.

[0031] The aforementioned tile processing method, apparatus, computer device, storage medium, and computer program product, in response to a background rendering instruction, acquire background flags for each sub-block within each tile. These background flags indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive. Based on the background flags of each sub-block, a target sub-block is determined from each sub-block. The target sub-block is a sub-block not completely covered by primitives, and the target sub-block is used for background rendering. That is, in the tile processing method proposed in this application embodiment, a background flag is set for each sub-block in the tile. This background flag indicates whether the sub-block is completely covered by primitives. Sub-blocks requiring background rendering are filtered out using the background flags. For sub-blocks that do not require background rendering, the scanning operation can be skipped directly, reducing the number of invalid scans, improving tile processing efficiency, and thus reducing tile rendering latency and improving the overall efficiency of background rendering. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is an application environment diagram of the block processing method in one embodiment;

[0034] Figure 2 This is a flowchart illustrating a block processing method in one embodiment;

[0035] Figure 3This is a flowchart illustrating the block processing method in another embodiment;

[0036] Figure 4 This is a flowchart illustrating the block processing method in another embodiment.

[0037] Figure 5 This is a schematic diagram illustrating the effect of a block being covered by a primitive in one embodiment;

[0038] Figure 6 This is a structural block diagram of a block processing device in one embodiment;

[0039] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0041] In Tile-Based Deferred Rendering (TBDR), graphics processing typically divides the scene into tiles, organizing the rasterization and shading workflow accordingly. In a typical TBDR pipeline, after the geometry stage, a primitive list for each tile is generated based on the screen partitioning. Then, during the rasterization stage, the visibility of pixels within each tile is determined, generating preliminary visible pixel information. Before entering the shader stage, the GPU needs to prepare the corresponding pixel data based on the visibility results, such as depth, stencil values, and relevant material indices. To ensure synchronization between the rasterization and shading stages, the GPU usually waits for all visibility information to be ready before initiating the corresponding shading operation.

[0042] In practical applications, the rendering of background images (such as skyboxes, background planes, etc.) also requires rasterization and shading processes. Related technologies typically treat the background as ordinary primitives, meaning background primitives also participate in tile partitioning, visibility determination, and rasterization queuing. To further reduce the burden on the fragment shading stage, related technologies perform a visibility-based determination after rasterization but before entering the shader. For example, some schemes further subdivide a tile into smaller sub-tiles, checking each sub-tile to see if it is completely covered by existing primitives. If a sub-tile is completely covered, the pixels within that sub-tile do not need to continue entering fragment shading (including background color shading), thus avoiding invalid shader calls. If a sub-tile is not completely covered, the pixel coverage information corresponding to its uncovered area is sent to the fragment shader.

[0043] In tile-based deferred rendering (TBDR) schemes, sub-blocks within a tile are typically scanned sequentially in a fixed order to determine whether they are completely covered by geometric primitives. During the background rendering phase, only sub-blocks that are not completely covered are sent to subsequent shading phases. However, in many scenarios, most of a tile's area may already be covered by geometric primitives (triangles), yet a complete scan of all sub-blocks within the tile is still required. This results in excessive scanning time, leading to an output efficiency problem: the processing cycle of the scan is directly related to the total number of sub-blocks, but not to the actual number of sub-blocks that need to be output. When most of a tile's area may already be covered by geometric primitives, a significant amount of scanning time during the background rendering phase is consumed in determining "unnecessary" sub-blocks, resulting in significant latency waste during the tile scanning phase and becoming a performance bottleneck in the rendering pipeline. Because the user experience of GPUs is highly sensitive to latency, in scenarios such as mobile devices, virtual reality (VR), and augmented reality (AR), even if the rendering workload is not large, the latency from rasterization to shading can still become a performance bottleneck.

[0044] Based on this, this application proposes a tile processing method to solve the problem of high rendering latency caused by the disproportion between the scanning cycle and effective output within a tile in related technologies. This method improves the scanning strategy to reduce unnecessary processing latency during the scanning of sub-blocks within a tile, thereby improving the overall latency performance of TBDR background rendering and increasing background rendering efficiency.

[0045] The block processing method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, when the computer device 101 displays content, it usually needs to perform rendering operations. During the rendering process, the graphics processing unit (GPU) in the computer device 101 can adopt a tile-based deferred rendering scheme. In this deferred rendering scheme, the improved method proposed in this application is introduced. By reducing invalid scans during the GPU scanning phase, the problem of insufficient scanning efficiency of sub-blocks within a tile can be solved, the visibility determination delay can be shortened, and the tile processing speed can be improved.

[0046] For example, the GPU may include a rasterization module, a visibility information accumulation processing unit, and a shading module. The rasterization module, upon receiving primitive information, performs rasterization processing on the tiles, that is, it determines the visibility of pixels within each tile to generate preliminary visible pixel information. The visibility information accumulation processing unit scans each tile block by block before the shading stage and prepares the corresponding pixel data based on the visibility results obtained from the rasterization processing. The shading module performs rendering based on the pixels and pixel data prepared by the GPU.

[0047] For example, computer device 101 can be a terminal device, which may include a display screen, i.e., display content through the display screen; of course, the terminal device may also not include a display screen, i.e., it does not require a physical screen for image display, i.e., screenless display, such as video projection, augmented reality, head-up display (HUD), etc. Based on this, the terminal device may include, but is not limited to, various personal computers, laptops, smartphones, tablets, projectors, Internet of Things (IoT) devices and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc., and portable wearable devices may include smartwatches, smart bracelets, head-mounted devices, etc.

[0048] In one exemplary embodiment, such as Figure 2 As shown, a tile processing method is provided, which can be applied to... Figure 1 Taking a computer device as an example, the method can optionally be specifically applied to a visibility information accumulation and processing unit within a computer device, including steps 201 to 203. Wherein:

[0049] Step 201: In response to the background rendering command, obtain the background flags of each sub-block in each tile.

[0050] The background marker is used to indicate whether the sub-block to which the background marker belongs is completely covered by at least one graphic element. This includes whether the sub-block is completely covered by a certain graphic element, or whether the sub-block is completely covered by multiple graphic elements, such as graphic element 1 and graphic element 2 both covering a part of the sub-block, but the combination of the two can completely cover the sub-block.

[0051] For example, during the rasterization process, upon receiving primitive information, rasterization can be performed on each block based on the primitive information, obtaining the primitive coverage state of each block. The primitive coverage state of each block can be stored in a preset storage area of ​​the GPU. Simultaneously, the GPU can perform background marking on each block based on its primitive coverage state, that is, marking the background of each sub-block within each block. For example, the GPU can perform background marking on each block sequentially according to a preset order. For the current block, the GPU can read the primitive coverage state of the current block from the preset storage area and, based on the primitive coverage state of the current block, perform background marking on each sub-block within the current block, obtaining the background markers of each sub-block within the current block.

[0052] For example, the background flag can be represented using binary data 0 and 1, such as 0 indicating the presence of a background area (i.e., the sub-block is not completely covered by the primitives) and 1 indicating the absence of a background area (i.e., the sub-block is completely covered by the primitives). Optionally, the background flag can also be represented using characters, such as false indicating the presence of a background area (i.e., the sub-block is not completely covered by the primitives) and true indicating the absence of a background area (i.e., the sub-block is completely covered by the primitives). Of course, 0 can also represent the absence of a background area and the sub-block being completely covered by the primitives, and 1 can represent the presence of a background area and the sub-block not being completely covered by the primitives; or false can represent the absence of a background area and the sub-block being completely covered by the primitives, and true can represent the presence of a background area and the sub-block not being completely covered by the primitives.

[0053] It should be noted that the above process of marking the background of the blocks can be performed synchronously during the rasterization stage. In practical applications, multiple primitive information will be received at different times. When a primitive information is received, a rasterization operation will be performed. Correspondingly, when the primitive coverage state of each block corresponding to the primitive information is obtained, the background marking operation of each block will be performed synchronously. For example, when the second primitive information is received, while rasterizing each block based on the second primitive information, the background of each sub-block in each block can be marked based on the primitive coverage state of each block corresponding to the first primitive information. When the third primitive information is received, while rasterizing each block based on the third primitive information, the background of each sub-block in each block can be marked based on the primitive coverage state of each block corresponding to the second primitive information.

[0054] In some cases, the second primitive information is not received immediately after the rasterization of the first primitive information. However, as long as the rasterization results of each block corresponding to the first primitive information are obtained, the background marking operation of the block can be performed immediately or after a preset interval. In other words, the background marking of sub-blocks within a block proposed in this application is a processing operation performed synchronously during the rasterization stage, which does not waste GPU processing time. Alternatively, it only requires a very short time to perform the background marking process for each sub-block within each block based on the primitive coverage state of each block corresponding to the last primitive information. Compared to the wasted time by the GPU scanning sub-blocks completely covered by primitives during the scanning stage, this is negligible.

[0055] Step 202: Based on the background flags of each sub-block, determine the target sub-block from each sub-block.

[0056] The target sub-block is a sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering.

[0057] For example, after rasterization is completed, a background rendering instruction is triggered. The GPU responds to the background rendering instruction and triggers a scanning process. In the scanning process, related technologies scan each sub-block in the tile one by one. However, for sub-blocks that are completely covered by primitives, invalid scans will occur. When most sub-blocks in the tile are completely covered by primitives, the number of invalid scans will increase, thereby increasing the scanning time and exacerbating the rendering latency. Based on this, the scanning strategy in this application is optimized by marking each sub-block in the tile with background. If the background mark indicates that the sub-block has been completely covered by primitives, it means that there are no background pixels in the sub-block. Therefore, the sub-block can be skipped directly during scanning, thereby avoiding invalid scans of the sub-block, reducing the number of invalid scans, shortening the scanning time, and reducing the scanning latency.

[0058] Using the scanning strategy proposed in this application, upon receiving a background rendering instruction, the GPU can obtain the background flags of each sub-block in each tile. Based on these background flags, it can filter out sub-blocks not completely covered by primitives from the sub-blocks of each tile, designating them as target sub-blocks for which scanning operations need to be performed, thus identifying at least one target sub-block. For example, using a background flag of 0 to indicate the existence of a background area (i.e., the sub-block is not completely covered by primitives) and 1 to indicate the absence of a background area (i.e., the sub-block is completely covered by primitives), the GPU can designate sub-blocks with a background flag of 0 as target sub-blocks for scanning operations. This can be achieved by adding sub-blocks with a background flag of 0 to a target sub-block set, allowing subsequent scanning of each target sub-block in the set sequentially. During the scanning process, sub-blocks with a background flag of 1 (i.e., those completely covered by primitives) can be skipped, avoiding invalid scanning of these completely covered sub-blocks.

[0059] For example, target sub-blocks selected by background markers are used for subsequent background rendering.

[0060] For example, for each tile, the GPU can determine the set of target sub-tiles corresponding to each tile. During scanning, each tile can be scanned sequentially, such as scanning each target sub-tile in the current tile according to the set of target sub-tiles corresponding to the current tile, and obtaining the scanning results of each target sub-tile in the current tile. For example, the scanning results of the target sub-tiles may include target pixels not covered by primitives and background rendering data corresponding to each target pixel, such as depth, template value, and related material indexes.

[0061] For example, when all sub-blocks corresponding to a given tile are completely covered by primitives, meaning there are no target sub-blocks not completely covered by primitives, the tile can still be marked with a background marker, such as a marker of 1, indicating that the tile has been completely covered by primitives and there are no background pixels that constitute a background area. In this case, a set of tiles to be scanned can also be created, which includes scanned tiles that are not completely covered by primitives. When the GPU performs a scan, it can first determine the target tile to be scanned from the tile set, and then sequentially determine the target sub-blocks to be scanned from the set of target sub-blocks corresponding to that target tile. Through this marking process, during the scanning phase, not only can tiles completely covered by primitives be skipped directly, but also sub-blocks completely covered by primitives within the tiles to be scanned can be skipped directly, thus improving scanning efficiency.

[0062] For example, the GPU can also add the target sub-blocks in each tile that needs to be scanned to a comprehensive set of target sub-blocks. In this way, when the GPU performs a scanning operation, it can directly determine the target sub-blocks that need to be scanned from the comprehensive set of target sub-blocks in sequence, and scan each target sub-block in sequence.

[0063] For example, after the scan is complete, the GPU can input the scan results of each target sub-block into the shader so that the shader can perform background rendering on each target sub-block based on the scan results of each target sub-block.

[0064] In the above tile processing method, in response to the background rendering instruction, the background flag of each sub-block in each tile is obtained. The background flag is used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive. Based on the background flag of each sub-block, the target sub-block is determined from each sub-block. The target sub-block is the sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering. In the tile processing method proposed in this application embodiment, before performing the scanning operation, during the rasterization process, each sub-block in each tile is pre-marked with a background to indicate whether each sub-block is completely covered by primitives. Based on this, when the scanning operation is triggered based on the background rendering command, the background markers of each sub-block in each tile can be obtained, and the sub-blocks not completely covered by primitives can be selected as target sub-blocks for scanning based on the background markers of each sub-block. That is, during the scanning process, sub-blocks completely covered by primitives can be skipped directly, thereby avoiding invalid scanning of these sub-blocks completely covered by primitives and reducing the scanning time. This method optimizes the scanning process by adjusting the scanning strategy, reduces the number of invalid scans, improves tile processing efficiency, reduces rendering latency, and thus improves the overall efficiency of background rendering.

[0065] In an exemplary embodiment, the process of background marking described above is refined. For example, the rasterization result of the block may include the primitive coverage state of the block under the action of primitives. Based on this, such as... Figure 3 As shown, for the case where there is only one primitive in the rasterization process, the process of "determining the background marker of each sub-block in the block based on the primitive coverage state of the block" involved in step 201 above may include:

[0066] Step 301: In response to a tile being covered by a primitive, determine the first sub-block in the tile that is completely covered by the primitive.

[0067] In this example, when a tile is covered by a primitive, one or more first sub-blocks within the tile that are completely covered by the primitive are determined based on the primitive's coverage state. For example, for each sub-block within the tile, the background marker of the sub-block can be determined based on the primitive's coverage state of each pixel within the sub-block. That is, for each sub-block within the tile, if every pixel in the sub-block is covered by the primitive, then the sub-block can be determined to be completely covered by the primitive, and in this case, the sub-block can be identified as the first sub-block.

[0068] By judging the coverage status of each pixel in the sub-block, one or more first sub-blocks that are completely covered by primitives in the tile can be selected.

[0069] Step 302: Determine the second sub-block based on all sub-blocks of the tile and the first sub-block, and set the background flag of the second sub-block to a value used to indicate that it is not completely covered by the primitive.

[0070] For example, if a first sub-block is determined to be completely covered by a primitive, a second sub-block that is not completely covered by a primitive can be further determined based on all sub-blocks of the block. That is, all other sub-blocks in the block except the first sub-block are regarded as second sub-blocks, and the background flag of each second sub-block is set to a value used to indicate that it is not completely covered by a primitive, such as the binary value 0, the character value false, etc.

[0071] The above describes the case where a tile is covered by a single element. The following section will describe the case where a tile is covered by multiple elements.

[0072] In one exemplary embodiment, such as Figure 4 As shown, for cases with multiple primitives in the rasterization process, the process of "determining the background marker of each sub-block in the block based on the primitive coverage state of the block" involved in step 201 above may include:

[0073] Step 401: In response to a tile being covered by multiple primitives, determine the set of sub-tiles in the tile that are completely covered by each primitive.

[0074] For example, in the rasterization process, when multiple primitives are involved, the block will be covered by multiple primitives respectively. In this case, the set of sub-blocks that are completely covered by each primitive can be determined separately. For example, if the block is covered by primitive 1, primitive 2, and primitive 5, then the set of sub-blocks 1 that is completely covered by primitive 1, the set of sub-blocks 2 that is completely covered by primitive 2, and the set of sub-blocks 3 that is completely covered by primitive 5 can be determined separately.

[0075] When determining the set of sub-blocks where a primitive is completely covered by another primitive, the implementation method described in step 301 above for determining the first sub-block when a block is covered by a primitive can be used. That is, if every pixel within a sub-block of a block is covered by the primitive, that sub-block is determined as the first sub-block, and thus added to the sub-block set. Similarly, each sub-block in the block is checked individually, and sub-blocks completely covered by primitives are added to the corresponding sub-block set, ultimately obtaining the set of sub-blocks where a block is completely covered by a primitive. Using the same method, the set of sub-blocks where a block is completely covered by each primitive can be obtained separately.

[0076] Step 402: Determine the first target set based on each sub-block set and all sub-blocks of the map block.

[0077] The first target set includes sub-blocks in the map that are not completely covered by any primitive.

[0078] For example, when a tile is covered by multiple primitives, after obtaining a set of sub-blocks where the tile is completely covered by each primitive, the union of these sub-block sets can be taken to obtain a second target set. This second target set includes sub-blocks in the tile that are completely covered by any primitive. For instance, if a tile has 3×3 sub-blocks (9 in total, such as sub-blocks 0-9), the set 1 of sub-blocks completely covered by primitive 1 includes sub-blocks {0, 1, 3}, the set 2 of sub-blocks completely covered by primitive 2 includes sub-blocks {1, 2, 5}, and the set 3 of sub-blocks completely covered by primitive 5 includes sub-blocks {2, 4, 5, 6}. Then, by taking the union of sub-block sets 1, 2, and 3, the second target set {0, 1, 2, 3, 4, 5, 6} in the tile can be obtained. In other words, 7 out of the 9 sub-blocks of a tile are completely covered by primitives.

[0079] Next, given a second target set of tiles completely covered by any primitive, a first target set of tiles not completely covered by any primitive can be determined based on the second target set and all sub-tiles of the tile. For example, all sub-tiles of the tile other than those in the second target set can be added to the first target set, i.e., subtracting the second target set from all sub-tiles (sets) of the tile to obtain the first target set. Continuing with the example above, if the tile includes sub-tiles 0-9 and the second target set is {0, 1, 2, 3, 4, 5, 6}, then the subtraction yields the first target set {7, 8}, meaning sub-tiles 7 and 8 are not completely covered by any primitive and require subsequent background rendering.

[0080] Step 403: Set the background flag of each sub-block in the first target set to a value that indicates that it is not completely covered by the primitive.

[0081] For example, for each sub-block in the first target set that is not completely covered by any primitive, such as sub-blocks 7 and 8, the background flag of each sub-block that is not completely covered by any primitive is set to a value used to indicate that it is not completely covered by primitive, such as the binary value 0, the character value false, etc.

[0082] For example, for each sub-block in a tile that is completely covered by any primitive, such as sub-blocks 0, 1, 2, 3, 4, 5, and 6, the background flag of these sub-blocks can be set to a value that indicates that they are completely covered by the primitive, such as the binary value 1 or the character value true.

[0083] For example, during the rasterization process, different primitive information is received at different times. The shapes, sizes, and positions of the primitives corresponding to these primitive information may differ. In other words, the patches and sub-patterns covered by different primitives are different. Different primitives may or may not have overlapping areas. If there is an overlapping area, it means that different primitives may cover the same patch or the same sub-pattern within a patch. For multiple primitives at different times, each time primitive information is received, the rasterization process and background marking operation are triggered.

[0084] For example, upon receiving a first primitive, rasterization processing can be performed on each block based on the first primitive to obtain the primitive coverage state of each block under the action of the first primitive. The primitive coverage state of a block includes the primitive coverage state of each pixel within that block under the action of the first primitive. Based on this, when marking the background of each block separately, the primitive coverage state of each block can be obtained, and for each sub-block within that block, the background marker of that sub-block can be determined based on the primitive coverage state of each pixel within that sub-block under the action of the first primitive.

[0085] For example, based on the primitive coverage state of each pixel in the sub-block under the action of the first primitive, it can be determined whether the sub-block is completely covered by the first primitive, thus obtaining the first coverage result of the sub-block. Then, according to the first coverage result of the sub-block, a background marker is applied to the sub-block to obtain the background marker of the sub-block. Specifically, when determining the first coverage result of the sub-block, it can be determined whether all pixels in the sub-block are covered by the first primitive based on the primitive coverage state of each pixel in the sub-block under the action of the first primitive. If all pixels in the sub-block are covered by the first primitive, it indicates that the sub-block is completely covered by the first primitive, and the first coverage result of the sub-block can be considered complete coverage. If at least one pixel in the sub-block is not covered by the first primitive, it indicates that the sub-block is not completely covered by the first primitive, and the first coverage result of the sub-block can be considered incomplete coverage. In the case of complete coverage, the background marker of the sub-block can be determined as a first marker, and the value of the first marker is a value used to indicate that the sub-block is completely covered by the primitive. In the case of incomplete coverage, the background marker of the sub-block can be determined as a second marker, and the value of the second marker is a value used to indicate that the sub-block is not completely covered by the primitive. For example, in the case of complete coverage, the background flag of the sub-block is 1, and in the case of incomplete coverage, the background flag of the sub-block is 0.

[0086] In one alternative implementation, the default background flag of the sub-block can be empty, such as null. If it is determined that the sub-block is completely covered by the first primitive, the background flag of the sub-block can be set to 1; otherwise, if it is determined that the sub-block is not completely covered by the first primitive, the background flag of the sub-block can be set to 0.

[0087] In another alternative implementation, the default background flag of the sub-block can be a second flag, such as 0. If it is determined that the sub-block is completely covered by the first primitive, the default background flag of the sub-block can be modified to the first flag, such as changing 0 to 1, which can also be called setting 0 to 1; while if it is determined that the sub-block is not completely covered by the first primitive, the default background flag of the sub-block can be maintained, that is, keep 0 unchanged.

[0088] For example, after the first primitive, there may be a second primitive, a third primitive, etc. Assuming that the primitive information of the second primitive is received, the primitive information of the second primitive is used to perform rasterization processing on each block, and the primitive coverage state of each block under the action of the second primitive is obtained. The primitive coverage state of the block may include the primitive coverage state of each pixel in the block under the action of the second primitive. Furthermore, for each sub-block in each block, it can be determined whether each pixel in the sub-block is covered by the second primitive based on the primitive coverage state of each pixel in the sub-block under the action of the second primitive. Based on the second coverage result of the sub-block, the sub-block is marked with a background to obtain the background mark of the sub-block.

[0089] For example, if the second coverage result of a sub-block is a complete coverage, the background flag of the sub-block can be set to 1. In this case, regardless of whether the sub-block is set to 1 under the action of the first primitive, it will not affect skipping the sub-block during the scanning phase. If the second coverage result of a sub-block is not a complete coverage, it is necessary to determine whether the sub-block is set to 1 under the action of the first primitive. If it has been set to 1, the background flag of the sub-block should remain unchanged because, although the sub-block is not completely covered by the second primitive, it has been completely covered by the first primitive, and it should be skipped directly during the scanning phase. If the sub-block is not completely covered by the first primitive, its background flag is still 0, and it should continue to be 0. That is to say, the sub-block is neither completely covered by the first primitive nor completely covered by the second primitive.

[0090] In another alternative implementation, the GPU can also determine whether all pixels in a sub-block are covered by the second primitive based on the primitive coverage information of each pixel in the sub-block under the action of the second primitive, only for sub-blocks whose background flag is the second primitive (e.g., 0, meaning not completely covered by the first primitive). If the sub-block is completely covered by the second primitive, the background flag of the sub-block is set to the first primitive, such as 1; if the sub-block is not completely covered by the second primitive, the second primitive of the sub-block is maintained, such as 0.

[0091] For example, for subsequent third and fourth primitives, the background marking process corresponding to the second primitive can be referred to to continue marking the background of each sub-block in each block until the last primitive.

[0092] It should be noted that, since the background marking is performed separately for each primitive rasterization process in this embodiment, only sub-blocks completely covered by a single primitive can be effectively marked, so that only sub-blocks completely covered by a single primitive can be skipped during subsequent scanning. For sub-blocks completely covered by multiple primitives combined together, they cannot be effectively marked. Such sub-blocks need to be scanned during the scanning process, but after the scanning is completed, it will be identified that the sub-block does not have background pixels and will not be passed to the coloring stage.

[0093] This embodiment details the process of background marking for each sub-block within each tile. By marking each sub-block, it indicates whether it is completely covered by a certain primitive, providing a basis for judgment in the subsequent scanning stage. This allows the scanning process to directly skip sub-blocks completely covered by a primitive, avoiding invalid scanning operations on these sub-blocks. This significantly reduces scanning time, lowers rendering latency, and ultimately improves background rendering efficiency. Furthermore, for the GPU, using lower resource consumption to record background rendering flags achieves the goal of reducing latency during rendering, improving overall latency performance while minimizing resource consumption.

[0094] In other implementations, it's also possible to consider judging sub-blocks covered by multiple primitives and effectively marking sub-blocks completely covered by multiple primitives. This allows all sub-blocks completely covered by primitives to be successfully skipped in subsequent scanning phases, minimizing scanning time, further reducing rendering latency, and improving background rendering efficiency. For example, this judgment strategy could include: for each sub-block within each block, combining the primitive coverage information of each pixel of that sub-block under the influence of the current primitive and all preceding primitives, determining whether each pixel in the sub-block is covered by all primitives. If so, the background flag of the sub-block is set to 1; otherwise, the background flag remains 0.

[0095] In an exemplary embodiment, after step 202 "determining the target sub-block from each sub-block based on the background flags of each sub-block" described above, the method may further include:

[0096] Identify the target pixels in each target sub-block that are not covered by any primitives. These target pixels are used for background rendering.

[0097] In this example, since the background markings of each sub-block in each tile have been performed during the rasterization process, and at the start of the scan, target sub-blocks not completely covered by primitives have been filtered out based on the background markings of each sub-block, some of these target sub-blocks are completely uncovered by any primitives, while others may be covered by one or more primitives but not completely, or they may be completely covered by multiple primitives. For these target sub-blocks, further scanning is needed to determine the target pixels not covered by any primitives. Since the target pixels are not covered by any primitives, they belong to the background pixels, and background rendering is required for these target pixels.

[0098] For example, for each target sub-block, the GPU can obtain the primitive coverage state of each pixel in the target sub-block. Here, the primitive coverage state of a pixel can be the comprehensive coverage state obtained after the rasterization stage, after the interaction of all primitives. For example, if some pixels are covered by one primitive, the primitive coverage state of that pixel can include the relevant information of that primitive; if some pixels are covered by multiple primitives, the primitive coverage state of that pixel can include the relevant information of multiple primitives; if some pixels are not covered by any primitives, the primitive coverage state of that pixel can be empty or none. Based on the primitive coverage state of each pixel in the target sub-block, pixels that are not covered by any primitives can be identified, and these pixels can be used as target pixels for subsequent background rendering.

[0099] For example, for a target pixel, the background rendering data corresponding to the target pixel can be further determined, including but not limited to depth, template value and related material index. In this embodiment, the method of obtaining background rendering data is not described in detail, but can be implemented using related technologies.

[0100] Furthermore, for the identified target pixel, the target pixel and its corresponding background rendering data can be sent to the subsequent fragment shader to instruct the fragment shader to perform background rendering on the target pixel based on the background rendering data.

[0101] For example, if there are target pixels in the target sub-block, it means that there is a background area in the target sub-block, which needs to be further transmitted to the shader for background shading. In this case, the GPU can send the target pixels in the target sub-block and the corresponding background rendering data to the fragment shader so that the fragment shader can perform background rendering on the target pixels in the target sub-block based on the background rendering data.

[0102] For example, in the case where it is determined that there is no target pixel in the target sub-block, that is, in the scheme of marking the background based on multiple primitives, there are sub-blocks that are completely covered by the combination of multiple primitives. If these sub-blocks are not filtered out in the first filtering sub-stage, they cannot be skipped directly in the second scanning sub-stage. By scanning these target sub-blocks, these target sub-blocks can be skipped during background rendering, so as to truly achieve accurate rendering of the background area, reduce the burden of the fragment shading stage, and improve the background rendering efficiency.

[0103] It should be noted that in this embodiment, the scanning stage can be divided into two sub-stages, including a first filtering sub-stage and a second scanning sub-stage. The first filtering sub-stage can perform fast filtering based on the background markers of each sub-block, while the second scanning sub-stage can perform fast scanning of target sub-blocks that are not completely covered by primitives based on the filtering results. Sub-blocks that are completely covered by primitives can be skipped directly, which can accelerate the scanning speed and improve the scanning efficiency.

[0104] In this embodiment, during the actual scanning phase, i.e. the second scanning sub-phase, the GPU scans and identifies the target pixels that are not fully covered by primitives for those target sub-blocks, and adds background rendering data to the target pixels. Then, after all target sub-blocks of each block have been scanned, the shading process can be started to render and display the background area. Using this method, the latency from rasterization to the shading phase can be greatly reduced, the background rendering processing speed can be accelerated, and the overall latency performance of background rendering can be improved.

[0105] The above method will be explained with a specific example below. During the rasterization process, that is, while the GPU is waiting for all visibility information, it records whether each sub-block in the tile is completely covered by a certain geometric primitive. If it is completely covered, the background flag of the sub-block is recorded as 1, and it can be skipped directly in subsequent scanning processes.

[0106] refer to Figure 5 As shown, suppose a tile is divided into 64 sub-tiles. Sub-tiles 2 / 9 / 10 / 11 / 17 / 18 / 19 / 20 / 24 / 25 / 26 / 27 / 28 / 29 / 36 / 37 / 38 are completely covered by primitive 0; sub-tiles 5 / 6 / 7 / 13 / 14 / 15 / 21 / 22 / 23 / 29 / 30 / 37 / 38 / 45 are completely covered by primitive 1; and sub-tiles 48 / 49 / 50 / 57 are completely covered by primitive 2. Based on these three statistical analyses, a total of 32 sub-tiles are completely covered by a single primitive. In existing technologies, these sub-tiles need to be scanned one by one and a coverage test performed before being discarded. However, in the technical solution of this application, they can be skipped directly during the scanning process. In the above example, using the technical solution of this application can reduce the latency caused by background scanning by 50%.

[0107] The method proposed in this application optimizes the scanning process by reducing invalid scans, thereby shortening the visibility determination delay, improving the tile processing speed, and significantly reducing the processing latency within a tile, thus improving the overall TBDR rendering efficiency. It also has the advantages of being simple to implement and consuming few circuit resources.

[0108] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0109] Based on the same inventive concept, this application also provides a tile processing apparatus for implementing the tile processing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more tile processing apparatus embodiments provided below can be found in the limitations of the tile processing method described above, and will not be repeated here.

[0110] In one exemplary embodiment, such as Figure 6 As shown, a tile processing device is provided, including: an acquisition module 601 and a first determination module 602, wherein:

[0111] The acquisition module 601 is used to acquire the background flag of each sub-block in each tile in response to the background rendering command; the background flag is used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive.

[0112] The first determining module 602 is used to determine a target sub-block from each sub-block based on the background marker of each sub-block; wherein, the target sub-block is a sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering.

[0113] In one embodiment, before the acquisition module 601 acquires the background markers of each sub-block in each tile in response to the background rendering command, the apparatus further includes:

[0114] The second determining module is used to determine the background marker of each sub-block in the rasterization process based on the primitive coverage state of the block.

[0115] In one embodiment, the second determining module is specifically configured to, in response to a tile being covered by a primitive, determine a first sub-block in the tile that is completely covered by the primitive; determine a second sub-block based on all sub-blocks of the tile and the first sub-block; and set the background flag of the second sub-block to a value used to indicate that it is not completely covered by the primitive.

[0116] In one embodiment, the second determining module is specifically configured to, in response to a tile being covered by multiple elements, determine a set of sub-blocks in the tile that are completely covered by each element; determine a first target set based on each set of sub-blocks and all sub-blocks of the tile; and set the background flag of each sub-block in the first target set to a value indicating that it is not completely covered by elements.

[0117] In one embodiment, the second determining module is specifically used to take the union of each set of sub-blocks to obtain a second target set; and to determine a first target set based on the second target set and all sub-blocks of the map.

[0118] In one embodiment, the second determining module is specifically used to determine the background marker of each sub-block in the tile based on the coverage state of each pixel in the sub-block by each primitive covering the tile.

[0119] In one embodiment, after the first determining module 602 determines the target sub-block from the sub-blocks based on the background markers of each sub-block, the apparatus further includes:

[0120] The third determination module is used to determine the target pixels in each target sub-block that are not covered by any primitives. These target pixels are used for background rendering.

[0121] Each module in the aforementioned tile processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0122] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a tile processing method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0123] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0124] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0125] In response to the background rendering command, obtain the background flag of each sub-block in each tile; the background flag is used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive;

[0126] Based on the background markers of each sub-block, the target sub-block is determined from each sub-block; wherein, the target sub-block is the sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering.

[0127] In an exemplary embodiment, before the processor executes the computer program to obtain the background flags of each sub-block in each tile in response to a background rendering instruction, the following steps are also performed:

[0128] During the rasterization process, for each tile, the background markers of each sub-tile in the tile are determined based on the primitive coverage state of the tile.

[0129] In one exemplary embodiment, the processor further performs the following steps when executing the computer program:

[0130] In response to a tile being covered by a primitive, determine the first sub-tile in the tile that is completely covered by the primitive;

[0131] The second sub-block is determined based on all sub-blocks of the tile and the first sub-block, and the background flag of the second sub-block is set to a value used to indicate that it is not completely covered by the primitive.

[0132] In one exemplary embodiment, the processor further performs the following steps when executing the computer program:

[0133] In response to a tile being covered by multiple primitives, determine the set of sub-tiles in the tile that are completely covered by each primitive;

[0134] The first target set is determined based on each set of sub-blocks and all sub-blocks of the map;

[0135] Set the background flag of each sub-block in the first target set to a value that indicates that it is not completely covered by primitives.

[0136] In one exemplary embodiment, the processor further performs the following steps when executing the computer program:

[0137] The second target set is obtained by taking the union of the sets of each sub-block;

[0138] The first target set is determined based on the second target set and all sub-blocks of the tile.

[0139] In one exemplary embodiment, the processor further performs the following steps when executing the computer program:

[0140] For each sub-block in the map, the background marker of the sub-block is determined based on the coverage state of each pixel in the sub-block by each primitive of the map covering the map.

[0141] In an exemplary embodiment, after determining the target sub-block from each sub-block based on the background flags of each sub-block, the processor further performs the following steps when executing the computer program:

[0142] Identify the target pixels in each target sub-block that are not covered by any primitives. These target pixels are used for background rendering.

[0143] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0144] In response to the background rendering command, obtain the background flag of each sub-block in each tile; the background flag is used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive;

[0145] Based on the background markers of each sub-block, the target sub-block is determined from each sub-block; wherein, the target sub-block is the sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering.

[0146] In an exemplary embodiment, before the computer program is executed by the processor to obtain the background flags of each sub-block in each tile in response to a background rendering instruction, the following steps are also performed:

[0147] During the rasterization process, for each tile, the background markers of each sub-tile in the tile are determined based on the primitive coverage state of the tile.

[0148] In one exemplary embodiment, when the computer program is executed by the processor, it further performs the following steps:

[0149] In response to a tile being covered by a primitive, determine the first sub-tile in the tile that is completely covered by the primitive;

[0150] The second sub-block is determined based on all sub-blocks of the tile and the first sub-block, and the background flag of the second sub-block is set to a value used to indicate that it is not completely covered by the primitive.

[0151] In one exemplary embodiment, when the computer program is executed by the processor, it further performs the following steps:

[0152] In response to a tile being covered by multiple primitives, determine the set of sub-tiles in the tile that are completely covered by each primitive;

[0153] The first target set is determined based on each set of sub-blocks and all sub-blocks of the map;

[0154] Set the background flag of each sub-block in the first target set to a value that indicates that it is not completely covered by primitives.

[0155] In one exemplary embodiment, when the computer program is executed by the processor, it further performs the following steps:

[0156] The second target set is obtained by taking the union of the sets of each sub-block;

[0157] The first target set is determined based on the second target set and all sub-blocks of the tile.

[0158] In one exemplary embodiment, when the computer program is executed by the processor, it further performs the following steps:

[0159] For each sub-block in the map, the background marker of the sub-block is determined based on the coverage state of each pixel in the sub-block by each primitive of the map covering the map.

[0160] In an exemplary embodiment, after determining the target sub-block from each sub-block based on the background flags of each sub-block, the computer program, when executed by the processor, further performs the following steps:

[0161] Identify the target pixels in each target sub-block that are not covered by any primitives. These target pixels are used for background rendering.

[0162] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0163] In response to the background rendering command, obtain the background flag of each sub-block in each tile; the background flag is used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive;

[0164] Based on the background markers of each sub-block, the target sub-block is determined from each sub-block; wherein, the target sub-block is the sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering.

[0165] In an exemplary embodiment, before the computer program is executed by the processor to obtain the background flags of each sub-block in each tile in response to a background rendering instruction, the following steps are also performed:

[0166] During the rasterization process, for each tile, the background markers of each sub-tile in the tile are determined based on the primitive coverage state of the tile.

[0167] In one exemplary embodiment, when the computer program is executed by the processor, it further performs the following steps:

[0168] In response to a tile being covered by a primitive, determine the first sub-tile in the tile that is completely covered by the primitive;

[0169] The second sub-block is determined based on all sub-blocks of the tile and the first sub-block, and the background flag of the second sub-block is set to a value used to indicate that it is not completely covered by the primitive.

[0170] In one exemplary embodiment, when the computer program is executed by the processor, it further performs the following steps:

[0171] In response to a tile being covered by multiple primitives, determine the set of sub-tiles in the tile that are completely covered by each primitive;

[0172] The first target set is determined based on each set of sub-blocks and all sub-blocks of the map;

[0173] Set the background flag of each sub-block in the first target set to a value that indicates that it is not completely covered by primitives.

[0174] In one exemplary embodiment, when the computer program is executed by the processor, it further performs the following steps:

[0175] The second target set is obtained by taking the union of the sets of each sub-block;

[0176] The first target set is determined based on the second target set and all sub-blocks of the tile.

[0177] In one exemplary embodiment, when the computer program is executed by the processor, it further performs the following steps:

[0178] For each sub-block in the map, the background marker of the sub-block is determined based on the coverage state of each pixel in the sub-block by each primitive of the map covering the map.

[0179] In an exemplary embodiment, after determining the target sub-block from each sub-block based on the background flags of each sub-block, the computer program, when executed by the processor, further performs the following steps:

[0180] Identify the target pixels in each target sub-block that are not covered by any primitives. These target pixels are used for background rendering.

[0181] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data that have been fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0182] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0183] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0184] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for processing image blocks, characterized in that, The method includes: In response to a background rendering command, the background flag of each sub-block in each tile is obtained; the background flag is used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive. Based on the background flags of each sub-block, a target sub-block is determined from each sub-block; wherein, the target sub-block is a sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering.

2. The method according to claim 1, characterized in that, Before obtaining the background markers of each sub-block in each tile in response to the background rendering instruction, the method further includes: For each of the aforementioned blocks, a background flag for each of the sub-blocks within the block is determined based on the primitive coverage state of the block.

3. The method according to claim 2, characterized in that, The step of determining the background marker of each sub-block in the map based on the primitive coverage state of the map includes: In response to the tile being covered by a primitive, the first sub-block in the tile that is completely covered by the primitive is determined; The second sub-block is determined based on all sub-blocks of the given block and the first sub-block, and the background flag of the second sub-block is set to a value that indicates that it is not completely covered by the primitive.

4. The method according to claim 2, characterized in that, The step of determining the background marker of each sub-block in the map based on the primitive coverage state of the map includes: In response to the tile being covered by multiple primitives, determine the set of sub-blocks in the tile that are completely covered by each of the primitives; A first target set is determined based on each of the sub-block sets and all the sub-blocks of the map block; Set the background flag of each sub-block in the first target set to a value that indicates that it is not completely covered by primitives.

5. The method according to claim 4, characterized in that, Determining the first target set based on each of the sub-block sets and all sub-blocks of the tile includes: The second target set is obtained by taking the union of each of the sub-block sets; The first target set is determined based on the second target set and all sub-blocks of the tile.

6. The method according to claim 2, characterized in that, The step of determining the background marker of each sub-block in the map based on the primitive coverage state of the map includes: For each sub-block in the image block, the background marker of the sub-block is determined based on the coverage state of each pixel in the sub-block by each primitive covering the image block.

7. A tile processing device, characterized in that, The device includes: The acquisition module is used to acquire the background flag of each sub-block in each tile in response to the background rendering command; the background flag is used to indicate whether the sub-block to which the background flag belongs is completely covered by at least one primitive. The first determining module is used to determine a target sub-block from each of the sub-blocks based on the background markers of each sub-block; wherein the target sub-block is a sub-block that is not completely covered by primitives, and the target sub-block is used for background rendering.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.