// This file is part of the FidelityFX SDK. // // Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #pragma once #include <stdint.h> // -- GODOT start -- #include <stdlib.h> // -- GODOT end -- #if defined (FFX_GCC) /// FidelityFX exported functions #define FFX_API #else /// FidelityFX exported functions #define FFX_API … #endif // #if defined (FFX_GCC) /// Maximum supported number of simultaneously bound SRVs. #define FFX_MAX_NUM_SRVS … /// Maximum supported number of simultaneously bound UAVs. #define FFX_MAX_NUM_UAVS … /// Maximum number of constant buffers bound. #define FFX_MAX_NUM_CONST_BUFFERS … /// Maximum size of bound constant buffers. #define FFX_MAX_CONST_SIZE … /// Off by default warnings #if defined(_MSC_VER) #pragma warning(disable : 4365 4710 4820 5039) #elif defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wmissing-field-initializers" #pragma clang diagnostic ignored "-Wsign-compare" #pragma clang diagnostic ignored "-Wunused-function" #pragma clang diagnostic ignored "-Wignored-qualifiers" #elif defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunused-function" #endif #ifdef __cplusplus extern "C" { #endif // #ifdef __cplusplus /// An enumeration of surface formats. FfxSurfaceFormat; /// An enumeration of resource usage. FfxResourceUsage; /// An enumeration of resource states. FfxResourceStates; /// An enumeration of surface dimensions. FfxResourceDimension; /// An enumeration of surface dimensions. FfxResourceFlags; /// An enumeration of all resource view types. FfxResourceViewType; /// The type of filtering to perform when reading a texture. FfxFilterType; /// An enumeration of all supported shader models. FfxShaderModel; // An enumeration for different resource types FfxResourceType; /// An enumeration for different heap types FfxHeapType; /// An enumberation for different render job types FfxGpuJobType; /// A typedef representing the graphics device. FfxDevice; /// A typedef representing a command list or command buffer. FfxCommandList; /// A typedef for a root signature. FfxRootSignature; /// A typedef for a pipeline state object. FfxPipeline; /// A structure encapasulating a collection of device capabilities. FfxDeviceCapabilities; /// A structure encapsulating a 2-dimensional point, using 32bit unsigned integers. FfxDimensions2D; /// A structure encapsulating a 2-dimensional point, FfxIntCoords2D; /// A structure encapsulating a 2-dimensional set of floating point coordinates. FfxFloatCoords2D; /// A structure describing a resource. FfxResourceDescription; /// An outward facing structure containing a resource FfxResource; /// An internal structure containing a handle to a resource and resource views FfxResourceInternal; /// A structure defining a resource bind point FfxResourceBinding; /// A structure encapsulating a single pass of an algorithm. FfxPipelineState; /// A structure containing the data required to create a resource. FfxCreateResourceDescription; /// A structure containing the description used to create a /// <c><i>FfxPipeline</i></c> structure. /// /// A pipeline is the name given to a shader and the collection of state that /// is required to dispatch it. In the context of FSR2 and its architecture /// this means that a <c><i>FfxPipelineDescription</i></c> will map to either a /// monolithic object in an explicit API (such as a /// <c><i>PipelineStateObject</i></c> in DirectX 12). Or a shader and some /// ancillary API objects (in something like DirectX 11). /// /// The <c><i>contextFlags</i></c> field contains a copy of the flags passed /// to <c><i>ffxFsr2ContextCreate</i></c> via the <c><i>flags</i></c> field of /// the <c><i>FfxFsr2InitializationParams</i></c> structure. These flags are /// used to determine which permutation of a pipeline for a specific /// <c><i>FfxFsr2Pass</i></c> should be used to implement the features required /// by each application, as well as to acheive the best performance on specific /// target hardware configurations. /// /// When using one of the provided backends for FSR2 (such as DirectX 12 or /// Vulkan) the data required to create a pipeline is compiled offline and /// included into the backend library that you are using. For cases where the /// backend interface is overriden by providing custom callback function /// implementations care should be taken to respect the contents of the /// <c><i>contextFlags</i></c> field in order to correctly support the options /// provided by FSR2, and acheive best performance. /// /// @ingroup FSR2 FfxPipelineDescription; /// A structure containing a constant buffer. FfxConstantBuffer; /// A structure describing a clear render job. FfxClearFloatJobDescription; /// A structure describing a compute render job. FfxComputeJobDescription; /// A structure describing a copy render job. FfxCopyJobDescription; /// A structure describing a single render job. FfxGpuJobDescription; #ifdef __cplusplus } #endif // #ifdef __cplusplus