Validation Layer
To avoid generating faults, each application must comply with all must statements in the Vulkan SC Specification intended for users of the Vulkan SC API. This includes but is not limited to statements concerning:
- Object lifetime
- Threading behavior
- Externally synchronized parameters
- Host synchronization
- Valid usage
To accomplish this compliance, developers should test their applications of Vulkan
SC during development using the Khronos Vulkan validation layer for Vulkan SC, which
NVIDIA has approved for use with this product. The name of the layer is
VK_LAYER_KHRONOS_validation
. This practice ensures that all API
parameters follow the valid usage statements in the Vulkan SC Specification, and do not
generate validation errors.
As rationale, the NVIDIA Vulkan SC library does not check
all valid usage statements during operation. This is for reasons of run-time
efficiency and to reduce code complexity. The
VK_LAYER_KHRONOS_validation
layer, when installed and enabled,
logs violations of these valid usage statements via
VK_EXT_debug_utils
extension message callback. Developers
should correct their API usage during development to prevent messages of error and
warning severity. The Vulkan SC Specification at Fault and Error Handling
also recommends use of validation layers during application development.
In an
NVIDIA DRIVE? OS SDK installation, vksc-ecosystem packages
distribute the Khronos Vulkan validation layer for use with Vulkan SC. The Platforms
DRIVE? OS QNX Standard and DRIVE? OS Linux
Standard support the validation layer. The vksc-ecosystem package is named with
pattern nv-driveos-<PLATFORM>-vksc-ecosystem-<VERSION>.deb
,
where <PLATFORM>
is either qnx
or
linux
and <VERSION>
is a version identifier
for the SDK. The validation layer is provided as a source archive and also as a
pre-built binary for aarch64 ISA. The vksc-ecosystem packages also distribute the
loader library with file name libvulkansc.so
and its source
archive. The validation layer is deployed as a library with file name
libVkSCLayer_khronos_validation.so
. With the vksc-ecosystem
package, the validation layer is installed on the target filesystem under
/usr/lib/
on Linux and its JSON manifest is
installed to /etc/vulkansc/icd.d/VkSCLayer_khronos_validation.json
.
There is source archive and documentation at
<NV_WORKSPACE>/drive-<PLATFORM>/vulkansc/ecosystem/vulkan-sc-layers/validation_layers/
,
where <NV_WORKSPACE>
is local path to the DRIVE OS SDK
installation, and <PLATFORM>
is qnx
or
linux
.