![]() |
XeSS-FG SDK API Reference Guide 1.3.1
|
Enumerations | |
| enum | xefg_swapchain_ui_composition_state_t { XEFG_SWAPCHAIN_UI_COMPOSITION_STATE_DISABLED , XEFG_SWAPCHAIN_UI_COMPOSITION_STATE_ENABLED } |
| Controls whether UI composition is enabled or disabled. More... | |
Functions | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainGetVersion (xefg_swapchain_version_t *pVersion) |
| Gets the XeSS-FG Swap Chain version. This is baked into the XeSS-FG Swap Chain SDK release. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainGetProperties (xefg_swapchain_handle_t hSwapChain, xefg_swapchain_properties_t *pProperties) |
| Retrieves various XeSS-FG Swap Chain properties. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainTagFrameConstants (xefg_swapchain_handle_t hSwapChain, uint32_t presentId, const xefg_swapchain_frame_constant_data_t *pConstants) |
| Informs the XeSS-FG swap chain library of the frame constants used to generate a frame that will be presented. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainSetEnabled (xefg_swapchain_handle_t hSwapChain, uint32_t enable) |
| Enables or disables the generation and presentation of interpolated frames by the XeSS-FG swap chain library. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainSetPresentId (xefg_swapchain_handle_t hSwapChain, uint32_t presentId) |
| Informs the XeSS-FG swap chain library of the unique identifier of the next frame to be presented. This allows the application to provide to the swap chain library frames data out-of-order with regard to the presentation. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainGetLastPresentStatus (xefg_swapchain_handle_t hSwapChain, xefg_swapchain_present_status_t *pPresentStatus) |
| This function allows you to retrieve status information from the last present. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainSetLoggingCallback (xefg_swapchain_handle_t hSwapChain, xefg_swapchain_logging_level_t loggingLevel, xefg_swapchain_app_log_callback_t loggingCallback, void *userData) |
| Sets logging callback. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainDestroy (xefg_swapchain_handle_t hSwapChain) |
| Destroys a XeSS-FG Swap Chain context data. DXGI swap chain object will be released as soon as reference count reaches 0, so it's recommended to release all outstanding references before calling this function. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainSetLatencyReduction (xefg_swapchain_handle_t hSwapChain, void *hXeLLContext) |
| Sets XeLL context for latency reduction. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainSetSceneChangeThreshold (xefg_swapchain_handle_t hSwapChain, float threshold) |
| Sets scene change detection threshold. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainGetPipelineBuildStatus (xefg_swapchain_handle_t hSwapChain) |
| Returns current state of the pipeline build. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainSetNumInterpolatedFrames (xefg_swapchain_handle_t hSwapChain, uint32_t numInterpolatedFrames) |
| Adjust the number of interpolated frames after initialization. | |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t | xefgSwapChainSetUiCompositionState (xefg_swapchain_handle_t hSwapChain, xefg_swapchain_ui_composition_state_t state) |
| Enable or disable UI composition. | |
The XeSS-FG Swap Chain API is used by applications to generate frames when the application does not choose to be responsible for the in-order presentation of the generated frames. This utils API wraps the IDXGISwapChain and makes calls on behalf of the application to the underlying XeSS-FG API.
Controls whether UI composition is enabled or disabled.
| Enumerator | |
|---|---|
| XEFG_SWAPCHAIN_UI_COMPOSITION_STATE_DISABLED | |
| XEFG_SWAPCHAIN_UI_COMPOSITION_STATE_ENABLED | |
Definition at line 492 of file xefg_swapchain.h.
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainDestroy | ( | xefg_swapchain_handle_t | hSwapChain | ) |
Destroys a XeSS-FG Swap Chain context data. DXGI swap chain object will be released as soon as reference count reaches 0, so it's recommended to release all outstanding references before calling this function.
| hSwapChain | The XeSS-FG Swap Chain context handle. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainGetLastPresentStatus | ( | xefg_swapchain_handle_t | hSwapChain, |
| xefg_swapchain_present_status_t * | pPresentStatus ) |
This function allows you to retrieve status information from the last present.
| hSwapChain | The XeSS-FG Swap Chain context handle. | |
| [out] | pPresentStatus | A pointer to the xefg_swapchain_present_status_t structure where the values should be returned. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainGetPipelineBuildStatus | ( | xefg_swapchain_handle_t | hSwapChain | ) |
Returns current state of the pipeline build.
This function can only be called after xefgSwapChainD3D12BuildPipelines but before XeSS-FG swap chain initialization (xefgSwapChainD3D12InitFromSwapChain or xefgSwapChainD3D12InitFromSwapChainDesc).
| hSwapChain | The XeSS-FG Swap Chain context handle. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainGetProperties | ( | xefg_swapchain_handle_t | hSwapChain, |
| xefg_swapchain_properties_t * | pProperties ) |
Retrieves various XeSS-FG Swap Chain properties.
If you need to query the required heap sizes and the descriptor count before the proxy swap chain initialization, use xefgSwapChainD3D12GetProperties.
| hSwapChain | The XeSS-FG Swap Chain context handle. | |
| [out] | pProperties | A pointer to the xefg_swapchain_properties_t structure where the values should be returned. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainGetVersion | ( | xefg_swapchain_version_t * | pVersion | ) |
Gets the XeSS-FG Swap Chain version. This is baked into the XeSS-FG Swap Chain SDK release.
| [out] | pVersion | Returned XeSS-FG Swap Chain version. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainSetEnabled | ( | xefg_swapchain_handle_t | hSwapChain, |
| uint32_t | enable ) |
Enables or disables the generation and presentation of interpolated frames by the XeSS-FG swap chain library.
| hSwapChain | The XeSS-FG Swap Chain context handle. |
| enable | Non-zero to enable interpolation, zero to disable it. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainSetLatencyReduction | ( | xefg_swapchain_handle_t | hSwapChain, |
| void * | hXeLLContext ) |
Sets XeLL context for latency reduction.
| hSwapChain | The XeSS-FG Swap Chain context handle. |
| hXeLLContext | The Xe Low Latency context. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainSetLoggingCallback | ( | xefg_swapchain_handle_t | hSwapChain, |
| xefg_swapchain_logging_level_t | loggingLevel, | ||
| xefg_swapchain_app_log_callback_t | loggingCallback, | ||
| void * | userData ) |
Sets logging callback.
| hSwapChain | The XeSS-FG Swap Chain context handle. |
| loggingLevel | Minimum logging level for logging callback. |
| loggingCallback | Logging callback. |
| userData | User data that will be passed unchanged to the callback when invoked. Can be set to NULL. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainSetNumInterpolatedFrames | ( | xefg_swapchain_handle_t | hSwapChain, |
| uint32_t | numInterpolatedFrames ) |
Adjust the number of interpolated frames after initialization.
By default, XeSS-FG swap chain will produce the maximum number of interpolated frames specified during initialization. Use this function to change the number of interpolated frames without reinitializing the swap chain.
The number of interpolated frames must be between 1 and the maximum provided during swap chain initialization, otherwise the function returns XEFG_SWAPCHAIN_RESULT_ERROR_INVALID_ARGUMENT.
Performance Note: Avoid frequent calls to this function, as changing the number of interpolated frames may trigger shader compilation and reallocation of internal resources.
Error Handling: If this function fails for any reason other than XEFG_SWAPCHAIN_RESULT_ERROR_INVALID_ARGUMENT, reinitialize the swap chain (this is rare). Ignoring such errors may lead to unexpected behavior. On non-argument errors, XeSS-FG automatically disables frame generation to keep the swap chain operational (e.g., it can still display error messages).
Thread-Safety: This function is not thread-safe with regard to calls to xefgSwapChainD3D12InitFromSwapChain, xefgSwapChainD3D12InitFromSwapChainDesc, and xefgSwapChainDestroy. Do not call xefgSwapChainSetNumInterpolatedFrames if another thread might be initializing or destroying the swap chain.
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainSetPresentId | ( | xefg_swapchain_handle_t | hSwapChain, |
| uint32_t | presentId ) |
Informs the XeSS-FG swap chain library of the unique identifier of the next frame to be presented. This allows the application to provide to the swap chain library frames data out-of-order with regard to the presentation.
| hSwapChain | The XeSS-FG Swap Chain context handle. |
| presentId | The unique identifier of the frame to be presented by the next IDXGISwapChain::Present call. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainSetSceneChangeThreshold | ( | xefg_swapchain_handle_t | hSwapChain, |
| float | threshold ) |
Sets scene change detection threshold.
A higher threshold value increases the algorithm's sensitivity, causing it to more readily identify scene changes and disable interpolation. A lower threshold value decreases sensitivity, making the algorithm less likely to respond to minor changes. The threshold value range is from 0 to 1, where 0 represents the least sensitivity to scene changes, and 1 represents the highest sensitivity.
| hSwapChain | The XeSS-FG Swap Chain context handle. |
| threshold | Scene change detection threshold value. Default value is 0.7. |
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainSetUiCompositionState | ( | xefg_swapchain_handle_t | hSwapChain, |
| xefg_swapchain_ui_composition_state_t | state ) |
Enable or disable UI composition.
If UI composition is disabled, UI mode will have no effect.
Setting UI mode to XEFG_SWAPCHAIN_UI_MODE_NONE and enabling UI composition is the same as disabling UI composition.
| XEFG_SWAPCHAIN_API xefg_swapchain_result_t xefgSwapChainTagFrameConstants | ( | xefg_swapchain_handle_t | hSwapChain, |
| uint32_t | presentId, | ||
| const xefg_swapchain_frame_constant_data_t * | pConstants ) |
Informs the XeSS-FG swap chain library of the frame constants used to generate a frame that will be presented.
| hSwapChain | The XeSS-FG Swap Chain context handle. |
| presentId | The unique frame identifier. |
| pConstants | A pointer to the memory location where the values for the constants are located. |