mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2025-03-13 22:23:04 +00:00
improved RHI, removed NVAPI files from the repo
- NVAPI raytracing validation - Aftermath markers for GPU crash investigations - 3D textures, indirect dispatch, more copy and clear ops
This commit is contained in:
parent
d1c19fbe2a
commit
ef68bbd44e
22 changed files with 421 additions and 30613 deletions
|
@ -1,970 +0,0 @@
|
|||
/***************************************************************************\
|
||||
|* *|
|
||||
|* Copyright NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This source code is subject to NVIDIA ownership rights under U.S. *|
|
||||
|* and international Copyright laws. Users and possessors of this *|
|
||||
|* source code are hereby granted a nonexclusive, royalty-free *|
|
||||
|* license to use this code in individual and commercial software. *|
|
||||
|* *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE *|
|
||||
|* CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR *|
|
||||
|* IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH *|
|
||||
|* REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF *|
|
||||
|* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR *|
|
||||
|* PURPOSE. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, *|
|
||||
|* INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES *|
|
||||
|* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN *|
|
||||
|* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING *|
|
||||
|* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE *|
|
||||
|* CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. This source code is a "commercial item" *|
|
||||
|* as that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting *|
|
||||
|* of "commercial computer software" and "commercial computer software *|
|
||||
|* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) *|
|
||||
|* and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through *|
|
||||
|* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the *|
|
||||
|* source code with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this source code in individual and commercial software must *|
|
||||
|* include, in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
|* *|
|
||||
\***************************************************************************/
|
||||
|
||||
#include "NvApiDriverSettings.h"
|
||||
|
||||
EValues_OGL_AA_LINE_GAMMA g_valuesOGL_AA_LINE_GAMMA[OGL_AA_LINE_GAMMA_NUM_VALUES] =
|
||||
{
|
||||
OGL_AA_LINE_GAMMA_DISABLED,
|
||||
OGL_AA_LINE_GAMMA_ENABLED,
|
||||
OGL_AA_LINE_GAMMA_MIN,
|
||||
OGL_AA_LINE_GAMMA_MAX,
|
||||
};
|
||||
|
||||
EValues_OGL_CPL_GDI_COMPATIBILITY g_valuesOGL_CPL_GDI_COMPATIBILITY[OGL_CPL_GDI_COMPATIBILITY_NUM_VALUES] =
|
||||
{
|
||||
OGL_CPL_GDI_COMPATIBILITY_PREFER_DISABLED,
|
||||
OGL_CPL_GDI_COMPATIBILITY_PREFER_ENABLED,
|
||||
OGL_CPL_GDI_COMPATIBILITY_AUTO,
|
||||
};
|
||||
|
||||
EValues_OGL_CPL_PREFER_DXPRESENT g_valuesOGL_CPL_PREFER_DXPRESENT[OGL_CPL_PREFER_DXPRESENT_NUM_VALUES] =
|
||||
{
|
||||
OGL_CPL_PREFER_DXPRESENT_PREFER_DISABLED,
|
||||
OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED,
|
||||
OGL_CPL_PREFER_DXPRESENT_AUTO,
|
||||
};
|
||||
|
||||
EValues_OGL_DEEP_COLOR_SCANOUT g_valuesOGL_DEEP_COLOR_SCANOUT[OGL_DEEP_COLOR_SCANOUT_NUM_VALUES] =
|
||||
{
|
||||
OGL_DEEP_COLOR_SCANOUT_DISABLE,
|
||||
OGL_DEEP_COLOR_SCANOUT_ENABLE,
|
||||
};
|
||||
|
||||
EValues_OGL_DEFAULT_SWAP_INTERVAL g_valuesOGL_DEFAULT_SWAP_INTERVAL[OGL_DEFAULT_SWAP_INTERVAL_NUM_VALUES] =
|
||||
{
|
||||
OGL_DEFAULT_SWAP_INTERVAL_TEAR,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_VSYNC_ONE,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_VSYNC,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_VALUE_MASK,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_FORCE_MASK,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_FORCE_OFF,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_FORCE_ON,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_APP_CONTROLLED,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_DISABLE,
|
||||
};
|
||||
|
||||
EValues_OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL g_valuesOGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL[OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_NUM_VALUES] =
|
||||
{
|
||||
OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_ZERO_SCANLINES,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_ONE_FULL_FRAME_OF_SCANLINES,
|
||||
};
|
||||
|
||||
EValues_OGL_DEFAULT_SWAP_INTERVAL_SIGN g_valuesOGL_DEFAULT_SWAP_INTERVAL_SIGN[OGL_DEFAULT_SWAP_INTERVAL_SIGN_NUM_VALUES] =
|
||||
{
|
||||
OGL_DEFAULT_SWAP_INTERVAL_SIGN_POSITIVE,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_SIGN_NEGATIVE,
|
||||
};
|
||||
|
||||
EValues_OGL_EVENT_LOG_SEVERITY_THRESHOLD g_valuesOGL_EVENT_LOG_SEVERITY_THRESHOLD[OGL_EVENT_LOG_SEVERITY_THRESHOLD_NUM_VALUES] =
|
||||
{
|
||||
OGL_EVENT_LOG_SEVERITY_THRESHOLD_DISABLE,
|
||||
OGL_EVENT_LOG_SEVERITY_THRESHOLD_CRITICAL,
|
||||
OGL_EVENT_LOG_SEVERITY_THRESHOLD_WARNING,
|
||||
OGL_EVENT_LOG_SEVERITY_THRESHOLD_INFORMATION,
|
||||
OGL_EVENT_LOG_SEVERITY_THRESHOLD_ALL,
|
||||
};
|
||||
|
||||
EValues_OGL_FORCE_BLIT g_valuesOGL_FORCE_BLIT[OGL_FORCE_BLIT_NUM_VALUES] =
|
||||
{
|
||||
OGL_FORCE_BLIT_ON,
|
||||
OGL_FORCE_BLIT_OFF,
|
||||
};
|
||||
|
||||
EValues_OGL_FORCE_STEREO g_valuesOGL_FORCE_STEREO[OGL_FORCE_STEREO_NUM_VALUES] =
|
||||
{
|
||||
OGL_FORCE_STEREO_OFF,
|
||||
OGL_FORCE_STEREO_ON,
|
||||
};
|
||||
|
||||
const wchar_t * g_valuesOGL_IMPLICIT_GPU_AFFINITY[OGL_IMPLICIT_GPU_AFFINITY_NUM_VALUES] =
|
||||
{
|
||||
OGL_IMPLICIT_GPU_AFFINITY_AUTOSELECT
|
||||
};
|
||||
|
||||
EValues_OGL_OVERLAY_PIXEL_TYPE g_valuesOGL_OVERLAY_PIXEL_TYPE[OGL_OVERLAY_PIXEL_TYPE_NUM_VALUES] =
|
||||
{
|
||||
OGL_OVERLAY_PIXEL_TYPE_NONE,
|
||||
OGL_OVERLAY_PIXEL_TYPE_CI,
|
||||
OGL_OVERLAY_PIXEL_TYPE_RGBA,
|
||||
OGL_OVERLAY_PIXEL_TYPE_CI_AND_RGBA,
|
||||
};
|
||||
|
||||
EValues_OGL_OVERLAY_SUPPORT g_valuesOGL_OVERLAY_SUPPORT[OGL_OVERLAY_SUPPORT_NUM_VALUES] =
|
||||
{
|
||||
OGL_OVERLAY_SUPPORT_OFF,
|
||||
OGL_OVERLAY_SUPPORT_ON,
|
||||
OGL_OVERLAY_SUPPORT_FORCE_SW,
|
||||
};
|
||||
|
||||
EValues_OGL_QUALITY_ENHANCEMENTS g_valuesOGL_QUALITY_ENHANCEMENTS[OGL_QUALITY_ENHANCEMENTS_NUM_VALUES] =
|
||||
{
|
||||
OGL_QUALITY_ENHANCEMENTS_HQUAL,
|
||||
OGL_QUALITY_ENHANCEMENTS_QUAL,
|
||||
OGL_QUALITY_ENHANCEMENTS_PERF,
|
||||
OGL_QUALITY_ENHANCEMENTS_HPERF,
|
||||
};
|
||||
|
||||
EValues_OGL_SINGLE_BACKDEPTH_BUFFER g_valuesOGL_SINGLE_BACKDEPTH_BUFFER[OGL_SINGLE_BACKDEPTH_BUFFER_NUM_VALUES] =
|
||||
{
|
||||
OGL_SINGLE_BACKDEPTH_BUFFER_DISABLE,
|
||||
OGL_SINGLE_BACKDEPTH_BUFFER_ENABLE,
|
||||
OGL_SINGLE_BACKDEPTH_BUFFER_USE_HW_DEFAULT,
|
||||
};
|
||||
|
||||
EValues_OGL_SLI_CFR_MODE g_valuesOGL_SLI_CFR_MODE[OGL_SLI_CFR_MODE_NUM_VALUES] =
|
||||
{
|
||||
OGL_SLI_CFR_MODE_DISABLE,
|
||||
OGL_SLI_CFR_MODE_ENABLE,
|
||||
OGL_SLI_CFR_MODE_CLASSIC_SFR,
|
||||
};
|
||||
|
||||
EValues_OGL_SLI_MULTICAST g_valuesOGL_SLI_MULTICAST[OGL_SLI_MULTICAST_NUM_VALUES] =
|
||||
{
|
||||
OGL_SLI_MULTICAST_DISABLE,
|
||||
OGL_SLI_MULTICAST_ENABLE,
|
||||
OGL_SLI_MULTICAST_FORCE_DISABLE,
|
||||
OGL_SLI_MULTICAST_ALLOW_MOSAIC,
|
||||
};
|
||||
|
||||
EValues_OGL_THREAD_CONTROL g_valuesOGL_THREAD_CONTROL[OGL_THREAD_CONTROL_NUM_VALUES] =
|
||||
{
|
||||
OGL_THREAD_CONTROL_ENABLE,
|
||||
OGL_THREAD_CONTROL_DISABLE,
|
||||
};
|
||||
|
||||
EValues_OGL_TMON_LEVEL g_valuesOGL_TMON_LEVEL[OGL_TMON_LEVEL_NUM_VALUES] =
|
||||
{
|
||||
OGL_TMON_LEVEL_DISABLE,
|
||||
OGL_TMON_LEVEL_CRITICAL,
|
||||
OGL_TMON_LEVEL_WARNING,
|
||||
OGL_TMON_LEVEL_INFORMATION,
|
||||
OGL_TMON_LEVEL_MOST,
|
||||
OGL_TMON_LEVEL_VERBOSE,
|
||||
};
|
||||
|
||||
EValues_OGL_TRIPLE_BUFFER g_valuesOGL_TRIPLE_BUFFER[OGL_TRIPLE_BUFFER_NUM_VALUES] =
|
||||
{
|
||||
OGL_TRIPLE_BUFFER_DISABLED,
|
||||
OGL_TRIPLE_BUFFER_ENABLED,
|
||||
};
|
||||
|
||||
EValues_AA_BEHAVIOR_FLAGS g_valuesAA_BEHAVIOR_FLAGS[AA_BEHAVIOR_FLAGS_NUM_VALUES] =
|
||||
{
|
||||
AA_BEHAVIOR_FLAGS_NONE,
|
||||
AA_BEHAVIOR_FLAGS_TREAT_OVERRIDE_AS_APP_CONTROLLED,
|
||||
AA_BEHAVIOR_FLAGS_TREAT_OVERRIDE_AS_ENHANCE,
|
||||
AA_BEHAVIOR_FLAGS_DISABLE_OVERRIDE,
|
||||
AA_BEHAVIOR_FLAGS_TREAT_ENHANCE_AS_APP_CONTROLLED,
|
||||
AA_BEHAVIOR_FLAGS_TREAT_ENHANCE_AS_OVERRIDE,
|
||||
AA_BEHAVIOR_FLAGS_DISABLE_ENHANCE,
|
||||
AA_BEHAVIOR_FLAGS_MAP_VCAA_TO_MULTISAMPLING,
|
||||
AA_BEHAVIOR_FLAGS_SLI_DISABLE_TRANSPARENCY_SUPERSAMPLING,
|
||||
AA_BEHAVIOR_FLAGS_DISABLE_CPLAA,
|
||||
AA_BEHAVIOR_FLAGS_SKIP_RT_DIM_CHECK_FOR_ENHANCE,
|
||||
AA_BEHAVIOR_FLAGS_DISABLE_SLIAA,
|
||||
AA_BEHAVIOR_FLAGS_DEFAULT,
|
||||
AA_BEHAVIOR_FLAGS_AA_RT_BPP_DIV_4,
|
||||
AA_BEHAVIOR_FLAGS_AA_RT_BPP_DIV_4_SHIFT,
|
||||
AA_BEHAVIOR_FLAGS_NON_AA_RT_BPP_DIV_4,
|
||||
AA_BEHAVIOR_FLAGS_NON_AA_RT_BPP_DIV_4_SHIFT,
|
||||
AA_BEHAVIOR_FLAGS_MASK,
|
||||
};
|
||||
|
||||
EValues_AA_MODE_ALPHATOCOVERAGE g_valuesAA_MODE_ALPHATOCOVERAGE[AA_MODE_ALPHATOCOVERAGE_NUM_VALUES] =
|
||||
{
|
||||
AA_MODE_ALPHATOCOVERAGE_MODE_MASK,
|
||||
AA_MODE_ALPHATOCOVERAGE_MODE_OFF,
|
||||
AA_MODE_ALPHATOCOVERAGE_MODE_ON,
|
||||
AA_MODE_ALPHATOCOVERAGE_MODE_MAX,
|
||||
};
|
||||
|
||||
EValues_AA_MODE_GAMMACORRECTION g_valuesAA_MODE_GAMMACORRECTION[AA_MODE_GAMMACORRECTION_NUM_VALUES] =
|
||||
{
|
||||
AA_MODE_GAMMACORRECTION_MASK,
|
||||
AA_MODE_GAMMACORRECTION_OFF,
|
||||
AA_MODE_GAMMACORRECTION_ON_IF_FOS,
|
||||
AA_MODE_GAMMACORRECTION_ON_ALWAYS,
|
||||
AA_MODE_GAMMACORRECTION_MAX,
|
||||
AA_MODE_GAMMACORRECTION_DEFAULT,
|
||||
AA_MODE_GAMMACORRECTION_DEFAULT_TESLA,
|
||||
AA_MODE_GAMMACORRECTION_DEFAULT_FERMI,
|
||||
};
|
||||
|
||||
EValues_AA_MODE_METHOD g_valuesAA_MODE_METHOD[AA_MODE_METHOD_NUM_VALUES] =
|
||||
{
|
||||
AA_MODE_METHOD_NONE,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_2X_H,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_2X_V,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_1_5X1_5,
|
||||
AA_MODE_METHOD_FREE_0x03,
|
||||
AA_MODE_METHOD_FREE_0x04,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_4X,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_4X_BIAS,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_4X_GAUSSIAN,
|
||||
AA_MODE_METHOD_FREE_0x08,
|
||||
AA_MODE_METHOD_FREE_0x09,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_9X,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_9X_BIAS,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_16X,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_16X_BIAS,
|
||||
AA_MODE_METHOD_MULTISAMPLE_2X_DIAGONAL,
|
||||
AA_MODE_METHOD_MULTISAMPLE_2X_QUINCUNX,
|
||||
AA_MODE_METHOD_MULTISAMPLE_4X,
|
||||
AA_MODE_METHOD_FREE_0x11,
|
||||
AA_MODE_METHOD_MULTISAMPLE_4X_GAUSSIAN,
|
||||
AA_MODE_METHOD_MIXEDSAMPLE_4X_SKEWED_4TAP,
|
||||
AA_MODE_METHOD_FREE_0x14,
|
||||
AA_MODE_METHOD_FREE_0x15,
|
||||
AA_MODE_METHOD_MIXEDSAMPLE_6X,
|
||||
AA_MODE_METHOD_MIXEDSAMPLE_6X_SKEWED_6TAP,
|
||||
AA_MODE_METHOD_MIXEDSAMPLE_8X,
|
||||
AA_MODE_METHOD_MIXEDSAMPLE_8X_SKEWED_8TAP,
|
||||
AA_MODE_METHOD_MIXEDSAMPLE_16X,
|
||||
AA_MODE_METHOD_MULTISAMPLE_4X_GAMMA,
|
||||
AA_MODE_METHOD_MULTISAMPLE_16X,
|
||||
AA_MODE_METHOD_VCAA_32X_8v24,
|
||||
AA_MODE_METHOD_CORRUPTION_CHECK,
|
||||
AA_MODE_METHOD_6X_CT,
|
||||
AA_MODE_METHOD_MULTISAMPLE_2X_DIAGONAL_GAMMA,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_4X_GAMMA,
|
||||
AA_MODE_METHOD_MULTISAMPLE_4X_FOSGAMMA,
|
||||
AA_MODE_METHOD_MULTISAMPLE_2X_DIAGONAL_FOSGAMMA,
|
||||
AA_MODE_METHOD_SUPERSAMPLE_4X_FOSGAMMA,
|
||||
AA_MODE_METHOD_MULTISAMPLE_8X,
|
||||
AA_MODE_METHOD_VCAA_8X_4v4,
|
||||
AA_MODE_METHOD_VCAA_16X_4v12,
|
||||
AA_MODE_METHOD_VCAA_16X_8v8,
|
||||
AA_MODE_METHOD_MIXEDSAMPLE_32X,
|
||||
AA_MODE_METHOD_SUPERVCAA_64X_4v12,
|
||||
AA_MODE_METHOD_SUPERVCAA_64X_8v8,
|
||||
AA_MODE_METHOD_MIXEDSAMPLE_64X,
|
||||
AA_MODE_METHOD_MIXEDSAMPLE_128X,
|
||||
AA_MODE_METHOD_COUNT,
|
||||
AA_MODE_METHOD_METHOD_MASK,
|
||||
AA_MODE_METHOD_METHOD_MAX,
|
||||
};
|
||||
|
||||
EValues_AA_MODE_REPLAY g_valuesAA_MODE_REPLAY[AA_MODE_REPLAY_NUM_VALUES] =
|
||||
{
|
||||
AA_MODE_REPLAY_SAMPLES_MASK,
|
||||
AA_MODE_REPLAY_SAMPLES_ONE,
|
||||
AA_MODE_REPLAY_SAMPLES_TWO,
|
||||
AA_MODE_REPLAY_SAMPLES_FOUR,
|
||||
AA_MODE_REPLAY_SAMPLES_EIGHT,
|
||||
AA_MODE_REPLAY_SAMPLES_MAX,
|
||||
AA_MODE_REPLAY_MODE_MASK,
|
||||
AA_MODE_REPLAY_MODE_OFF,
|
||||
AA_MODE_REPLAY_MODE_ALPHA_TEST,
|
||||
AA_MODE_REPLAY_MODE_PIXEL_KILL,
|
||||
AA_MODE_REPLAY_MODE_DYN_BRANCH,
|
||||
AA_MODE_REPLAY_MODE_OPTIMAL,
|
||||
AA_MODE_REPLAY_MODE_ALL,
|
||||
AA_MODE_REPLAY_MODE_MAX,
|
||||
AA_MODE_REPLAY_TRANSPARENCY,
|
||||
AA_MODE_REPLAY_DISALLOW_TRAA,
|
||||
AA_MODE_REPLAY_TRANSPARENCY_DEFAULT,
|
||||
AA_MODE_REPLAY_TRANSPARENCY_DEFAULT_TESLA,
|
||||
AA_MODE_REPLAY_TRANSPARENCY_DEFAULT_FERMI,
|
||||
AA_MODE_REPLAY_MASK,
|
||||
};
|
||||
|
||||
EValues_AA_MODE_SELECTOR g_valuesAA_MODE_SELECTOR[AA_MODE_SELECTOR_NUM_VALUES] =
|
||||
{
|
||||
AA_MODE_SELECTOR_MASK,
|
||||
AA_MODE_SELECTOR_APP_CONTROL,
|
||||
AA_MODE_SELECTOR_OVERRIDE,
|
||||
AA_MODE_SELECTOR_ENHANCE,
|
||||
AA_MODE_SELECTOR_MAX,
|
||||
};
|
||||
|
||||
EValues_AA_MODE_SELECTOR_SLIAA g_valuesAA_MODE_SELECTOR_SLIAA[AA_MODE_SELECTOR_SLIAA_NUM_VALUES] =
|
||||
{
|
||||
AA_MODE_SELECTOR_SLIAA_DISABLED,
|
||||
AA_MODE_SELECTOR_SLIAA_ENABLED,
|
||||
};
|
||||
|
||||
EValues_ANISO_MODE_LEVEL g_valuesANISO_MODE_LEVEL[ANISO_MODE_LEVEL_NUM_VALUES] =
|
||||
{
|
||||
ANISO_MODE_LEVEL_MASK,
|
||||
ANISO_MODE_LEVEL_NONE_POINT,
|
||||
ANISO_MODE_LEVEL_NONE_LINEAR,
|
||||
ANISO_MODE_LEVEL_MAX,
|
||||
ANISO_MODE_LEVEL_DEFAULT,
|
||||
};
|
||||
|
||||
EValues_ANISO_MODE_SELECTOR g_valuesANISO_MODE_SELECTOR[ANISO_MODE_SELECTOR_NUM_VALUES] =
|
||||
{
|
||||
ANISO_MODE_SELECTOR_MASK,
|
||||
ANISO_MODE_SELECTOR_APP,
|
||||
ANISO_MODE_SELECTOR_USER,
|
||||
ANISO_MODE_SELECTOR_COND,
|
||||
ANISO_MODE_SELECTOR_MAX,
|
||||
ANISO_MODE_SELECTOR_DEFAULT,
|
||||
};
|
||||
|
||||
EValues_ANSEL_ALLOW g_valuesANSEL_ALLOW[ANSEL_ALLOW_NUM_VALUES] =
|
||||
{
|
||||
ANSEL_ALLOW_DISALLOWED,
|
||||
ANSEL_ALLOW_ALLOWED,
|
||||
};
|
||||
|
||||
EValues_ANSEL_ALLOWLISTED g_valuesANSEL_ALLOWLISTED[ANSEL_ALLOWLISTED_NUM_VALUES] =
|
||||
{
|
||||
ANSEL_ALLOWLISTED_DISALLOWED,
|
||||
ANSEL_ALLOWLISTED_ALLOWED,
|
||||
};
|
||||
|
||||
EValues_ANSEL_ENABLE g_valuesANSEL_ENABLE[ANSEL_ENABLE_NUM_VALUES] =
|
||||
{
|
||||
ANSEL_ENABLE_OFF,
|
||||
ANSEL_ENABLE_ON,
|
||||
};
|
||||
|
||||
EValues_APPLICATION_PROFILE_NOTIFICATION_TIMEOUT g_valuesAPPLICATION_PROFILE_NOTIFICATION_TIMEOUT[APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_NUM_VALUES] =
|
||||
{
|
||||
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_DISABLED,
|
||||
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_NINE_SECONDS,
|
||||
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_FIFTEEN_SECONDS,
|
||||
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_THIRTY_SECONDS,
|
||||
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_ONE_MINUTE,
|
||||
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_TWO_MINUTES,
|
||||
};
|
||||
|
||||
EValues_BATTERY_BOOST_APP_FPS g_valuesBATTERY_BOOST_APP_FPS[BATTERY_BOOST_APP_FPS_NUM_VALUES] =
|
||||
{
|
||||
BATTERY_BOOST_APP_FPS_MIN,
|
||||
BATTERY_BOOST_APP_FPS_MAX,
|
||||
BATTERY_BOOST_APP_FPS_NO_OVERRIDE,
|
||||
};
|
||||
|
||||
EValues_CPL_HIDDEN_PROFILE g_valuesCPL_HIDDEN_PROFILE[CPL_HIDDEN_PROFILE_NUM_VALUES] =
|
||||
{
|
||||
CPL_HIDDEN_PROFILE_DISABLED,
|
||||
CPL_HIDDEN_PROFILE_ENABLED,
|
||||
};
|
||||
|
||||
const wchar_t * g_valuesCUDA_EXCLUDED_GPUS[CUDA_EXCLUDED_GPUS_NUM_VALUES] =
|
||||
{
|
||||
CUDA_EXCLUDED_GPUS_NONE
|
||||
};
|
||||
|
||||
const wchar_t * g_valuesD3DOGL_GPU_MAX_POWER[D3DOGL_GPU_MAX_POWER_NUM_VALUES] =
|
||||
{
|
||||
D3DOGL_GPU_MAX_POWER_DEFAULTPOWER
|
||||
};
|
||||
|
||||
EValues_EXPORT_PERF_COUNTERS g_valuesEXPORT_PERF_COUNTERS[EXPORT_PERF_COUNTERS_NUM_VALUES] =
|
||||
{
|
||||
EXPORT_PERF_COUNTERS_OFF,
|
||||
EXPORT_PERF_COUNTERS_ON,
|
||||
};
|
||||
|
||||
EValues_EXTERNAL_QUIET_MODE g_valuesEXTERNAL_QUIET_MODE[EXTERNAL_QUIET_MODE_NUM_VALUES] =
|
||||
{
|
||||
EXTERNAL_QUIET_MODE_ON,
|
||||
EXTERNAL_QUIET_MODE_OFF,
|
||||
};
|
||||
|
||||
EValues_FRL_FPS g_valuesFRL_FPS[FRL_FPS_NUM_VALUES] =
|
||||
{
|
||||
FRL_FPS_DISABLED,
|
||||
FRL_FPS_MIN,
|
||||
FRL_FPS_MAX,
|
||||
};
|
||||
|
||||
EValues_FXAA_ALLOW g_valuesFXAA_ALLOW[FXAA_ALLOW_NUM_VALUES] =
|
||||
{
|
||||
FXAA_ALLOW_DISALLOWED,
|
||||
FXAA_ALLOW_ALLOWED,
|
||||
};
|
||||
|
||||
EValues_FXAA_ENABLE g_valuesFXAA_ENABLE[FXAA_ENABLE_NUM_VALUES] =
|
||||
{
|
||||
FXAA_ENABLE_OFF,
|
||||
FXAA_ENABLE_ON,
|
||||
};
|
||||
|
||||
EValues_FXAA_INDICATOR_ENABLE g_valuesFXAA_INDICATOR_ENABLE[FXAA_INDICATOR_ENABLE_NUM_VALUES] =
|
||||
{
|
||||
FXAA_INDICATOR_ENABLE_OFF,
|
||||
FXAA_INDICATOR_ENABLE_ON,
|
||||
};
|
||||
|
||||
EValues_LATENCY_INDICATOR_AUTOALIGN g_valuesLATENCY_INDICATOR_AUTOALIGN[LATENCY_INDICATOR_AUTOALIGN_NUM_VALUES] =
|
||||
{
|
||||
LATENCY_INDICATOR_AUTOALIGN_DISABLED,
|
||||
LATENCY_INDICATOR_AUTOALIGN_ENABLED,
|
||||
};
|
||||
|
||||
EValues_MCSFRSHOWSPLIT g_valuesMCSFRSHOWSPLIT[MCSFRSHOWSPLIT_NUM_VALUES] =
|
||||
{
|
||||
MCSFRSHOWSPLIT_DISABLED,
|
||||
MCSFRSHOWSPLIT_ENABLED,
|
||||
};
|
||||
|
||||
EValues_NV_QUALITY_UPSCALING g_valuesNV_QUALITY_UPSCALING[NV_QUALITY_UPSCALING_NUM_VALUES] =
|
||||
{
|
||||
NV_QUALITY_UPSCALING_OFF,
|
||||
NV_QUALITY_UPSCALING_ON,
|
||||
};
|
||||
|
||||
EValues_OPTIMUS_MAXAA g_valuesOPTIMUS_MAXAA[OPTIMUS_MAXAA_NUM_VALUES] =
|
||||
{
|
||||
OPTIMUS_MAXAA_MIN,
|
||||
OPTIMUS_MAXAA_MAX,
|
||||
};
|
||||
|
||||
EValues_PHYSXINDICATOR g_valuesPHYSXINDICATOR[PHYSXINDICATOR_NUM_VALUES] =
|
||||
{
|
||||
PHYSXINDICATOR_DISABLED,
|
||||
PHYSXINDICATOR_ENABLED,
|
||||
};
|
||||
|
||||
EValues_PREFERRED_PSTATE g_valuesPREFERRED_PSTATE[PREFERRED_PSTATE_NUM_VALUES] =
|
||||
{
|
||||
PREFERRED_PSTATE_ADAPTIVE,
|
||||
PREFERRED_PSTATE_PREFER_MAX,
|
||||
PREFERRED_PSTATE_DRIVER_CONTROLLED,
|
||||
PREFERRED_PSTATE_PREFER_CONSISTENT_PERFORMANCE,
|
||||
PREFERRED_PSTATE_PREFER_MIN,
|
||||
PREFERRED_PSTATE_OPTIMAL_POWER,
|
||||
PREFERRED_PSTATE_MIN,
|
||||
PREFERRED_PSTATE_MAX,
|
||||
};
|
||||
|
||||
EValues_PREVENT_UI_AF_OVERRIDE g_valuesPREVENT_UI_AF_OVERRIDE[PREVENT_UI_AF_OVERRIDE_NUM_VALUES] =
|
||||
{
|
||||
PREVENT_UI_AF_OVERRIDE_OFF,
|
||||
PREVENT_UI_AF_OVERRIDE_ON,
|
||||
};
|
||||
|
||||
EValues_SHIM_MCCOMPAT g_valuesSHIM_MCCOMPAT[SHIM_MCCOMPAT_NUM_VALUES] =
|
||||
{
|
||||
SHIM_MCCOMPAT_INTEGRATED,
|
||||
SHIM_MCCOMPAT_ENABLE,
|
||||
SHIM_MCCOMPAT_USER_EDITABLE,
|
||||
SHIM_MCCOMPAT_MASK,
|
||||
SHIM_MCCOMPAT_VIDEO_MASK,
|
||||
SHIM_MCCOMPAT_VARYING_BIT,
|
||||
SHIM_MCCOMPAT_AUTO_SELECT,
|
||||
SHIM_MCCOMPAT_OVERRIDE_BIT,
|
||||
};
|
||||
|
||||
EValues_SHIM_RENDERING_MODE g_valuesSHIM_RENDERING_MODE[SHIM_RENDERING_MODE_NUM_VALUES] =
|
||||
{
|
||||
SHIM_RENDERING_MODE_INTEGRATED,
|
||||
SHIM_RENDERING_MODE_ENABLE,
|
||||
SHIM_RENDERING_MODE_USER_EDITABLE,
|
||||
SHIM_RENDERING_MODE_MASK,
|
||||
SHIM_RENDERING_MODE_VIDEO_MASK,
|
||||
SHIM_RENDERING_MODE_VARYING_BIT,
|
||||
SHIM_RENDERING_MODE_AUTO_SELECT,
|
||||
SHIM_RENDERING_MODE_OVERRIDE_BIT,
|
||||
};
|
||||
|
||||
EValues_SHIM_RENDERING_OPTIONS g_valuesSHIM_RENDERING_OPTIONS[SHIM_RENDERING_OPTIONS_NUM_VALUES] =
|
||||
{
|
||||
SHIM_RENDERING_OPTIONS_DEFAULT_RENDERING_MODE,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_ASYNC_PRESENT,
|
||||
SHIM_RENDERING_OPTIONS_EHSHELL_DETECT,
|
||||
SHIM_RENDERING_OPTIONS_FLASHPLAYER_HOST_DETECT,
|
||||
SHIM_RENDERING_OPTIONS_VIDEO_DRM_APP_DETECT,
|
||||
SHIM_RENDERING_OPTIONS_IGNORE_OVERRIDES,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED1,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_DWM_ASYNC_PRESENT,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED2,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_INHERITANCE,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_WRAPPERS,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DXGI_WRAPPERS,
|
||||
SHIM_RENDERING_OPTIONS_PRUNE_UNSUPPORTED_FORMATS,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_ALPHA_FORMAT,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_CUDA,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_CP_CAPS_FOR_VIDEO,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING_FWD_OPTIMUS,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DURING_SECURE_BOOT,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_QUADRO,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_MSHYBRID,
|
||||
SHIM_RENDERING_OPTIONS_REGISTER_PROCESS_ENABLE_GOLD,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WINDOWED_MODE_PERF_OPT,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WIN7_ASYNC_RUNTIME_BUG,
|
||||
SHIM_RENDERING_OPTIONS_EXPLICIT_ADAPTER_OPTED_BY_APP,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_DYNAMIC_DISPLAY_MUX_SWITCH,
|
||||
SHIM_RENDERING_OPTIONS_DISALLOW_DYNAMIC_DISPLAY_MUX_SWITCH,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_TURING_POWER_POLICY,
|
||||
};
|
||||
|
||||
EValues_SLI_GPU_COUNT g_valuesSLI_GPU_COUNT[SLI_GPU_COUNT_NUM_VALUES] =
|
||||
{
|
||||
SLI_GPU_COUNT_AUTOSELECT,
|
||||
SLI_GPU_COUNT_ONE,
|
||||
SLI_GPU_COUNT_TWO,
|
||||
SLI_GPU_COUNT_THREE,
|
||||
SLI_GPU_COUNT_FOUR,
|
||||
};
|
||||
|
||||
EValues_SLI_PREDEFINED_GPU_COUNT g_valuesSLI_PREDEFINED_GPU_COUNT[SLI_PREDEFINED_GPU_COUNT_NUM_VALUES] =
|
||||
{
|
||||
SLI_PREDEFINED_GPU_COUNT_AUTOSELECT,
|
||||
SLI_PREDEFINED_GPU_COUNT_ONE,
|
||||
SLI_PREDEFINED_GPU_COUNT_TWO,
|
||||
SLI_PREDEFINED_GPU_COUNT_THREE,
|
||||
SLI_PREDEFINED_GPU_COUNT_FOUR,
|
||||
};
|
||||
|
||||
EValues_SLI_PREDEFINED_GPU_COUNT_DX10 g_valuesSLI_PREDEFINED_GPU_COUNT_DX10[SLI_PREDEFINED_GPU_COUNT_DX10_NUM_VALUES] =
|
||||
{
|
||||
SLI_PREDEFINED_GPU_COUNT_DX10_AUTOSELECT,
|
||||
SLI_PREDEFINED_GPU_COUNT_DX10_ONE,
|
||||
SLI_PREDEFINED_GPU_COUNT_DX10_TWO,
|
||||
SLI_PREDEFINED_GPU_COUNT_DX10_THREE,
|
||||
SLI_PREDEFINED_GPU_COUNT_DX10_FOUR,
|
||||
};
|
||||
|
||||
EValues_SLI_PREDEFINED_MODE g_valuesSLI_PREDEFINED_MODE[SLI_PREDEFINED_MODE_NUM_VALUES] =
|
||||
{
|
||||
SLI_PREDEFINED_MODE_AUTOSELECT,
|
||||
SLI_PREDEFINED_MODE_FORCE_SINGLE,
|
||||
SLI_PREDEFINED_MODE_FORCE_AFR,
|
||||
SLI_PREDEFINED_MODE_FORCE_AFR2,
|
||||
SLI_PREDEFINED_MODE_FORCE_SFR,
|
||||
SLI_PREDEFINED_MODE_FORCE_AFR_OF_SFR__FALLBACK_3AFR,
|
||||
};
|
||||
|
||||
EValues_SLI_PREDEFINED_MODE_DX10 g_valuesSLI_PREDEFINED_MODE_DX10[SLI_PREDEFINED_MODE_DX10_NUM_VALUES] =
|
||||
{
|
||||
SLI_PREDEFINED_MODE_DX10_AUTOSELECT,
|
||||
SLI_PREDEFINED_MODE_DX10_FORCE_SINGLE,
|
||||
SLI_PREDEFINED_MODE_DX10_FORCE_AFR,
|
||||
SLI_PREDEFINED_MODE_DX10_FORCE_AFR2,
|
||||
SLI_PREDEFINED_MODE_DX10_FORCE_SFR,
|
||||
SLI_PREDEFINED_MODE_DX10_FORCE_AFR_OF_SFR__FALLBACK_3AFR,
|
||||
};
|
||||
|
||||
EValues_SLI_RENDERING_MODE g_valuesSLI_RENDERING_MODE[SLI_RENDERING_MODE_NUM_VALUES] =
|
||||
{
|
||||
SLI_RENDERING_MODE_AUTOSELECT,
|
||||
SLI_RENDERING_MODE_FORCE_SINGLE,
|
||||
SLI_RENDERING_MODE_FORCE_AFR,
|
||||
SLI_RENDERING_MODE_FORCE_AFR2,
|
||||
SLI_RENDERING_MODE_FORCE_SFR,
|
||||
SLI_RENDERING_MODE_FORCE_AFR_OF_SFR__FALLBACK_3AFR,
|
||||
};
|
||||
|
||||
EValues_VRPRERENDERLIMIT g_valuesVRPRERENDERLIMIT[VRPRERENDERLIMIT_NUM_VALUES] =
|
||||
{
|
||||
VRPRERENDERLIMIT_MIN,
|
||||
VRPRERENDERLIMIT_MAX,
|
||||
VRPRERENDERLIMIT_APP_CONTROLLED,
|
||||
VRPRERENDERLIMIT_DEFAULT,
|
||||
};
|
||||
|
||||
EValues_VRRFEATUREINDICATOR g_valuesVRRFEATUREINDICATOR[VRRFEATUREINDICATOR_NUM_VALUES] =
|
||||
{
|
||||
VRRFEATUREINDICATOR_DISABLED,
|
||||
VRRFEATUREINDICATOR_ENABLED,
|
||||
};
|
||||
|
||||
EValues_VRROVERLAYINDICATOR g_valuesVRROVERLAYINDICATOR[VRROVERLAYINDICATOR_NUM_VALUES] =
|
||||
{
|
||||
VRROVERLAYINDICATOR_DISABLED,
|
||||
VRROVERLAYINDICATOR_ENABLED,
|
||||
};
|
||||
|
||||
EValues_VRRREQUESTSTATE g_valuesVRRREQUESTSTATE[VRRREQUESTSTATE_NUM_VALUES] =
|
||||
{
|
||||
VRRREQUESTSTATE_DISABLED,
|
||||
VRRREQUESTSTATE_FULLSCREEN_ONLY,
|
||||
VRRREQUESTSTATE_FULLSCREEN_AND_WINDOWED,
|
||||
};
|
||||
|
||||
EValues_VRR_APP_OVERRIDE g_valuesVRR_APP_OVERRIDE[VRR_APP_OVERRIDE_NUM_VALUES] =
|
||||
{
|
||||
VRR_APP_OVERRIDE_ALLOW,
|
||||
VRR_APP_OVERRIDE_FORCE_OFF,
|
||||
VRR_APP_OVERRIDE_DISALLOW,
|
||||
VRR_APP_OVERRIDE_ULMB,
|
||||
VRR_APP_OVERRIDE_FIXED_REFRESH,
|
||||
};
|
||||
|
||||
EValues_VRR_APP_OVERRIDE_REQUEST_STATE g_valuesVRR_APP_OVERRIDE_REQUEST_STATE[VRR_APP_OVERRIDE_REQUEST_STATE_NUM_VALUES] =
|
||||
{
|
||||
VRR_APP_OVERRIDE_REQUEST_STATE_ALLOW,
|
||||
VRR_APP_OVERRIDE_REQUEST_STATE_FORCE_OFF,
|
||||
VRR_APP_OVERRIDE_REQUEST_STATE_DISALLOW,
|
||||
VRR_APP_OVERRIDE_REQUEST_STATE_ULMB,
|
||||
VRR_APP_OVERRIDE_REQUEST_STATE_FIXED_REFRESH,
|
||||
};
|
||||
|
||||
EValues_VRR_MODE g_valuesVRR_MODE[VRR_MODE_NUM_VALUES] =
|
||||
{
|
||||
VRR_MODE_DISABLED,
|
||||
VRR_MODE_FULLSCREEN_ONLY,
|
||||
VRR_MODE_FULLSCREEN_AND_WINDOWED,
|
||||
};
|
||||
|
||||
EValues_VSYNCSMOOTHAFR g_valuesVSYNCSMOOTHAFR[VSYNCSMOOTHAFR_NUM_VALUES] =
|
||||
{
|
||||
VSYNCSMOOTHAFR_OFF,
|
||||
VSYNCSMOOTHAFR_ON,
|
||||
};
|
||||
|
||||
EValues_VSYNCVRRCONTROL g_valuesVSYNCVRRCONTROL[VSYNCVRRCONTROL_NUM_VALUES] =
|
||||
{
|
||||
VSYNCVRRCONTROL_DISABLE,
|
||||
VSYNCVRRCONTROL_ENABLE,
|
||||
VSYNCVRRCONTROL_NOTSUPPORTED,
|
||||
};
|
||||
|
||||
EValues_VSYNC_BEHAVIOR_FLAGS g_valuesVSYNC_BEHAVIOR_FLAGS[VSYNC_BEHAVIOR_FLAGS_NUM_VALUES] =
|
||||
{
|
||||
VSYNC_BEHAVIOR_FLAGS_NONE,
|
||||
VSYNC_BEHAVIOR_FLAGS_DEFAULT,
|
||||
VSYNC_BEHAVIOR_FLAGS_IGNORE_FLIPINTERVAL_MULTIPLE,
|
||||
};
|
||||
|
||||
EValues_WKS_API_STEREO_EYES_EXCHANGE g_valuesWKS_API_STEREO_EYES_EXCHANGE[WKS_API_STEREO_EYES_EXCHANGE_NUM_VALUES] =
|
||||
{
|
||||
WKS_API_STEREO_EYES_EXCHANGE_OFF,
|
||||
WKS_API_STEREO_EYES_EXCHANGE_ON,
|
||||
};
|
||||
|
||||
EValues_WKS_API_STEREO_MODE g_valuesWKS_API_STEREO_MODE[WKS_API_STEREO_MODE_NUM_VALUES] =
|
||||
{
|
||||
WKS_API_STEREO_MODE_SHUTTER_GLASSES,
|
||||
WKS_API_STEREO_MODE_VERTICAL_INTERLACED,
|
||||
WKS_API_STEREO_MODE_TWINVIEW,
|
||||
WKS_API_STEREO_MODE_NV17_SHUTTER_GLASSES_AUTO,
|
||||
WKS_API_STEREO_MODE_NV17_SHUTTER_GLASSES_DAC0,
|
||||
WKS_API_STEREO_MODE_NV17_SHUTTER_GLASSES_DAC1,
|
||||
WKS_API_STEREO_MODE_COLOR_LINE,
|
||||
WKS_API_STEREO_MODE_COLOR_INTERLEAVED,
|
||||
WKS_API_STEREO_MODE_ANAGLYPH,
|
||||
WKS_API_STEREO_MODE_HORIZONTAL_INTERLACED,
|
||||
WKS_API_STEREO_MODE_SIDE_FIELD,
|
||||
WKS_API_STEREO_MODE_SUB_FIELD,
|
||||
WKS_API_STEREO_MODE_CHECKERBOARD,
|
||||
WKS_API_STEREO_MODE_INVERSE_CHECKERBOARD,
|
||||
WKS_API_STEREO_MODE_TRIDELITY_SL,
|
||||
WKS_API_STEREO_MODE_TRIDELITY_MV,
|
||||
WKS_API_STEREO_MODE_SEEFRONT,
|
||||
WKS_API_STEREO_MODE_STEREO_MIRROR,
|
||||
WKS_API_STEREO_MODE_FRAME_SEQUENTIAL,
|
||||
WKS_API_STEREO_MODE_AUTODETECT_PASSIVE_MODE,
|
||||
WKS_API_STEREO_MODE_AEGIS_DT_FRAME_SEQUENTIAL,
|
||||
WKS_API_STEREO_MODE_OEM_EMITTER_FRAME_SEQUENTIAL,
|
||||
WKS_API_STEREO_MODE_DP_INBAND,
|
||||
WKS_API_STEREO_MODE_USE_HW_DEFAULT,
|
||||
WKS_API_STEREO_MODE_DEFAULT_GL,
|
||||
};
|
||||
|
||||
EValues_WKS_MEMORY_ALLOCATION_POLICY g_valuesWKS_MEMORY_ALLOCATION_POLICY[WKS_MEMORY_ALLOCATION_POLICY_NUM_VALUES] =
|
||||
{
|
||||
WKS_MEMORY_ALLOCATION_POLICY_AS_NEEDED,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_MODERATE_PRE_ALLOCATION,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_AGGRESSIVE_PRE_ALLOCATION,
|
||||
};
|
||||
|
||||
EValues_WKS_STEREO_DONGLE_SUPPORT g_valuesWKS_STEREO_DONGLE_SUPPORT[WKS_STEREO_DONGLE_SUPPORT_NUM_VALUES] =
|
||||
{
|
||||
WKS_STEREO_DONGLE_SUPPORT_OFF,
|
||||
WKS_STEREO_DONGLE_SUPPORT_DAC,
|
||||
WKS_STEREO_DONGLE_SUPPORT_DLP,
|
||||
};
|
||||
|
||||
EValues_WKS_STEREO_SUPPORT g_valuesWKS_STEREO_SUPPORT[WKS_STEREO_SUPPORT_NUM_VALUES] =
|
||||
{
|
||||
WKS_STEREO_SUPPORT_OFF,
|
||||
WKS_STEREO_SUPPORT_ON,
|
||||
};
|
||||
|
||||
EValues_WKS_STEREO_SWAP_MODE g_valuesWKS_STEREO_SWAP_MODE[WKS_STEREO_SWAP_MODE_NUM_VALUES] =
|
||||
{
|
||||
WKS_STEREO_SWAP_MODE_APPLICATION_CONTROL,
|
||||
WKS_STEREO_SWAP_MODE_PER_EYE,
|
||||
WKS_STEREO_SWAP_MODE_PER_EYE_PAIR,
|
||||
WKS_STEREO_SWAP_MODE_LEGACY_BEHAVIOR,
|
||||
WKS_STEREO_SWAP_MODE_PER_EYE_FOR_SWAP_GROUP,
|
||||
};
|
||||
|
||||
EValues_AO_MODE g_valuesAO_MODE[AO_MODE_NUM_VALUES] =
|
||||
{
|
||||
AO_MODE_OFF,
|
||||
AO_MODE_LOW,
|
||||
AO_MODE_MEDIUM,
|
||||
AO_MODE_HIGH,
|
||||
};
|
||||
|
||||
EValues_AO_MODE_ACTIVE g_valuesAO_MODE_ACTIVE[AO_MODE_ACTIVE_NUM_VALUES] =
|
||||
{
|
||||
AO_MODE_ACTIVE_DISABLED,
|
||||
AO_MODE_ACTIVE_ENABLED,
|
||||
};
|
||||
|
||||
EValues_AUTO_LODBIASADJUST g_valuesAUTO_LODBIASADJUST[AUTO_LODBIASADJUST_NUM_VALUES] =
|
||||
{
|
||||
AUTO_LODBIASADJUST_OFF,
|
||||
AUTO_LODBIASADJUST_ON,
|
||||
};
|
||||
|
||||
EValues_EXPORT_PERF_COUNTERS_DX9_ONLY g_valuesEXPORT_PERF_COUNTERS_DX9_ONLY[EXPORT_PERF_COUNTERS_DX9_ONLY_NUM_VALUES] =
|
||||
{
|
||||
EXPORT_PERF_COUNTERS_DX9_ONLY_OFF,
|
||||
EXPORT_PERF_COUNTERS_DX9_ONLY_ON,
|
||||
};
|
||||
|
||||
EValues_LODBIASADJUST g_valuesLODBIASADJUST[LODBIASADJUST_NUM_VALUES] =
|
||||
{
|
||||
LODBIASADJUST_MIN,
|
||||
LODBIASADJUST_MAX,
|
||||
};
|
||||
|
||||
EValues_MAXWELL_B_SAMPLE_INTERLEAVE g_valuesMAXWELL_B_SAMPLE_INTERLEAVE[MAXWELL_B_SAMPLE_INTERLEAVE_NUM_VALUES] =
|
||||
{
|
||||
MAXWELL_B_SAMPLE_INTERLEAVE_OFF,
|
||||
MAXWELL_B_SAMPLE_INTERLEAVE_ON,
|
||||
};
|
||||
|
||||
EValues_PRERENDERLIMIT g_valuesPRERENDERLIMIT[PRERENDERLIMIT_NUM_VALUES] =
|
||||
{
|
||||
PRERENDERLIMIT_MIN,
|
||||
PRERENDERLIMIT_MAX,
|
||||
PRERENDERLIMIT_APP_CONTROLLED,
|
||||
};
|
||||
|
||||
EValues_PS_SHADERDISKCACHE g_valuesPS_SHADERDISKCACHE[PS_SHADERDISKCACHE_NUM_VALUES] =
|
||||
{
|
||||
PS_SHADERDISKCACHE_OFF,
|
||||
PS_SHADERDISKCACHE_ON,
|
||||
};
|
||||
|
||||
EValues_PS_SHADERDISKCACHE_MAX_SIZE g_valuesPS_SHADERDISKCACHE_MAX_SIZE[PS_SHADERDISKCACHE_MAX_SIZE_NUM_VALUES] =
|
||||
{
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_MIN,
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_MAX,
|
||||
};
|
||||
|
||||
EValues_PS_TEXFILTER_ANISO_OPTS2 g_valuesPS_TEXFILTER_ANISO_OPTS2[PS_TEXFILTER_ANISO_OPTS2_NUM_VALUES] =
|
||||
{
|
||||
PS_TEXFILTER_ANISO_OPTS2_OFF,
|
||||
PS_TEXFILTER_ANISO_OPTS2_ON,
|
||||
};
|
||||
|
||||
EValues_PS_TEXFILTER_BILINEAR_IN_ANISO g_valuesPS_TEXFILTER_BILINEAR_IN_ANISO[PS_TEXFILTER_BILINEAR_IN_ANISO_NUM_VALUES] =
|
||||
{
|
||||
PS_TEXFILTER_BILINEAR_IN_ANISO_OFF,
|
||||
PS_TEXFILTER_BILINEAR_IN_ANISO_ON,
|
||||
};
|
||||
|
||||
EValues_PS_TEXFILTER_DISABLE_TRILIN_SLOPE g_valuesPS_TEXFILTER_DISABLE_TRILIN_SLOPE[PS_TEXFILTER_DISABLE_TRILIN_SLOPE_NUM_VALUES] =
|
||||
{
|
||||
PS_TEXFILTER_DISABLE_TRILIN_SLOPE_OFF,
|
||||
PS_TEXFILTER_DISABLE_TRILIN_SLOPE_ON,
|
||||
};
|
||||
|
||||
EValues_PS_TEXFILTER_NO_NEG_LODBIAS g_valuesPS_TEXFILTER_NO_NEG_LODBIAS[PS_TEXFILTER_NO_NEG_LODBIAS_NUM_VALUES] =
|
||||
{
|
||||
PS_TEXFILTER_NO_NEG_LODBIAS_OFF,
|
||||
PS_TEXFILTER_NO_NEG_LODBIAS_ON,
|
||||
};
|
||||
|
||||
EValues_QUALITY_ENHANCEMENTS g_valuesQUALITY_ENHANCEMENTS[QUALITY_ENHANCEMENTS_NUM_VALUES] =
|
||||
{
|
||||
QUALITY_ENHANCEMENTS_HIGHQUALITY,
|
||||
QUALITY_ENHANCEMENTS_QUALITY,
|
||||
QUALITY_ENHANCEMENTS_PERFORMANCE,
|
||||
QUALITY_ENHANCEMENTS_HIGHPERFORMANCE,
|
||||
};
|
||||
|
||||
EValues_QUALITY_ENHANCEMENT_SUBSTITUTION g_valuesQUALITY_ENHANCEMENT_SUBSTITUTION[QUALITY_ENHANCEMENT_SUBSTITUTION_NUM_VALUES] =
|
||||
{
|
||||
QUALITY_ENHANCEMENT_SUBSTITUTION_NO_SUBSTITUTION,
|
||||
QUALITY_ENHANCEMENT_SUBSTITUTION_HIGHQUALITY_BECOMES_QUALITY,
|
||||
};
|
||||
|
||||
EValues_REFRESH_RATE_OVERRIDE g_valuesREFRESH_RATE_OVERRIDE[REFRESH_RATE_OVERRIDE_NUM_VALUES] =
|
||||
{
|
||||
REFRESH_RATE_OVERRIDE_APPLICATION_CONTROLLED,
|
||||
REFRESH_RATE_OVERRIDE_HIGHEST_AVAILABLE,
|
||||
REFRESH_RATE_OVERRIDE_LOW_LATENCY_RR_MASK,
|
||||
};
|
||||
|
||||
EValues_SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE g_valuesSET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE[SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_NUM_VALUES] =
|
||||
{
|
||||
SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_OFF,
|
||||
SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_ON,
|
||||
};
|
||||
|
||||
EValues_SET_VAB_DATA g_valuesSET_VAB_DATA[SET_VAB_DATA_NUM_VALUES] =
|
||||
{
|
||||
SET_VAB_DATA_ZERO,
|
||||
SET_VAB_DATA_UINT_ONE,
|
||||
SET_VAB_DATA_FLOAT_ONE,
|
||||
SET_VAB_DATA_FLOAT_POS_INF,
|
||||
SET_VAB_DATA_FLOAT_NAN,
|
||||
SET_VAB_DATA_USE_API_DEFAULTS,
|
||||
};
|
||||
|
||||
EValues_VSYNCMODE g_valuesVSYNCMODE[VSYNCMODE_NUM_VALUES] =
|
||||
{
|
||||
VSYNCMODE_PASSIVE,
|
||||
VSYNCMODE_FORCEOFF,
|
||||
VSYNCMODE_FORCEON,
|
||||
VSYNCMODE_FLIPINTERVAL2,
|
||||
VSYNCMODE_FLIPINTERVAL3,
|
||||
VSYNCMODE_FLIPINTERVAL4,
|
||||
VSYNCMODE_VIRTUAL,
|
||||
};
|
||||
|
||||
EValues_VSYNCTEARCONTROL g_valuesVSYNCTEARCONTROL[VSYNCTEARCONTROL_NUM_VALUES] =
|
||||
{
|
||||
VSYNCTEARCONTROL_DISABLE,
|
||||
VSYNCTEARCONTROL_ENABLE,
|
||||
};
|
||||
|
||||
|
||||
SettingDWORDNameString mapSettingDWORD[TOTAL_DWORD_SETTING_NUM] =
|
||||
{
|
||||
{OGL_AA_LINE_GAMMA_ID, OGL_AA_LINE_GAMMA_STRING, 4, (NvU32 *)g_valuesOGL_AA_LINE_GAMMA, OGL_AA_LINE_GAMMA_DISABLED},
|
||||
{OGL_CPL_GDI_COMPATIBILITY_ID, OGL_CPL_GDI_COMPATIBILITY_STRING, 3, (NvU32 *)g_valuesOGL_CPL_GDI_COMPATIBILITY, OGL_CPL_GDI_COMPATIBILITY_AUTO},
|
||||
{OGL_CPL_PREFER_DXPRESENT_ID, OGL_CPL_PREFER_DXPRESENT_STRING, 3, (NvU32 *)g_valuesOGL_CPL_PREFER_DXPRESENT, OGL_CPL_PREFER_DXPRESENT_AUTO},
|
||||
{OGL_DEEP_COLOR_SCANOUT_ID, OGL_DEEP_COLOR_SCANOUT_STRING, 2, (NvU32 *)g_valuesOGL_DEEP_COLOR_SCANOUT, OGL_DEEP_COLOR_SCANOUT_ENABLE},
|
||||
{OGL_DEFAULT_SWAP_INTERVAL_ID, OGL_DEFAULT_SWAP_INTERVAL_STRING, 9, (NvU32 *)g_valuesOGL_DEFAULT_SWAP_INTERVAL, OGL_DEFAULT_SWAP_INTERVAL_VSYNC_ONE},
|
||||
{OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_ID, OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_STRING, 2, (NvU32 *)g_valuesOGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL, 0x00000000},
|
||||
{OGL_DEFAULT_SWAP_INTERVAL_SIGN_ID, OGL_DEFAULT_SWAP_INTERVAL_SIGN_STRING, 2, (NvU32 *)g_valuesOGL_DEFAULT_SWAP_INTERVAL_SIGN, OGL_DEFAULT_SWAP_INTERVAL_SIGN_POSITIVE},
|
||||
{OGL_EVENT_LOG_SEVERITY_THRESHOLD_ID, OGL_EVENT_LOG_SEVERITY_THRESHOLD_STRING, 5, (NvU32 *)g_valuesOGL_EVENT_LOG_SEVERITY_THRESHOLD, OGL_EVENT_LOG_SEVERITY_THRESHOLD_ALL},
|
||||
{OGL_EXTENSION_STRING_VERSION_ID, OGL_EXTENSION_STRING_VERSION_STRING, 0, NULL, 0x00000000},
|
||||
{OGL_FORCE_BLIT_ID, OGL_FORCE_BLIT_STRING, 2, (NvU32 *)g_valuesOGL_FORCE_BLIT, OGL_FORCE_BLIT_OFF},
|
||||
{OGL_FORCE_STEREO_ID, OGL_FORCE_STEREO_STRING, 2, (NvU32 *)g_valuesOGL_FORCE_STEREO, OGL_FORCE_STEREO_OFF},
|
||||
{OGL_MAX_FRAMES_ALLOWED_ID, OGL_MAX_FRAMES_ALLOWED_STRING, 0, NULL, 0x00000002},
|
||||
{OGL_OVERLAY_PIXEL_TYPE_ID, OGL_OVERLAY_PIXEL_TYPE_STRING, 4, (NvU32 *)g_valuesOGL_OVERLAY_PIXEL_TYPE, OGL_OVERLAY_PIXEL_TYPE_CI},
|
||||
{OGL_OVERLAY_SUPPORT_ID, OGL_OVERLAY_SUPPORT_STRING, 3, (NvU32 *)g_valuesOGL_OVERLAY_SUPPORT, OGL_OVERLAY_SUPPORT_OFF},
|
||||
{OGL_QUALITY_ENHANCEMENTS_ID, OGL_QUALITY_ENHANCEMENTS_STRING, 4, (NvU32 *)g_valuesOGL_QUALITY_ENHANCEMENTS, OGL_QUALITY_ENHANCEMENTS_QUAL},
|
||||
{OGL_SINGLE_BACKDEPTH_BUFFER_ID, OGL_SINGLE_BACKDEPTH_BUFFER_STRING, 3, (NvU32 *)g_valuesOGL_SINGLE_BACKDEPTH_BUFFER, OGL_SINGLE_BACKDEPTH_BUFFER_DISABLE},
|
||||
{OGL_SLI_CFR_MODE_ID, OGL_SLI_CFR_MODE_STRING, 3, (NvU32 *)g_valuesOGL_SLI_CFR_MODE, OGL_SLI_CFR_MODE_DISABLE},
|
||||
{OGL_SLI_MULTICAST_ID, OGL_SLI_MULTICAST_STRING, 4, (NvU32 *)g_valuesOGL_SLI_MULTICAST, OGL_SLI_MULTICAST_DISABLE},
|
||||
{OGL_THREAD_CONTROL_ID, OGL_THREAD_CONTROL_STRING, 2, (NvU32 *)g_valuesOGL_THREAD_CONTROL, 0x00000000},
|
||||
{OGL_TMON_LEVEL_ID, OGL_TMON_LEVEL_STRING, 6, (NvU32 *)g_valuesOGL_TMON_LEVEL, OGL_TMON_LEVEL_MOST},
|
||||
{OGL_TRIPLE_BUFFER_ID, OGL_TRIPLE_BUFFER_STRING, 2, (NvU32 *)g_valuesOGL_TRIPLE_BUFFER, OGL_TRIPLE_BUFFER_DISABLED},
|
||||
{AA_BEHAVIOR_FLAGS_ID, AA_BEHAVIOR_FLAGS_STRING, 18, (NvU32 *)g_valuesAA_BEHAVIOR_FLAGS, AA_BEHAVIOR_FLAGS_DEFAULT},
|
||||
{AA_MODE_ALPHATOCOVERAGE_ID, AA_MODE_ALPHATOCOVERAGE_STRING, 4, (NvU32 *)g_valuesAA_MODE_ALPHATOCOVERAGE, 0x00000000},
|
||||
{AA_MODE_GAMMACORRECTION_ID, AA_MODE_GAMMACORRECTION_STRING, 8, (NvU32 *)g_valuesAA_MODE_GAMMACORRECTION, 0x00000000},
|
||||
{AA_MODE_METHOD_ID, AA_MODE_METHOD_STRING, 50, (NvU32 *)g_valuesAA_MODE_METHOD, AA_MODE_METHOD_NONE},
|
||||
{AA_MODE_REPLAY_ID, AA_MODE_REPLAY_STRING, 20, (NvU32 *)g_valuesAA_MODE_REPLAY, 0x00000000},
|
||||
{AA_MODE_SELECTOR_ID, AA_MODE_SELECTOR_STRING, 5, (NvU32 *)g_valuesAA_MODE_SELECTOR, AA_MODE_SELECTOR_APP_CONTROL},
|
||||
{AA_MODE_SELECTOR_SLIAA_ID, AA_MODE_SELECTOR_SLIAA_STRING, 2, (NvU32 *)g_valuesAA_MODE_SELECTOR_SLIAA, AA_MODE_SELECTOR_SLIAA_DISABLED},
|
||||
{ANISO_MODE_LEVEL_ID, ANISO_MODE_LEVEL_STRING, 5, (NvU32 *)g_valuesANISO_MODE_LEVEL, ANISO_MODE_LEVEL_DEFAULT},
|
||||
{ANISO_MODE_SELECTOR_ID, ANISO_MODE_SELECTOR_STRING, 6, (NvU32 *)g_valuesANISO_MODE_SELECTOR, ANISO_MODE_SELECTOR_DEFAULT},
|
||||
{ANSEL_ALLOW_ID, ANSEL_ALLOW_STRING, 2, (NvU32 *)g_valuesANSEL_ALLOW, ANSEL_ALLOW_ALLOWED},
|
||||
{ANSEL_ALLOWLISTED_ID, ANSEL_ALLOWLISTED_STRING, 2, (NvU32 *)g_valuesANSEL_ALLOWLISTED, ANSEL_ALLOWLISTED_DISALLOWED},
|
||||
{ANSEL_ENABLE_ID, ANSEL_ENABLE_STRING, 2, (NvU32 *)g_valuesANSEL_ENABLE, ANSEL_ENABLE_ON},
|
||||
{APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_ID, APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_STRING, 6, (NvU32 *)g_valuesAPPLICATION_PROFILE_NOTIFICATION_TIMEOUT, APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_DISABLED},
|
||||
{APPLICATION_STEAM_ID_ID, APPLICATION_STEAM_ID_STRING, 0, NULL, 0x00000000},
|
||||
{BATTERY_BOOST_APP_FPS_ID, BATTERY_BOOST_APP_FPS_STRING, 3, (NvU32 *)g_valuesBATTERY_BOOST_APP_FPS, BATTERY_BOOST_APP_FPS_NO_OVERRIDE},
|
||||
{CPL_HIDDEN_PROFILE_ID, CPL_HIDDEN_PROFILE_STRING, 2, (NvU32 *)g_valuesCPL_HIDDEN_PROFILE, CPL_HIDDEN_PROFILE_DISABLED},
|
||||
{EXPORT_PERF_COUNTERS_ID, EXPORT_PERF_COUNTERS_STRING, 2, (NvU32 *)g_valuesEXPORT_PERF_COUNTERS, EXPORT_PERF_COUNTERS_OFF},
|
||||
{EXTERNAL_QUIET_MODE_ID, EXTERNAL_QUIET_MODE_STRING, 2, (NvU32 *)g_valuesEXTERNAL_QUIET_MODE, EXTERNAL_QUIET_MODE_OFF},
|
||||
{FRL_FPS_ID, FRL_FPS_STRING, 3, (NvU32 *)g_valuesFRL_FPS, FRL_FPS_DISABLED},
|
||||
{FXAA_ALLOW_ID, FXAA_ALLOW_STRING, 2, (NvU32 *)g_valuesFXAA_ALLOW, FXAA_ALLOW_ALLOWED},
|
||||
{FXAA_ENABLE_ID, FXAA_ENABLE_STRING, 2, (NvU32 *)g_valuesFXAA_ENABLE, FXAA_ENABLE_OFF},
|
||||
{FXAA_INDICATOR_ENABLE_ID, FXAA_INDICATOR_ENABLE_STRING, 2, (NvU32 *)g_valuesFXAA_INDICATOR_ENABLE, FXAA_INDICATOR_ENABLE_OFF},
|
||||
{LATENCY_INDICATOR_AUTOALIGN_ID, LATENCY_INDICATOR_AUTOALIGN_STRING, 2, (NvU32 *)g_valuesLATENCY_INDICATOR_AUTOALIGN, LATENCY_INDICATOR_AUTOALIGN_ENABLED},
|
||||
{MCSFRSHOWSPLIT_ID, MCSFRSHOWSPLIT_STRING, 2, (NvU32 *)g_valuesMCSFRSHOWSPLIT, MCSFRSHOWSPLIT_DISABLED},
|
||||
{NV_QUALITY_UPSCALING_ID, NV_QUALITY_UPSCALING_STRING, 2, (NvU32 *)g_valuesNV_QUALITY_UPSCALING, NV_QUALITY_UPSCALING_OFF},
|
||||
{OPTIMUS_MAXAA_ID, OPTIMUS_MAXAA_STRING, 2, (NvU32 *)g_valuesOPTIMUS_MAXAA, 0x00000000},
|
||||
{PHYSXINDICATOR_ID, PHYSXINDICATOR_STRING, 2, (NvU32 *)g_valuesPHYSXINDICATOR, PHYSXINDICATOR_DISABLED},
|
||||
{PREFERRED_PSTATE_ID, PREFERRED_PSTATE_STRING, 8, (NvU32 *)g_valuesPREFERRED_PSTATE, PREFERRED_PSTATE_OPTIMAL_POWER},
|
||||
{PREVENT_UI_AF_OVERRIDE_ID, PREVENT_UI_AF_OVERRIDE_STRING, 2, (NvU32 *)g_valuesPREVENT_UI_AF_OVERRIDE, PREVENT_UI_AF_OVERRIDE_OFF},
|
||||
{SHIM_MAXRES_ID, SHIM_MAXRES_STRING, 0, NULL, 0x00000000},
|
||||
{SHIM_MCCOMPAT_ID, SHIM_MCCOMPAT_STRING, 8, (NvU32 *)g_valuesSHIM_MCCOMPAT, SHIM_MCCOMPAT_AUTO_SELECT},
|
||||
{SHIM_RENDERING_MODE_ID, SHIM_RENDERING_MODE_STRING, 8, (NvU32 *)g_valuesSHIM_RENDERING_MODE, SHIM_RENDERING_MODE_AUTO_SELECT},
|
||||
{SHIM_RENDERING_OPTIONS_ID, SHIM_RENDERING_OPTIONS_STRING, 28, (NvU32 *)g_valuesSHIM_RENDERING_OPTIONS, 0x00000000},
|
||||
{SLI_GPU_COUNT_ID, SLI_GPU_COUNT_STRING, 5, (NvU32 *)g_valuesSLI_GPU_COUNT, SLI_GPU_COUNT_AUTOSELECT},
|
||||
{SLI_PREDEFINED_GPU_COUNT_ID, SLI_PREDEFINED_GPU_COUNT_STRING, 5, (NvU32 *)g_valuesSLI_PREDEFINED_GPU_COUNT, SLI_PREDEFINED_GPU_COUNT_AUTOSELECT},
|
||||
{SLI_PREDEFINED_GPU_COUNT_DX10_ID, SLI_PREDEFINED_GPU_COUNT_DX10_STRING, 5, (NvU32 *)g_valuesSLI_PREDEFINED_GPU_COUNT_DX10, SLI_PREDEFINED_GPU_COUNT_DX10_AUTOSELECT},
|
||||
{SLI_PREDEFINED_MODE_ID, SLI_PREDEFINED_MODE_STRING, 6, (NvU32 *)g_valuesSLI_PREDEFINED_MODE, SLI_PREDEFINED_MODE_AUTOSELECT},
|
||||
{SLI_PREDEFINED_MODE_DX10_ID, SLI_PREDEFINED_MODE_DX10_STRING, 6, (NvU32 *)g_valuesSLI_PREDEFINED_MODE_DX10, SLI_PREDEFINED_MODE_DX10_AUTOSELECT},
|
||||
{SLI_RENDERING_MODE_ID, SLI_RENDERING_MODE_STRING, 6, (NvU32 *)g_valuesSLI_RENDERING_MODE, SLI_RENDERING_MODE_AUTOSELECT},
|
||||
{VRPRERENDERLIMIT_ID, VRPRERENDERLIMIT_STRING, 4, (NvU32 *)g_valuesVRPRERENDERLIMIT, VRPRERENDERLIMIT_DEFAULT},
|
||||
{VRRFEATUREINDICATOR_ID, VRRFEATUREINDICATOR_STRING, 2, (NvU32 *)g_valuesVRRFEATUREINDICATOR, VRRFEATUREINDICATOR_ENABLED},
|
||||
{VRROVERLAYINDICATOR_ID, VRROVERLAYINDICATOR_STRING, 2, (NvU32 *)g_valuesVRROVERLAYINDICATOR, VRROVERLAYINDICATOR_ENABLED},
|
||||
{VRRREQUESTSTATE_ID, VRRREQUESTSTATE_STRING, 3, (NvU32 *)g_valuesVRRREQUESTSTATE, VRRREQUESTSTATE_FULLSCREEN_ONLY},
|
||||
{VRR_APP_OVERRIDE_ID, VRR_APP_OVERRIDE_STRING, 5, (NvU32 *)g_valuesVRR_APP_OVERRIDE, VRR_APP_OVERRIDE_ALLOW},
|
||||
{VRR_APP_OVERRIDE_REQUEST_STATE_ID, VRR_APP_OVERRIDE_REQUEST_STATE_STRING, 5, (NvU32 *)g_valuesVRR_APP_OVERRIDE_REQUEST_STATE, VRR_APP_OVERRIDE_REQUEST_STATE_ALLOW},
|
||||
{VRR_MODE_ID, VRR_MODE_STRING, 3, (NvU32 *)g_valuesVRR_MODE, VRR_MODE_FULLSCREEN_ONLY},
|
||||
{VSYNCSMOOTHAFR_ID, VSYNCSMOOTHAFR_STRING, 2, (NvU32 *)g_valuesVSYNCSMOOTHAFR, VSYNCSMOOTHAFR_OFF},
|
||||
{VSYNCVRRCONTROL_ID, VSYNCVRRCONTROL_STRING, 3, (NvU32 *)g_valuesVSYNCVRRCONTROL, VSYNCVRRCONTROL_ENABLE},
|
||||
{VSYNC_BEHAVIOR_FLAGS_ID, VSYNC_BEHAVIOR_FLAGS_STRING, 3, (NvU32 *)g_valuesVSYNC_BEHAVIOR_FLAGS, VSYNC_BEHAVIOR_FLAGS_DEFAULT},
|
||||
{WKS_API_STEREO_EYES_EXCHANGE_ID, WKS_API_STEREO_EYES_EXCHANGE_STRING, 2, (NvU32 *)g_valuesWKS_API_STEREO_EYES_EXCHANGE, WKS_API_STEREO_EYES_EXCHANGE_OFF},
|
||||
{WKS_API_STEREO_MODE_ID, WKS_API_STEREO_MODE_STRING, 25, (NvU32 *)g_valuesWKS_API_STEREO_MODE, WKS_API_STEREO_MODE_SHUTTER_GLASSES},
|
||||
{WKS_MEMORY_ALLOCATION_POLICY_ID, WKS_MEMORY_ALLOCATION_POLICY_STRING, 3, (NvU32 *)g_valuesWKS_MEMORY_ALLOCATION_POLICY, WKS_MEMORY_ALLOCATION_POLICY_AS_NEEDED},
|
||||
{WKS_STEREO_DONGLE_SUPPORT_ID, WKS_STEREO_DONGLE_SUPPORT_STRING, 3, (NvU32 *)g_valuesWKS_STEREO_DONGLE_SUPPORT, WKS_STEREO_DONGLE_SUPPORT_DAC},
|
||||
{WKS_STEREO_SUPPORT_ID, WKS_STEREO_SUPPORT_STRING, 2, (NvU32 *)g_valuesWKS_STEREO_SUPPORT, WKS_STEREO_SUPPORT_OFF},
|
||||
{WKS_STEREO_SWAP_MODE_ID, WKS_STEREO_SWAP_MODE_STRING, 5, (NvU32 *)g_valuesWKS_STEREO_SWAP_MODE, WKS_STEREO_SWAP_MODE_APPLICATION_CONTROL},
|
||||
{AO_MODE_ID, AO_MODE_STRING, 4, (NvU32 *)g_valuesAO_MODE, AO_MODE_OFF},
|
||||
{AO_MODE_ACTIVE_ID, AO_MODE_ACTIVE_STRING, 2, (NvU32 *)g_valuesAO_MODE_ACTIVE, AO_MODE_ACTIVE_DISABLED},
|
||||
{AUTO_LODBIASADJUST_ID, AUTO_LODBIASADJUST_STRING, 2, (NvU32 *)g_valuesAUTO_LODBIASADJUST, AUTO_LODBIASADJUST_ON},
|
||||
{EXPORT_PERF_COUNTERS_DX9_ONLY_ID, EXPORT_PERF_COUNTERS_DX9_ONLY_STRING, 2, (NvU32 *)g_valuesEXPORT_PERF_COUNTERS_DX9_ONLY, EXPORT_PERF_COUNTERS_DX9_ONLY_OFF},
|
||||
{LODBIASADJUST_ID, LODBIASADJUST_STRING, 2, (NvU32 *)g_valuesLODBIASADJUST, 0x00000000},
|
||||
{MAXWELL_B_SAMPLE_INTERLEAVE_ID, MAXWELL_B_SAMPLE_INTERLEAVE_STRING, 2, (NvU32 *)g_valuesMAXWELL_B_SAMPLE_INTERLEAVE, MAXWELL_B_SAMPLE_INTERLEAVE_OFF},
|
||||
{PRERENDERLIMIT_ID, PRERENDERLIMIT_STRING, 3, (NvU32 *)g_valuesPRERENDERLIMIT, PRERENDERLIMIT_APP_CONTROLLED},
|
||||
{PS_SHADERDISKCACHE_ID, PS_SHADERDISKCACHE_STRING, 2, (NvU32 *)g_valuesPS_SHADERDISKCACHE, PS_SHADERDISKCACHE_ON},
|
||||
{PS_SHADERDISKCACHE_MAX_SIZE_ID, PS_SHADERDISKCACHE_MAX_SIZE_STRING, 2, (NvU32 *)g_valuesPS_SHADERDISKCACHE_MAX_SIZE, 0x00000000},
|
||||
{PS_TEXFILTER_ANISO_OPTS2_ID, PS_TEXFILTER_ANISO_OPTS2_STRING, 2, (NvU32 *)g_valuesPS_TEXFILTER_ANISO_OPTS2, PS_TEXFILTER_ANISO_OPTS2_OFF},
|
||||
{PS_TEXFILTER_BILINEAR_IN_ANISO_ID, PS_TEXFILTER_BILINEAR_IN_ANISO_STRING, 2, (NvU32 *)g_valuesPS_TEXFILTER_BILINEAR_IN_ANISO, PS_TEXFILTER_BILINEAR_IN_ANISO_OFF},
|
||||
{PS_TEXFILTER_DISABLE_TRILIN_SLOPE_ID, PS_TEXFILTER_DISABLE_TRILIN_SLOPE_STRING, 2, (NvU32 *)g_valuesPS_TEXFILTER_DISABLE_TRILIN_SLOPE, PS_TEXFILTER_DISABLE_TRILIN_SLOPE_OFF},
|
||||
{PS_TEXFILTER_NO_NEG_LODBIAS_ID, PS_TEXFILTER_NO_NEG_LODBIAS_STRING, 2, (NvU32 *)g_valuesPS_TEXFILTER_NO_NEG_LODBIAS, PS_TEXFILTER_NO_NEG_LODBIAS_OFF},
|
||||
{QUALITY_ENHANCEMENTS_ID, QUALITY_ENHANCEMENTS_STRING, 4, (NvU32 *)g_valuesQUALITY_ENHANCEMENTS, QUALITY_ENHANCEMENTS_QUALITY},
|
||||
{QUALITY_ENHANCEMENT_SUBSTITUTION_ID, QUALITY_ENHANCEMENT_SUBSTITUTION_STRING, 2, (NvU32 *)g_valuesQUALITY_ENHANCEMENT_SUBSTITUTION, QUALITY_ENHANCEMENT_SUBSTITUTION_NO_SUBSTITUTION},
|
||||
{REFRESH_RATE_OVERRIDE_ID, REFRESH_RATE_OVERRIDE_STRING, 3, (NvU32 *)g_valuesREFRESH_RATE_OVERRIDE, REFRESH_RATE_OVERRIDE_APPLICATION_CONTROLLED},
|
||||
{SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_ID, SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_STRING, 2, (NvU32 *)g_valuesSET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE, SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_OFF},
|
||||
{SET_VAB_DATA_ID, SET_VAB_DATA_STRING, 6, (NvU32 *)g_valuesSET_VAB_DATA, SET_VAB_DATA_USE_API_DEFAULTS},
|
||||
{VSYNCMODE_ID, VSYNCMODE_STRING, 7, (NvU32 *)g_valuesVSYNCMODE, VSYNCMODE_PASSIVE},
|
||||
{VSYNCTEARCONTROL_ID, VSYNCTEARCONTROL_STRING, 2, (NvU32 *)g_valuesVSYNCTEARCONTROL, VSYNCTEARCONTROL_DISABLE},
|
||||
};
|
||||
|
||||
SettingWSTRINGNameString mapSettingWSTRING[TOTAL_WSTRING_SETTING_NUM] =
|
||||
{
|
||||
{OGL_IMPLICIT_GPU_AFFINITY_ID, OGL_IMPLICIT_GPU_AFFINITY_STRING, 1, (const wchar_t **)g_valuesOGL_IMPLICIT_GPU_AFFINITY, L"autoselect"},
|
||||
{CUDA_EXCLUDED_GPUS_ID, CUDA_EXCLUDED_GPUS_STRING, 1, (const wchar_t **)g_valuesCUDA_EXCLUDED_GPUS, L"none"},
|
||||
{D3DOGL_GPU_MAX_POWER_ID, D3DOGL_GPU_MAX_POWER_STRING, 1, (const wchar_t **)g_valuesD3DOGL_GPU_MAX_POWER, L"0"},
|
||||
{ICAFE_LOGO_CONFIG_ID, ICAFE_LOGO_CONFIG_STRING, 0, NULL, L""},
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,767 +0,0 @@
|
|||
/************************************************************************************************************************************\
|
||||
|* *|
|
||||
|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
|
||||
|* *|
|
||||
|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
|
||||
|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
|
||||
|* Otherwise, you have no rights to use or access this software in any manner. *|
|
||||
|* *|
|
||||
|* If not covered by the applicable NVIDIA software license agreement: *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
|
||||
|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
|
||||
|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
|
||||
|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
|
||||
|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|
||||
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
|
||||
|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. *|
|
||||
|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
|
||||
|* consisting of "commercial computer software" and "commercial computer software documentation" *|
|
||||
|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
|
||||
|* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this software in individual and commercial software must include, *|
|
||||
|* in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
\************************************************************************************************************************************/
|
||||
|
||||
////////////////////////// NVIDIA SHADER EXTENSIONS /////////////////
|
||||
// internal functions
|
||||
// Functions in this file are not expected to be called by apps directly
|
||||
|
||||
#include "nvShaderExtnEnums.h"
|
||||
|
||||
struct NvShaderExtnStruct
|
||||
{
|
||||
uint opcode; // opcode
|
||||
uint rid; // resource ID
|
||||
uint sid; // sampler ID
|
||||
|
||||
uint4 dst1u; // destination operand 1 (for instructions that need extra destination operands)
|
||||
uint4 src3u; // source operand 3
|
||||
uint4 src4u; // source operand 4
|
||||
uint4 src5u; // source operand 5
|
||||
|
||||
uint4 src0u; // uint source operand 0
|
||||
uint4 src1u; // uint source operand 0
|
||||
uint4 src2u; // uint source operand 0
|
||||
uint4 dst0u; // uint destination operand
|
||||
|
||||
uint markUavRef; // the next store to UAV is fake and is used only to identify the uav slot
|
||||
uint numOutputsForIncCounter; // Used for output to IncrementCounter
|
||||
float padding1[27]; // struct size: 256 bytes
|
||||
};
|
||||
|
||||
// RW structured buffer for Nvidia shader extensions
|
||||
|
||||
// Application needs to define NV_SHADER_EXTN_SLOT as a unused slot, which should be
|
||||
// set using NvAPI_D3D11_SetNvShaderExtnSlot() call before creating the first shader that
|
||||
// uses nvidia shader extensions. E.g before including this file in shader define it as:
|
||||
// #define NV_SHADER_EXTN_SLOT u7
|
||||
|
||||
// For SM5.1, application needs to define NV_SHADER_EXTN_REGISTER_SPACE as register space
|
||||
// E.g. before including this file in shader define it as:
|
||||
// #define NV_SHADER_EXTN_REGISTER_SPACE space2
|
||||
|
||||
// Note that other operations to this UAV will be ignored so application
|
||||
// should bind a null resource
|
||||
|
||||
#ifdef NV_SHADER_EXTN_REGISTER_SPACE
|
||||
RWStructuredBuffer<NvShaderExtnStruct> g_NvidiaExt : register( NV_SHADER_EXTN_SLOT, NV_SHADER_EXTN_REGISTER_SPACE );
|
||||
#else
|
||||
RWStructuredBuffer<NvShaderExtnStruct> g_NvidiaExt : register( NV_SHADER_EXTN_SLOT );
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// the exposed SHFL instructions accept a mask parameter in src2
|
||||
// To compute lane mask from width of segment:
|
||||
// minLaneID : currentLaneId & src2[12:8]
|
||||
// maxLaneID : minLaneId | (src2[4:0] & ~src2[12:8])
|
||||
// where [minLaneId, maxLaneId] defines the segment where currentLaneId belongs
|
||||
// we always set src2[4:0] to 11111 (0x1F), and set src2[12:8] as (32 - width)
|
||||
int __NvGetShflMaskFromWidth(uint width)
|
||||
{
|
||||
return ((NV_WARP_SIZE - width) << 8) | 0x1F;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
void __NvReferenceUAVForOp(RWByteAddressBuffer uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav.Store(index, 0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture1D<float2> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[index] = float2(0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture2D<float2> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint2(index,index)] = float2(0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture3D<float2> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint3(index,index,index)] = float2(0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture1D<float4> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[index] = float4(0,0,0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture2D<float4> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint2(index,index)] = float4(0,0,0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture3D<float4> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint3(index,index,index)] = float4(0,0,0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture1D<float> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[index] = 0.0f;
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture2D<float> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint2(index,index)] = 0.0f;
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture3D<float> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint3(index,index,index)] = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture1D<uint2> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[index] = uint2(0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture2D<uint2> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint2(index,index)] = uint2(0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture3D<uint2> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint3(index,index,index)] = uint2(0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture1D<uint4> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[index] = uint4(0,0,0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture2D<uint4> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint2(index,index)] = uint4(0,0,0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture3D<uint4> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint3(index,index,index)] = uint4(0,0,0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture1D<uint> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[index] = 0;
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture2D<uint> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint2(index,index)] = 0;
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture3D<uint> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint3(index,index,index)] = 0;
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture1D<int2> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[index] = int2(0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture2D<int2> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint2(index,index)] = int2(0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture3D<int2> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint3(index,index,index)] = int2(0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture1D<int4> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[index] = int4(0,0,0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture2D<int4> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint2(index,index)] = int4(0,0,0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture3D<int4> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint3(index,index,index)] = int4(0,0,0,0);
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture1D<int> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[index] = 0;
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture2D<int> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint2(index,index)] = 0;
|
||||
}
|
||||
|
||||
void __NvReferenceUAVForOp(RWTexture3D<int> uav)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].markUavRef = 1;
|
||||
uav[uint3(index,index,index)] = 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// ATOMIC op sub-opcodes
|
||||
#define NV_EXTN_ATOM_AND 0
|
||||
#define NV_EXTN_ATOM_OR 1
|
||||
#define NV_EXTN_ATOM_XOR 2
|
||||
|
||||
#define NV_EXTN_ATOM_ADD 3
|
||||
#define NV_EXTN_ATOM_MAX 6
|
||||
#define NV_EXTN_ATOM_MIN 7
|
||||
|
||||
#define NV_EXTN_ATOM_SWAP 8
|
||||
#define NV_EXTN_ATOM_CAS 9
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// performs Atomic operation on two consecutive fp16 values in the given UAV
|
||||
// the uint paramater 'fp16x2Val' is treated as two fp16 values
|
||||
// the passed sub-opcode 'op' should be an immediate constant
|
||||
// byteAddress must be multiple of 4
|
||||
// the returned value are the two fp16 values packed into a single uint
|
||||
uint __NvAtomicOpFP16x2(RWByteAddressBuffer uav, uint byteAddress, uint fp16x2Val, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = byteAddress;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.x;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// performs Atomic operation on a R16G16_FLOAT UAV at the given address
|
||||
// the uint paramater 'fp16x2Val' is treated as two fp16 values
|
||||
// the passed sub-opcode 'op' should be an immediate constant
|
||||
// the returned value are the two fp16 values (.x and .y components) packed into a single uint
|
||||
// Warning: Behaviour of these set of functions is undefined if the UAV is not
|
||||
// of R16G16_FLOAT format (might result in app crash or TDR)
|
||||
|
||||
uint __NvAtomicOpFP16x2(RWTexture1D<float2> uav, uint address, uint fp16x2Val, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = address;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.x;
|
||||
}
|
||||
|
||||
uint __NvAtomicOpFP16x2(RWTexture2D<float2> uav, uint2 address, uint fp16x2Val, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xy = address;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.x;
|
||||
}
|
||||
|
||||
uint __NvAtomicOpFP16x2(RWTexture3D<float2> uav, uint3 address, uint fp16x2Val, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xyz = address;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.x;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// performs Atomic operation on a R16G16B16A16_FLOAT UAV at the given address
|
||||
// the uint2 paramater 'fp16x2Val' is treated as four fp16 values
|
||||
// i.e, fp16x2Val.x = uav.xy and fp16x2Val.y = uav.yz
|
||||
// the passed sub-opcode 'op' should be an immediate constant
|
||||
// the returned value are the four fp16 values (.xyzw components) packed into uint2
|
||||
// Warning: Behaviour of these set of functions is undefined if the UAV is not
|
||||
// of R16G16B16A16_FLOAT format (might result in app crash or TDR)
|
||||
|
||||
uint2 __NvAtomicOpFP16x2(RWTexture1D<float4> uav, uint address, uint2 fp16x2Val, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
// break it down into two fp16x2 atomic ops
|
||||
uint2 retVal;
|
||||
|
||||
// first op has x-coordinate = x * 2
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = address * 2;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val.x;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
retVal.x = g_NvidiaExt[index].dst0u.x;
|
||||
|
||||
// second op has x-coordinate = x * 2 + 1
|
||||
index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = address * 2 + 1;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val.y;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
retVal.y = g_NvidiaExt[index].dst0u.x;
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
uint2 __NvAtomicOpFP16x2(RWTexture2D<float4> uav, uint2 address, uint2 fp16x2Val, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
// break it down into two fp16x2 atomic ops
|
||||
uint2 retVal;
|
||||
|
||||
// first op has x-coordinate = x * 2
|
||||
uint2 addressTemp = uint2(address.x * 2, address.y);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xy = addressTemp;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val.x;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
retVal.x = g_NvidiaExt[index].dst0u.x;
|
||||
|
||||
// second op has x-coordinate = x * 2 + 1
|
||||
addressTemp.x++;
|
||||
index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xy = addressTemp;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val.y;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
retVal.y = g_NvidiaExt[index].dst0u.x;
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
uint2 __NvAtomicOpFP16x2(RWTexture3D<float4> uav, uint3 address, uint2 fp16x2Val, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
// break it down into two fp16x2 atomic ops
|
||||
uint2 retVal;
|
||||
|
||||
// first op has x-coordinate = x * 2
|
||||
uint3 addressTemp = uint3(address.x * 2, address.y, address.z);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xyz = addressTemp;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val.x;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
retVal.x = g_NvidiaExt[index].dst0u.x;
|
||||
|
||||
// second op has x-coordinate = x * 2 + 1
|
||||
addressTemp.x++;
|
||||
index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xyz = addressTemp;
|
||||
g_NvidiaExt[index].src1u.x = fp16x2Val.y;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC;
|
||||
retVal.y = g_NvidiaExt[index].dst0u.x;
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
uint __fp32x2Tofp16x2(float2 val)
|
||||
{
|
||||
return (f32tof16(val.y)<<16) | f32tof16(val.x) ;
|
||||
}
|
||||
|
||||
uint2 __fp32x4Tofp16x4(float4 val)
|
||||
{
|
||||
return uint2( (f32tof16(val.y)<<16) | f32tof16(val.x), (f32tof16(val.w)<<16) | f32tof16(val.z) ) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// FP32 Atomic functions
|
||||
// performs Atomic operation treating the uav as float (fp32) values
|
||||
// the passed sub-opcode 'op' should be an immediate constant
|
||||
// byteAddress must be multiple of 4
|
||||
float __NvAtomicAddFP32(RWByteAddressBuffer uav, uint byteAddress, float val)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = byteAddress;
|
||||
g_NvidiaExt[index].src1u.x = asuint(val); // passing as uint to make it more convinient for the driver to translate
|
||||
g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_ADD;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP32_ATOMIC;
|
||||
|
||||
return asfloat(g_NvidiaExt[index].dst0u.x);
|
||||
}
|
||||
|
||||
float __NvAtomicAddFP32(RWTexture1D<float> uav, uint address, float val)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = address;
|
||||
g_NvidiaExt[index].src1u.x = asuint(val);
|
||||
g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_ADD;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP32_ATOMIC;
|
||||
|
||||
return asfloat(g_NvidiaExt[index].dst0u.x);
|
||||
}
|
||||
|
||||
float __NvAtomicAddFP32(RWTexture2D<float> uav, uint2 address, float val)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xy = address;
|
||||
g_NvidiaExt[index].src1u.x = asuint(val);
|
||||
g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_ADD;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP32_ATOMIC;
|
||||
|
||||
return asfloat(g_NvidiaExt[index].dst0u.x);
|
||||
}
|
||||
|
||||
float __NvAtomicAddFP32(RWTexture3D<float> uav, uint3 address, float val)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xyz = address;
|
||||
g_NvidiaExt[index].src1u.x = asuint(val);
|
||||
g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_ADD;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FP32_ATOMIC;
|
||||
|
||||
return asfloat(g_NvidiaExt[index].dst0u.x);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// UINT64 Atmoic Functions
|
||||
// The functions below performs atomic operation on the given UAV treating the value as uint64
|
||||
// byteAddress must be multiple of 8
|
||||
// The returned value is the value present in memory location before the atomic operation
|
||||
// uint2 vector type is used to represent a single uint64 value with the x component containing the low 32 bits and y component the high 32 bits.
|
||||
|
||||
uint2 __NvAtomicCompareExchangeUINT64(RWByteAddressBuffer uav, uint byteAddress, uint2 compareValue, uint2 value)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = byteAddress;
|
||||
g_NvidiaExt[index].src1u.xy = compareValue;
|
||||
g_NvidiaExt[index].src1u.zw = value;
|
||||
g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_CAS;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_UINT64_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.xy;
|
||||
}
|
||||
|
||||
uint2 __NvAtomicOpUINT64(RWByteAddressBuffer uav, uint byteAddress, uint2 value, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = byteAddress;
|
||||
g_NvidiaExt[index].src1u.xy = value;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_UINT64_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.xy;
|
||||
}
|
||||
|
||||
uint2 __NvAtomicCompareExchangeUINT64(RWTexture1D<uint2> uav, uint address, uint2 compareValue, uint2 value)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = address;
|
||||
g_NvidiaExt[index].src1u.xy = compareValue;
|
||||
g_NvidiaExt[index].src1u.zw = value;
|
||||
g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_CAS;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_UINT64_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.xy;
|
||||
}
|
||||
|
||||
uint2 __NvAtomicOpUINT64(RWTexture1D<uint2> uav, uint address, uint2 value, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = address;
|
||||
g_NvidiaExt[index].src1u.xy = value;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_UINT64_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.xy;
|
||||
}
|
||||
|
||||
uint2 __NvAtomicCompareExchangeUINT64(RWTexture2D<uint2> uav, uint2 address, uint2 compareValue, uint2 value)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xy = address;
|
||||
g_NvidiaExt[index].src1u.xy = compareValue;
|
||||
g_NvidiaExt[index].src1u.zw = value;
|
||||
g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_CAS;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_UINT64_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.xy;
|
||||
}
|
||||
|
||||
uint2 __NvAtomicOpUINT64(RWTexture2D<uint2> uav, uint2 address, uint2 value, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xy = address;
|
||||
g_NvidiaExt[index].src1u.xy = value;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_UINT64_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.xy;
|
||||
}
|
||||
|
||||
uint2 __NvAtomicCompareExchangeUINT64(RWTexture3D<uint2> uav, uint3 address, uint2 compareValue, uint2 value)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xyz = address;
|
||||
g_NvidiaExt[index].src1u.xy = compareValue;
|
||||
g_NvidiaExt[index].src1u.zw = value;
|
||||
g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_CAS;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_UINT64_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.xy;
|
||||
}
|
||||
|
||||
uint2 __NvAtomicOpUINT64(RWTexture3D<uint2> uav, uint3 address, uint2 value, uint atomicOpType)
|
||||
{
|
||||
__NvReferenceUAVForOp(uav);
|
||||
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.xyz = address;
|
||||
g_NvidiaExt[index].src1u.xy = value;
|
||||
g_NvidiaExt[index].src2u.x = atomicOpType;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_UINT64_ATOMIC;
|
||||
|
||||
return g_NvidiaExt[index].dst0u.xy;
|
||||
}
|
||||
|
||||
|
||||
uint4 __NvFootprint(uint texSpace, uint texIndex, uint smpSpace, uint smpIndex, uint texType, float3 location, uint footprintmode, uint gran, int3 offset = int3(0, 0, 0))
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = texIndex;
|
||||
g_NvidiaExt[index].src0u.y = smpIndex;
|
||||
g_NvidiaExt[index].src1u.xyz = asuint(location);
|
||||
g_NvidiaExt[index].src1u.w = gran;
|
||||
g_NvidiaExt[index].src3u.x = texSpace;
|
||||
g_NvidiaExt[index].src3u.y = smpSpace;
|
||||
g_NvidiaExt[index].src3u.z = texType;
|
||||
g_NvidiaExt[index].src3u.w = footprintmode;
|
||||
g_NvidiaExt[index].src4u.xyz = asuint(offset);
|
||||
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FOOTPRINT;
|
||||
g_NvidiaExt[index].numOutputsForIncCounter = 4;
|
||||
|
||||
// result is returned as the return value of IncrementCounter on fake UAV slot
|
||||
uint4 op;
|
||||
op.x = g_NvidiaExt.IncrementCounter();
|
||||
op.y = g_NvidiaExt.IncrementCounter();
|
||||
op.z = g_NvidiaExt.IncrementCounter();
|
||||
op.w = g_NvidiaExt.IncrementCounter();
|
||||
return op;
|
||||
}
|
||||
|
||||
uint4 __NvFootprintBias(uint texSpace, uint texIndex, uint smpSpace, uint smpIndex, uint texType, float3 location, uint footprintmode, uint gran, float bias, int3 offset = int3(0, 0, 0))
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = texIndex;
|
||||
g_NvidiaExt[index].src0u.y = smpIndex;
|
||||
g_NvidiaExt[index].src1u.xyz = asuint(location);
|
||||
g_NvidiaExt[index].src1u.w = gran;
|
||||
g_NvidiaExt[index].src2u.x = asuint(bias);
|
||||
g_NvidiaExt[index].src3u.x = texSpace;
|
||||
g_NvidiaExt[index].src3u.y = smpSpace;
|
||||
g_NvidiaExt[index].src3u.z = texType;
|
||||
g_NvidiaExt[index].src3u.w = footprintmode;
|
||||
g_NvidiaExt[index].src4u.xyz = asuint(offset);
|
||||
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FOOTPRINT_BIAS;
|
||||
g_NvidiaExt[index].numOutputsForIncCounter = 4;
|
||||
|
||||
// result is returned as the return value of IncrementCounter on fake UAV slot
|
||||
uint4 op;
|
||||
op.x = g_NvidiaExt.IncrementCounter();
|
||||
op.y = g_NvidiaExt.IncrementCounter();
|
||||
op.z = g_NvidiaExt.IncrementCounter();
|
||||
op.w = g_NvidiaExt.IncrementCounter();
|
||||
return op;
|
||||
}
|
||||
|
||||
uint4 __NvFootprintLevel(uint texSpace, uint texIndex, uint smpSpace, uint smpIndex, uint texType, float3 location, uint footprintmode, uint gran, float lodLevel, int3 offset = int3(0, 0, 0))
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = texIndex;
|
||||
g_NvidiaExt[index].src0u.y = smpIndex;
|
||||
g_NvidiaExt[index].src1u.xyz = asuint(location);
|
||||
g_NvidiaExt[index].src1u.w = gran;
|
||||
g_NvidiaExt[index].src2u.x = asuint(lodLevel);
|
||||
g_NvidiaExt[index].src3u.x = texSpace;
|
||||
g_NvidiaExt[index].src3u.y = smpSpace;
|
||||
g_NvidiaExt[index].src3u.z = texType;
|
||||
g_NvidiaExt[index].src3u.w = footprintmode;
|
||||
g_NvidiaExt[index].src4u.xyz = asuint(offset);
|
||||
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FOOTPRINT_LEVEL;
|
||||
g_NvidiaExt[index].numOutputsForIncCounter = 4;
|
||||
|
||||
// result is returned as the return value of IncrementCounter on fake UAV slot
|
||||
uint4 op;
|
||||
op.x = g_NvidiaExt.IncrementCounter();
|
||||
op.y = g_NvidiaExt.IncrementCounter();
|
||||
op.z = g_NvidiaExt.IncrementCounter();
|
||||
op.w = g_NvidiaExt.IncrementCounter();
|
||||
return op;
|
||||
}
|
||||
|
||||
uint4 __NvFootprintGrad(uint texSpace, uint texIndex, uint smpSpace, uint smpIndex, uint texType, float3 location, uint footprintmode, uint gran, float3 ddx, float3 ddy, int3 offset = int3(0, 0, 0))
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = texIndex;
|
||||
g_NvidiaExt[index].src0u.y = smpIndex;
|
||||
g_NvidiaExt[index].src1u.xyz = asuint(location);
|
||||
g_NvidiaExt[index].src1u.w = gran;
|
||||
g_NvidiaExt[index].src2u.xyz = asuint(ddx);
|
||||
g_NvidiaExt[index].src5u.xyz = asuint(ddy);
|
||||
g_NvidiaExt[index].src3u.x = texSpace;
|
||||
g_NvidiaExt[index].src3u.y = smpSpace;
|
||||
g_NvidiaExt[index].src3u.z = texType;
|
||||
g_NvidiaExt[index].src3u.w = footprintmode;
|
||||
g_NvidiaExt[index].src4u.xyz = asuint(offset);
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_FOOTPRINT_GRAD;
|
||||
g_NvidiaExt[index].numOutputsForIncCounter = 4;
|
||||
|
||||
// result is returned as the return value of IncrementCounter on fake UAV slot
|
||||
uint4 op;
|
||||
op.x = g_NvidiaExt.IncrementCounter();
|
||||
op.y = g_NvidiaExt.IncrementCounter();
|
||||
op.z = g_NvidiaExt.IncrementCounter();
|
||||
op.w = g_NvidiaExt.IncrementCounter();
|
||||
return op;
|
||||
}
|
||||
|
||||
// returns value of special register - specify subopcode from any of NV_SPECIALOP_* specified in nvShaderExtnEnums.h - other opcodes undefined behavior
|
||||
uint __NvGetSpecial(uint subOpCode)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_GET_SPECIAL;
|
||||
g_NvidiaExt[index].src0u.x = subOpCode;
|
||||
return g_NvidiaExt.IncrementCounter();
|
||||
}
|
||||
|
||||
// predicate is returned in laneValid indicating if srcLane is in range and val from specified lane is returned.
|
||||
int __NvShflGeneric(int val, uint srcLane, uint maskClampVal, out uint laneValid)
|
||||
{
|
||||
uint index = g_NvidiaExt.IncrementCounter();
|
||||
g_NvidiaExt[index].src0u.x = val; // variable to be shuffled
|
||||
g_NvidiaExt[index].src0u.y = srcLane; // source lane
|
||||
g_NvidiaExt[index].src0u.z = maskClampVal;
|
||||
g_NvidiaExt[index].opcode = NV_EXTN_OP_SHFL_GENERIC;
|
||||
g_NvidiaExt[index].numOutputsForIncCounter = 2;
|
||||
|
||||
laneValid = asuint(g_NvidiaExt.IncrementCounter());
|
||||
return g_NvidiaExt.IncrementCounter();
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
/************************************************************************************************************************************\
|
||||
|* *|
|
||||
|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
|
||||
|* *|
|
||||
|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
|
||||
|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
|
||||
|* Otherwise, you have no rights to use or access this software in any manner. *|
|
||||
|* *|
|
||||
|* If not covered by the applicable NVIDIA software license agreement: *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
|
||||
|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
|
||||
|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
|
||||
|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
|
||||
|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|
||||
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
|
||||
|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. *|
|
||||
|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
|
||||
|* consisting of "commercial computer software" and "commercial computer software documentation" *|
|
||||
|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
|
||||
|* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this software in individual and commercial software must include, *|
|
||||
|* in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
\************************************************************************************************************************************/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////// NVIDIA SHADER EXTENSIONS ////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file can be included both from HLSL shader code as well as C++ code.
|
||||
// The app should call NvAPI_D3D11_IsNvShaderExtnOpCodeSupported() / NvAPI_D3D12_IsNvShaderExtnOpCodeSupported()
|
||||
// to check for support for every nv shader extension opcode it plans to use
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
//---------------------------- NV Shader Extn Version -----------------------//
|
||||
//----------------------------------------------------------------------------//
|
||||
#define NV_SHADER_EXTN_VERSION 1
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
//---------------------------- Misc constants --------------------------------//
|
||||
//----------------------------------------------------------------------------//
|
||||
#define NV_WARP_SIZE 32
|
||||
#define NV_WARP_SIZE_LOG2 5
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
//---------------------------- opCode constants ------------------------------//
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
|
||||
#define NV_EXTN_OP_SHFL 1
|
||||
#define NV_EXTN_OP_SHFL_UP 2
|
||||
#define NV_EXTN_OP_SHFL_DOWN 3
|
||||
#define NV_EXTN_OP_SHFL_XOR 4
|
||||
|
||||
#define NV_EXTN_OP_VOTE_ALL 5
|
||||
#define NV_EXTN_OP_VOTE_ANY 6
|
||||
#define NV_EXTN_OP_VOTE_BALLOT 7
|
||||
|
||||
#define NV_EXTN_OP_GET_LANE_ID 8
|
||||
#define NV_EXTN_OP_FP16_ATOMIC 12
|
||||
#define NV_EXTN_OP_FP32_ATOMIC 13
|
||||
|
||||
#define NV_EXTN_OP_GET_SPECIAL 19
|
||||
|
||||
#define NV_EXTN_OP_UINT64_ATOMIC 20
|
||||
|
||||
#define NV_EXTN_OP_MATCH_ANY 21
|
||||
|
||||
// FOOTPRINT - For Sample and SampleBias
|
||||
#define NV_EXTN_OP_FOOTPRINT 28
|
||||
#define NV_EXTN_OP_FOOTPRINT_BIAS 29
|
||||
|
||||
#define NV_EXTN_OP_GET_SHADING_RATE 30
|
||||
|
||||
// FOOTPRINT - For SampleLevel and SampleGrad
|
||||
#define NV_EXTN_OP_FOOTPRINT_LEVEL 31
|
||||
#define NV_EXTN_OP_FOOTPRINT_GRAD 32
|
||||
|
||||
// SHFL Generic
|
||||
#define NV_EXTN_OP_SHFL_GENERIC 33
|
||||
|
||||
#define NV_EXTN_OP_VPRS_EVAL_ATTRIB_AT_SAMPLE 51
|
||||
#define NV_EXTN_OP_VPRS_EVAL_ATTRIB_SNAPPED 52
|
||||
|
||||
// HitObject API
|
||||
#define NV_EXTN_OP_HIT_OBJECT_TRACE_RAY 67
|
||||
#define NV_EXTN_OP_HIT_OBJECT_MAKE_HIT 68
|
||||
#define NV_EXTN_OP_HIT_OBJECT_MAKE_HIT_WITH_RECORD_INDEX 69
|
||||
#define NV_EXTN_OP_HIT_OBJECT_MAKE_MISS 70
|
||||
#define NV_EXTN_OP_HIT_OBJECT_REORDER_THREAD 71
|
||||
#define NV_EXTN_OP_HIT_OBJECT_INVOKE 72
|
||||
#define NV_EXTN_OP_HIT_OBJECT_IS_MISS 73
|
||||
#define NV_EXTN_OP_HIT_OBJECT_GET_INSTANCE_ID 74
|
||||
#define NV_EXTN_OP_HIT_OBJECT_GET_INSTANCE_INDEX 75
|
||||
#define NV_EXTN_OP_HIT_OBJECT_GET_PRIMITIVE_INDEX 76
|
||||
#define NV_EXTN_OP_HIT_OBJECT_GET_GEOMETRY_INDEX 77
|
||||
#define NV_EXTN_OP_HIT_OBJECT_GET_HIT_KIND 78
|
||||
#define NV_EXTN_OP_HIT_OBJECT_GET_RAY_DESC 79
|
||||
#define NV_EXTN_OP_HIT_OBJECT_GET_ATTRIBUTES 80
|
||||
#define NV_EXTN_OP_HIT_OBJECT_GET_SHADER_TABLE_INDEX 81
|
||||
#define NV_EXTN_OP_HIT_OBJECT_LOAD_LOCAL_ROOT_TABLE_CONSTANT 82
|
||||
#define NV_EXTN_OP_HIT_OBJECT_IS_HIT 83
|
||||
#define NV_EXTN_OP_HIT_OBJECT_IS_NOP 84
|
||||
#define NV_EXTN_OP_HIT_OBJECT_MAKE_NOP 85
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
//-------------------- GET_SPECIAL subOpCode constants -----------------------//
|
||||
//----------------------------------------------------------------------------//
|
||||
#define NV_SPECIALOP_THREADLTMASK 4
|
||||
#define NV_SPECIALOP_FOOTPRINT_SINGLELOD_PRED 5
|
||||
#define NV_SPECIALOP_GLOBAL_TIMER_LO 9
|
||||
#define NV_SPECIALOP_GLOBAL_TIMER_HI 10
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
//----------------------------- Texture Types -------------------------------//
|
||||
//----------------------------------------------------------------------------//
|
||||
#define NV_EXTN_TEXTURE_1D 2
|
||||
#define NV_EXTN_TEXTURE_1D_ARRAY 3
|
||||
#define NV_EXTN_TEXTURE_2D 4
|
||||
#define NV_EXTN_TEXTURE_2D_ARRAY 5
|
||||
#define NV_EXTN_TEXTURE_3D 6
|
||||
#define NV_EXTN_TEXTURE_CUBE 7
|
||||
#define NV_EXTN_TEXTURE_CUBE_ARRAY 8
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------//
|
||||
//----------------FOOTPRINT Enums for NvFootprint* extns---------------------//
|
||||
//---------------------------------------------------------------------------//
|
||||
#define NV_EXTN_FOOTPRINT_MODE_FINE 0
|
||||
#define NV_EXTN_FOOTPRINT_MODE_COARSE 1
|
21745
code/nvapi/nvapi.h
21745
code/nvapi/nvapi.h
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,652 +0,0 @@
|
|||
/************************************************************************************************************************************\
|
||||
|* *|
|
||||
|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
|
||||
|* *|
|
||||
|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
|
||||
|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
|
||||
|* Otherwise, you have no rights to use or access this software in any manner. *|
|
||||
|* *|
|
||||
|* If not covered by the applicable NVIDIA software license agreement: *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
|
||||
|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
|
||||
|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
|
||||
|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
|
||||
|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|
||||
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
|
||||
|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. *|
|
||||
|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
|
||||
|* consisting of "commercial computer software" and "commercial computer software documentation" *|
|
||||
|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
|
||||
|* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this software in individual and commercial software must include, *|
|
||||
|* in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
\************************************************************************************************************************************/
|
||||
#pragma once
|
||||
#include"nvapi_lite_salstart.h"
|
||||
#pragma pack(push,8)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#if (defined(WIN32) || defined(_WIN32)) && defined(_MSC_VER) && (_MSC_VER > 1399) && !defined(NVAPI_INTERNAL) && !defined(NVAPI_DEPRECATED_OLD)
|
||||
#ifndef __nvapi_deprecated_function
|
||||
#define __nvapi_deprecated_function(message) __declspec(deprecated(message))
|
||||
#endif
|
||||
#ifndef __nvapi_deprecated_datatype
|
||||
#define __nvapi_deprecated_datatype(FirstRelease) __declspec(deprecated("Do not use this data type - it is deprecated in release " #FirstRelease "."))
|
||||
#endif
|
||||
#else
|
||||
#ifndef __nvapi_deprecated_function
|
||||
#define __nvapi_deprecated_function(message)
|
||||
#endif
|
||||
#ifndef __nvapi_deprecated_datatype
|
||||
#define __nvapi_deprecated_datatype(FirstRelease)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* 64-bit types for compilers that support them, plus some obsolete variants */
|
||||
#if defined(__GNUC__) || defined(__arm) || defined(__IAR_SYSTEMS_ICC__) || defined(__ghs__) || defined(_WIN64)
|
||||
typedef unsigned long long NvU64; /* 0 to 18446744073709551615 */
|
||||
typedef long long NvS64; /* -9223372036854775808 to 9223372036854775807 */
|
||||
#else
|
||||
typedef unsigned __int64 NvU64; /* 0 to 18446744073709551615 */
|
||||
typedef __int64 NvS64; /* -9223372036854775808 to 9223372036854775807 */
|
||||
#endif
|
||||
|
||||
// mac os 32-bit still needs this
|
||||
#if (defined(macintosh) || defined(__APPLE__)) && !defined(__LP64__)
|
||||
typedef signed long NvS32; /* -2147483648 to 2147483647 */
|
||||
#else
|
||||
typedef signed int NvS32; /* -2147483648 to 2147483647 */
|
||||
#endif
|
||||
|
||||
#ifndef __unix
|
||||
// mac os 32-bit still needs this
|
||||
#if ( (defined(macintosh) && defined(__LP64__) && (__NVAPI_RESERVED0__)) || \
|
||||
(!defined(macintosh) && defined(__NVAPI_RESERVED0__)) )
|
||||
typedef unsigned int NvU32; /* 0 to 4294967295 */
|
||||
#else
|
||||
typedef unsigned long NvU32; /* 0 to 4294967295 */
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned int NvU32; /* 0 to 4294967295 */
|
||||
#endif
|
||||
|
||||
typedef unsigned long temp_NvU32; /* 0 to 4294967295 */
|
||||
typedef signed short NvS16;
|
||||
typedef unsigned short NvU16;
|
||||
typedef unsigned char NvU8;
|
||||
typedef signed char NvS8;
|
||||
typedef float NvF32;
|
||||
typedef double NvF64;
|
||||
|
||||
/*!
|
||||
* Macro to convert NvU32 to NvF32.
|
||||
*/
|
||||
#define NvU32TONvF32(_pData) *(NvF32 *)(_pData)
|
||||
/*!
|
||||
* Macro to convert NvF32 to NvU32.
|
||||
*/
|
||||
#define NvF32TONvU32(_pData) *(NvU32 *)(_pData)
|
||||
|
||||
/* Boolean type */
|
||||
typedef NvU8 NvBool;
|
||||
#define NV_TRUE ((NvBool)(0 == 0))
|
||||
#define NV_FALSE ((NvBool)(0 != 0))
|
||||
|
||||
typedef struct _NV_RECT
|
||||
{
|
||||
NvU32 left;
|
||||
NvU32 top;
|
||||
NvU32 right;
|
||||
NvU32 bottom;
|
||||
} NV_RECT;
|
||||
|
||||
|
||||
#define NV_DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
|
||||
|
||||
//! \addtogroup nvapihandles
|
||||
//! NVAPI Handles - These handles are retrieved from various calls and passed in to others in NvAPI
|
||||
//! These are meant to be opaque types. Do not assume they correspond to indices, HDCs,
|
||||
//! display indexes or anything else.
|
||||
//!
|
||||
//! Most handles remain valid until a display re-configuration (display mode set) or GPU
|
||||
//! reconfiguration (going into or out of SLI modes) occurs. If NVAPI_HANDLE_INVALIDATED
|
||||
//! is received by an app, it should discard all handles, and re-enumerate them.
|
||||
//! @{
|
||||
NV_DECLARE_HANDLE(NvLogicalGpuHandle); //!< One or more physical GPUs acting in concert (SLI)
|
||||
NV_DECLARE_HANDLE(NvPhysicalGpuHandle); //!< A single physical GPU
|
||||
NV_DECLARE_HANDLE(NvDisplayHandle); //!< Display Device driven by NVIDIA GPU(s) (an attached display)
|
||||
NV_DECLARE_HANDLE(NvMonitorHandle); //!< Monitor handle
|
||||
NV_DECLARE_HANDLE(NvUnAttachedDisplayHandle); //!< Unattached Display Device driven by NVIDIA GPU(s)
|
||||
NV_DECLARE_HANDLE(NvVisualComputingDeviceHandle); //!< A handle to a Visual Computing Device
|
||||
NV_DECLARE_HANDLE(NvEventHandle); //!< A handle to an event registration instance
|
||||
|
||||
|
||||
NV_DECLARE_HANDLE(NvHICHandle); //!< A handle to a Host Interface Card
|
||||
NV_DECLARE_HANDLE(NvGSyncDeviceHandle); //!< A handle to a Sync device
|
||||
NV_DECLARE_HANDLE(NvVioHandle); //!< A handle to an SDI device
|
||||
NV_DECLARE_HANDLE(NvTransitionHandle); //!< A handle to address a single transition request
|
||||
NV_DECLARE_HANDLE(NvAudioHandle); //!< NVIDIA HD Audio Device
|
||||
NV_DECLARE_HANDLE(Nv3DVPContextHandle); //!< A handle for a 3D Vision Pro (3DVP) context
|
||||
NV_DECLARE_HANDLE(Nv3DVPTransceiverHandle); //!< A handle for a 3DVP RF transceiver
|
||||
NV_DECLARE_HANDLE(Nv3DVPGlassesHandle); //!< A handle for a pair of 3DVP RF shutter glasses
|
||||
NV_DECLARE_HANDLE(NvPcfClientHandle); //!< A handle for NVPCF clients
|
||||
|
||||
typedef void* StereoHandle; //!< A stereo handle, that corresponds to the device interface
|
||||
|
||||
NV_DECLARE_HANDLE(NvSourceHandle); //!< Unique source handle on the system
|
||||
NV_DECLARE_HANDLE(NvTargetHandle); //!< Unique target handle on the system
|
||||
NV_DECLARE_HANDLE(NVDX_SwapChainHandle); //!< DirectX SwapChain objects
|
||||
static const NVDX_SwapChainHandle NVDX_SWAPCHAIN_NONE = 0;
|
||||
NV_DECLARE_HANDLE(NvPresentBarrierClientHandle); //!< PresentBarrier client object
|
||||
//! @}
|
||||
|
||||
//! \ingroup nvapihandles
|
||||
//! @{
|
||||
#define NVAPI_DEFAULT_HANDLE 0
|
||||
#define NV_BIT(x) (1 << (x))
|
||||
//! @}
|
||||
|
||||
|
||||
|
||||
//! \addtogroup nvapitypes
|
||||
//! @{
|
||||
#define NVAPI_GENERIC_STRING_MAX 4096
|
||||
#define NVAPI_LONG_STRING_MAX 256
|
||||
#define NVAPI_SHORT_STRING_MAX 64
|
||||
|
||||
typedef struct
|
||||
{
|
||||
NvS32 sX;
|
||||
NvS32 sY;
|
||||
NvS32 sWidth;
|
||||
NvS32 sHeight;
|
||||
} NvSBox;
|
||||
|
||||
#ifndef NvGUID_Defined
|
||||
#define NvGUID_Defined
|
||||
|
||||
typedef struct
|
||||
{
|
||||
NvU32 data1;
|
||||
NvU16 data2;
|
||||
NvU16 data3;
|
||||
NvU8 data4[8];
|
||||
} NvGUID, NvLUID;
|
||||
|
||||
|
||||
#endif //#ifndef NvGUID_Defined
|
||||
#define NVAPI_MAX_PHYSICAL_GPUS 64
|
||||
|
||||
|
||||
#define NVAPI_MAX_PHYSICAL_BRIDGES 100
|
||||
#define NVAPI_PHYSICAL_GPUS 32
|
||||
#define NVAPI_MAX_LOGICAL_GPUS 64
|
||||
#define NVAPI_MAX_AVAILABLE_GPU_TOPOLOGIES 256
|
||||
#define NVAPI_MAX_AVAILABLE_SLI_GROUPS 256
|
||||
#define NVAPI_MAX_GPU_TOPOLOGIES NVAPI_MAX_PHYSICAL_GPUS
|
||||
#define NVAPI_MAX_GPU_PER_TOPOLOGY 8
|
||||
#define NVAPI_MAX_DISPLAY_HEADS 2
|
||||
#define NVAPI_ADVANCED_DISPLAY_HEADS 4
|
||||
#define NVAPI_MAX_DISPLAYS NVAPI_PHYSICAL_GPUS * NVAPI_ADVANCED_DISPLAY_HEADS
|
||||
#define NVAPI_MAX_ACPI_IDS 16
|
||||
#define NVAPI_MAX_VIEW_MODES 8
|
||||
|
||||
|
||||
#define NVAPI_SYSTEM_MAX_HWBCS 128
|
||||
#define NVAPI_SYSTEM_HWBC_INVALID_ID 0xffffffff
|
||||
|
||||
#define NVAPI_SYSTEM_MAX_DISPLAYS NVAPI_MAX_PHYSICAL_GPUS * NV_MAX_HEADS
|
||||
#define NV_MAX_HEADS 4 //!< Maximum heads, each with NVAPI_DESKTOP_RES resolution
|
||||
#define NVAPI_MAX_HEADS_PER_GPU 32
|
||||
#define NV_MAX_VID_STREAMS 4 //!< Maximum number of input video streams, each with a #NVAPI_VIDEO_SRC_INFO
|
||||
#define NV_MAX_VID_STREAMS_EX 20 //!< Increasing MAX no. of input video streams, each with a #NVAPI_VIDEO_SRC_INFO
|
||||
#define NV_MAX_VID_PROFILES 4 //!< Maximum number of output video profiles supported
|
||||
|
||||
#define NVAPI_MAX_AUDIO_DEVICES 16
|
||||
|
||||
|
||||
typedef char NvAPI_String[NVAPI_GENERIC_STRING_MAX];
|
||||
typedef char NvAPI_LongString[NVAPI_LONG_STRING_MAX];
|
||||
typedef char NvAPI_ShortString[NVAPI_SHORT_STRING_MAX];
|
||||
typedef NvU16 NvAPI_UnicodeShortString[NVAPI_SHORT_STRING_MAX];
|
||||
//! @}
|
||||
|
||||
|
||||
// =========================================================================================
|
||||
//! NvAPI Version Definition \n
|
||||
//! Maintain per structure specific version define using the MAKE_NVAPI_VERSION macro. \n
|
||||
//! Usage: #define NV_GENLOCK_STATUS_VER MAKE_NVAPI_VERSION(NV_GENLOCK_STATUS, 1)
|
||||
//! \ingroup nvapitypes
|
||||
// =========================================================================================
|
||||
#define MAKE_NVAPI_VERSION(typeName,ver) (NvU32)(sizeof(typeName) | ((ver)<<16))
|
||||
|
||||
//! \ingroup nvapitypes
|
||||
#define GET_NVAPI_VERSION(ver) (NvU32)((ver)>>16)
|
||||
|
||||
//! \ingroup nvapitypes
|
||||
#define GET_NVAPI_SIZE(ver) (NvU32)((ver) & 0xffff)
|
||||
|
||||
|
||||
// ====================================================
|
||||
//! NvAPI Status Values
|
||||
//! All NvAPI functions return one of these codes.
|
||||
//! \ingroup nvapistatus
|
||||
// ====================================================
|
||||
|
||||
|
||||
typedef enum _NvAPI_Status
|
||||
{
|
||||
NVAPI_OK = 0, //!< Success. Request is completed.
|
||||
NVAPI_ERROR = -1, //!< Generic error
|
||||
NVAPI_LIBRARY_NOT_FOUND = -2, //!< NVAPI support library cannot be loaded.
|
||||
NVAPI_NO_IMPLEMENTATION = -3, //!< not implemented in current driver installation
|
||||
NVAPI_API_NOT_INITIALIZED = -4, //!< NvAPI_Initialize has not been called (successfully)
|
||||
NVAPI_INVALID_ARGUMENT = -5, //!< The argument/parameter value is not valid or NULL.
|
||||
NVAPI_NVIDIA_DEVICE_NOT_FOUND = -6, //!< No NVIDIA display driver, or NVIDIA GPU driving a display, was found.
|
||||
NVAPI_END_ENUMERATION = -7, //!< No more items to enumerate
|
||||
NVAPI_INVALID_HANDLE = -8, //!< Invalid handle
|
||||
NVAPI_INCOMPATIBLE_STRUCT_VERSION = -9, //!< An argument's structure version is not supported
|
||||
NVAPI_HANDLE_INVALIDATED = -10, //!< The handle is no longer valid (likely due to GPU or display re-configuration)
|
||||
NVAPI_OPENGL_CONTEXT_NOT_CURRENT = -11, //!< No NVIDIA OpenGL context is current (but needs to be)
|
||||
NVAPI_INVALID_POINTER = -14, //!< An invalid pointer, usually NULL, was passed as a parameter
|
||||
NVAPI_NO_GL_EXPERT = -12, //!< OpenGL Expert is not supported by the current drivers
|
||||
NVAPI_INSTRUMENTATION_DISABLED = -13, //!< OpenGL Expert is supported, but driver instrumentation is currently disabled
|
||||
NVAPI_NO_GL_NSIGHT = -15, //!< OpenGL does not support Nsight
|
||||
|
||||
NVAPI_EXPECTED_LOGICAL_GPU_HANDLE = -100, //!< Expected a logical GPU handle for one or more parameters
|
||||
NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE = -101, //!< Expected a physical GPU handle for one or more parameters
|
||||
NVAPI_EXPECTED_DISPLAY_HANDLE = -102, //!< Expected an NV display handle for one or more parameters
|
||||
NVAPI_INVALID_COMBINATION = -103, //!< The combination of parameters is not valid.
|
||||
NVAPI_NOT_SUPPORTED = -104, //!< Requested feature is not supported in the selected GPU
|
||||
NVAPI_PORTID_NOT_FOUND = -105, //!< No port ID was found for the I2C transaction
|
||||
NVAPI_EXPECTED_UNATTACHED_DISPLAY_HANDLE = -106, //!< Expected an unattached display handle as one of the input parameters.
|
||||
NVAPI_INVALID_PERF_LEVEL = -107, //!< Invalid perf level
|
||||
NVAPI_DEVICE_BUSY = -108, //!< Device is busy; request not fulfilled
|
||||
NVAPI_NV_PERSIST_FILE_NOT_FOUND = -109, //!< NV persist file is not found
|
||||
NVAPI_PERSIST_DATA_NOT_FOUND = -110, //!< NV persist data is not found
|
||||
NVAPI_EXPECTED_TV_DISPLAY = -111, //!< Expected a TV output display
|
||||
NVAPI_EXPECTED_TV_DISPLAY_ON_DCONNECTOR = -112, //!< Expected a TV output on the D Connector - HDTV_EIAJ4120.
|
||||
NVAPI_NO_ACTIVE_SLI_TOPOLOGY = -113, //!< SLI is not active on this device.
|
||||
NVAPI_SLI_RENDERING_MODE_NOTALLOWED = -114, //!< Setup of SLI rendering mode is not possible right now.
|
||||
NVAPI_EXPECTED_DIGITAL_FLAT_PANEL = -115, //!< Expected a digital flat panel.
|
||||
NVAPI_ARGUMENT_EXCEED_MAX_SIZE = -116, //!< Argument exceeds the expected size.
|
||||
NVAPI_DEVICE_SWITCHING_NOT_ALLOWED = -117, //!< Inhibit is ON due to one of the flags in NV_GPU_DISPLAY_CHANGE_INHIBIT or SLI active.
|
||||
NVAPI_TESTING_CLOCKS_NOT_SUPPORTED = -118, //!< Testing of clocks is not supported.
|
||||
NVAPI_UNKNOWN_UNDERSCAN_CONFIG = -119, //!< The specified underscan config is from an unknown source (e.g. INF)
|
||||
NVAPI_TIMEOUT_RECONFIGURING_GPU_TOPO = -120, //!< Timeout while reconfiguring GPUs
|
||||
NVAPI_DATA_NOT_FOUND = -121, //!< Requested data was not found
|
||||
NVAPI_EXPECTED_ANALOG_DISPLAY = -122, //!< Expected an analog display
|
||||
NVAPI_NO_VIDLINK = -123, //!< No SLI video bridge is present
|
||||
NVAPI_REQUIRES_REBOOT = -124, //!< NVAPI requires a reboot for the settings to take effect
|
||||
NVAPI_INVALID_HYBRID_MODE = -125, //!< The function is not supported with the current Hybrid mode.
|
||||
NVAPI_MIXED_TARGET_TYPES = -126, //!< The target types are not all the same
|
||||
NVAPI_SYSWOW64_NOT_SUPPORTED = -127, //!< The function is not supported from 32-bit on a 64-bit system.
|
||||
NVAPI_IMPLICIT_SET_GPU_TOPOLOGY_CHANGE_NOT_ALLOWED = -128, //!< There is no implicit GPU topology active. Use NVAPI_SetHybridMode to change topology.
|
||||
NVAPI_REQUEST_USER_TO_CLOSE_NON_MIGRATABLE_APPS = -129, //!< Prompt the user to close all non-migratable applications.
|
||||
NVAPI_OUT_OF_MEMORY = -130, //!< Could not allocate sufficient memory to complete the call.
|
||||
NVAPI_WAS_STILL_DRAWING = -131, //!< The previous operation that is transferring information to or from this surface is incomplete.
|
||||
NVAPI_FILE_NOT_FOUND = -132, //!< The file was not found.
|
||||
NVAPI_TOO_MANY_UNIQUE_STATE_OBJECTS = -133, //!< There are too many unique instances of a particular type of state object.
|
||||
NVAPI_INVALID_CALL = -134, //!< The method call is invalid. For example, a method's parameter may not be a valid pointer.
|
||||
NVAPI_D3D10_1_LIBRARY_NOT_FOUND = -135, //!< d3d10_1.dll cannot be loaded.
|
||||
NVAPI_FUNCTION_NOT_FOUND = -136, //!< Couldn't find the function in the loaded DLL.
|
||||
NVAPI_INVALID_USER_PRIVILEGE = -137, //!< The application will require Administrator privileges to access this API.
|
||||
//!< The application can be elevated to a higher permission level by selecting "Run as Administrator".
|
||||
NVAPI_EXPECTED_NON_PRIMARY_DISPLAY_HANDLE = -138, //!< The handle corresponds to GDIPrimary.
|
||||
NVAPI_EXPECTED_COMPUTE_GPU_HANDLE = -139, //!< Setting Physx GPU requires that the GPU is compute-capable.
|
||||
NVAPI_STEREO_NOT_INITIALIZED = -140, //!< The Stereo part of NVAPI failed to initialize completely. Check if the stereo driver is installed.
|
||||
NVAPI_STEREO_REGISTRY_ACCESS_FAILED = -141, //!< Access to stereo-related registry keys or values has failed.
|
||||
NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED = -142, //!< The given registry profile type is not supported.
|
||||
NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED = -143, //!< The given registry value is not supported.
|
||||
NVAPI_STEREO_NOT_ENABLED = -144, //!< Stereo is not enabled and the function needed it to execute completely.
|
||||
NVAPI_STEREO_NOT_TURNED_ON = -145, //!< Stereo is not turned on and the function needed it to execute completely.
|
||||
NVAPI_STEREO_INVALID_DEVICE_INTERFACE = -146, //!< Invalid device interface.
|
||||
NVAPI_STEREO_PARAMETER_OUT_OF_RANGE = -147, //!< Separation percentage or JPEG image capture quality is out of [0-100] range.
|
||||
NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED = -148, //!< The given frustum adjust mode is not supported.
|
||||
NVAPI_TOPO_NOT_POSSIBLE = -149, //!< The mosaic topology is not possible given the current state of the hardware.
|
||||
NVAPI_MODE_CHANGE_FAILED = -150, //!< An attempt to do a display resolution mode change has failed.
|
||||
NVAPI_D3D11_LIBRARY_NOT_FOUND = -151, //!< d3d11.dll/d3d11_beta.dll cannot be loaded.
|
||||
NVAPI_INVALID_ADDRESS = -152, //!< Address is outside of valid range.
|
||||
NVAPI_STRING_TOO_SMALL = -153, //!< The pre-allocated string is too small to hold the result.
|
||||
NVAPI_MATCHING_DEVICE_NOT_FOUND = -154, //!< The input does not match any of the available devices.
|
||||
NVAPI_DRIVER_RUNNING = -155, //!< Driver is running.
|
||||
NVAPI_DRIVER_NOTRUNNING = -156, //!< Driver is not running.
|
||||
NVAPI_ERROR_DRIVER_RELOAD_REQUIRED = -157, //!< A driver reload is required to apply these settings.
|
||||
NVAPI_SET_NOT_ALLOWED = -158, //!< Intended setting is not allowed.
|
||||
NVAPI_ADVANCED_DISPLAY_TOPOLOGY_REQUIRED = -159, //!< Information can't be returned due to "advanced display topology".
|
||||
NVAPI_SETTING_NOT_FOUND = -160, //!< Setting is not found.
|
||||
NVAPI_SETTING_SIZE_TOO_LARGE = -161, //!< Setting size is too large.
|
||||
NVAPI_TOO_MANY_SETTINGS_IN_PROFILE = -162, //!< There are too many settings for a profile.
|
||||
NVAPI_PROFILE_NOT_FOUND = -163, //!< Profile is not found.
|
||||
NVAPI_PROFILE_NAME_IN_USE = -164, //!< Profile name is duplicated.
|
||||
NVAPI_PROFILE_NAME_EMPTY = -165, //!< Profile name is empty.
|
||||
NVAPI_EXECUTABLE_NOT_FOUND = -166, //!< Application not found in the Profile.
|
||||
NVAPI_EXECUTABLE_ALREADY_IN_USE = -167, //!< Application already exists in the other profile.
|
||||
NVAPI_DATATYPE_MISMATCH = -168, //!< Data Type mismatch
|
||||
NVAPI_PROFILE_REMOVED = -169, //!< The profile passed as parameter has been removed and is no longer valid.
|
||||
NVAPI_UNREGISTERED_RESOURCE = -170, //!< An unregistered resource was passed as a parameter.
|
||||
NVAPI_ID_OUT_OF_RANGE = -171, //!< The DisplayId corresponds to a display which is not within the normal outputId range.
|
||||
NVAPI_DISPLAYCONFIG_VALIDATION_FAILED = -172, //!< Display topology is not valid so the driver cannot do a mode set on this configuration.
|
||||
NVAPI_DPMST_CHANGED = -173, //!< Display Port Multi-Stream topology has been changed.
|
||||
NVAPI_INSUFFICIENT_BUFFER = -174, //!< Input buffer is insufficient to hold the contents.
|
||||
NVAPI_ACCESS_DENIED = -175, //!< No access to the caller.
|
||||
NVAPI_MOSAIC_NOT_ACTIVE = -176, //!< The requested action cannot be performed without Mosaic being enabled.
|
||||
NVAPI_SHARE_RESOURCE_RELOCATED = -177, //!< The surface is relocated away from video memory.
|
||||
NVAPI_REQUEST_USER_TO_DISABLE_DWM = -178, //!< The user should disable DWM before calling NvAPI.
|
||||
NVAPI_D3D_DEVICE_LOST = -179, //!< D3D device status is D3DERR_DEVICELOST or D3DERR_DEVICENOTRESET - the user has to reset the device.
|
||||
NVAPI_INVALID_CONFIGURATION = -180, //!< The requested action cannot be performed in the current state.
|
||||
NVAPI_STEREO_HANDSHAKE_NOT_DONE = -181, //!< Call failed as stereo handshake not completed.
|
||||
NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS = -182, //!< The path provided was too short to determine the correct NVDRS_APPLICATION
|
||||
NVAPI_DEFAULT_STEREO_PROFILE_IS_NOT_DEFINED = -183, //!< Default stereo profile is not currently defined
|
||||
NVAPI_DEFAULT_STEREO_PROFILE_DOES_NOT_EXIST = -184, //!< Default stereo profile does not exist
|
||||
NVAPI_CLUSTER_ALREADY_EXISTS = -185, //!< A cluster is already defined with the given configuration.
|
||||
NVAPI_DPMST_DISPLAY_ID_EXPECTED = -186, //!< The input display id is not that of a multi stream enabled connector or a display device in a multi stream topology
|
||||
NVAPI_INVALID_DISPLAY_ID = -187, //!< The input display id is not valid or the monitor associated to it does not support the current operation
|
||||
NVAPI_STREAM_IS_OUT_OF_SYNC = -188, //!< While playing secure audio stream, stream goes out of sync
|
||||
NVAPI_INCOMPATIBLE_AUDIO_DRIVER = -189, //!< Older audio driver version than required
|
||||
NVAPI_VALUE_ALREADY_SET = -190, //!< Value already set, setting again not allowed.
|
||||
NVAPI_TIMEOUT = -191, //!< Requested operation timed out
|
||||
NVAPI_GPU_WORKSTATION_FEATURE_INCOMPLETE = -192, //!< The requested workstation feature set has incomplete driver internal allocation resources
|
||||
NVAPI_STEREO_INIT_ACTIVATION_NOT_DONE = -193, //!< Call failed because InitActivation was not called.
|
||||
NVAPI_SYNC_NOT_ACTIVE = -194, //!< The requested action cannot be performed without Sync being enabled.
|
||||
NVAPI_SYNC_MASTER_NOT_FOUND = -195, //!< The requested action cannot be performed without Sync Master being enabled.
|
||||
NVAPI_INVALID_SYNC_TOPOLOGY = -196, //!< Invalid displays passed in the NV_GSYNC_DISPLAY pointer.
|
||||
NVAPI_ECID_SIGN_ALGO_UNSUPPORTED = -197, //!< The specified signing algorithm is not supported. Either an incorrect value was entered or the current installed driver/hardware does not support the input value.
|
||||
NVAPI_ECID_KEY_VERIFICATION_FAILED = -198, //!< The encrypted public key verification has failed.
|
||||
NVAPI_FIRMWARE_OUT_OF_DATE = -199, //!< The device's firmware is out of date.
|
||||
NVAPI_FIRMWARE_REVISION_NOT_SUPPORTED = -200, //!< The device's firmware is not supported.
|
||||
NVAPI_LICENSE_CALLER_AUTHENTICATION_FAILED = -201, //!< The caller is not authorized to modify the License.
|
||||
NVAPI_D3D_DEVICE_NOT_REGISTERED = -202, //!< The user tried to use a deferred context without registering the device first
|
||||
NVAPI_RESOURCE_NOT_ACQUIRED = -203, //!< Head or SourceId was not reserved for the VR Display before doing the Modeset or the dedicated display.
|
||||
NVAPI_TIMING_NOT_SUPPORTED = -204, //!< Provided timing is not supported.
|
||||
NVAPI_HDCP_ENCRYPTION_FAILED = -205, //!< HDCP Encryption Failed for the device. Would be applicable when the device is HDCP Capable.
|
||||
NVAPI_PCLK_LIMITATION_FAILED = -206, //!< Provided mode is over sink device pclk limitation.
|
||||
NVAPI_NO_CONNECTOR_FOUND = -207, //!< No connector on GPU found.
|
||||
NVAPI_HDCP_DISABLED = -208, //!< When a non-HDCP capable HMD is connected, we would inform user by this code.
|
||||
NVAPI_API_IN_USE = -209, //!< Atleast an API is still being called
|
||||
NVAPI_NVIDIA_DISPLAY_NOT_FOUND = -210, //!< No display found on Nvidia GPU(s).
|
||||
NVAPI_PRIV_SEC_VIOLATION = -211, //!< Priv security violation, improper access to a secured register.
|
||||
NVAPI_INCORRECT_VENDOR = -212, //!< NVAPI cannot be called by this vendor
|
||||
NVAPI_DISPLAY_IN_USE = -213, //!< DirectMode Display is already in use
|
||||
NVAPI_UNSUPPORTED_CONFIG_NON_HDCP_HMD = -214, //!< The Config is having Non-NVidia GPU with Non-HDCP HMD connected
|
||||
NVAPI_MAX_DISPLAY_LIMIT_REACHED = -215, //!< GPU's Max Display Limit has Reached
|
||||
NVAPI_INVALID_DIRECT_MODE_DISPLAY = -216, //!< DirectMode not Enabled on the Display
|
||||
NVAPI_GPU_IN_DEBUG_MODE = -217, //!< GPU is in debug mode, OC is NOT allowed.
|
||||
NVAPI_D3D_CONTEXT_NOT_FOUND = -218, //!< No NvAPI context was found for this D3D object
|
||||
NVAPI_STEREO_VERSION_MISMATCH = -219, //!< there is version mismatch between stereo driver and dx driver
|
||||
NVAPI_GPU_NOT_POWERED = -220, //!< GPU is not powered and so the request cannot be completed.
|
||||
NVAPI_ERROR_DRIVER_RELOAD_IN_PROGRESS = -221, //!< The display driver update in progress.
|
||||
NVAPI_WAIT_FOR_HW_RESOURCE = -222, //!< Wait for HW resources allocation
|
||||
NVAPI_REQUIRE_FURTHER_HDCP_ACTION = -223, //!< operation requires further HDCP action
|
||||
NVAPI_DISPLAY_MUX_TRANSITION_FAILED = -224, //!< Dynamic Mux transition failure
|
||||
NVAPI_INVALID_DSC_VERSION = -225, //!< Invalid DSC version
|
||||
NVAPI_INVALID_DSC_SLICECOUNT = -226, //!< Invalid DSC slice count
|
||||
NVAPI_INVALID_DSC_OUTPUT_BPP = -227, //!< Invalid DSC output BPP
|
||||
NVAPI_FAILED_TO_LOAD_FROM_DRIVER_STORE = -228, //!< There was an error while loading nvapi.dll from the driver store.
|
||||
NVAPI_NO_VULKAN = -229, //!< OpenGL does not export Vulkan fake extensions
|
||||
NVAPI_REQUEST_PENDING = -230, //!< A request for NvTOPPs telemetry CData has already been made and is pending a response.
|
||||
NVAPI_RESOURCE_IN_USE = -231, //!< Operation cannot be performed because the resource is in use.
|
||||
NVAPI_INVALID_IMAGE = -232, //!< Device kernel image is invalid
|
||||
NVAPI_INVALID_PTX = -233, //!< PTX JIT compilation failed
|
||||
NVAPI_NVLINK_UNCORRECTABLE = -234, //!< Uncorrectable NVLink error was detected during the execution
|
||||
NVAPI_JIT_COMPILER_NOT_FOUND = -235, //!< PTX JIT compiler library was not found.
|
||||
NVAPI_INVALID_SOURCE = -236, //!< Device kernel source is invalid.
|
||||
NVAPI_ILLEGAL_INSTRUCTION = -237, //!< While executing a kernel, the device encountered an illegal instruction.
|
||||
NVAPI_INVALID_PC = -238, //!< While executing a kernel, the device program counter wrapped its address space
|
||||
NVAPI_LAUNCH_FAILED = -239, //!< An exception occurred on the device while executing a kernel
|
||||
NVAPI_NOT_PERMITTED = -240, //!< Attempted operation is not permitted.
|
||||
NVAPI_CALLBACK_ALREADY_REGISTERED = -241, //!< The callback function has already been registered.
|
||||
NVAPI_CALLBACK_NOT_FOUND = -242, //!< The callback function is not found or not registered.
|
||||
} NvAPI_Status;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_SYS_GetDriverAndBranchVersion
|
||||
//
|
||||
//! DESCRIPTION: This API returns display driver version and driver-branch string.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \param [out] pDriverVersion Contains the driver version after successful return.
|
||||
//! \param [out] szBuildBranchString Contains the driver-branch string after successful return.
|
||||
//!
|
||||
//! \retval ::NVAPI_INVALID_ARGUMENT: either pDriverVersion is NULL or enum index too big
|
||||
//! \retval ::NVAPI_OK - completed request
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized
|
||||
//! \retval ::NVAPI_ERROR - miscellaneous error occurred
|
||||
//!
|
||||
//! \ingroup driverapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_SYS_GetDriverAndBranchVersion(NvU32* pDriverVersion, NvAPI_ShortString szBuildBranchString);
|
||||
//! \ingroup driverapi
|
||||
//! Used in NvAPI_GPU_GetMemoryInfo().
|
||||
typedef struct
|
||||
{
|
||||
NvU32 version; //!< Version info
|
||||
NvU32 dedicatedVideoMemory; //!< Size(in kb) of the physical framebuffer.
|
||||
NvU32 availableDedicatedVideoMemory; //!< Size(in kb) of the available physical framebuffer for allocating video memory surfaces.
|
||||
NvU32 systemVideoMemory; //!< Size(in kb) of system memory the driver allocates at load time.
|
||||
NvU32 sharedSystemMemory; //!< Size(in kb) of shared system memory that driver is allowed to commit for surfaces across all allocations.
|
||||
|
||||
} NV_DISPLAY_DRIVER_MEMORY_INFO_V1;
|
||||
|
||||
|
||||
//! \ingroup driverapi
|
||||
//! Used in NvAPI_GPU_GetMemoryInfo().
|
||||
typedef struct
|
||||
{
|
||||
NvU32 version; //!< Version info
|
||||
NvU32 dedicatedVideoMemory; //!< Size(in kb) of the physical framebuffer.
|
||||
NvU32 availableDedicatedVideoMemory; //!< Size(in kb) of the available physical framebuffer for allocating video memory surfaces.
|
||||
NvU32 systemVideoMemory; //!< Size(in kb) of system memory the driver allocates at load time.
|
||||
NvU32 sharedSystemMemory; //!< Size(in kb) of shared system memory that driver is allowed to commit for surfaces across all allocations.
|
||||
NvU32 curAvailableDedicatedVideoMemory; //!< Size(in kb) of the current available physical framebuffer for allocating video memory surfaces.
|
||||
|
||||
} NV_DISPLAY_DRIVER_MEMORY_INFO_V2;
|
||||
|
||||
//! \ingroup driverapi
|
||||
//! Used in NvAPI_GPU_GetMemoryInfo().
|
||||
typedef struct
|
||||
{
|
||||
NvU32 version; //!< Version info
|
||||
NvU32 dedicatedVideoMemory; //!< Size(in kb) of the physical framebuffer.
|
||||
NvU32 availableDedicatedVideoMemory; //!< Size(in kb) of the available physical framebuffer for allocating video memory surfaces.
|
||||
NvU32 systemVideoMemory; //!< Size(in kb) of system memory the driver allocates at load time.
|
||||
NvU32 sharedSystemMemory; //!< Size(in kb) of shared system memory that driver is allowed to commit for surfaces across all allocations.
|
||||
NvU32 curAvailableDedicatedVideoMemory; //!< Size(in kb) of the current available physical framebuffer for allocating video memory surfaces.
|
||||
NvU32 dedicatedVideoMemoryEvictionsSize; //!< Size(in kb) of the total size of memory released as a result of the evictions.
|
||||
NvU32 dedicatedVideoMemoryEvictionCount; //!< Indicates the number of eviction events that caused an allocation to be removed from dedicated video memory to free GPU
|
||||
//!< video memory to make room for other allocations.
|
||||
} NV_DISPLAY_DRIVER_MEMORY_INFO_V3;
|
||||
|
||||
//! \ingroup driverapi
|
||||
typedef NV_DISPLAY_DRIVER_MEMORY_INFO_V3 NV_DISPLAY_DRIVER_MEMORY_INFO;
|
||||
|
||||
//! \ingroup driverapi
|
||||
//! Macro for constructing the version field of NV_DISPLAY_DRIVER_MEMORY_INFO_V1
|
||||
#define NV_DISPLAY_DRIVER_MEMORY_INFO_VER_1 MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_MEMORY_INFO_V1,1)
|
||||
|
||||
//! \ingroup driverapi
|
||||
//! Macro for constructing the version field of NV_DISPLAY_DRIVER_MEMORY_INFO_V2
|
||||
#define NV_DISPLAY_DRIVER_MEMORY_INFO_VER_2 MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_MEMORY_INFO_V2,2)
|
||||
|
||||
//! \ingroup driverapi
|
||||
//! Macro for constructing the version field of NV_DISPLAY_DRIVER_MEMORY_INFO_V3
|
||||
#define NV_DISPLAY_DRIVER_MEMORY_INFO_VER_3 MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_MEMORY_INFO_V3,3)
|
||||
|
||||
//! \ingroup driverapi
|
||||
#define NV_DISPLAY_DRIVER_MEMORY_INFO_VER NV_DISPLAY_DRIVER_MEMORY_INFO_VER_3
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_GPU_GetMemoryInfo
|
||||
//
|
||||
//! DESCRIPTION: This function retrieves the available driver memory footprint for the specified GPU.
|
||||
//! If the GPU is in TCC Mode, only dedicatedVideoMemory will be returned in pMemoryInfo (NV_DISPLAY_DRIVER_MEMORY_INFO).
|
||||
//!
|
||||
//! \deprecated Do not use this function - it is deprecated in release 520. Instead, use NvAPI_GPU_GetMemoryInfoEx.
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! TCC_SUPPORTED
|
||||
//!
|
||||
//! \since Release: 177
|
||||
//!
|
||||
//! \param [in] hPhysicalGpu Handle of the physical GPU for which the memory information is to be extracted.
|
||||
//! \param [out] pMemoryInfo The memory footprint available in the driver. See NV_DISPLAY_DRIVER_MEMORY_INFO.
|
||||
//!
|
||||
//! \retval NVAPI_INVALID_ARGUMENT pMemoryInfo is NULL.
|
||||
//! \retval NVAPI_OK Call successful.
|
||||
//! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
|
||||
//! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_DISPLAY_DRIVER_MEMORY_INFO structure version mismatch.
|
||||
//!
|
||||
//! \ingroup driverapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
__nvapi_deprecated_function("Do not use this function - it is deprecated in release 520. Instead, use NvAPI_GPU_GetMemoryInfoEx.")
|
||||
NVAPI_INTERFACE NvAPI_GPU_GetMemoryInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_DISPLAY_DRIVER_MEMORY_INFO *pMemoryInfo);
|
||||
|
||||
|
||||
//! \ingroup driverapi
|
||||
//! Used in NvAPI_GPU_GetMemoryInfoEx().
|
||||
typedef struct
|
||||
{
|
||||
NvU32 version; //!< Structure version
|
||||
NvU64 dedicatedVideoMemory; //!< Size(in bytes) of the physical framebuffer.
|
||||
NvU64 availableDedicatedVideoMemory; //!< Size(in bytes) of the available physical framebuffer for allocating video memory surfaces.
|
||||
NvU64 systemVideoMemory; //!< Size(in bytes) of system memory the driver allocates at load time.
|
||||
NvU64 sharedSystemMemory; //!< Size(in bytes) of shared system memory that driver is allowed to commit for surfaces across all allocations.
|
||||
NvU64 curAvailableDedicatedVideoMemory; //!< Size(in bytes) of the current available physical framebuffer for allocating video memory surfaces.
|
||||
NvU64 dedicatedVideoMemoryEvictionsSize; //!< Size(in bytes) of the total size of memory released as a result of the evictions.
|
||||
NvU64 dedicatedVideoMemoryEvictionCount; //!< Indicates the number of eviction events that caused an allocation to be removed from dedicated video memory to free GPU
|
||||
//!< video memory to make room for other allocations.
|
||||
NvU64 dedicatedVideoMemoryPromotionsSize; //!< Size(in bytes) of the total size of memory allocated as a result of the promotions.
|
||||
NvU64 dedicatedVideoMemoryPromotionCount; //!< Indicates the number of promotion events that caused an allocation to be promoted to dedicated video memory
|
||||
} NV_GPU_MEMORY_INFO_EX_V1;
|
||||
|
||||
//! \ingroup driverapi
|
||||
typedef NV_GPU_MEMORY_INFO_EX_V1 NV_GPU_MEMORY_INFO_EX;
|
||||
|
||||
//! \ingroup driverapi
|
||||
//! Macro for constructing the version field of NV_GPU_MEMORY_INFO_EX_V1
|
||||
#define NV_GPU_MEMORY_INFO_EX_VER_1 MAKE_NVAPI_VERSION(NV_GPU_MEMORY_INFO_EX_V1,1)
|
||||
|
||||
//! \ingroup driverapi
|
||||
#define NV_GPU_MEMORY_INFO_EX_VER NV_GPU_MEMORY_INFO_EX_VER_1
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_GPU_GetMemoryInfoEx
|
||||
//
|
||||
//! DESCRIPTION: This function retrieves the available driver memory footprint for the specified GPU.
|
||||
//! If the GPU is in TCC Mode, only dedicatedVideoMemory will be returned in pMemoryInfo (NV_GPU_MEMORY_INFO_EX).
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 10 and higher
|
||||
//!
|
||||
//!
|
||||
//! TCC_SUPPORTED
|
||||
//!
|
||||
//! \since Release: 520
|
||||
//!
|
||||
//! \param [in] hPhysicalGpu Handle of the physical GPU for which the memory information is to be extracted.
|
||||
//! \param [out] pMemoryInfo The memory footprint available in the driver. See NV_GPU_MEMORY_INFO_EX.
|
||||
//!
|
||||
//! \retval NVAPI_INVALID_ARGUMENT pMemoryInfo is NULL.
|
||||
//! \retval NVAPI_OK Call successful.
|
||||
//! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
|
||||
//! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_GPU_MEMORY_INFO_EX structure version mismatch.
|
||||
//!
|
||||
//! \ingroup driverapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_GPU_GetMemoryInfoEx(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_MEMORY_INFO_EX *pMemoryInfo);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_EnumPhysicalGPUs
|
||||
//
|
||||
//! This function returns an array of physical GPU handles.
|
||||
//! Each handle represents a physical GPU present in the system.
|
||||
//! That GPU may be part of an SLI configuration, or may not be visible to the OS directly.
|
||||
//!
|
||||
//! At least one GPU must be present in the system and running an NVIDIA display driver.
|
||||
//!
|
||||
//! The array nvGPUHandle will be filled with physical GPU handle values. The returned
|
||||
//! gpuCount determines how many entries in the array are valid.
|
||||
//!
|
||||
//! \note In drivers older than 105.00, all physical GPU handles get invalidated on a
|
||||
//! modeset. So the calling applications need to renum the handles after every modeset.\n
|
||||
//! With drivers 105.00 and up, all physical GPU handles are constant.
|
||||
//! Physical GPU handles are constant as long as the GPUs are not physically moved and
|
||||
//! the SBIOS VGA order is unchanged.
|
||||
//!
|
||||
//! For GPU handles in TCC MODE please use NvAPI_EnumTCCPhysicalGPUs()
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \par Introduced in
|
||||
//! \since Release: 80
|
||||
//!
|
||||
//! \retval NVAPI_INVALID_ARGUMENT nvGPUHandle or pGpuCount is NULL
|
||||
//! \retval NVAPI_OK One or more handles were returned
|
||||
//! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
|
||||
//! \ingroup gpu
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_EnumPhysicalGPUs(NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
|
||||
#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)
|
||||
|
||||
NV_DECLARE_HANDLE(NVDX_ObjectHandle); // DX Objects
|
||||
static const NVDX_ObjectHandle NVDX_OBJECT_NONE = 0;
|
||||
|
||||
#endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)
|
||||
#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_D3D_GetObjectHandleForResource
|
||||
//
|
||||
//! DESCRIPTION: This API gets a handle to a resource.
|
||||
//!
|
||||
//! \param [in] pDev The ID3D11Device, ID3D10Device or IDirect3DDevice9 or ID3D11DeviceContext to use
|
||||
//! \param [in] pResource The ID3D11Resource, ID3D10Resource or IDirect3DResource9 from which
|
||||
//! we want the NvAPI handle
|
||||
//! \param [out] pHandle A handle to the resource
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 185
|
||||
//!
|
||||
//! \return ::NVAPI_OK if the handle was populated.
|
||||
//!
|
||||
//! \ingroup dx
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_D3D_GetObjectHandleForResource(
|
||||
IUnknown *pDevice,
|
||||
IUnknown *pResource,
|
||||
NVDX_ObjectHandle *pHandle);
|
||||
|
||||
|
||||
#endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)
|
||||
|
||||
#include"nvapi_lite_salend.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma pack(pop)
|
|
@ -1,191 +0,0 @@
|
|||
/************************************************************************************************************************************\
|
||||
|* *|
|
||||
|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
|
||||
|* *|
|
||||
|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
|
||||
|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
|
||||
|* Otherwise, you have no rights to use or access this software in any manner. *|
|
||||
|* *|
|
||||
|* If not covered by the applicable NVIDIA software license agreement: *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
|
||||
|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
|
||||
|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
|
||||
|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
|
||||
|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|
||||
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
|
||||
|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. *|
|
||||
|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
|
||||
|* consisting of "commercial computer software" and "commercial computer software documentation" *|
|
||||
|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
|
||||
|* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this software in individual and commercial software must include, *|
|
||||
|* in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
\************************************************************************************************************************************/
|
||||
#pragma once
|
||||
#include"nvapi_lite_salstart.h"
|
||||
#include"nvapi_lite_common.h"
|
||||
#pragma pack(push,8)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__))
|
||||
//! \ingroup dx
|
||||
//! D3D_FEATURE_LEVEL supported - used in NvAPI_D3D11_CreateDevice() and NvAPI_D3D11_CreateDeviceAndSwapChain()
|
||||
typedef enum
|
||||
{
|
||||
NVAPI_DEVICE_FEATURE_LEVEL_NULL = -1,
|
||||
NVAPI_DEVICE_FEATURE_LEVEL_10_0 = 0,
|
||||
NVAPI_DEVICE_FEATURE_LEVEL_10_0_PLUS = 1,
|
||||
NVAPI_DEVICE_FEATURE_LEVEL_10_1 = 2,
|
||||
NVAPI_DEVICE_FEATURE_LEVEL_11_0 = 3,
|
||||
} NVAPI_DEVICE_FEATURE_LEVEL;
|
||||
|
||||
#endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__))
|
||||
#if defined(__cplusplus) && defined(__d3d11_h__)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_D3D11_CreateDevice
|
||||
//
|
||||
//! DESCRIPTION: This function tries to create a DirectX 11 device. If the call fails (if we are running
|
||||
//! on pre-DirectX 11 hardware), depending on the type of hardware it will try to create a DirectX 10.1 OR DirectX 10.0+
|
||||
//! OR DirectX 10.0 device. The function call is the same as D3D11CreateDevice(), but with an extra
|
||||
//! argument (D3D_FEATURE_LEVEL supported by the device) that the function fills in. This argument
|
||||
//! can contain -1 (NVAPI_DEVICE_FEATURE_LEVEL_NULL), if the requested featureLevel is less than DirecX 10.0.
|
||||
//!
|
||||
//! NOTE: When NvAPI_D3D11_CreateDevice is called with 10+ feature level we have an issue on few set of
|
||||
//! tesla hardware (G80/G84/G86/G92/G94/G96) which does not support all feature level 10+ functionality
|
||||
//! e.g. calling driver with mismatch between RenderTarget and Depth Buffer. App developers should
|
||||
//! take into consideration such limitation when using NVAPI on such tesla hardwares.
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 185
|
||||
//!
|
||||
//! \param [in] pAdapter
|
||||
//! \param [in] DriverType
|
||||
//! \param [in] Software
|
||||
//! \param [in] Flags
|
||||
//! \param [in] *pFeatureLevels
|
||||
//! \param [in] FeatureLevels
|
||||
//! \param [in] SDKVersion
|
||||
//! \param [in] **ppDevice
|
||||
//! \param [in] *pFeatureLevel
|
||||
//! \param [in] **ppImmediateContext
|
||||
//! \param [in] *pSupportedLevel D3D_FEATURE_LEVEL supported
|
||||
//!
|
||||
//! \return NVAPI_OK if the createDevice call succeeded.
|
||||
//!
|
||||
//! \ingroup dx
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_D3D11_CreateDevice(IDXGIAdapter* pAdapter,
|
||||
D3D_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
CONST D3D_FEATURE_LEVEL *pFeatureLevels,
|
||||
UINT FeatureLevels,
|
||||
UINT SDKVersion,
|
||||
ID3D11Device **ppDevice,
|
||||
D3D_FEATURE_LEVEL *pFeatureLevel,
|
||||
ID3D11DeviceContext **ppImmediateContext,
|
||||
NVAPI_DEVICE_FEATURE_LEVEL *pSupportedLevel);
|
||||
|
||||
|
||||
#endif //defined(__cplusplus) && defined(__d3d11_h__)
|
||||
#if defined(__cplusplus) && defined(__d3d11_h__)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_D3D11_CreateDeviceAndSwapChain
|
||||
//
|
||||
//! DESCRIPTION: This function tries to create a DirectX 11 device and swap chain. If the call fails (if we are
|
||||
//! running on pre=DirectX 11 hardware), depending on the type of hardware it will try to create a DirectX 10.1 OR
|
||||
//! DirectX 10.0+ OR DirectX 10.0 device. The function call is the same as D3D11CreateDeviceAndSwapChain,
|
||||
//! but with an extra argument (D3D_FEATURE_LEVEL supported by the device) that the function fills
|
||||
//! in. This argument can contain -1 (NVAPI_DEVICE_FEATURE_LEVEL_NULL), if the requested featureLevel
|
||||
//! is less than DirectX 10.0.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 185
|
||||
//!
|
||||
//! \param [in] pAdapter
|
||||
//! \param [in] DriverType
|
||||
//! \param [in] Software
|
||||
//! \param [in] Flags
|
||||
//! \param [in] *pFeatureLevels
|
||||
//! \param [in] FeatureLevels
|
||||
//! \param [in] SDKVersion
|
||||
//! \param [in] *pSwapChainDesc
|
||||
//! \param [in] **ppSwapChain
|
||||
//! \param [in] **ppDevice
|
||||
//! \param [in] *pFeatureLevel
|
||||
//! \param [in] **ppImmediateContext
|
||||
//! \param [in] *pSupportedLevel D3D_FEATURE_LEVEL supported
|
||||
//!
|
||||
//!return NVAPI_OK if the createDevice with swap chain call succeeded.
|
||||
//!
|
||||
//! \ingroup dx
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_D3D11_CreateDeviceAndSwapChain(IDXGIAdapter* pAdapter,
|
||||
D3D_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
CONST D3D_FEATURE_LEVEL *pFeatureLevels,
|
||||
UINT FeatureLevels,
|
||||
UINT SDKVersion,
|
||||
CONST DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
|
||||
IDXGISwapChain **ppSwapChain,
|
||||
ID3D11Device **ppDevice,
|
||||
D3D_FEATURE_LEVEL *pFeatureLevel,
|
||||
ID3D11DeviceContext **ppImmediateContext,
|
||||
NVAPI_DEVICE_FEATURE_LEVEL *pSupportedLevel);
|
||||
|
||||
|
||||
|
||||
#endif //defined(__cplusplus) && defined(__d3d11_h__)
|
||||
#if defined(__cplusplus) && defined(__d3d11_h__)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_D3D11_SetDepthBoundsTest
|
||||
//
|
||||
//! DESCRIPTION: This function enables/disables the depth bounds test
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \param [in] pDeviceOrContext The device or device context to set depth bounds test
|
||||
//! \param [in] bEnable Enable(non-zero)/disable(zero) the depth bounds test
|
||||
//! \param [in] fMinDepth The minimum depth for depth bounds test
|
||||
//! \param [in] fMaxDepth The maximum depth for depth bounds test
|
||||
//! The valid values for fMinDepth and fMaxDepth
|
||||
//! are such that 0 <= fMinDepth <= fMaxDepth <= 1
|
||||
//!
|
||||
//! \return ::NVAPI_OK if the depth bounds test was correcly enabled or disabled
|
||||
//!
|
||||
//! \ingroup dx
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_D3D11_SetDepthBoundsTest(IUnknown* pDeviceOrContext,
|
||||
NvU32 bEnable,
|
||||
float fMinDepth,
|
||||
float fMaxDepth);
|
||||
|
||||
#endif //defined(__cplusplus) && defined(__d3d11_h__)
|
||||
|
||||
#include"nvapi_lite_salend.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma pack(pop)
|
|
@ -1,816 +0,0 @@
|
|||
/************************************************************************************************************************************\
|
||||
|* *|
|
||||
|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
|
||||
|* *|
|
||||
|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
|
||||
|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
|
||||
|* Otherwise, you have no rights to use or access this software in any manner. *|
|
||||
|* *|
|
||||
|* If not covered by the applicable NVIDIA software license agreement: *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
|
||||
|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
|
||||
|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
|
||||
|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
|
||||
|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|
||||
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
|
||||
|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. *|
|
||||
|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
|
||||
|* consisting of "commercial computer software" and "commercial computer software documentation" *|
|
||||
|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
|
||||
|* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this software in individual and commercial software must include, *|
|
||||
|* in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
\************************************************************************************************************************************/
|
||||
#ifndef __NVAPI_EMPTY_SAL
|
||||
#ifdef __nvapi_undef__ecount
|
||||
#undef __ecount
|
||||
#undef __nvapi_undef__ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__bcount
|
||||
#undef __bcount
|
||||
#undef __nvapi_undef__bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in
|
||||
#undef __in
|
||||
#undef __nvapi_undef__in
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_ecount
|
||||
#undef __in_ecount
|
||||
#undef __nvapi_undef__in_ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_bcount
|
||||
#undef __in_bcount
|
||||
#undef __nvapi_undef__in_bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_z
|
||||
#undef __in_z
|
||||
#undef __nvapi_undef__in_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_ecount_z
|
||||
#undef __in_ecount_z
|
||||
#undef __nvapi_undef__in_ecount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_bcount_z
|
||||
#undef __in_bcount_z
|
||||
#undef __nvapi_undef__in_bcount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_nz
|
||||
#undef __in_nz
|
||||
#undef __nvapi_undef__in_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_ecount_nz
|
||||
#undef __in_ecount_nz
|
||||
#undef __nvapi_undef__in_ecount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_bcount_nz
|
||||
#undef __in_bcount_nz
|
||||
#undef __nvapi_undef__in_bcount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out
|
||||
#undef __out
|
||||
#undef __nvapi_undef__out
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount
|
||||
#undef __out_ecount
|
||||
#undef __nvapi_undef__out_ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount
|
||||
#undef __out_bcount
|
||||
#undef __nvapi_undef__out_bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_part
|
||||
#undef __out_ecount_part
|
||||
#undef __nvapi_undef__out_ecount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_part
|
||||
#undef __out_bcount_part
|
||||
#undef __nvapi_undef__out_bcount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_full
|
||||
#undef __out_ecount_full
|
||||
#undef __nvapi_undef__out_ecount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_full
|
||||
#undef __out_bcount_full
|
||||
#undef __nvapi_undef__out_bcount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_z
|
||||
#undef __out_z
|
||||
#undef __nvapi_undef__out_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_z_opt
|
||||
#undef __out_z_opt
|
||||
#undef __nvapi_undef__out_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_z
|
||||
#undef __out_ecount_z
|
||||
#undef __nvapi_undef__out_ecount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_z
|
||||
#undef __out_bcount_z
|
||||
#undef __nvapi_undef__out_bcount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_part_z
|
||||
#undef __out_ecount_part_z
|
||||
#undef __nvapi_undef__out_ecount_part_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_part_z
|
||||
#undef __out_bcount_part_z
|
||||
#undef __nvapi_undef__out_bcount_part_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_full_z
|
||||
#undef __out_ecount_full_z
|
||||
#undef __nvapi_undef__out_ecount_full_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_full_z
|
||||
#undef __out_bcount_full_z
|
||||
#undef __nvapi_undef__out_bcount_full_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_nz
|
||||
#undef __out_nz
|
||||
#undef __nvapi_undef__out_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_nz_opt
|
||||
#undef __out_nz_opt
|
||||
#undef __nvapi_undef__out_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_nz
|
||||
#undef __out_ecount_nz
|
||||
#undef __nvapi_undef__out_ecount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_nz
|
||||
#undef __out_bcount_nz
|
||||
#undef __nvapi_undef__out_bcount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout
|
||||
#undef __inout
|
||||
#undef __nvapi_undef__inout
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount
|
||||
#undef __inout_ecount
|
||||
#undef __nvapi_undef__inout_ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount
|
||||
#undef __inout_bcount
|
||||
#undef __nvapi_undef__inout_bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_part
|
||||
#undef __inout_ecount_part
|
||||
#undef __nvapi_undef__inout_ecount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount_part
|
||||
#undef __inout_bcount_part
|
||||
#undef __nvapi_undef__inout_bcount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_full
|
||||
#undef __inout_ecount_full
|
||||
#undef __nvapi_undef__inout_ecount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount_full
|
||||
#undef __inout_bcount_full
|
||||
#undef __nvapi_undef__inout_bcount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_z
|
||||
#undef __inout_z
|
||||
#undef __nvapi_undef__inout_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_z
|
||||
#undef __inout_ecount_z
|
||||
#undef __nvapi_undef__inout_ecount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount_z
|
||||
#undef __inout_bcount_z
|
||||
#undef __nvapi_undef__inout_bcount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_nz
|
||||
#undef __inout_nz
|
||||
#undef __nvapi_undef__inout_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_nz
|
||||
#undef __inout_ecount_nz
|
||||
#undef __nvapi_undef__inout_ecount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount_nz
|
||||
#undef __inout_bcount_nz
|
||||
#undef __nvapi_undef__inout_bcount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__ecount_opt
|
||||
#undef __ecount_opt
|
||||
#undef __nvapi_undef__ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__bcount_opt
|
||||
#undef __bcount_opt
|
||||
#undef __nvapi_undef__bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_opt
|
||||
#undef __in_opt
|
||||
#undef __nvapi_undef__in_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_ecount_opt
|
||||
#undef __in_ecount_opt
|
||||
#undef __nvapi_undef__in_ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_bcount_opt
|
||||
#undef __in_bcount_opt
|
||||
#undef __nvapi_undef__in_bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_z_opt
|
||||
#undef __in_z_opt
|
||||
#undef __nvapi_undef__in_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_ecount_z_opt
|
||||
#undef __in_ecount_z_opt
|
||||
#undef __nvapi_undef__in_ecount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_bcount_z_opt
|
||||
#undef __in_bcount_z_opt
|
||||
#undef __nvapi_undef__in_bcount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_nz_opt
|
||||
#undef __in_nz_opt
|
||||
#undef __nvapi_undef__in_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_ecount_nz_opt
|
||||
#undef __in_ecount_nz_opt
|
||||
#undef __nvapi_undef__in_ecount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__in_bcount_nz_opt
|
||||
#undef __in_bcount_nz_opt
|
||||
#undef __nvapi_undef__in_bcount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_opt
|
||||
#undef __out_opt
|
||||
#undef __nvapi_undef__out_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_opt
|
||||
#undef __out_ecount_opt
|
||||
#undef __nvapi_undef__out_ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_opt
|
||||
#undef __out_bcount_opt
|
||||
#undef __nvapi_undef__out_bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_part_opt
|
||||
#undef __out_ecount_part_opt
|
||||
#undef __nvapi_undef__out_ecount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_part_opt
|
||||
#undef __out_bcount_part_opt
|
||||
#undef __nvapi_undef__out_bcount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_full_opt
|
||||
#undef __out_ecount_full_opt
|
||||
#undef __nvapi_undef__out_ecount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_full_opt
|
||||
#undef __out_bcount_full_opt
|
||||
#undef __nvapi_undef__out_bcount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_z_opt
|
||||
#undef __out_ecount_z_opt
|
||||
#undef __nvapi_undef__out_ecount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_z_opt
|
||||
#undef __out_bcount_z_opt
|
||||
#undef __nvapi_undef__out_bcount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_part_z_opt
|
||||
#undef __out_ecount_part_z_opt
|
||||
#undef __nvapi_undef__out_ecount_part_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_part_z_opt
|
||||
#undef __out_bcount_part_z_opt
|
||||
#undef __nvapi_undef__out_bcount_part_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_full_z_opt
|
||||
#undef __out_ecount_full_z_opt
|
||||
#undef __nvapi_undef__out_ecount_full_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_full_z_opt
|
||||
#undef __out_bcount_full_z_opt
|
||||
#undef __nvapi_undef__out_bcount_full_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_ecount_nz_opt
|
||||
#undef __out_ecount_nz_opt
|
||||
#undef __nvapi_undef__out_ecount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__out_bcount_nz_opt
|
||||
#undef __out_bcount_nz_opt
|
||||
#undef __nvapi_undef__out_bcount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_opt
|
||||
#undef __inout_opt
|
||||
#undef __nvapi_undef__inout_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_opt
|
||||
#undef __inout_ecount_opt
|
||||
#undef __nvapi_undef__inout_ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount_opt
|
||||
#undef __inout_bcount_opt
|
||||
#undef __nvapi_undef__inout_bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_part_opt
|
||||
#undef __inout_ecount_part_opt
|
||||
#undef __nvapi_undef__inout_ecount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount_part_opt
|
||||
#undef __inout_bcount_part_opt
|
||||
#undef __nvapi_undef__inout_bcount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_full_opt
|
||||
#undef __inout_ecount_full_opt
|
||||
#undef __nvapi_undef__inout_ecount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount_full_opt
|
||||
#undef __inout_bcount_full_opt
|
||||
#undef __nvapi_undef__inout_bcount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_z_opt
|
||||
#undef __inout_z_opt
|
||||
#undef __nvapi_undef__inout_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_z_opt
|
||||
#undef __inout_ecount_z_opt
|
||||
#undef __nvapi_undef__inout_ecount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_z_opt
|
||||
#undef __inout_ecount_z_opt
|
||||
#undef __nvapi_undef__inout_ecount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount_z_opt
|
||||
#undef __inout_bcount_z_opt
|
||||
#undef __nvapi_undef__inout_bcount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_nz_opt
|
||||
#undef __inout_nz_opt
|
||||
#undef __nvapi_undef__inout_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_ecount_nz_opt
|
||||
#undef __inout_ecount_nz_opt
|
||||
#undef __nvapi_undef__inout_ecount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__inout_bcount_nz_opt
|
||||
#undef __inout_bcount_nz_opt
|
||||
#undef __nvapi_undef__inout_bcount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_ecount
|
||||
#undef __deref_ecount
|
||||
#undef __nvapi_undef__deref_ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_bcount
|
||||
#undef __deref_bcount
|
||||
#undef __nvapi_undef__deref_bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out
|
||||
#undef __deref_out
|
||||
#undef __nvapi_undef__deref_out
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount
|
||||
#undef __deref_out_ecount
|
||||
#undef __nvapi_undef__deref_out_ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount
|
||||
#undef __deref_out_bcount
|
||||
#undef __nvapi_undef__deref_out_bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount_part
|
||||
#undef __deref_out_ecount_part
|
||||
#undef __nvapi_undef__deref_out_ecount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount_part
|
||||
#undef __deref_out_bcount_part
|
||||
#undef __nvapi_undef__deref_out_bcount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount_full
|
||||
#undef __deref_out_ecount_full
|
||||
#undef __nvapi_undef__deref_out_ecount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount_full
|
||||
#undef __deref_out_bcount_full
|
||||
#undef __nvapi_undef__deref_out_bcount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_z
|
||||
#undef __deref_out_z
|
||||
#undef __nvapi_undef__deref_out_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount_z
|
||||
#undef __deref_out_ecount_z
|
||||
#undef __nvapi_undef__deref_out_ecount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount_z
|
||||
#undef __deref_out_bcount_z
|
||||
#undef __nvapi_undef__deref_out_bcount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_nz
|
||||
#undef __deref_out_nz
|
||||
#undef __nvapi_undef__deref_out_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount_nz
|
||||
#undef __deref_out_ecount_nz
|
||||
#undef __nvapi_undef__deref_out_ecount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount_nz
|
||||
#undef __deref_out_bcount_nz
|
||||
#undef __nvapi_undef__deref_out_bcount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout
|
||||
#undef __deref_inout
|
||||
#undef __nvapi_undef__deref_inout
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_z
|
||||
#undef __deref_inout_z
|
||||
#undef __nvapi_undef__deref_inout_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount
|
||||
#undef __deref_inout_ecount
|
||||
#undef __nvapi_undef__deref_inout_ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount
|
||||
#undef __deref_inout_bcount
|
||||
#undef __nvapi_undef__deref_inout_bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount_part
|
||||
#undef __deref_inout_ecount_part
|
||||
#undef __nvapi_undef__deref_inout_ecount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount_part
|
||||
#undef __deref_inout_bcount_part
|
||||
#undef __nvapi_undef__deref_inout_bcount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount_full
|
||||
#undef __deref_inout_ecount_full
|
||||
#undef __nvapi_undef__deref_inout_ecount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount_full
|
||||
#undef __deref_inout_bcount_full
|
||||
#undef __nvapi_undef__deref_inout_bcount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_z
|
||||
#undef __deref_inout_z
|
||||
#undef __nvapi_undef__deref_inout_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount_z
|
||||
#undef __deref_inout_ecount_z
|
||||
#undef __nvapi_undef__deref_inout_ecount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount_z
|
||||
#undef __deref_inout_bcount_z
|
||||
#undef __nvapi_undef__deref_inout_bcount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_nz
|
||||
#undef __deref_inout_nz
|
||||
#undef __nvapi_undef__deref_inout_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount_nz
|
||||
#undef __deref_inout_ecount_nz
|
||||
#undef __nvapi_undef__deref_inout_ecount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount_nz
|
||||
#undef __deref_inout_bcount_nz
|
||||
#undef __nvapi_undef__deref_inout_bcount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_ecount_opt
|
||||
#undef __deref_ecount_opt
|
||||
#undef __nvapi_undef__deref_ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_bcount_opt
|
||||
#undef __deref_bcount_opt
|
||||
#undef __nvapi_undef__deref_bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_opt
|
||||
#undef __deref_out_opt
|
||||
#undef __nvapi_undef__deref_out_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount_opt
|
||||
#undef __deref_out_ecount_opt
|
||||
#undef __nvapi_undef__deref_out_ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount_opt
|
||||
#undef __deref_out_bcount_opt
|
||||
#undef __nvapi_undef__deref_out_bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount_part_opt
|
||||
#undef __deref_out_ecount_part_opt
|
||||
#undef __nvapi_undef__deref_out_ecount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount_part_opt
|
||||
#undef __deref_out_bcount_part_opt
|
||||
#undef __nvapi_undef__deref_out_bcount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount_full_opt
|
||||
#undef __deref_out_ecount_full_opt
|
||||
#undef __nvapi_undef__deref_out_ecount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount_full_opt
|
||||
#undef __deref_out_bcount_full_opt
|
||||
#undef __nvapi_undef__deref_out_bcount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_z_opt
|
||||
#undef __deref_out_z_opt
|
||||
#undef __nvapi_undef__deref_out_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount_z_opt
|
||||
#undef __deref_out_ecount_z_opt
|
||||
#undef __nvapi_undef__deref_out_ecount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount_z_opt
|
||||
#undef __deref_out_bcount_z_opt
|
||||
#undef __nvapi_undef__deref_out_bcount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_nz_opt
|
||||
#undef __deref_out_nz_opt
|
||||
#undef __nvapi_undef__deref_out_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_ecount_nz_opt
|
||||
#undef __deref_out_ecount_nz_opt
|
||||
#undef __nvapi_undef__deref_out_ecount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_out_bcount_nz_opt
|
||||
#undef __deref_out_bcount_nz_opt
|
||||
#undef __nvapi_undef__deref_out_bcount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_opt
|
||||
#undef __deref_inout_opt
|
||||
#undef __nvapi_undef__deref_inout_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount_opt
|
||||
#undef __deref_inout_ecount_opt
|
||||
#undef __nvapi_undef__deref_inout_ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount_opt
|
||||
#undef __deref_inout_bcount_opt
|
||||
#undef __nvapi_undef__deref_inout_bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount_part_opt
|
||||
#undef __deref_inout_ecount_part_opt
|
||||
#undef __nvapi_undef__deref_inout_ecount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount_part_opt
|
||||
#undef __deref_inout_bcount_part_opt
|
||||
#undef __nvapi_undef__deref_inout_bcount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount_full_opt
|
||||
#undef __deref_inout_ecount_full_opt
|
||||
#undef __nvapi_undef__deref_inout_ecount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount_full_opt
|
||||
#undef __deref_inout_bcount_full_opt
|
||||
#undef __nvapi_undef__deref_inout_bcount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_z_opt
|
||||
#undef __deref_inout_z_opt
|
||||
#undef __nvapi_undef__deref_inout_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount_z_opt
|
||||
#undef __deref_inout_ecount_z_opt
|
||||
#undef __nvapi_undef__deref_inout_ecount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount_z_opt
|
||||
#undef __deref_inout_bcount_z_opt
|
||||
#undef __nvapi_undef__deref_inout_bcount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_nz_opt
|
||||
#undef __deref_inout_nz_opt
|
||||
#undef __nvapi_undef__deref_inout_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_ecount_nz_opt
|
||||
#undef __deref_inout_ecount_nz_opt
|
||||
#undef __nvapi_undef__deref_inout_ecount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_inout_bcount_nz_opt
|
||||
#undef __deref_inout_bcount_nz_opt
|
||||
#undef __nvapi_undef__deref_inout_bcount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_ecount
|
||||
#undef __deref_opt_ecount
|
||||
#undef __nvapi_undef__deref_opt_ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_bcount
|
||||
#undef __deref_opt_bcount
|
||||
#undef __nvapi_undef__deref_opt_bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out
|
||||
#undef __deref_opt_out
|
||||
#undef __nvapi_undef__deref_opt_out
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_z
|
||||
#undef __deref_opt_out_z
|
||||
#undef __nvapi_undef__deref_opt_out_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_ecount
|
||||
#undef __deref_opt_out_ecount
|
||||
#undef __nvapi_undef__deref_opt_out_ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_bcount
|
||||
#undef __deref_opt_out_bcount
|
||||
#undef __nvapi_undef__deref_opt_out_bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_ecount_part
|
||||
#undef __deref_opt_out_ecount_part
|
||||
#undef __nvapi_undef__deref_opt_out_ecount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_bcount_part
|
||||
#undef __deref_opt_out_bcount_part
|
||||
#undef __nvapi_undef__deref_opt_out_bcount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_ecount_full
|
||||
#undef __deref_opt_out_ecount_full
|
||||
#undef __nvapi_undef__deref_opt_out_ecount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_bcount_full
|
||||
#undef __deref_opt_out_bcount_full
|
||||
#undef __nvapi_undef__deref_opt_out_bcount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout
|
||||
#undef __deref_opt_inout
|
||||
#undef __nvapi_undef__deref_opt_inout
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount
|
||||
#undef __deref_opt_inout_ecount
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount
|
||||
#undef __deref_opt_inout_bcount
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount_part
|
||||
#undef __deref_opt_inout_ecount_part
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount_part
|
||||
#undef __deref_opt_inout_bcount_part
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount_part
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount_full
|
||||
#undef __deref_opt_inout_ecount_full
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount_full
|
||||
#undef __deref_opt_inout_bcount_full
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount_full
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_z
|
||||
#undef __deref_opt_inout_z
|
||||
#undef __nvapi_undef__deref_opt_inout_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount_z
|
||||
#undef __deref_opt_inout_ecount_z
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount_z
|
||||
#undef __deref_opt_inout_bcount_z
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount_z
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_nz
|
||||
#undef __deref_opt_inout_nz
|
||||
#undef __nvapi_undef__deref_opt_inout_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount_nz
|
||||
#undef __deref_opt_inout_ecount_nz
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount_nz
|
||||
#undef __deref_opt_inout_bcount_nz
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount_nz
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_ecount_opt
|
||||
#undef __deref_opt_ecount_opt
|
||||
#undef __nvapi_undef__deref_opt_ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_bcount_opt
|
||||
#undef __deref_opt_bcount_opt
|
||||
#undef __nvapi_undef__deref_opt_bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_opt
|
||||
#undef __deref_opt_out_opt
|
||||
#undef __nvapi_undef__deref_opt_out_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_ecount_opt
|
||||
#undef __deref_opt_out_ecount_opt
|
||||
#undef __nvapi_undef__deref_opt_out_ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_bcount_opt
|
||||
#undef __deref_opt_out_bcount_opt
|
||||
#undef __nvapi_undef__deref_opt_out_bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_ecount_part_opt
|
||||
#undef __deref_opt_out_ecount_part_opt
|
||||
#undef __nvapi_undef__deref_opt_out_ecount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_bcount_part_opt
|
||||
#undef __deref_opt_out_bcount_part_opt
|
||||
#undef __nvapi_undef__deref_opt_out_bcount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_ecount_full_opt
|
||||
#undef __deref_opt_out_ecount_full_opt
|
||||
#undef __nvapi_undef__deref_opt_out_ecount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_bcount_full_opt
|
||||
#undef __deref_opt_out_bcount_full_opt
|
||||
#undef __nvapi_undef__deref_opt_out_bcount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_z_opt
|
||||
#undef __deref_opt_out_z_opt
|
||||
#undef __nvapi_undef__deref_opt_out_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_ecount_z_opt
|
||||
#undef __deref_opt_out_ecount_z_opt
|
||||
#undef __nvapi_undef__deref_opt_out_ecount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_bcount_z_opt
|
||||
#undef __deref_opt_out_bcount_z_opt
|
||||
#undef __nvapi_undef__deref_opt_out_bcount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_nz_opt
|
||||
#undef __deref_opt_out_nz_opt
|
||||
#undef __nvapi_undef__deref_opt_out_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_ecount_nz_opt
|
||||
#undef __deref_opt_out_ecount_nz_opt
|
||||
#undef __nvapi_undef__deref_opt_out_ecount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_out_bcount_nz_opt
|
||||
#undef __deref_opt_out_bcount_nz_opt
|
||||
#undef __nvapi_undef__deref_opt_out_bcount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_opt
|
||||
#undef __deref_opt_inout_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount_opt
|
||||
#undef __deref_opt_inout_ecount_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount_opt
|
||||
#undef __deref_opt_inout_bcount_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount_part_opt
|
||||
#undef __deref_opt_inout_ecount_part_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount_part_opt
|
||||
#undef __deref_opt_inout_bcount_part_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount_part_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount_full_opt
|
||||
#undef __deref_opt_inout_ecount_full_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount_full_opt
|
||||
#undef __deref_opt_inout_bcount_full_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount_full_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_z_opt
|
||||
#undef __deref_opt_inout_z_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount_z_opt
|
||||
#undef __deref_opt_inout_ecount_z_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount_z_opt
|
||||
#undef __deref_opt_inout_bcount_z_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount_z_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_nz_opt
|
||||
#undef __deref_opt_inout_nz_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_ecount_nz_opt
|
||||
#undef __deref_opt_inout_ecount_nz_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_ecount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_undef__deref_opt_inout_bcount_nz_opt
|
||||
#undef __deref_opt_inout_bcount_nz_opt
|
||||
#undef __nvapi_undef__deref_opt_inout_bcount_nz_opt
|
||||
#endif
|
||||
#ifdef __nvapi_success
|
||||
#undef __success
|
||||
#undef __nvapi_success
|
||||
#endif
|
||||
#ifdef __nvapi__Ret_notnull_
|
||||
#undef __nvapi__Ret_notnull_
|
||||
#undef _Ret_notnull_
|
||||
#endif
|
||||
#ifdef __nvapi__Post_writable_byte_size_
|
||||
#undef __nvapi__Post_writable_byte_size_
|
||||
#undef _Post_writable_byte_size_
|
||||
#endif
|
||||
#ifdef __nvapi_Outptr_
|
||||
#undef __nvapi_Outptr_
|
||||
#undef _Outptr_
|
||||
#endif
|
||||
|
||||
#endif // __NVAPI_EMPTY_SAL
|
|
@ -1,821 +0,0 @@
|
|||
/************************************************************************************************************************************\
|
||||
|* *|
|
||||
|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
|
||||
|* *|
|
||||
|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
|
||||
|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
|
||||
|* Otherwise, you have no rights to use or access this software in any manner. *|
|
||||
|* *|
|
||||
|* If not covered by the applicable NVIDIA software license agreement: *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
|
||||
|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
|
||||
|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
|
||||
|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
|
||||
|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|
||||
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
|
||||
|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. *|
|
||||
|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
|
||||
|* consisting of "commercial computer software" and "commercial computer software documentation" *|
|
||||
|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
|
||||
|* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this software in individual and commercial software must include, *|
|
||||
|* in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
\************************************************************************************************************************************/
|
||||
|
||||
// ====================================================
|
||||
// SAL related support
|
||||
// ====================================================
|
||||
|
||||
#ifndef __ecount
|
||||
#define __nvapi_undef__ecount
|
||||
#define __ecount(size)
|
||||
#endif
|
||||
#ifndef __bcount
|
||||
#define __nvapi_undef__bcount
|
||||
#define __bcount(size)
|
||||
#endif
|
||||
#ifndef __in
|
||||
#define __nvapi_undef__in
|
||||
#define __in
|
||||
#endif
|
||||
#ifndef __in_ecount
|
||||
#define __nvapi_undef__in_ecount
|
||||
#define __in_ecount(size)
|
||||
#endif
|
||||
#ifndef __in_bcount
|
||||
#define __nvapi_undef__in_bcount
|
||||
#define __in_bcount(size)
|
||||
#endif
|
||||
#ifndef __in_z
|
||||
#define __nvapi_undef__in_z
|
||||
#define __in_z
|
||||
#endif
|
||||
#ifndef __in_ecount_z
|
||||
#define __nvapi_undef__in_ecount_z
|
||||
#define __in_ecount_z(size)
|
||||
#endif
|
||||
#ifndef __in_bcount_z
|
||||
#define __nvapi_undef__in_bcount_z
|
||||
#define __in_bcount_z(size)
|
||||
#endif
|
||||
#ifndef __in_nz
|
||||
#define __nvapi_undef__in_nz
|
||||
#define __in_nz
|
||||
#endif
|
||||
#ifndef __in_ecount_nz
|
||||
#define __nvapi_undef__in_ecount_nz
|
||||
#define __in_ecount_nz(size)
|
||||
#endif
|
||||
#ifndef __in_bcount_nz
|
||||
#define __nvapi_undef__in_bcount_nz
|
||||
#define __in_bcount_nz(size)
|
||||
#endif
|
||||
#ifndef __out
|
||||
#define __nvapi_undef__out
|
||||
#define __out
|
||||
#endif
|
||||
#ifndef __out_ecount
|
||||
#define __nvapi_undef__out_ecount
|
||||
#define __out_ecount(size)
|
||||
#endif
|
||||
#ifndef __out_bcount
|
||||
#define __nvapi_undef__out_bcount
|
||||
#define __out_bcount(size)
|
||||
#endif
|
||||
#ifndef __out_ecount_part
|
||||
#define __nvapi_undef__out_ecount_part
|
||||
#define __out_ecount_part(size,length)
|
||||
#endif
|
||||
#ifndef __out_bcount_part
|
||||
#define __nvapi_undef__out_bcount_part
|
||||
#define __out_bcount_part(size,length)
|
||||
#endif
|
||||
#ifndef __out_ecount_full
|
||||
#define __nvapi_undef__out_ecount_full
|
||||
#define __out_ecount_full(size)
|
||||
#endif
|
||||
#ifndef __out_bcount_full
|
||||
#define __nvapi_undef__out_bcount_full
|
||||
#define __out_bcount_full(size)
|
||||
#endif
|
||||
#ifndef __out_z
|
||||
#define __nvapi_undef__out_z
|
||||
#define __out_z
|
||||
#endif
|
||||
#ifndef __out_z_opt
|
||||
#define __nvapi_undef__out_z_opt
|
||||
#define __out_z_opt
|
||||
#endif
|
||||
#ifndef __out_ecount_z
|
||||
#define __nvapi_undef__out_ecount_z
|
||||
#define __out_ecount_z(size)
|
||||
#endif
|
||||
#ifndef __out_bcount_z
|
||||
#define __nvapi_undef__out_bcount_z
|
||||
#define __out_bcount_z(size)
|
||||
#endif
|
||||
#ifndef __out_ecount_part_z
|
||||
#define __nvapi_undef__out_ecount_part_z
|
||||
#define __out_ecount_part_z(size,length)
|
||||
#endif
|
||||
#ifndef __out_bcount_part_z
|
||||
#define __nvapi_undef__out_bcount_part_z
|
||||
#define __out_bcount_part_z(size,length)
|
||||
#endif
|
||||
#ifndef __out_ecount_full_z
|
||||
#define __nvapi_undef__out_ecount_full_z
|
||||
#define __out_ecount_full_z(size)
|
||||
#endif
|
||||
#ifndef __out_bcount_full_z
|
||||
#define __nvapi_undef__out_bcount_full_z
|
||||
#define __out_bcount_full_z(size)
|
||||
#endif
|
||||
#ifndef __out_nz
|
||||
#define __nvapi_undef__out_nz
|
||||
#define __out_nz
|
||||
#endif
|
||||
#ifndef __out_nz_opt
|
||||
#define __nvapi_undef__out_nz_opt
|
||||
#define __out_nz_opt
|
||||
#endif
|
||||
#ifndef __out_ecount_nz
|
||||
#define __nvapi_undef__out_ecount_nz
|
||||
#define __out_ecount_nz(size)
|
||||
#endif
|
||||
#ifndef __out_bcount_nz
|
||||
#define __nvapi_undef__out_bcount_nz
|
||||
#define __out_bcount_nz(size)
|
||||
#endif
|
||||
#ifndef __inout
|
||||
#define __nvapi_undef__inout
|
||||
#define __inout
|
||||
#endif
|
||||
#ifndef __inout_ecount
|
||||
#define __nvapi_undef__inout_ecount
|
||||
#define __inout_ecount(size)
|
||||
#endif
|
||||
#ifndef __inout_bcount
|
||||
#define __nvapi_undef__inout_bcount
|
||||
#define __inout_bcount(size)
|
||||
#endif
|
||||
#ifndef __inout_ecount_part
|
||||
#define __nvapi_undef__inout_ecount_part
|
||||
#define __inout_ecount_part(size,length)
|
||||
#endif
|
||||
#ifndef __inout_bcount_part
|
||||
#define __nvapi_undef__inout_bcount_part
|
||||
#define __inout_bcount_part(size,length)
|
||||
#endif
|
||||
#ifndef __inout_ecount_full
|
||||
#define __nvapi_undef__inout_ecount_full
|
||||
#define __inout_ecount_full(size)
|
||||
#endif
|
||||
#ifndef __inout_bcount_full
|
||||
#define __nvapi_undef__inout_bcount_full
|
||||
#define __inout_bcount_full(size)
|
||||
#endif
|
||||
#ifndef __inout_z
|
||||
#define __nvapi_undef__inout_z
|
||||
#define __inout_z
|
||||
#endif
|
||||
#ifndef __inout_ecount_z
|
||||
#define __nvapi_undef__inout_ecount_z
|
||||
#define __inout_ecount_z(size)
|
||||
#endif
|
||||
#ifndef __inout_bcount_z
|
||||
#define __nvapi_undef__inout_bcount_z
|
||||
#define __inout_bcount_z(size)
|
||||
#endif
|
||||
#ifndef __inout_nz
|
||||
#define __nvapi_undef__inout_nz
|
||||
#define __inout_nz
|
||||
#endif
|
||||
#ifndef __inout_ecount_nz
|
||||
#define __nvapi_undef__inout_ecount_nz
|
||||
#define __inout_ecount_nz(size)
|
||||
#endif
|
||||
#ifndef __inout_bcount_nz
|
||||
#define __nvapi_undef__inout_bcount_nz
|
||||
#define __inout_bcount_nz(size)
|
||||
#endif
|
||||
#ifndef __ecount_opt
|
||||
#define __nvapi_undef__ecount_opt
|
||||
#define __ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __bcount_opt
|
||||
#define __nvapi_undef__bcount_opt
|
||||
#define __bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __in_opt
|
||||
#define __nvapi_undef__in_opt
|
||||
#define __in_opt
|
||||
#endif
|
||||
#ifndef __in_ecount_opt
|
||||
#define __nvapi_undef__in_ecount_opt
|
||||
#define __in_ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __in_bcount_opt
|
||||
#define __nvapi_undef__in_bcount_opt
|
||||
#define __in_bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __in_z_opt
|
||||
#define __nvapi_undef__in_z_opt
|
||||
#define __in_z_opt
|
||||
#endif
|
||||
#ifndef __in_ecount_z_opt
|
||||
#define __nvapi_undef__in_ecount_z_opt
|
||||
#define __in_ecount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __in_bcount_z_opt
|
||||
#define __nvapi_undef__in_bcount_z_opt
|
||||
#define __in_bcount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __in_nz_opt
|
||||
#define __nvapi_undef__in_nz_opt
|
||||
#define __in_nz_opt
|
||||
#endif
|
||||
#ifndef __in_ecount_nz_opt
|
||||
#define __nvapi_undef__in_ecount_nz_opt
|
||||
#define __in_ecount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __in_bcount_nz_opt
|
||||
#define __nvapi_undef__in_bcount_nz_opt
|
||||
#define __in_bcount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __out_opt
|
||||
#define __nvapi_undef__out_opt
|
||||
#define __out_opt
|
||||
#endif
|
||||
#ifndef __out_ecount_opt
|
||||
#define __nvapi_undef__out_ecount_opt
|
||||
#define __out_ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __out_bcount_opt
|
||||
#define __nvapi_undef__out_bcount_opt
|
||||
#define __out_bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __out_ecount_part_opt
|
||||
#define __nvapi_undef__out_ecount_part_opt
|
||||
#define __out_ecount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __out_bcount_part_opt
|
||||
#define __nvapi_undef__out_bcount_part_opt
|
||||
#define __out_bcount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __out_ecount_full_opt
|
||||
#define __nvapi_undef__out_ecount_full_opt
|
||||
#define __out_ecount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __out_bcount_full_opt
|
||||
#define __nvapi_undef__out_bcount_full_opt
|
||||
#define __out_bcount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __out_ecount_z_opt
|
||||
#define __nvapi_undef__out_ecount_z_opt
|
||||
#define __out_ecount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __out_bcount_z_opt
|
||||
#define __nvapi_undef__out_bcount_z_opt
|
||||
#define __out_bcount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __out_ecount_part_z_opt
|
||||
#define __nvapi_undef__out_ecount_part_z_opt
|
||||
#define __out_ecount_part_z_opt(size,length)
|
||||
#endif
|
||||
#ifndef __out_bcount_part_z_opt
|
||||
#define __nvapi_undef__out_bcount_part_z_opt
|
||||
#define __out_bcount_part_z_opt(size,length)
|
||||
#endif
|
||||
#ifndef __out_ecount_full_z_opt
|
||||
#define __nvapi_undef__out_ecount_full_z_opt
|
||||
#define __out_ecount_full_z_opt(size)
|
||||
#endif
|
||||
#ifndef __out_bcount_full_z_opt
|
||||
#define __nvapi_undef__out_bcount_full_z_opt
|
||||
#define __out_bcount_full_z_opt(size)
|
||||
#endif
|
||||
#ifndef __out_ecount_nz_opt
|
||||
#define __nvapi_undef__out_ecount_nz_opt
|
||||
#define __out_ecount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __out_bcount_nz_opt
|
||||
#define __nvapi_undef__out_bcount_nz_opt
|
||||
#define __out_bcount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __inout_opt
|
||||
#define __nvapi_undef__inout_opt
|
||||
#define __inout_opt
|
||||
#endif
|
||||
#ifndef __inout_ecount_opt
|
||||
#define __nvapi_undef__inout_ecount_opt
|
||||
#define __inout_ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __inout_bcount_opt
|
||||
#define __nvapi_undef__inout_bcount_opt
|
||||
#define __inout_bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __inout_ecount_part_opt
|
||||
#define __nvapi_undef__inout_ecount_part_opt
|
||||
#define __inout_ecount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __inout_bcount_part_opt
|
||||
#define __nvapi_undef__inout_bcount_part_opt
|
||||
#define __inout_bcount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __inout_ecount_full_opt
|
||||
#define __nvapi_undef__inout_ecount_full_opt
|
||||
#define __inout_ecount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __inout_bcount_full_opt
|
||||
#define __nvapi_undef__inout_bcount_full_opt
|
||||
#define __inout_bcount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __inout_z_opt
|
||||
#define __nvapi_undef__inout_z_opt
|
||||
#define __inout_z_opt
|
||||
#endif
|
||||
#ifndef __inout_ecount_z_opt
|
||||
#define __nvapi_undef__inout_ecount_z_opt
|
||||
#define __inout_ecount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __inout_ecount_z_opt
|
||||
#define __nvapi_undef__inout_ecount_z_opt
|
||||
#define __inout_ecount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __inout_bcount_z_opt
|
||||
#define __nvapi_undef__inout_bcount_z_opt
|
||||
#define __inout_bcount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __inout_nz_opt
|
||||
#define __nvapi_undef__inout_nz_opt
|
||||
#define __inout_nz_opt
|
||||
#endif
|
||||
#ifndef __inout_ecount_nz_opt
|
||||
#define __nvapi_undef__inout_ecount_nz_opt
|
||||
#define __inout_ecount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __inout_bcount_nz_opt
|
||||
#define __nvapi_undef__inout_bcount_nz_opt
|
||||
#define __inout_bcount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_ecount
|
||||
#define __nvapi_undef__deref_ecount
|
||||
#define __deref_ecount(size)
|
||||
#endif
|
||||
#ifndef __deref_bcount
|
||||
#define __nvapi_undef__deref_bcount
|
||||
#define __deref_bcount(size)
|
||||
#endif
|
||||
#ifndef __deref_out
|
||||
#define __nvapi_undef__deref_out
|
||||
#define __deref_out
|
||||
#endif
|
||||
#ifndef __deref_out_ecount
|
||||
#define __nvapi_undef__deref_out_ecount
|
||||
#define __deref_out_ecount(size)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount
|
||||
#define __nvapi_undef__deref_out_bcount
|
||||
#define __deref_out_bcount(size)
|
||||
#endif
|
||||
#ifndef __deref_out_ecount_part
|
||||
#define __nvapi_undef__deref_out_ecount_part
|
||||
#define __deref_out_ecount_part(size,length)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount_part
|
||||
#define __nvapi_undef__deref_out_bcount_part
|
||||
#define __deref_out_bcount_part(size,length)
|
||||
#endif
|
||||
#ifndef __deref_out_ecount_full
|
||||
#define __nvapi_undef__deref_out_ecount_full
|
||||
#define __deref_out_ecount_full(size)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount_full
|
||||
#define __nvapi_undef__deref_out_bcount_full
|
||||
#define __deref_out_bcount_full(size)
|
||||
#endif
|
||||
#ifndef __deref_out_z
|
||||
#define __nvapi_undef__deref_out_z
|
||||
#define __deref_out_z
|
||||
#endif
|
||||
#ifndef __deref_out_ecount_z
|
||||
#define __nvapi_undef__deref_out_ecount_z
|
||||
#define __deref_out_ecount_z(size)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount_z
|
||||
#define __nvapi_undef__deref_out_bcount_z
|
||||
#define __deref_out_bcount_z(size)
|
||||
#endif
|
||||
#ifndef __deref_out_nz
|
||||
#define __nvapi_undef__deref_out_nz
|
||||
#define __deref_out_nz
|
||||
#endif
|
||||
#ifndef __deref_out_ecount_nz
|
||||
#define __nvapi_undef__deref_out_ecount_nz
|
||||
#define __deref_out_ecount_nz(size)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount_nz
|
||||
#define __nvapi_undef__deref_out_bcount_nz
|
||||
#define __deref_out_bcount_nz(size)
|
||||
#endif
|
||||
#ifndef __deref_inout
|
||||
#define __nvapi_undef__deref_inout
|
||||
#define __deref_inout
|
||||
#endif
|
||||
#ifndef __deref_inout_z
|
||||
#define __nvapi_undef__deref_inout_z
|
||||
#define __deref_inout_z
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount
|
||||
#define __nvapi_undef__deref_inout_ecount
|
||||
#define __deref_inout_ecount(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount
|
||||
#define __nvapi_undef__deref_inout_bcount
|
||||
#define __deref_inout_bcount(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount_part
|
||||
#define __nvapi_undef__deref_inout_ecount_part
|
||||
#define __deref_inout_ecount_part(size,length)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount_part
|
||||
#define __nvapi_undef__deref_inout_bcount_part
|
||||
#define __deref_inout_bcount_part(size,length)
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount_full
|
||||
#define __nvapi_undef__deref_inout_ecount_full
|
||||
#define __deref_inout_ecount_full(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount_full
|
||||
#define __nvapi_undef__deref_inout_bcount_full
|
||||
#define __deref_inout_bcount_full(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_z
|
||||
#define __nvapi_undef__deref_inout_z
|
||||
#define __deref_inout_z
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount_z
|
||||
#define __nvapi_undef__deref_inout_ecount_z
|
||||
#define __deref_inout_ecount_z(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount_z
|
||||
#define __nvapi_undef__deref_inout_bcount_z
|
||||
#define __deref_inout_bcount_z(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_nz
|
||||
#define __nvapi_undef__deref_inout_nz
|
||||
#define __deref_inout_nz
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount_nz
|
||||
#define __nvapi_undef__deref_inout_ecount_nz
|
||||
#define __deref_inout_ecount_nz(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount_nz
|
||||
#define __nvapi_undef__deref_inout_bcount_nz
|
||||
#define __deref_inout_bcount_nz(size)
|
||||
#endif
|
||||
#ifndef __deref_ecount_opt
|
||||
#define __nvapi_undef__deref_ecount_opt
|
||||
#define __deref_ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_bcount_opt
|
||||
#define __nvapi_undef__deref_bcount_opt
|
||||
#define __deref_bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_out_opt
|
||||
#define __nvapi_undef__deref_out_opt
|
||||
#define __deref_out_opt
|
||||
#endif
|
||||
#ifndef __deref_out_ecount_opt
|
||||
#define __nvapi_undef__deref_out_ecount_opt
|
||||
#define __deref_out_ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount_opt
|
||||
#define __nvapi_undef__deref_out_bcount_opt
|
||||
#define __deref_out_bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_out_ecount_part_opt
|
||||
#define __nvapi_undef__deref_out_ecount_part_opt
|
||||
#define __deref_out_ecount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount_part_opt
|
||||
#define __nvapi_undef__deref_out_bcount_part_opt
|
||||
#define __deref_out_bcount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __deref_out_ecount_full_opt
|
||||
#define __nvapi_undef__deref_out_ecount_full_opt
|
||||
#define __deref_out_ecount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount_full_opt
|
||||
#define __nvapi_undef__deref_out_bcount_full_opt
|
||||
#define __deref_out_bcount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_out_z_opt
|
||||
#define __nvapi_undef__deref_out_z_opt
|
||||
#define __deref_out_z_opt
|
||||
#endif
|
||||
#ifndef __deref_out_ecount_z_opt
|
||||
#define __nvapi_undef__deref_out_ecount_z_opt
|
||||
#define __deref_out_ecount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount_z_opt
|
||||
#define __nvapi_undef__deref_out_bcount_z_opt
|
||||
#define __deref_out_bcount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_out_nz_opt
|
||||
#define __nvapi_undef__deref_out_nz_opt
|
||||
#define __deref_out_nz_opt
|
||||
#endif
|
||||
#ifndef __deref_out_ecount_nz_opt
|
||||
#define __nvapi_undef__deref_out_ecount_nz_opt
|
||||
#define __deref_out_ecount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_out_bcount_nz_opt
|
||||
#define __nvapi_undef__deref_out_bcount_nz_opt
|
||||
#define __deref_out_bcount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_opt
|
||||
#define __nvapi_undef__deref_inout_opt
|
||||
#define __deref_inout_opt
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount_opt
|
||||
#define __nvapi_undef__deref_inout_ecount_opt
|
||||
#define __deref_inout_ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount_opt
|
||||
#define __nvapi_undef__deref_inout_bcount_opt
|
||||
#define __deref_inout_bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount_part_opt
|
||||
#define __nvapi_undef__deref_inout_ecount_part_opt
|
||||
#define __deref_inout_ecount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount_part_opt
|
||||
#define __nvapi_undef__deref_inout_bcount_part_opt
|
||||
#define __deref_inout_bcount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount_full_opt
|
||||
#define __nvapi_undef__deref_inout_ecount_full_opt
|
||||
#define __deref_inout_ecount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount_full_opt
|
||||
#define __nvapi_undef__deref_inout_bcount_full_opt
|
||||
#define __deref_inout_bcount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_z_opt
|
||||
#define __nvapi_undef__deref_inout_z_opt
|
||||
#define __deref_inout_z_opt
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount_z_opt
|
||||
#define __nvapi_undef__deref_inout_ecount_z_opt
|
||||
#define __deref_inout_ecount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount_z_opt
|
||||
#define __nvapi_undef__deref_inout_bcount_z_opt
|
||||
#define __deref_inout_bcount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_nz_opt
|
||||
#define __nvapi_undef__deref_inout_nz_opt
|
||||
#define __deref_inout_nz_opt
|
||||
#endif
|
||||
#ifndef __deref_inout_ecount_nz_opt
|
||||
#define __nvapi_undef__deref_inout_ecount_nz_opt
|
||||
#define __deref_inout_ecount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_inout_bcount_nz_opt
|
||||
#define __nvapi_undef__deref_inout_bcount_nz_opt
|
||||
#define __deref_inout_bcount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_ecount
|
||||
#define __nvapi_undef__deref_opt_ecount
|
||||
#define __deref_opt_ecount(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_bcount
|
||||
#define __nvapi_undef__deref_opt_bcount
|
||||
#define __deref_opt_bcount(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out
|
||||
#define __nvapi_undef__deref_opt_out
|
||||
#define __deref_opt_out
|
||||
#endif
|
||||
#ifndef __deref_opt_out_z
|
||||
#define __nvapi_undef__deref_opt_out_z
|
||||
#define __deref_opt_out_z
|
||||
#endif
|
||||
#ifndef __deref_opt_out_ecount
|
||||
#define __nvapi_undef__deref_opt_out_ecount
|
||||
#define __deref_opt_out_ecount(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_bcount
|
||||
#define __nvapi_undef__deref_opt_out_bcount
|
||||
#define __deref_opt_out_bcount(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_ecount_part
|
||||
#define __nvapi_undef__deref_opt_out_ecount_part
|
||||
#define __deref_opt_out_ecount_part(size,length)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_bcount_part
|
||||
#define __nvapi_undef__deref_opt_out_bcount_part
|
||||
#define __deref_opt_out_bcount_part(size,length)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_ecount_full
|
||||
#define __nvapi_undef__deref_opt_out_ecount_full
|
||||
#define __deref_opt_out_ecount_full(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_bcount_full
|
||||
#define __nvapi_undef__deref_opt_out_bcount_full
|
||||
#define __deref_opt_out_bcount_full(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout
|
||||
#define __nvapi_undef__deref_opt_inout
|
||||
#define __deref_opt_inout
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount
|
||||
#define __nvapi_undef__deref_opt_inout_ecount
|
||||
#define __deref_opt_inout_ecount(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount
|
||||
#define __nvapi_undef__deref_opt_inout_bcount
|
||||
#define __deref_opt_inout_bcount(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount_part
|
||||
#define __nvapi_undef__deref_opt_inout_ecount_part
|
||||
#define __deref_opt_inout_ecount_part(size,length)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount_part
|
||||
#define __nvapi_undef__deref_opt_inout_bcount_part
|
||||
#define __deref_opt_inout_bcount_part(size,length)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount_full
|
||||
#define __nvapi_undef__deref_opt_inout_ecount_full
|
||||
#define __deref_opt_inout_ecount_full(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount_full
|
||||
#define __nvapi_undef__deref_opt_inout_bcount_full
|
||||
#define __deref_opt_inout_bcount_full(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_z
|
||||
#define __nvapi_undef__deref_opt_inout_z
|
||||
#define __deref_opt_inout_z
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount_z
|
||||
#define __nvapi_undef__deref_opt_inout_ecount_z
|
||||
#define __deref_opt_inout_ecount_z(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount_z
|
||||
#define __nvapi_undef__deref_opt_inout_bcount_z
|
||||
#define __deref_opt_inout_bcount_z(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_nz
|
||||
#define __nvapi_undef__deref_opt_inout_nz
|
||||
#define __deref_opt_inout_nz
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount_nz
|
||||
#define __nvapi_undef__deref_opt_inout_ecount_nz
|
||||
#define __deref_opt_inout_ecount_nz(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount_nz
|
||||
#define __nvapi_undef__deref_opt_inout_bcount_nz
|
||||
#define __deref_opt_inout_bcount_nz(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_ecount_opt
|
||||
#define __nvapi_undef__deref_opt_ecount_opt
|
||||
#define __deref_opt_ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_bcount_opt
|
||||
#define __nvapi_undef__deref_opt_bcount_opt
|
||||
#define __deref_opt_bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_opt
|
||||
#define __nvapi_undef__deref_opt_out_opt
|
||||
#define __deref_opt_out_opt
|
||||
#endif
|
||||
#ifndef __deref_opt_out_ecount_opt
|
||||
#define __nvapi_undef__deref_opt_out_ecount_opt
|
||||
#define __deref_opt_out_ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_bcount_opt
|
||||
#define __nvapi_undef__deref_opt_out_bcount_opt
|
||||
#define __deref_opt_out_bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_ecount_part_opt
|
||||
#define __nvapi_undef__deref_opt_out_ecount_part_opt
|
||||
#define __deref_opt_out_ecount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_bcount_part_opt
|
||||
#define __nvapi_undef__deref_opt_out_bcount_part_opt
|
||||
#define __deref_opt_out_bcount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_ecount_full_opt
|
||||
#define __nvapi_undef__deref_opt_out_ecount_full_opt
|
||||
#define __deref_opt_out_ecount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_bcount_full_opt
|
||||
#define __nvapi_undef__deref_opt_out_bcount_full_opt
|
||||
#define __deref_opt_out_bcount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_z_opt
|
||||
#define __nvapi_undef__deref_opt_out_z_opt
|
||||
#define __deref_opt_out_z_opt
|
||||
#endif
|
||||
#ifndef __deref_opt_out_ecount_z_opt
|
||||
#define __nvapi_undef__deref_opt_out_ecount_z_opt
|
||||
#define __deref_opt_out_ecount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_bcount_z_opt
|
||||
#define __nvapi_undef__deref_opt_out_bcount_z_opt
|
||||
#define __deref_opt_out_bcount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_nz_opt
|
||||
#define __nvapi_undef__deref_opt_out_nz_opt
|
||||
#define __deref_opt_out_nz_opt
|
||||
#endif
|
||||
#ifndef __deref_opt_out_ecount_nz_opt
|
||||
#define __nvapi_undef__deref_opt_out_ecount_nz_opt
|
||||
#define __deref_opt_out_ecount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_out_bcount_nz_opt
|
||||
#define __nvapi_undef__deref_opt_out_bcount_nz_opt
|
||||
#define __deref_opt_out_bcount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_opt
|
||||
#define __nvapi_undef__deref_opt_inout_opt
|
||||
#define __deref_opt_inout_opt
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount_opt
|
||||
#define __nvapi_undef__deref_opt_inout_ecount_opt
|
||||
#define __deref_opt_inout_ecount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount_opt
|
||||
#define __nvapi_undef__deref_opt_inout_bcount_opt
|
||||
#define __deref_opt_inout_bcount_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount_part_opt
|
||||
#define __nvapi_undef__deref_opt_inout_ecount_part_opt
|
||||
#define __deref_opt_inout_ecount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount_part_opt
|
||||
#define __nvapi_undef__deref_opt_inout_bcount_part_opt
|
||||
#define __deref_opt_inout_bcount_part_opt(size,length)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount_full_opt
|
||||
#define __nvapi_undef__deref_opt_inout_ecount_full_opt
|
||||
#define __deref_opt_inout_ecount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount_full_opt
|
||||
#define __nvapi_undef__deref_opt_inout_bcount_full_opt
|
||||
#define __deref_opt_inout_bcount_full_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_z_opt
|
||||
#define __nvapi_undef__deref_opt_inout_z_opt
|
||||
#define __deref_opt_inout_z_opt
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount_z_opt
|
||||
#define __nvapi_undef__deref_opt_inout_ecount_z_opt
|
||||
#define __deref_opt_inout_ecount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount_z_opt
|
||||
#define __nvapi_undef__deref_opt_inout_bcount_z_opt
|
||||
#define __deref_opt_inout_bcount_z_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_nz_opt
|
||||
#define __nvapi_undef__deref_opt_inout_nz_opt
|
||||
#define __deref_opt_inout_nz_opt
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_ecount_nz_opt
|
||||
#define __nvapi_undef__deref_opt_inout_ecount_nz_opt
|
||||
#define __deref_opt_inout_ecount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __deref_opt_inout_bcount_nz_opt
|
||||
#define __nvapi_undef__deref_opt_inout_bcount_nz_opt
|
||||
#define __deref_opt_inout_bcount_nz_opt(size)
|
||||
#endif
|
||||
#ifndef __success
|
||||
#define __nvapi_success
|
||||
#define __success(epxr)
|
||||
#endif
|
||||
#ifndef _Ret_notnull_
|
||||
#define __nvapi__Ret_notnull_
|
||||
#define _Ret_notnull_
|
||||
#endif
|
||||
#ifndef _Post_writable_byte_size_
|
||||
#define __nvapi__Post_writable_byte_size_
|
||||
#define _Post_writable_byte_size_(n)
|
||||
#endif
|
||||
#ifndef _Outptr_
|
||||
#define __nvapi_Outptr_
|
||||
#define _Outptr_
|
||||
#endif
|
||||
|
||||
|
||||
#define NVAPI_INTERFACE extern __success(return == NVAPI_OK) NvAPI_Status __cdecl
|
|
@ -1,255 +0,0 @@
|
|||
/************************************************************************************************************************************\
|
||||
|* *|
|
||||
|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
|
||||
|* *|
|
||||
|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
|
||||
|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
|
||||
|* Otherwise, you have no rights to use or access this software in any manner. *|
|
||||
|* *|
|
||||
|* If not covered by the applicable NVIDIA software license agreement: *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
|
||||
|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
|
||||
|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
|
||||
|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
|
||||
|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|
||||
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
|
||||
|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. *|
|
||||
|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
|
||||
|* consisting of "commercial computer software" and "commercial computer software documentation" *|
|
||||
|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
|
||||
|* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this software in individual and commercial software must include, *|
|
||||
|* in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
\************************************************************************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include"nvapi_lite_salstart.h"
|
||||
#include"nvapi_lite_common.h"
|
||||
#pragma pack(push,8)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
// DirectX APIs
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//! \ingroup dx
|
||||
//! Used in NvAPI_D3D10_GetCurrentSLIState(), and NvAPI_D3D_GetCurrentSLIState().
|
||||
typedef struct
|
||||
{
|
||||
NvU32 version; //!< Structure version
|
||||
NvU32 maxNumAFRGroups; //!< [OUT] The maximum possible value of numAFRGroups
|
||||
NvU32 numAFRGroups; //!< [OUT] The number of AFR groups enabled in the system
|
||||
NvU32 currentAFRIndex; //!< [OUT] The AFR group index for the frame currently being rendered
|
||||
NvU32 nextFrameAFRIndex; //!< [OUT] What the AFR group index will be for the next frame (i.e. after calling Present)
|
||||
NvU32 previousFrameAFRIndex; //!< [OUT] The AFR group index that was used for the previous frame (~0 if more than one frame has not been rendered yet)
|
||||
NvU32 bIsCurAFRGroupNew; //!< [OUT] Boolean: Is this frame the first time running on the current AFR group
|
||||
|
||||
} NV_GET_CURRENT_SLI_STATE_V1;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
NvU32 version; //!< Structure version
|
||||
NvU32 maxNumAFRGroups; //!< [OUT] The maximum possible value of numAFRGroups
|
||||
NvU32 numAFRGroups; //!< [OUT] The number of AFR groups enabled in the system
|
||||
NvU32 currentAFRIndex; //!< [OUT] The AFR group index for the frame currently being rendered
|
||||
NvU32 nextFrameAFRIndex; //!< [OUT] What the AFR group index will be for the next frame (i.e. after calling Present)
|
||||
NvU32 previousFrameAFRIndex; //!< [OUT] The AFR group index that was used for the previous frame (~0 if more than one frame has not been rendered yet)
|
||||
NvU32 bIsCurAFRGroupNew; //!< [OUT] Boolean: Is this frame the first time running on the current AFR group
|
||||
NvU32 numVRSLIGpus; //!< [OUT] The number of GPUs used in VR-SLI. If it is 0 VR-SLI is not active
|
||||
|
||||
} NV_GET_CURRENT_SLI_STATE_V2;
|
||||
|
||||
//! \ingroup dx
|
||||
#define NV_GET_CURRENT_SLI_STATE_VER1 MAKE_NVAPI_VERSION(NV_GET_CURRENT_SLI_STATE_V1,1)
|
||||
#define NV_GET_CURRENT_SLI_STATE_VER2 MAKE_NVAPI_VERSION(NV_GET_CURRENT_SLI_STATE_V2,1)
|
||||
#define NV_GET_CURRENT_SLI_STATE_VER NV_GET_CURRENT_SLI_STATE_VER2
|
||||
#define NV_GET_CURRENT_SLI_STATE NV_GET_CURRENT_SLI_STATE_V2
|
||||
#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_D3D_GetCurrentSLIState
|
||||
//
|
||||
//! DESCRIPTION: This function returns the current SLI state for the specified device. The structure
|
||||
//! contains the number of AFR groups, the current AFR group index,
|
||||
//! and what the AFR group index will be for the next frame. \p
|
||||
//! pDevice can be either a IDirect3DDevice9 or ID3D10Device pointer.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 173
|
||||
//!
|
||||
//! \retval NVAPI_OK Completed request
|
||||
//! \retval NVAPI_ERROR Error occurred
|
||||
//!
|
||||
//! \ingroup dx
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_D3D_GetCurrentSLIState(IUnknown *pDevice, NV_GET_CURRENT_SLI_STATE *pSliState);
|
||||
#endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
|
||||
#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_D3D_SetResourceHint
|
||||
//
|
||||
//! \fn NvAPI_D3D_SetResourceHint(IUnknown *pDev, NVDX_ObjectHandle obj,
|
||||
//! NVAPI_D3D_SETRESOURCEHINT_CATEGORY dwHintCategory,
|
||||
//! NvU32 dwHintName,
|
||||
//! NvU32 *pdwHintValue)
|
||||
//!
|
||||
//! DESCRIPTION: This is a general purpose function for passing down various resource
|
||||
//! related hints to the driver. Hints are divided into categories
|
||||
//! and types within each category. For DX11 devices this function is free-threaded.
|
||||
//! An application is responsible to complete this call before making use of the resource
|
||||
//! in a rendering context (therefore applying inter-thread synchronization as appropriate).
|
||||
//! As a debug help to an application the driver enforces that a resource in this call was never bound.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 185
|
||||
//!
|
||||
//! \param [in] pDev The ID3D10Device or IDirect3DDevice9 that is a using the resource
|
||||
//! \param [in] obj Previously obtained HV resource handle
|
||||
//! \param [in] dwHintCategory Category of the hints
|
||||
//! \param [in] dwHintName A hint within this category
|
||||
//! \param [in/out] *pdwHintValue Pointer to location containing hint value, function returns previous hint value in this slot
|
||||
//!
|
||||
//! \return an int which could be an NvAPI status or DX HRESULT code
|
||||
//!
|
||||
//! \retval ::NVAPI_OK
|
||||
//! \retval ::NVAPI_INVALID_ARGUMENT
|
||||
//! \retval ::NVAPI_INVALID_CALL It is illegal to change a hint dynamically when the resource is already bound.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//! \ingroup dx
|
||||
//! Valid categories for NvAPI_D3D_SetResourceHint()
|
||||
typedef enum _NVAPI_D3D_SETRESOURCEHINT_CATEGORY
|
||||
{
|
||||
NVAPI_D3D_SRH_CATEGORY_SLI = 1
|
||||
} NVAPI_D3D_SETRESOURCEHINT_CATEGORY;
|
||||
|
||||
|
||||
//
|
||||
// NVAPI_D3D_SRH_SLI_APP_CONTROLLED_INTERFRAME_CONTENT_SYNC:
|
||||
// NVAPI_D3D_SRH_SLI_ASK_FOR_BROADCAST_USING:
|
||||
// NVAPI_D3D_SRH_SLI_RESPECT_DRIVER_INTERFRAME_CONTENT_SYNC:
|
||||
|
||||
|
||||
//! \ingroup dx
|
||||
//! Types of SLI hints; \n
|
||||
//! NVAPI_D3D_SRH_SLI_APP_CONTROLLED_INTERFRAME_CONTENT_SYNC: Valid values : 0 or 1 \n
|
||||
//! Default value: 0 \n
|
||||
//! Explanation: If the value is 1, the driver will not track any rendering operations that would mark this resource as dirty,
|
||||
//! avoiding any form of synchronization across frames rendered in parallel in multiple GPUs in AFR mode.
|
||||
//!
|
||||
//! NVAPI_D3D_SRH_SLI_ASK_FOR_BROADCAST_USAGE: Valid values : 0 or 1 \n
|
||||
//! Default value: 0 \n
|
||||
//! Explanation: If the value is 1, the driver will try to perform operations which involved target resource in broadcast,
|
||||
//! where it's possible. Hint is static and must be set before resource starts using.
|
||||
//!
|
||||
//! NVAPI_D3D_SRH_SLI_RESPECT_DRIVER_INTERFRAME_CONTENT_SYNC: Valid values : 0 or 1 \n
|
||||
//! Default value: 0 \n
|
||||
//! Explanation: If the value is 1, the driver will do dirty resource resolve regardless of discard flags in the application profile or
|
||||
//! AFR-FriendlyD3DHints.exe name using.
|
||||
//!
|
||||
typedef enum _NVAPI_D3D_SETRESOURCEHINT_SLI
|
||||
{
|
||||
NVAPI_D3D_SRH_SLI_APP_CONTROLLED_INTERFRAME_CONTENT_SYNC = 1,
|
||||
NVAPI_D3D_SRH_SLI_ASK_FOR_BROADCAST_USAGE = 2,
|
||||
NVAPI_D3D_SRH_SLI_RESPECT_DRIVER_INTERFRAME_CONTENT_SYNC = 3
|
||||
} NVAPI_D3D_SETRESOURCEHINT_SLI;
|
||||
|
||||
//! \ingroup dx
|
||||
NVAPI_INTERFACE NvAPI_D3D_SetResourceHint(IUnknown *pDev, NVDX_ObjectHandle obj,
|
||||
NVAPI_D3D_SETRESOURCEHINT_CATEGORY dwHintCategory,
|
||||
NvU32 dwHintName,
|
||||
NvU32 *pdwHintValue);
|
||||
#endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
|
||||
|
||||
#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_D3D_BeginResourceRendering
|
||||
//
|
||||
//! \fn NvAPI_D3D_BeginResourceRendering(IUnknown *pDeviceOrContext, NVDX_ObjectHandle obj, NvU32 Flags)
|
||||
//! DESCRIPTION: This function tells the driver that the resource will begin to receive updates. It must be used in combination with NvAPI_D3D_EndResourceRendering().
|
||||
//! The primary use of this function is allow the driver to initiate early inter-frame synchronization of resources while running in AFR SLI mode.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 185
|
||||
//!
|
||||
//! \param [in] pDev IDirect3DDevice9, ID3D10Device, ID3D11Device or ID3D11DeviceContext that is using the resource
|
||||
//! \param [in] obj Previously obtained HV resource handle
|
||||
//! \param [in] Flags The flags for functionality applied to resource while being used.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Function succeeded, if used properly and driver can initiate proper sync'ing of the resources.
|
||||
//! \retval ::NVAPI_INVALID_ARGUMENT Bad argument(s) or invalid flag values
|
||||
//! \retval ::NVAPI_INVALID_CALL Mismatched begin/end calls
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \ingroup dx
|
||||
//! Used in NvAPI_D3D_BeginResourceRendering().
|
||||
typedef enum _NVAPI_D3D_RESOURCERENDERING_FLAG
|
||||
{
|
||||
NVAPI_D3D_RR_FLAG_DEFAULTS = 0x00000000, //!< All bits set to 0 are defaults.
|
||||
NVAPI_D3D_RR_FLAG_FORCE_DISCARD_CONTENT = 0x00000001, //!< (bit 0) The flag forces to discard previous content of the resource regardless of the NvApiHints_Sli_Disable_InterframeSync hint
|
||||
NVAPI_D3D_RR_FLAG_FORCE_KEEP_CONTENT = 0x00000002, //!< (bit 1) The flag forces to respect previous content of the resource regardless of the NvApiHints_Sli_Disable_InterframeSync hint
|
||||
NVAPI_D3D_RR_FLAG_MULTI_FRAME = 0x00000004 //!< (bit 2) The flag hints the driver that content will be used for many frames. If not specified then the driver assumes that content is used only on the next frame
|
||||
} NVAPI_D3D_RESOURCERENDERING_FLAG;
|
||||
|
||||
//! \ingroup dx
|
||||
NVAPI_INTERFACE NvAPI_D3D_BeginResourceRendering(IUnknown *pDeviceOrContext, NVDX_ObjectHandle obj, NvU32 Flags);
|
||||
|
||||
#endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
|
||||
|
||||
#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_D3D_EndResourceRendering
|
||||
//
|
||||
//! DESCRIPTION: This function tells the driver that the resource is done receiving updates. It must be used in combination with
|
||||
//! NvAPI_D3D_BeginResourceRendering().
|
||||
//! The primary use of this function is allow the driver to initiate early inter-frame syncs of resources while running in AFR SLI mode.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 185
|
||||
//!
|
||||
//! \param [in] pDev IDirect3DDevice9, ID3D10Device, ID3D11Device or ID3D11DeviceContext that is using the resource
|
||||
//! \param [in] obj Previously obtained HV resource handle
|
||||
//! \param [in] Flags Reserved, must be zero
|
||||
//
|
||||
//! \retval ::NVAPI_OK Function succeeded, if used properly and driver can initiate proper sync'ing of the resources.
|
||||
//! \retval ::NVAPI_INVALID_ARGUMENT Bad argument(s) or invalid flag values
|
||||
//! \retval ::NVAPI_INVALID_CALL Mismatched begin/end calls
|
||||
//!
|
||||
//! \ingroup dx
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_D3D_EndResourceRendering(IUnknown *pDeviceOrContext, NVDX_ObjectHandle obj, NvU32 Flags);
|
||||
#endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
|
||||
|
||||
#include"nvapi_lite_salend.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma pack(pop)
|
|
@ -1,600 +0,0 @@
|
|||
/************************************************************************************************************************************\
|
||||
|* *|
|
||||
|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
|
||||
|* *|
|
||||
|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
|
||||
|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
|
||||
|* Otherwise, you have no rights to use or access this software in any manner. *|
|
||||
|* *|
|
||||
|* If not covered by the applicable NVIDIA software license agreement: *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
|
||||
|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
|
||||
|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
|
||||
|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
|
||||
|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|
||||
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
|
||||
|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. *|
|
||||
|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
|
||||
|* consisting of "commercial computer software" and "commercial computer software documentation" *|
|
||||
|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
|
||||
|* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this software in individual and commercial software must include, *|
|
||||
|* in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
\************************************************************************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include"nvapi_lite_salstart.h"
|
||||
#include"nvapi_lite_common.h"
|
||||
#pragma pack(push,8)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_Enable
|
||||
//
|
||||
//! DESCRIPTION: This APU enables stereo mode in the registry.
|
||||
//! Calls to this function affect the entire system.
|
||||
//! If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect,
|
||||
//! and will return the appropriate error code.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Stereo is now enabled.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_Enable(void);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_Disable
|
||||
//
|
||||
//! DESCRIPTION: This API disables stereo mode in the registry.
|
||||
//! Calls to this function affect the entire system.
|
||||
//! If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect,
|
||||
//! and will return the appropriate error code.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Stereo is now disabled.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_Disable(void);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_IsEnabled
|
||||
//
|
||||
//! DESCRIPTION: This API checks if stereo mode is enabled in the registry.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [out] pIsStereoEnabled Address where the result of the inquiry will be placed.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Check was sucessfully completed and result reflects current state of stereo availability.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_IsEnabled(NvU8 *pIsStereoEnabled);
|
||||
#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)|| defined(__d3d12_h__)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_CreateHandleFromIUnknown
|
||||
//
|
||||
//! DESCRIPTION: This API creates a stereo handle that is used in subsequent calls related to a given device interface.
|
||||
//! This must be called before any other NvAPI_Stereo_ function for that handle.
|
||||
//! Multiple devices can be used at one time using multiple calls to this function (one per each device).
|
||||
//!
|
||||
//! HOW TO USE: After the Direct3D device is created, create the stereo handle.
|
||||
//! On call success:
|
||||
//! -# Use all other NvAPI_Stereo_ functions that have stereo handle as first parameter.
|
||||
//! -# After the device interface that corresponds to the the stereo handle is destroyed,
|
||||
//! the application should call NvAPI_DestroyStereoHandle() for that stereo handle.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [in] pDevice Pointer to IUnknown interface that is IDirect3DDevice9* in DX9, ID3D10Device*.
|
||||
//! \param [out] pStereoHandle Pointer to the newly created stereo handle.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Stereo handle is created for given device interface.
|
||||
//! \retval ::NVAPI_INVALID_ARGUMENT Provided device interface is invalid.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_CreateHandleFromIUnknown(IUnknown *pDevice, StereoHandle *pStereoHandle);
|
||||
|
||||
#endif // defined(_D3D9_H_) || defined(__d3d10_h__)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_DestroyHandle
|
||||
//
|
||||
//! DESCRIPTION: This API destroys the stereo handle created with one of the NvAPI_Stereo_CreateHandleFrom() functions.
|
||||
//! This should be called after the device corresponding to the handle has been destroyed.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle that is to be destroyed.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Stereo handle is destroyed.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_DestroyHandle(StereoHandle stereoHandle);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_Activate
|
||||
//
|
||||
//! DESCRIPTION: This API activates stereo for the device interface corresponding to the given stereo handle.
|
||||
//! Activating stereo is possible only if stereo was enabled previously in the registry.
|
||||
//! If stereo is not activated, then calls to functions that require that stereo is activated have no effect,
|
||||
//! and will return the appropriate error code.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle corresponding to the device interface.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Stereo is turned on.
|
||||
//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_Activate(StereoHandle stereoHandle);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_Deactivate
|
||||
//
|
||||
//! DESCRIPTION: This API deactivates stereo for the given device interface.
|
||||
//! If stereo is not activated, then calls to functions that require that stereo is activated have no effect,
|
||||
//! and will return the appropriate error code.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Stereo is turned off.
|
||||
//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_Deactivate(StereoHandle stereoHandle);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_IsActivated
|
||||
//
|
||||
//! DESCRIPTION: This API checks if stereo is activated for the given device interface.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [in] pIsStereoOn Address where result of the inquiry will be placed.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK - Check was sucessfully completed and result reflects current state of stereo (on/off).
|
||||
//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR - Something is wrong (generic error).
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_IsActivated(StereoHandle stereoHandle, NvU8 *pIsStereoOn);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_GetSeparation
|
||||
//
|
||||
//! DESCRIPTION: This API gets current separation value (in percents).
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [out] pSeparationPercentage Address of @c float type variable to store current separation percentage in.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Retrieval of separation percentage was successfull.
|
||||
//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_GetSeparation(StereoHandle stereoHandle, float *pSeparationPercentage);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_SetSeparation
|
||||
//
|
||||
//! DESCRIPTION: This API sets separation to given percentage.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom() function.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [in] newSeparationPercentage New value for separation percentage.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Setting of separation percentage was successfull.
|
||||
//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_STEREO_PARAMETER_OUT_OF_RANGE Given separation percentage is out of [0..100] range.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_SetSeparation(StereoHandle stereoHandle, float newSeparationPercentage);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_GetConvergence
|
||||
//
|
||||
//! DESCRIPTION: This API gets the current convergence value.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [out] pConvergence Address of @c float type variable to store current convergence value in.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Retrieval of convergence value was successfull.
|
||||
//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_GetConvergence(StereoHandle stereoHandle, float *pConvergence);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_SetConvergence
|
||||
//
|
||||
//! DESCRIPTION: This API sets convergence to the given value.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \since Release: 180
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [in] newConvergence New value for convergence.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Setting of convergence value was successfull.
|
||||
//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_SetConvergence(StereoHandle stereoHandle, float newConvergence);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_SetActiveEye
|
||||
//
|
||||
//! \fn NvAPI_Stereo_SetActiveEye(StereoHandle hStereoHandle, NV_STEREO_ACTIVE_EYE StereoEye);
|
||||
//! DESCRIPTION: This API sets the back buffer to left or right in Direct stereo mode.
|
||||
//!
|
||||
//! HOW TO USE: After the stereo handle for device interface is created via successfull call to appropriate
|
||||
//! NvAPI_Stereo_CreateHandleFrom function.
|
||||
//!
|
||||
//! \since Release: 285
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [in] StereoEye Defines active eye in Direct stereo mode
|
||||
//!
|
||||
//! \retval ::NVAPI_OK - Active eye is set.
|
||||
//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_INVALID_ARGUMENT - StereoEye parameter has not allowed value.
|
||||
//! \retval ::NVAPI_SET_NOT_ALLOWED - Current stereo mode is not Direct
|
||||
//! \retval ::NVAPI_ERROR - Something is wrong (generic error).
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \ingroup stereoapi
|
||||
typedef enum _NV_StereoActiveEye
|
||||
{
|
||||
NVAPI_STEREO_EYE_RIGHT = 1,
|
||||
NVAPI_STEREO_EYE_LEFT = 2,
|
||||
NVAPI_STEREO_EYE_MONO = 3,
|
||||
} NV_STEREO_ACTIVE_EYE;
|
||||
|
||||
//! \ingroup stereoapi
|
||||
NVAPI_INTERFACE NvAPI_Stereo_SetActiveEye(StereoHandle hStereoHandle, NV_STEREO_ACTIVE_EYE StereoEye);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_SetDriverMode
|
||||
//
|
||||
//! \fn NvAPI_Stereo_SetDriverMode( NV_STEREO_DRIVER_MODE mode );
|
||||
//! DESCRIPTION: This API sets the 3D stereo driver mode: Direct or Automatic
|
||||
//!
|
||||
//! HOW TO USE: This API must be called before the device is created.
|
||||
//! Applies to DirectX 9 and higher.
|
||||
//!
|
||||
//! \since Release: 285
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \param [in] mode Defines the 3D stereo driver mode: Direct or Automatic
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Active eye is set.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_INVALID_ARGUMENT mode parameter has not allowed value.
|
||||
//! \retval ::NVAPI_ERROR Something is wrong (generic error).
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \ingroup stereoapi
|
||||
typedef enum _NV_StereoDriverMode
|
||||
{
|
||||
NVAPI_STEREO_DRIVER_MODE_AUTOMATIC = 0,
|
||||
NVAPI_STEREO_DRIVER_MODE_DIRECT = 2,
|
||||
} NV_STEREO_DRIVER_MODE;
|
||||
|
||||
//! \ingroup stereoapi
|
||||
NVAPI_INTERFACE NvAPI_Stereo_SetDriverMode( NV_STEREO_DRIVER_MODE mode );
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_GetEyeSeparation
|
||||
//
|
||||
//! DESCRIPTION: This API returns eye separation as a ratio of <between eye distance>/<physical screen width>.
|
||||
//!
|
||||
//! HOW TO USE: After the stereo handle for device interface is created via successfull call to appropriate API. Applies only to DirectX 9 and up.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [out] pSeparation Eye separation.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Active eye is set.
|
||||
//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR (generic error).
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_GetEyeSeparation(StereoHandle hStereoHandle, float *pSeparation );
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_IsWindowedModeSupported
|
||||
//
|
||||
//! DESCRIPTION: This API returns availability of windowed mode stereo
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! \param [out] bSupported(OUT) != 0 - supported, \n
|
||||
//! == 0 - is not supported
|
||||
//!
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Retrieval of frustum adjust mode was successfull.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
|
||||
//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
|
||||
//! \retval ::NVAPI_ERROR Something is wrong (generic error).
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_IsWindowedModeSupported(NvU8* bSupported);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_SetSurfaceCreationMode
|
||||
//
|
||||
//! \function NvAPI_Stereo_SetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE creationMode)
|
||||
//! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [in] creationMode New surface creation mode for this device interface.
|
||||
//!
|
||||
//! \since Release: 285
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! DESCRIPTION: This API sets surface creation mode for this device interface.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
|
||||
//!
|
||||
//! \return This API can return any of the error codes enumerated in #NvAPI_Status.
|
||||
//! There are no return error codes with specific meaning for this API.
|
||||
//!
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \ingroup stereoapi
|
||||
typedef enum _NVAPI_STEREO_SURFACECREATEMODE
|
||||
{
|
||||
NVAPI_STEREO_SURFACECREATEMODE_AUTO, //!< Use driver registry profile settings for surface creation mode.
|
||||
NVAPI_STEREO_SURFACECREATEMODE_FORCESTEREO, //!< Always create stereo surfaces.
|
||||
NVAPI_STEREO_SURFACECREATEMODE_FORCEMONO //!< Always create mono surfaces.
|
||||
} NVAPI_STEREO_SURFACECREATEMODE;
|
||||
|
||||
//! \ingroup stereoapi
|
||||
NVAPI_INTERFACE NvAPI_Stereo_SetSurfaceCreationMode(__in StereoHandle hStereoHandle, __in NVAPI_STEREO_SURFACECREATEMODE creationMode);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_GetSurfaceCreationMode
|
||||
//
|
||||
//! \function NvAPI_Stereo_GetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE* pCreationMode)
|
||||
//! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [out] pCreationMode The current creation mode for this device interface.
|
||||
//!
|
||||
//! \since Release: 295
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! DESCRIPTION: This API gets surface creation mode for this device interface.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
|
||||
//!
|
||||
//! \return This API can return any of the error codes enumerated in #NvAPI_Status.
|
||||
//! There are no return error codes with specific meaning for this API.
|
||||
//!
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \ingroup stereoapi
|
||||
NVAPI_INTERFACE NvAPI_Stereo_GetSurfaceCreationMode(__in StereoHandle hStereoHandle, __in NVAPI_STEREO_SURFACECREATEMODE* pCreationMode);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_Debug_WasLastDrawStereoized
|
||||
//
|
||||
//! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
|
||||
//! \param [out] pWasStereoized Address where result of the inquiry will be placed.
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! DESCRIPTION: This API checks if the last draw call was stereoized. It is a very expensive to call and should be used for debugging purpose *only*.
|
||||
//!
|
||||
//! WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
|
||||
//!
|
||||
//! \return This API can return any of the error codes enumerated in #NvAPI_Status.
|
||||
//! There are no return error codes with specific meaning for this API.
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_Debug_WasLastDrawStereoized(__in StereoHandle hStereoHandle, __out NvU8 *pWasStereoized);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_SetDefaultProfile
|
||||
//
|
||||
//!
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! DESCRIPTION: This API defines the stereo profile used by the driver in case the application has no associated profile.
|
||||
//!
|
||||
//! WHEN TO USE: To take effect, this API must be called before D3D device is created. Calling once a device has been created will not affect the current device.
|
||||
//!
|
||||
//! \param [in] szProfileName Default profile name.
|
||||
//!
|
||||
//! \return This API can return any of the error codes enumerated in #NvAPI_Status.
|
||||
//! Error codes specific to this API are described below.
|
||||
//!
|
||||
//! \retval NVAPI_SUCCESS - Default stereo profile name has been copied into szProfileName.
|
||||
//! \retval NVAPI_INVALID_ARGUMENT - szProfileName == NULL.
|
||||
//! \retval NVAPI_DEFAULT_STEREO_PROFILE_DOES_NOT_EXIST - Default stereo profile does not exist
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_SetDefaultProfile(__in const char* szProfileName);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Stereo_GetDefaultProfile
|
||||
//
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
//!
|
||||
//! DESCRIPTION: This API retrieves the current default stereo profile.
|
||||
//!
|
||||
//! After call cbSizeOut contain 0 if default profile is not set required buffer size cbSizeOut.
|
||||
//! To get needed buffer size this function can be called with szProfileName==0 and cbSizeIn == 0.
|
||||
//!
|
||||
//! WHEN TO USE: This API can be called at any time.
|
||||
//!
|
||||
//!
|
||||
//! \param [in] cbSizeIn Size of buffer allocated for default stereo profile name.
|
||||
//! \param [out] szProfileName Default stereo profile name.
|
||||
//! \param [out] pcbSizeOut Required buffer size.
|
||||
//! # ==0 - there is no default stereo profile name currently set
|
||||
//! # !=0 - size of buffer required for currently set default stereo profile name including trailing '0'.
|
||||
//!
|
||||
//!
|
||||
//! \return This API can return any of the error codes enumerated in #NvAPI_Status.
|
||||
//! Error codes specific to this API are described below.
|
||||
//!
|
||||
//! \retval NVAPI_SUCCESS - Default stereo profile name has been copied into szProfileName.
|
||||
//! \retval NVAPI_DEFAULT_STEREO_PROFILE_IS_NOT_DEFINED - There is no default stereo profile set at this time.
|
||||
//! \retval NVAPI_INVALID_ARGUMENT - pcbSizeOut == 0 or cbSizeIn >= *pcbSizeOut && szProfileName == 0
|
||||
//! \retval NVAPI_INSUFFICIENT_BUFFER - cbSizeIn < *pcbSizeOut
|
||||
//!
|
||||
//! \ingroup stereoapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Stereo_GetDefaultProfile( __in NvU32 cbSizeIn, __out_bcount_part_opt(cbSizeIn, *pcbSizeOut) char* szProfileName, __out NvU32 *pcbSizeOut);
|
||||
|
||||
#include"nvapi_lite_salend.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma pack(pop)
|
|
@ -1,105 +0,0 @@
|
|||
/************************************************************************************************************************************\
|
||||
|* *|
|
||||
|* Copyright ? 2012 NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
|
||||
|* *|
|
||||
|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
|
||||
|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
|
||||
|* Otherwise, you have no rights to use or access this software in any manner. *|
|
||||
|* *|
|
||||
|* If not covered by the applicable NVIDIA software license agreement: *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
|
||||
|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
|
||||
|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
|
||||
|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
|
||||
|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
|
||||
|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
|
||||
|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. *|
|
||||
|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
|
||||
|* consisting of "commercial computer software" and "commercial computer software documentation" *|
|
||||
|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
|
||||
|* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this software in individual and commercial software must include, *|
|
||||
|* in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
\************************************************************************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include"nvapi_lite_salstart.h"
|
||||
#include"nvapi_lite_common.h"
|
||||
#pragma pack(push,8)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_DISP_GetGDIPrimaryDisplayId
|
||||
//
|
||||
//! DESCRIPTION: This API returns the Display ID of the GDI Primary.
|
||||
//!
|
||||
//! \param [out] displayId Display ID of the GDI Primary display.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK: Capabilties have been returned.
|
||||
//! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND: GDI Primary not on an NVIDIA GPU.
|
||||
//! \retval ::NVAPI_INVALID_ARGUMENT: One or more args passed in are invalid.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED: The NvAPI API needs to be initialized first
|
||||
//! \retval ::NVAPI_NO_IMPLEMENTATION: This entrypoint not available
|
||||
//! \retval ::NVAPI_ERROR: Miscellaneous error occurred
|
||||
//!
|
||||
//! \ingroup dispcontrol
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_DISP_GetGDIPrimaryDisplayId(NvU32* displayId);
|
||||
#define NV_MOSAIC_MAX_DISPLAYS (64)
|
||||
//! SUPPORTED OS: Windows 7 and higher
|
||||
//!
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FUNCTION NAME: NvAPI_Mosaic_GetDisplayViewportsByResolution
|
||||
//
|
||||
//! DESCRIPTION: This API returns the viewports that would be applied on
|
||||
//! the requested display.
|
||||
//!
|
||||
//! \param [in] displayId Display ID of a single display in the active
|
||||
//! mosaic topology to query.
|
||||
//! \param [in] srcWidth Width of full display topology. If both
|
||||
//! width and height are 0, the current
|
||||
//! resolution is used.
|
||||
//! \param [in] srcHeight Height of full display topology. If both
|
||||
//! width and height are 0, the current
|
||||
//! resolution is used.
|
||||
//! \param [out] viewports Array of NV_RECT viewports which represent
|
||||
//! the displays as identified in
|
||||
//! NvAPI_Mosaic_EnumGridTopologies. If the
|
||||
//! requested resolution is a single-wide
|
||||
//! resolution, only viewports[0] will
|
||||
//! contain the viewport details, regardless
|
||||
//! of which display is driving the display.
|
||||
//! \param [out] bezelCorrected Returns 1 if the requested resolution is
|
||||
//! bezel corrected. May be NULL.
|
||||
//!
|
||||
//! \retval ::NVAPI_OK Capabilties have been returned.
|
||||
//! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid.
|
||||
//! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first
|
||||
//! \retval ::NVAPI_MOSAIC_NOT_ACTIVE The display does not belong to an active Mosaic Topology
|
||||
//! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available
|
||||
//! \retval ::NVAPI_ERROR Miscellaneous error occurred
|
||||
//!
|
||||
//! \ingroup mosaicapi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
NVAPI_INTERFACE NvAPI_Mosaic_GetDisplayViewportsByResolution(NvU32 displayId, NvU32 srcWidth, NvU32 srcHeight, NV_RECT viewports[NV_MOSAIC_MAX_DISPLAYS], NvU8* bezelCorrected);
|
||||
|
||||
#include"nvapi_lite_salend.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma pack(pop)
|
|
@ -21,131 +21,6 @@ along with Challenge Quake 3. If not, see <https://www.gnu.org/licenses/>.
|
|||
// Direct3D 12 Rendering Hardware Interface
|
||||
|
||||
|
||||
/*
|
||||
to do:
|
||||
|
||||
- use ID3D12DebugCommandList::AssertResourceState
|
||||
- git cherry-pick 693415a6e2f2f3789215ec037b15d505c5132fd4
|
||||
- git cherry-pick c75b2b27fa936854d27dadf458e3ec3b03829561
|
||||
- https://asawicki.info/news_1758_an_idea_for_visualization_of_frame_times
|
||||
- GPU resident vertex data for models: load on demand based on submitted { surface, shader } pairs
|
||||
- use Application Verifier to catch issues
|
||||
- tone mapping: look at https://github.com/h3r2tic/tony-mc-mapface
|
||||
- ubershader PS: run-time alpha test evaluation to reduce PSO count?
|
||||
- use root signature 1.1 to use the hints that help the drivers optimize out static resources
|
||||
- is it possible to force Resource Binding Tier 2 somehow? are we supposed to run on old HW to test? :(
|
||||
see if WARP allows us to do that?
|
||||
- don't do persistent mapping to help out RenderDoc?
|
||||
- Intel GPU: try storing only 6*2 samplers instead of 6*16: 1 set for no mip bias and 1 set for r_picmip
|
||||
- Intel GPU: evaluate the benefit of static samplers
|
||||
- defragment on partial inits with D3D12MA?
|
||||
- use ID3D12Device4::CreateCommandList1 to create closed command lists
|
||||
- move UI to the uber shader system, tessellate to generate proper data
|
||||
- share structs between HLSL and C++ with .hlsli files -> change cbuffer to ConstantBuffer<MyStruct>
|
||||
- share texture and sampler array sizes between HLSL and C++ with .hlsli files
|
||||
- roq video textures support?
|
||||
*/
|
||||
|
||||
/*
|
||||
All three types of command list use the ID3D12GraphicsCommandList interface,
|
||||
however only a subset of the methods are supported for copy and compute.
|
||||
|
||||
Copy and compute command lists can use the following methods:
|
||||
Close
|
||||
CopyBufferRegion
|
||||
CopyResource
|
||||
CopyTextureRegion
|
||||
CopyTiles
|
||||
Reset
|
||||
ResourceBarrier
|
||||
|
||||
Compute command lists can also use the following methods:
|
||||
ClearState
|
||||
ClearUnorderedAccessViewFloat
|
||||
ClearUnorderedAccessViewUint
|
||||
DiscardResource
|
||||
Dispatch
|
||||
ExecuteIndirect
|
||||
SetComputeRoot32BitConstant
|
||||
SetComputeRoot32BitConstants
|
||||
SetComputeRootConstantBufferView
|
||||
SetComputeRootDescriptorTable
|
||||
SetComputeRootShaderResourceView
|
||||
SetComputeRootSignature
|
||||
SetComputeRootUnorderedAccessView
|
||||
SetDescriptorHeaps
|
||||
SetPipelineState
|
||||
SetPredication
|
||||
EndQuery
|
||||
*/
|
||||
|
||||
/*
|
||||
There is an additional restriction for Tier 1 hardware that applies to all heaps,
|
||||
and to Tier 2 hardware that applies to CBV and UAV heaps,
|
||||
that all descriptor heap entries covered by descriptor tables in the root signature
|
||||
must be populated with descriptors by the time the shader executes,
|
||||
even if the shader (perhaps due to branching) does not need the descriptor.
|
||||
|
||||
There is no such restriction for Tier 3 hardware.
|
||||
One mitigation for this restriction is the diligent use of Null descriptors.
|
||||
*/
|
||||
|
||||
/*
|
||||
State decay to common
|
||||
|
||||
The flip-side of common state promotion is decay back to D3D12_RESOURCE_STATE_COMMON.
|
||||
Resources that meet certain requirements are considered to be stateless and effectively
|
||||
return to the common state when the GPU finishes execution of an ExecuteCommandLists operation.
|
||||
Decay does not occur between command lists executed together in the same ExecuteCommandLists call.
|
||||
|
||||
The following resources will decay when an ExecuteCommandLists operation is completed on the GPU:
|
||||
- Resources being accessed on a Copy queue, or
|
||||
- Buffer resources on any queue type, or
|
||||
- Texture resources on any queue type that have the D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS flag set, or
|
||||
- Any resource implicitly promoted to a read-only state.
|
||||
|
||||
------------------------------------
|
||||
|
||||
So... textures written to on the copy queue can end up in the D3D12_RESOURCE_STATE_COMMON state?
|
||||
*/
|
||||
|
||||
/*
|
||||
Depth24_Stencil8 requires:
|
||||
DXGI_FORMAT_R24G8_TYPELESS
|
||||
DXGI_FORMAT_D24_UNORM_S8_UINT
|
||||
DXGI_FORMAT_R24_UNORM_X8_TYPELESS
|
||||
*/
|
||||
|
||||
/*
|
||||
Never got the PIX programmable capture API to work
|
||||
PIXBeginCapture returns "not implemented"
|
||||
|
||||
// before include
|
||||
#define USE_PIX 1
|
||||
|
||||
// before creating the device
|
||||
PIXLoadLatestWinPixGpuCapturerLibrary();
|
||||
HRESULT hr = PIXSetTargetWindow(GetActiveWindow());
|
||||
Check(hr, "PIXSetTargetWindow");
|
||||
|
||||
// whenever...
|
||||
PIXCaptureParameters params = {};
|
||||
params.GpuCaptureParameters.FileName = L"temp.wpix";
|
||||
HRESULT hr = PIXBeginCapture(0, ¶ms);
|
||||
Check(hr, "PIXBeginCapture");
|
||||
*/
|
||||
|
||||
/*
|
||||
The legacy API fails as well
|
||||
DXGIGetDebugInterface1 returns "no such interface supported"
|
||||
|
||||
#include <DXProgrammableCapture.h>
|
||||
|
||||
IDXGraphicsAnalysis* graphicsAnalysis;
|
||||
D3D(DXGIGetDebugInterface1(0, IID_PPV_ARGS(&graphicsAnalysis)));
|
||||
*/
|
||||
|
||||
|
||||
#if defined(_DEBUG)
|
||||
#define D3D_DEBUG
|
||||
#endif
|
||||
|
@ -153,6 +28,12 @@ D3D(DXGIGetDebugInterface1(0, IID_PPV_ARGS(&graphicsAnalysis)));
|
|||
//#define D3D_GPU_BASED_VALIDATION
|
||||
//#define RHI_DEBUG_FENCE
|
||||
//#define RHI_ENABLE_NVAPI
|
||||
//#define RHI_ENABLE_NVAPI_RT_VALIDATION
|
||||
//#define RHI_ENABLE_AFTERMATH
|
||||
|
||||
#if defined(D3D_DEBUG) && defined(RHI_ENABLE_AFTERMATH)
|
||||
#error You can't enable NVIDIA Aftermath when the Direct3D Debug Layer is active.
|
||||
#endif
|
||||
|
||||
|
||||
#include "rhi_local.h"
|
||||
|
@ -167,7 +48,12 @@ D3D(DXGIGetDebugInterface1(0, IID_PPV_ARGS(&graphicsAnalysis)));
|
|||
#define D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED
|
||||
#include "D3D12MemAlloc.h"
|
||||
#if defined(RHI_ENABLE_NVAPI)
|
||||
#include "../nvapi/nvapi.h"
|
||||
#include <nvapi.h>
|
||||
#pragma comment(lib, "nvapi64.lib")
|
||||
#endif
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
#include <GFSDK_Aftermath.h>
|
||||
#pragma comment(lib, "GFSDK_Aftermath_Lib.x64.lib")
|
||||
#endif
|
||||
#include "../pix/pix3.h"
|
||||
#include "../client/cl_imgui.h"
|
||||
|
@ -187,6 +73,11 @@ RHIExport rhie;
|
|||
RHIInfo rhiInfo;
|
||||
|
||||
|
||||
#define VENDORID_INVALID 0xDEAD
|
||||
#define VENDORID_NVIDIA 0x10DE
|
||||
#define VENDORID_INTEL 0x8086
|
||||
#define VENDORID_AMD 0x1002
|
||||
|
||||
#define DXGI_FORMAT_LIST(X) \
|
||||
X(UNKNOWN) \
|
||||
X(R32G32B32A32_TYPELESS) \
|
||||
|
@ -694,6 +585,11 @@ namespace RHI
|
|||
bool extendedVRSSupport;
|
||||
bool useDynamicResources;
|
||||
DynamicResources dynamicResources;
|
||||
ID3D12CommandSignature* indirectDispatchSignature;
|
||||
UINT vendorId;
|
||||
char umdVersionString[64];
|
||||
uint16_t umdVersionSplit[4];
|
||||
uint64_t umdVersion;
|
||||
|
||||
HMODULE dxcModule;
|
||||
HMODULE dxilModule;
|
||||
|
@ -762,6 +658,26 @@ namespace RHI
|
|||
uint32_t bufferBarrierCount;
|
||||
ID3D12GraphicsCommandList* barrierCommandList;
|
||||
bool barrierOpen;
|
||||
|
||||
// NVIDIA NVAPI
|
||||
#if defined(RHI_ENABLE_NVAPI)
|
||||
bool nvapiActive;
|
||||
#endif
|
||||
|
||||
// NVIDIA Aftermath
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
struct AftermathMarker
|
||||
{
|
||||
char string[64];
|
||||
};
|
||||
AftermathMarker aftermathMarkers[64]; // stack: markers can be nested
|
||||
uint32_t aftermathMarkerDepth = 0;
|
||||
GFSDK_Aftermath_ContextHandle aftermathMainCommandList;
|
||||
GFSDK_Aftermath_ContextHandle aftermathTempCommandList;
|
||||
GFSDK_Aftermath_ContextHandle aftermathUploadCommandList;
|
||||
GFSDK_Aftermath_ContextHandle aftermathCommandList; // active command list
|
||||
bool aftermathActive;
|
||||
#endif
|
||||
};
|
||||
|
||||
static RHIPrivate rhi;
|
||||
|
@ -826,10 +742,8 @@ namespace RHI
|
|||
return true;
|
||||
}
|
||||
|
||||
if(1) // @TODO: fatal error mode always on for now
|
||||
{
|
||||
ri.Error(ERR_FATAL, "'%s' failed with code 0x%08X (%s)\n", function, (unsigned int)hr, GetSystemErrorString(hr));
|
||||
}
|
||||
// fatal error mode always on for now
|
||||
ri.Error(ERR_FATAL, "'%s' failed with code 0x%08X (%s)\n", function, (unsigned int)hr, GetSystemErrorString(hr));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -892,6 +806,8 @@ namespace RHI
|
|||
case TextureFormat::R16G16_SNorm:
|
||||
case TextureFormat::R16G16_Float:
|
||||
return 4;
|
||||
case TextureFormat::R16_UInt:
|
||||
case TextureFormat::R16_Float:
|
||||
case TextureFormat::R8G8_UNorm:
|
||||
return 2;
|
||||
case TextureFormat::R8_UNorm:
|
||||
|
@ -1010,6 +926,15 @@ namespace RHI
|
|||
|
||||
D3D(rhi.device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_COPY, commandAllocator, NULL, IID_PPV_ARGS(&commandList)));
|
||||
SetDebugName(commandList, "upload", D3DResourceType::CommandList);
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
if(rhi.aftermathActive)
|
||||
{
|
||||
// @NOTE: Aftermath context creation must happen on an opened command list
|
||||
Q_assert(commandList != NULL);
|
||||
const GFSDK_Aftermath_Result result = GFSDK_Aftermath_DX12_CreateContextHandle(commandList, &rhi.aftermathUploadCommandList);
|
||||
Q_assert(result == GFSDK_Aftermath_Result_Success);
|
||||
}
|
||||
#endif
|
||||
D3D(commandList->Close());
|
||||
|
||||
fence.Create(0, "upload");
|
||||
|
@ -1090,6 +1015,11 @@ namespace RHI
|
|||
D3D(commandList->Reset(commandAllocator, NULL));
|
||||
|
||||
const UINT64 byteCount = min(userBuffer.desc.byteCount, uploadBuffer.desc.byteCount);
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
const char* const marker = va("Upload: CopyBufferRegion -> %s (%s)", userBuffer.desc.name, Com_FormatBytes(byteCount));
|
||||
const GFSDK_Aftermath_Result result = GFSDK_Aftermath_SetEventMarker(rhi.aftermathUploadCommandList, marker, strlen(marker) + 1);
|
||||
Q_assert(result == GFSDK_Aftermath_Result_Success);
|
||||
#endif
|
||||
commandList->CopyBufferRegion(userBuffer.buffer, 0, uploadBuffer.buffer, userBuffer.uploadByteOffset, byteCount);
|
||||
|
||||
ID3D12CommandList* commandLists[] = { commandList };
|
||||
|
@ -1131,8 +1061,9 @@ namespace RHI
|
|||
|
||||
const UINT sourcePitch = (UINT)(texture.desc.width * GetBytesPerPixel(texture.desc.format));
|
||||
mappedTexture.mappedData = mappedBuffer + bufferByteOffset;
|
||||
mappedTexture.rowCount = texture.desc.height;
|
||||
mappedTexture.columnCount = texture.desc.width;
|
||||
mappedTexture.rowCount = texture.desc.height;
|
||||
mappedTexture.sliceCount = texture.desc.depth;
|
||||
mappedTexture.srcRowByteCount = sourcePitch;
|
||||
mappedTexture.dstRowByteCount = AlignUp<uint32_t>(layout.Footprint.RowPitch, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT);
|
||||
|
||||
|
@ -1171,10 +1102,16 @@ namespace RHI
|
|||
srcBox.front = 0;
|
||||
srcBox.right = textureDesc.Width;
|
||||
srcBox.bottom = textureDesc.Height;
|
||||
srcBox.back = 1;
|
||||
srcBox.back = textureDesc.DepthOrArraySize;
|
||||
|
||||
D3D(commandList->Reset(commandAllocator, NULL));
|
||||
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
const char* const marker = va("Upload: CopyTextureRegion -> %s", texture.desc.name);
|
||||
const GFSDK_Aftermath_Result result = GFSDK_Aftermath_SetEventMarker(rhi.aftermathUploadCommandList, marker, strlen(marker) + 1);
|
||||
Q_assert(result == GFSDK_Aftermath_Result_Success);
|
||||
#endif
|
||||
|
||||
commandList->CopyTextureRegion(&dstLoc, 0, 0, 0, &srcLoc, &srcBox);
|
||||
|
||||
ID3D12CommandList* commandLists[] = { commandList };
|
||||
|
@ -1609,6 +1546,16 @@ namespace RHI
|
|||
const HRESULT hr = rhi.swapChain->Present(swapInterval, flags);
|
||||
rhi.frameLatencyWaitNeeded = true;
|
||||
|
||||
#if defined(RHI_ENABLE_NVAPI) && defined(RHI_ENABLE_NVAPI_RT_VALIDATION)
|
||||
if(rhi.nvapiActive &&
|
||||
(hr == DXGI_ERROR_DEVICE_REMOVED ||
|
||||
hr == D3DDDIERR_DEVICEREMOVED ||
|
||||
hr == DXGI_ERROR_DEVICE_RESET))
|
||||
{
|
||||
NvAPI_D3D12_FlushRaytracingValidationMessages(rhi.device);
|
||||
}
|
||||
#endif
|
||||
|
||||
enum PresentError
|
||||
{
|
||||
PE_NONE,
|
||||
|
@ -1642,11 +1589,11 @@ namespace RHI
|
|||
|
||||
if(presentError == PE_DEVICE_REMOVED)
|
||||
{
|
||||
ri.Error(ERR_FATAL, "Direct3D device was removed! Reason: %s", GetDeviceRemovedReasonString(deviceRemovedReason));
|
||||
ri.Error(ERR_FATAL, "Direct3D device was removed! Reason: %s\n", GetDeviceRemovedReasonString(deviceRemovedReason));
|
||||
}
|
||||
else if(presentError == PE_DEVICE_RESET)
|
||||
{
|
||||
ri.Printf(PRINT_ERROR, "Direct3D device was reset! Restarting the video system...");
|
||||
ri.Printf(PRINT_ERROR, "Direct3D device was reset! Restarting the video system...\n");
|
||||
Cbuf_AddText("vid_restart\n");
|
||||
}
|
||||
}
|
||||
|
@ -1702,7 +1649,7 @@ namespace RHI
|
|||
{
|
||||
case ShaderStage::Vertex: return D3D12_SHADER_VISIBILITY_VERTEX;
|
||||
case ShaderStage::Pixel: return D3D12_SHADER_VISIBILITY_PIXEL;
|
||||
case ShaderStage::Compute: return D3D12_SHADER_VISIBILITY_ALL; // @TODO: assert here too?
|
||||
case ShaderStage::Compute: return D3D12_SHADER_VISIBILITY_ALL;
|
||||
default: Q_assert(!"Unsupported shader type"); return D3D12_SHADER_VISIBILITY_ALL;
|
||||
}
|
||||
}
|
||||
|
@ -1820,10 +1767,12 @@ namespace RHI
|
|||
case TextureFormat::R8G8_UNorm: return DXGI_FORMAT_R8G8_UNORM;
|
||||
case TextureFormat::R8_UNorm: return DXGI_FORMAT_R8_UNORM;
|
||||
case TextureFormat::R10G10B10A2_UNorm: return DXGI_FORMAT_R10G10B10A2_UNORM;
|
||||
case TextureFormat::R16_UInt: return DXGI_FORMAT_R16_UINT;
|
||||
case TextureFormat::R32_UInt: return DXGI_FORMAT_R32_UINT;
|
||||
case TextureFormat::R32G32_UInt: return DXGI_FORMAT_R32G32_UINT;
|
||||
case TextureFormat::R16G16_SNorm: return DXGI_FORMAT_R16G16_SNORM;
|
||||
case TextureFormat::R16G16_Float: return DXGI_FORMAT_R16G16_FLOAT;
|
||||
case TextureFormat::R16_Float: return DXGI_FORMAT_R16_FLOAT;
|
||||
default: Q_assert(!"Unsupported texture format"); return DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
}
|
||||
}
|
||||
|
@ -1899,6 +1848,7 @@ namespace RHI
|
|||
ADD_BITS(UnorderedAccessBit, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
|
||||
ADD_BITS(PresentBit, D3D12_RESOURCE_STATE_PRESENT);
|
||||
ADD_BITS(RaytracingASBit, D3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE);
|
||||
ADD_BITS(IndirectDispatchBit, D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT);
|
||||
|
||||
return states;
|
||||
|
||||
|
@ -2544,7 +2494,14 @@ namespace RHI
|
|||
srv.Texture2D.ResourceMinLODClamp = 0.0f;
|
||||
if(rhiDesc.format == TextureFormat::Depth24_Stencil8)
|
||||
{
|
||||
srv.Format = DXGI_FORMAT_R24_UNORM_X8_TYPELESS; // @TODO:
|
||||
srv.Format = DXGI_FORMAT_R24_UNORM_X8_TYPELESS;
|
||||
}
|
||||
if(rhiDesc.depth > 1)
|
||||
{
|
||||
srv.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE3D;
|
||||
srv.Texture3D.MipLevels = rhiDesc.mipCount;
|
||||
srv.Texture3D.MostDetailedMip = 0;
|
||||
srv.Texture3D.ResourceMinLODClamp = 0.0f;
|
||||
}
|
||||
texture.srvIndex = CreateSRV(resource, srv, false);
|
||||
}
|
||||
|
@ -2562,6 +2519,13 @@ namespace RHI
|
|||
uav.Format = GetD3DFormat(rhiDesc.format);
|
||||
uav.Texture2D.MipSlice = m;
|
||||
uav.Texture2D.PlaneSlice = 0;
|
||||
if(rhiDesc.depth > 1)
|
||||
{
|
||||
uav.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE3D;
|
||||
uav.Texture3D.MipSlice = m;
|
||||
uav.Texture3D.FirstWSlice = 0;
|
||||
uav.Texture3D.WSize = UINT(~0); // get access to all slices
|
||||
}
|
||||
texture.mips[m].uavIndex = CreateUAV(resource, uav);
|
||||
}
|
||||
}
|
||||
|
@ -2785,6 +2749,7 @@ namespace RHI
|
|||
UINT barrierCount = 0;
|
||||
for(uint32_t i = 0; i < texCount; ++i)
|
||||
{
|
||||
Q_assert(!IsNullHandle(textures[i].texture));
|
||||
Texture& texture = rhi.textures.Get(textures[i].texture);
|
||||
if(SetBarrier(texture.currentState, barriers[barrierCount], textures[i].newState, texture.texture))
|
||||
{
|
||||
|
@ -2794,6 +2759,7 @@ namespace RHI
|
|||
}
|
||||
for(uint32_t i = 0; i < buffCount; ++i)
|
||||
{
|
||||
Q_assert(!IsNullHandle(buffers[i].buffer));
|
||||
Buffer& buffer = rhi.buffers.Get(buffers[i].buffer);
|
||||
if(SetBarrier(buffer.currentState, barriers[barrierCount], buffers[i].newState, buffer.buffer))
|
||||
{
|
||||
|
@ -2848,6 +2814,19 @@ namespace RHI
|
|||
Cvar_SetMenuData(r_gpuIndex->name, CVARCAT_DISPLAY | CVARCAT_PERFORMANCE, "GPU selection", "Choose the GPU to use", "", values);
|
||||
}
|
||||
|
||||
#if defined(RHI_ENABLE_NVAPI) && defined(RHI_ENABLE_NVAPI_RT_VALIDATION)
|
||||
static void __stdcall NVAPI_RTValidationCallback(void* pUserData, NVAPI_D3D12_RAYTRACING_VALIDATION_MESSAGE_SEVERITY severity, const char* messageCode, const char* message, const char* messageDetails)
|
||||
{
|
||||
const char* severityString = "unknown";
|
||||
switch(severity)
|
||||
{
|
||||
case NVAPI_D3D12_RAYTRACING_VALIDATION_MESSAGE_SEVERITY_ERROR: severityString = "error"; break;
|
||||
case NVAPI_D3D12_RAYTRACING_VALIDATION_MESSAGE_SEVERITY_WARNING: severityString = "warning"; break;
|
||||
}
|
||||
OutputDebugStringA(va("NVAPI RT: %s: [%s] %s\n%s\n", severityString, messageCode, message, messageDetails));
|
||||
}
|
||||
#endif
|
||||
|
||||
static void DrawResourceUsage()
|
||||
{
|
||||
if(BeginTable("Handles", 3))
|
||||
|
@ -2922,6 +2901,7 @@ namespace RHI
|
|||
if(BeginTable("Capabilities", 2))
|
||||
{
|
||||
TableRow(2, "Adapter", rhi.adapterName);
|
||||
TableRow(2, "Driver version", rhi.umdVersionString);
|
||||
|
||||
D3D12_FEATURE_DATA_D3D12_OPTIONS options0 = { 0 };
|
||||
if(SUCCEEDED(rhi.device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &options0, sizeof(options0))))
|
||||
|
@ -3025,16 +3005,19 @@ namespace RHI
|
|||
|
||||
// the validation layer reports live objects at shutdown when NvAPI_D3D12_QueryCpuVisibleVidmem is called
|
||||
#if defined(RHI_ENABLE_NVAPI)
|
||||
NvU64 cvvTotal, cvvFree;
|
||||
if(NvAPI_D3D12_QueryCpuVisibleVidmem(rhi.device, &cvvTotal, &cvvFree) == NvAPI_Status::NVAPI_OK &&
|
||||
cvvTotal > 0)
|
||||
if(rhi.nvapiActive)
|
||||
{
|
||||
TableRow(2, "CPU Visible VRAM Total", Com_FormatBytes(cvvTotal));
|
||||
TableRow(2, "CPU Visible VRAM Free", Com_FormatBytes(cvvFree));
|
||||
}
|
||||
else
|
||||
{
|
||||
TableRow(2, "CPU Visible VRAM", "N/A");
|
||||
NvU64 cvvTotal, cvvFree;
|
||||
if(NvAPI_D3D12_QueryCpuVisibleVidmem(rhi.device, &cvvTotal, &cvvFree) == NvAPI_Status::NVAPI_OK &&
|
||||
cvvTotal > 0)
|
||||
{
|
||||
TableRow(2, "CPU Visible VRAM Total", Com_FormatBytes(cvvTotal));
|
||||
TableRow(2, "CPU Visible VRAM Free", Com_FormatBytes(cvvFree));
|
||||
}
|
||||
else
|
||||
{
|
||||
TableRow(2, "CPU Visible VRAM", "N/A");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3329,6 +3312,67 @@ namespace RHI
|
|||
|
||||
D3D(D3D12CreateDevice(rhi.adapter, FeatureLevel, IID_PPV_ARGS(&rhi.device)));
|
||||
|
||||
rhi.vendorId = VENDORID_INVALID;
|
||||
{
|
||||
DXGI_ADAPTER_DESC desc;
|
||||
if(SUCCEEDED(rhi.adapter->GetDesc(&desc)))
|
||||
{
|
||||
rhi.vendorId = desc.VendorId;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
LARGE_INTEGER driverVersion;
|
||||
if(SUCCEEDED(rhi.adapter->CheckInterfaceSupport(__uuidof(IDXGIDevice), &driverVersion)))
|
||||
{
|
||||
rhi.umdVersionSplit[0] = driverVersion.QuadPart >> 48;
|
||||
rhi.umdVersionSplit[1] = (driverVersion.QuadPart >> 32) & 0xFFFF;
|
||||
rhi.umdVersionSplit[2] = (driverVersion.QuadPart >> 16) & 0xFFFF;
|
||||
rhi.umdVersionSplit[3] = driverVersion.QuadPart & 0xFFFF;
|
||||
rhi.umdVersion = driverVersion.QuadPart;
|
||||
Com_sprintf(rhi.umdVersionString, sizeof(rhi.umdVersionString), "%d.%d.%d.%d",
|
||||
(int)rhi.umdVersionSplit[0],
|
||||
(int)rhi.umdVersionSplit[1],
|
||||
(int)rhi.umdVersionSplit[2],
|
||||
(int)rhi.umdVersionSplit[3]);
|
||||
}
|
||||
}
|
||||
|
||||
// with direct descriptor heap indexing on Intel,
|
||||
// *Texture*.GetDimensions() calls return incorrect values
|
||||
// UMD version 31.0.101.5379 (0x001f000000651503) is still broken
|
||||
if(initDesc.directDescriptorHeapIndexing &&
|
||||
rhi.vendorId == VENDORID_INTEL &&
|
||||
rhi.umdVersion <= 0x001f000000651503)
|
||||
{
|
||||
ri.Error(ERR_FATAL, "This Intel driver is known to have incorrect behavior.\n");
|
||||
}
|
||||
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
rhi.aftermathActive = false;
|
||||
if(rhi.vendorId == VENDORID_NVIDIA)
|
||||
{
|
||||
const GFSDK_Aftermath_FeatureFlags flags = GFSDK_Aftermath_FeatureFlags_Maximum;
|
||||
const GFSDK_Aftermath_Result result = GFSDK_Aftermath_DX12_Initialize(GFSDK_Aftermath_Version_API, flags, rhi.device);
|
||||
if(result == GFSDK_Aftermath_Result_Success)
|
||||
{
|
||||
rhi.aftermathActive = true;
|
||||
}
|
||||
Q_assert(rhi.aftermathActive);
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
D3D12_INDIRECT_ARGUMENT_DESC argDesc = {};
|
||||
argDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH;
|
||||
D3D12_COMMAND_SIGNATURE_DESC desc = {};
|
||||
desc.ByteStride = 12;
|
||||
desc.NodeMask = 0;
|
||||
desc.NumArgumentDescs = 1;
|
||||
desc.pArgumentDescs = &argDesc;
|
||||
D3D(rhi.device->CreateCommandSignature(&desc, NULL, IID_PPV_ARGS(&rhi.indirectDispatchSignature)));
|
||||
}
|
||||
|
||||
if(rhi.useDynamicResources)
|
||||
{
|
||||
D3D12_FEATURE_DATA_D3D12_OPTIONS options0 = {};
|
||||
|
@ -3524,6 +3568,20 @@ namespace RHI
|
|||
|
||||
rhi.readback.Create();
|
||||
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
if(rhi.aftermathActive)
|
||||
{
|
||||
Q_assert(rhi.mainCommandList != NULL);
|
||||
Q_assert(rhi.tempCommandList != NULL);
|
||||
GFSDK_Aftermath_Result r = GFSDK_Aftermath_Result_Fail;
|
||||
r = GFSDK_Aftermath_DX12_CreateContextHandle(rhi.mainCommandList, &rhi.aftermathMainCommandList);
|
||||
Q_assert(r == GFSDK_Aftermath_Result_Success);
|
||||
r = GFSDK_Aftermath_DX12_CreateContextHandle(rhi.tempCommandList, &rhi.aftermathTempCommandList);
|
||||
Q_assert(r == GFSDK_Aftermath_Result_Success);
|
||||
rhi.aftermathCommandList = rhi.aftermathMainCommandList;
|
||||
}
|
||||
#endif
|
||||
|
||||
for(uint32_t f = 0; f < FrameCount; ++f)
|
||||
{
|
||||
D3D12_QUERY_HEAP_DESC desc = { 0 };
|
||||
|
@ -3552,8 +3610,10 @@ namespace RHI
|
|||
WaitUntilDeviceIsIdle();
|
||||
|
||||
#if defined(RHI_ENABLE_NVAPI)
|
||||
rhi.nvapiActive = false;
|
||||
if(rhi.vendorId == VENDORID_NVIDIA)
|
||||
{
|
||||
const NvAPI_Status nr = NvAPI_Initialize();
|
||||
NvAPI_Status nr = NvAPI_Initialize();
|
||||
if(nr == NvAPI_Status::NVAPI_OK)
|
||||
{
|
||||
NvAPI_ShortString version;
|
||||
|
@ -3565,6 +3625,15 @@ namespace RHI
|
|||
{
|
||||
ri.Printf(PRINT_ALL, "Opened nvapi.dll\n");
|
||||
}
|
||||
rhi.nvapiActive = true;
|
||||
|
||||
#if defined(RHI_ENABLE_NVAPI_RT_VALIDATION)
|
||||
nr = NvAPI_D3D12_EnableRaytracingValidation(rhi.device, NVAPI_D3D12_RAYTRACING_VALIDATION_FLAG_NONE);
|
||||
Q_assert(nr == NvAPI_Status::NVAPI_OK);
|
||||
void* nvapiValidationCallbackHandle = NULL;
|
||||
nr = NvAPI_D3D12_RegisterRaytracingValidationMessageCallback(rhi.device, &NVAPI_RTValidationCallback, NULL, &nvapiValidationCallbackHandle);
|
||||
Q_assert(nr == NvAPI_Status::NVAPI_OK);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3710,6 +3779,7 @@ namespace RHI
|
|||
|
||||
DESTROY_POOL_LIST(DESTROY_POOL);
|
||||
|
||||
COM_RELEASE(rhi.indirectDispatchSignature);
|
||||
COM_RELEASE(rhi.dxcCompiler);
|
||||
COM_RELEASE(rhi.dxcUtils);
|
||||
COM_RELEASE_ARRAY(rhi.timeStampHeaps);
|
||||
|
@ -3735,7 +3805,11 @@ namespace RHI
|
|||
FreeLibrary(rhi.dxcModule);
|
||||
|
||||
#if defined(RHI_ENABLE_NVAPI)
|
||||
NvAPI_Unload();
|
||||
if(rhi.nvapiActive)
|
||||
{
|
||||
NvAPI_Unload();
|
||||
rhi.nvapiActive = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(D3D_DEBUG)
|
||||
|
@ -3750,6 +3824,20 @@ namespace RHI
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
if(rhi.aftermathActive)
|
||||
{
|
||||
GFSDK_Aftermath_ReleaseContextHandle(rhi.aftermathMainCommandList);
|
||||
GFSDK_Aftermath_ReleaseContextHandle(rhi.aftermathTempCommandList);
|
||||
GFSDK_Aftermath_ReleaseContextHandle(rhi.aftermathUploadCommandList);
|
||||
rhi.aftermathMainCommandList = NULL;
|
||||
rhi.aftermathTempCommandList = NULL;
|
||||
rhi.aftermathUploadCommandList = NULL;
|
||||
rhi.aftermathCommandList = NULL;
|
||||
rhi.aftermathActive = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef DESTROY_POOL
|
||||
}
|
||||
|
||||
|
@ -3779,6 +3867,14 @@ namespace RHI
|
|||
rhi.swapChainBufferIndex = rhi.swapChain->GetCurrentBackBufferIndex();
|
||||
}
|
||||
|
||||
#if defined(RHI_ENABLE_NVAPI) && defined(RHI_ENABLE_NVAPI_RT_VALIDATION)
|
||||
if(rhi.nvapiActive)
|
||||
{
|
||||
const NvAPI_Status nr = NvAPI_D3D12_FlushRaytracingValidationMessages(rhi.device);
|
||||
Q_assert(nr == NvAPI_Status::NVAPI_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
DrawGUI();
|
||||
|
||||
Q_assert(rhi.commandList == rhi.mainCommandList);
|
||||
|
@ -4096,6 +4192,11 @@ namespace RHI
|
|||
{
|
||||
desc.Flags |= D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE;
|
||||
}
|
||||
if(rhiDesc.depth > 1)
|
||||
{
|
||||
desc.DepthOrArraySize = rhiDesc.depth;
|
||||
desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE3D;
|
||||
}
|
||||
|
||||
D3D12MA::ALLOCATION_DESC allocDesc = { 0 };
|
||||
allocDesc.HeapType = D3D12_HEAP_TYPE_DEFAULT;
|
||||
|
@ -4125,10 +4226,9 @@ namespace RHI
|
|||
|
||||
if(rhiDesc.format == TextureFormat::Depth24_Stencil8)
|
||||
{
|
||||
desc.Format = DXGI_FORMAT_R24G8_TYPELESS; // @TODO:
|
||||
desc.Format = DXGI_FORMAT_R24G8_TYPELESS;
|
||||
}
|
||||
|
||||
// @TODO: initial state -> D3D12_RESOURCE_STATE
|
||||
D3D12MA::Allocation* allocation = NULL;
|
||||
ID3D12Resource* resource;
|
||||
if(rhiDesc.nativeResource != NULL)
|
||||
|
@ -4159,11 +4259,11 @@ namespace RHI
|
|||
D3D12_DEPTH_STENCIL_VIEW_DESC dsv = { 0 };
|
||||
dsv.ViewDimension = D3D12_DSV_DIMENSION_TEXTURE2D;
|
||||
dsv.Format = desc.Format;
|
||||
dsv.Flags = D3D12_DSV_FLAG_NONE; // @TODO:
|
||||
dsv.Flags = D3D12_DSV_FLAG_NONE;
|
||||
dsv.Texture2D.MipSlice = 0;
|
||||
if(rhiDesc.format == TextureFormat::Depth24_Stencil8)
|
||||
{
|
||||
dsv.Format = DXGI_FORMAT_D24_UNORM_S8_UINT; // @TODO:
|
||||
dsv.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
|
||||
}
|
||||
dsvIndex = rhi.descHeapDSVs.CreateDSV(resource, dsv);
|
||||
}
|
||||
|
@ -5019,6 +5119,15 @@ namespace RHI
|
|||
rhi.commandList->Dispatch(groupCountX, groupCountY, groupCountZ);
|
||||
}
|
||||
|
||||
void CmdDispatchIndirect(HBuffer hbuffer, uint32_t byteOffset)
|
||||
{
|
||||
Q_assert(CanWriteCommands());
|
||||
Q_assert(byteOffset % 4 == 0);
|
||||
|
||||
const Buffer& buffer = rhi.buffers.Get(hbuffer);
|
||||
rhi.commandList->ExecuteIndirect(rhi.indirectDispatchSignature, 1, buffer.buffer, (UINT64)byteOffset, NULL, 0);
|
||||
}
|
||||
|
||||
uint32_t CmdBeginDurationQuery()
|
||||
{
|
||||
Q_assert(CanWriteCommands());
|
||||
|
@ -5211,6 +5320,23 @@ namespace RHI
|
|||
rhi.commandList->ClearUnorderedAccessViewUint(gpuHandle, cpuHandle, texture.texture, values, 0, NULL);
|
||||
}
|
||||
|
||||
void CmdClearBufferUAV(HBuffer hbuffer, uint32_t value)
|
||||
{
|
||||
ASSERT_DR_ENABLED();
|
||||
Q_assert(CanWriteCommands());
|
||||
static_assert(sizeof(UINT) == 4, "sizeof(UINT) isn't 4 as expected");
|
||||
|
||||
const Buffer& buffer = rhi.buffers.Get(hbuffer);
|
||||
const uint32_t descIndex = buffer.uavIndex;
|
||||
const UINT descSize = rhi.device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE cpuHandle = rhi.dynamicResources.genericCPUDescriptorHeap->GetCPUDescriptorHandleForHeapStart();
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE gpuHandle = rhi.dynamicResources.genericDescriptorHeap->GetGPUDescriptorHandleForHeapStart();
|
||||
cpuHandle.ptr += descIndex * descSize;
|
||||
gpuHandle.ptr += descIndex * descSize;
|
||||
const UINT values[4] = { value, value, value, value };
|
||||
rhi.commandList->ClearUnorderedAccessViewUint(gpuHandle, cpuHandle, buffer.buffer, values, 0, NULL);
|
||||
}
|
||||
|
||||
void CmdInsertDebugLabel(const char* name, float r, float g, float b)
|
||||
{
|
||||
Q_assert(CanWriteCommands());
|
||||
|
@ -5224,12 +5350,21 @@ namespace RHI
|
|||
{
|
||||
rhi.commandList->SetMarker(1, name, strlen(name) + 1);
|
||||
}
|
||||
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
if(rhi.aftermathActive)
|
||||
{
|
||||
const GFSDK_Aftermath_Result result = GFSDK_Aftermath_SetEventMarker(rhi.aftermathCommandList, name, strlen(name) + 1);
|
||||
Q_assert(result == GFSDK_Aftermath_Result_Success);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CmdBeginDebugLabel(const char* name, float r, float g, float b)
|
||||
{
|
||||
Q_assert(CanWriteCommands());
|
||||
Q_assert(name);
|
||||
Q_assert(name[0] != '\0');
|
||||
|
||||
if(rhi.pix.canBeginAndEnd)
|
||||
{
|
||||
|
@ -5239,6 +5374,18 @@ namespace RHI
|
|||
{
|
||||
rhi.commandList->BeginEvent(1, name, strlen(name) + 1);
|
||||
}
|
||||
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
if(rhi.aftermathActive)
|
||||
{
|
||||
const char* const markerString = va("Begin: %s", name);
|
||||
const GFSDK_Aftermath_Result result = GFSDK_Aftermath_SetEventMarker(rhi.aftermathCommandList, markerString, strlen(markerString) + 1);
|
||||
Q_assert(result == GFSDK_Aftermath_Result_Success);
|
||||
Q_assert(rhi.aftermathMarkerDepth < ARRAY_LEN(rhi.aftermathMarkers));
|
||||
RHIPrivate::AftermathMarker& marker = rhi.aftermathMarkers[rhi.aftermathMarkerDepth++];
|
||||
Q_strncpyz(marker.string, name, sizeof(marker.string));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CmdEndDebugLabel()
|
||||
|
@ -5253,6 +5400,19 @@ namespace RHI
|
|||
{
|
||||
rhi.commandList->EndEvent();
|
||||
}
|
||||
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
if(rhi.aftermathActive)
|
||||
{
|
||||
Q_assert(rhi.aftermathMarkerDepth > 0);
|
||||
const RHIPrivate::AftermathMarker& marker = rhi.aftermathMarkers[rhi.aftermathMarkerDepth - 1];
|
||||
Q_assert(marker.string[0] != '\0');
|
||||
const char* const markerString = va("End: %s", marker.string);
|
||||
const GFSDK_Aftermath_Result result = GFSDK_Aftermath_SetEventMarker(rhi.aftermathCommandList, markerString, strlen(markerString) + 1);
|
||||
Q_assert(result == GFSDK_Aftermath_Result_Success);
|
||||
rhi.aftermathMarkerDepth--;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CmdSetStencilReference(uint8_t stencilRef)
|
||||
|
@ -5281,6 +5441,21 @@ namespace RHI
|
|||
rhi.commandList->CopyBufferRegion(dst.buffer, destOffset, src.buffer, sourceOffset, byteCount);
|
||||
}
|
||||
|
||||
void CmdCopyTexture(HTexture dest, HTexture source)
|
||||
{
|
||||
Q_assert(CanWriteCommands());
|
||||
Q_assert(dest != source);
|
||||
|
||||
const Texture& dst = rhi.textures.Get(dest);
|
||||
const Texture& src = rhi.textures.Get(source);
|
||||
Q_assert(dst.desc.width == src.desc.width);
|
||||
Q_assert(dst.desc.height == src.desc.height);
|
||||
Q_assert(dst.desc.depth == src.desc.depth);
|
||||
Q_assert(dst.desc.mipCount == src.desc.mipCount);
|
||||
Q_assert(dst.desc.format == src.desc.format);
|
||||
rhi.commandList->CopyResource(dst.texture, src.texture);
|
||||
}
|
||||
|
||||
void CmdSetShadingRate(ShadingRate::Id shadingRate)
|
||||
{
|
||||
Q_assert(CanWriteCommands());
|
||||
|
@ -5342,6 +5517,12 @@ namespace RHI
|
|||
Q_assert(!rhi.frameBegun);
|
||||
Q_assert(rhi.commandList == rhi.mainCommandList);
|
||||
rhi.commandList = rhi.tempCommandList;
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
if(rhi.aftermathActive)
|
||||
{
|
||||
rhi.aftermathCommandList = rhi.aftermathTempCommandList;
|
||||
}
|
||||
#endif
|
||||
|
||||
// CPU wait for the temp command list to be done executing on the GPU
|
||||
WaitForTempCommandList();
|
||||
|
@ -5357,6 +5538,12 @@ namespace RHI
|
|||
Q_assert(!rhi.frameBegun);
|
||||
Q_assert(rhi.commandList == rhi.tempCommandList);
|
||||
rhi.commandList = rhi.mainCommandList;
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
if(rhi.aftermathActive)
|
||||
{
|
||||
rhi.aftermathCommandList = rhi.aftermathMainCommandList;
|
||||
}
|
||||
#endif
|
||||
|
||||
// execute and wait on the temporary command list
|
||||
ID3D12CommandQueue* const queue = rhi.computeCommandQueue;
|
||||
|
@ -5589,11 +5776,20 @@ namespace RHI
|
|||
rtasDesc.DestAccelerationStructureData = rhi.buffers.Get(*blasBuffer).gpuAddress;
|
||||
rtasDesc.ScratchAccelerationStructureData = rhi.buffers.Get(rhi.raytracingScratchBuffer).gpuAddress;
|
||||
rtasDesc.Inputs = inputs;
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
CmdInsertDebugLabel("BLAS: Before build");
|
||||
#endif
|
||||
rhi.commandList->BuildRaytracingAccelerationStructure(&rtasDesc, 0, NULL);
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
CmdInsertDebugLabel("BLAS: After build");
|
||||
#endif
|
||||
|
||||
CmdBeginBarrier();
|
||||
CmdBufferBarrier(*blasBuffer, ResourceStates::UnorderedAccessBit);
|
||||
CmdEndBarrier();
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
CmdInsertDebugLabel("BLAS: After barrier");
|
||||
#endif
|
||||
}
|
||||
|
||||
void CmdCreateTLAS(HBuffer* tlasBuffer, const TLASDesc& rhiDesc)
|
||||
|
@ -5669,11 +5865,20 @@ namespace RHI
|
|||
rtasDesc.DestAccelerationStructureData = rhi.buffers.Get(*tlasBuffer).gpuAddress;
|
||||
rtasDesc.ScratchAccelerationStructureData = rhi.buffers.Get(rhi.raytracingScratchBuffer).gpuAddress;
|
||||
rtasDesc.Inputs = inputs;
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
CmdInsertDebugLabel("TLAS: Before build");
|
||||
#endif
|
||||
rhi.commandList->BuildRaytracingAccelerationStructure(&rtasDesc, 0, NULL);
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
CmdInsertDebugLabel("TLAS: After build");
|
||||
#endif
|
||||
|
||||
CmdBeginBarrier();
|
||||
CmdBufferBarrier(*tlasBuffer, ResourceStates::UnorderedAccessBit);
|
||||
CmdEndBarrier();
|
||||
#if defined(RHI_ENABLE_AFTERMATH)
|
||||
CmdInsertDebugLabel("TLAS: After barrier");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5682,3 +5887,32 @@ void R_WaitBeforeInputSampling()
|
|||
RHI::WaitForSwapChain();
|
||||
RHI::rhi.beforeInputSamplingUS = Sys_Microseconds();
|
||||
}
|
||||
|
||||
/*
|
||||
PIX CAPTURE API WOES
|
||||
|
||||
Never got the PIX programmable capture API to work
|
||||
PIXBeginCapture returns "not implemented"
|
||||
|
||||
// before include
|
||||
#define USE_PIX 1
|
||||
|
||||
// before creating the device
|
||||
PIXLoadLatestWinPixGpuCapturerLibrary();
|
||||
HRESULT hr = PIXSetTargetWindow(GetActiveWindow());
|
||||
Check(hr, "PIXSetTargetWindow");
|
||||
|
||||
// whenever...
|
||||
PIXCaptureParameters params = {};
|
||||
params.GpuCaptureParameters.FileName = L"temp.wpix";
|
||||
HRESULT hr = PIXBeginCapture(0, ¶ms);
|
||||
Check(hr, "PIXBeginCapture");
|
||||
|
||||
The legacy API fails as well
|
||||
DXGIGetDebugInterface1 returns "no such interface supported"
|
||||
|
||||
#include <DXProgrammableCapture.h>
|
||||
|
||||
IDXGraphicsAnalysis* graphicsAnalysis;
|
||||
D3D(DXGIGetDebugInterface1(0, IID_PPV_ARGS(&graphicsAnalysis)));
|
||||
*/
|
||||
|
|
|
@ -92,6 +92,7 @@ namespace RHI
|
|||
UnorderedAccessBit = RHI_BIT(11),
|
||||
PresentBit = RHI_BIT(12),
|
||||
RaytracingASBit = RHI_BIT(13),
|
||||
IndirectDispatchBit = RHI_BIT(14),
|
||||
ShaderAccessBits = VertexShaderAccessBit | PixelShaderAccessBit | ComputeShaderAccessBit,
|
||||
DepthAccessBits = DepthReadBit | DepthWriteBit
|
||||
};
|
||||
|
@ -172,10 +173,12 @@ namespace RHI
|
|||
R8_UNorm,
|
||||
Depth24_Stencil8,
|
||||
R10G10B10A2_UNorm,
|
||||
R16_UInt,
|
||||
R32_UInt,
|
||||
R32G32_UInt,
|
||||
R16G16_SNorm,
|
||||
R16G16_Float,
|
||||
R16_Float,
|
||||
Count
|
||||
};
|
||||
};
|
||||
|
@ -444,6 +447,12 @@ namespace RHI
|
|||
rt.q3BlendMode = q3BlendMode;
|
||||
rt.format = format;
|
||||
}
|
||||
|
||||
void SetPostProcessState()
|
||||
{
|
||||
depthStencil.DisableDepth();
|
||||
rasterizer.cullMode = CT_TWO_SIDED;
|
||||
}
|
||||
};
|
||||
|
||||
struct ComputePipelineDesc
|
||||
|
@ -499,6 +508,7 @@ namespace RHI
|
|||
name = name_;
|
||||
width = width_;
|
||||
height = height_;
|
||||
depth = 1;
|
||||
mipCount = mipCount_;
|
||||
sampleCount = 1;
|
||||
initialState = ResourceStates::PixelShaderAccessBit;
|
||||
|
@ -512,6 +522,7 @@ namespace RHI
|
|||
bool shortLifeTime = false;
|
||||
uint32_t width = 0;
|
||||
uint32_t height = 0;
|
||||
uint32_t depth = 1;
|
||||
uint32_t mipCount = 1;
|
||||
uint32_t sampleCount = 1;
|
||||
ResourceStates::Flags initialState = ResourceStates::PixelShaderAccessBit;
|
||||
|
@ -530,11 +541,11 @@ namespace RHI
|
|||
Vector4Copy(rgba, clearColor);
|
||||
}
|
||||
|
||||
void SetClearDepthStencil(float depth, byte stencil = 0)
|
||||
void SetClearDepthStencil(float depthValue, byte stencilValue = 0)
|
||||
{
|
||||
usePreferredClearValue = true;
|
||||
clearDepth = depth;
|
||||
clearStencil = stencil;
|
||||
clearDepth = depthValue;
|
||||
clearStencil = stencilValue;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -772,6 +783,7 @@ namespace RHI
|
|||
void CmdDraw(uint32_t vertexCount, uint32_t firstVertex);
|
||||
void CmdDrawIndexed(uint32_t indexCount, uint32_t firstIndex, uint32_t firstVertex);
|
||||
void CmdDispatch(uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
|
||||
void CmdDispatchIndirect(HBuffer buffer, uint32_t byteOffset);
|
||||
uint32_t CmdBeginDurationQuery();
|
||||
void CmdEndDurationQuery(uint32_t index);
|
||||
void CmdBeginBarrier();
|
||||
|
@ -781,12 +793,14 @@ namespace RHI
|
|||
void CmdClearColorTarget(HTexture texture, const vec4_t clearColor, const Rect* rect = NULL);
|
||||
void CmdClearDepthStencilTarget(HTexture texture, bool clearDepth, float depth, bool clearStencil = false, uint8_t stencil = 0, const Rect* rect = NULL);
|
||||
void CmdClearTextureUAV(HTexture texture, uint32_t mipIndex, const uint32_t* values);
|
||||
void CmdClearBufferUAV(HBuffer buffer, uint32_t value);
|
||||
void CmdInsertDebugLabel(const char* name, float r = 1.0f, float g = 1.0f, float b = 1.0f);
|
||||
void CmdBeginDebugLabel(const char* name, float r = 1.0f, float g = 1.0f, float b = 1.0f);
|
||||
void CmdEndDebugLabel();
|
||||
void CmdSetStencilReference(uint8_t stencilRef);
|
||||
void CmdCopyBuffer(HBuffer dest, HBuffer source);
|
||||
void CmdCopyBuffer(HBuffer dest, uint32_t destOffset, HBuffer source, uint32_t sourceOffset, uint32_t byteCount);
|
||||
void CmdCopyTexture(HTexture dest, HTexture source);
|
||||
void CmdSetShadingRate(ShadingRate::Id shadingRate);
|
||||
void CmdCreateBLAS(HBuffer* blasBuffer, const BLASDesc& desc);
|
||||
void CmdCreateTLAS(HBuffer* tlasBuffer, const TLASDesc& desc);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2022-2023 Gian 'myT' Schellenbaum
|
||||
Copyright (C) 2022-2024 Gian 'myT' Schellenbaum
|
||||
|
||||
This file is part of Challenge Quake 3 (CNQ3).
|
||||
|
||||
|
@ -48,6 +48,7 @@ namespace RHI
|
|||
uint8_t* mappedData;
|
||||
uint32_t rowCount;
|
||||
uint32_t columnCount;
|
||||
uint32_t sliceCount;
|
||||
uint32_t srcRowByteCount;
|
||||
uint32_t dstRowByteCount;
|
||||
};
|
||||
|
|
|
@ -468,7 +468,7 @@ local function ApplyExeProjectSettings(exeName, server)
|
|||
filter "system:windows"
|
||||
links { "Winmm", "ws2_32", "Version", "Shlwapi" }
|
||||
if (server == 0) then
|
||||
links { "D3D12", "DXGI", "Dwmapi", "nvapi64" }
|
||||
links { "D3D12", "DXGI", "Dwmapi" }
|
||||
end
|
||||
|
||||
filter "system:not windows"
|
||||
|
@ -654,6 +654,8 @@ solution "cnq3"
|
|||
includedirs { "/usr/local/include" }
|
||||
end
|
||||
if os.istarget("windows") then
|
||||
includedirs { string.format("%s/../cnq3tools/aftermath", path_root) }
|
||||
includedirs { string.format("%s/../cnq3tools/nvapi", path_root) }
|
||||
files { string.format("%s/renderer/shaders/**.hlsl", path_src) }
|
||||
files { string.format("%s/renderer/shaders/**.hlsli", path_src) }
|
||||
--[[ remap file paths to not have a top-level "shaders" filter
|
||||
|
@ -683,7 +685,8 @@ solution "cnq3"
|
|||
language "C++"
|
||||
if os.istarget("windows") then
|
||||
includedirs { path_src.."/imgui" }
|
||||
libdirs { path_src.."/nvapi" }
|
||||
libdirs { string.format("%s/../cnq3tools/aftermath", path_root) }
|
||||
libdirs { string.format("%s/../cnq3tools/nvapi", path_root) }
|
||||
files { string.format("premake5.lua", path_make) }
|
||||
vpaths { ["*"] = "../code/" } -- don't allow "code" to be the parent filter
|
||||
end
|
||||
|
|
|
@ -73,8 +73,8 @@
|
|||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;Shlwapi.lib;D3D12.lib;DXGI.lib;Dwmapi.lib;nvapi64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\code\nvapi;..\..\.build\debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;Shlwapi.lib;D3D12.lib;DXGI.lib;Dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\cnq3tools\aftermath;..\..\..\cnq3tools\nvapi;..\..\.build\debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EntryPointSymbol>WinMainCRTStartup</EntryPointSymbol>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /MANIFEST:EMBED /MANIFESTINPUT:..\..\code\win32\client.manifest %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
|
@ -113,8 +113,8 @@ copy "..\..\.bin\debug\cnq3.pdb" "$(QUAKE3DIR)"</Command>
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;Shlwapi.lib;D3D12.lib;DXGI.lib;Dwmapi.lib;nvapi64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\code\nvapi;..\..\.build\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;Shlwapi.lib;D3D12.lib;DXGI.lib;Dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\cnq3tools\aftermath;..\..\..\cnq3tools\nvapi;..\..\.build\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EntryPointSymbol>WinMainCRTStartup</EntryPointSymbol>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /MANIFEST:EMBED /MANIFESTINPUT:..\..\code\win32\client.manifest /OPT:REF /OPT:ICF %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PreprocessorDefinitions>DEBUG;_DEBUG;_CRT_SECURE_NO_WARNINGS;WIN32;_WIN32;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\code\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..\cnq3tools\aftermath;..\..\..\cnq3tools\nvapi;..\..\code\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<WarningLevel>Level4</WarningLevel>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;WIN32;_WIN32;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\code\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..\cnq3tools\aftermath;..\..\..\cnq3tools\nvapi;..\..\code\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;Shlwapi.lib;D3D12.lib;DXGI.lib;Dwmapi.lib;nvapi64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\code\nvapi;..\..\.build\debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;Shlwapi.lib;D3D12.lib;DXGI.lib;Dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\cnq3tools\aftermath;..\..\..\cnq3tools\nvapi;..\..\.build\debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EntryPointSymbol>WinMainCRTStartup</EntryPointSymbol>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /MANIFEST:EMBED /MANIFESTINPUT:..\..\code\win32\client.manifest %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
|
@ -115,8 +115,8 @@ copy "..\..\.bin\debug\cnq3.pdb" "$(QUAKE3DIR)"</Command>
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;Shlwapi.lib;D3D12.lib;DXGI.lib;Dwmapi.lib;nvapi64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\code\nvapi;..\..\.build\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;Shlwapi.lib;D3D12.lib;DXGI.lib;Dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\cnq3tools\aftermath;..\..\..\cnq3tools\nvapi;..\..\.build\release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EntryPointSymbol>WinMainCRTStartup</EntryPointSymbol>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /MANIFEST:EMBED /MANIFESTINPUT:..\..\code\win32\client.manifest /OPT:REF /OPT:ICF %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PreprocessorDefinitions>DEBUG;_DEBUG;_CRT_SECURE_NO_WARNINGS;WIN32;_WIN32;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\code\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..\cnq3tools\aftermath;..\..\..\cnq3tools\nvapi;..\..\code\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
@ -84,7 +84,7 @@
|
|||
<WarningLevel>Level4</WarningLevel>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;WIN32;_WIN32;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\code\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..\cnq3tools\aftermath;..\..\..\cnq3tools\nvapi;..\..\code\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
|
|
Loading…
Reference in a new issue