A method, apparatus and equipment for controlling load

By obtaining GPU rendering operation instructions to determine load data and control the load, the problem of insufficient image rendering performance on mobile terminals is solved, dynamic load control is achieved, applicable to various game applications, and the user experience is improved.

CN114511438BActive Publication Date: 2025-12-02HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011186852.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-29
Publication Date
2025-12-02
Estimated Expiration
2040-10-29

AI Technical Summary

Technical Problem

The limited image rendering performance of mobile devices makes it impossible to meet the load requirements of game programs, affecting the user experience. Furthermore, existing load reduction methods fixed on mobile devices have poor applicability and cannot be upgraded along with the game programs.

Method used

By obtaining the instructions from the graphics processing unit (GPU) to perform rendering operations, determining the load data, and controlling the load based on the target scheme, dynamic load control is achieved. This is applicable to any game application, including upgraded and newly added game applications.

Benefits of technology

It enables online dynamic control of the load during the image rendering process, has strong applicability and a wide range of applications, is not limited by game program upgrades, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114511438B_ABST
    Figure CN114511438B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and device for controlling load during image rendering. This method has good applicability and a wide range of applications. The method includes: determining load data based on instructions for executing rendering operations; dynamically selecting a load control scheme matching the current load condition from multiple load control schemes based on the load data; and applying this scheme to subsequent image processing to achieve load control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, and device for controlling load. Background Technology

[0002] With the rapid development of communication and chip technologies, mobile terminals have become the most important deployment platform for applications. Taking games as an example, an increasing number of large-scale games with high image quality and high frame rates are being deployed on mobile terminals, which undoubtedly places higher demands on the image rendering performance of these terminals. However, the image rendering performance of mobile terminals is limited, so when the image rendering performance cannot meet the load requirements of the game program, it will affect the user's gaming experience.

[0003] To avoid the above situation, the main methods to reduce the load on game programs are as follows: perform load analysis on specific game programs in offline mode, then determine load reduction solutions, and then embed the load reduction solutions into mobile terminals.

[0004] Because solutions embedded in mobile devices cannot be upgraded along with game programs, this method of reducing load has poor applicability and limited application scope. Summary of the Invention

[0005] This application provides a method, apparatus, and device for controlling load during image rendering. This method has good applicability and a wide range of applications.

[0006] The first aspect of this application provides a method for controlling load, including:

[0007] The system acquires at least one first instruction, which is used to call an application programming interface (API) to cause a graphics processing unit (GPU) to perform a first rendering operation. The first rendering operation can be used to render one or more objects in a single frame of an image, or it can be used to render objects in multiple frames of images. Based on the at least one first instruction, the system determines load data for the GPU to perform the first rendering operation, wherein the embodiments of this application do not limit the type of load data or the specific method of determination. Based on the load data, the system determines a target scheme for controlling the load, and the embodiments of this application do not limit the specific method of determining the target scheme. The system acquires at least one second instruction, which is used to call an API to cause the GPU to perform a second rendering operation. The second instruction is essentially the same as the first instruction, both being instructions for calling the API. Based on the target scheme, the system controls the load during the GPU's execution of the second rendering operation.

[0008] The process of controlling the load based on the target scheme is related to the specific content of the target scheme. If the target scheme indicates that a second instruction should be processed, then after obtaining at least one second instruction, the obtained at least one second instruction is first processed according to the target scheme, and then the processed at least one second instruction is passed down. If the target scheme does not indicate that a second instruction should be processed, then after obtaining at least one second instruction, the at least first second instruction is not processed. Instead, other forms of load control measures are taken according to the specific content of the target scheme before, during, or after passing down the second instruction.

[0009] Since the load data is determined based on the first instruction actually obtained during the image rendering process, the method provided in this application embodiment can be applied to any game application, not limited to one or a few game applications. It is also applicable to upgraded game applications and newly added game applications, so it has strong applicability and a wide range of applications. Furthermore, the method provided in this application embodiment does not require offline execution and can achieve dynamic control of the load.

[0010] As one implementation, determining the load data of the GPU executing a first rendering operation based on at least one first instruction includes: acquiring at least one load data of the GPU executing the first rendering operation based on at least one first instruction and at least one pre-defined load feature factor, where each load feature factor corresponds to a type of load data. The load feature factors can be defined according to actual needs and can be understood as characteristic parameters of the load data. Each load feature factor indicates a load, and the value of each load feature factor can be considered as a specific load data. For example, the load feature factor can indicate information about computer hardware resources, and the value of the load feature factor can be considered as load data; for example, the load feature factor indicates the CPU frequency, and correspondingly, the actual frequency of the CPU can be considered as load data. For example, the load feature factor can also indicate the number of first instructions, and correspondingly, the specific number of first instructions can be considered as load data.

[0011] Since at least one load characteristic factor can be preset as needed, and a load data can be obtained for each load characteristic factor, the load data can be guaranteed to be comprehensive and representative.

[0012] As one implementation, at least one load characteristic factor includes at least one of the following three types of load characteristic factors: a first type of load characteristic factor, a second type of load characteristic factor, and a third type of load characteristic factor; the first type of load characteristic factor is used to represent the consumption of computer hardware resources by the GPU in performing the first rendering operation, which can be CPU, GPU, and internal memory, etc.; the second type of load characteristic factor is used to represent the information of the mesh model rendered by the GPU in performing the first rendering operation, which can include various information such as the number of vertices and the number of mesh models; the third type of load characteristic factor is used to represent the information of at least one first instruction, which can include various information such as the number of first instructions and the relationship between instructions.

[0013] At least one load characteristic factor includes at least one of the above three types of load characteristic factors; when at least one load characteristic factor includes two or three types of load characteristic factors, it ensures that multiple load data are obtained from multiple dimensions, thereby facilitating the determination of a more suitable target solution for reducing the load.

[0014] As one implementation, the load data includes at least one of a first type of load data, a second type of load data, and a third type of load data; the first type of load data represents the consumption of computer hardware resources by the GPU in performing the first rendering operation; the second type of load data represents the information of the mesh model rendered by the GPU in performing the first rendering operation; and the third type of load data represents the information of at least one first instruction.

[0015] In this implementation, the load data can include at least one of the three types of load data mentioned above, ensuring the diversity of load data.

[0016] As one implementation method, the first type of load characteristic factors includes at least one of the following: the computation time during the GPU execution of the first rendering operation, the operating parameters of the central processing unit (CPU), the operating parameters of the GPU, and the operating parameters of the internal memory; the second type of load characteristic factors includes at least one of the following: the number of vertices of each Mesh model rendered during the GPU execution of the first rendering operation, the number of vertices in each frame of image rendered during the GPU execution of the first rendering operation, the number of Mesh models in each frame of image rendered during the GPU execution of the first rendering operation, the number of repetitions of Mesh models in each frame of image rendered during the GPU execution of the first rendering operation, and the distance of each Mesh model rendered during the GPU execution of the first rendering operation relative to the screen; the third type of load characteristic factors includes at least one of the following: the number of drawing command DCs composed of at least one first instruction, the number of rendering passes corresponding to at least one first instruction, the frame buffer size, the reference relationship between rendering passes and frame buffers, and the reference relationship between DCs and frame buffers.

[0017] This implementation provides multiple options for each type of load characteristic factor, thus ensuring the diversity of load data.

[0018] As one implementation, the first type of load data may include at least one of the following: computation time, CPU load data, GPU load data, and DDR memory load data; the second type of load data may include at least one of the following: the number of vertices of each Mesh model rendered by the GPU in the process of executing the first rendering operation, the number of vertices in each frame of image rendered by the GPU in the process of executing the first rendering operation, the number of Mesh models in each frame of image rendered by the GPU in the process of executing the first rendering operation, the number of repetitions of Mesh models in each frame of image rendered by the GPU in the process of executing the first rendering operation, and the distance of each Mesh model rendered by the GPU in the process of executing the first rendering operation relative to the screen; the third type of load data may include at least one of the following: the number of drawing commands (DCs) consisting of at least one first instruction, the number of rendering passes corresponding to at least one first instruction, the framebuffer size, the reference relationship between rendering passes and framebuffers, and the reference relationship between DCs and framebuffers.

[0019] There are multiple options for each type of load data, thus ensuring the diversity of load data.

[0020] As one implementation, at least one load feature factor includes a second type of load feature factor; obtaining at least one load data of the process of the GPU executing the first rendering operation based on at least one first instruction and at least one load feature factor includes: determining the data of the mesh model rendered by the GPU executing the first rendering operation based on the parameters carried by each of the at least one first instruction; and obtaining the load data of the second type of load feature factor corresponding to the process of the GPU executing the first rendering operation based on the data of the mesh model rendered by the GPU executing the first rendering operation.

[0021] In this implementation, the parameters carried by the first instruction indicate the data of the Mesh model to be rendered, and the load data corresponding to the second type of load feature factor can be determined based on the data of the Mesh model to be rendered.

[0022] As one implementation method, determining the target scheme for load control based on load data includes: determining a load control tag based on the load data, wherein the load control tag indicates the content of load control, and one or more load control tags can be determined for the same load data; selecting a load control scheme from at least one preset load control scheme based on the load control tag as the target scheme for load control. For example, if the load data is the CPU frequency, then the first load tag can indicate control of the CPU frequency; if the load data is the number of first instructions, then the first load tag can indicate control of the number of first instructions.

[0023] In this implementation, the setting of load control tags allows developers to flexibly expand load control schemes, that is, to pre-set more load control schemes associated with load control tags for selection.

[0024] As one implementation method, the load data includes a first type of load data, which represents the consumption of computer hardware resources by the GPU in performing the first rendering operation; determining the load control label based on the load data includes: determining a first load control label based on the first type of load data indicating that the consumption of computer hardware resources by the GPU in performing the first rendering operation meets a first condition, and the first load control label indicating that the operating parameters of the computer hardware are adjusted during the GPU's second rendering operation.

[0025] In this implementation, when the load data includes the first type of load data, the first load control label indicates that the operating parameters of the computer hardware should be adjusted, so that the load can be reduced by adjusting the operating parameters of the computer hardware.

[0026] As one implementation, the first load control label indicates the adjustment of the frequency of the CPU, GPU, or internal memory during the second rendering operation performed by the GPU.

[0027] This implementation provides a specific content for the first load control label, which indicates the frequency of the CPU, GPU, or internal memory to be adjusted.

[0028] As one implementation, the load data includes a second type of load data, which represents information about the mesh model rendered by the GPU performing the first rendering operation. Determining the load control label based on the load data includes: determining a second load control label based on the information of the mesh model rendered by the GPU performing the first rendering operation, which is based on the first type of load data, which indicates that the information satisfies a second condition. The second load control label indicates that the mesh model rendered by the GPU during the second rendering operation is simplified.

[0029] In this implementation, when the load data includes a second type of load data, the second load control label indicates that the rendered Mesh model should be simplified, thereby reducing the load by adjusting the operating parameters of the computer hardware.

[0030] As one implementation, the second load control label indicates the characteristics of the Mesh model to be simplified, the simplification algorithm applicable to the Mesh model to be simplified, and the parameters of the simplification algorithm during the second rendering operation performed by the GPU.

[0031] This implementation provides specific content for the second load control label, which indicates the characteristics of the Mesh model to be simplified, the simplification algorithm applicable to the Mesh model to be simplified, and the parameters of the simplification algorithm.

[0032] As one implementation, the second type of load data includes the number of vertices and the number of mesh models in each frame of the image rendered by the first rendering operation; the second condition includes the number of vertices in each frame of the image rendered by the first rendering operation being greater than a first threshold, or the number of mesh models in each frame of the image rendered by the first rendering operation being greater than a second threshold.

[0033] In this implementation, the second condition is defined from two dimensions: the number of vertices in each frame and the number of Mesh models.

[0034] As one implementation, the second load control label indicates that the mesh model rendered by the first rendering operation should be simplified if the number of vertices is greater than the third threshold, the number of repetitions is greater than the fourth threshold, or the distance relative to the screen is greater than the fifth threshold.

[0035] In this implementation, the Mesh model to be simplified is defined by the number of vertices, the number of repetitions, and the distance relative to the screen.

[0036] As one implementation, the load data includes a third type of load data, which represents information of at least one first instruction; determining the load control tag based on the load data includes: determining a third load control tag based on the instruction information of at least one first instruction that indicates the third type of load data satisfies a third condition, and the third load control tag indicates that at least one second instruction should be processed.

[0037] In this implementation, when the load data includes a third type of load data, the third load control tag indicates that at least one second instruction should be processed, thereby reducing the load by processing at least one second instruction.

[0038] As one implementation, there are multiple second instructions; the third load control label indicates at least one of the following: merging multiple DCs composed of multiple second instructions, or merging multiple rendering channels corresponding to multiple second instructions.

[0039] This implementation provides a specific example of a third load control label, which indicates whether to merge multiple DCs or multiple rendering passes.

[0040] A second aspect of this application provides a device for controlling a load, comprising:

[0041] The instruction acquisition module is used to acquire at least one first instruction, which is used to call the application programming interface (API) to cause the graphics processing unit (GPU) to perform a first rendering operation.

[0042] A load data determination module is used to determine the load data of the process of the GPU executing the first rendering operation based on at least one first instruction;

[0043] The target scheme determination module is used to determine the target scheme for controlling the load based on the load data.

[0044] The instruction acquisition module is also used to acquire at least one second instruction, which is used to call the API to cause the GPU to perform a second rendering operation;

[0045] The control module is used to control the load on the GPU during the second rendering operation based on the target scheme.

[0046] As one implementation, the load data determination module is used to obtain at least one load data of the process of the GPU performing the first rendering operation based on at least one first instruction and at least one load feature factor, wherein each load feature factor corresponds to one type of load data.

[0047] As one implementation, at least one load feature factor includes at least one of the following three types of load feature factors: a first type of load feature factor, a second type of load feature factor, and a third type of load feature factor; the first type of load feature factor is used to represent the consumption of computer hardware resources by the GPU in the process of executing the first rendering operation; the second type of load feature factor is used to represent the information of the mesh model rendered by the GPU in the process of executing the first rendering operation; and the third type of load feature factor is used to represent the information of at least one first instruction.

[0048] As one implementation method, the first type of load characteristic factors includes at least one of the following: the computation time during the GPU execution of the first rendering operation, the operating parameters of the central processing unit (CPU), the operating parameters of the GPU, and the operating parameters of the internal memory; the second type of load characteristic factors includes at least one of the following: the number of vertices of each Mesh model rendered during the GPU execution of the first rendering operation, the number of vertices in each frame of image rendered during the GPU execution of the first rendering operation, the number of Mesh models in each frame of image rendered during the GPU execution of the first rendering operation, the number of repetitions of Mesh models in each frame of image rendered during the GPU execution of the first rendering operation, and the distance of each Mesh model rendered during the GPU execution of the first rendering operation relative to the screen; the third type of load characteristic factors includes at least one of the following: the number of drawing command DCs composed of at least one first instruction, the number of rendering passes corresponding to at least one first instruction, the frame buffer size, the reference relationship between rendering passes and frame buffers, and the reference relationship between DCs and frame buffers.

[0049] As one implementation, at least one load feature factor includes a second type of load feature factor; the load data determination module is used to determine the data of the mesh model rendered by the GPU executing the first rendering operation based on the parameters carried by at least one first instruction; and to obtain the load data of the second type of load feature factor corresponding to the process of the GPU executing the first rendering operation based on the data of the mesh model rendered by the GPU executing the first rendering operation.

[0050] As one implementation method, the target scheme determination module is used to determine the load control label based on the load data. The load control label indicates the content of load control. Based on the load control label, the target scheme for controlling the load is determined.

[0051] As one implementation, the load data includes a first type of load data, which represents the consumption of computer hardware resources by the GPU during the execution of the first rendering operation; the target scheme determination module is used to determine a first load control label based on the first type of load data indicating that the consumption of computer hardware resources by the GPU during the execution of the first rendering operation meets a first condition, and the first load control label indicates that the operating parameters of the computer hardware are adjusted during the GPU's execution of the second rendering operation.

[0052] As one implementation, the first load control label indicates the adjustment of the frequency of the CPU, GPU, or internal memory during the second rendering operation performed by the GPU.

[0053] As one implementation, the load data includes a second type of load data, which represents information about the mesh model rendered by the GPU performing the first rendering operation; the target scheme determination module is used to determine a second load control label based on the first type of load data indicating that the information of the mesh model rendered by the GPU performing the first rendering operation meets a second condition, and the second load control label indicates that the mesh model rendered during the GPU performing the second rendering operation is simplified.

[0054] As one implementation, the second load control label indicates the characteristics of the Mesh model to be simplified, the simplification algorithm applicable to the Mesh model to be simplified, and the parameters of the simplification algorithm during the second rendering operation performed by the GPU.

[0055] As one implementation, the second type of load data includes the number of vertices and the number of mesh models in each frame of the image rendered by the first rendering operation; the second condition includes the number of vertices in each frame of the image rendered by the first rendering operation being greater than a first threshold, or the number of mesh models in each frame of the image rendered by the first rendering operation being greater than a second threshold.

[0056] As one implementation, the second load control label indicates that the mesh model rendered by the first rendering operation should be simplified if the number of vertices is greater than the third threshold, the number of repetitions is greater than the fourth threshold, or the distance relative to the screen is greater than the fifth threshold.

[0057] As one implementation, the load data includes a third type of load data, which represents information of at least one first instruction; the target scheme determination module is used to determine a third load control tag based on the instruction information of at least one first instruction indicated by the third type of load data, which satisfies a third condition, and the third load control tag indicates that at least one second instruction should be processed.

[0058] As one implementation, there are multiple second instructions; the third load control label indicates at least one of the following: merging multiple DCs composed of multiple second instructions, or merging multiple RenderPasses corresponding to multiple second instructions.

[0059] For details on the implementation, related explanations, and technical effects of each of the above units, please refer to the description of the first aspect of the embodiments of this application.

[0060] A third aspect of this application provides a terminal device, including: one or more processors and a memory; wherein the memory stores computer-readable instructions; the one or more processors read the computer-readable instructions to cause the computer device to implement the method as described in any implementation of the first aspect.

[0061] A fourth aspect of this application provides a computer-readable storage medium including computer-readable instructions that, when executed on a computer, cause the computer to perform the method as described in any implementation of the first aspect.

[0062] A fifth aspect of this application provides a chip including one or more processors. Part or all of the processors are configured to read and execute a computer program stored in a memory to perform the methods in any possible implementation of the first aspect described above.

[0063] Optionally, the chip includes a memory, which is connected to the processor via a circuit or wire. Further optionally, the chip also includes a communication interface, to which the processor is connected. The communication interface is used to receive data and / or information that needs to be processed. The processor obtains the data and / or information from the communication interface, processes the data and / or information, and outputs the processing result through the communication interface. The communication interface can be an input / output interface.

[0064] In some implementations, some of the processors may implement some steps of the above method through dedicated hardware. For example, the processing of neural network models may be implemented by a dedicated neural network processor or graphics processor.

[0065] The method provided in this application embodiment can be implemented by a single chip or by multiple chips working together.

[0066] A sixth aspect of this application provides a computer program product, which includes computer software instructions that can be loaded by a processor to implement the method described in any of the implementations of the first aspect.

[0067] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0068] The method involves acquiring at least one first instruction, determining the load data of the GPU's first rendering operation based on the first instruction, and then determining the target scheme based on the load data. Once at least one second instruction is acquired, the load of the GPU's second rendering operation can be controlled according to the target scheme, thereby achieving online dynamic control of the load during image rendering. Since the load data is determined based on the first instruction actually acquired during image rendering, the method provided in this application can be applied to any game application, not limited to one or a few game applications. It is also applicable to upgraded game applications and newly added game applications, thus having strong applicability and a wide range of applications. Attached Figure Description

[0069] Figure 1 This is a schematic diagram of the system architecture in an embodiment of this application;

[0070] Figure 2 This is a schematic diagram of an embodiment of the method for controlling load in this application;

[0071] Figure 3 This is a flowchart illustrating one embodiment of load control in this application.

[0072] Figure 4 This is a schematic diagram of one embodiment of the first load control tag in this application;

[0073] Figure 5 This is a schematic diagram of the features of the Mesh model to be simplified in the embodiments of this application;

[0074] Figure 6 This is a schematic diagram of the umbrella-shaped body in an embodiment of this application;

[0075] Figure 7 This is a schematic diagram of the structure of the closure body in the embodiments of this application;

[0076] Figure 8 This is a schematic diagram of the structure of the extension body in the embodiments of this application;

[0077] Figure 9 This is a schematic diagram of step 103 in an embodiment of this application;

[0078] Figure 10 This is a schematic diagram illustrating the process of determining the third load control tag in an embodiment of this application;

[0079] Figure 11 This is a schematic diagram of one embodiment of the third load control tag in this application;

[0080] Figure 12 This is a flowchart illustrating another embodiment of load control in this application.

[0081] Figure 13 This is a schematic diagram of the device for controlling the load in an embodiment of this application;

[0082] Figure 14 This is a schematic diagram of the structure of the terminal device in the embodiments of this application. Detailed Implementation

[0083] The embodiments of this application are described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. As those skilled in the art will recognize, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0084] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or modules is not necessarily limited to those explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or apparatus. The naming or numbering of steps appearing in this application does not imply that the steps in the method flow must be performed in the chronological or logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved.

[0085] The embodiments of this application can be applied to, for example... Figure 1 The system architecture shown includes an application layer, a graphical application programming interface (API) layer, a kernel layer, and a hardware layer.

[0086] It should be noted that this system framework can be applied to any terminal device that needs to reduce the load during image rendering, especially some terminal devices with limited image rendering performance. For example, this system framework can be applied to mobile terminals with limited image rendering performance, such as mobile phones, tablets, and laptops. This system framework can also be applied to terminal devices with limited image rendering performance in special scenarios, such as in-vehicle computers.

[0087] like Figure 1 As shown, the application layer includes three game applications. It should be noted that in this embodiment, the applications in the application layer mainly refer to game applications, meaning that this embodiment is primarily applied to game rendering scenes. However, in other embodiments of this application, the applications in the application layer can be other applicable applications, and this application does not specifically limit this; furthermore, the number of game applications is not limited to three; fewer or more are also possible.

[0088] The graphics API layer includes, but is not limited to, three graphics APIs: Open Graphics Library (OpenGL), OpenGL ES (OpenGL for Embedded Systems), and Vulkan. The graphics API layer can be used to render 2D or 3D scenes to the screen of a terminal device; for example, OpenGL is used to render 2D scenes, while OpenGL ES and Vulkan are used to render 3D scenes.

[0089] The kernel layer includes the system kernel and drivers, etc.

[0090] The hardware layer includes, but is not limited to, the central processing unit (CPU), the graphics processing unit (GPU), and internal memory. The internal memory can be double data rate SDRAM (DDR SDRAM) or other types of internal memory.

[0091] based on Figure 1 The system framework shown, when the game application is running, includes the following rendering pipeline:

[0092] The first step is for the game engine in the game application to traverse the game scene and remove invisible objects.

[0093] The second step involves the game engine preparing data resources for each visible object and sending a command to call the graphics API, which then reaches the kernel layer.

[0094] Third, after receiving the instruction to call the graphics API, the kernel-level driver will transfer the data resources to the GPU's internal memory and send rendering instructions to the GPU to instruct it to perform rendering.

[0095] In the fourth step, after receiving the rendering instructions, the GPU reads the data resources from its internal memory and executes operations such as the vertex shader, pixel shader, or compute shader.

[0096] A vertex shader is a program segment that processes vertex transformations on the GPU. For each vertex in a mesh model, the vertex shader is executed once. Therefore, the more vertices in the scene to be rendered, the heavier the computational load on the vertex shader.

[0097] A pixel shader is a programmatic segment that processes pixel shading on the GPU. After the model undergoes vertex transformation, the pixel shader is executed once for each pixel on the screen covered by the mesh model. Therefore, the higher the screen resolution, the heavier the computational load of the pixel shader.

[0098] A compute shader is a program segment that executes on the GPU and can be used for computations other than graphics rendering. Specifically, compute shaders can be transferred to the GPU for execution via OpenGL ES or the Vulkan API.

[0099] High-definition and high-frame-rate game applications place a high load on image rendering, so in order to reduce the load during image rendering, such as Figure 1 As shown, this embodiment adds a load control layer. This load control layer can intercept the instructions calling the graphics API from the graphics API layer, then obtain the necessary information from the intercepted instructions, or process the instructions. Finally, the instructions calling the graphics API are returned to the graphics API layer so that the instructions can continue to be passed to the kernel layer.

[0100] Specifically, after receiving the instruction to call the graphics API, the load control layer dynamically analyzes the load during the image rendering process based on this instruction, and then selects appropriate load reduction schemes based on the analysis results. Finally, the load reduction schemes are used to reduce the load in subsequent image rendering processes. The following section will combine... Figure 2 The method for controlling load provided in this application will be described in detail in the embodiments. For example... Figure 2 As shown, this application provides an embodiment of a method for controlling load, which can be applied to a CPU, including:

[0101] Step 101: Obtain at least one first instruction, which is used to call the application programming interface (API) to cause the graphics processing unit (GPU) to perform a first rendering operation.

[0102] This embodiment does not specifically limit the number of first instructions. For example, the number of first instructions can be one or more. When there are multiple first instructions, the multiple first instructions can constitute one or more instruction streams, and each instruction stream is used to call the API to cause the GPU to render one frame of image.

[0103] Accordingly, the first rendering operation can be used to render one or more objects (people, backgrounds, etc.) in a single frame of an image, or it can be used to render objects in multiple frames of images. In the embodiments of this application, API refers to a graphics API; correspondingly, in Figure 1 The system architecture shown has a first instruction issued by the game application that calls the graphics API.

[0104] It should be noted that acquiring at least one first instruction can be understood as sensing and recording at least one first instruction, and does not prevent the first instruction from being passed down.

[0105] based on Figure 1 As can be seen from the description of the system framework shown, after the first instruction for calling the API is passed to the driver, the driver sends a rendering instruction to the GPU, causing the GPU to perform the first rendering operation.

[0106] The graphics processing mainly includes multiple stages such as modeling, physical simulation, rendering, and post-processing. The first rendering operation in this embodiment mainly refers to the rendering stage in the above process.

[0107] Step 102: Determine the load data of the process of the GPU performing the first rendering operation based on at least one first instruction.

[0108] In the embodiments of this application, the determination of the load data is based on the determination of the GPU by the at least one first instruction, and does not depend on the actual process of the GPU executing the first rendering operation. It can also be understood that the process of determining the load data and the actual process of the GPU executing the first rendering operation can be parallel.

[0109] It should be noted that there are multiple methods for determining load data, and this embodiment does not impose any specific limitations on them. For example, load data can be determined based on the number, specific type, and function of at least one first instruction; alternatively, after obtaining at least one first instruction, information about the computer hardware resources that the GPU may use during the execution of the first rendering operation can be obtained to determine the load data; or the object of the first rendering operation can be determined based on at least one first instruction, and then the load data can be determined based on the information of the object of the first rendering operation.

[0110] As explained above, load data can be of various types. Therefore, in this embodiment, load characteristic factors are predefined. These load characteristic factors can be understood as characteristic parameters of the load data. Each load characteristic factor indicates a type of load, and the value of each load characteristic factor can be considered as a specific load data. In this way, the load data can be determined based on the load characteristic factors.

[0111] For example, a load characteristic factor can indicate information about computer hardware resources, and the value of the load characteristic factor can be used as load data; for example, the characteristic factor indicates the CPU frequency, and correspondingly, the actual frequency of the CPU can be used as load data.

[0112] For example, the feature factor can also indicate the number of first instructions, and correspondingly, the specific number of first instructions can be used as a load data.

[0113] For example, the load data for determining the process of the GPU performing a first rendering operation based on at least one first instruction includes:

[0114] At least one load data is obtained based on at least one first instruction and at least one load feature factor during the process of the GPU performing the first rendering operation, wherein each load feature factor corresponds to one type of load data.

[0115] In the embodiments of this application, a type of load data can be obtained for each load characteristic factor.

[0116] It should be noted that load characteristic factors can be defined according to actual needs, and there can be many dimensions for defining load characteristic factors. The following text will introduce load characteristic factors from multiple dimensions.

[0117] In the embodiments of this application, since at least one load characteristic factor can be preset as needed, and a load data can be obtained for each load characteristic factor, the load data can be guaranteed to be relatively comprehensive and representative.

[0118] Step 103: Determine the target scheme for controlling the load based on the load data.

[0119] After acquiring the load data, it can be analyzed to determine the target scheme for controlling the load. Understandably, this target scheme is typically used to reduce the load during image rendering.

[0120] It should be noted that there are various methods for determining the target solution based on load data, and this application does not specifically limit these methods. For example, a load control scheme library can be established in advance, which contains various load control schemes. Based on the analysis results of the load data, a load control scheme can be selected from these multiple load control schemes as the target scheme for controlling the load.

[0121] The following describes a method for determining a target solution based on load data. For example, determining a target solution for load control based on load data includes:

[0122] First, a load control label is determined based on the load data, and the load control label indicates the content of load control; then, a load control scheme is selected from at least one load control scheme based on the load control label as the target scheme for controlling the load.

[0123] It is understandable that load control tags indicate the content of load control and are used to associate specific load control schemes. For the same load data, one or more load control tags can be identified.

[0124] This application does not specifically limit the form and content of the load control tag; for different load data, the form and content of the resulting load control tag can be different. The following will combine... Figure 4 , Figure 11 Tables 1 to 3 provide a detailed description of the possible forms and contents of control labels.

[0125] At least one load control scheme is preset.

[0126] In this embodiment of the application, the setting of load control tags allows developers to flexibly expand load control schemes, that is, to pre-set more load control schemes associated with load control tags for selection.

[0127] Step 104: Obtain at least one second instruction, which is used to call the API to cause the GPU to perform a second rendering operation.

[0128] It should be noted that the second instruction is essentially the same as the first instruction, both of which are instructions for calling the API. In step 104, any one of the at least one second instruction can be an instruction for calling the API issued after the first instruction, or it can be the first instruction, or when the second instruction and the first instruction each contain multiple instructions, they may have the same instruction.

[0129] Therefore, please refer to the relevant explanation of step 101 to understand step 104.

[0130] Step 105: Control the load on the GPU during the second rendering operation based on the target scheme.

[0131] Similar to the first rendering operation, the second rendering operation in this embodiment mainly refers to the rendering stage in the above process.

[0132] It should be noted that the process of controlling the load based on the target scheme is related to the specific content of the target scheme, and the embodiments of this application do not specifically limit it.

[0133] For example, if the target scheme indicates that the second instruction should be processed, then after step 104, at least one second instruction obtained in step 104 is first processed according to the target scheme, and then the processed at least one second instruction is passed to the graphics API.

[0134] If the target scheme does not indicate processing of the second instruction, then after step 104, at least one second instruction can be passed to the graphics API, and the load can be controlled before, during or after the second instruction is passed, depending on the specific content of the target scheme.

[0135] Based on steps 101 to 105, the load control method provided in this application embodiment can be summarized as follows: Figure 3 The proposed solution is shown below. Figure 3 As shown, the first instruction is issued by the application and transmitted to the Driver Development Kit (DDK) via the graphics API. During this transmission to the driver, it is acquired by the instruction acquisition module, which then collects data related to the first instruction. Subsequently, load data is identified based on load feature factors in the feature library, and a scheme matching process is performed based on this data. Specifically, a target scheme is determined from all load control schemes in the load control scheme library. Once the target scheme takes effect, it can be used to control the load during the GPU's second rendering operation.

[0136] In this embodiment, the load data of the GPU performing the first rendering operation is determined based on the first instruction. Then, a target scheme is determined based on the load data. Finally, the load of the GPU performing the second rendering operation is controlled according to the target scheme, thereby realizing online analysis and control of the load during image rendering. Since the load data is determined based on the first instruction actually obtained during image rendering, the method provided by this embodiment can be applied to any game application, not limited to one or a few game applications. It is also applicable to upgraded game applications and newly added game applications, so it has strong applicability and a wide range of applications. Furthermore, the method provided by this embodiment does not need to be executed offline, and can realize dynamic control of the load.

[0137] As explained above, load characteristic factors can be defined from multiple dimensions. The following sections will introduce load characteristic factors from three dimensions, each corresponding to a type of load characteristic factor.

[0138] For example, the load characteristic factor includes at least one of the following three types of load characteristic factors: a first type of load characteristic factor, a second type of load characteristic factor, and a third type of load characteristic factor.

[0139] Specifically, the first type of load characteristic factor is used to represent the consumption of computer hardware resources by the GPU in the process of performing the first rendering operation. The hardware resources can be CPU, GPU and internal memory, etc., and the internal memory can be DDR SDRAM.

[0140] It should be noted that there can be multiple types of the first type of load characteristic factors, and this application does not specifically limit them in the embodiments.

[0141] For example, the first type of load characteristic factors includes at least one of the following: the computation time during the GPU's execution of the first rendering operation, the operating parameters of the central processing unit (CPU), the operating parameters of the GPU, and the operating parameters of the internal memory.

[0142] The computation time can specifically include the time spent on logical operations and the time spent on GPU calls; the CPU's operating parameters can specifically include the CPU frequency and CPU utilization; the GPU's operating parameters can specifically include the GPU frequency and GPU utilization.

[0143] The second type of load feature factor is used to represent the information of the mesh model rendered during the GPU's first rendering operation.

[0144] In rendering scenes, 3D models are generally represented by triangular meshes, hence the name "mesh model." Each triangle consists of three vertices, and vertex data includes position, normals, and UV coordinates; a vertex can be shared by multiple adjacent triangles. The more complex the geometry of a mesh model, the greater the number of triangle vertices.

[0145] Therefore, information from the Mesh model can be used as a second type of load characteristic factor to indicate the amount of load.

[0146] In this embodiment of the application, the information of the mesh model may include various information such as the number of vertices of the mesh model and the number of mesh models.

[0147] It should be noted that there can be multiple types of the second type of load characteristic factors, and the embodiments of this application do not specifically limit them.

[0148] For example, the second type of load characteristic factors includes at least one of the following: the number of vertices of each Mesh model rendered during the GPU's execution of the first rendering operation, the number of vertices in each frame of image rendered during the GPU's execution of the first rendering operation, the number of Mesh models in each frame of image rendered during the GPU's execution of the first rendering operation, the number of repetitions of Mesh models in each frame of image rendered during the GPU's execution of the first rendering operation, and the distance of each Mesh model rendered during the GPU's execution of the first rendering operation relative to the screen.

[0149] The number of vertices in a mesh model indicates the complexity of its geometry. A higher number of vertices indicates a more complex geometry, and consequently, a greater rendering load. Therefore, the number of vertices in a mesh model can be used as a second type of feature factor.

[0150] The number of vertices in each frame represents the total number of vertices that need to be traversed during the rendering of each frame. The larger the total number of vertices that need to be traversed, the greater the rendering load of that frame. Therefore, the number of vertices in each frame can be used as a second type of feature factor.

[0151] The number of mesh models in each frame indicates the number of mesh models that need to be rendered during the rendering of each frame. The more mesh models that need to be rendered during the rendering of a frame, the greater the workload. Therefore, the number of mesh models in each frame can be used as a second type of feature factor.

[0152] In a single image frame, a high number of repetitions of a mesh model indicates a large total number of vertices. Therefore, the number of repetitions of a mesh model in each frame can be considered a second type of feature factor. For example, if a tree mesh model in a frame contains few vertices but has a high number of repetitions, it means that rendering that tree mesh model in that frame will be computationally expensive. The number of repetitions of a mesh model in each frame can also be referred to as the number of instances of that mesh model.

[0153] Theoretically, a mesh model that is close to the screen needs to be rendered more clearly to ensure image quality; conversely, a mesh model that is far from the screen can have lower rendering requirements. In other words, different distances between the mesh model and the screen can represent different workloads. Therefore, the distance of each mesh model relative to the screen can be used as a second type of feature factor.

[0154] The third type of load characteristic factor is used to represent information about at least one first instruction, wherein the information about the first instruction may include various information such as the number of first instructions and the relationship between instructions.

[0155] It should be noted that there can be multiple types of the third type of load characteristic factor, and the embodiments of this application do not specifically limit them.

[0156] For example, the third type of load characteristic factors includes at least one of the following: the number of draw calls (DCs) consisting of at least one first instruction, the number of render passes corresponding to at least one first instruction, the frame buffer size, the reference relationship between render passes and frame buffers, and the reference relationship between DCs and frame buffers.

[0157] To facilitate understanding, the following explains the relationship between the first instruction, DC, rendering channel, the reference relationship between the rendering channel and the frame buffer, and the reference relationship between DC and the frame buffer.

[0158] Taking the rendering of a single frame as an example, it can specifically include multiple rendering passes, each rendering pass can correspond to multiple rendering controllers (DCs), and each DC can include multiple instructions that call the API. Therefore, the number of drawing command DCs consisting of at least one first instruction and the number of rendering passes corresponding to at least one first instruction can be used as the third type of feature factor.

[0159] During image rendering, the rendering result of each rendering channel is output to a corresponding frame buffer. Therefore, the correspondence between rendering channels and frame buffers can also be called the reference relationship between rendering channels and frame buffers.

[0160] Similarly, the rendering result corresponding to each DC will be output to a corresponding frame buffer, so the correspondence between DC and frame buffer can also be called the reference relationship between DC and frame buffer.

[0161] It should be noted that, since the first type of load characteristic factor is used to represent the consumption of computer hardware resources by the GPU in executing the first rendering operation, when the load characteristic factor includes the first type of load characteristic factor, the load data corresponding to the first type of load characteristic factor in the GPU's execution of the first rendering operation can be obtained based on the computer hardware's operating parameters. The third type of load characteristic factor is used to represent information about at least one first instruction; therefore, when the load characteristic factor includes the third type of load characteristic factor, the load data corresponding to the third type of load characteristic factor in the GPU's execution of the first rendering operation can be obtained based on at least one first instruction.

[0162] The second type of load feature factor is used to represent the information of the mesh model rendered by the GPU in the process of performing the first rendering operation. Therefore, when the load feature factor includes the second type of load feature factor, the information of the mesh model rendered by the GPU in the process of performing the first rendering operation needs to be determined before the load data can be determined.

[0163] Specifically, as one implementation, at least one load characteristic factor includes a second type of load characteristic factor.

[0164] At least one load data for the process of the GPU executing the first rendering operation, based on at least one first instruction and at least one load feature factor, includes:

[0165] The data of the mesh model rendered by the GPU executing the first rendering operation is determined based on the parameters carried by at least one first instruction.

[0166] Based on the data of the mesh model rendered by the GPU performing the first rendering operation, obtain the load data of the second type of load feature factor corresponding to the process of the GPU performing the first rendering operation.

[0167] It is understandable that the first instruction carries corresponding parameters. The mesh model rendered by the GPU in the first rendering operation can be determined by the parameters carried in the first instruction, and the data of the mesh model rendered by the GPU in the first rendering operation can be obtained.

[0168] Corresponding to the three types of load characteristic factors mentioned above, three types of load data can be obtained. Therefore, the obtained load data may include at least one of the first type of load data, the second type of load data, and the third type of load data.

[0169] The first type of load data represents the consumption of computer hardware resources by the GPU in executing the first rendering operation; the second type of load data represents the information of the mesh model rendered by the GPU in executing the first rendering operation; and the third type of load data represents the information of at least one first instruction.

[0170] Specifically, the first type of load data may include at least one of the following: computation time, CPU load data, GPU load data, and DDR memory load data.

[0171] The second type of payload data may include at least one of the following: the number of vertices of each Mesh model rendered during the GPU's execution of the first rendering operation, the number of vertices in each frame of the image rendered during the GPU's execution of the first rendering operation, the number of Mesh models in each frame of the image rendered during the GPU's execution of the first rendering operation, the number of repetitions of the Mesh model in each frame of the image rendered during the GPU's execution of the first rendering operation, and the distance of each Mesh model rendered during the GPU's execution of the first rendering operation relative to the screen.

[0172] The third type of payload data may include at least one of the following: the number of draw calls (DCs) consisting of at least one first instruction, the number of render passes corresponding to at least one first instruction, the frame buffer size, the reference relationship between render passes and frame buffers, and the reference relationship between DCs and frame buffers.

[0173] As explained above, the process for determining the load control tag differs depending on the type of load control tag. The following section will use the three types of load data mentioned above as examples to illustrate the process for determining the load control tag.

[0174] As one implementation, the load data includes a first type of load data, which represents the consumption of computer hardware resources by the GPU during the execution of the first rendering operation.

[0175] Accordingly, step 103 may include:

[0176] Based on the first type of load data indicating that the consumption of computer hardware resources by the GPU in performing the first rendering operation meets the first condition, a first load control label corresponding to the first load data is determined. The first load control label indicates that the operating parameters of the computer hardware are adjusted during the GPU's execution of the second rendering operation.

[0177] The process of determining the first load control tag corresponding to the first load data may involve selecting one load control tag from one or more known load control tags as the first load control tag.

[0178] Accordingly, the target solution is used to adjust the operating parameters of computer hardware. This application does not specifically limit the content of the target solution.

[0179] It is understandable that the first condition and the first load control label may be different for different types of first-class load data.

[0180] For example, if the first load data includes the CPU frequency, then the first condition can be that the CPU frequency is greater than a preset frequency; correspondingly, if the CPU frequency is greater than the preset frequency, a first load control tag is generated. The first load control tag may include "CPUBound", where "CPU Bound" indicates that the currently running game application is computationally intensive; the first load control tag may also include "Bound Intensity", where "Bound Intensity" indicates the degree of computational intensity.

[0181] For example, such as Figure 4 As shown, the first load control label indicates that the frequency of the CPU, GPU, or internal memory is adjusted during the second rendering operation performed by the GPU.

[0182] Accordingly, the first load control tag can be in the form shown in Table 1 below, specifically including two fields: frequency tuning object and frequency point, that is, indicating that the frequency point of the frequency tuning object should be adjusted; wherein, the frequency tuning object can be the CPU, GPU or internal memory.

[0183] Table 1

[0184]

[0185] It should be noted that the embodiments in this application use frequency points as an example to illustrate the process of determining the first load control tag. For other first-type load data, please refer to the above description for a specific understanding.

[0186] As one implementation, the payload data includes a second type of payload data, which represents information about the mesh model rendered by the GPU performing the first rendering operation.

[0187] Accordingly, step 103 may include:

[0188] Based on the information of the mesh model rendered by the GPU in performing the first rendering operation according to the first type of load data, which satisfies the second condition, the second load control label corresponding to the second load data is determined. The second load control label indicates that the mesh model rendered by the GPU in the process of performing the second rendering operation is simplified.

[0189] The process of determining the second load control tag corresponding to the second load data can be to select one load control tag from one or more known load control tags as the second load control tag.

[0190] Understandably, if the information of the mesh model rendered by the GPU performing the first rendering operation satisfies the second condition, then it is considered necessary to simplify the model. Model simplification can be understood as reducing the detail precision of the mesh model; specifically, based on the foregoing explanation, the mesh model is composed of triangular meshes, therefore fewer triangular meshes can be used to represent the mesh model, thereby simplifying the mesh model and reducing the workload.

[0191] Accordingly, the target scheme is used to simplify the Mesh model rendered during the second rendering operation performed by the GPU. This application does not specifically limit the content of the target scheme.

[0192] It is understandable that the second condition and the second load control label may be different for different types of second load data.

[0193] For example, the second type of load data includes the number of vertices and the number of mesh models in each frame of the image rendered by the first rendering operation. Accordingly, the second condition includes the number of vertices in each frame of the image rendered by the first rendering operation being greater than a first threshold, or the number of mesh models in each frame of the image rendered by the first rendering operation being greater than a second threshold.

[0194] Taking the number of vertices in each frame of an image as an example, we can first define multiple levels for the number of vertices in each frame. For example, a frame with less than or equal to 500K vertices is level one, a frame with more than 500K but less than 2000K vertices is level two, and a frame with more than or equal to 2000K vertices is level three. The first threshold can be set to 500K or 2000K. Here, K represents thousands.

[0195] For example, the second load control label can take the form shown in Table 2, that is, indicating the features of the Mesh model to be simplified, the simplification algorithm applicable to the Mesh model to be simplified, and the parameters of the simplification algorithm during the second rendering operation performed by the GPU.

[0196] Table 2

[0197]

[0198] It is understandable that the information of the mesh model rendered by the GPU performing the first rendering operation satisfies the second condition, which only determines that model simplification is necessary, but not all mesh models can be simplified. Therefore, it is necessary to determine which mesh models can be simplified. Thus, the second load control label in this embodiment indicates the characteristics of the mesh model to be simplified.

[0199] The features of the simplified Mesh model can include a variety of features, and this application embodiment does not specifically limit them. For example, such as Figure 5 As shown, the features of the Mesh model to be simplified can include shape features, vertex count, rendering frequency, and distance relative to the screen.

[0200] The shape features can include umbrella-shaped bodies, closed bodies, and extended bodies; the structure of an umbrella-shaped body is as follows: Figure 6 As shown, in game scenes, the shape of a tree's mesh model is typically umbrella-shaped; the structure of the closure is as follows: Figure 7 As shown, in game scenes, the shape features of mesh models such as cars and characters are usually closures; extended structures are like... Figure 8 As shown, in game scenes, the shape features of Mesh models such as mountains and rivers are usually extended bodies.

[0201] The scale of the number of vertices can be categorized as large-scale, medium-scale, and small-scale. For example, a mesh model with 50K or more vertices can be called large-scale, a mesh model with more than 5K but less than 50K vertices can be called medium-scale, and a mesh model with less than 5K vertices can be called small-scale. It should be noted that the representation of the number of vertices is not limited to the methods described above.

[0202] Rendering frequency can be categorized as low-frequency, medium-frequency, and high-frequency. For example, the rendering frequency of a mesh model can be classified based on the number of times it is rendered in 1000 frames. It should be noted that the representation of rendering frequency is not limited to the methods described above.

[0203] The distance relative to the screen can include near distance and far distance; specifically, it can be determined based on the distance of the Mesh model relative to the screen, which will not be elaborated here in the embodiments of this application.

[0204] As explained above, the second load label indicates the specific mesh model that needs to be simplified. For example, the second load control label indicates that the mesh model rendered by the first rendering operation should be simplified if the number of vertices is greater than the third threshold, the number of repetitions is greater than the fourth threshold, or the distance relative to the screen is greater than the fifth threshold.

[0205] Understandably, when the number of vertices exceeds the third threshold, it indicates that the mesh model's geometry is relatively complex, meaning that rendering this mesh model would incur a significant load. Therefore, it is necessary to simplify the mesh model; that is, the second load label can indicate a mesh model with a number of vertices exceeding the third threshold.

[0206] When the number of repetitions exceeds the fourth threshold, it indicates that the mesh model has too many repetitions; even if the mesh model contains a small number of vertices, the total number of vertices in the entire mesh model is still large. Therefore, it is necessary to simplify the mesh model, that is, the second load label can indicate that the mesh model with the number of repetitions exceeding the fourth threshold should be simplified.

[0207] During image rendering, mesh models at different distances from the screen are typically rendered at the same Level of Detail (LOD). However, mesh models farther from the screen are usually unimportant in the image, so using a higher LOD for rendering is wasteful. Therefore, mesh models farther from the screen can be simplified. Thus, the second load label can indicate that mesh models at a distance greater than the fifth threshold from the screen should be simplified.

[0208] In the example above, the specific process of step 103 can be as follows: Figure 9 As shown. Specifically, the necessity of simplifying the mesh model (i.e., satisfying the second condition) is determined by the number of vertices and the number of mesh models in each frame rendered by the first rendering operation. The list of mesh models to be simplified is determined by the number of vertices of each mesh model rendered by the GPU in the first rendering operation, the number of repetitions of the mesh model in each frame rendered by the GPU in the first rendering operation, and the distance of each mesh model rendered by the GPU in the first rendering operation relative to the screen. The list of mesh models to be simplified can be understood as the second load control label, which specifically indicates the characteristics of the mesh model to be simplified, the simplification algorithm applicable to the mesh model to be simplified, and the parameters of the simplification algorithm.

[0209] As one implementation, the payload data includes a third type of payload data, which represents information about at least one first instruction.

[0210] Accordingly, step 103 includes:

[0211] Based on the instruction information of at least one first instruction indicated by the third type of load data, the third load control tag corresponding to the third load data is determined, and the third load control tag indicates that at least one second instruction is processed.

[0212] The process of determining the third load control tag corresponding to the third load data can be to select one load control tag from one or more known load control tags as the third load control tag.

[0213] Accordingly, the target solution is used to process at least one second instruction. This application does not specifically limit the content of the target solution.

[0214] It is understandable that the third condition and the third load control label may be different for different types of third load data.

[0215] For example, when the third load data includes the number of DCs, the third condition can be that there are multiple DCs, and two or more DCs are used to render the same object. Specifically, the third load data includes 100 DCs rendering the same character. Since the DCs in the third load data meet the third condition, these 100 DCs rendering the same character can be merged into one DC.

[0216] For example, when the third load data includes the number of rendering channels, the size of the frame buffer, and the reference relationship between the rendering channels and the frame buffer, the third condition can be that there are multiple rendering channels, two or more rendering channels have adjacent reference relationships with the frame buffer, and the frame buffers corresponding to two or more rendering channels have the same size.

[0217] Specifically, the third load data includes three rendering channels, the framebuffer size, and the reference relationships between the three rendering channels and the framebuffer. The first rendering channel renders mesh models such as mountains and trees, and its rendering result is output to the first framebuffer. The second rendering channel, based on the rendering result of the first channel, renders mesh models of buildings such as houses, and its rendering result is output to the second framebuffer. The third rendering channel, based on the rendering result of the second channel, renders mesh models of characters, and its rendering result is output to the third framebuffer. Since the second rendering channel needs to render based on the rendering result of the first rendering channel, the reference relationship between the second rendering channel and the second framebuffer is adjacent to that between the first rendering channel and the first framebuffer; similarly, the reference relationship between the third rendering channel and the third framebuffer is adjacent to that between the second rendering channel and the second framebuffer. Furthermore, if the first, second, and third framebuffers have the same size, the first, second, and third rendering channels can be merged, and the merged rendering channel only requires one framebuffer.

[0218] Similarly, when the third payload data includes the number of DCs, the size of the frame buffer, and the reference relationship between DCs and the frame buffer, the third condition can be understood with reference to the third condition in the previous example.

[0219] In the example above, the process of determining the third load control tag is as follows: Figure 10 As shown, the third load control label is determined based on API load (including the number of DCs, the size of the frame buffer, and the number of rendering channels) and relationships (including the reference relationship between DCs and frame buffers, and the reference relationship between rendering channels and frame buffers).

[0220] Furthermore, scene changes in the API and adjacent frame images can be analyzed to obtain a third load control label indicating the rendering of images every other frame. For example, if the scene becomes increasingly complex and the number of mesh models in the image increases in adjacent frame images, the load can be considered to be increasing; based on this, the corresponding load control label can be determined, and then the corresponding target scheme can be determined to reduce the load.

[0221] As can be seen from the foregoing description, if the third load control tag indicates that multiple second instructions are to be processed, then after step 104, at least one second instruction obtained in step 104 is first processed according to the target scheme, and then the processed at least one second instruction is passed to the graphics API.

[0222] Specifically, in step 104, eight second instructions are obtained. These eight second instructions constitute two DCs. The two DCs constituted by these eight second instructions are then merged and the merged DC is passed down.

[0223] Based on the above description, for example, the number of second instructions is multiple; such as Figure 11 As shown, the third load control label indicates at least one of the following: merging multiple DCs composed of multiple second instructions, or merging multiple rendering channels corresponding to multiple second instructions.

[0224] For example, the third load control label can also instruct the merging of multiple instances; for instance, if multiple second instructions are used to render 50 trees, and each group of 5 trees is rendered (i.e., one instance), then the multiple second instructions for rendering 50 trees can be merged.

[0225] For example, the third load control label can also indicate the vibration isolation rendering image.

[0226] In this embodiment, the third load control tag can take the form shown in Table 3 below. The third load tag indicates the name of the second instruction to be processed, the characteristics of the second instruction, the scheme code for processing the second instruction, and the scheme parameters for processing the second instruction.

[0227] Table 3

[0228]

[0229] The above description of the load control method provided in the embodiments of this application has been provided. Figure 3 The control load process shown can be as follows: Figure 12 As shown. Specifically, the acquired data related to the first instruction includes at least one first instruction, time consumption markers, runtime data, and resource data.

[0230] Among them, the time consumption markers are used to determine the computation time in the first type of load data, and the running data are used to determine the running parameters (e.g., frequency points) of the CPU, the running parameters (e.g., frequency points) of the GPU, and the running parameters (e.g., frequency points) of the internal memory in the first type of load data.

[0231] The load data determined based on the feature library includes three types: first type load data, second type load data, and third type load data.

[0232] Based on the three types of load data mentioned above, load control tags can be determined. Based on the load control tags, a target scheme can be matched from the load control scheme library. The target scheme can be used to adjust operating parameters, simplify the Mesh model, and process at least one second instruction.

[0233] Please see Figure 13 This application also provides an embodiment of a load control device, which can be applied to a CPU, including:

[0234] The instruction acquisition module 201 is used to acquire at least one first instruction, which is used to call the application programming interface (API) to cause the graphics processing unit (GPU) to perform a first rendering operation.

[0235] The load data determination module 202 is used to determine the load data of the process of the GPU performing the first rendering operation based on at least one first instruction;

[0236] The target scheme determination module 203 is used to determine the target scheme for controlling the load based on the load data.

[0237] The instruction acquisition module 201 is also used to acquire at least one second instruction, which is used to call an API to cause the GPU to perform a second rendering operation;

[0238] The control module 204 is used to control the load of the GPU during the second rendering operation based on the target scheme.

[0239] As one implementation, the load data determination module 202 is used to obtain at least one load data of the process of the GPU performing the first rendering operation based on at least one first instruction and at least one load feature factor, wherein each load feature factor corresponds to a load data.

[0240] As one implementation, at least one load feature factor includes at least one of the following three types of load feature factors: a first type of load feature factor, a second type of load feature factor, and a third type of load feature factor; the first type of load feature factor is used to represent the consumption of computer hardware resources by the GPU in the process of executing the first rendering operation; the second type of load feature factor is used to represent the information of the mesh model rendered by the GPU in the process of executing the first rendering operation; and the third type of load feature factor is used to represent the information of at least one first instruction.

[0241] As one implementation method, the first type of load characteristic factors includes at least one of the following: the computation time during the GPU execution of the first rendering operation, the operating parameters of the central processing unit (CPU), the operating parameters of the GPU, and the operating parameters of the internal memory; the second type of load characteristic factors includes at least one of the following: the number of vertices of each Mesh model rendered during the GPU execution of the first rendering operation, the number of vertices in each frame of image rendered during the GPU execution of the first rendering operation, the number of Mesh models in each frame of image rendered during the GPU execution of the first rendering operation, the number of repetitions of Mesh models in each frame of image rendered during the GPU execution of the first rendering operation, and the distance of each Mesh model rendered during the GPU execution of the first rendering operation relative to the screen; the third type of load characteristic factors includes at least one of the following: the number of drawing command DCs composed of at least one first instruction, the number of rendering passes corresponding to at least one first instruction, the frame buffer size, the reference relationship between rendering passes and frame buffers, and the reference relationship between DCs and frame buffers.

[0242] As one implementation, at least one load feature factor includes a second type of load feature factor; the load data determination module 202 is used to determine the data of the mesh model rendered by the GPU executing the first rendering operation based on the parameters carried by at least one first instruction; and to obtain the load data of the second type of load feature factor corresponding to the process of the GPU executing the first rendering operation based on the data of the mesh model rendered by the GPU executing the first rendering operation.

[0243] As one implementation, the target scheme determination module 203 is used to determine the load control label based on the load data, the load control label indicating the content of load control; and to determine the target scheme for controlling the load based on the load control label.

[0244] As one implementation, the load data includes a first type of load data, which represents the consumption of computer hardware resources by the GPU in performing the first rendering operation; the target scheme determination module 203 is used to determine a first load control label based on the first type of load data indicating that the consumption of computer hardware resources by the GPU in performing the first rendering operation meets a first condition, and the first load control label indicates that the operating parameters of the computer hardware are adjusted during the GPU performing the second rendering operation.

[0245] As one implementation, the first load control label indicates the adjustment of the frequency of the CPU, GPU, or internal memory during the second rendering operation performed by the GPU.

[0246] As one implementation, the load data includes a second type of load data, which represents information about the mesh model rendered by the GPU performing the first rendering operation; the target scheme determination module 203 is used to determine a second load control label based on the first type of load data indicating that the information of the mesh model rendered by the GPU performing the first rendering operation meets a second condition, and the second load control label indicates that the mesh model rendered during the GPU performing the second rendering operation is simplified.

[0247] As one implementation, the second load control label indicates the characteristics of the Mesh model to be simplified, the simplification algorithm applicable to the Mesh model to be simplified, and the parameters of the simplification algorithm during the second rendering operation performed by the GPU.

[0248] As one implementation, the second type of load data includes the number of vertices and the number of mesh models in each frame of the image rendered by the first rendering operation; the second condition includes the number of vertices in each frame of the image rendered by the first rendering operation being greater than a first threshold, or the number of mesh models in each frame of the image rendered by the first rendering operation being greater than a second threshold.

[0249] As one implementation, the second load control label indicates that the mesh model rendered by the first rendering operation should be simplified if the number of vertices is greater than the third threshold, the number of repetitions is greater than the fourth threshold, or the distance relative to the screen is greater than the fifth threshold.

[0250] As one implementation, the load data includes a third type of load data, which represents information of at least one first instruction; the target scheme determination module 203 is used to determine a third load control tag based on the instruction information of at least one first instruction indicated by the third type of load data, which satisfies a third condition, and the third load control tag indicates that at least one second instruction should be processed.

[0251] As one implementation, there are multiple second instructions; the third load control label indicates at least one of the following: merging multiple DCs composed of multiple second instructions, or merging multiple RenderPasses corresponding to multiple second instructions.

[0252] This application also provides another terminal device, such as... Figure 14 As shown, for ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. The terminal can be any terminal device including mobile phones, tablets, personal digital assistants (PDAs), point-of-sale (POS) terminals, in-vehicle computers, etc. Taking a mobile phone as an example:

[0253] Figure 14 This is a block diagram illustrating a portion of the structure of a mobile phone related to the terminal provided in the embodiments of this application. (Reference) Figure 14 The mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a central processing unit (CPU) 1080, a graphics processing unit (GPU) 1090, and a power supply, among other components. Those skilled in the art will understand that... Figure 14 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0254] The following is combined with Figure 14 A detailed introduction to each component of a mobile phone:

[0255] The RF circuit 1010 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it for the CPU 1080; additionally, it transmits uplink data to the base station. Typically, the RF circuit 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the RF circuit 1010 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Messaging Service (SMS).

[0256] The memory 1020 can be used to store software programs and modules. The CPU 1080 executes various functions and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 1020 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0257] The input unit 1030 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 1031), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the CPU 1080, and can also receive and execute commands sent by the CPU 1080. In addition, the touch panel 1031 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. Specifically, other input devices 1032 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0258] The display unit 1040 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1040 may include a display panel 1041, which may optionally be configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 1041. Further, a touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it transmits the information to the CPU 1080 to determine the type of touch event. Subsequently, the CPU 1080 provides corresponding visual output on the display panel 1041 based on the type of touch event. Although in Figure 14 In this embodiment, the touch panel 1031 and the display panel 1041 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.

[0259] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1041 according to the ambient light level, and the proximity sensor can turn off the display panel 1041 and / or the backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0260] The audio circuit 1060, speaker 1061, and microphone 1062 provide an audio interface between the user and the mobile phone. The audio circuit 1060 converts received audio data into electrical signals and transmits them to the speaker 1061, where the speaker 1061 converts them into sound signals for output. On the other hand, the microphone 1062 converts collected sound signals into electrical signals, which are then received by the audio circuit 1060, converted into audio data, and output to the CPU 1080 for processing. The audio data is then transmitted via the RF circuit 1010 to, for example, another mobile phone, or output to the memory 1020 for further processing.

[0261] WiFi is a short-range wireless transmission technology. Through the WiFi module 1070, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 14 The WiFi module 1070 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the essence of the invention.

[0262] The CPU 1080 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 1020, and calls data stored in the memory 1020 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the CPU 1080 may include one or more processing units; preferably, the CPU 1080 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the CPU 1080.

[0263] GPU1090 is mainly used to render data in memory 1020 into images and display them in display unit 1040.

[0264] The mobile phone also includes a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the CPU1080 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0265] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.

[0266] In this embodiment of the application, the CPU1080 included in the terminal also has the following functions:

[0267] Obtain at least one first instruction, which is used to call the application programming interface (API) to cause the graphics processing unit (GPU) to perform a first rendering operation;

[0268] The load data of the GPU's execution of the first rendering operation is determined based on at least one first instruction;

[0269] Determine the target scheme for load control based on load data;

[0270] Obtain at least one second instruction, which is used to call the API to cause the GPU to perform a second rendering operation;

[0271] The target scheme controls the load on the GPU during the second rendering operation.

[0272] In this embodiment of the application, the GPU1090 included in the terminal also has the following functions:

[0273] A first rendering operation is performed based on at least one first instruction, and a second rendering operation is performed based on at least one second instruction.

[0274] This application also provides a chip including one or more processors. Some or all of the processors are used to read and execute computer programs stored in memory to perform... Figure 2 The methods of the corresponding embodiments.

[0275] Optionally, the chip includes a memory, which is connected to the processor via a circuit or wire. Further optionally, the chip also includes a communication interface, to which the processor is connected. The communication interface is used to receive data and / or information that needs to be processed. The processor obtains the data and / or information from the communication interface, processes the data and / or information, and outputs the processing result through the communication interface. The communication interface can be an input / output interface.

[0276] In some implementations, some of the processors may implement some steps of the above method through dedicated hardware. For example, the processing of neural network models may be implemented by a dedicated neural network processor or graphics processor.

[0277] The method provided in this application embodiment can be implemented by a single chip or by multiple chips working together.

[0278] This application also provides a computer storage medium for storing computer software instructions for use with the aforementioned computer device, including instructions for executing programs designed for the computer device.

[0279] The computer device can be as described above. Figure 13 The device described for running the application.

[0280] This application also provides a computer program product, which includes computer software instructions that can be loaded by a processor to implement the aforementioned features. Figure 2 The process shown is as follows.

[0281] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0282] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0283] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0284] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0285] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for controlling load, characterized in that, include: Obtain at least one first instruction, the at least one first instruction being used to invoke an application programming interface (API) to cause a graphics processing unit (GPU) to perform a first rendering operation; At least one load data is obtained based on the at least one first instruction and at least one load feature factor during the process of the GPU executing the first rendering operation. Each load feature factor corresponds to one type of load data. The at least one load feature factor includes at least one of the following three types of load feature factors: a first type of load feature factor, a second type of load feature factor, and a third type of load feature factor. The first type of load feature factor is used to represent the consumption of computer hardware resources by the GPU during the process of the GPU executing the first rendering operation. The second type of load feature factor is used to represent the information of the mesh model rendered by the GPU during the process of the GPU executing the first rendering operation. The third type of load feature factor is used to represent the information of the at least one first instruction. Based on the load data, a target scheme for controlling the load is determined; Obtain at least one second instruction, the at least one second instruction being used to invoke the API to cause the GPU to perform a second rendering operation; The target scheme controls the load on the GPU during the second rendering operation.

2. The method according to claim 1, characterized in that, The first type of load characteristic factors includes at least one of the following: the computation time during the GPU's execution of the first rendering operation, the operating parameters of the central processing unit (CPU), the operating parameters of the GPU, and the operating parameters of the internal memory. The second type of load characteristic factors includes at least one of the following: the number of vertices of each Mesh model rendered during the GPU's execution of the first rendering operation, the number of vertices in each frame of image rendered during the GPU's execution of the first rendering operation, the number of Mesh models in each frame of image rendered during the GPU's execution of the first rendering operation, the number of repetitions of Mesh models in each frame of image rendered during the GPU's execution of the first rendering operation, and the distance of each Mesh model rendered during the GPU's execution of the first rendering operation relative to the screen; or The third type of load characteristic factor includes at least one of the following: the number of drawing command DCs constituted by the at least one first instruction, the number of rendering passes corresponding to the at least one first instruction, the frame buffer size, the reference relationship between the rendering pass and the frame buffer, and the reference relationship between the DC and the frame buffer.

3. The method according to claim 1, characterized in that, If the at least one load feature factor includes the second type of load feature factor, then the process of obtaining at least one load data based on the at least one first instruction and the at least one load feature factor of the GPU performing the first rendering operation includes: The data of the mesh model rendered by the GPU executing the first rendering operation is determined based on the parameters carried by each of the at least one first instruction; Based on the data of the mesh model rendered by the GPU performing the first rendering operation, the load data of the second type of load feature factor corresponding to the process of the GPU performing the first rendering operation is obtained.

4. The method according to any one of claims 1 to 3, characterized in that, The step of determining the target scheme for controlling the load based on the load data includes: A load control label is determined based on the load data, and the load control label indicates the content of load control. Based on the load control tag, a load control scheme is selected from at least one load control scheme as the target scheme for controlling the load.

5. The method according to claim 4, characterized in that, The load data includes a first type of load data, which represents the consumption of computer hardware resources by the GPU during the execution of the first rendering operation. The process of determining the load control tag based on the load data includes: Based on the first type of load data indicating that the consumption of computer hardware resources by the GPU in performing the first rendering operation meets a first condition, a first load control label corresponding to the first type of load data is determined, and the first load control label indicates that the operating parameters of the computer hardware are adjusted during the GPU's performance of the second rendering operation.

6. The method according to claim 5, characterized in that, The first load control label indicates that the frequency of the CPU, GPU, or internal memory is adjusted during the second rendering operation performed by the GPU.

7. The method according to claim 4, characterized in that, The load data includes a second type of load data, which represents information about the mesh model rendered by the GPU performing the first rendering operation; The process of determining the load control tag based on the load data includes: Based on the second type of load data indicating that the information of the mesh model rendered by the GPU in performing the first rendering operation meets the second condition, a second load control label corresponding to the second type of load data is determined. The second load control label indicates that the mesh model rendered by the GPU in the process of performing the second rendering operation is simplified.

8. The method according to claim 7, characterized in that, The second load control label indicates the features of the Mesh model to be simplified, the simplification algorithm applicable to the Mesh model to be simplified, and the parameters of the simplification algorithm during the second rendering operation performed by the GPU.

9. The method according to claim 7, characterized in that, The second type of payload data includes the number of vertices and the number of mesh models in each frame of the image rendered by the first rendering operation; The second condition includes the number of vertices in each frame of the image rendered by the first rendering operation being greater than a first threshold, or the number of Mesh models in each frame of the image rendered by the first rendering operation being greater than a second threshold.

10. The method according to claim 7, characterized in that, The second load control label indicates that the mesh model rendered by the first rendering operation should be simplified if the number of vertices is greater than the third threshold, the number of repetitions is greater than the fourth threshold, or the distance relative to the screen is greater than the fifth threshold.

11. The method according to claim 4, characterized in that, The load data includes a third type of load data, which represents information about the at least one first instruction. The process of determining the load control tag based on the load data includes: Based on the instruction information of the at least one first instruction indicated by the third type of load data, a third load control tag corresponding to the third type of load data is determined, and the third load control tag indicates that the at least one second instruction is processed.

12. The method according to claim 11, characterized in that, The number of the second instruction is multiple; The third load control label indicates at least one of the following: merging multiple DCs composed of multiple second instructions, or merging multiple rendering channels corresponding to multiple second instructions.

13. A device for controlling a load, characterized in that, include: The instruction acquisition module is used to acquire at least one first instruction, which is used to call the application programming interface (API) to cause the graphics processing unit (GPU) to perform a first rendering operation. The load data determination module is used to obtain at least one type of load data during the process of the GPU executing the first rendering operation based on the at least one first instruction and at least one load feature factor. Each load feature factor corresponds to one type of load data. The at least one load feature factor includes at least one of the following three types of load feature factors: a first type of load feature factor, a second type of load feature factor, and a third type of load feature factor. The first type of load feature factor is used to represent the consumption of computer hardware resources by the GPU during the process of the GPU executing the first rendering operation. The second type of load feature factor is used to represent the information of the mesh model rendered by the GPU during the process of the GPU executing the first rendering operation. The third type of load feature factor is used to represent the information of the at least one first instruction. The target scheme determination module is used to determine a target scheme for controlling the load based on the load data. The instruction acquisition module is further configured to acquire at least one second instruction, which is used to call the API to cause the GPU to perform a second rendering operation; The control module is used to control the load of the GPU during the second rendering operation based on the target scheme.

14. A terminal device, characterized in that, include: One or more processors and a memory; wherein the memory stores computer-readable instructions; The one or more processors read the computer-readable instructions to cause the computer device to implement the method as described in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, It includes computer-readable instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 12.

16. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Frequency adjustment method and device of graphic processor, terminal and storage medium

    CN110209501A