nvsdk_ngx_params.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * Copyright (c) 2018 NVIDIA CORPORATION. All rights reserved.
  3. *
  4. * NVIDIA Corporation and its licensors retain all intellectual property and proprietary
  5. * rights in and to this software, related documentation and any modifications thereto.
  6. * Any use, reproduction, disclosure or distribution of this software and related
  7. * documentation without an express license agreement from NVIDIA Corporation is strictly
  8. * prohibited.
  9. *
  10. * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*
  11. * AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,
  12. * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  13. * PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY
  14. * SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT
  15. * LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
  16. * BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
  17. * INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF
  18. * SUCH DAMAGES.
  19. */
  20. #ifndef NVSDK_NGX_PARAMS_H
  21. #define NVSDK_NGX_PARAMS_H
  22. #include "nvsdk_ngx_defs.h"
  23. #ifdef __cplusplus
  24. extern "C"
  25. {
  26. #endif
  27. typedef struct ID3D11Resource ID3D11Resource;
  28. typedef struct ID3D12Resource ID3D12Resource;
  29. typedef struct NVSDK_NGX_Feature_Create_Params
  30. {
  31. unsigned int InWidth;
  32. unsigned int InHeight;
  33. unsigned int InTargetWidth;
  34. unsigned int InTargetHeight;
  35. /*** OPTIONAL ***/
  36. NVSDK_NGX_PerfQuality_Value InPerfQualityValue;
  37. } NVSDK_NGX_Feature_Create_Params;
  38. typedef struct NVSDK_NGX_DLSS_Create_Params
  39. {
  40. NVSDK_NGX_Feature_Create_Params Feature;
  41. /*** OPTIONAL ***/
  42. int InFeatureCreateFlags;
  43. bool InEnableOutputSubrects;
  44. } NVSDK_NGX_DLSS_Create_Params;
  45. typedef struct NVSDK_NGX_DLDenoise_Create_Params
  46. {
  47. NVSDK_NGX_Feature_Create_Params Feature;
  48. /*** OPTIONAL ***/
  49. int InFeatureCreateFlags;
  50. } NVSDK_NGX_DLDenoise_Create_Params;
  51. #ifdef __cplusplus
  52. typedef struct NVSDK_NGX_Parameter
  53. {
  54. virtual void Set(const char * InName, unsigned long long InValue) = 0;
  55. virtual void Set(const char * InName, float InValue) = 0;
  56. virtual void Set(const char * InName, double InValue) = 0;
  57. virtual void Set(const char * InName, unsigned int InValue) = 0;
  58. virtual void Set(const char * InName, int InValue) = 0;
  59. virtual void Set(const char * InName, ID3D11Resource *InValue) = 0;
  60. virtual void Set(const char * InName, ID3D12Resource *InValue) = 0;
  61. virtual void Set(const char * InName, void *InValue) = 0;
  62. virtual NVSDK_NGX_Result Get(const char * InName, unsigned long long *OutValue) const = 0;
  63. virtual NVSDK_NGX_Result Get(const char * InName, float *OutValue) const = 0;
  64. virtual NVSDK_NGX_Result Get(const char * InName, double *OutValue) const = 0;
  65. virtual NVSDK_NGX_Result Get(const char * InName, unsigned int *OutValue) const = 0;
  66. virtual NVSDK_NGX_Result Get(const char * InName, int *OutValue) const = 0;
  67. virtual NVSDK_NGX_Result Get(const char * InName, ID3D11Resource **OutValue) const = 0;
  68. virtual NVSDK_NGX_Result Get(const char * InName, ID3D12Resource **OutValue) const = 0;
  69. virtual NVSDK_NGX_Result Get(const char * InName, void **OutValue) const = 0;
  70. virtual void Reset() = 0;
  71. } NVSDK_NGX_Parameter;
  72. #else
  73. typedef struct NVSDK_NGX_Parameter NVSDK_NGX_Parameter;
  74. #endif // _cplusplus
  75. typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetULL)(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned long long InValue);
  76. NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetULL(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned long long InValue);
  77. typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetF)(NVSDK_NGX_Parameter *InParameter, const char * InName, float InValue);
  78. NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetF(NVSDK_NGX_Parameter *InParameter, const char * InName, float InValue);
  79. typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetD)(NVSDK_NGX_Parameter *InParameter, const char * InName, double InValue);
  80. NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetD(NVSDK_NGX_Parameter *InParameter, const char * InName, double InValue);
  81. typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetUI)(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned int InValue);
  82. NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetUI(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned int InValue);
  83. typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetI)(NVSDK_NGX_Parameter *InParameter, const char * InName, int InValue);
  84. NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetI(NVSDK_NGX_Parameter *InParameter, const char * InName, int InValue);
  85. typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetD3d11Resource)(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D11Resource *InValue);
  86. NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetD3d11Resource(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D11Resource *InValue);
  87. typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetD3d12Resource)(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D12Resource *InValue);
  88. NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetD3d12Resource(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D12Resource *InValue);
  89. typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetVoidPointer)(NVSDK_NGX_Parameter *InParameter, const char * InName, void *InValue);
  90. NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetVoidPointer(NVSDK_NGX_Parameter *InParameter, const char * InName, void *InValue);
  91. typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetULL)(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned long long *OutValue);
  92. NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetULL(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned long long *OutValue);
  93. typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetF)(NVSDK_NGX_Parameter *InParameter, const char * InName, float *OutValue);
  94. NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetF(NVSDK_NGX_Parameter *InParameter, const char * InName, float *OutValue);
  95. typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetD)(NVSDK_NGX_Parameter *InParameter, const char * InName, double *OutValue);
  96. NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetD(NVSDK_NGX_Parameter *InParameter, const char * InName, double *OutValue);
  97. typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetUI)(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned int *OutValue);
  98. NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetUI(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned int *OutValue);
  99. typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetI)(NVSDK_NGX_Parameter *InParameter, const char * InName, int *OutValue);
  100. NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetI(NVSDK_NGX_Parameter *InParameter, const char * InName, int *OutValue);
  101. typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetD3d11Resource)(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D11Resource **OutValue);
  102. NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetD3d11Resource(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D11Resource **OutValue);
  103. typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetD3d12Resource)(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D12Resource **OutValue);
  104. NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetD3d12Resource(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D12Resource **OutValue);
  105. typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetVoidPointer)(NVSDK_NGX_Parameter *InParameter, const char * InName, void **OutValue);
  106. NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetVoidPointer(NVSDK_NGX_Parameter *InParameter, const char * InName, void **OutValue);
  107. #ifdef __cplusplus
  108. } // extern "C"
  109. #endif
  110. #endif // #define NVSDK_NGX_PARAMS_H