Skip to content

Commit

Permalink
DLSS 3.1.13 SDK
Browse files Browse the repository at this point in the history
NVIDIA DLSS SDK 3.1.13 is now available for download for all developers.

Changed DLAA to be easily setup for developers
Bug Fixes & Stability Improvements
  • Loading branch information
ertam-NV committed Jun 6, 2023
1 parent 024e327 commit 373d741
Show file tree
Hide file tree
Showing 30 changed files with 42 additions and 87 deletions.
Binary file modified doc/DLSS_Programming_Guide_Release.pdf
Binary file not shown.
Binary file modified doc/RTX UI Developer Guidelines Chinese Version.pdf
Binary file not shown.
Binary file modified doc/RTX UI Developer Guidelines.pdf
Binary file not shown.
7 changes: 5 additions & 2 deletions include/nvsdk_ngx_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ typedef enum NVSDK_NGX_DLSS_Hint_Render_Preset
NVSDK_NGX_DLSS_Hint_Render_Preset_D,
NVSDK_NGX_DLSS_Hint_Render_Preset_E,
NVSDK_NGX_DLSS_Hint_Render_Preset_F,
NVSDK_NGX_DLSS_Hint_Render_Preset_G,
} NVSDK_NGX_DLSS_Hint_Render_Preset;

typedef struct NVSDK_NGX_FeatureCommonInfo_Internal NVSDK_NGX_FeatureCommonInfo_Internal;
Expand Down Expand Up @@ -164,6 +165,8 @@ typedef enum NVSDK_NGX_Feature

NVSDK_NGX_Feature_DeepDVC = 12,

NVSDK_NGX_Feature_Reserved13 = 13,

// New features go here
NVSDK_NGX_Feature_Count,

Expand Down Expand Up @@ -197,6 +200,7 @@ typedef enum NVSDK_NGX_PerfQuality_Value
// Extended PerfQuality modes
NVSDK_NGX_PerfQuality_Value_UltraPerformance,
NVSDK_NGX_PerfQuality_Value_UltraQuality,
NVSDK_NGX_PerfQuality_Value_DLAA,
} NVSDK_NGX_PerfQuality_Value;

typedef enum NVSDK_NGX_RTX_Value
Expand Down Expand Up @@ -687,7 +691,6 @@ typedef struct NVSDK_NGX_FeatureRequirement
#define NVSDK_NGX_Parameter_GBuffer_Metallic "GBuffer.Metallic"
#define NVSDK_NGX_Parameter_GBuffer_Specular "GBuffer.Specular"
#define NVSDK_NGX_Parameter_GBuffer_Subsurface "GBuffer.Subsurface"
#define NVSDK_NGX_Parameter_GBuffer_Normals "GBuffer.Normals"
#define NVSDK_NGX_Parameter_GBuffer_ShadingModelId "GBuffer.ShadingModelId"
#define NVSDK_NGX_Parameter_GBuffer_MaterialId "GBuffer.MaterialId"
#define NVSDK_NGX_Parameter_GBuffer_Atrrib_8 "GBuffer.Attrib.8"
Expand Down Expand Up @@ -729,7 +732,6 @@ typedef struct NVSDK_NGX_FeatureRequirement
#define NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis "DLSS.Indicator.Invert.Y.Axis"
#define NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis "DLSS.Indicator.Invert.X.Axis"
#define NVSDK_NGX_Parameter_DLSS_INV_VIEW_PROJECTION_MATRIX "InvViewProjectionMatrix"
#define NVSDK_NGX_Parameter_DLSS_PROJECTION_MATRIX "ProjectionMatrix"
#define NVSDK_NGX_Parameter_DLSS_CLIP_TO_PREV_CLIP_MATRIX "ClipToPrevClipMatrix"

#define NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Max_Render_Width "DLSS.Get.Dynamic.Max.Render.Width"
Expand All @@ -742,6 +744,7 @@ typedef struct NVSDK_NGX_FeatureRequirement
#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_Balanced "DLSS.Hint.Render.Preset.Balanced"
#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_Performance "DLSS.Hint.Render.Preset.Performance"
#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_UltraPerformance "DLSS.Hint.Render.Preset.UltraPerformance"
#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_UltraQuality "DLSS.Hint.Render.Preset.UltraQuality"

#ifdef __cplusplus
} // extern "C"
Expand Down
56 changes: 14 additions & 42 deletions include/nvsdk_ngx_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ typedef struct NVSDK_NGX_CUDA_DEEPDVC_Eval_Params
float Strength;
} NVSDK_NGX_CUDA_DEEPDVC_Eval_Params;

static inline void NGX_D3D11_CREATE_DLSS_COMMON(
static inline NVSDK_NGX_Result NGX_D3D11_CREATE_DLSS_EXT(
ID3D11DeviceContext *pInCtx,
NVSDK_NGX_Handle **ppOutHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)
{
Expand All @@ -222,20 +224,14 @@ static inline void NGX_D3D11_CREATE_DLSS_COMMON(
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssCreateParams->Feature.InPerfQualityValue);
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssCreateParams->InFeatureCreateFlags);
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssCreateParams->InEnableOutputSubrects ? 1 : 0);
}

static inline NVSDK_NGX_Result NGX_D3D11_CREATE_DLSS_EXT(
ID3D11DeviceContext *pInCtx,
NVSDK_NGX_Handle **ppOutHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)
{
NGX_D3D11_CREATE_DLSS_COMMON(pInParams, pInDlssCreateParams);

return NVSDK_NGX_D3D11_CreateFeature(pInCtx, NVSDK_NGX_Feature_SuperSampling, pInParams, ppOutHandle);
}

static inline void NGX_D3D11_EVALUATE_DLSS_COMMON(

static inline NVSDK_NGX_Result NGX_D3D11_EVALUATE_DLSS_EXT(
ID3D11DeviceContext *pInCtx,
NVSDK_NGX_Handle *pInHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_D3D11_DLSS_Eval_Params *pInDlssEvalParams)
{
Expand Down Expand Up @@ -295,15 +291,6 @@ static inline void NGX_D3D11_EVALUATE_DLSS_COMMON(
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);
}

static inline NVSDK_NGX_Result NGX_D3D11_EVALUATE_DLSS_EXT(
ID3D11DeviceContext *pInCtx,
NVSDK_NGX_Handle *pInHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_D3D11_DLSS_Eval_Params *pInDlssEvalParams)
{
NGX_D3D11_EVALUATE_DLSS_COMMON(pInParams, pInDlssEvalParams);

return NVSDK_NGX_D3D11_EvaluateFeature_C(pInCtx, pInHandle, pInParams, NULL);
}
Expand Down Expand Up @@ -531,9 +518,11 @@ typedef struct NVSDK_NGX_D3D12_DEEPDVC_Eval_Params
float Strength;
} NVSDK_NGX_D3D12_DEEPDVC_Eval_Params;

static inline void NGX_D3D12_CREATE_DLSS_COMMON(
static inline NVSDK_NGX_Result NGX_D3D12_CREATE_DLSS_EXT(
ID3D12GraphicsCommandList *pInCmdList,
unsigned int InCreationNodeMask,
unsigned int InVisibilityNodeMask,
NVSDK_NGX_Handle **ppOutHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)
{
Expand All @@ -546,22 +535,14 @@ static inline void NGX_D3D12_CREATE_DLSS_COMMON(
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssCreateParams->Feature.InPerfQualityValue);
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssCreateParams->InFeatureCreateFlags);
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssCreateParams->InEnableOutputSubrects ? 1 : 0);
}

static inline NVSDK_NGX_Result NGX_D3D12_CREATE_DLSS_EXT(
ID3D12GraphicsCommandList *pInCmdList,
unsigned int InCreationNodeMask,
unsigned int InVisibilityNodeMask,
NVSDK_NGX_Handle **ppOutHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)
{
NGX_D3D12_CREATE_DLSS_COMMON(InCreationNodeMask, InVisibilityNodeMask, pInParams, pInDlssCreateParams);

return NVSDK_NGX_D3D12_CreateFeature(pInCmdList, NVSDK_NGX_Feature_SuperSampling, pInParams, ppOutHandle);
}

static inline void NGX_D3D12_EVALUATE_DLSS_COMMON(

static inline NVSDK_NGX_Result NGX_D3D12_EVALUATE_DLSS_EXT(
ID3D12GraphicsCommandList *pInCmdList,
NVSDK_NGX_Handle *pInHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_D3D12_DLSS_Eval_Params *pInDlssEvalParams)
{
Expand Down Expand Up @@ -621,15 +602,6 @@ static inline void NGX_D3D12_EVALUATE_DLSS_COMMON(
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);
}

static inline NVSDK_NGX_Result NGX_D3D12_EVALUATE_DLSS_EXT(
ID3D12GraphicsCommandList *pInCmdList,
NVSDK_NGX_Handle *pInHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_D3D12_DLSS_Eval_Params *pInDlssEvalParams)
{
NGX_D3D12_EVALUATE_DLSS_COMMON(pInParams, pInDlssEvalParams);

return NVSDK_NGX_D3D12_EvaluateFeature_C(pInCmdList, pInHandle, pInParams, NULL);
}
Expand Down
38 changes: 8 additions & 30 deletions include/nvsdk_ngx_helpers_vk.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,12 @@ typedef struct NVSDK_NGX_VK_DLISP_Eval_Params
float InDenoise;
} NVSDK_NGX_VK_DLISP_Eval_Params;

static inline void NGX_VULKAN_CREATE_DLSS_COMMON(
static inline NVSDK_NGX_Result NGX_VULKAN_CREATE_DLSS_EXT1(
VkDevice InDevice,
VkCommandBuffer InCmdList,
unsigned int InCreationNodeMask,
unsigned int InVisibilityNodeMask,
NVSDK_NGX_Handle **ppOutHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)
{
Expand All @@ -125,18 +128,6 @@ static inline void NGX_VULKAN_CREATE_DLSS_COMMON(
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssCreateParams->Feature.InPerfQualityValue);
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssCreateParams->InFeatureCreateFlags);
NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssCreateParams->InEnableOutputSubrects ? 1 : 0);
}

static inline NVSDK_NGX_Result NGX_VULKAN_CREATE_DLSS_EXT1(
VkDevice InDevice,
VkCommandBuffer InCmdList,
unsigned int InCreationNodeMask,
unsigned int InVisibilityNodeMask,
NVSDK_NGX_Handle **ppOutHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)
{
NGX_VULKAN_CREATE_DLSS_COMMON(InCreationNodeMask, InVisibilityNodeMask, pInParams, pInDlssCreateParams);

if (InDevice) return NVSDK_NGX_VULKAN_CreateFeature1(InDevice, InCmdList, NVSDK_NGX_Feature_SuperSampling, pInParams, ppOutHandle);
else return NVSDK_NGX_VULKAN_CreateFeature(InCmdList, NVSDK_NGX_Feature_SuperSampling, pInParams, ppOutHandle);
Expand All @@ -153,11 +144,13 @@ static inline NVSDK_NGX_Result NGX_VULKAN_CREATE_DLSS_EXT(
return NGX_VULKAN_CREATE_DLSS_EXT1(NULL, InCmdList, InCreationNodeMask, InVisibilityNodeMask, ppOutHandle, pInParams, pInDlssCreateParams);
}

static inline NVSDK_NGX_Result NGX_VULKAN_EVALUATE_DLSS_COMMON(
static inline NVSDK_NGX_Result NGX_VULKAN_EVALUATE_DLSS_EXT(
VkCommandBuffer InCmdList,
NVSDK_NGX_Handle *pInHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_VK_DLSS_Eval_Params *pInDlssEvalParams)
{
NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->Feature.pInColor);
NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->Feature.pInColor);
NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInMotionVectors);
NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->Feature.pInOutput);
NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInDepth);
Expand Down Expand Up @@ -233,21 +226,6 @@ static inline NVSDK_NGX_Result NGX_VULKAN_EVALUATE_DLSS_COMMON(
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_Result_Success;
}

static inline NVSDK_NGX_Result NGX_VULKAN_EVALUATE_DLSS_EXT(
VkCommandBuffer InCmdList,
NVSDK_NGX_Handle *pInHandle,
NVSDK_NGX_Parameter *pInParams,
NVSDK_NGX_VK_DLSS_Eval_Params *pInDlssEvalParams)
{
NVSDK_NGX_Result ret = NGX_VULKAN_EVALUATE_DLSS_COMMON(pInParams, pInDlssEvalParams);
if (ret != NVSDK_NGX_Result_Success)
{
return ret;
}

return NVSDK_NGX_VULKAN_EvaluateFeature_C(InCmdList, pInHandle, pInParams, NULL);
}

Expand Down
Loading

0 comments on commit 373d741

Please sign in to comment.