init
This commit is contained in:
+6
-4
@@ -32,8 +32,8 @@
|
||||
* need to update drivers. Please note that application Id is provided
|
||||
* by NVIDIA so if you do not have one please contact us.
|
||||
*
|
||||
* 2) Call NVSDK_NGX_D3D11/D3D12/CUDA_GetParameters to obtain pointer to
|
||||
* interface used to pass parameters to SDK. Interface instance is
|
||||
* 2) Call NVSDK_NGX_D3D11/D3D12/CUDA_GetCapabilityParameters to obtain pointer
|
||||
* to interface used to pass parameters to SDK. Interface instance is
|
||||
* allocated and released by SDK so there is no need to do any memory
|
||||
* management on client side.
|
||||
*
|
||||
@@ -200,6 +200,7 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Shutdown(void);
|
||||
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Shutdown1(ID3D12Device *InDevice);
|
||||
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Shutdown(void);
|
||||
|
||||
#ifdef NGX_ENABLE_DEPRECATED_GET_PARAMETERS
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// NVSDK_NGX_GetParameters
|
||||
// ----------------------------------------------------------
|
||||
@@ -218,15 +219,16 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Shutdown(void);
|
||||
// Unlike with NVSDK_NGX_AllocateParameters, parameter maps output by NVSDK_NGX_GetParameters
|
||||
// have their lifetimes managed by NGX, and must not
|
||||
// be destroyed by the app using NVSDK_NGX_DestroyParameters.
|
||||
// NVSDK_NGX_GetParameters is soon to be deprecated and apps should move to using
|
||||
// NVSDK_NGX_GetParameters is deprecated and apps should move to using
|
||||
// NVSDK_NGX_AllocateParameters and NVSDK_NGX_GetCapabilityParameters when possible.
|
||||
// Nevertheless, due to the possibility that the user will be using an older driver version,
|
||||
// NVSDK_NGX_GetParameters should still be used as a fallback if NVSDK_NGX_AllocateParameters
|
||||
// NVSDK_NGX_GetParameters may still be used as a fallback if NVSDK_NGX_AllocateParameters
|
||||
// or NVSDK_NGX_GetCapabilityParameters return NVSDK_NGX_Result_FAIL_OutOfDate.
|
||||
//
|
||||
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_GetParameters(NVSDK_NGX_Parameter **OutParameters);
|
||||
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_GetParameters(NVSDK_NGX_Parameter **OutParameters);
|
||||
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_GetParameters(NVSDK_NGX_Parameter **OutParameters);
|
||||
#endif // NGX_ENABLE_DEPRECATED_GET_PARAMETERS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// NVSDK_NGX_AllocateParameters
|
||||
|
||||
+16
-3
@@ -218,7 +218,6 @@ typedef enum NSDK_NGX_GPU_Arch
|
||||
NVSDK_NGX_GPU_Arch_Unknown = 0x7FFFFFF
|
||||
} NVSDK_NGX_GPU_Arch;
|
||||
|
||||
|
||||
typedef enum NVSDK_NGX_DLSS_Feature_Flags
|
||||
{
|
||||
NVSDK_NGX_DLSS_Feature_Flags_IsInvalid = 1 << 31,
|
||||
@@ -252,6 +251,10 @@ typedef enum NVSDK_NGX_GBufferType
|
||||
NVSDK_NGX_GBUFFER_NORMALS,
|
||||
NVSDK_NGX_GBUFFER_SHADINGMODELID, /* unique identifier for drawn object or how the object is drawn */
|
||||
NVSDK_NGX_GBUFFER_MATERIALID, /* unique identifier for material */
|
||||
NVSDK_NGX_GBUFFER_SPECULAR_ALBEDO,
|
||||
NVSDK_NGX_GBUFFER_INDIRECT_ALBEDO,
|
||||
NVSDK_NGX_GBUFFER_SPECULAR_MVEC,
|
||||
NVSDK_NGX_GBUFFER_DISOCCL_MASK,
|
||||
NVSDK_NGX_GBUFFERTYPE_NUM = 16
|
||||
} NVSDK_NGX_GBufferType;
|
||||
|
||||
@@ -269,7 +272,11 @@ typedef struct NVSDK_NGX_Dimensions
|
||||
|
||||
typedef struct NVSDK_NGX_PathListInfo
|
||||
{
|
||||
#ifdef NV_WINDOWS
|
||||
wchar_t **Path;
|
||||
#else //NV_WINDOWS
|
||||
char **Path;
|
||||
#endif //NV_WINDOWS
|
||||
// Path-list length
|
||||
unsigned int Length;
|
||||
} NVSDK_NGX_PathListInfo;
|
||||
@@ -346,7 +353,7 @@ typedef enum NVSDK_NGX_EngineType
|
||||
NVSDK_NGX_ENGINE_TYPE_UNREAL,
|
||||
NVSDK_NGX_ENGINE_TYPE_UNITY,
|
||||
NVSDK_NGX_ENGINE_TYPE_OMNIVERSE,
|
||||
NVSDK_NGX_ENGINE_COUNT
|
||||
NVSDK_NGX_ENGINE_COUNT
|
||||
} NVSDK_NGX_EngineType;
|
||||
|
||||
// Read-only parameters provided by NGX
|
||||
@@ -373,7 +380,7 @@ typedef enum NVSDK_NGX_EngineType
|
||||
#define NVSDK_NGX_EParameter_Sharpness "#\x14"
|
||||
#define NVSDK_NGX_EParameter_Scratch "#\x15"
|
||||
#define NVSDK_NGX_EParameter_Scratch_SizeInBytes "#\x16"
|
||||
#define NVSDK_NGX_EParameter_Deprecated_17 "#\x17"
|
||||
#define NVSDK_NGX_EParameter_EvaluationNode "#\x17" // valid since API 0x13 (replaced a deprecated param)
|
||||
#define NVSDK_NGX_EParameter_Input1 "#\x18"
|
||||
#define NVSDK_NGX_EParameter_Input1_Format "#\x19"
|
||||
#define NVSDK_NGX_EParameter_Input1_SizeInBytes "#\x1a"
|
||||
@@ -538,8 +545,14 @@ typedef enum NVSDK_NGX_EngineType
|
||||
#define NVSDK_NGX_Parameter_ExposureTexture "ExposureTexture" // a 1x1 texture containing the final exposure scale
|
||||
#define NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags "DLSS.Feature.Create.Flags"
|
||||
#define NVSDK_NGX_Parameter_DLSS_Checkerboard_Jitter_Hack "DLSS.Checkerboard.Jitter.Hack"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_Normals "GBuffer.Normals"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_Albedo "GBuffer.Albedo"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_Roughness "GBuffer.Roughness"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_DiffuseAlbedo "GBuffer.DiffuseAlbedo"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_SpecularAlbedo "GBuffer.SpecularAlbedo"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_IndirectAlbedo "GBuffer.IndirectAlbedo"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_SpecularMvec "GBuffer.SpecularMvec"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_DisocclusionMask "GBuffer.DisocclusionMask"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_Metallic "GBuffer.Metallic"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_Specular "GBuffer.Specular"
|
||||
#define NVSDK_NGX_Parameter_GBuffer_Subsurface "GBuffer.Subsurface"
|
||||
|
||||
@@ -169,6 +169,7 @@ typedef struct NVSDK_NGX_D3D11_DLSS_Eval_Params
|
||||
NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;
|
||||
NVSDK_NGX_Coordinates InOutputSubrectBase;
|
||||
float InPreExposure;
|
||||
float InExposureScale;
|
||||
int InIndicatorInvertXAxis;
|
||||
int InIndicatorInvertYAxis;
|
||||
/*** OPTIONAL - only for research purposes ***/
|
||||
@@ -282,13 +283,13 @@ static inline NVSDK_NGX_Result NGX_D3D11_EVALUATE_DLSS_EXT(
|
||||
NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width , pInDlssEvalParams->InRenderSubrectDimensions.Width);
|
||||
NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssEvalParams->InRenderSubrectDimensions.Height);
|
||||
NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssEvalParams->InPreExposure);
|
||||
NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssEvalParams->InExposureScale);
|
||||
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssEvalParams->InIndicatorInvertXAxis);
|
||||
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssEvalParams->InIndicatorInvertYAxis);
|
||||
|
||||
return NVSDK_NGX_D3D11_EvaluateFeature_C(pInCtx, pInHandle, pInParams, NULL);
|
||||
}
|
||||
|
||||
|
||||
static inline NVSDK_NGX_Result NGX_D3D11_CREATE_DLISP_EXT(
|
||||
ID3D11DeviceContext *pInCtx,
|
||||
NVSDK_NGX_Handle **ppOutHandle,
|
||||
@@ -432,6 +433,7 @@ typedef struct NVSDK_NGX_D3D12_DLSS_Eval_Params
|
||||
NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;
|
||||
NVSDK_NGX_Coordinates InOutputSubrectBase;
|
||||
float InPreExposure;
|
||||
float InExposureScale;
|
||||
int InIndicatorInvertXAxis;
|
||||
int InIndicatorInvertYAxis;
|
||||
/*** OPTIONAL - only for research purposes ***/
|
||||
@@ -538,13 +540,13 @@ static inline NVSDK_NGX_Result NGX_D3D12_EVALUATE_DLSS_EXT(
|
||||
NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width , pInDlssEvalParams->InRenderSubrectDimensions.Width);
|
||||
NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssEvalParams->InRenderSubrectDimensions.Height);
|
||||
NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssEvalParams->InPreExposure);
|
||||
NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssEvalParams->InExposureScale);
|
||||
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssEvalParams->InIndicatorInvertXAxis);
|
||||
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssEvalParams->InIndicatorInvertYAxis);
|
||||
|
||||
return NVSDK_NGX_D3D12_EvaluateFeature_C(pInCmdList, pInHandle, pInParams, NULL);
|
||||
}
|
||||
|
||||
|
||||
static inline NVSDK_NGX_Result NGX_D3D12_CREATE_DLISP_EXT(
|
||||
ID3D12GraphicsCommandList *InCmdList,
|
||||
unsigned int InCreationNodeMask,
|
||||
@@ -590,7 +592,6 @@ static inline NVSDK_NGX_Result NGX_D3D12_EVALUATE_DLISP_EXT(
|
||||
return NVSDK_NGX_D3D12_EvaluateFeature_C(pInCmdList, pInHandle, pInParams, NULL);
|
||||
}
|
||||
|
||||
|
||||
static inline NVSDK_NGX_Result NGX_D3D12_CREATE_DLRESOLVE_EXT(
|
||||
ID3D12GraphicsCommandList *pInCmdList,
|
||||
unsigned int InCreationNodeMask,
|
||||
|
||||
@@ -91,6 +91,7 @@ typedef struct NVSDK_NGX_VK_DLSS_Eval_Params
|
||||
NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;
|
||||
NVSDK_NGX_Coordinates InOutputSubrectBase;
|
||||
float InPreExposure;
|
||||
float InExposureScale;
|
||||
int InIndicatorInvertXAxis;
|
||||
int InIndicatorInvertYAxis;
|
||||
/*** OPTIONAL - only for research purposes ***/
|
||||
@@ -229,13 +230,13 @@ static inline NVSDK_NGX_Result NGX_VULKAN_EVALUATE_DLSS_EXT(
|
||||
NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width , pInDlssEvalParams->InRenderSubrectDimensions.Width);
|
||||
NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssEvalParams->InRenderSubrectDimensions.Height);
|
||||
NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssEvalParams->InPreExposure);
|
||||
NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssEvalParams->InExposureScale);
|
||||
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssEvalParams->InIndicatorInvertXAxis);
|
||||
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssEvalParams->InIndicatorInvertYAxis);
|
||||
|
||||
return NVSDK_NGX_VULKAN_EvaluateFeature_C(InCmdList, pInHandle, pInParams, NULL);
|
||||
}
|
||||
|
||||
|
||||
static inline NVSDK_NGX_Result NGX_VULKAN_CREATE_DLISP_EXT(
|
||||
VkCommandBuffer InCmdList,
|
||||
unsigned int InCreationNodeMask,
|
||||
|
||||
@@ -50,6 +50,13 @@ typedef struct NVSDK_NGX_DLSS_Create_Params
|
||||
bool InEnableOutputSubrects;
|
||||
} NVSDK_NGX_DLSS_Create_Params;
|
||||
|
||||
typedef struct NVSDK_NGX_DLDenoise_Create_Params
|
||||
{
|
||||
NVSDK_NGX_Feature_Create_Params Feature;
|
||||
/*** OPTIONAL ***/
|
||||
int InFeatureCreateFlags;
|
||||
} NVSDK_NGX_DLDenoise_Create_Params;
|
||||
|
||||
#ifdef __cplusplus
|
||||
typedef struct NVSDK_NGX_Parameter
|
||||
{
|
||||
|
||||
@@ -245,6 +245,7 @@ NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init_with_ProjectID(const char *In
|
||||
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Shutdown(void);
|
||||
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Shutdown1(VkDevice InDevice);
|
||||
|
||||
#ifdef NGX_ENABLE_DEPRECATED_GET_PARAMETERS
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// NVSDK_NGX_GetParameters
|
||||
// ----------------------------------------------------------
|
||||
@@ -263,13 +264,14 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Shutdown1(VkDevice In
|
||||
// Unlike with NVSDK_NGX_AllocateParameters, parameter maps output by NVSDK_NGX_GetParameters
|
||||
// have their lifetimes managed by NGX, and must not
|
||||
// be destroyed by the app using NVSDK_NGX_DestroyParameters.
|
||||
// NVSDK_NGX_GetParameters is soon to be deprecated and apps should move to using
|
||||
// NVSDK_NGX_GetParameters is deprecated and apps should move to using
|
||||
// NVSDK_NGX_AllocateParameters and NVSDK_NGX_GetCapabilityParameters when possible.
|
||||
// Nevertheless, due to the possibility that the user will be using an older driver version,
|
||||
// NVSDK_NGX_GetParameters should still be used as a fallback if NVSDK_NGX_AllocateParameters
|
||||
// NVSDK_NGX_GetParameters may still be used as a fallback if NVSDK_NGX_AllocateParameters
|
||||
// or NVSDK_NGX_GetCapabilityParameters return NVSDK_NGX_Result_FAIL_OutOfDate.
|
||||
//
|
||||
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_GetParameters(NVSDK_NGX_Parameter **OutParameters);
|
||||
#endif // NGX_ENABLE_DEPRECATED_GET_PARAMETERS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// NVSDK_NGX_AllocateParameters
|
||||
|
||||
+9
-21
@@ -1,29 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2021 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2020 - 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*
|
||||
* NVIDIA Corporation and its licensors retain all intellectual property and proprietary
|
||||
* rights in and to this software, related documentation and any modifications thereto.
|
||||
* Any use, reproduction, disclosure or distribution of this software and related
|
||||
* documentation without an express license agreement from NVIDIA Corporation is strictly
|
||||
* prohibited.
|
||||
*
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*
|
||||
* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,
|
||||
* INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY
|
||||
* SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT
|
||||
* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
|
||||
* BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
|
||||
* INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGES.
|
||||
* NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
|
||||
* property and proprietary rights in and to this material, related
|
||||
* documentation and any modifications thereto. Any use, reproduction,
|
||||
* disclosure or distribution of this material and related documentation
|
||||
* without an express license agreement from NVIDIA CORPORATION or
|
||||
* its affiliates is strictly prohibited.
|
||||
*/
|
||||
|
||||
#if UE_5_0_OR_LATER
|
||||
using EpicGames.Core;
|
||||
#else
|
||||
using Tools.DotNETCommon;
|
||||
#endif
|
||||
|
||||
using UnrealBuildTool;
|
||||
using System.IO;
|
||||
|
||||
@@ -76,6 +62,8 @@ public class NGX : ModuleRules
|
||||
};
|
||||
|
||||
PublicDefinitions.Add("NGX_DLSS_BINARY_NAME=TEXT(\"" + NGXSnippetDLLs[0] + "\")");
|
||||
// work around missing definition in NGX headers
|
||||
PublicDefinitions.Add("NV_WINDOWS=1");
|
||||
|
||||
foreach (string NGXSnippetDLL in NGXSnippetDLLs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user