The Qualcomm Snapdragon Graphics Pipeline Explained
Graphics Processing Units (GPUs) are a key part of parallel computing on systems where the workloads are shared between the CPU, GPU and other processors. GPUs break complex problems into millions of separate tasks and work them out at once. That makes them ideal for graphics, where textures, lighting and the rendering of shapes have to be done at once to keep images flying across the screen. The design of the Snapdragon processor includes the Adreno™ graphics processing unit (GPU) to accelerate the rendering of complex geometries. The Adreno GPU is the part of Snapdragon that creates perfect graphics with super smooth motion (up to 144 frames per second) and in HDR (High Dynamic Range) in over a billion shades of color. A simple block diagram of a Snapdragon platform is shown below. The GMEM is the local memory of the GPU, and is used for fast Z, color, and stencil rendering. The GPU efficiently burst writes all blended pixels from GMEM as a single layer to the frame buffer in system memory. GPUs are usually restricted to performing the tasks related to rendering of graphics. In the Snapdragon, the Adreno is designed for enhanced GPGPU performance to share the workload of the CPU cores to address a wide range of use-cases like Computational rendering, computer vision, image processing, machine learning, etc. The graphics pipeline in the GPU is the sequence of operations that renders 3D geometry onto a 2D surface. This pipeline is illustrated below and starts with the object geometry defined in a mesh or vertices. The attributes of these vertices are sent by the application to the graphics driver to be rendered on to a display target. Shaders are programs that dictate the GPU on how to render each pixel. The vertex shader transforms the vertices from object coordinated space or model space to window coordinated space or screen space. The graphics hardware then rasterizes the triangle primitives into fragments that finally fill the frame buffer and discards the unwanted fragments. The fragment shader is invoked for every fragment that survives and determines which framebuffer(s) the fragments are written to and with which color and depth values. Testing and blending operations occur at the Per Pixel Operations stage before the final pixels are made available to the frame buffer. The Adreno GPU uses the unified shader architecture which uses an array of shader processors, and not specifically tuned for either pixel or vertex, but one that can handle both instruction types and can tackle both tasks simultaneously. This increases the efficiency of vertex and pixel shaders and provide a high degree of latency hiding with FIFOs and multithreading. The sophisticated architecture ensures early rejection of nonvisible or hidden pixels before texture fetch and processing for improved efficiency and performance. The Adreno GPU supports all common graphics API standards like OpenGL ES 3.2 (Android O or later), OpenCL 2.0 FP-compliant, Google RenderScript, EGL 1.4 plus extensions, C2D 3.0 and Vulkan1.0 (Android O or later). Qualcomm’s Adreno™ SDK allows you to take full advantage of the graphics and computation power provided by the Adreno GPU. The SDK kit includes tools, libraries, samples, documentation, and tutorials to fast-track your development and help ensure your apps are optimized for faster frame rates and smoother rendering. This SDK is a comprehensive resource that supports multiple versions of OpenGL ES, OpenCL, DirectX APIs and Vulkan™. Vulkan provides direct GPU access in 3D graphics and better application efficiency in a cross-platform environment on multiple Operating Systems. It is clean, modern and no longer a single monolithic state machine or a massive collection of APIs as with OpenGL. Graphics applications’ code calls APIs which is then translated by a graphics driver into machine language on the CPU before handing it off to the GPU hardware. Vulkan makes that driver translation layer much thinner and gives developers more control of the execution of the code on the GPU. Qualcomm, as a promoter member status with Khronos, participated in the design and specification of the Vulkan API just as they did with the OpenGLES standard and continues to be deeply involved in ensuring that the Vulkan API is fully supported and optimized on their Adreno line of GPUs found inside Snapdragon processors. The stages shown in yellow color in the graphics pipeline above are programmable on OpenGL/GL ES or OpenCL while the pipeline in Vulkan is almost completely immutable, which means that you must recreate the pipeline from scratch if you want to change shaders, bind different framebuffers or change the blend function. The disadvantage is that you'll have to create multiple pipelines that represent all of the different combinations of states you want to use in your rendering operations. However, because all of the operations you'll be doing in the pipeline are known in advance, the graphics driver can optimize for it much better thus giving you improved efficiency. Note that Vulkan allows you to create a new graphics pipeline by deriving from an existing pipeline. The idea of pipeline derivatives is that it is less expensive to set up pipelines when they have much functionality in common with an existing pipeline and switching between pipelines from the same parent can also be done quicker. Vulkan is also optimized for multiple passes over render targets having the same dimension. Penguin Edge platforms, including the newest platform based on QCS8250 SoC, the Penguin Edge 68A1 enable the use of the Adreno SDK. With extensive design and manufacturing experience, we can provide an immersive experience on your products by exploiting Qualcomm’s Visual Processing Subsystem innovations with our long-life guaranteed hardware and solutions that span over multiple generations of Qualcomm processors.