Graphics processor, system, device, equipment and method

By dividing multi-level distant texture areas in the graphics processor and loading the necessary levels, the problem of multi-level distant texture occupying video memory space is solved, and efficient utilization of video memory space and the rendering efficiency is improved.

CN116957899BActive Publication Date: 2024-11-19SUZHOU XIANGDIXIAN COMPUTING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the process of image texture mapping, GPU memory occupied by multi-level distant textures leads to wasting of video memory space, and traditional methods cannot effectively reduce video memory usage when loading textures.

Method used

By setting up a multi-level aggression level determination module and texture chunking determination module in the graphics processor, the multi-level aggression level texture area is divided according to the input pixel coordinates and texture coordinates, and only the necessary texture levels and areas are loaded to reduce the memory usage .

Benefits of technology

It effectively reduces the waste of video memory space, reduces the communication delay and bandwidth between the CPU and GPU, and improves rendering efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116957899B_ABST
    Figure CN116957899B_ABST
Patent Text Reader

Abstract

The present disclosure provides a graphics processor, system, method, electronic device and electronic device. The graphics processor includes a multi-level asymptotic level determination module: determining the multi-level asymptotic level corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates; a texture block determination module: determining the multi-level asymptotic texture area to which each texture coordinate belongs; wherein the multi-level asymptotic level information and the multi-level asymptotic texture area information are output to the texture loading software, so that the texture loading software determines the multi-level asymptotic level corresponding to each multi-level asymptotic texture area according to the multi-level asymptotic level information and the multi-level asymptotic texture area information, and loads the multi-level asymptotic texture area of ​​the corresponding multi-level asymptotic level, the multi-level asymptotic level information indicates the multi-level asymptotic level corresponding to each texture coordinate, and the multi-level asymptotic texture area information indicates the multi-level asymptotic texture area to which each texture coordinate belongs.
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] In the process of texture mapping of images, in order to speed up rendering and reduce texture aliasing, texture maps are processed into files composed of a series of pre-calculated and optimized pictures. This set of files includes multi-level precision texture maps, and the precision (i.e. resolution) of each level of texture map is half of the texture map of the previous level. Texture maps processed in this way are called multi-level mipmap textures. After using Mipmap textures, when mapping, texture maps of different precisions will be selected according to the distance of the camera.

[0003] Because multiple texture maps with corresponding precision are loaded according to the different distances of the camera, using Mipmap textures will inevitably take up more video memory.

[0004] In order to reduce the GPU memory occupied by Mipmap textures, the traditional approach is that the software obtains the Miplevel (Mipmap level) calculated by the hardware when sampling the texture. Since some areas of a frame are close to the camera and some areas are far from the camera, the Miplevel obtained after the hardware calculation is usually in a range, that is, the software obtains a minlevel (minimum level) and a maxlevel (maximum level), and loads the MipMap texture between the minlevel and maxlevel into the video memory.

[0005] Although the traditional approach reduces the scope of the loaded MipMap texture, it still causes a waste of video memory space to a certain extent. 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 to reduce the waste of video memory space.

[0007] According to a first aspect of the present disclosure, a graphics processor is provided, the graphics processor comprising at least:

[0008] The multi-level receding level determination module is configured to: determine the multi-level receding level corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates;

[0009] The texture block determination module is configured to: determine the multi-level asymptotic texture region to which each texture coordinate belongs, wherein the multi-level asymptotic texture is divided into a plurality of regions;

[0010] Among them, the multi-level progressive level information and the multi-level progressive texture area information are output to the texture loading software, so that the texture loading software determines the multi-level progressive level corresponding to each multi-level progressive texture area according to the multi-level progressive level information and the multi-level progressive texture area information, and loads the multi-level progressive texture area of ​​the corresponding multi-level progressive level, the multi-level progressive level information indicates the multi-level progressive level corresponding to each texture coordinate, and the multi-level progressive texture area information indicates the multi-level progressive texture area to which each texture coordinate belongs.

[0011] Optionally, the multi-level asymptotic texture region to which each texture coordinate belongs is determined, and the specific implementation method thereof includes:

[0012] Comparing each texture coordinate with a range of texture coordinates of a multi-level asymptotic texture region, where the range of texture coordinates of the multi-level asymptotic texture region is determined based on an original resolution in the multi-level asymptotic texture;

[0013] The multi-level progressively distant texture region whose texture coordinates fall within the texture coordinate range is determined as the multi-level progressively distant texture region to which the texture coordinates belong.

[0014] Based on any of the above embodiments, optionally, the multi-level far-away texture is divided into a plurality of regions according to the distance from the camera.

[0015] Furthermore, the above-mentioned graphics processor may also include an area division module, which is configured to: divide the multi-level progressively distant texture area according to each texture coordinate and the multi-level progressively distant level corresponding to the texture coordinate, the ratio of target texture coordinates in the same multi-level progressively distant texture area reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressively distant level.

[0016] On the basis of any of the above embodiments, the above-mentioned determination of the multi-level progressively distant levels corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates may be specifically implemented as follows: determining the multi-level progressively distant levels corresponding to each texture coordinate in each layer according to the pixel coordinates and texture coordinates of each layer in the input three-dimensional space. Correspondingly, determining the multi-level progressively distant texture area to which each texture coordinate belongs may be specifically implemented as follows: determining the multi-level progressively distant texture area to which each texture coordinate in each layer belongs.

[0017] According to a second aspect of the present disclosure, a graphics processing system is provided, the graphics processing system comprising the graphics processor described in any embodiment of the first aspect above.

[0018] Optionally, the graphics processing system may further include a processor configured to: execute the above texture loading software.

[0019] According to a third aspect of the present disclosure, an electronic device is provided, comprising the graphics processing system described in the embodiment of the second aspect.

[0020] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising the electronic device described in the embodiment of the third aspect above.

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

[0022] The multi-level receding level determination module is configured to: determine the multi-level receding level corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates;

[0023] Among them, the multi-level progressively distant level information is output to the texture loading software, so that the texture loading software can determine the multi-level progressively distant texture area to which each texture coordinate belongs, and determine the multi-level progressively distant level corresponding to each multi-level progressively distant texture area according to the multi-level progressively distant level information and the multi-level progressively distant texture area information, and load the multi-level progressively distant texture area of ​​the corresponding multi-level progressively distant level; the multi-level progressively distant level information indicates the multi-level progressively distant level corresponding to each texture coordinate, and the multi-level progressively distant texture area information indicates the multi-level progressively distant texture area to which each texture coordinate belongs.

[0024] Optionally, the above-mentioned determination of the multi-level asymptotic texture region to which each texture coordinate belongs may be specifically implemented as follows:

[0025] Comparing each texture coordinate with a range of texture coordinates of a multi-level asymptotic texture region, where the range of texture coordinates of the multi-level asymptotic texture region is determined based on an original resolution in the multi-level asymptotic texture;

[0026] The multi-level progressively distant texture region whose texture coordinates fall within the texture coordinate range is determined as the multi-level progressively distant texture region to which the texture coordinates belong.

[0027] Based on any embodiment of the fifth aspect above, optionally, the multi-level progressively distant texture is divided into multiple areas according to the distance from the camera.

[0028] Furthermore, the texture loading software can divide the multi-level progressive texture area according to each texture coordinate and the multi-level progressive level corresponding to the texture coordinate. The ratio of target texture coordinates in the same multi-level progressive texture area reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressive level.

[0029] Based on any embodiment of the fifth aspect above, optionally, the above-mentioned determination of the multi-level progressively distant levels corresponding to each texture coordinate based on the input pixel coordinates and texture coordinates may specifically include: determining the multi-level progressively distant levels corresponding to each texture coordinate in each layer based on the pixel coordinates and texture coordinates of each layer in the input three-dimensional space.

[0030] Correspondingly, the specific implementation of the above-mentioned determination of the multi-level progressively distant texture region to which each texture coordinate belongs may include: respectively determining the multi-level progressively distant texture region to which each texture coordinate in each layer belongs.

[0031] According to a sixth aspect of the present disclosure, a graphics processing system is provided, which includes the graphics processor described in any embodiment of the fifth aspect above.

[0032] Optionally, the graphics processing system may further include a processor configured to: execute the above texture loading software.

[0033] According to a seventh aspect of the present disclosure, an electronic device is provided, comprising the graphics processing system described in the embodiment of the sixth aspect.

[0034] According to an eighth aspect of the present disclosure, an electronic device is provided, comprising the electronic device described in the seventh aspect embodiment.

[0035] According to a ninth aspect of the present disclosure, a graphics processing method is provided, the method comprising at least the following steps:

[0036] The graphics processor determines the multi-level progressive distance level corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates;

[0037] The graphics processor determines a multi-level asymptotic texture region to which each texture coordinate belongs, wherein the multi-level asymptotic texture is divided into a plurality of regions;

[0038] The graphics processor outputs multi-level progressively distant level information and multi-level progressively distant texture region information, wherein the multi-level progressively distant level information indicates the multi-level progressively distant level corresponding to each texture coordinate, and the multi-level progressively distant texture region information indicates the multi-level progressively distant texture region to which each texture coordinate belongs;

[0039] The texture loading software determines the multi-level receding level corresponding to each multi-level receding texture area according to the multi-level receding level information and the multi-level receding texture area information, and loads the multi-level receding texture area of ​​the corresponding multi-level receding level.

[0040] Optionally, the specific implementation of the above-mentioned determination of the multi-level asymptotic texture region to which each texture coordinate belongs may include:

[0041] Comparing each texture coordinate with a range of texture coordinates of a multi-level asymptotic texture region, where the range of texture coordinates of the multi-level asymptotic texture region is determined based on an original resolution in the multi-level asymptotic texture;

[0042] The multi-level progressively distant texture region whose texture coordinates fall within the texture coordinate range is determined as the multi-level progressively distant texture region to which the texture coordinates belong.

[0043] Based on any embodiment of the ninth aspect above, optionally, the multi-level progressively distant texture is divided into multiple areas according to the distance from the camera.

[0044] Furthermore, the above method may also include: the graphics processor divides the multi-level progressively distant texture area according to each texture coordinate and the multi-level progressively distant level corresponding to the texture coordinate, the ratio of target texture coordinates in the same multi-level progressively distant texture area reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressively distant level.

[0045] Based on any embodiment of the ninth aspect, optionally, the above-mentioned determination of the multi-level progressively distant levels corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates may be specifically implemented in a manner that: the multi-level progressively distant levels corresponding to each texture coordinate in each layer are determined according to the pixel coordinates and texture coordinates of each layer in the input three-dimensional space. Correspondingly, the above-mentioned determination of the multi-level progressively distant texture area to which each texture coordinate belongs may be specifically implemented in a manner that: the multi-level progressively distant texture area to which each texture coordinate in each layer belongs may be determined respectively.

[0046] According to a tenth aspect of the present disclosure, a graphics processing method is provided, the method comprising at least the following steps:

[0047] The graphics processor determines the multi-level progressive distance level corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates;

[0048] The graphics processor outputs multi-level progressive distance level information, and the multi-level progressive distance level information indicates the multi-level progressive distance level corresponding to each texture coordinate;

[0049] The texture loading software determines the multi-level asymptotic texture region to which each texture coordinate belongs, wherein the multi-level asymptotic texture is divided into a plurality of regions;

[0050] The texture loading software determines the multi-level receding level corresponding to each multi-level receding texture area according to the multi-level receding level information and the multi-level receding texture area information, and loads the multi-level receding texture area of ​​the corresponding multi-level receding level. The multi-level receding texture area information indicates the multi-level receding texture area to which each texture coordinate belongs.

[0051] Optionally, the above-mentioned determination of the multi-level asymptotic texture region to which each texture coordinate belongs may be specifically implemented as follows:

[0052] Comparing each texture coordinate with a range of texture coordinates of a multi-level asymptotic texture region, where the range of texture coordinates of the multi-level asymptotic texture region is determined based on an original resolution in the multi-level asymptotic texture;

[0053] The multi-level progressively distant texture region whose texture coordinates fall within the texture coordinate range is determined as the multi-level progressively distant texture region to which the texture coordinates belong.

[0054] Based on any embodiment of the tenth aspect above, optionally, the multi-level progressively distant texture is divided into multiple areas according to the distance from the camera.

[0055] Furthermore, the above method may also include: the texture loading software divides the multi-level progressively distant texture area according to each texture coordinate and the multi-level progressively distant level corresponding to the texture coordinate, the ratio of target texture coordinates in the same multi-level progressively distant texture area reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressively distant level.

[0056] Based on any embodiment of the tenth aspect, optionally, the above-mentioned determination of the multi-level progressively distant levels corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates may be specifically implemented by: determining the multi-level progressively distant levels corresponding to each texture coordinate in each layer according to the pixel coordinates and texture coordinates of each layer in the input three-dimensional space. Correspondingly, the above-mentioned determination of the multi-level progressively distant texture area to which each texture coordinate belongs may be specifically implemented by: determining the multi-level progressively distant texture area to which each texture coordinate in each layer belongs.

[0057] According to an eleventh aspect of the present disclosure, a graphics processing method is provided, the method comprising at least the following operations:

[0058] Acquire multi-level progressively distant level information and multi-level progressively distant texture region information, wherein the multi-level progressively distant level information indicates the multi-level progressively distant level corresponding to each texture coordinate, and the multi-level progressively distant texture region information indicates the multi-level progressively distant texture region to which each texture coordinate belongs;

[0059] The multi-level receding level corresponding to each multi-level receding texture area is determined according to the multi-level receding level information and the multi-level receding texture area information, and the multi-level receding texture area of ​​the corresponding multi-level receding level is loaded.

[0060] Optionally, the above method may further include:

[0061] Comparing each texture coordinate with a range of texture coordinates of a multi-level asymptotic texture region, where the range of texture coordinates of the multi-level asymptotic texture region is determined based on an original resolution in the multi-level asymptotic texture;

[0062] The multi-level progressively distant texture region whose texture coordinates fall within the texture coordinate range is determined as the multi-level progressively distant texture region to which the texture coordinates belong.

[0063] On this basis, optionally, the multi-level far-away texture is divided into a plurality of regions according to the distance from the camera.

[0064] Furthermore, the above method may also include: dividing the multi-level progressively distant texture area according to each texture coordinate and the multi-level progressively distant level corresponding to the texture coordinate, the ratio of target texture coordinates in the same multi-level progressively distant texture area reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressively distant level.

[0065] According to a twelfth aspect of the present disclosure, a graphics processing method is provided, the method comprising at least the following operations:

[0066] Acquire multi-level asymptotic level information, where the multi-level asymptotic level information indicates the multi-level asymptotic level corresponding to each texture coordinate;

[0067] Determine the multi-level asymptotic texture region to which each texture coordinate belongs, wherein the multi-level asymptotic texture is divided into a plurality of regions;

[0068] The multi-level progressively distant level corresponding to each multi-level progressively distant texture area is determined according to the multi-level progressively distant level information and the multi-level progressively distant texture area information, and the multi-level progressively distant texture area of ​​the corresponding multi-level progressively distant level is loaded, and the multi-level progressively distant texture area information indicates the multi-level progressively distant texture area to which each texture coordinate belongs.

[0069] Optionally, the above-mentioned determination of the multi-level asymptotic texture region to which each texture coordinate belongs may be specifically implemented as follows:

[0070] Comparing each texture coordinate with a range of texture coordinates of a multi-level asymptotic texture region, where the range of texture coordinates of the multi-level asymptotic texture region is determined based on an original resolution in the multi-level asymptotic texture;

[0071] The multi-level progressively distant texture region whose texture coordinates fall within the texture coordinate range is determined as the multi-level progressively distant texture region to which the texture coordinates belong.

[0072] On this basis, optionally, the multi-level far-away texture is divided into a plurality of regions according to the distance from the camera.

[0073] Furthermore, the above method may also include: dividing the multi-level progressively distant texture area according to each texture coordinate and the multi-level progressively distant level corresponding to the texture coordinate, the ratio of target texture coordinates in the same multi-level progressively distant texture area reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressively distant level. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 A schematic diagram of Mipmap texture partitioning according to an embodiment of the present disclosure;

[0075] Figure 2 A schematic diagram of loading Mipmap texture in blocks according to an embodiment of the present disclosure;

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

[0077] Figure 4 A flowchart of a graphics processing method according to an embodiment of the present disclosure is provided;

[0078] Figure 5 The figure is a flowchart of a graphics processing method according to another embodiment of the present invention. DETAILED DESCRIPTION

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

[0080] 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.

[0081] 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.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] In order to further reduce the video memory space occupied by MipMap textures, the present disclosure provides a GPU that loads Mipmap textures in blocks based on Mipmap feedback. The Mipmap texture is divided into regions (i.e., blocks), and the Mipmap feedback (including Miplevel) in each region is counted, so that the Mipmap texture of the corresponding Miplevel is loaded in blocks. In traditional solutions, even if only a small part of the Mipmap texture of a Miplevel is used, the Mipmap texture of the Miplevel has to be fully loaded into the video memory. Compared with traditional solutions, the embodiments of the present disclosure can load partial textures of the level instead of complete textures according to the Miplevel, saving video memory space. In addition, since the amount of Mipmap texture data is reduced, the communication delay and bandwidth between the CPU (Central Processing Unit) and the GPU are also effectively reduced.

[0086] 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.

[0087] The graphics processor provided in the embodiments of the present disclosure is applicable to tile-based rendering architectures, such as TBR (TileBased Render), TBDR (Tile Based Deferred Rendering), etc., and is also applicable to IMR (Immediate Mode Rendering) architectures.

[0088] An embodiment of the present disclosure provides a graphics processor, which at least includes a multi-level miplevel determination module and a texture block determination module.

[0089] The multi-level progressive level determination module is configured to determine the Miplevel corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates.

[0090] The embodiments of the present disclosure do not limit the specific implementation method of the multi-level progressively distant hierarchy determination module to determine the Miplevel, which can be implemented by existing implementation means or existing implementation principles.

[0091] The texture block determination module is configured to determine the Mipmap texture area to which each texture coordinate belongs.

[0092] In the disclosed embodiment, the Mipmap texture is divided into a plurality of regions. As an example and not a limitation, Figure 1 As shown, the Mipmap texture includes texture maps of four levels: Miplevel1, Miplevel2, Miplevel3 and Miplevel4, among which the texture map of Miplevel1 is the original resolution texture map. The Mipmap texture is divided into three areas, and the division method of the texture maps of each level is the same. The three Mipmap texture areas are Mipmap texture area 1, Mipmap texture area 2 and Mipmap texture area 3. The texture coordinate range of Mipmap texture area 1 is (U0min, V0min), (U0max, V0max), the texture coordinate range of Mipmap texture area 2 is (U1min, V1min), (U1max, V1max), and the texture coordinate range of Mipmap texture area 3 is (U2min, V2min), (U2max, V2max). Taking Miplevel2 as an example, in the texture map of Miplevel2, the division method of the Mipmap texture area is the same as that in Mipmap level 1, but because the resolution is halved, the area size is also halved.

[0093] In the embodiment of the present disclosure, after determining the Miplevel corresponding to each texture coordinate, Miplevel information will be generated, and the Miplevel information indicates the Miplevel corresponding to each texture coordinate. The Miplevel information can be generated and output by a multi-level progressive level determination module, or can be generated and output by other hardware modules in the GPU, which is not limited in the embodiment of the present disclosure.

[0094] In the embodiment of the present disclosure, determining the Mipmap texture area to which each texture coordinate belongs generates Mipmap texture area information, and the Mipmap texture area information indicates the Mipmap texture area to which each texture coordinate belongs. The Mipmap texture area information can be generated and output by the texture block determination module, or can be generated and output by other hardware modules in the GPU, and the embodiment of the present disclosure does not limit this.

[0095] In the disclosed embodiment, the functions of the multi-level progressively distant level determination module and the texture partition determination module can be implemented by existing hardware, for example, by using existing ALUs, or by developing new hardware.

[0096] In the disclosed embodiment, the texture loading software obtains Miplevel information and Mipmap texture area information, determines the Miplevel corresponding to each Mipmap texture area according to the Miplevel information and Mipmap texture area information, and loads the corresponding Miplevel multi-level progressive texture area.

[0097] The texture loading software can determine the Mipmap texture area to which each texture coordinate belongs based on the Mipmap texture area, that is, it can determine the texture coordinates covered by each Mipmap texture area. The texture loading software can determine the Miplevel corresponding to each texture coordinate based on the Miplevel information, that is, for each Mipmap texture area, it can determine the Miplevel corresponding to the texture coordinates covered by it.

[0098] In some embodiments, the Miplevel corresponding to the texture coordinates covered by the Mipmap texture region is the Miplevel corresponding to the Mipmap texture region. Assuming that the texture coordinates covered by a certain Mipmap texture region correspond to three Miplevels, then the Miplevel corresponding to the Mipmap texture region is these three Miplevels.

[0099] In some embodiments, the maximum level and minimum level corresponding to the texture coordinates covered by the Mipmap texture area and the Miplevels between them are the Miplevels corresponding to the Mipmap texture area. Assuming that the texture coordinates covered by a certain Mipmap texture area correspond to three Miplevels, then the Miplevel corresponding to the Mipmap texture area is the maximum level, the minimum level, and all Miplevels between the maximum level and the minimum level among the three Miplevels.

[0100] by Figure 1 Take the Mipmap texture area division shown in the figure as an example, assuming that Mipmap texture area 1 corresponds to Miplevel 1 and Miplevel 2, Mipmap texture area 2 corresponds to Miplevel 2 and Miplevel 3, and Mipmap texture area 3 corresponds to Miplevel 1. Figure 2 As shown, Mipmap texture area 1 in Miplevel1 and Miplevel2 is loaded, Mipmap texture area 2 in Miplevel2 and Miplevel3 is loaded, and Mipmap texture area 3 in Miplevel1 is loaded.

[0101] In the disclosed embodiment, by way of example and not limitation, the above-mentioned determination of the Mipmap area to which each texture coordinate belongs may be specifically implemented in the following manner: comparing each texture coordinate with the texture coordinate range of the Mipmap texture area; and determining the Mipmap texture area whose texture coordinates fall within the texture coordinate range as the Mipmap texture area to which the texture coordinates belong.

[0102] The texture coordinate range of the Mipmap texture area is determined according to the original resolution of the Mipmap texture. Assume that the texture coordinate range of a certain Mipmap texture area is as follows: (U0min, V0min), (U0max, V0max), for a certain texture coordinate (U, V), if U0min<U<U0max, and V0min<V<V0max, then the texture coordinate falls into the Mipmap texture area (that is, the Mipmap texture area covers the texture coordinate, that is, the Mipmap texture area is the Mipmap texture area to which the texture coordinate belongs), otherwise, the texture coordinate does not fall into the Mipmap texture area.

[0103] Among them, (U0min, V0min), (U0max, V0max) are the texture coordinates on the texture map of the original resolution in the Mipmap texture.

[0104] The embodiments of the present disclosure do not limit the division of Mipmap texture areas. In some embodiments, the area division is performed by software, and in other embodiments, the area division is performed by hardware in the GPU. In some embodiments, the Mipmap texture is divided into a number of Mipmap texture areas. In other embodiments, a division strategy is formulated according to requirements, actual rendering characteristics, etc., and the Mipmap texture is divided into a number of Mipmap texture areas according to the formulated division strategy. As an example and not a limitation, the Mipmap texture is divided into multiple areas according to the distance to the camera.

[0105] If the GPU hardware divides the Mipmap texture into multiple areas according to the distance to the camera. In some embodiments, the graphics processor may further include an area division module configured to: divide the Mipmap texture area according to each texture coordinate and the Miplevel corresponding to the texture coordinate, the target texture coordinate ratio in the same Mipmap texture area reaches a set threshold, and the target texture coordinate includes the texture coordinate corresponding to the same Miplevel.

[0106] There are many specific division strategies, which can be determined according to the actual rendering situation or rendering requirements in practical applications. As an example but not a limitation, in some embodiments, the texture coordinates of the texture map of the original resolution in the Mipmap texture are grouped, the texture coordinates in the same group correspond to the same Miplevel in the image frame, and any texture coordinate in the same group of texture coordinates is adjacent to at least one texture coordinate in the group, and each group of texture coordinates constitutes a Mipmap texture area. In other embodiments, the texture coordinates of the texture map of the original resolution in the Mipmap texture are traversed, and each time a texture coordinate is traversed, it is determined whether the texture coordinate can be included in the existing group. If the texture coordinate corresponds to the same Miplevel in the image frame with most of the texture coordinates in a group, and is adjacent to at least one texture coordinate in the group, the texture coordinate is included in the group, otherwise, it is determined whether the texture coordinate falls into the texture coordinate range (Umin, Vmin), (Umax, Vmax) of the existing group. If it falls, the texture coordinate is included in the group, otherwise, a new group is created and the texture coordinate is included in the new group. After the traversal is completed, the texture coordinates in each group constitute a Mipmap texture area. In a group, there are n texture coordinates corresponding to one Miplevel, m texture coordinates corresponding to another Miplevel, and p texture coordinates corresponding to another Miplevel, among which n is the largest number, so these n texture coordinates are called majority texture coordinates.

[0107] On the basis of any of the above embodiments, the above-mentioned determination of the Miplevel corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates may be specifically implemented as follows: determining the Miplevel corresponding to each texture coordinate in each layer according to the pixel coordinates and texture coordinates of each layer in the input three-dimensional space. Accordingly, determining the Mipmap texture area to which each texture coordinate belongs, may be specifically implemented as follows: determining the Mipmap texture area to which each texture coordinate in each layer belongs. Accordingly, the Miplevel information and Mipmap texture area information in each layer are output to the texture loading software, so that the texture loading software determines the Miplevel corresponding to each Mipmap texture area in each layer according to the Miplevel information and Mipmap texture area information of each layer, and loads the Mipmap texture area of ​​the corresponding Miplevel.

[0108] That is to say, the embodiments of the present disclosure can be applied to three-dimensional texture processing, wherein the Mipmap texture area division method of each layer can be different.

[0109] In some embodiments, the GPU may not include a texture partition determination module, and the functions implemented by the texture partition determination module are implemented by texture loading software. The implementation principle of the texture loading software determining the Mipmap texture area to which each texture coordinate belongs can refer to the description of the above embodiment, which will not be repeated here.

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

[0111] Optionally, the graphics processing system may further include a processor, wherein the processor is configured to execute the above-mentioned texture loading software.

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

[0113] As an example and not limitation, for a mobile product, its SOC chip may include the above processor.

[0114] 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.

[0115] 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.

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

[0117] The GPU core is used to process drawing instructions, and according to the drawing instructions, execute 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; 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 perform 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.

[0118] 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.

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

[0120] 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.

[0121] 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;

[0122] 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.

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

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

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

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

[0127] 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:

[0128] The graphics API of the host sends a drawing instruction to the SOC chip, requesting the rendering of the image frame. The drawing instruction may carry Mipmap texture area division information.

[0129] In this embodiment, the mipmap texture is divided into Figure 1 The three areas shown.

[0130] The general DMA moves the vertex data of each object in the image frame (the vertex data includes the 3D coordinates of the object's vertices) from the host to the graphics processing system memory.

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

[0132] The vertex shader of the GPU core (whose function is implemented by the computing unit) obtains the vertex data of each object in the image frame from the system memory, and transmits the vertex data of the object to the geometry shader (whose function is implemented 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).

[0133] After the geometric processing is completed, the tile partitioning module in the GPU core performs tile partitioning on the objects in the image frame and saves the tile partitioning results to the tile buffer. The tile partitioning results include the primitive indexes of the primitives covering the tiles.

[0134] After the tile division is completed, the rasterization module performs rasterization processing. The rasterization module processes each tile one by one, and reads the primitive index of the primitive covering the current tile from the tile buffer each time; the rasterization module reads the primitive information of the primitive through the primitive index, and uses the primitive information of the primitive to perform a pixel coverage test to determine the pixels covered by the primitive, and then performs pixel interpolation calculation and at least one pixel test (as an example but not limitation, the pixel test may include a depth test, a template test, etc.).

[0135] In the present disclosure, existing technologies are used to implement pixel coverage testing, pixel interpolation calculation and pixel testing.

[0136] 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) for the corresponding pixels.

[0137] In the mapping processing stage, the multi-level gradient level determination module (whose function is realized by the computing unit) determines the Miplevel corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates, and outputs Miplevel information indicating the Miplevel corresponding to each texture coordinate. The texture block determination module (whose function is realized by the computing unit) determines the Mipmap texture area to which each texture coordinate belongs by comparing each texture coordinate with the coordinate range of each Mipmap texture area, and outputs Mipmap texture area information indicating the Mipmap texture area to which each texture coordinate belongs.

[0138] The graphics API (in actual applications, for mobile graphics processing systems, it can also be the texture loading software on the application processor) determines the texture coordinates covered by each Mipmap texture area based on the Mipmap texture area information, and determines the Miplevel corresponding to the texture coordinates covered by each Mipmap texture area based on the Mipmap texture information.

[0139] In this embodiment, Mipmap texture area 1 corresponds to Miplevel 1 and Miplevel 2, Mipmap texture area 2 corresponds to Miplevel 2 and Miplevel 3, and Mipmap texture area 3 corresponds to Miplevel 1.

[0140] The graphics API loads the corresponding miplevel multi-level texture area. Figure 2 As shown, Mipmap texture area 1 in Miplevel1 and Miplevel2 is loaded, Mipmap texture area 2 in Miplevel2 and Miplevel3 is loaded, and Mipmap texture area 3 in Miplevel1 is loaded.

[0141] 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.

[0142] 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.

[0143] 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.

[0144] Based on the same inventive concept, the embodiment of the present disclosure also provides a graphics processing method, such as Figure 4 As shown, the method comprises at least the following steps:

[0145] Step 401, the graphics processor determines the Miplevel corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates;

[0146] Step 402: The graphics processor determines the Mipmap texture region to which each texture coordinate belongs, wherein the Mipmap texture is divided into a plurality of regions;

[0147] Step 403: The graphics processor outputs Miplevel information and Mipmap texture region information, wherein the Miplevel information indicates the Miplevel corresponding to each texture coordinate, and the Mipmap texture region information indicates the Mipmap texture region to which each texture coordinate belongs.

[0148] Step 404: The texture loading software determines the Miplevel corresponding to each Mipmap texture area according to the Miplevel information and the Mipmap texture area information, and loads the Mipmap texture area of ​​the corresponding Miplevel.

[0149] The specific implementation methods and terminology explanations of the above steps can refer to the above embodiments and will not be repeated here.

[0150] like Figure 4 The method shown is applied to a graphics processing system, and the texture loading software is run on the processor of the graphics processing system. Figure 4 The method shown is applied to the above electronic device, then the above texture loading software can be run on the CPU of the electronic device, and can also be run on the processor of the graphics processing system of the electronic device.

[0151] In some embodiments, the above step 402 is executed by texture loading software instead of a graphics processor. Accordingly, in step 403, the graphics processor does not need to output Mipmap texture area information.

[0152] Based on the same inventive concept, the embodiment of the present disclosure also provides a graphics processing method, which is implemented by texture loading software, such as Figure 5 As shown, the method comprises at least the following steps:

[0153] Step 501, obtaining Miplevel information and Mipmap texture region information, wherein the Miplevel information indicates the Miplevel corresponding to each texture coordinate, and the Mipmap texture region information indicates the Mipmap texture region to which each texture coordinate belongs;

[0154] Step 502: Determine the Miplevel corresponding to each Mipmap texture area according to the Miplevel information and the Mipmap texture area information, and load the Mipmap texture area of ​​the corresponding Miplevel.

[0155] The specific implementation methods and explanations of terms for the above steps can refer to the description of the above embodiments and will not be repeated here.

[0156] In some embodiments, the Mipmap texture region to which each texture coordinate belongs is determined by the texture loading software, wherein the Mipmap texture is divided into a plurality of regions. Then, in step 501, the texture loading software only needs to obtain the Miplevel information.

[0157] 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.

[0158] 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, the graphics processor include: The multi-level receding level determination module is configured to: determine the multi-level receding level corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates; The texture block determination module is configured to: determine the multi-level progressively distant texture area to which each texture coordinate belongs, wherein the multi-level progressively distant texture is divided into a plurality of areas according to the distance from the camera, and the division method of each level of texture is the same; The region division module is configured to: divide the multi-level progressively distant texture region according to each texture coordinate and the multi-level progressively distant level corresponding to the texture coordinate, and the ratio of target texture coordinates in the same multi-level progressively distant texture region reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressively distant level; Among them, the multi-level progressively distant level information and the multi-level progressively distant texture area information are output to the texture loading software, so that the texture loading software determines the multi-level progressively distant levels corresponding to each multi-level progressively distant texture area according to the multi-level progressively distant level information and the multi-level progressively distant texture area information, and loads the multi-level progressively distant texture area of ​​the corresponding multi-level progressively distant level, the multi-level progressively distant level information indicates the multi-level progressively distant levels corresponding to each texture coordinate, and the multi-level progressively distant texture area information indicates the multi-level progressively distant texture area to which each texture coordinate belongs.

2. The graphics processor according to claim 1, wherein the determining the multi-level progressively distant texture area to which each texture coordinate belongs, include: Comparing each of the texture coordinates with a texture coordinate range of a multi-level progressively distant texture region, wherein the texture coordinate range of the multi-level progressively distant texture region is determined according to an original resolution in the multi-level progressively distant texture; The multi-level progressively distant texture region whose texture coordinates fall within the texture coordinate range is determined as the multi-level progressively distant texture region to which the texture coordinates belong.

3. The graphics processor according to claim 1, wherein the multi-level progressively distant levels corresponding to each texture coordinate are determined according to the input pixel coordinates and texture coordinates. include: Determine the multi-level progressively distant levels corresponding to each texture coordinate in each layer according to the pixel coordinates and texture coordinates of each layer in the input three-dimensional space; The step of determining the multi-level asymptotic texture region to which each texture coordinate belongs includes: The multi-level asymptotic texture area to which each texture coordinate in each layer belongs is determined respectively.

4. A graphics processor, the graphics processor include: The multi-level receding level determination module is configured to: determine the multi-level receding level corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates; Among them, the multi-level progressively distant level information is output to the texture loading software so that the texture loading software determines the multi-level progressively distant texture area to which each texture coordinate belongs, and determines the multi-level progressively distant level corresponding to each multi-level progressively distant texture area according to the multi-level progressively distant level information and the multi-level progressively distant texture area information, and loads the multi-level progressively distant texture area of ​​the corresponding multi-level progressively distant level; the multi-level progressively distant level information indicates the multi-level progressively distant level corresponding to each texture coordinate, and the multi-level progressively distant texture area information indicates the multi-level progressively distant texture area to which each texture coordinate belongs, the multi-level progressively distant texture is divided into multiple areas according to the distance to the camera, the division method of each level texture is the same, the ratio of target texture coordinates in the same multi-level progressively distant texture area reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressively distant level.

5. The graphics processor according to claim 4, wherein the multi-level progressively distant levels corresponding to each texture coordinate are determined according to the input pixel coordinates and texture coordinates, include: Determine the multi-level progressively distant levels corresponding to each texture coordinate in each layer according to the pixel coordinates and texture coordinates of each layer in the input three-dimensional space; The step of determining the multi-level asymptotic texture region to which each texture coordinate belongs includes: The multi-level asymptotic texture area to which each texture coordinate in each layer belongs is determined respectively.

6. A graphics processing system, comprising the graphics processor according to any one of claims 1 to 5. 7 . The graphics processing system according to claim 6 , further comprising a processor, wherein the processor is configured to execute the texture loading software.

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

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

10. A method for processing graphics, the method comprising: include: The graphics processor determines the multi-level progressive distance level corresponding to each texture coordinate according to the input pixel coordinates and texture coordinates; The graphics processor determines a multi-level progressively distant texture region to which each texture coordinate belongs, wherein the multi-level progressively distant texture is divided into a plurality of regions according to a distance from a camera, and each level of texture is divided in the same manner; The graphics processor outputs multi-level progressively distant level information and multi-level progressively distant texture region information, wherein the multi-level progressively distant level information indicates the multi-level progressively distant level corresponding to each texture coordinate, and the multi-level progressively distant texture region information indicates the multi-level progressively distant texture region to which each texture coordinate belongs; The texture loading software determines the multi-level receding level corresponding to each multi-level receding texture area according to the multi-level receding level information and the multi-level receding texture area information, and loads the multi-level receding texture area of ​​the corresponding multi-level receding level; The method further comprises: The graphics processor divides the multi-level progressively distant texture area according to each texture coordinate and the multi-level progressively distant level corresponding to the texture coordinate, and the ratio of target texture coordinates in the same multi-level progressively distant texture area reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressively distant level.

11. The method according to claim 10, wherein the determining the multi-level asymptotic texture region to which each texture coordinate belongs, include: Comparing each of the texture coordinates with a texture coordinate range of a multi-level progressively distant texture region, wherein the texture coordinate range of the multi-level progressively distant texture region is determined according to an original resolution in the multi-level progressively distant texture; The multi-level progressively distant texture region whose texture coordinates fall within the texture coordinate range is determined as the multi-level progressively distant texture region to which the texture coordinates belong.

12. The method according to claim 10, wherein the multi-level progressively distant levels corresponding to each texture coordinate are determined according to the input pixel coordinates and texture coordinates, include: Determine the multi-level progressively distant levels corresponding to each texture coordinate in each layer according to the pixel coordinates and texture coordinates of each layer in the input three-dimensional space; The step of determining the multi-level asymptotic texture region to which each texture coordinate belongs includes: The multi-level asymptotic texture area to which each texture coordinate in each layer belongs is determined respectively.

13. A graphics processing method, the method include: Acquire multi-level progressively distant level information and multi-level progressively distant texture area information, wherein the multi-level progressively distant level information indicates the multi-level progressively distant level corresponding to each texture coordinate, and the multi-level progressively distant texture area information indicates the multi-level progressively distant texture area to which each texture coordinate belongs, and the multi-level progressively distant texture is divided into multiple areas according to the distance from the camera, and the division method of each level texture is the same; Determine the multi-level receding level corresponding to each multi-level receding texture area according to the multi-level receding level information and the multi-level receding texture area information, and load the multi-level receding texture area of ​​the corresponding multi-level receding level; The method further comprises: The multi-level progressively distant texture area is divided according to each texture coordinate and the multi-level progressively distant level corresponding to the texture coordinate, and the ratio of target texture coordinates in the same multi-level progressively distant texture area reaches a set threshold, and the target texture coordinates include texture coordinates corresponding to the same multi-level progressively distant level.

14. The method according to claim 13, further comprising: include: Comparing each of the texture coordinates with a texture coordinate range of a multi-level progressively distant texture region, wherein the texture coordinate range of the multi-level progressively distant texture region is determined according to an original resolution in the multi-level progressively distant texture; The multi-level progressively distant texture region whose texture coordinates fall within the texture coordinate range is determined as the multi-level progressively distant texture region to which the texture coordinates belong.