Implementation method for controlling 3D (three-dimensional) graphic acceleration based on Feiteng platform
Technical Field
The invention relates to a realization method for controlling 3D (three-dimensional) graphic acceleration based on a Feiteng platform, belonging to the technical field of graphic display acceleration.
Background
With the development of computer technology, image display technology plays an increasingly important role in various fields, and particularly, the demand for high-performance display in the aspects of 3D terrain display, military battlefield situation, meteorological cloud chart and the like is more urgent. Graphics display acceleration techniques are particularly important to improve the operating efficiency of graphics systems. Graphics display acceleration is the acceleration of graphics processing throughout the system by some dedicated technique. These specialized technologies fall into two main categories. One is a software acceleration method; the other is a hardware acceleration method. The software acceleration method comprises the continuous improvement of a graphic processing algorithm and the improvement of the efficiency of display processing in a graphic system through the optimization of software codes. The hardware acceleration method is to carry out the acceleration processing of the graphic images by the repartitioning of the software and hardware work, and to send the graphic image display task which is completely realized by the software to a special hardware unit for processing, thereby reducing the heavy task of the CPU of the system for processing the graphic images.
If the kernel of the Feiteng platform operating system closes some functions of GPU graphic acceleration, the logic operation, graphic rendering calculation, texture calculation and the like related to 3D graphic display can be completed by the GPU, so that the operations need to be completed by the CPU, and the display efficiency is reduced.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a realizing method for controlling 3D (three-dimensional) graphic acceleration based on a Feiteng platform.
Summary of the invention:
the invention provides a realization method for controlling 3D graphics acceleration based on a Feiteng platform, aiming at the problem that the stability of the platform is affected by the fact that a driver of a video card of the Feiteng platform completely starts a 3D graphics acceleration function. The invention adopts a mode of controlling the domestic soar CPU and GPU to be heterogeneous, manages the opening and closing of the 3D graphic acceleration part function of the display card, does not influence the stability of high-performance graphic display, and furthest hands the graphic acceleration multitask which consumes CPU resources to the GPU which is very good at graphic data processing.
The technical scheme of the invention is as follows:
a realization method for controlling 3D graphics acceleration based on a Feiteng platform comprises the following steps:
1) the Feiteng CPU reads the application program data model from the main memory, the Feiteng CPU classifies the display data and transmits the display data to the GPU through the display card driving program, and the GPU performs operation, space change, grating and fragment processing operation on the display data; modifying the code of the display card driver to enable the display card driver to provide a graphic display acceleration function interface; the graphic display acceleration function interface comprises a GPU vertex processing interface, a geometric change interface, a rasterization interface and a fragment processing interface;
2) calling the graphic display acceleration function interface through the 3D graphic display acceleration control service, and changing a configuration file of the 3D graphic display acceleration control service to realize the control of 3D graphic acceleration; on the premise of not influencing the display stability of the Feiteng platform, the 3D graphic display acceleration control service realizes the control of 3D graphic acceleration by calling the modified display card driving source code;
3) storing the display data processed in the step 2) into a display memory, mapping the display data into a memory through a PCIE bus, and finally displaying the display data on display equipment.
According to the preferable implementation method for controlling the 3D graphics acceleration based on the Feiteng platform, a Feiteng desktop computer carrying an AMD R7450 graphics card is used as a development platform, and an AMD open-source graphics card driver xf86 is used as a development basis; the CPU model of the feiteng desktop is a feiteng 1500 processor.
Preferably, the graphics driver codes are AMD open source driver source codes amdgpu _ video, amdgpu _ pixmap, amdgpu _ sync and amdgpu _ misc.
Preferably, the step 2) is implemented as follows,
2.1) gradually starting the 3D acceleration function through the 3D graphic display acceleration control service, and starting the 3D acceleration function to the maximum extent on the premise of ensuring the stability of the 3D graphic display; if the 3D graphic display is unstable, closing part of the 3D acceleration function;
2.2) after the configuration file of the 3D graphic display acceleration control service is set, adding the configuration file into rc, and using the configuration file as a background service for starting default starting;
2.3) realizing the control of 3D graphic acceleration through the 3D graphic display acceleration control service.
According to the invention, the display device is a Feiteng desktop or Feiteng all-in-one 3D terrain display device.
The invention has the beneficial effects that:
1. operations such as floating point operation, space geometric change, rasterization, fragment processing and the like of the 3D graph are transmitted to the GPU for processing, and great influence is generated on the dispatching and display control of the Feiteng CPU and the display stability of the 3D graph of the Feiteng platform; aiming at the problem, the implementation method for controlling the acceleration of the 3D graphics based on the Feiteng platform, disclosed by the invention, has the advantages that by designing a service for controlling the acceleration function of the 3D graphics, and by starting the designed 3D display control service, part of the acceleration function of the 3D graphics is started according to the configuration file, and the display performance of the 3D graphics of the Feiteng platform is improved under the condition that the display is not influenced;
2. the implementation method for controlling the acceleration of the 3D graphics based on the Feiteng platform is characterized in that a user can start the function of the acceleration of the Feiteng 3D graphics only by configuring the provided control service; under the condition that the display stability of the 3D graph of the Feiteng platform is not influenced, the 3D graph acceleration function is started to the maximum extent, and the display performance of the 3D graph of the platform is improved.
Drawings
FIG. 1 is a flow chart of accelerated display data of a 3D graphic of a Feiteng platform;
fig. 2 is a flow chart of a design of a 3D graphic acceleration control service of the soar platform.
Detailed Description
The invention is further described below, but not limited thereto, with reference to the following examples and the accompanying drawings.
Example 1
As shown in fig. 1-2.
A realization method for controlling 3D graphics acceleration based on a Feiteng platform comprises the following steps:
1) the Feiteng CPU reads the application program data model from the main memory, the Feiteng CPU classifies the display data and transmits the display data to the GPU through the display card driving program, and the GPU performs operation, space change, grating and fragment processing operation on the display data; modifying the code of the display card driver to enable the display card driver to provide a graphic display acceleration function interface; the graphic display acceleration function interface comprises a GPU vertex processing interface, a geometric change interface, a rasterization interface and a fragment processing interface;
2) calling the graphic display acceleration function interface through the 3D graphic display acceleration control service, and changing a configuration file of the 3D graphic display acceleration control service to realize the control of 3D graphic acceleration; on the premise of not influencing the display stability of the Feiteng platform, the 3D graphic display acceleration control service realizes the control of 3D graphic acceleration by calling the modified display card driving source code;
3) storing the display data processed in the step 2) into a display memory, mapping the display data into a memory through a PCIE bus, and finally displaying the display data on display equipment.
Example 2
The method for implementing 3D graphics acceleration based on the FT platform according to embodiment 1, except that the method for implementing 3D graphics acceleration based on the FT platform is based on a FT desktop with an AMD R7450 graphics card as a development platform and an AMD open source graphics card driver xf86 as a development basis; the CPU model of the feiteng desktop is a feiteng 1500 processor.
Example 3
The method for implementing 3D graphics acceleration based on the platform of embodiment 1, except that the driver codes of the graphics card are AMD open source driver source codes amdgpu _ video, amdgpu _ pixmap, amdgpu _ sync, and amdgpu _ misc.
Example 4
The implementation method for controlling 3D graphics acceleration based on the FT platform as described in embodiment 1, except that the specific implementation process of step 2) is as follows,
2.1) gradually starting the 3D acceleration function through the 3D graphic display acceleration control service, and starting the 3D acceleration function to the maximum extent on the premise of ensuring the stability of the 3D graphic display; if the 3D graphic display is unstable, closing part of the 3D acceleration function;
2.2) after the configuration file of the 3D graphic display acceleration control service is set, adding the configuration file into rc, and using the configuration file as a background service for starting default starting;
2.3) realizing the control of 3D graphic acceleration through the 3D graphic display acceleration control service.
Example 5
The implementation method for controlling 3D graphics acceleration based on the FT platform as in embodiment 1, except that the display device is a FT desktop.