// This file is part of the FidelityFX SDK.1//2// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved.3//4// Permission is hereby granted, free of charge, to any person obtaining a copy5// of this software and associated documentation files (the "Software"), to deal6// in the Software without restriction, including without limitation the rights7// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell8// copies of the Software, and to permit persons to whom the Software is9// furnished to do so, subject to the following conditions:10// The above copyright notice and this permission notice shall be included in11// all copies or substantial portions of the Software.12//13// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE16// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER17// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,18// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN19// THE SOFTWARE.202122// @defgroup FSR22324#pragma once2526// Include the interface for the backend of the FSR2 API.27#include "ffx_fsr2_interface.h"2829/// FidelityFX Super Resolution 2 major version.30///31/// @ingroup FSR232#define FFX_FSR2_VERSION_MAJOR (2)3334/// FidelityFX Super Resolution 2 minor version.35///36/// @ingroup FSR237#define FFX_FSR2_VERSION_MINOR (2)3839/// FidelityFX Super Resolution 2 patch version.40///41/// @ingroup FSR242#define FFX_FSR2_VERSION_PATCH (1)4344/// The size of the context specified in 32bit values.45///46/// @ingroup FSR247#define FFX_FSR2_CONTEXT_SIZE (16536)4849#if defined(__cplusplus)50extern "C" {51#endif // #if defined(__cplusplus)5253/// An enumeration of all the quality modes supported by FidelityFX Super54/// Resolution 2 upscaling.55///56/// In order to provide a consistent user experience across multiple57/// applications which implement FSR2. It is strongly recommended that the58/// following preset scaling factors are made available through your59/// application's user interface.60///61/// If your application does not expose the notion of preset scaling factors62/// for upscaling algorithms (perhaps instead implementing a fixed ratio which63/// is immutable) or implementing a more dynamic scaling scheme (such as64/// dynamic resolution scaling), then there is no need to use these presets.65///66/// Please note that <c><i>FFX_FSR2_QUALITY_MODE_ULTRA_PERFORMANCE</i></c> is67/// an optional mode which may introduce significant quality degradation in the68/// final image. As such it is recommended that you evaluate the final results69/// of using this scaling mode before deciding if you should include it in your70/// application.71///72/// @ingroup FSR273typedef enum FfxFsr2QualityMode {7475FFX_FSR2_QUALITY_MODE_QUALITY = 1, ///< Perform upscaling with a per-dimension upscaling ratio of 1.5x.76FFX_FSR2_QUALITY_MODE_BALANCED = 2, ///< Perform upscaling with a per-dimension upscaling ratio of 1.7x.77FFX_FSR2_QUALITY_MODE_PERFORMANCE = 3, ///< Perform upscaling with a per-dimension upscaling ratio of 2.0x.78FFX_FSR2_QUALITY_MODE_ULTRA_PERFORMANCE = 4 ///< Perform upscaling with a per-dimension upscaling ratio of 3.0x.79} FfxFsr2QualityMode;8081/// An enumeration of bit flags used when creating a82/// <c><i>FfxFsr2Context</i></c>. See <c><i>FfxFsr2ContextDescription</i></c>.83///84/// @ingroup FSR285typedef enum FfxFsr2InitializationFlagBits {8687FFX_FSR2_ENABLE_HIGH_DYNAMIC_RANGE = (1<<0), ///< A bit indicating if the input color data provided is using a high-dynamic range.88FFX_FSR2_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS = (1<<1), ///< A bit indicating if the motion vectors are rendered at display resolution.89FFX_FSR2_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION = (1<<2), ///< A bit indicating that the motion vectors have the jittering pattern applied to them.90FFX_FSR2_ENABLE_DEPTH_INVERTED = (1<<3), ///< A bit indicating that the input depth buffer data provided is inverted [1..0].91FFX_FSR2_ENABLE_DEPTH_INFINITE = (1<<4), ///< A bit indicating that the input depth buffer data provided is using an infinite far plane.92FFX_FSR2_ENABLE_AUTO_EXPOSURE = (1<<5), ///< A bit indicating if automatic exposure should be applied to input color data.93FFX_FSR2_ENABLE_DYNAMIC_RESOLUTION = (1<<6), ///< A bit indicating that the application uses dynamic resolution scaling.94FFX_FSR2_ENABLE_TEXTURE1D_USAGE = (1<<7), ///< A bit indicating that the backend should use 1D textures.95FFX_FSR2_ENABLE_DEBUG_CHECKING = (1<<8), ///< A bit indicating that the runtime should check some API values and report issues.96} FfxFsr2InitializationFlagBits;9798/// A structure encapsulating the parameters required to initialize FidelityFX99/// Super Resolution 2 upscaling.100///101/// @ingroup FSR2102typedef struct FfxFsr2ContextDescription {103104uint32_t flags; ///< A collection of <c><i>FfxFsr2InitializationFlagBits</i></c>.105FfxDimensions2D maxRenderSize; ///< The maximum size that rendering will be performed at.106FfxDimensions2D displaySize; ///< The size of the presentation resolution targeted by the upscaling process.107FfxFsr2Interface callbacks; ///< A set of pointers to the backend implementation for FSR 2.0.108FfxDevice device; ///< The abstracted device which is passed to some callback functions.109110FfxFsr2Message fpMessage; ///< A pointer to a function that can recieve messages from the runtime.111} FfxFsr2ContextDescription;112113/// A structure encapsulating the parameters for dispatching the various passes114/// of FidelityFX Super Resolution 2.115///116/// @ingroup FSR2117typedef struct FfxFsr2DispatchDescription {118119FfxCommandList commandList; ///< The <c><i>FfxCommandList</i></c> to record FSR2 rendering commands into.120FfxResource color; ///< A <c><i>FfxResource</i></c> containing the color buffer for the current frame (at render resolution).121FfxResource depth; ///< A <c><i>FfxResource</i></c> containing 32bit depth values for the current frame (at render resolution).122FfxResource motionVectors; ///< A <c><i>FfxResource</i></c> containing 2-dimensional motion vectors (at render resolution if <c><i>FFX_FSR2_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS</i></c> is not set).123FfxResource exposure; ///< A optional <c><i>FfxResource</i></c> containing a 1x1 exposure value.124FfxResource reactive; ///< A optional <c><i>FfxResource</i></c> containing alpha value of reactive objects in the scene.125FfxResource transparencyAndComposition; ///< A optional <c><i>FfxResource</i></c> containing alpha value of special objects in the scene.126FfxResource output; ///< A <c><i>FfxResource</i></c> containing the output color buffer for the current frame (at presentation resolution).127FfxFloatCoords2D jitterOffset; ///< The subpixel jitter offset applied to the camera.128FfxFloatCoords2D motionVectorScale; ///< The scale factor to apply to motion vectors.129FfxDimensions2D renderSize; ///< The resolution that was used for rendering the input resources.130bool enableSharpening; ///< Enable an additional sharpening pass.131float sharpness; ///< The sharpness value between 0 and 1, where 0 is no additional sharpness and 1 is maximum additional sharpness.132float frameTimeDelta; ///< The time elapsed since the last frame (expressed in milliseconds).133float preExposure; ///< The pre exposure value (must be > 0.0f)134bool reset; ///< A boolean value which when set to true, indicates the camera has moved discontinuously.135float cameraNear; ///< The distance to the near plane of the camera.136float cameraFar; ///< The distance to the far plane of the camera.137float cameraFovAngleVertical; ///< The camera angle field of view in the vertical direction (expressed in radians).138float viewSpaceToMetersFactor; ///< The scale factor to convert view space units to meters139140// EXPERIMENTAL reactive mask generation parameters141bool enableAutoReactive; ///< A boolean value to indicate internal reactive autogeneration should be used142FfxResource colorOpaqueOnly; ///< A <c><i>FfxResource</i></c> containing the opaque only color buffer for the current frame (at render resolution).143float autoTcThreshold; ///< Cutoff value for TC144float autoTcScale; ///< A value to scale the transparency and composition mask145float autoReactiveScale; ///< A value to scale the reactive mask146float autoReactiveMax; ///< A value to clamp the reactive mask147148float reprojectionMatrix[16]; ///< The matrix used for reprojecting pixels with invalid motion vectors by using the depth.149} FfxFsr2DispatchDescription;150151/// A structure encapsulating the parameters for automatic generation of a reactive mask152///153/// @ingroup FSR2154typedef struct FfxFsr2GenerateReactiveDescription {155156FfxCommandList commandList; ///< The <c><i>FfxCommandList</i></c> to record FSR2 rendering commands into.157FfxResource colorOpaqueOnly; ///< A <c><i>FfxResource</i></c> containing the opaque only color buffer for the current frame (at render resolution).158FfxResource colorPreUpscale; ///< A <c><i>FfxResource</i></c> containing the opaque+translucent color buffer for the current frame (at render resolution).159FfxResource outReactive; ///< A <c><i>FfxResource</i></c> containing the surface to generate the reactive mask into.160FfxDimensions2D renderSize; ///< The resolution that was used for rendering the input resources.161float scale; ///< A value to scale the output162float cutoffThreshold; ///< A threshold value to generate a binary reactive mask163float binaryValue; ///< A value to set for the binary reactive mask164uint32_t flags; ///< Flags to determine how to generate the reactive mask165} FfxFsr2GenerateReactiveDescription;166167/// A structure encapsulating the FidelityFX Super Resolution 2 context.168///169/// This sets up an object which contains all persistent internal data and170/// resources that are required by FSR2.171///172/// The <c><i>FfxFsr2Context</i></c> object should have a lifetime matching173/// your use of FSR2. Before destroying the FSR2 context care should be taken174/// to ensure the GPU is not accessing the resources created or used by FSR2.175/// It is therefore recommended that the GPU is idle before destroying the176/// FSR2 context.177///178/// @ingroup FSR2179typedef struct FfxFsr2Context {180181uint32_t data[FFX_FSR2_CONTEXT_SIZE]; ///< An opaque set of <c>uint32_t</c> which contain the data for the context.182} FfxFsr2Context;183184/// Create a FidelityFX Super Resolution 2 context from the parameters185/// programmed to the <c><i>FfxFsr2CreateParams</i></c> structure.186///187/// The context structure is the main object used to interact with the FSR2188/// API, and is responsible for the management of the internal resources used189/// by the FSR2 algorithm. When this API is called, multiple calls will be190/// made via the pointers contained in the <c><i>callbacks</i></c> structure.191/// These callbacks will attempt to retreive the device capabilities, and192/// create the internal resources, and pipelines required by FSR2's193/// frame-to-frame function. Depending on the precise configuration used when194/// creating the <c><i>FfxFsr2Context</i></c> a different set of resources and195/// pipelines might be requested via the callback functions.196///197/// The flags included in the <c><i>flags</i></c> field of198/// <c><i>FfxFsr2Context</i></c> how match the configuration of your199/// application as well as the intended use of FSR2. It is important that these200/// flags are set correctly (as well as a correct programmed201/// <c><i>FfxFsr2DispatchDescription</i></c>) to ensure correct operation. It is202/// recommended to consult the overview documentation for further details on203/// how FSR2 should be integerated into an application.204///205/// When the <c><i>FfxFsr2Context</i></c> is created, you should use the206/// <c><i>ffxFsr2ContextDispatch</i></c> function each frame where FSR2207/// upscaling should be applied. See the documentation of208/// <c><i>ffxFsr2ContextDispatch</i></c> for more details.209///210/// The <c><i>FfxFsr2Context</i></c> should be destroyed when use of it is211/// completed, typically when an application is unloaded or FSR2 upscaling is212/// disabled by a user. To destroy the FSR2 context you should call213/// <c><i>ffxFsr2ContextDestroy</i></c>.214///215/// @param [out] context A pointer to a <c><i>FfxFsr2Context</i></c> structure to populate.216/// @param [in] contextDescription A pointer to a <c><i>FfxFsr2ContextDescription</i></c> structure.217///218/// @retval219/// FFX_OK The operation completed successfully.220/// @retval221/// FFX_ERROR_CODE_NULL_POINTER The operation failed because either <c><i>context</i></c> or <c><i>contextDescription</i></c> was <c><i>NULL</i></c>.222/// @retval223/// FFX_ERROR_INCOMPLETE_INTERFACE The operation failed because the <c><i>FfxFsr2ContextDescription.callbacks</i></c> was not fully specified.224/// @retval225/// FFX_ERROR_BACKEND_API_ERROR The operation failed because of an error returned from the backend.226///227/// @ingroup FSR2228FFX_API FfxErrorCode ffxFsr2ContextCreate(FfxFsr2Context* context, const FfxFsr2ContextDescription* contextDescription);229230/// Dispatch the various passes that constitute FidelityFX Super Resolution 2.231///232/// FSR2 is a composite effect, meaning that it is compromised of multiple233/// constituent passes (implemented as one or more clears, copies and compute234/// dispatches). The <c><i>ffxFsr2ContextDispatch</i></c> function is the235/// function which (via the use of the functions contained in the236/// <c><i>callbacks</i></c> field of the <c><i>FfxFsr2Context</i></c>237/// structure) utlimately generates the sequence of graphics API calls required238/// each frame.239///240/// As with the creation of the <c><i>FfxFsr2Context</i></c> correctly241/// programming the <c><i>FfxFsr2DispatchDescription</i></c> is key to ensuring242/// the correct operation of FSR2. It is particularly important to ensure that243/// camera jitter is correctly applied to your application's projection matrix244/// (or camera origin for raytraced applications). FSR2 provides the245/// <c><i>ffxFsr2GetJitterPhaseCount</i></c> and246/// <c><i>ffxFsr2GetJitterOffset</i></c> entry points to help applications247/// correctly compute the camera jitter. Whatever jitter pattern is used by the248/// application it should be correctly programmed to the249/// <c><i>jitterOffset</i></c> field of the <c><i>dispatchDescription</i></c>250/// structure. For more guidance on camera jitter please consult the251/// documentation for <c><i>ffxFsr2GetJitterOffset</i></c> as well as the252/// accompanying overview documentation for FSR2.253///254/// @param [in] context A pointer to a <c><i>FfxFsr2Context</i></c> structure.255/// @param [in] dispatchDescription A pointer to a <c><i>FfxFsr2DispatchDescription</i></c> structure.256///257/// @retval258/// FFX_OK The operation completed successfully.259/// @retval260/// FFX_ERROR_CODE_NULL_POINTER The operation failed because either <c><i>context</i></c> or <c><i>dispatchDescription</i></c> was <c><i>NULL</i></c>.261/// @retval262/// FFX_ERROR_OUT_OF_RANGE The operation failed because <c><i>dispatchDescription.renderSize</i></c> was larger than the maximum render resolution.263/// @retval264/// FFX_ERROR_NULL_DEVICE The operation failed because the device inside the context was <c><i>NULL</i></c>.265/// @retval266/// FFX_ERROR_BACKEND_API_ERROR The operation failed because of an error returned from the backend.267///268/// @ingroup FSR2269FFX_API FfxErrorCode ffxFsr2ContextDispatch(FfxFsr2Context* context, const FfxFsr2DispatchDescription* dispatchDescription);270271/// A helper function generate a Reactive mask from an opaque only texure and one containing translucent objects.272///273/// @param [in] context A pointer to a <c><i>FfxFsr2Context</i></c> structure.274/// @param [in] params A pointer to a <c><i>FfxFsr2GenerateReactiveDescription</i></c> structure275///276/// @retval277/// FFX_OK The operation completed successfully.278///279/// @ingroup FSR2280FFX_API FfxErrorCode ffxFsr2ContextGenerateReactiveMask(FfxFsr2Context* context, const FfxFsr2GenerateReactiveDescription* params);281282/// Destroy the FidelityFX Super Resolution context.283///284/// @param [out] context A pointer to a <c><i>FfxFsr2Context</i></c> structure to destroy.285///286/// @retval287/// FFX_OK The operation completed successfully.288/// @retval289/// FFX_ERROR_CODE_NULL_POINTER The operation failed because either <c><i>context</i></c> was <c><i>NULL</i></c>.290///291/// @ingroup FSR2292FFX_API FfxErrorCode ffxFsr2ContextDestroy(FfxFsr2Context* context);293294/// Get the upscale ratio from the quality mode.295///296/// The following table enumerates the mapping of the quality modes to297/// per-dimension scaling ratios.298///299/// Quality preset | Scale factor300/// ----------------------------------------------------- | -------------301/// <c><i>FFX_FSR2_QUALITY_MODE_QUALITY</i></c> | 1.5x302/// <c><i>FFX_FSR2_QUALITY_MODE_BALANCED</i></c> | 1.7x303/// <c><i>FFX_FSR2_QUALITY_MODE_PERFORMANCE</i></c> | 2.0x304/// <c><i>FFX_FSR2_QUALITY_MODE_ULTRA_PERFORMANCE</i></c> | 3.0x305///306/// Passing an invalid <c><i>qualityMode</i></c> will return 0.0f.307///308/// @param [in] qualityMode The quality mode preset.309///310/// @returns311/// The upscaling the per-dimension upscaling ratio for312/// <c><i>qualityMode</i></c> according to the table above.313///314/// @ingroup FSR2315FFX_API float ffxFsr2GetUpscaleRatioFromQualityMode(FfxFsr2QualityMode qualityMode);316317/// A helper function to calculate the rendering resolution from a target318/// resolution and desired quality level.319///320/// This function applies the scaling factor returned by321/// <c><i>ffxFsr2GetUpscaleRatioFromQualityMode</i></c> to each dimension.322///323/// @param [out] renderWidth A pointer to a <c>uint32_t</c> which will hold the calculated render resolution width.324/// @param [out] renderHeight A pointer to a <c>uint32_t</c> which will hold the calculated render resolution height.325/// @param [in] displayWidth The target display resolution width.326/// @param [in] displayHeight The target display resolution height.327/// @param [in] qualityMode The desired quality mode for FSR 2 upscaling.328///329/// @retval330/// FFX_OK The operation completed successfully.331/// @retval332/// FFX_ERROR_INVALID_POINTER Either <c><i>renderWidth</i></c> or <c><i>renderHeight</i></c> was <c>NULL</c>.333/// @retval334/// FFX_ERROR_INVALID_ENUM An invalid quality mode was specified.335///336/// @ingroup FSR2337FFX_API FfxErrorCode ffxFsr2GetRenderResolutionFromQualityMode(338uint32_t* renderWidth,339uint32_t* renderHeight,340uint32_t displayWidth,341uint32_t displayHeight,342FfxFsr2QualityMode qualityMode);343344/// A helper function to calculate the jitter phase count from display345/// resolution.346///347/// For more detailed information about the application of camera jitter to348/// your application's rendering please refer to the349/// <c><i>ffxFsr2GetJitterOffset</i></c> function.350///351/// The table below shows the jitter phase count which this function352/// would return for each of the quality presets.353///354/// Quality preset | Scale factor | Phase count355/// ----------------------------------------------------- | ------------- | ---------------356/// <c><i>FFX_FSR2_QUALITY_MODE_QUALITY</i></c> | 1.5x | 18357/// <c><i>FFX_FSR2_QUALITY_MODE_BALANCED</i></c> | 1.7x | 23358/// <c><i>FFX_FSR2_QUALITY_MODE_PERFORMANCE</i></c> | 2.0x | 32359/// <c><i>FFX_FSR2_QUALITY_MODE_ULTRA_PERFORMANCE</i></c> | 3.0x | 72360/// Custom | [1..n]x | ceil(8*n^2)361///362/// @param [in] renderWidth The render resolution width.363/// @param [in] displayWidth The display resolution width.364///365/// @returns366/// The jitter phase count for the scaling factor between <c><i>renderWidth</i></c> and <c><i>displayWidth</i></c>.367///368/// @ingroup FSR2369FFX_API int32_t ffxFsr2GetJitterPhaseCount(int32_t renderWidth, int32_t displayWidth);370371/// A helper function to calculate the subpixel jitter offset.372///373/// FSR2 relies on the application to apply sub-pixel jittering while rendering.374/// This is typically included in the projection matrix of the camera. To make375/// the application of camera jitter simple, the FSR2 API provides a small set376/// of utility function which computes the sub-pixel jitter offset for a377/// particular frame within a sequence of separate jitter offsets. To begin, the378/// index within the jitter phase must be computed. To calculate the379/// sequence's length, you can call the <c><i>ffxFsr2GetJitterPhaseCount</i></c>380/// function. The index should be a value which is incremented each frame modulo381/// the length of the sequence computed by <c><i>ffxFsr2GetJitterPhaseCount</i></c>.382/// The index within the jitter phase is passed to383/// <c><i>ffxFsr2GetJitterOffset</i></c> via the <c><i>index</i></c> parameter.384///385/// This function uses a Halton(2,3) sequence to compute the jitter offset.386/// The ultimate index used for the sequence is <c><i>index</i></c> %387/// <c><i>phaseCount</i></c>.388///389/// It is important to understand that the values returned from the390/// <c><i>ffxFsr2GetJitterOffset</i></c> function are in unit pixel space, and391/// in order to composite this correctly into a projection matrix we must392/// convert them into projection offsets. This is done as per the pseudo code393/// listing which is shown below.394///395/// const int32_t jitterPhaseCount = ffxFsr2GetJitterPhaseCount(renderWidth, displayWidth);396///397/// float jitterX = 0;398/// float jitterY = 0;399/// ffxFsr2GetJitterOffset(&jitterX, &jitterY, index, jitterPhaseCount);400///401/// const float jitterX = 2.0f * jitterX / (float)renderWidth;402/// const float jitterY = -2.0f * jitterY / (float)renderHeight;403/// const Matrix4 jitterTranslationMatrix = translateMatrix(Matrix3::identity, Vector3(jitterX, jitterY, 0));404/// const Matrix4 jitteredProjectionMatrix = jitterTranslationMatrix * projectionMatrix;405///406/// Jitter should be applied to all rendering. This includes opaque, alpha407/// transparent, and raytraced objects. For rasterized objects, the sub-pixel408/// jittering values calculated by the <c><i>iffxFsr2GetJitterOffset</i></c>409/// function can be applied to the camera projection matrix which is ultimately410/// used to perform transformations during vertex shading. For raytraced411/// rendering, the sub-pixel jitter should be applied to the ray's origin,412/// often the camera's position.413///414/// Whether you elect to use the <c><i>ffxFsr2GetJitterOffset</i></c> function415/// or your own sequence generator, you must program the416/// <c><i>jitterOffset</i></c> field of the417/// <c><i>FfxFsr2DispatchParameters</i></c> structure in order to inform FSR2418/// of the jitter offset that has been applied in order to render each frame.419///420/// If not using the recommended <c><i>ffxFsr2GetJitterOffset</i></c> function,421/// care should be taken that your jitter sequence never generates a null vector;422/// that is value of 0 in both the X and Y dimensions.423///424/// @param [out] outX A pointer to a <c>float</c> which will contain the subpixel jitter offset for the x dimension.425/// @param [out] outY A pointer to a <c>float</c> which will contain the subpixel jitter offset for the y dimension.426/// @param [in] index The index within the jitter sequence.427/// @param [in] phaseCount The length of jitter phase. See <c><i>ffxFsr2GetJitterPhaseCount</i></c>.428///429/// @retval430/// FFX_OK The operation completed successfully.431/// @retval432/// FFX_ERROR_INVALID_POINTER Either <c><i>outX</i></c> or <c><i>outY</i></c> was <c>NULL</c>.433/// @retval434/// FFX_ERROR_INVALID_ARGUMENT Argument <c><i>phaseCount</i></c> must be greater than 0.435///436/// @ingroup FSR2437FFX_API FfxErrorCode ffxFsr2GetJitterOffset(float* outX, float* outY, int32_t index, int32_t phaseCount);438439/// A helper function to check if a resource is440/// <c><i>FFX_FSR2_RESOURCE_IDENTIFIER_NULL</i></c>.441///442/// @param [in] resource A <c><i>FfxResource</i></c>.443///444/// @returns445/// true The <c><i>resource</i></c> was not <c><i>FFX_FSR2_RESOURCE_IDENTIFIER_NULL</i></c>.446/// @returns447/// false The <c><i>resource</i></c> was <c><i>FFX_FSR2_RESOURCE_IDENTIFIER_NULL</i></c>.448///449/// @ingroup FSR2450FFX_API bool ffxFsr2ResourceIsNull(FfxResource resource);451452#if defined(__cplusplus)453}454#endif // #if defined(__cplusplus)455456457