LunarG updates the GPU-Assisted Validation white paper to reflect new validation available for situations when the VK_EXT_descriptor_indexing extension is enabled. LunarG originally released GPU-Assisted validation with the Vulkan 22.214.171.124 SDK. Read on for more information about this new validation and its description in the updated LunarG GPU-Assisted Validation white paper.
The Vulkan validation layers perform a variety of API usage checks during application execution. These checks verify that the application is using the API correctly by performing stateless parameter checking, object lifetime tracking, object state validation, and various other checks. The layers 1) perform these checks on the CPU as the Vulkan application executes and 2) provide valuable information about Vulkan API usage to the developer.
However, much of an application’s activity is on the GPU, where the CPU-based validation layers have little visibility. The new white paper explains the concept of GPU-assisted validation and how a developer can use it.
What is GPU-Assisted Validation?
GPU-assisted validation (or GPU-AV) involves using the GPU to check for API usage errors at shader execution time. These on-GPU checks can’t always find general shader program logic errors but can detect certain run-time problems like out-of-bounds (OOB) indexing into descriptor arrays and accessing invalid descriptors.
This feature’s design is intended to allow the developer to use nearly the same validation layer workflow on the GPU as on the CPU. This white paper discusses the types of GPU-assisted validation that have been implemented in a validation layer.
Phase 2 of GPU-Assisted Validation
LunarG designed the second phase of GPU-assisted validation to address validation when various descriptor indexing features are enabled. Descriptor indexing allows for various scenarios that can be difficult to validate on the CPU:
- The sizes of descriptor arrays can be determined at runtime rather than at shader compile time (runtimeDescriptorArray)
- An array at the last (highest) binding point can have a variable descriptor count from set to set (descriptorBindingVariableDescriptorCount)
- A descriptor can be partially bound and only those elements accessed by the shader need to have been written (descriptorBindingPartiallyBound)
- Descriptors can be written after the descriptor set has been bound, but before the command buffer is submitted to a queue (descriptorBindingSampledImageUpdateAfterBind)
Phase 2 GPU-AV supplies out of bound descriptor array indexing checks in each of these cases. It also detects use of an element that has not been written by creating an input buffer — from the perspective of the instrumented code on the GPU — in device memory to describe the sizes of each descriptor as well as the write state of all of the descriptor’s elements. The GPU code can then see which elements are accessed and report any violations of indexing or use of an unwritten element.
GPU-assisted validation work is not complete. Look for future updates to LunarG’s GPU-Assisted Validation feature and the LunarG GPU-Assisted Validation white paper.
Info about LunarG, Inc.
LunarG’s software engineering experts create software solutions for open source and commercial customers using leading-edge 3D graphics and compute technologies, including Vulkan, OpenXR, SPIR-V, and OpenGL. We have strengths in performance analysis and tuning, runtime and tools development, shader optimizations, driver development, new feature development, and porting engines and applications to Vulkan. Our software engineering team is based in Fort Collins, Colorado. LunarG was founded by software experts who are passionate about 3D graphics.
For more information about LunarG, check out our website.