XeSS-SR SDK API Reference Guide 2.0.2
Loading...
Searching...
No Matches
XeSS VK API exports

Functions

XESS_API xess_result_t xessVKGetRequiredInstanceExtensions (uint32_t *instanceExtensionsCount, const char *const **instanceExtensions, uint32_t *minVkApiVersion)
 Get required extensions for Vulkan instance that would run XeSS. This function must be called to get instance extensions need by XeSS. These extensions must be enabled in subsequent vkCreateInstance call, that would create a VkInstance object to be passed to xessVKCreateContext.
XESS_API xess_result_t xessVKGetRequiredDeviceExtensions (VkInstance instance, VkPhysicalDevice physicalDevice, uint32_t *deviceExtensionsCount, const char *const **deviceExtensions)
 Get required extensions for Vulkan device that would run XeSS. This function must be called to get device extensions need by XeSS. These extensions must be enabled in subsequent vkCreateDevice call, that would create a VkDevice object to be passed to xessVKCreateContext.
XESS_API xess_result_t xessVKGetRequiredDeviceFeatures (VkInstance instance, VkPhysicalDevice physicalDevice, void **features)
 Get required features for Vulkan device that would run XeSS. This function must be called to get device features need by XeSS. These features must be enabled in subsequent vkCreateDevice call, that would create a VkDevice object to be passed to xessVKCreateContext.
XESS_API xess_result_t xessVKCreateContext (VkInstance instance, VkPhysicalDevice physicalDevice, VkDevice device, xess_context_handle_t *phContext)
 Create an XeSS VK context.
XESS_API xess_result_t xessVKBuildPipelines (xess_context_handle_t hContext, VkPipelineCache pipelineCache, bool blocking, uint32_t initFlags)
 Initiates pipeline build process This function can only be called between xessVKCreateContext and xessVKInit This call initiates build of Vulkan pipelines and kernel compilation This call can be blocking (if blocking set to true) or non-blocking. In case of non-blocking call library will wait for pipeline build on call to xessVKInit If pipelineCache passed to this call - same pipeline library must be passed to xessVKInit.
XESS_API xess_result_t xessVKInit (xess_context_handle_t hContext, const xess_vk_init_params_t *pInitParams)
 Initialize XeSS VK. This is a blocking call that initializes XeSS and triggers internal resources allocation and JIT for the XeSS kernels. The user must ensure that any pending command lists are completed before re-initialization. When During initialization, XeSS can create staging buffers and copy queues to upload internal data. These will be destroyed at the end of initialization.
XESS_API xess_result_t xessVKGetInitParams (xess_context_handle_t hContext, xess_vk_init_params_t *pInitParams)
 Get XeSS VK initialization parameters.
XESS_API xess_result_t xessVKExecute (xess_context_handle_t hContext, VkCommandBuffer commandBuffer, const xess_vk_execute_params_t *pExecParams)
 Record XeSS upscaling commands into the command list.

Detailed Description

Function Documentation

◆ xessVKBuildPipelines()

XESS_API xess_result_t xessVKBuildPipelines ( xess_context_handle_t hContext,
VkPipelineCache pipelineCache,
bool blocking,
uint32_t initFlags )

Initiates pipeline build process This function can only be called between xessVKCreateContext and xessVKInit This call initiates build of Vulkan pipelines and kernel compilation This call can be blocking (if blocking set to true) or non-blocking. In case of non-blocking call library will wait for pipeline build on call to xessVKInit If pipelineCache passed to this call - same pipeline library must be passed to xessVKInit.

Parameters
hContextThe XeSS context handle.
pipelineCacheOptional pointer to pipeline library for pipeline caching.
blockingWait for kernel compilation and pipeline creation to finish or not
initFlagsInitialization flags. Must be identical to flags passed to xessVKInit

◆ xessVKCreateContext()

XESS_API xess_result_t xessVKCreateContext ( VkInstance instance,
VkPhysicalDevice physicalDevice,
VkDevice device,
xess_context_handle_t * phContext )

Create an XeSS VK context.

Parameters
instanceA VkInstance object created by the user
physicalDeviceA VkPhysicalDevice selected by the user from instance
deviceA VK device created by the user from physicalDevice
[out]phContextReturned xess context handle.
Returns
XeSS return status code.

◆ xessVKExecute()

XESS_API xess_result_t xessVKExecute ( xess_context_handle_t hContext,
VkCommandBuffer commandBuffer,
const xess_vk_execute_params_t * pExecParams )

Record XeSS upscaling commands into the command list.

Parameters
hContextThe XeSS context handle.
commandBufferThe command bufgfer for XeSS commands.
pExecParamsExecution parameters.
Returns
XeSS return status code.

◆ xessVKGetInitParams()

XESS_API xess_result_t xessVKGetInitParams ( xess_context_handle_t hContext,
xess_vk_init_params_t * pInitParams )

Get XeSS VK initialization parameters.

Note
This function will return XESS_RESULT_ERROR_UNINITIALIZED if xessVKInit has not been called.
Parameters
hContextThe XeSS context handle.
[out]pInitParamsReturned initialization parameters.
Returns
XeSS return status code.

◆ xessVKGetRequiredDeviceExtensions()

XESS_API xess_result_t xessVKGetRequiredDeviceExtensions ( VkInstance instance,
VkPhysicalDevice physicalDevice,
uint32_t * deviceExtensionsCount,
const char *const ** deviceExtensions )

Get required extensions for Vulkan device that would run XeSS. This function must be called to get device extensions need by XeSS. These extensions must be enabled in subsequent vkCreateDevice call, that would create a VkDevice object to be passed to xessVKCreateContext.

Parameters
instanceA VkInstance object created by the user
physicalDeviceA VkPhysicalDevice selected by the user from instance
[out]deviceExtensionsCountreturns a count of device extensions to be enabled in Vulkan device
[out]deviceExtensionsreturns a pointer to an array of deviceExtensionsCount required extension names The memory used by the array is owned by the XeSS library and should not be freed by the application.
Returns
XeSS return status code.

◆ xessVKGetRequiredDeviceFeatures()

XESS_API xess_result_t xessVKGetRequiredDeviceFeatures ( VkInstance instance,
VkPhysicalDevice physicalDevice,
void ** features )

Get required features for Vulkan device that would run XeSS. This function must be called to get device features need by XeSS. These features must be enabled in subsequent vkCreateDevice call, that would create a VkDevice object to be passed to xessVKCreateContext.

Parameters
instanceA VkInstance object created by the user
physicalDeviceA VkPhysicalDevice selected by the user from instance
[out]featuresa pointer to writable chain of feature structures, that this function would patch with required features, by filling required fields and attaching new structures to the chain if needed. The returned pointer should be passed to vkCreateDevice as pNext chain of VkDeviceCreateInfo structure. If null is passed, than the function constructs a new structure chain that should be merged into the chain that application would use with VkDeviceCreateInfo, with application responsibility to avoid any duplicates with its own structures.

It is an error to chain VkDeviceCreateInfo structure with not null pEnabledFeatures field, as this field is const and cannot be patched by this function. VkPhysicalDeviceFeatures2 structure should be used instead.

The memory used by the structures added by this funtion to the chain is owned by the XeSS library and should not be freed by the application.

Returns
XeSS return status code.

◆ xessVKGetRequiredInstanceExtensions()

XESS_API xess_result_t xessVKGetRequiredInstanceExtensions ( uint32_t * instanceExtensionsCount,
const char *const ** instanceExtensions,
uint32_t * minVkApiVersion )

Get required extensions for Vulkan instance that would run XeSS. This function must be called to get instance extensions need by XeSS. These extensions must be enabled in subsequent vkCreateInstance call, that would create a VkInstance object to be passed to xessVKCreateContext.

Parameters
[out]instanceExtensionsCountreturns a count of instance extensions to be enabled in Vulkan instance
[out]instanceExtensionsreturns a pointer to an array of instanceExtensionsCount required extension names. The memory used by the array is owned by the XeSS library and should not be freed by the application.
[out]minVkApiVersionThe Vulkan API version that XeSS would use. When calling vkCreateInstance, the application should set VkApplicationInfo.apiVersion to value greater or equal to minVkApiVersion
Returns
XeSS return status code.

◆ xessVKInit()

XESS_API xess_result_t xessVKInit ( xess_context_handle_t hContext,
const xess_vk_init_params_t * pInitParams )

Initialize XeSS VK. This is a blocking call that initializes XeSS and triggers internal resources allocation and JIT for the XeSS kernels. The user must ensure that any pending command lists are completed before re-initialization. When During initialization, XeSS can create staging buffers and copy queues to upload internal data. These will be destroyed at the end of initialization.

Note
XeSS supports devices starting from VK_RESOURCE_HEAP_TIER_1, which means that buffers and textures can not live in the same resource heap.
Parameters
hContextThe XeSS context handle.
pInitParamsInitialization parameters.
Returns
XeSS return status code.