GPU platform feature query method, device, equipment, medium and product

By querying and modifying the rendering support features of the GPU platform in a three-dimensional application, and generating script files for rendering results comparison, the problem that the existing technology cannot develop and verify GPU platforms with different rendering features is solved, and an efficient development verification process is achieved.

CN117556069BActive Publication Date: 2025-03-11GLENFLY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311573625.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-03-11
Estimated Expiration
2043-11-23

AI Technical Summary

Technical Problem

The prior art cannot use script files generated by one GPU platform to perform development verification on another GPU platform with different rendering characteristics.

Method used

A GPU platform feature query method is provided. By calling the query interface in a three-dimensional application, querying the rendering support features of the first GPU platform, obtaining capture configuration information to modify the rendering support features, making it consistent with the target GPU platform, and generating a script file to compare the rendering results of the two platforms.

Benefits of technology

The ability to develop and verify GPU platforms with different rendering features is realized. By modifying and comparing rendering support features and results, the accuracy and reliability of verification results are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117556069B_ABST
    Figure CN117556069B_ABST
Patent Text Reader

Abstract

The present application relates to a GPU platform feature query method, device, computer equipment, storage medium and computer program product. The method comprises: before performing three-dimensional rendering based on a three-dimensional application, calling a query interface based on the three-dimensional application to query the rendering support features of the first GPU platform; obtaining capture configuration information for configuring the interface call capture process; modifying the rendering support features based on the modified configuration items in the capture configuration information to obtain the modified rendering support features; and returning the modified rendering support features to the three-dimensional application. The rendering results obtained by the method provided in the present application can be compared with the rendering results of another GPU platform, so that the development and verification of another GPU platform can be performed based on the comparison results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional rendering technology, and in particular to a GPU platform feature query method, device, computer equipment, storage medium and computer program product. Background Art

[0002] Before performing 3D rendering, the 3D graphics application will obtain the rendering features corresponding to the GPU platform and the rendering process by calling the corresponding 3D graphics API. The 3D graphics application will issue rendering instructions based on the obtained rendering features to complete the rendering process. The API capturer will capture the 3D graphics API, rendering features, and rendering results, and package all the captured content into a script file. This script file can be used for development verification of another GPU platform. However, since one GPU platform cannot replay the corresponding rendering process based on a script file generated by another GPU platform with different rendering features, it is impossible to use a script file generated based on one GPU platform to develop and verify another GPU platform with different rendering features. Summary of the invention

[0003] Based on this, it is necessary to provide a GPU platform feature query method, device, computer equipment, computer-readable storage medium and computer program product that can develop and verify GPU platforms with different rendering features in response to the above technical problems.

[0004] In a first aspect, the present application provides a GPU platform feature query method, the method comprising:

[0005] Before performing 3D rendering based on the 3D application, calling a query interface based on the 3D application to query the rendering support features of the first GPU platform;

[0006] Acquire capture configuration information for configuring an interface call capture process, wherein the capture configuration information includes a modification configuration item for modifying the rendering support feature;

[0007] Modifying the rendering support feature based on the modification configuration item in the capture configuration information to obtain the modified rendering support feature;

[0008] The modified rendering support characteristics are returned to the three-dimensional application.

[0009] In one of the embodiments, the rendering support feature includes at least one of a function type supported by the first GPU platform or an attribute parameter of the first GPU platform; the capture configuration information includes at least one of a disabled function type for disabling a function of the first GPU platform or an attribute modification result for modifying an attribute parameter of the first GPU platform.

[0010] In one embodiment, the capture configuration information further includes a configuration item for indicating whether to compare rendering results of different GPU platforms; the method further includes:

[0011] When the configuration item is to enable comparison, obtaining calling interface information when performing three-dimensional rendering based on the first GPU platform and a first rendering result after performing three-dimensional rendering;

[0012] Based on the first rendering result and the calling interface information, generating a script file carrying a rendering result comparison instruction;

[0013] The script file is executed to enable the second GPU platform to perform three-dimensional rendering according to the calling interface information to obtain a second rendering result, and based on the rendering result comparison instruction, the first rendering result and the second rendering result are compared to obtain a comparison result.

[0014] In one embodiment, the capture configuration information includes a configuration item for indicating whether to disassemble a machine executable code file related to the rendering process; the method further includes:

[0015] When the configuration item is to enable disassembly, the machine executable code file transmitted by the 3D application to the first GPU platform during the rendering state configuration process is obtained, and the machine executable code file is disassembled by calling the disassembly function to obtain the disassembly result.

[0016] In one embodiment, the capture configuration information includes a configuration item for indicating whether to capture an interface type supported by a graphics card platform; the method further includes:

[0017] In the case where the configuration item is to enable capture, the interface type corresponding to the configuration item for enabling capture is used as the target interface, and the process of the three-dimensional application calling the target interface is recorded.

[0018] In one embodiment, recording the process of the three-dimensional application calling the target interface includes:

[0019] For the target interface file corresponding to the target interface, a virtual interface file with the same name as the target interface file is created in the installation directory corresponding to the three-dimensional application, wherein the virtual interface file includes a calling code for calling the target interface and a recording code for recording the calling process;

[0020] When the three-dimensional application calls the virtual interface corresponding to the virtual interface file, the three-dimensional application is directed to call the target interface based on the calling code, and the target interface called this time is recorded based on the recording code.

[0021] In a second aspect, the present application further provides a GPU platform feature query device, the device comprising:

[0022] A query module, used for inquiring about rendering support features of the first GPU platform by calling a query interface based on the three-dimensional application before performing three-dimensional rendering based on the three-dimensional application;

[0023] An acquisition module, used to acquire capture configuration information for configuring an interface call capture process, wherein the capture configuration information includes a modification configuration item for modifying the rendering support feature;

[0024] A modification module, used to modify the rendering support feature based on the modification configuration item in the capture configuration information to obtain the modified rendering support feature;

[0025] The returning module is used for returning the modified rendering support feature to the three-dimensional application.

[0026] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.

[0027] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0028] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0029] The above-mentioned GPU platform feature query method, device, computer equipment, storage medium and computer program product, before performing three-dimensional rendering based on a three-dimensional application, calls a query interface based on the three-dimensional application to query the rendering support features of the first GPU platform; obtains capture configuration information for configuring the interface call capture process, the capture configuration information includes a modification configuration item for modifying the rendering support features; based on the modification configuration item in the capture configuration information, the rendering support features are modified to obtain the modified rendering support features; and the modified rendering support features are returned to the three-dimensional application. The method provided in the present application can set the capture configuration information based on demand, so that the rendering support features of the first GPU platform can be modified to be consistent with the rendering support features of another GPU platform that needs to be developed and verified. In this way, the three-dimensional application sends a rendering instruction to the first GPU platform based on the modified rendering support features, and the rendering result obtained in this way can be compared with the rendering result of another GPU platform, so that the other GPU platform can be developed and verified based on the comparison result. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 A diagram of an application environment of a GPU platform feature query method in one embodiment;

[0032] Figure 2 A flowchart of a GPU platform feature query method in one embodiment;

[0033] Figure 3 A schematic diagram of an extended disabling method in one embodiment;

[0034] Figure 4 is a schematic diagram of a method for modifying attribute parameters in one embodiment;

[0035] Figure 5 A schematic diagram of a flow chart of a rendering result comparison method in one embodiment;

[0036] Figure 6 is a schematic diagram of a rendering result comparison method in one embodiment;

[0037] Figure 7 is a schematic diagram of a disassembly method in one embodiment;

[0038] Figure 8is a schematic diagram of a hybrid capture method in one embodiment;

[0039] Fig. 9 It is a flowchart of a GPU platform feature query method in another embodiment;

[0040] Fig.10 It is a structural block diagram of a GPU platform feature query device in one embodiment;

[0041] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] The GPU platform feature query method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Figure 1 The terminal 102 and the GPU platform 104 are included. The terminal 102 includes a 3D application and an API capturer. The 3D application interacts with the GPU platform 104 by calling the 3D graphics API. The API capturer is used to capture the 3D graphics API and corresponding data during the interaction between the 3D application and the GPU platform 104. For example, the data may be buffer data, texture data, and shader code data. The GPU platform 104 includes a GPU driver and GPU hardware. After receiving the rendering instruction sent by the 3D application, the GPU driver drives the GPU hardware to complete the rendering process.

[0044] In an exemplary embodiment, Figure 2 As shown, a GPU platform feature query method is provided, which is applied to Figure 1 The terminal in is taken as an example to illustrate, including the following steps S202 to S208. Among them:

[0045] S202: Before performing 3D rendering based on the 3D application, call a query interface based on the 3D application to query rendering support features of the first GPU platform.

[0046] Among them, the 3D application is responsible for driving the rendering process of the entire 3D scene and managing all 3D objects and rendering status; the query interface includes feature query instructions, and the query interface can be a get type or choose type 3D API; the rendering support features are the rendering features supported by the first GPU platform. Only after receiving the rendering support features can the 3D application create a suitable rendering object and determine the corresponding rendering instructions.

[0047] S204: Acquire capture configuration information for configuring the interface call capture process, where the capture configuration information includes a modification configuration item for modifying a rendering support feature.

[0048] Among them, the capture configuration information can be a variety of intervention functions inserted in advance in the API capturer. The API capturer uniformly configures these capture configuration information into a readable and writable configuration file. When the interface is intercepted, the corresponding capture configuration information is called to complete the corresponding intervention actions. These intervention actions may or may not affect the rendering process. The embodiments of the present application do not make specific limitations on this. In the configuration file, each capture configuration information is provided with a switch. Only when this switch is turned on can the corresponding intervention action be completed. For example, the API capturer can be GPULogger, and the configuration file can be GPULogger.ini; modifying the configuration item is the capture configuration information corresponding to the query interface, and modifying the configuration item will affect the rendering process.

[0049] Specifically, when the terminal uses the 3D application to send the called query interface to the first GPU platform, the terminal will use the API capturer to intercept the query interface, and based on the intercepted query interface, call the modified configuration items pre-configured in the API capturer.

[0050] S206: Modify the rendering support feature based on the modified configuration item in the captured configuration information to obtain the modified rendering support feature.

[0051] Specifically, after the API capturer intercepts the query interface, the terminal will continue to send the query interface to the first GPU platform, and the first GPU platform will return the corresponding rendering support features to the 3D application based on the feature query instructions in the query interface. In the process of the first GPU platform returning the rendering support features to the 3D application, the API capturer will intercept the corresponding rendering support features based on the intercepted query interface, and modify the rendering support features based on the corresponding modification configuration items.

[0052] S208. Return the modified rendering support features to the 3D application.

[0053] After the API capturer modifies the rendering support feature, it returns the modified rendering support feature to the 3D application. The 3D application determines the rendering command based on the received rendering support feature, and sends the rendering command to the first GPU platform by calling the rendering interface, so that the first GPU platform completes the rendering process.

[0054] In the above-mentioned GPU platform feature query method, before performing three-dimensional rendering based on a three-dimensional application, a query interface is called based on the three-dimensional application to query the rendering support features of the first GPU platform; capture configuration information for configuring the interface call capture process is obtained, and the capture configuration information includes a modification configuration item for modifying the rendering support features; based on the modification configuration item in the capture configuration information, the rendering support features are modified to obtain the modified rendering support features; and the modified rendering support features are returned to the three-dimensional application. The method provided in the present application can set the capture configuration information based on demand, so that the rendering support features of the first GPU platform can be modified to be consistent with the rendering support features of another GPU platform that needs to be developed and verified. In this way, the three-dimensional application sends a rendering instruction to the first GPU platform based on the modified rendering support features, and the rendering result obtained in this way can be compared with the rendering result of another GPU platform, so that the other GPU platform can be developed and verified based on the comparison result.

[0055] In some embodiments, the rendering support feature includes at least one of a function type supported by the first GPU platform or a property parameter of the first GPU platform; the captured configuration information includes at least one of a disabled function type for disabling a function of the first GPU platform or a property modification result for modifying a property parameter of the first GPU platform.

[0056] The function type may be an extension supported by the first GPU platform, and the captured configuration information may be disabling the extension, each extension including multiple rendering functions. Figure 3As shown, it is necessary to compare the rendering result of the fully functional GPU platform A with the rendering result of the GPU platform B that does not support the extension EXT_XXX, so as to develop and verify the GPU platform B. Since the GPU platform A supports EXT_XXX, it is necessary to disable the EXT_XXX of the GPU platform A before rendering the GPU platform A. Therefore, the capture configuration information "disabled_extensions=EXT_XXX" that disables EXT_XXX can be configured in advance in the configuration file of the API capturer, and the corresponding capture switch "fake_extensions=true" can be turned on. When the API capturer intercepts the query interface for querying the extension of the GPU platform A, the capture configuration information will be called, and when the extension returned by the GPU platform A is intercepted, based on the capture configuration information, all the extension functions corresponding to the rendering functions included in the extension EXT_XXX are deleted, so that the three-dimensional application cannot receive the extension function corresponding to EXT_XXX in the GPU platform A, and the extension function corresponding to the remaining extension after deletion is returned to the three-dimensional application. In this way, during the rendering process, the three-dimensional application will not send rendering instructions to the GPU platform A for EXT_XXX, and the rendering process of the GPU platform A and the GPU platform B can be consistent, and the rendering results of the two platforms can be compared. When development verification of GPU platform B is not required, the capture switch "fake_extensions=true" can be turned off. In this way, the API capturer will not disable the obtained extensions of GPU platform A, and the 3D application can obtain all extensions of GPU platform A.

[0057] The attribute parameter may be the maximum size of the graphics resource object supported by the GPU platform, and the capture configuration information may be used to modify the maximum size of the graphics resource object. The graphics resource object may include a renderbuffer, a frame buffer, and a texture. For example, Figure 4As shown, in order to make the 3D application occupy less memory, the size of the rendering buffer needs to be reduced. The maximum size of the rendering buffer supported by the GPU platform received by the 3D application can be reduced, thereby reducing the size of the rendering buffer in the 3D application. Specifically, the capture configuration information "GL_MAX_RENDERBUFFER_SIZE=2048" for modifying the maximum size of the rendering buffer is configured in advance in the configuration file of the API capturer, and the corresponding capture switch "enable_override=true" is turned on. When the API capturer intercepts the maximum size of the rendering buffer returned by the GPU platform, the maximum size can be modified to 2048, and the modified maximum size is returned to the 3D application. The 3D application will then store the rendering buffer according to the modified maximum size.

[0058] In this embodiment, the capture configuration information can be set in the API capturer to modify the rendering support features returned by the first GPU platform to the three-dimensional application, so that the first GPU platform can be used to meet various rendering needs without having any impact on the first GPU platform itself.

[0059] In some embodiments, Figure 5 As shown, the capture configuration information also includes a configuration item for indicating whether to compare rendering results of different GPU platforms; the method also includes:

[0060] S502: When the configuration item is to enable comparison, obtain calling interface information when performing three-dimensional rendering based on the first GPU platform and a first rendering result after the three-dimensional rendering.

[0061] S504: Generate a script file carrying a rendering result comparison instruction based on the first rendering result and the calling interface information.

[0062] S506 , executing the script file to enable the second GPU platform to perform three-dimensional rendering according to the calling interface information to obtain a second rendering result, and based on the rendering result comparison instruction, compare the first rendering result with the second rendering result to obtain a comparison result.

[0063] The calling interface information includes the interface information of all interfaces called by the three-dimensional application program during the rendering process of the first GPU platform; and the first rendering result includes the color data of each pixel in the model obtained after rendering.

[0064] Each type of rendering interface has its corresponding rendering (Draw) instructions, comparison (Compare) functions and result file formats. For example, for an opengl type rendering interface, its corresponding rendering instructions may include glDrawArrays instructions and glDrawIndex instructions, where Figure 6 As shown, the glDrawArrays instruction can be "glDrawArrays (GL_TRIANGLES, 0, 3)", and the comparison function corresponding to the opengl type rendering interface can be the plCompareFramebuffer function, where, Figure 6 As shown, the plCompareFramebuffer function can be "plCompareFramebuffer(fbo_0, fbo_0.glt)", and the rendering instructions and comparison functions corresponding to the OpenGL type rendering interface can also be other, which are not specifically limited in the embodiments of the present application; for the OpenGL type rendering interface, the corresponding result file format can be .glt format, where, Figure 6 As shown, the result file may be "fbo_0.glt". For a D3D type rendering interface, the corresponding result file format may be a .dds format. The corresponding result file format of each type of rendering interface may also be other formats, which is not specifically limited in the embodiments of the present application.

[0065] Specifically, Figure 6As shown, in order to compare the rendering results of the first GPU platform with those of the second GPU platform, and thus to develop and verify the second GPU platform, the configuration item "Compare_FBO_Every_Draw" will be configured in the configuration file of the API capturer. This configuration item is characterized by configuring the corresponding comparison function for the rendering instruction, and the corresponding capture switch "Compare_FBO_Every_Draw=true" is turned on before the rendering process of the first GPU platform begins. In the process of the three-dimensional application sending rendering instructions to the first GPU platform by calling the rendering interface, the API capturer will intercept the rendering interface, call the corresponding comparison function, and store both the rendering interface and the comparison function in the script file. After the first GPU platform completes the rendering process, the API capturer will obtain the first rendering result from the first GPU platform and store the first rendering result in the script file. The corresponding player of the second GPU platform will parse the script file and send the parsed rendering interface to the second GPU platform, so that the second GPU platform completes the rendering process based on the same rendering instruction as the first GPU platform and obtains the second rendering result. Based on the comparison function obtained through analysis, the player compares the color data of each pixel in the first rendering result with the color data of the corresponding pixel in the second rendering result, thereby determining the performance difference between the second GPU platform and the first GPU platform, providing a basis for the development and verification of the second GPU platform.

[0066] In this embodiment, by configuring a comparison function in the configuration file, the rendering results of the two platforms are compared, thereby providing a basis for development verification of the second GPU platform.

[0067] In some embodiments, the captured configuration information includes a configuration item for characterizing whether to disassemble the machine executable code file related to the rendering process; the method also includes: when the configuration item is to turn on disassembly, obtaining the machine executable code file transmitted by the three-dimensional application to the first GPU platform during the rendering state configuration process, and disassembling the machine executable code file by calling the disassembly function to obtain the disassembly result.

[0068] Among them, the disassembly function is used to disassemble unreadable machine execution code into readable code; the rendering state is used to describe the parameter state of the rendering setting, for example, the rendering state can be a shader state, and the rendering state configuration process is performed after the 3D application obtains the rendering support features of the GPU platform and before the rendering process.

[0069] Specifically, Figure 7As shown, the machine executable code that needs to be disassembled is the shader code "shader code". The disassembly function is configured in the configuration file of the API capturer, and the corresponding capture switch "LogShaderToBin=false" is turned on. Turning on the capture switch indicates that the shader code is not saved in the bin file format corresponding to the machine executable code. When the three-dimensional application configures the shader and sends the corresponding shader code to the first GPU platform, the API capturer will obtain the shader code through the capture configuration interface, and by calling the disassembly function, the shader code written in the machine executable code is disassembled into the shader code (asm shadercode) written in assembly language.

[0070] In this embodiment, by configuring a disassembly function in the API capturer, the machine executable code can be disassembled into readable code, which is helpful for the rendering staff to analyze the configured rendering status by viewing the corresponding code.

[0071] In some embodiments, the capture configuration information includes a configuration item for characterizing whether to capture the interface type supported by the graphics card platform; the method also includes: when the configuration item is to enable capture, the interface type corresponding to the configuration item for enabling capture is used as the target interface, and the process of the three-dimensional application calling the target interface is recorded.

[0072] Specifically, Figure 8 As shown, the interface types supported by the graphics card platform can be d3d10, d3d11, d3d12, and dxgi type interfaces, and the target interface can be at least one of these four interfaces. The interface types supported by the graphics card platform can also be opengl and opencl type interfaces, and the target interface can be at least one of these two interfaces. The interface types supported by the graphics card platform can also be other types, and the embodiments of the present application do not specifically limit this. Before the 3D application obtains the rendering support features of the graphics card platform, turn on the hybrid capture switch "Multi_loggers=true" configured in the API capturer, so that as long as the 3D application calls the target interface later, it will be captured by the API capturer and recorded.

[0073] In this embodiment, by setting a hybrid capture switch in the API capturer, the calling status of the target interface can be recorded as required.

[0074] In some embodiments, the process of a three-dimensional application calling a target interface is recorded, including: for a target interface file corresponding to the target interface, a virtual interface file with the same name as the target interface file is created in an installation directory corresponding to the three-dimensional application, the virtual interface file including a calling code for calling the target interface and a recording code for recording the calling process; when the three-dimensional application calls the virtual interface corresponding to the virtual interface file, based on the calling code, the three-dimensional application is guided to call the target interface, and based on the recording code, the target interface called this time is recorded.

[0075] The virtual interfaces in the virtual interface file correspond one to one with the target interfaces in the target interface file.

[0076] In this embodiment, based on the calling code in the virtual interface file, the target interface can be accurately called from the target interface file, and based on the recording code, the called target interface can be accurately recorded.

[0077] In one embodiment, Fig. 9 As shown, another web page display method is provided, which includes the following contents:

[0078] When GPULogger (API Capture) captures 3D APP (three-dimensional application), it can insert some user-defined intervention actions to meet development needs during the original rendering process of the 3D APP. Some intervention actions will affect the subsequent rendering of the APP to a certain extent, while some intervention actions are only auxiliary extension functions and do not affect the subsequent rendering of the APP. GPULogger configures these intervention actions uniformly into the readable and writable configuration file GPULogger.ini, and sets switches and detailed intervention behaviors for each intervention action. Before capturing a 3D APP each time, as long as GPULogger.ini is configured, a script with specific requirements can be generated for the user. There are three commonly used configurations in GPULogger.ini: fake GPU feature, insert extension function, and multi-API mixed capture.

[0079] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0080] Based on the same inventive concept, the embodiment of the present application also provides a GPU platform feature query device for implementing the GPU platform feature query method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more GPU platform feature query device embodiments provided below can refer to the limitations on the GPU platform feature query method above, and will not be repeated here.

[0081] In an exemplary embodiment, Fig.10 As shown, a GPU platform feature query device 1000 is provided, comprising: a query module 1001, an acquisition module 1002, a modification module 1003 and a return module 1004, wherein:

[0082] The query module 1001 is used to query the rendering support features of the first GPU platform by calling a query interface based on the 3D application before performing 3D rendering based on the 3D application.

[0083] The acquisition module 1002 is used to acquire capture configuration information for configuring the interface call capture process, wherein the capture configuration information includes a modification configuration item for modifying the rendering support feature.

[0084] The modification module 1003 is used to modify the rendering support feature based on the modification configuration item in the capture configuration information to obtain the modified rendering support feature.

[0085] The returning module 1004 is used to return the modified rendering support feature to the 3D application.

[0086] In some embodiments, the GPU platform feature query device 1000 is specifically used for: rendering support features include function types supported by the first GPU platform or at least one of the attribute parameters of the first GPU platform; the capture configuration information includes at least one of the disabled function types for disabling functions of the first GPU platform or the attribute modification results for modifying the attribute parameters of the first GPU platform.

[0087] In some embodiments, the capture configuration information also includes a configuration item for characterizing whether to compare the rendering results of different GPU platforms; the GPU platform feature query device 1000 is also used to obtain the calling interface information when three-dimensional rendering is performed based on the first GPU platform and the first rendering result after three-dimensional rendering when the configuration item is to turn on the comparison; based on the first rendering result and the calling interface information, generate a script file carrying a rendering result comparison instruction; execute the script file to enable the second GPU platform to perform three-dimensional rendering according to the calling interface information to obtain a second rendering result, and based on the rendering result comparison instruction, compare the first rendering result with the second rendering result to obtain a comparison result.

[0088] In some embodiments, the captured configuration information includes a configuration item for characterizing whether to disassemble the machine executable code file related to the rendering process; the GPU platform feature query device 1000 is also used to obtain the machine executable code file transmitted by the three-dimensional application to the first GPU platform during the rendering state configuration process when the configuration item is to enable disassembly, and disassemble the machine executable code file by calling the disassembly function to obtain the disassembly result.

[0089] In some embodiments, the capture configuration information includes a configuration item for indicating whether to capture the interface type supported by the graphics card platform; the GPU platform feature query device 1000 also includes:

[0090] The recording module is used to record the process of the three-dimensional application calling the target interface by taking the interface type corresponding to the configuration item for enabling capture as the target interface when the configuration item is enabling capture.

[0091] In some embodiments, the recording module is also used to create a virtual interface file with the same name as the target interface file corresponding to the target interface in the installation directory corresponding to the three-dimensional application, wherein the virtual interface file includes a calling code for calling the target interface and a recording code for recording the calling process; when the three-dimensional application calls the virtual interface corresponding to the virtual interface file, based on the calling code, the three-dimensional application is guided to call the target interface, and the target interface called this time is recorded based on the recording code.

[0092] Each module in the above-mentioned GPU platform feature query device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0093] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.11 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a GPU platform feature query method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0094] Those skilled in the art will understand that Fig.11The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0095] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: before performing three-dimensional rendering based on a three-dimensional application, calling a query interface based on the three-dimensional application to query rendering support features of a first GPU platform; obtaining capture configuration information for configuring an interface call capture process, wherein the capture configuration information includes modification configuration items for modifying the rendering support features; modifying the rendering support features based on the modification configuration items in the capture configuration information to obtain modified rendering support features; and returning the modified rendering support features to the three-dimensional application.

[0096] In one embodiment, the rendering support features implemented when the processor executes the computer program include at least one of the function types supported by the first GPU platform or the attribute parameters of the first GPU platform; the capture configuration information includes at least one of the disabled function types for disabling the function of the first GPU platform or the attribute modification results for modifying the attribute parameters of the first GPU platform.

[0097] In one embodiment, the capture configuration information implemented when the processor executes the computer program also includes a configuration item for characterizing whether to compare the rendering results of different GPU platforms; the method also includes: when the configuration item is to turn on the comparison, obtaining the calling interface information when performing three-dimensional rendering based on the first GPU platform and the first rendering result after the three-dimensional rendering; based on the first rendering result and the calling interface information, generating a script file carrying a rendering result comparison instruction; executing the script file so that the second GPU platform performs three-dimensional rendering according to the calling interface information to obtain a second rendering result, and based on the rendering result comparison instruction, compares the first rendering result with the second rendering result to obtain a comparison result.

[0098] In one embodiment, the capture configuration information implemented when the processor executes the computer program includes a configuration item for characterizing whether to disassemble the machine executable code file related to the rendering process; the method also includes: when the configuration item is to turn on disassembly, obtaining the machine executable code file transmitted by the three-dimensional application to the first GPU platform during the rendering state configuration process, and disassembling the machine executable code file by calling the disassembly function to obtain the disassembly result.

[0099] In one embodiment, the capture configuration information implemented when the processor executes the computer program includes a configuration item for characterizing whether to capture the interface type supported by the graphics card platform; the method also includes: when the configuration item is to enable capture, the interface type corresponding to the configuration item for enabling capture is used as the target interface, and the process of the three-dimensional application calling the target interface is recorded.

[0100] In one embodiment, the process of the three-dimensional application calling the target interface implemented by the processor when executing the computer program includes: for the target interface file corresponding to the target interface, creating a virtual interface file with the same name as the target interface file in the installation directory corresponding to the three-dimensional application, the virtual interface file including a calling code for calling the target interface and a recording code for recording the calling process; when the three-dimensional application calls the virtual interface corresponding to the virtual interface file, based on the calling code, guiding the three-dimensional application to call the target interface, and recording the target interface called this time based on the recording code.

[0101] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: before performing three-dimensional rendering based on a three-dimensional application, calling a query interface based on the three-dimensional application to query rendering support features of a first GPU platform; obtaining capture configuration information for configuring an interface call capture process, the capture configuration information including modification configuration items for modifying the rendering support features; modifying the rendering support features based on the modification configuration items in the capture configuration information to obtain modified rendering support features; and returning the modified rendering support features to the three-dimensional application.

[0102] In one embodiment, the rendering support features implemented when the computer program is executed by the processor include at least one of the function types supported by the first GPU platform or the attribute parameters of the first GPU platform; the capture configuration information includes at least one of the disabled function types for disabling the function of the first GPU platform or the attribute modification results for modifying the attribute parameters of the first GPU platform.

[0103] In one embodiment, the capture configuration information implemented when the computer program is executed by the processor also includes a configuration item for characterizing whether to compare the rendering results of different GPU platforms; the method also includes: when the configuration item is to turn on the comparison, obtaining the calling interface information when performing three-dimensional rendering based on the first GPU platform and the first rendering result after three-dimensional rendering; based on the first rendering result and the calling interface information, generating a script file carrying a rendering result comparison instruction; executing the script file so that the second GPU platform performs three-dimensional rendering according to the calling interface information to obtain a second rendering result, and based on the rendering result comparison instruction, compares the first rendering result with the second rendering result to obtain a comparison result.

[0104] In one embodiment, the capture configuration information implemented when the computer program is executed by the processor includes a configuration item for indicating whether to disassemble the machine executable code file related to the rendering process; the method also includes: when the configuration item is to turn on disassembly, obtaining the machine executable code file transmitted by the three-dimensional application to the first GPU platform during the rendering state configuration process, and disassembling the machine executable code file by calling the disassembly function to obtain the disassembly result.

[0105] In one embodiment, the capture configuration information implemented when the computer program is executed by the processor includes a configuration item for characterizing whether to capture the interface type supported by the graphics card platform; the method also includes: when the configuration item is to enable capture, the interface type corresponding to the configuration item for enabling capture is used as the target interface, and the process of the three-dimensional application calling the target interface is recorded.

[0106] In one embodiment, the computer program implemented when being executed by the processor records the process of the three-dimensional application calling the target interface, including: for the target interface file corresponding to the target interface, creating a virtual interface file with the same name as the target interface file in the installation directory corresponding to the three-dimensional application, the virtual interface file including a calling code for calling the target interface and a recording code for recording the calling process; when the three-dimensional application calls the virtual interface corresponding to the virtual interface file, based on the calling code, guiding the three-dimensional application to call the target interface, and recording the target interface called this time based on the recording code.

[0107] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: before performing three-dimensional rendering based on a three-dimensional application, querying rendering support features of a first GPU platform based on calling a query interface based on the three-dimensional application; obtaining capture configuration information for configuring an interface call capture process, the capture configuration information including modification configuration items for modifying the rendering support features; modifying the rendering support features based on the modification configuration items in the capture configuration information to obtain modified rendering support features; and returning the modified rendering support features to the three-dimensional application.

[0108] In one embodiment, the rendering support features implemented when the computer program is executed by the processor include at least one of the function types supported by the first GPU platform or the attribute parameters of the first GPU platform; the capture configuration information includes at least one of the disabled function types for disabling the function of the first GPU platform or the attribute modification results for modifying the attribute parameters of the first GPU platform.

[0109] In one embodiment, the capture configuration information implemented when the computer program is executed by the processor also includes a configuration item for characterizing whether to compare the rendering results of different GPU platforms; the method also includes: when the configuration item is to turn on the comparison, obtaining the calling interface information when performing three-dimensional rendering based on the first GPU platform and the first rendering result after three-dimensional rendering; based on the first rendering result and the calling interface information, generating a script file carrying a rendering result comparison instruction; executing the script file so that the second GPU platform performs three-dimensional rendering according to the calling interface information to obtain a second rendering result, and based on the rendering result comparison instruction, compares the first rendering result with the second rendering result to obtain a comparison result.

[0110] In one embodiment, the capture configuration information implemented when the computer program is executed by the processor includes a configuration item for indicating whether to disassemble the machine executable code file related to the rendering process; the method also includes: when the configuration item is to turn on disassembly, obtaining the machine executable code file transmitted by the three-dimensional application to the first GPU platform during the rendering state configuration process, and disassembling the machine executable code file by calling the disassembly function to obtain the disassembly result.

[0111] In one embodiment, the capture configuration information implemented when the computer program is executed by the processor includes a configuration item for characterizing whether to capture the interface type supported by the graphics card platform; the method also includes: when the configuration item is to enable capture, the interface type corresponding to the configuration item for enabling capture is used as the target interface, and the process of the three-dimensional application calling the target interface is recorded.

[0112] In one embodiment, the computer program implemented when being executed by the processor records the process of the three-dimensional application calling the target interface, including: for the target interface file corresponding to the target interface, creating a virtual interface file with the same name as the target interface file in the installation directory corresponding to the three-dimensional application, the virtual interface file including a calling code for calling the target interface and a recording code for recording the calling process; when the three-dimensional application calls the virtual interface corresponding to the virtual interface file, based on the calling code, guiding the three-dimensional application to call the target interface, and recording the target interface called this time based on the recording code.

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

[0114] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0115] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0116] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A GPU platform feature query method, characterized in that: The method comprises: Before performing three-dimensional rendering based on the three-dimensional application, calling a query interface based on the three-dimensional application to query the rendering support features of the first GPU platform; Acquire capture configuration information for configuring an interface call capture process, wherein the capture configuration information includes a modification configuration item for modifying the rendering support feature; Based on the modification configuration item in the capture configuration information, modify the rendering support feature to obtain the modified rendering support feature; The modified rendering support characteristics are returned to the three-dimensional application.

2. The method according to claim 1, characterized in that The rendering support feature includes at least one of the function types supported by the first GPU platform or the attribute parameters of the first GPU platform; the capture configuration information includes at least one of the disabled function types for disabling the function of the first GPU platform or the attribute modification results for modifying the attribute parameters of the first GPU platform.

3. The method according to claim 1, characterized in that The capture configuration information also includes a configuration item for indicating whether to compare rendering results of different GPU platforms; the method also includes: When the configuration item is to enable comparison, obtaining calling interface information when performing three-dimensional rendering based on the first GPU platform and a first rendering result after performing three-dimensional rendering; Based on the first rendering result and the calling interface information, generating a script file carrying a rendering result comparison instruction; The script file is executed to enable the second GPU platform to perform three-dimensional rendering according to the calling interface information to obtain a second rendering result, and based on the rendering result comparison instruction, the first rendering result and the second rendering result are compared to obtain a comparison result.

4. The method according to claim 1, characterized in that: The capture configuration information includes a configuration item for indicating whether to disassemble the machine executable code file related to the rendering process; the method further includes: When the configuration item is to enable disassembly, the machine executable code file transmitted by the 3D application to the first GPU platform during the rendering state configuration process is obtained, and the machine executable code file is disassembled by calling the disassembly function to obtain the disassembly result.

5. The method according to claim 1, characterized in that The capture configuration information includes a configuration item for indicating whether to capture the interface type supported by the graphics card platform; the method further includes: In the case where the configuration item is to enable capture, the interface type corresponding to the configuration item for enabling capture is used as the target interface, and the process of the three-dimensional application calling the target interface is recorded.

6. The method according to claim 5, characterized in that The recording of the process of the three-dimensional application calling the target interface includes: For the target interface file corresponding to the target interface, a virtual interface file with the same name as the target interface file is created in the installation directory corresponding to the three-dimensional application, wherein the virtual interface file includes a calling code for calling the target interface and a recording code for recording the calling process; When the three-dimensional application calls the virtual interface corresponding to the virtual interface file, the three-dimensional application is directed to call the target interface based on the calling code, and the target interface called this time is recorded based on the recording code.

7. A GPU platform feature query device, characterized in that: The device comprises: A query module, used for inquiring about rendering support features of the first GPU platform by calling a query interface based on the three-dimensional application before performing three-dimensional rendering based on the three-dimensional application; An acquisition module, used to acquire capture configuration information for configuring an interface call capture process, wherein the capture configuration information includes a modification configuration item for modifying the rendering support feature; A modification module, used to modify the rendering support feature based on the modification configuration item in the capture configuration information to obtain the modified rendering support feature; The returning module is used for returning the modified rendering support feature to the three-dimensional application.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

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

Citation Information

Patent Citations

  • Three-dimensional CAD cloudization engine system

    CN113378254A

  • Airborne three-dimensional image engine and scene display method

    CN117095117A