Popular Science: Two or Three Things About GPU

In addition to the CPU (Central Processing Unit), another important component of the SoC (System On a Chip) is the Graphic Processing Unit, which is commonly known as the GPU. Everyone may know that it is indispensable to play 3D games, but it may not be clear what role it will play. This time we will uncover it.   GPU   Mysterious veil.

Science: Two or three things about GPU (on)

GPU   Designed to quickly perform some specific types of mathematical operations, especially for floating point, vector, and matrix calculations, which convert 3D model information into 2D representations, while adding different textures and shadows, so   GPU   It is also a special existence in hardware.

The 3D model is made up of many small triangles that define the vertices of each triangle through X, Y, and Z coordinates. In actual processing, the vertices of small triangles will coincide with each other. If a complex model consists of 500 small triangles, the final number of vertices to be defined is not as much as 1500. To present an abstract 3D model, three elements are indispensable: displacement, rotation (three axes), and scaling, all of which are collectively referred to as transformations. In order not to get into complicated and cumbersome mathematical operations, the best way to handle transformation is to use a 4x4 matrix.

From 3D modeling to final display on the screen, GPU rendering scenarios use pipeline operations. Earlier, the pipeline operation was fixed and could not be changed. The whole operation started by reading the vertex data of the triangle, and then the GPU processed it and entered the frame buffer, ready to send to the display. The GPU can also handle certain effects on the scene, but these are fixed by the engineer and offer few options.

Programmable shaders

Science: Two or three things about GPU (on)

While Android is still in its infancy, desktop-level GPUs can begin to program the operation of the pipeline portion. With the introduction of the OpenGL ES 2.0 standard, mobile GPUs also begin to support programmable operations. These programmable parts are called shaders. The two most important shaders are vertex shaders and Fragment shader. The vertex shader is called once per vertex, so the vertex shader needs to be called three times when rendering a triangle; and the fragment shader, we can simply imagine each fragment as every pixel on the screen. So every time a pixel fragment shader is generated it will be called once.

Science: Two or three things about GPU (on)

The two shaders act as different roles, and the vertex shader is primarily responsible for translating the data of the 3D model into real-world locations as well as texture maps or lights, and then transforming; the fragment shader is used to set each pixel. Related colors. To put it simply: the vertex shader handles vertex-related information, and the fragment shader handles the color information of the image.

A closer look reveals that the processing of each vertex is independent of each other, as well as the processing of each fragment, which means that the GPU can run the shader in parallel, in fact the GPU is also doing this, the vast majority of mobile GPUs There are multiple shader cores (single units that programmatically perform shader functions are called shader cores), and GPU vendors claim that marketing a shader is better than others is a marketing issue.

Science: Two or three things about GPU (on)

Take   ARM   For example, the Mali GPU has a number of shader cores in the "MPx" of the series GPU name suffix, and the Mali T880 MP12 represents 12 shader cores. Each core has a complex pipeline, which means that each time a shader operation is completed, new operation instructions are issued immediately, and there is more than one arithmetic unit in the core, so multiple operations can be completed in the same time. ARM   Mali GPUs (including the Mali T600, T700, and T800 series) can issue one instruction per clock cycle per pipeline, so a typical shader core can issue four instructions in parallel, and the Mali GPU currently supports up to 16 cores, which is Say that up to 64 instructions can be issued in parallel.

Everything means that the GPU works in parallel to process large amounts of data, very different from the CPU, not a general sequential operation. But this is only a small problem. The serious fact is that the programmable shader core represents that the actual performance of each core is no longer set by the GPU engineer, but depends on the app developer. So a poor quality shader code can make the GPU's performance plummet. Fortunately, most 3D game developers understand this and do the best optimization for shader runs.

0 times
Window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": " 0", "bdSize": "24" }, "share": {}, "image": { "viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "Share to:", "viewSize": "16" }, "selectShare": { "bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren" , "weixin"] } }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share. Baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];

Yuchai 76-200KW Diesel Generator

Yuchai 76-200Kw Diesel Generator,Yuchai 200Kw Generator,Yuchai Engine Generator,Diesel Generator With Yuchai Engine

Shanghai Kosta Electric Co., Ltd. , https://www.generatorkosta.com