Calibration#
This section documents how to use the calibration data enabled by the VK_NV_private_vendor_info
extension. This calibration data can be passed to the Vulkan SC implementation using the VK_EXT_application_parameters
extension.
The application parameters that can be set in this implementation are defined in the copy of the Vulkan SC Specification provided in nv-driveos-<PLATFORM>-vksc-dev-<VERSION>.deb
(where <PLATFORM>
is either qnx
or linux
, and <VERSION>
is a version identifier for the SDK).
The default values for the calibration data are expected to be sufficient for most applications, but these values may nonetheless be overridden by application developers. In practice, we expect this to happen under rare circumstances where there might be a need to tweak one or more of these values during application development for debugging or testing purposes.
Miscalibration of these values may lead to undesirable behavior. Some of these values are timeout values or otherwise impact performance; others will directly determine memory consumption. In general, we advise against releasing to production any application that uses calibration data values other than the defaults.
In the event that you believe it is necessary to override the calibration data in a production application, we recommend requesting a review of your Vulkan SC calibration data set by NVIDIA’s Vulkan SC team.
The Vulkan SC implementation only validates calibration data for plausibility to ensure each value falls within the legal range. It is the application’s responsibliity to ensure the calibration data’s integrity.
Example: Setting Calibration Data#
The calibration data for a GPU device is specified when creating a VkInstance
using vkCreateInstance
. A separate VkApplicationParameterEXT
structure must be chained to the VkApplicationInfo
parameter of the VkInstanceCreateInfo
structure for each Calibration Data value being set.
For example, if you were setting two Calibration Data values, you could chain two VkApplicationParameterEXT
structures to a VkApplicationInfo
as follows:
VkApplicationParametersEXT appParams[2]{};
appParams[1].sType = VK_STRUCTURE_TYPE_APPLICATION_PARAMETERS_EXT;
appParams[1].vendorID = 0x10de; // NVIDIA PCI Vendor ID
appParams[1].deviceID = 0; // All NVIDIA physical devices
appParams[1].key = VK_APPLICATION_PARAMETER_KEY_PUSHBUF_SIZE_NV;
appParams[1].value = 64*1024U; // The minimum value for Pushbuffer Size
appParams[1].pNext = nullptr;
appParams[0].sType = VK_STRUCTURE_TYPE_APPLICATION_PARAMETERS_EXT;
appParams[0].vendorID = 0x10de; // NVIDIA PCI Vendor ID
appParams[0].deviceID = 0; // All NVIDIA physical devices
appParams[0].key = VK_APPLICATION_PARAMETER_KEY_VKSC_GPFIFO_SIZE_NV;
appParams[0].value = 1536U; // The minimum recommended value for GPFIFO Size
appParams[0].pNext = &appParams[1];
VkApplicationInfo appInfo{};
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
appInfo.pNext = &appParams[0];
// Fill out the rest of the appInfo fields
Note
While the VkApplicationParametersEXT
structure can be chained to the VkDeviceCreateInfo
structure when creating a VkDevice
using vkCreateDevice
, none of the calibration data keys defined for this implementation are a parameter of VkDevice
.
For more information on using the Vulkan SC API, refer to the included copy of the Vulkan SC Specification.