Graphic Rendering Method, Graphics Processor, and Storage Medium

By continuously drawing operations on the target tile, the sampling range is expanded and stored in the frame buffer space, the problems of low rendering performance and high energy consumption in the prior art are solved, and a more efficient rendering effect is achieved.

CN114067039BActive Publication Date: 2025-07-22MOORE THREADS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111395667.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-23
Publication Date
2025-07-22
Estimated Expiration
2041-11-23

AI Technical Summary

Technical Problem

In the prior art, when rendering an image, the graphics processor can only sample pixel points at the same coordinate position due to adjacent drawing operations, resulting in low rendering performance and high energy consumption.

Method used

By performing multiple consecutive drawing operations on the target tile, the sampling range of each drawing operation is expanded, the intermediate display data of the previous drawing operation is used as the sampling search area, and the final display data is stored in the frame buffer space outside the graphics processor.

Benefits of technology

Improve rendering performance and significantly reduce energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114067039B_ABST
    Figure CN114067039B_ABST
Patent Text Reader

Abstract

The present application discloses a graphics rendering method, a graphics processor, and a storage medium. In this method, continuous multiple drawing operations are performed on a target tile to obtain display data of the target tile in a frame of an image to be displayed. Among the continuous multiple drawing operations, except for the first drawing operation, in each drawing operation when determining the display data of each pixel point of the target tile, the coordinate regions included in the intermediate display data obtained from the previous drawing operation and belonging to the target coordinate region can be used as sampling search regions. The target coordinate region is the coordinate region of the target tile, and the intermediate display data is stored in the tile buffer space within the graphics processor; the display data of the target tile finally determined by the continuous multiple drawing operations is stored in the frame buffer space outside the graphics processor. This method significantly reduces rendering energy consumption and improves rendering performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a graphics rendering method, a graphics processing unit, and a storage medium. Background Art

[0002] Limited by the hardware processing capabilities of mobile devices, when a graphics processing unit (GPU) renders a frame of an image, it usually divides the entire display area into multiple tiles. For the currently processed tile (referred to as the target tile in this article), multiple drawing operations (commonly known as multiple Passes in the industry) are sequentially performed inside the GPU. The multiple drawing operations are, for example, a rasterization operation Lighting, a blurring operation Blur, and an anti-aliasing operation TAA in sequence. The drawing result of each drawing operation is saved in a tile buffer space outside the GPU as the starting point for the next drawing operation.

[0003] In the prior art, during two adjacent drawing operations, when the subsequent drawing operation processes a certain pixel point, it can only sample the pixel point at the same coordinate position in the tile buffer space. Refer to Figure 1 , the rendering order is Pass1Tile1 -> Pass2Tile1 -> Pass3Tile1 -> Pass1Tile2 -> Pass2Tile2 -> Pass3Tile2. However, most drawing operations need to sample pixel points at other positions, which results in low rendering operation performance. Summary of the Invention

[0004] This application provides a graphics rendering method, apparatus, and storage medium to at least partially solve the technical problems existing in the prior art.

[0005] To solve the above problems, the technical solutions provided in this application are as follows.

[0006] In a first aspect, an embodiment of this application provides a graphics rendering method, including:

[0007] Performing multiple consecutive drawing operations on a target tile to obtain display data of the target tile in a frame of an image to be displayed, where, in the multiple consecutive drawing operations, except for the first drawing operation, when determining the display data of each pixel point of the target tile in each drawing operation, any coordinate region in the intermediate display data obtained from the previous drawing operation that contains the target coordinate region can be used as a sampling search region, the target coordinate region is the coordinate region of the target tile, and the intermediate display data is stored in a tile buffer space inside the graphics processing unit;

[0008] Storing the display data of the target tile finally determined by the multiple consecutive drawing operations in a frame buffer space outside the graphics processing unit

[0009] In a second aspect, an embodiment of the present application provides a graphics processor, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method according to any one of the above-mentioned first aspect and its various possible implementation manners.

[0010] In a third aspect, the present application provides a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method according to any one of the above-mentioned first aspect and its various possible implementation manners.

[0011] Compared with the prior art, in the embodiment of the present application, in two adjacent drawing operations, when the subsequent drawing operation processes each pixel point, the search range of the sampling points is expanded. The rendering performance is improved, and the energy consumption is significantly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:

[0013] Figure 1 FIG. is a schematic diagram of a sampling operation of a tile-based graphics rendering method in the prior art.

[0014] Figure 2 FIG. is a flowchart of the graphics rendering method according to an embodiment of the present application.

[0015] Figure 3 FIG. is a schematic diagram of a sampling operation of the graphics rendering method according to an embodiment of the present application.

[0016] Figure 4 FIG. is a schematic diagram of the structure of data stored in the tile buffer space according to an embodiment of the present application.

[0017] Figure 5 FIG. is a schematic diagram of the complete rendering process according to an embodiment of the present application.

[0018] Figure 6 FIG. is a schematic diagram of the structure of the rendering device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] In order to more clearly illustrate the overall concept of the present application, the following is a detailed description by way of example in conjunction with the drawings of the specification.

[0020] In this application, it should be understood that terms such as "including" or "having" are intended to indicate the presence of features, numbers, steps, actions, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the presence of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.

[0021] In addition, it should be noted that, without conflict, the embodiments in this application and the features in the embodiments may be combined with each other. The following will describe this application in detail with reference to the drawings and in combination with the embodiments.

[0022] Reference Figure 2 , embodiments of this application provide a graphics rendering method, including:

[0023] Step 101: Perform consecutive multiple drawing operations on a target tile to obtain display data of the target tile in a frame of the image to be displayed. Wherein, in the consecutive multiple drawing operations, except for the first drawing operation, in each drawing operation when determining the display data of each pixel point of the target tile, the coordinate regions in the intermediate display data obtained from the previous drawing operation that contain the target coordinate region can be used as the sampling search region. The target coordinate region is the coordinate region of the target tile, and the intermediate display data is stored in the tile buffer space in the graphics processor;

[0024] Step 102: Store the display data of the target tile finally determined by the consecutive multiple drawing operations in the frame buffer space outside the graphics processor.

[0025] For example, when performing a second drawing operation on a tile, when drawing a certain pixel point, all pixels within the tile can be sampled, but which pixels are actually sampled can be determined according to the actual needs of the second drawing operation.

[0026] Existing hardware architectures can only sample the display data at the same coordinate position when processing the sampling of adjacent drawing operations. This does not meet the requirements of current scenarios such as games. This results in the inability to sample within the target tile in many scenarios. Therefore, the intermediate display data is placed in the frame buffer space of the video memory outside the image processor, and sampling needs to be performed in the frame buffer space. The graphics rendering method of this application expands the sampling range that each pixel point can sample. In two adjacent drawing operations, in the subsequent drawing operation when processing each pixel point, the search range of the sampling points is expanded, thereby improving the rendering performance and reducing the energy consumption.

[0027] Optionally, in the consecutive multiple drawing operations, except for the first drawing operation, in each sampling operation in each drawing operation, each pixel to be drawn within the target tile can sample the display data of any pixel point within the target tile.

[0028] For example, referring to Figure 3 , when processing the first pixel pixel1 of tile Tile1 in the second drawing operation, the sampling range is expanded to the entire tile Tile1, so that the success rate of sampling can be greatly improved.

[0029] Continuing to refer to Figure 3 , such as when processing pixel pixel5 of the tile in the second drawing operation, the sampling success rate is greater than that of pixel pixel1. Because the sampling point corresponding to pixel pixel1 may be located outside the area where tile Tile1 is located.

[0030] In view of this, in some optimized embodiments, in the continuous multiple drawing operations, except for the last drawing operation, the drawing area includes the area where the target tile is located and the outer area surrounding the area where the target tile is located, and there is no gap between the area where the target tile is located and the outer area; in the continuous multiple drawing operations, except for the first drawing operation, during each sampling operation in each drawing operation, each pixel to be drawn in the target tile can sample the display data of any pixel point in the area where the target tile is located and the outer area.

[0031] For example, referring to Figure 4 , the area where a ring of pixels outside pixels pixel1 to 9 is located is the outer area. In this way, when processing pixel pixel1 of Pass2, the pixel values in the outer area can also be sampled.

[0032] The outer area can be a ring of pixels, two rings of pixels or more rings of pixels. In this article, the width of a ring of pixels is one pixel. The following provides a method for determining the size of the outer area.

[0033] It should be noted that the display data of the outer area is not written into the frame buffer.

[0034] First, determine the minimum rectangular search range used when determining the display data of each pixel point in each drawing operation except the first drawing operation in the continuous multiple drawing operations;

[0035] Calculate the number of rings M of the outer area according to the following formula:

[0036] M = ,

[0037] where k is the serial number of the drawing operation, n is the number of drawing operations in the continuous multiple drawing operations, and P k is the size of the minimum rectangular search range when determining the display data of each pixel point in the kth drawing operation and is an odd number.

[0038] For example, when Pass 2 processes each pixel, it accesses at least the pixels within a 3×3 rectangular area centered on that pixel in the operation result of Pass 1. When Pass 3 processes each pixel, it accesses at least the pixels within a 5×5 rectangular area centered on that pixel in the operation result of Pass 1. Then the width of the peripheral area in the four directions is 3. The calculation process is: (3 - 1) / 2 + (5 - 1) / 2 = 3.

[0039] Specifically, the continuous multiple drawing operations include at least two of the following operations: rasterization operation, blurring operation, and anti-aliasing operation.

[0040] The following introduces an application example of the above image drawing method.

[0041] Reference Figure 5 , it is set that one frame of the screen is completed by 2 drawing operations. The first drawing operation draws the basic objects, and the second drawing operation performs anti-aliasing. The entire screen is divided into 9 tiles, and the 9 tiles are arranged in a 3×3 matrix. Each tile contains 9 pixels, and the 9 pixels are arranged in a 3×3 matrix. After performing the above two drawing operations on the same tile in sequence, the display data of the tile is written into the video memory outside the graphics processor.

[0042] For the first drawing operation of tile Tile5, in addition to drawing 9 pixel points Pixel1 to 9, 16 peripheral pixels Pixel0 are also drawn. These peripheral pixels Pixel0 will be drawn and stored in the tile buffer space, but will not be written to the frame buffer space. After we complete the object rendering of tile Tile5, we immediately perform the anti-aliasing drawing of tile Tile5. The anti-aliasing algorithm requires that for each pixel point, 9 surrounding pixel points including itself need to be sampled, and then the final color of the pixel point is obtained through comprehensive calculation. Therefore, for pixel pixel1 of tile Tile5 in the anti-aliasing drawing operation, we need to sample pixel pixel1, pixel2, pixel4, pixel5 obtained after the object rendering operation, and 5 pixels pixel0 in the peripheral area. The data of these pixels are all stored in the tile buffer space Tile buffer on the graphics processor chip. Therefore, in the anti-aliasing drawing operation, the required data is directly read from the tile buffer space Tile buffer on the chip, and then the color of pixel pixel1 is calculated and also stored on the tile buffer space Tile Buffer on the chip. Finally, when the anti-aliasing drawing operations of the 9 pixels of tile Tile5 are all completed, the display data of tile 5 is written into the frame buffer space.

[0043] Of course, in Figure 5In the first drawing operation of the tiles other than Tile5, some of the pixels in the drawn peripheral area exceed the display range of one frame of the picture.

[0044] In the old algorithm, the data in the peripheral area needs to be fetched from the off-chip storage system, which is slow and energy-consuming.

[0045] Reference Figure 6 , this application provides a graphics processor, including a memory 1, a processor 2, and a computer program stored on the memory 1 and executable on the processor 2. When the processor 2 executes the computer program, it implements the method of any one of the above various possible implementation manners.

[0046] This application provides a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method of any one of the above various possible implementation manners.

[0047] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the entity embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

[0048] Those skilled in the art should also be able to further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0049] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the technical field.

[0050] The above are only the embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A graphics rendering method, characterized in that, Applied to a graphics processor, the method includes: Performing continuous multiple rendering operations on a target tile to obtain display data of the target tile in a frame of an image to be displayed. Among the continuous multiple rendering operations, except for the first rendering operation, when determining the display data of each pixel point of the target tile in each rendering operation, the coordinate region of the target coordinate region, which is the coordinate region of the target tile, in the intermediate display data obtained from the previous rendering operation is used as a sampling search region, and the intermediate display data is stored in a tile buffer space within the graphics processor; Storing the display data of the target tile finally determined by the continuous multiple rendering operations in a frame buffer space outside the graphics processor; Among the continuous multiple rendering operations, except for the last rendering operation, the rendering region includes the region where the target tile is located and the peripheral region surrounding the region where the target tile is located, and there is no gap between the region where the target tile is located and the peripheral region; wherein, during the rendering operation of the display data of the target tile, the data generated by rendering the peripheral region is stored in the tile buffer space and not written into the frame buffer space; Among the continuous multiple rendering operations, except for the first rendering operation, during each sampling operation in each rendering operation, the sampling range of each pixel to be rendered within the target tile includes the display data of multiple pixel points in the region where the target tile is located and the peripheral region; 2. The method according to claim 1, wherein The size of the peripheral region is determined in the following manner: Determining the minimum rectangular search range used when determining the display data of each pixel point in each rendering operation except the first rendering operation among the continuous multiple rendering operations; Calculating the number of rings M of the peripheral region according to the following formula: where k is the serial number of the drawing operation, n is the number of drawing operations in the continuous multiple drawing operations, and P k is the size of the minimum rectangle search range when determining the display data of each pixel point in the k-th drawing operation and is an odd number, and the width of one ring of pixels is one pixel.

3. The method according to claim 1, wherein The continuous multiple rendering operations include at least two operations among rasterization operation, blurring operation, and anti-aliasing operation; 4. An image processor, characterized in that, Including a storage, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented; 5. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 3 is implemented.