AMD Enables Console Style Programming on PC Thanks to Shader Intrinsic Functions
Last month, at their quarterly earnings call conference, AMD announced that they have won three game-centric semi-custom SOC designs. This has not only benefited the company financially at the operating income level, but has also governed how they design their next generation GPUs.
When it comes to semi custom chips for all three consoles (Xbox One, PlayStation 4 and Wii U), AMD has stuck with the GCN architecture which gives it a built-in advantage into its GPUs for the PC gaming space. More recently, AMD has made use of this capability by bringing a new feature called “Shader Intrinsic Functions,” directly from console to PC – via their GPUOpen program.
Announced back in January, one of the mandates of GPUOpen was to give developers better access to the hardware in a console-like development environment. With shader extensions, developers will be able to directly access graphics hardware instructions – granted in situations where they would normally be abstracted by a higher level API. According to AMD, this is like embedding optimized machine language code into higher-level code.
With those shader extensions, we provide access to wavefront-wide functions, which is an important building block to exploit the SIMD execution model of GPUs. For instance, the use of mbcnt and ballot can replace atomics in various cases, drastically boosting performance. The wavefront-wide instructions also include swizzles, which allow individual lanes to exchange data without going through memory.
Additionally, we expose readfirstlane and other functions which enable the compiler to move data from VGPRs into SGPRs. Especially for VGPR heavy code, marking variables as wavefront-uniform can reduce the VGPR count significantly.
By enabling developers to benefit from these new capabilities will help AMD’s GPUs experience performance gains without any necessary changes to their hardware. Moreover, the addition of intrinsic functions into GPUOpen will improve the compatibility of this feature, as well.
Being part of GPUOpen, the feature will be supported in all the major PC APIs including Microsoft DirectX 11, DirectX 12 and even Vulkan.