Khronos Group Unveils New Open-Ended Vulkan Extension To Eliminate The Need For Pipelines

Khronos Group Unveils New Open-Ended Vulkan Extension To Eliminate The Need For Pipelines

 0
Khronos Group Unveils New Open-Ended Vulkan Extension To Eliminate The Need For Pipelines
Khronos Group Unveils New Open-Ended Vulkan Extension To Eliminate The Need For Pipelines 1

The Khronos Group revealed earlier this week that the Vulkan extension would permit multiple vendors an attempt to allow access to easily manage how software can "specify shaders and shader states." The new extension is changed to VK_EXT_shader_object, which will introduce "a new VkShaderEXT object type representing a single compiled shader stage," The company will add four new functions to use and adjust objects in the new Vulkan extension.

The dropping of pipelines for the Vulkan extension allows for more flexibility and simplicity when using shader objects, allowing vendors to choose to utilize only pipelines, shader objects, or a combination of both for each project.

Shader objects work in different ways than pipelines in that:

  • Pipelines require every desired combination of shaders (all stages when using conventional "monolithic" pipelines or certain pre-defined combinations of stages when using pipeline libraries) to be compiled together. In contrast, shader objects allow stages to be assembled in arbitrary combinations, including compiling every shader individually.
  • With pipelines, linking is an explicit step that creates a new object with its own life that needs to be managed by the application. With shader objects, linking is simply a creation-time promise from the application to the implementation that it will always use specific combinations of shader objects.
  • Pipelines must always be linked before use, whereas linking shader objects is optional.
  • Pipelines allow implementations to require some state to be statically provided at compile time, whereas with shader objects, all states are always set dynamically and are independent of shaders.
  • Pipelines require rendering attachment formats specified at pipeline creation time, whereas shader objects don't. Shader objects can be used with any valid combination of attachment formats supported by the device.
  • With pipelines, the application can retrieve and reuse the compiled shader code as a pipeline cache, but this data is not used to create new pipelines. With shader objects, compiled shader code can be retrieved directly from any shader object and is guaranteed to be used to create an equivalent shader object on any compatible physical device without the need to provide the original SPIR-V.
  • Khronos assures that implementing the Vulkan extension into a project will not hinder the project's performance. This is due to shader objects being more optimized than pipelines when it comes to affecting the processor and is negligible in negatively affecting the GPU. The company also notes that "CPU performance improvements from simpler application code using shader object APIs can outperform equivalent application code redesigned to use pipelines by enough that the performance improvements in the application outweigh the cost of extra implementation overhead."

    Specific requirements of performance have been met by incorporating the VK_EXT_shader_object implementation:

  • Draw calls using shader objects must not take more than 150% of the CPU time of draw calls using fully static graphics pipelines
  • Draw calls using shader objects must not take more than 120% of the CPU time of draw calls using maximally dynamic graphics pipelines
  • Dispatch calls using compute shader objects must not be measurably slower than dispatch calls using compute pipelines
  • Creating a shader object from binary shader code must not take more than 150% of the CPU time of the cost of copying an equivalent amount of data into the device's local memory
  • The company anticipates that the new Vulkan extension will begin to see widespread adoption, which will help growth and allow for more improvements and additions over time. NVIDIA has a beta version of the new VK_EXT_shader_object in their latest driver on NVIDIA's Developer site. Khronos has also added a new layer implementing the support on existing drivers as the latest update from the Vulkan-ExtensionLayer repository, with binary builds shipping as an inclusion of the Vulkan SDK when the next release ships.

    You can find more information on implementation and support on the Vulkan specification page.

    News Sources: NVIDIA Developer blog, Khronos Group Github

    What's Your Reaction?

    like

    dislike

    love

    funny

    angry

    sad

    wow