Graphics processor, system, method, electronic device and electronic device

By calculating and storing rasterization equations in advance before tile division, the problem of hardware processing delay and increased workload caused by graphics elements covering multiple tiles is solved, and the rendering efficiency of the GPU is improved.

CN116957898BActive Publication Date: 2024-10-18XIANGDIXIAN COMPUTING TECH (CHONGQING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210409557.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2024-10-18
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

The tile-based GPU architecture has the problem of heavy hardware processing workload and increased latency due to the pixels covering multiple tiles during the rasterization process.

Method used

The rasterization equation is calculated in advance before the tiles are divided, and the attribute information of the graphics element is stored, including the rasterization equation results, to avoid repeated calculation of the rasterization equation coefficients for each tile, improve hardware processing speed, and reduce bandwidth power consumption.

Benefits of technology

It reduces the delay and hardware workload of primitive rasterization and improves the rendering efficiency of GPU.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116957898B_ABST
    Figure CN116957898B_ABST
Patent Text Reader

Abstract

The present disclosure provides a graphics processor, system, method, electronic device and electronic device. The graphics processor adopts a tile-based rendering architecture, including a primitive information calculation module, which is configured to: calculate the rasterization equation coefficient of the primitive according to the first attribute information of the primitive in the image frame, wherein the first attribute information includes attribute information obtained by geometric processing; a tile division module, which is configured to: perform tile division processing on the primitive in the image frame; and a pixel information processing module, which is configured to: perform pixel rasterization processing on the primitive covering the tile according to the rasterization equation coefficient of the primitive covering the tile block by block. The present disclosure reduces the hardware processing workload and rasterization processing delay of a graphics processor adopting a tile-based rendering architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Using a tile-based GPU architecture can reduce the memory bandwidth requirements during rendering. For a tile-based GPU architecture, rasterization and pixel processing are performed tile by tile at the tile granularity. During the rasterization process, the pixel depth buffer information, color buffer information, and other information in a tile are stored in on-chip buffers.

[0003] Tiles are divided based on screen coordinates. Therefore, for a frame of image, the coordinates of the primitives are first converted to screen coordinates through geometric processing before the tiles are divided. The tile information data structure (such as tile list) of the tile saves the index of the primitive covering the tile, and the primitive index points to the primitive information data structure of the primitive. The primitive information data structure saves the attribute information of the primitive, such as the coordinate information of the primitive vertex, the color information of the primitive vertex, etc.

[0004] In the rasterization stage, the pixels covered by the primitives are determined, and the attribute information of the pixels covered by the primitives is determined by interpolation calculation. In some rendering processes, the rasterization stage also performs depth calculations. The above processing in the rasterization stage requires calculation processing based on the attribute information of the primitives output by the geometry processing stage.

[0005] When a primitive covers multiple tiles, the attribute information of the primitive needs to be repeatedly calculated in the rasterization stage of each tile, which results in a large workload for hardware processing and also causes delays in rasterization processing. Summary of the invention

[0006] The purpose of the present disclosure is to provide a graphics processor, a graphics processing system, an electronic device, an electronic device and a graphics processing method, so as to reduce the hardware processing workload and rasterization processing delay of a graphics processor adopting a tile-based rendering architecture.

[0007] According to one aspect of the present disclosure, a graphics processor is provided, which adopts a tile-based rendering architecture, and the graphics processor at least includes:

[0008] The primitive information calculation module is configured to: calculate the coefficients of the rasterization equation of the primitive according to the first attribute information of the primitive in the image frame, wherein the first attribute information includes the attribute information after geometric processing;

[0009] The block division module is configured to: perform block division processing on the image elements in the image frame;

[0010] The pixel information processing module is configured to perform pixel rasterization processing on the image primitives of the covered image block according to the rasterization equation coefficients of the image primitives of the covered image block block by block.

[0011] Optionally, the first attribute information includes vertex coordinate information of the primitive.

[0012] The rasterization equation coefficients calculated according to the vertex coordinate information may include equation coefficients of edges of the primitive. Accordingly, the rasterization processing of pixels may include determining pixels covered by the primitive.

[0013] The rasterization equation coefficients calculated according to the vertex coordinate information may include equation coefficients of the surface of the primitive. Accordingly, the rasterization processing of the pixel includes performing depth calculation on the pixels covered by the primitive.

[0014] Optionally, the first attribute information includes interpolation operation attribute information of the primitive. Accordingly, the rasterization equation coefficients calculated according to the interpolation operation attribute information may include interpolation equation coefficients of pixels covered by the primitive. Accordingly, the rasterization processing of the pixel may include interpolation calculation of the pixels covered by the primitive.

[0015] Furthermore, the interpolation operation attribute information may include vertex color information of the primitive.

[0016] Optionally, the interpolation equation for a pixel is expressed as:

[0017] R=Ax+By+C

[0018] Among them, A, B and C are the coefficients of the interpolation equation, R is the interpolation calculation result, and x, y are the pixel coordinates.

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

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

[0021] According to another aspect of the present disclosure, an electronic device is provided, comprising the electronic device described in the above embodiment.

[0022] According to another aspect of the present disclosure, a graphics processing method is provided, which adopts a tile-based rendering architecture, and the method comprises at least the following steps:

[0023] Calculating rasterization equation coefficients of the primitives according to first attribute information of the primitives in the image frame, where the first attribute information includes attribute information after geometric processing;

[0024] Performing block division processing on the image elements in the image frame;

[0025] The pixels of the primitives covering the tile are rasterized block by block according to the coefficients of the rasterization equations of the primitives covering the tile.

[0026] Optionally, the first attribute information includes vertex coordinate information of the primitive.

[0027] Among them, the rasterization equation coefficients of the primitive are calculated according to the first attribute information of the primitive in the image frame, and its specific implementation method may include: calculating the rasterization equation coefficients of the primitive according to the vertex coordinate information of the primitive in the image frame, and the rasterization coefficients include the equation coefficients of the edges of the primitive.

[0028] Correspondingly, pixel rasterization processing is performed on the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block. The specific implementation method may include: determining the pixels covered by the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block.

[0029] Among them, the rasterization equation coefficients of the primitive are calculated according to the first attribute information of the primitive in the image frame, and its specific implementation method may include: calculating the rasterization equation coefficients of the primitive according to the vertex coordinate information of the primitive in the image frame, and the rasterization equation coefficients include the equation coefficients of the surface of the primitive.

[0030] Correspondingly, pixel rasterization processing is performed on the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block. The specific implementation method may include: performing depth calculation on the pixels covered by the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering library.

[0031] Optionally, the first attribute information includes interpolation operation attribute information of the primitive.

[0032] Correspondingly, the rasterization equation coefficients of the primitive are calculated according to the first attribute information of the primitive in the image frame. The specific implementation method may include: calculating the rasterization equation coefficients of the primitive according to the interpolation operation attribute information of the primitive in the image frame, and the rasterization equation coefficients may include the interpolation equation coefficients of the pixels covered by the primitive.

[0033] Correspondingly, pixel rasterization processing is performed on the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block. The specific implementation method may include: interpolation calculation is performed on the pixels covered by the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block.

[0034] Optionally, the interpolation operation attribute information may include vertex color information of the primitive.

[0035] Alternatively, the interpolation equation for a pixel can be expressed as:

[0036] R=Ax+By+C

[0037] Among them, A, B and C are the coefficients of the interpolation equation, R is the interpolation calculation result, and x, y are the pixel coordinates. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of a triangle primitive according to an embodiment of the present disclosure;

[0039] Figure 2 A schematic diagram of the data structure of primitive attribute information according to an embodiment of the present disclosure;

[0040] Figure 3 A schematic diagram of a graphics processing system architecture according to an embodiment of the present disclosure;

[0041] Figure 4 The figure is a flowchart of a graphics processing method according to an embodiment of the present invention. DETAILED DESCRIPTION

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

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

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

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

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

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

[0048] In the tile-based rendering architecture, the attribute information of the primitives stored after the tiles are divided only contains the information output by the geometric processing. When each tile is rasterized, the relevant equations (hereinafter collectively referred to as rasterization equations) must be calculated for the primitives covering the tile. If a primitive covers multiple tiles, the calculation of the rasterization equation of the primitive will occur during the rasterization process of multiple tiles. This approach not only increases the workload of hardware processing, but also increases the latency of rasterization processing.

[0049] To solve the above problems, the present disclosure provides a GPU that adopts a tile-based rendering architecture. The GPU advances part of the rasterization work to before the tile division. Therefore, the attribute information of the primitive stored in the memory no longer only includes the results after geometric processing, but also includes the results of the rasterization equation calculation of the primitive. By advancing the calculation of the rasterization equation, the rasterization equation calculation of each primitive is only performed once. When a primitive appears in multiple tiles, the rasterization equation coefficients of the primitive do not need to be repeatedly calculated when rasterizing different tiles, which improves the speed of hardware processing and also reduces the bandwidth power consumption overhead.

[0050] Among them, GPU refers to a processor with computing functions implemented through hardware, which includes components such as a computing unit and a cache. It can be a GPGPU (general-purpose graphics processing unit) or a GPU.

[0051] The graphics processor provided in the embodiments of the present disclosure is applicable to any tile-based rendering architecture, for example, TBR (Tile Based Rendering), TBDR (Tile Based Deferred Rendering), etc.

[0052] An embodiment of the present disclosure provides a graphics processor, which adopts a tile-based rendering architecture and includes at least a geometry processing module, a primitive information calculation module, a tile partitioning module, and a pixel information processing module.

[0053] The geometry processing module is configured to: perform geometry processing on the object in the image frame according to the drawing instruction, and output the first attribute information of the primitive. The first attribute information of the primitive may include but is not limited to at least one of the following: vertex coordinate information of the primitive, interpolation operation attribute information of the primitive (such as vertex color information).

[0054] The primitive information calculation module is configured to calculate the rasterization equation coefficients of the primitive according to the first attribute information of the primitive in the image frame. The rasterization equation coefficients of the primitive, as the second attribute information of the primitive, can be, but are not limited to, saved in the memory.

[0055] The block division module is configured to perform block division processing on the objects in the image frame.

[0056] The pixel information processing module is configured to perform pixel rasterization processing on the primitives of the covered image block according to the rasterization equation coefficients of the primitives of the covered image block block by block.

[0057] In the disclosed embodiment, the primitive information calculation module and the pixel information processing module can be implemented by separate hardware or by the same hardware, wherein the primitive information calculation module and the pixel information processing module respectively implement part of the functions of rasterization processing.

[0058] In the embodiment of the present disclosure, the pixel information processing module may perform pixel rasterization processing on the primitives covering the image block by, but is not limited to, at least one of the following processing: determining the pixels covered by the primitives, interpolation calculation, and depth calculation.

[0059] To determine the pixels covered by a primitive, it is necessary to calculate the equation of the edge of the primitive, where the edge of the primitive refers to the edge that surrounds the primitive. Figure 1 Taking the triangle primitive shown in the figure as an example, the edge of the triangle primitive is the edge formed by the lines between the triangle vertices, such as the edge e0 between vertex V0 and vertex V1, the edge e1 between vertex V1 and vertex V2, and the edge e2 between vertex V0 and vertex V2. To calculate the equation of the edge of the primitive, the vertex coordinate information of the primitive is required. According to the vertex coordinates of the two vertices of the primitive, the equation coefficient of the line (edge) between the coordinates of the two vertices can be determined. The equation of the edge of the primitive can be expressed as: e x+B e y+C e = 0. Among them, A e , B e and C e is the coefficient of the edge equation. Figure 1Taking the triangle primitive shown as an example, the triangle primitive has three edges (e0, e1 and e2), so the equation coefficients of these three edges need to be calculated separately. In other words, the rasterization equation coefficients calculated according to the vertex coordinate information can include the equation coefficients of the edges of the primitive.

[0060] Depth calculation requires the calculation of the surface equation of the primitive, where the surface of the primitive refers to the surface enclosed by the vertices of the primitive. Figure 1 Taking the triangle primitive shown in the figure as an example, the edges e0, e1 and e2 enclose the face of the primitive. To calculate the equation of the face of the primitive, the vertex coordinate information of the primitive is required. The equation coefficients of the face of the primitive can be determined based on the coordinates of each vertex of the primitive. In other words, the rasterization equation coefficients calculated based on the vertex coordinate information can include the equation coefficients of the face of the primitive. The equation of the face of the primitive can be expressed as: z = A f x+B f y+C f Among them, A f , B f and C f are the coefficients of the surface equation.

[0061] Among them, the interpolation calculation needs to calculate the interpolation equation of the pixels covered by the primitive. In the embodiment of the present disclosure, the interpolation equation calculation includes the calculation of the interpolation equation required for any interpolation calculation in the rasterization process. As an example and not a limitation, the interpolation calculation may include but is not limited to color interpolation. To calculate the interpolation equation of the pixels covered by the primitive, the interpolation operation attribute information of the primitive is required, and the interpolation equation coefficients of the pixels covered by the primitive can be determined based on the interpolation operation attribute information of the primitive. The interpolation equation can be expressed as: R=Ax+By+C. Among them, A, B and C are the interpolation equation coefficients, R is the interpolation calculation result, and x, y are pixel coordinates. In other words, the rasterization equation coefficients calculated based on the interpolation operation attribute information may include the interpolation equation coefficients of the pixels covered by the primitive. Still with Figure 1 Taking the triangle primitive shown as an example, the color interpolation operation of any pixel V covered by the primitive needs to use the vertex color information of three vertices.

[0062] Based on any of the above embodiments, the attribute information of the primitive (including the first attribute information of the primitive and the second attribute information of the primitive) is stored in the memory in a predetermined data structure. As an example but not limitation, the data structure of the attribute information of the primitive is as follows: Figure 2 shown.

[0063] Among them, at least one interpolation operation attribute information including vertex coordinate information of the primitive and vertex color information of the primitive is sequentially stored in the first part of the data structure. After the geometric processing is completed, the first attribute information of the primitive is saved to the memory. Figure 1The first part of the data structure is shown.

[0064] The second part of the data structure sequentially stores at least one interpolation equation coefficient, including the equation coefficient of the face of the primitive, the equation coefficient of the edge of the primitive, and the color interpolation equation coefficient of the pixel covered by the primitive. The above rasterization equation coefficients calculated by the primitive information calculation module are saved in the memory. Figure 1 The second part of the data structure is shown.

[0065] like Figure 1 As shown, the coefficients of the equation of the face of the primitive include face_A, face_B, face_C. The coefficients of the equation of the three edges of the primitive include: e0_A, e0_B, e0_C; e1_A, e1_B, e1_C; e2_A, e2_B, e2_C. The coefficients of the interpolation equation 0 of the pixels covered by the primitive are the coefficients of the color interpolation equation, including Color_A, Color_B, Color_C. The coefficients of the interpolation equation 1 of the pixels covered by the primitive and the coefficients of the interpolation equation 2 of the pixels covered by the primitive are the coefficients of other interpolation equations, which are not limited in the embodiments of the present disclosure.

[0066] The third part of the data structure stores other attribute information of the primitive, such as primitive ID, viewport ID, layer, etc. These attribute information do not participate in the rasterization equation calculation. After the tile division module performs tile division on the primitive, the information of each tile is stored in a predetermined tile data structure in the memory. The tile information includes the index of the primitive covering the tile, and the index of the primitive indicates the storage address of the primitive data structure in the memory.

[0067] When processing each tile, the pixel information processing module reads the information of the tile from the memory, and then obtains the rasterization equation coefficient of the primitive according to the primitive index. Specifically:

[0068] The pixel information processing module searches for the data structure of each primitive covering the current block according to the information of the current block. Figure 2Taking the data structure shown as an example, the equation coefficients of the edge of the primitive (e0_A, e0_B, e0_C), (e1_A, e1_B, e1_C), (e2_A, e2_B, e2_C) are read from the second part of the primitive data structure, and the position relationship between the pixel and the edge is calculated based on the equation coefficients of the edge: e0_A*x+e0_B*y+e0_C, e1_A*x+e1_B*y+e1_C, e2_A*x+e2_B*y+e2_C, and the pixel is identified based on the calculation result of the position relationship. Among them, (x, y) is the coordinate of the pixel covered by the primitive. The equation coefficients of the face of the primitive (face_A, face_B, face_C) are read from the second part of the primitive data structure, and the depth value of the pixel covered by the primitive is calculated based on the equation coefficients of the face: face_A*x+face_B*y+face_C. The interpolation equation coefficients of the pixels covered by the primitive (for example, the color equation interpolation coefficients Color_A, Color_B, Color_C) are read from the second part of the primitive data structure, and the interpolation calculation is performed: Color_A*x+Color_B*y+Color_C to obtain the color value of the pixel.

[0069] The embodiment of the present disclosure further provides a graphics processing system, which includes the graphics processor described in any of the above embodiments.

[0070] In the embodiment of the present disclosure, the product form of the graphics processing system may be a SOC (System on Chip) chip.

[0071] The graphics processor system in the embodiment of the present disclosure may be a single-die (chip) SOC chip or a multi-die interconnected SOC chip.

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

[0073] exist Figure 3 In one embodiment shown, a single-die graphics processing system includes a GPU core, which is the graphics processor mentioned above.

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

[0075] The GPU core is connected to the on-chip network, which is used for data exchange between masters and slaves on the graphics processing system. In this embodiment, the on-chip network includes a configuration bus, a data communication network, a communication bus, and the like.

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

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

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

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

[0080] Memory controller, used to connect memory devices and save data on SOC;

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

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

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

[0084] based on Figure 3 The graphics processing system architecture shown in FIG. 1 is a schematic diagram of a graphics processing system. In one embodiment, the graphics rendering process is as follows:

[0085] The graphics API of the host (in actual applications, for the graphics processing system on the mobile terminal, it can also be the software on the application processor) sends drawing instructions to the SOC chip, requesting the rendering of the image frame.

[0086] The image frame includes at least one object.

[0087] The general DMA moves the vertex coordinate information of each object in the image frame from the host to the graphics processing system memory.

[0088] After obtaining the above drawing instruction, the computing unit of the GPU core decodes the drawing instruction.

[0089] The vertex shader of the GPU core (whose function is realized by the computing unit) obtains the vertex coordinate information of each object in the image frame from the system memory, and transmits the vertex coordinate information of the object to the geometry shader (whose function is realized by the computing unit). The geometry shader converts the 3D coordinates of the object's vertices into unfolded texture coordinates (i.e. (u,v) coordinates). In addition, the computing unit also assembles the primitives according to the vertex coordinate information of the object, thereby determining the vertex coordinates of each primitive. Among them, the value at the texture coordinate corresponding to the vertex coordinate in the texture map is the vertex color information.

[0090] The vertex coordinate information and vertex texture coordinates of the primitive are saved in the primitive's data structure in system memory.

[0091] After the geometric processing is completed, the primitive information calculation module in the GPU core reads the vertex coordinate information and vertex color information of the primitive from the primitive data structure in the memory. The primitive information calculation module calculates the equation coefficients of the edge and the equation coefficients of the face of the primitive based on the vertex coordinate information of the primitive, and calculates the color interpolation equation coefficients of the primitive based on the vertex color information of the primitive. The equation coefficients of the edge, the equation coefficients of the face, and the color interpolation equation coefficients of the primitive are saved in the above data structure of the primitive.

[0092] Then, the block division module performs block division processing on the image elements in the image frame, and saves the block division processing result to the block buffer, where the block division processing result includes the index of the image element covering the block.

[0093] After the block division is completed, the pixel information processing module processes each block one by one. For the current block, the pixel information processing module finds the data structure of the primitive covering the current block according to the index of the primitive covering the current block. Read the equation coefficients of the edge of the primitive, the equation coefficients of the surface of the primitive, and the color interpolation equation coefficients of the primitive from the data structure of the primitive. Perform a pixel coverage test using the equation coefficients of the edge of the primitive to determine the pixels covered by the primitive. The present disclosure does not limit the specific implementation method of the pixel coverage test, and any existing pixel coverage test method can be used to implement it. Then, the color interpolation equation coefficients are used to determine the texture coordinates corresponding to the pixels covered by the primitive through color interpolation calculation. In addition, the equation coefficients of the surface of the primitive are used to perform depth calculation.

[0094] After the rasterization process is completed, the fragment shader of the GPU core (whose function is implemented by the computing unit) performs shading calculations (such as lighting calculations) of the corresponding pixels according to the texture coordinates of the pixels covered by the primitive.

[0095] It should be noted that the above description of the embodiment of the present disclosure takes a single GPU core as an example, but the embodiment of the present disclosure is not only applicable to a graphics processing system with a single GPU core, but also to a graphics processing system with multiple GPU cores.

[0096] The disclosed embodiment also provides an electronic device, which includes the graphics processing system described in any of the above embodiments. In some usage scenarios, the product form of the electronic device is a graphics card; in other usage scenarios, the product form of the electronic device is a CPU motherboard.

[0097] The disclosed embodiments also provide an electronic device, which includes the above-mentioned electronic device. In some usage scenarios, the product form of the electronic device is a portable electronic device, such as a smart phone, a tablet computer, a VR device, etc.; in some usage scenarios, the product form of the electronic device is a personal computer, a game console, a workstation, a server, etc.

[0098] Based on the same inventive concept, the embodiment of the present disclosure also provides a graphics processing method, which adopts a tile-based rendering architecture, such as Figure 4 As shown, the method comprises at least the following steps:

[0099] Step 401, calculating rasterization equation coefficients of the primitives according to first attribute information of the primitives in the image frame, where the first attribute information includes attribute information after geometric processing;

[0100] Step 402: dividing the image elements in the image frame into blocks;

[0101] Step 403: rasterize pixels of the image primitives covering the image block one by one according to the rasterization equation coefficients of the image primitives covering the image block.

[0102] Optionally, the first attribute information includes vertex coordinate information of the primitive.

[0103] Among them, the rasterization equation coefficients of the primitive are calculated according to the first attribute information of the primitive in the image frame, and its specific implementation method may include: calculating the rasterization equation coefficients of the primitive according to the vertex coordinate information of the primitive in the image frame, and the rasterization coefficients include the equation coefficients of the edges of the primitive.

[0104] Correspondingly, pixel rasterization processing is performed on the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block. The specific implementation method may include: determining the pixels covered by the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block.

[0105] Among them, the rasterization equation coefficients of the primitive are calculated according to the first attribute information of the primitive in the image frame, and its specific implementation method may include: calculating the rasterization equation coefficients of the primitive according to the vertex coordinate information of the primitive in the image frame, and the rasterization equation coefficients include the equation coefficients of the surface of the primitive.

[0106] Correspondingly, pixel rasterization processing is performed on the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block. The specific implementation method may include: performing depth calculation on the pixels covered by the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering library.

[0107] Optionally, the first attribute information includes interpolation operation attribute information of the primitive.

[0108] Correspondingly, the rasterization equation coefficients of the primitive are calculated according to the first attribute information of the primitive in the image frame. The specific implementation method may include: calculating the rasterization equation coefficients of the primitive according to the interpolation operation attribute information of the primitive in the image frame, and the rasterization equation coefficients may include the interpolation equation coefficients of the pixels covered by the primitive.

[0109] Correspondingly, pixel rasterization processing is performed on the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block. The specific implementation method may include: interpolation calculation is performed on the pixels covered by the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block.

[0110] Optionally, the interpolation operation attribute information may include vertex color information of the primitive.

[0111] Alternatively, the interpolation equation for a pixel can be expressed as:

[0112] R=Ax+By+C

[0113] Among them, A, B and C are the coefficients of the interpolation equation, R is the interpolation calculation result, and x, y are the pixel coordinates.

[0114] It should be noted that the above-mentioned graphics processing method and the above-mentioned graphics processor are based on the same inventive concept. Therefore, the specific implementation of each step in the method and the explanation of the terms involved can refer to the description of the above-mentioned embodiment, and will not be repeated here.

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

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

Claims

1. A graphics processor, using a tile-based rendering architecture, the graphics processor comprising: The primitive information calculation module is configured to: before performing the block division process, calculate the rasterization equation coefficient of the primitive according to the first attribute information of the primitive in the image frame, and save the rasterization equation coefficient to the second part of the attribute information data structure of the primitive, wherein the first attribute information includes the attribute information after the geometric processing, and the first attribute information is saved in the first part of the attribute information data structure; A block division module is configured to: perform block division processing on the primitives in the image frame, and save information of each block to a predetermined block data structure in the memory, wherein the information of the block includes an index of the primitive covering the block, and the index of the primitive indicates a storage address of the attribute information data structure of the primitive; The pixel information processing module is configured to: perform pixel rasterization processing on the primitives of the covering block block by block according to the rasterization equation coefficients of the primitives of the covering block, and when processing each block, read the information of the block from the memory, and then obtain the rasterization equation coefficients of the primitive according to the index of the primitive. 2 . The graphics processor according to claim 1 , wherein the first attribute information comprises vertex coordinate information of a primitive.

3. The graphics processor according to claim 2, wherein the rasterization equation coefficients calculated according to the vertex coordinate information include equation coefficients of edges of the primitive; The rasterization of pixels includes determining the pixels covered by the primitives.

4. The graphics processor according to claim 2, wherein the rasterization equation coefficients calculated according to the vertex coordinate information include equation coefficients of the surface of the primitive; The pixel rasterization process includes performing depth calculation on the pixels covered by the primitive.

5. The graphics processor according to claim 1, wherein the first attribute information comprises interpolation operation attribute information of the primitive; The rasterization equation coefficients calculated according to the interpolation operation attribute information include interpolation equation coefficients of pixels covered by the primitive; The pixel rasterization process includes performing interpolation calculation on the pixels covered by the primitive. The graphics processor according to claim 5 , wherein the interpolation operation attribute information comprises vertex color information of a primitive.

7. The graphics processor according to claim 5, wherein the interpolation equation of the pixel is expressed as: R=Ax+By+C in, A, B and C are the coefficients of the interpolation equation, R is the interpolation calculation result, and x, y are pixel coordinates.

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

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

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

11. A graphics processing method, using a tile-based rendering architecture, the method comprising: Calculating rasterization equation coefficients of the primitive according to first attribute information of the primitive in the image frame, and saving the rasterization equation coefficients to a second part of an attribute information data structure of the primitive, wherein the first attribute information includes attribute information after geometric processing, and the first attribute information is saved in a first part of the attribute information data structure; Performing block division processing on the image elements in the image frame, and saving information of each block to a predetermined block data structure in the memory, wherein the block information includes an index of the image element covering the block, and the index of the image element indicates a storage address of the attribute information data structure of the image element; The pixels of the primitives of the covered image block are rasterized block by block according to the rasterization equation coefficients of the primitives of the covered image block. When processing each image block, the information of the image block is read from the memory, and then the rasterization equation coefficients of the image block are obtained according to the index of the image block. The method according to claim 11 , wherein the first attribute information comprises vertex coordinate information of a primitive.

13. The method according to claim 12, wherein the step of calculating the coefficients of the rasterization equation of the image primitive according to the first attribute information of the image primitive in the image frame comprises: Calculating rasterization equation coefficients of the primitive according to vertex coordinate information of the primitive in the image frame, wherein the rasterization coefficients include equation coefficients of edges of the primitive; The step of performing pixel rasterization processing on the primitives of the covered image block according to the rasterization equation coefficients of the primitives of the covered image block one by one comprises: The pixels covered by the primitives of the covering image block are determined block by block according to the coefficients of the rasterization equations of the primitives of the covering image block.

14. The method according to claim 12, wherein the step of calculating the coefficients of the rasterization equation of the image primitive according to the first attribute information of the image primitive in the image frame comprises: Calculating rasterization equation coefficients of the primitive according to vertex coordinate information of the primitive in the image frame, wherein the rasterization equation coefficients include equation coefficients of the surface of the primitive; The step of performing pixel rasterization processing on the primitives of the covered image block according to the rasterization equation coefficients of the primitives of the covered image block one by one comprises: Depth calculation is performed on pixels covered by the primitives of the coverage block according to the rasterization equation coefficients of the primitives of the coverage block.

15. The method according to claim 11, wherein the first attribute information comprises interpolation operation attribute information of the primitive; The step of calculating the rasterization equation coefficients of the image primitives according to the first attribute information of the image primitives in the image frame includes: Calculating rasterization equation coefficients of the primitive according to interpolation operation attribute information of the primitive in the image frame, wherein the rasterization equation coefficients include interpolation equation coefficients of pixels covered by the primitive; The step of performing pixel rasterization processing on the primitives of the covered image block according to the rasterization equation coefficients of the primitives of the covered image block one by one comprises: Interpolation calculation is performed on pixels covered by the primitives of the covering image block according to the coefficients of the rasterization equations of the primitives of the covering image block. The method according to claim 15 , wherein the interpolation operation attribute information comprises vertex color information of a primitive.

17. According to the method of claim 15, the interpolation equation of the pixel is expressed as: R=Ax+By+C in, A, B and C are the coefficients of the interpolation equation, R is the interpolation calculation result, and x, y are pixel coordinates.

Citation Information

Patent Citations

  • Graphics processing unit

    US20150228111A1