This graphic processing technology is constantly evolving to deliver more performance with low power consumption. Transistor scaling and Moore’s law have helped to drive this evolution for many years. Today’s Modern GPU from both Nvidia and AMD are very efficient, but Hardware and Software limitations have been keeping them from reaching their full potential. Transistor scaling and Moore’s law states that ” Number of transistors in a dense Integrated circuit are approximately getting doubled every two years. As number of transistors are increasing, but the size of the die is getting reduced to 22nm and 14nm. Whenever a GPU is involving in intensive rendering operation like video and animation, a part of GPU is sitting idle. This behavior represents a great opportunity to do better with architectural improvements, Here comes the concept of Asynchronous Shaders.
Graphic processors involves processing of millions of polygons and pixels to create moving images. The faster these elements will process, faster it will render the output result. Hence this hardware is referred as Parallel processing units, as it can handle many operations simultaneously. GPU have become critical in modern computing. Also submitting all the workload to a GPU and schedule it to the available resources is complex. GPU rely heavily on pipelining to achieve their performance. Pipeline stages include command processing, geometry processing, rasterization, shading, and raster operations.
Applications submit work to the GPU in the form of command buffers. Every command buffer is associated with particular rendering tasks such as lighting, shadow mapping and physics simulation. Ideally we want the GPU to be able to handle multiple tasks simultaneously, so they can share the available resources and improve utilization.
GPU renders many tasks in pipeline. It requires more information about the task rendered in sequence(Synchronous) and some of task executed in any order(Asynchronous). This requires a Application programmable interface(API) that allows developer to provide such information. This is the key capability of new generations of API including DirectX 12, vulkan and Mantle.
Asynchronous Shaders is an important reason why those game consoles have typically been able to achieve higher levels of graphics performance and image quality than PCs equipped with a similar level of GPU processing power. However the availability of new graphics APIs is finally bringing similar capabilities to the PC platform.
Using Asynchronous Shaders
The ability to perform shading operations asynchronously has the potential to benefit a broad range of graphics applications. Practically all modern game rendering engines today make use of compute shaders that could be scheduled asynchronously with other graphics tasks, and there is a trend toward making increasing use of compute shaders as the engines get more sophisticated. Many leading developers believe that rendering engines will continue to move away from traditional pipeline-oriented models and toward task-based multi-threaded models, which increases the opportunities for performance improvements. The following are examples of some particular cases where asynchronous shading can benefit existing applications.
Today’s games implement a wide range of visual effects as post-processing passes. These are applied after the main graphics rendering pipeline has finished rendering a frame, and are often implemented using compute shaders. Examples include blur filters, anti-aliasing, depth-of-field, light blooms, tone mapping, and color correction. These kinds of effects are ideal candidates for acceleration using asynchronous shading.
The following example shows a blur filter applied to a rendered scene. Using Asynchronous Shaders for the blur effect improves performance by 45%.
Another common technique in modern games is deferred lighting. This involves performing a pre-pass over the scene with a compute shader before it is rendered, in order to determine which light sources affect each pixel. This technique makes it possible to efficiently render scenes with a large number of light sources.
The following example, which uses DirectX 12 and deferred lighting to render a scene with many light sources, shows how using asynchronous shaders for the lighting pre-pass improves performance by 10%.
Virtual reality is the best example which uses Asynchronous Shaders to render images to virtual reality headsets, low latency is critical to avoiding nausea and motion sickness.
Hardware, software and API support are all now available to deliver on the promise of asynchronous computing for GPUs. The GCN architecture is perfectly suited to asynchronous computing, having been designed from the beginning with this operating model in mind. This will allow developers to unlock the full performance potential of today’s PC GPUs, enabling higher frame rates and better image quality.
Want to know more about “How GPU pipeline works in DirectX 12” click here