The New OpenGL - Vulkan and SPIR-V
Written by Sue Gee   
Tuesday, 03 March 2015

Previously referred to as the Next Generation OpenGL, Vulkan is the new open standard cross platform graphics API. Khronos has now made it available in technical preview and also released the provisional specification of Open CL 2.1.

vulcanlbanner

Vulkan is the result of a ground-up design for the OpenGL API addressing both graphics and compute. The change of name, something that Khronos recently sought help with from the developer community, reflects the fact that the new API is not backward compatible with OpenGL. 

Vulkan's news release states:

Vulkan is a unified specification that minimizes driver overhead and enables multi-threaded GPU command preparation for optimal graphics and compute performance on diverse mobile, desktop, console and embedded platforms. 

Vulkan's initial specifications and implementations are expected later this year and companies are encouraged to join Khronos to participate in its development. 

Microsoft joined Khronos last August and this no doubt has something to do with the fact that Vulkan drops the OpenGL way of handling shader programs in favor of the Direct3D approach. Developers will compile shaders into an intermediate form called SPIR-V.  

vspirv

SPIR-V is claimed to be the first open standard cross-API intermediate language for parallel compute and graphics. This allows developers to use the same front-end compiler across multiple platforms. facilitating portability. It reduces runtime shader compilation time as the driver only has to process SPIR-V and not the full source code. It provides a measure of IP protection as developers don't have to ship their shader source code.

vulcanopencl

 

SPIR-V will be used by both Vulkan and OpenCL 2.1, the provisional specification of which has been released. It's major feature is that it introduces a new kernel language based on a subset of C++. 

According to its press release:

Open CL C++ kernel language significantly boosts parallel programming productivity by providing lambda functions, classes, templates, operator overloading, and many other C++ features to free developers from low-level coding details without sacrificing performance. OpenCL C++ enables reusable device libraries and containers for easily sharable code that is fast and elegant, and templates enables meta-programming for highly adaptive software that cleanly delivers performance portability.  

In addition OpenCL 2.1  brings enhancements to the OpenCL API, including:

  • Subgroups, that expose hardware threading, are bought into core, together with additional subgroup query operations for increased flexibility;
  • clCloneKernel enables copying of kernel objects and state for safe implementation of copy constructors in wrapper classes;
  • Low-latency device timer queries support alignment of profiling between device and host code.

Vulkan has made rapid progress since the OpenGL Next Initiative began in June 2014 and has some welcome characteristics.

 vulcans2

 

OpenGL will, however, live on. The lower level control afforded by Vulkan means that it may not be a good fit for all programs. For them, traditional OpenGL, with the driver handling a greater part of the workload, could be the better fit.

In this sense Vulkan isn't the next version of OpenGL but an alternative to go up against similar "closer to the metal" graphics systems like AMDs Mantle, Microsoft's DirectX 12 and Apple's Metal. Vulkan has the advantage that it isn't tied to a particular OS or hardware. 

vulcanlogo

 

More Information

Khronos Group

Vulkan Overview pdf

Related Articles

Calling Graphics Devs - Help Name Next Gen Open GL 

OpenGL 4.5 Announced And Microsoft Joins In 

Updates to OpenGL and OpenCL

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

Banner


Gender Differences In Coding Style
13/11/2024

A novel investigation into the gender gap between men and women regarding coding ability was undertaken by Dr Siân Brooke. Her conclusion? There is a difference in the Python code [ ... ]



Raspberry Pi CM5 - Expensive And Undocumented
27/11/2024

So the unexpected has happened - the Compute Module 5 has been launched. But it simply emphasises some problems with adopting the Pi as an IoT device.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 03 March 2015 )