/************************************************************************************************************************************\ |* *| |* 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 *| |* and / or non-disclosure 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. *| |* *| \************************************************************************************************************************************/ /////////////////////////////////////////////////////////////////////////////// // // Date: Jan 6, 2022 // File: nvapi.h // // NvAPI provides an interface to NVIDIA devices. This file contains the // interface constants, structure definitions and function prototypes. // // Target Profile: HMD-NDA-developer // Target Platform: windows // /////////////////////////////////////////////////////////////////////////////// #ifndef _NVAPI_H #define _NVAPI_H #pragma pack(push,8) // Make sure we have consistent structure packings #ifdef __cplusplus extern "C" { #endif // ==================================================== // Universal NvAPI Definitions // ==================================================== #ifndef _WIN32 #define __cdecl #endif // ==================================================== // 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 #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; /*! * 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 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_Status; //! @} //! \ingroup nvapistatus #define NVAPI_API_NOT_INTIALIZED NVAPI_API_NOT_INITIALIZED //!< Fix typo in error code /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Initialize // //! This function initializes the NvAPI library (if not already initialized) but always increments the ref-counter. //! This must be called before calling other NvAPI_ functions. //! Note: It is now mandatory to call NvAPI_Initialize before calling any other NvAPI. //! NvAPI_Unload should be called to unload the NVAPI Library. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval NVAPI_LIBRARY_NOT_FOUND Failed to load the NVAPI support library //! \sa nvapistatus //! \ingroup nvapifunctions /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Initialize(); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Unload // //! DESCRIPTION: Decrements the ref-counter and when it reaches ZERO, unloads NVAPI library. //! This must be called in pairs with NvAPI_Initialize. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! If the client wants unload functionality, it is recommended to always call NvAPI_Initialize and NvAPI_Unload in pairs. //! //! Unloading NvAPI library is not supported when the library is in a resource locked state. //! Some functions in the NvAPI library initiates an operation or allocates certain resources //! and there are corresponding functions available, to complete the operation or free the //! allocated resources. All such function pairs are designed to prevent unloading NvAPI library. //! //! For example, if NvAPI_Unload is called after NvAPI_XXX which locks a resource, it fails with //! NVAPI_ERROR. Developers need to call the corresponding NvAPI_YYY to unlock the resources, //! before calling NvAPI_Unload again. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval NVAPI_API_IN_USE Atleast an API is still being called hence cannot unload requested driver. //! //! \ingroup nvapifunctions /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Unload(); #ifndef NV_DRIVER_TYPE_ENUM #define NV_DRIVER_TYPE_ENUM typedef enum _NV_DRIVER_TYPE { NV_DISPLAY_DRIVER = 0x00000000, //Pass this ENUM value to the function NvAPI_InitializeEx in order to initialize the Display Driver. This is same as calling NvAPI_Initialize. //NvAPI_InitializeEx must be called with this option before calling any display driver related NvAPIs (APIs other than those with name NvAPI_PCF_* as of now) NV_PLATFORM_DRIVER = 0x00000001, //Pass this ENUM value to the function NvAPI_InitializeEx in order to initialize the Nvidia Platform Controllers and Framework (NVPCF) interface. //NvAPI_InitializeEx must be called with this option before calling any NVPCF driver related NvAPIs. These APIs are named using convention NvAPI_PCF_* }NV_DRIVER_TYPE; #endif /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_InitializeEx // //! This function will be used to initialize the NvAPI library (if not already initialized) but always increments the ref-counter for the specified driver. //! It is recommended to use either NvAPI_Initialize or NvAPI_InitializeEx and not both simultaneously by an application. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 396 //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval NVAPI_LIBRARY_NOT_FOUND Failed to load the NVAPI support library //! //! \sa nvapistatus //! \ingroup nvapifunctions /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_InitializeEx(NV_DRIVER_TYPE drvType); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_UnloadEx // //! DESCRIPTION: Decrements the ref-counter for the requested driver. //! This must be called in pairs with NvAPI_InitializeEx (for the same driver) . When all such calls match, NVAPI library will be unloaded. //! If a client is using both NvAPI_Initialize and NvAPI_InitializeEx (which is not recommended), then NVAPI library will be unloaded //! only when every NvAPI_Initialize has corresponding NvAPI_Unload call and every NvAPI_InitializeEx has corresponding NvAPI_UnloadEx call (for the same driver type). //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 396 //! //! Unloading NvAPI library is not supported when the library is in a resource locked state. //! Some functions in the NvAPI library initiates an operation or allocates certain resources //! and there are corresponding functions available, to complete the operation or free the //! allocated resources. All such function pairs are designed to prevent unloading NvAPI library. //! //! For example, if NvAPI_UnloadEx is called after NvAPI_XXX which locks a resource, it fails with //! NVAPI_ERROR. Developers need to call the corresponding NvAPI_YYY to unlock the resources, //! before calling NvAPI_UnloadEx again. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval NVAPI_API_IN_USE Atleast an API is still being called hence cannot unload requested driver. //! //! \ingroup nvapifunctions /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_UnloadEx(NV_DRIVER_TYPE drvType); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetErrorMessage // //! This function converts an NvAPI error code into a null terminated string. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param nr The error code to convert //! \param szDesc The string corresponding to the error code //! //! \return NULL terminated string (always, never NULL) //! \ingroup nvapifunctions /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetErrorMessage(NvAPI_Status nr,NvAPI_ShortString szDesc); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetInterfaceVersionString // //! This function returns a string describing the version of the NvAPI library. //! The contents of the string are human readable. Do not assume a fixed //! format. //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param szDesc User readable string giving NvAPI version information //! //! \return See \ref nvapistatus for the list of possible return values. //! \ingroup nvapifunctions /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetInterfaceVersionString(NvAPI_ShortString szDesc); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetInterfaceVersionStringEx // //! This function returns a string describing the version of the NvAPI library. //! The contents of the string are human readable. Do not assume a fixed format. //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 450 //! //! \param szDesc User readable string giving NvAPI version information //! //! \return See \ref nvapistatus for the list of possible return values. //! \ingroup nvapifunctions /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetInterfaceVersionStringEx(NvAPI_ShortString szDesc); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // All display port related data types definition starts ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This category is intentionally added before the #ifdef. The #endif should also be in the same scope #ifndef DISPLAYPORT_STRUCTS_DEFINED #define DISPLAYPORT_STRUCTS_DEFINED //! \ingroup dispcontrol //! Used in NV_DISPLAY_PORT_INFO. typedef enum _NV_DP_LINK_RATE { NV_DP_1_62GBPS = 6, NV_DP_2_70GBPS = 0xA, NV_DP_5_40GBPS = 0x14, NV_DP_8_10GBPS = 0x1E, // Recommended Intermidiate Link Transfer Rates NV_EDP_2_16GBPS = 8, NV_EDP_2_43GBPS = 9, NV_EDP_3_24GBPS = 0xC, NV_EDP_4_32GBPS = 0x10 } NV_DP_LINK_RATE; //! \ingroup dispcontrol //! Used in NV_DISPLAY_PORT_INFO. typedef enum _NV_DP_LANE_COUNT { NV_DP_1_LANE = 1, NV_DP_2_LANE = 2, NV_DP_4_LANE = 4, } NV_DP_LANE_COUNT; //! \ingroup dispcontrol //! Used in NV_DISPLAY_PORT_INFO. typedef enum _NV_DP_COLOR_FORMAT { NV_DP_COLOR_FORMAT_RGB = 0, NV_DP_COLOR_FORMAT_YCbCr422, NV_DP_COLOR_FORMAT_YCbCr444, } NV_DP_COLOR_FORMAT; //! \ingroup dispcontrol //! Used in NV_DISPLAY_PORT_INFO. typedef enum _NV_DP_COLORIMETRY { NV_DP_COLORIMETRY_RGB = 0, NV_DP_COLORIMETRY_YCbCr_ITU601, NV_DP_COLORIMETRY_YCbCr_ITU709, } NV_DP_COLORIMETRY; //! \ingroup dispcontrol //! Used in NV_DISPLAY_PORT_INFO. typedef enum _NV_DP_DYNAMIC_RANGE { NV_DP_DYNAMIC_RANGE_VESA = 0, NV_DP_DYNAMIC_RANGE_CEA, } NV_DP_DYNAMIC_RANGE; //! \ingroup dispcontrol //! Used in NV_DISPLAY_PORT_INFO. typedef enum _NV_DP_BPC { NV_DP_BPC_DEFAULT = 0, NV_DP_BPC_6, NV_DP_BPC_8, NV_DP_BPC_10, NV_DP_BPC_12, NV_DP_BPC_16, } NV_DP_BPC; //! Do not use the following two constants directly in the code. These will be removed. #define NV_DP_MAX_TOPOLOGY_NODES 128 #define NV_DP_MAX_HDCP_ADDRESS_HOPS 7 #define NV_DP_MAX_ADDRESS_HOPS 15 typedef struct _NV_DP_ADDRESS { NvU32 hopCount; NvU32 hop[NV_DP_MAX_ADDRESS_HOPS]; } NV_DP_ADDRESS; typedef enum _NV_DP_NODE_TYPE { NV_DP_NODE_TYPE_UNKNOWN = -1,//!< Unknown type indicates an error condition, like unable to read the monitor type NV_DP_NODE_TYPE_DP = 0, //!< Root DP to DP NV_DP_NODE_TYPE_HDMI = 1, //!< Root DP to HDMI NV_DP_NODE_TYPE_DVI = 2, //!< Root DP to DVI NV_DP_NODE_TYPE_VGA = 3, //!< Root DP to VGA } NV_DP_NODE_TYPE; typedef struct { NvU64 isOsVisible : 1; //!< this node is exposed to OS (a connected device may not be exposed to OS) NvU64 isStreamCloned : 1; //!< this node is one of the stream cloned device // Add DD flags here NvU64 reservedDD : 30; //!< must be 0 NvU64 isMultistream : 1; //!< is set if sink supports multistream NvU64 isVideoSink : 1; //!< is set if the address represents a video sink NvU64 isAudioSink : 1; //!< is set if the address represents an audio sink NvU64 isLoop : 1; //!< is set if the last hop causes a loop. Recommendation //!< is to ask the user to remove the cable represented by the last hop. NvU64 isRedundant : 1; //!< similar to isLoop except the connection causes redundant pathways //!< to other devices. Last hop represents the connection to cut. NvU64 isMustDisconnect : 1; //!< is set if DD disconnected device and requires nvsvc to do a modeset NvU64 isZombie : 1; //!< is set if DD disconnected device NvU64 isCableOk : 1; //!< is set if something wrong with cable NvU64 isPowerSuspended : 1; //!< is set if DPCD 0x600 is suspend state NvU64 isActive : 1; //!< is set if the device has a head attached to it NvU64 isHdcpCapable : 1; //!< is set if the device is HDCP capable NvU64 isPathHdcpCapable : 1; //!< is set if the path leading to this device is HDCP capable NvU64 isHdcpActive : 1; //!< is set if HDCP is active on the device NvU64 isRevoked : 1; //!< is set if the device is revoked // Add DP Library flags here NvU64 reservedLibrary : 18; //!< must be 0 } NV_DP_NODE_FLAGS; //! Used in NvAPI_GPU_QueryDpTopology //! //! Interpreting NV_DP_BRANCH_DEVICE_PORTS_INFO //! //! If the bit corresponding to the port number in the aux address is high in the internalPortsMask, then the current device is internally connected to the branch device. //! For example, if you had an address 0.8 for a sink A with a branch B preceding it, and B's inputPortsMask has the 8th bit set, //! then A is connected to the internal port of B since 8 is the number of the output port of B to which A is connected. typedef struct _NV_DP_BRANCH_DEVICE_PORTS_INFO { NvU16 validPortsMask; //!< port i is valid, when bit i in this mask is high NvU16 inputPortsMask; //!< port i is an input port, when bit i is high && validPortsMask bit i is high NvU16 internalPortsMask; //!< port i is an internal port, when bit i is high && validPortsMask bit i is high } NV_DP_BRANCH_DEVICE_PORTS_INFO; typedef struct _NV_DP_NODE_INFO { NvU32 version; //!< Only element 0 must be properly set NvU32 displayId; //!< Valid for sinks only, this is a unique identifier for each sink device NV_DP_BRANCH_DEVICE_PORTS_INFO branchDevicePortsInfo; //!< The information about the ports on the branch device NV_DP_ADDRESS auxAddress; //!< The aux address of the given node. NvGUID guid; //!< This GUID is populated for all devices. //!< For sinks, it is the GUID of the previous branch device //!< For branch devices, it is the GUID of the branch device. NV_DP_NODE_FLAGS flags; //!< One or more flag values from NV_DP_NODE_FLAGS. NV_DP_NODE_TYPE nodeType; //!< Node type from NV_DP_NODE_TYPE } NV_DP_NODE_INFO; #define NV_DP_NODE_INFO_VER MAKE_NVAPI_VERSION(NV_DP_NODE_INFO,1) // This category tag is intentionally added before the #endif. The corresponding #ifdef above should also be in the same scope #endif //#ifndef DISPLAYPORT_STRUCTS_DEFINED ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // All display port related data types definitions end ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetEDID // //! \fn NvAPI_GPU_GetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID) //! This function returns the EDID data for the specified GPU handle and connection bit mask. //! displayOutputId should have exactly 1 bit set to indicate a single display. See \ref handles. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \retval NVAPI_INVALID_ARGUMENT pEDID is NULL; displayOutputId has 0 or > 1 bits set //! \retval NVAPI_OK *pEDID contains valid data. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \retval NVAPI_DATA_NOT_FOUND The requested display does not contain an EDID. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu //! @{ #define NV_EDID_V1_DATA_SIZE 256 #define NV_EDID_DATA_SIZE NV_EDID_V1_DATA_SIZE typedef struct { NvU32 version; //structure version NvU8 EDID_Data[NV_EDID_DATA_SIZE]; } NV_EDID_V1; //! Used in NvAPI_GPU_GetEDID() typedef struct { NvU32 version; //!< Structure version NvU8 EDID_Data[NV_EDID_DATA_SIZE]; NvU32 sizeofEDID; } NV_EDID_V2; //! Used in NvAPI_GPU_GetEDID() typedef struct { NvU32 version; //!< Structure version NvU8 EDID_Data[NV_EDID_DATA_SIZE]; NvU32 sizeofEDID; NvU32 edidId; //!< ID which always returned in a monotonically increasing counter. //!< Across a split-EDID read we need to verify that all calls returned the same edidId. //!< This counter is incremented if we get the updated EDID. NvU32 offset; //!< Which 256-byte page of the EDID we want to read. Start at 0. //!< If the read succeeds with edidSize > NV_EDID_DATA_SIZE, //!< call back again with offset+256 until we have read the entire buffer } NV_EDID_V3; typedef NV_EDID_V3 NV_EDID; #define NV_EDID_VER1 MAKE_NVAPI_VERSION(NV_EDID_V1,1) #define NV_EDID_VER2 MAKE_NVAPI_VERSION(NV_EDID_V2,2) #define NV_EDID_VER3 MAKE_NVAPI_VERSION(NV_EDID_V3,3) #define NV_EDID_VER NV_EDID_VER3 //! @} //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID); //! \ingroup gpu //! Used in NvAPI_DISP_GetEdidData #define NV_EDID_DATA_SIZE_MAX 1024 //!< This is the current size supported by Nvidia Display Driver and may change in future. typedef enum { NV_EDID_FLAG_DEFAULT = 0, //!< the EDID which is actively used by the driver, it could be _RAW/_COOKED/_FORCED/_INF. NV_EDID_FLAG_RAW = 1, //!< the EDID which is not modified by the driver. If there's no _FORCED edid engaged, it //!< will be the unmodified monitor EDID from the I2C bus. Otherwise it is original _FORCED edid. NV_EDID_FLAG_COOKED = 2, //!< the EDID has been modified by the driver for compatibility NV_EDID_FLAG_FORCED = 3, //!< the EDID is forced by the end-user over s/w interface, NV_EDID_FLAG_INF = 4, //!< the EDID is from monitor INF NV_EDID_FLAG_HW = 5, //!< the EDID is from the monitor over I2C bus without any modification. NV_EDID_FLAG_TILES = 6, //!< with this flag, if the pinned monitor is a Tiled Display, we will combine all the tiles' edid //!< into one rawdata and return it. Users who raise the flag should split them manually. //!< user can split thoese edids by checking byte 0x7e in the base block which means the number of extension. //!< eg: rawdata[0x7e] = 0x2. (2 extension block) i.e. the whole edid size is (0x2 + 1) * 128. } NV_EDID_FLAG; //! Used in NvAPI_DISP_ValidateEdidData #define NV_EDID_OK 0 //!< the EDID is good #define NV_EDID_BAD_CHECKSUM 0x1 //!< the EDID has bad checksum (base or extension block) #define NV_EDID_INCOMPATIBLE_CONNECTOR 0x2 //!< the EDID claimed the interface/connector is incompatible with the physical connector #define NV_EDID_UNSUPPORTED_PIXEL_CLOCK 0x4 //!< the EDID claimed certain timings with pixel above the h/w limit #define NV_EDID_INCOMPATIBLE_VESA_SPEC 0x8 //!< the EDID is not fully compatible with the VESA/EDID spec //! \ingroup gpu //! Used in NV_GPU_CONNECTOR_DATA typedef enum _NV_GPU_CONNECTOR_TYPE { NVAPI_GPU_CONNECTOR_VGA_15_PIN = 0x00000000, NVAPI_GPU_CONNECTOR_TV_COMPOSITE = 0x00000010, NVAPI_GPU_CONNECTOR_TV_SVIDEO = 0x00000011, NVAPI_GPU_CONNECTOR_TV_HDTV_COMPONENT = 0x00000013, NVAPI_GPU_CONNECTOR_TV_SCART = 0x00000014, NVAPI_GPU_CONNECTOR_TV_COMPOSITE_SCART_ON_EIAJ4120 = 0x00000016, NVAPI_GPU_CONNECTOR_TV_HDTV_EIAJ4120 = 0x00000017, NVAPI_GPU_CONNECTOR_PC_POD_HDTV_YPRPB = 0x00000018, NVAPI_GPU_CONNECTOR_PC_POD_SVIDEO = 0x00000019, NVAPI_GPU_CONNECTOR_PC_POD_COMPOSITE = 0x0000001A, NVAPI_GPU_CONNECTOR_DVI_I_TV_SVIDEO = 0x00000020, NVAPI_GPU_CONNECTOR_DVI_I_TV_COMPOSITE = 0x00000021, NVAPI_GPU_CONNECTOR_DVI_I = 0x00000030, NVAPI_GPU_CONNECTOR_DVI_D = 0x00000031, NVAPI_GPU_CONNECTOR_ADC = 0x00000032, NVAPI_GPU_CONNECTOR_LFH_DVI_I_1 = 0x00000038, NVAPI_GPU_CONNECTOR_LFH_DVI_I_2 = 0x00000039, NVAPI_GPU_CONNECTOR_SPWG = 0x00000040, NVAPI_GPU_CONNECTOR_OEM = 0x00000041, NVAPI_GPU_CONNECTOR_DISPLAYPORT_EXTERNAL = 0x00000046, NVAPI_GPU_CONNECTOR_DISPLAYPORT_INTERNAL = 0x00000047, NVAPI_GPU_CONNECTOR_DISPLAYPORT_MINI_EXT = 0x00000048, NVAPI_GPU_CONNECTOR_HDMI_A = 0x00000061, NVAPI_GPU_CONNECTOR_HDMI_C_MINI = 0x00000063, NVAPI_GPU_CONNECTOR_LFH_DISPLAYPORT_1 = 0x00000064, NVAPI_GPU_CONNECTOR_LFH_DISPLAYPORT_2 = 0x00000065, NVAPI_GPU_CONNECTOR_VIRTUAL_WFD = 0x00000070, //!< Deprecated. NVAPI_GPU_CONNECTOR_USB_C = 0x00000071, NVAPI_GPU_CONNECTOR_UNKNOWN = 0xFFFFFFFF, } NV_GPU_CONNECTOR_TYPE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetConnectorInfo // //! \fn NvAPI_GPU_GetConnectorInfo(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_CONNECTOR_INFO *pConnectorInfo) //! Given a physical GPU handle and a single outputId (exactly 1 bit set - see \ref handles), //! this API fills the NV_GPU_CONNECTOR_INFO with connector specific data. //! \note If outputId is connected or active then the current attached connector information is returned. //! If there is no connector attached for the outputId then all possible connections on the board are returned. //! Some TV outputs may have multiple connectors attached or could have an ambiguous connector layout on the board. //! In that case the connector[] array will list all connectors without indicating //! which one is 'active'. To get the active TV connector use NvAPI_GetTVOutputInfo. //! This API is compliant with displayId sent as input instead of outputId. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu, outputId or pOutputsMask is NULL; or outputId has > 1 bit set //! \retval NVAPI_OK *pConnectorInfo contains valid NV_GPU_CONNECTOR_INFO data //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_GPU_CONNECTOR_INFO version not compatible with driver //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu //! Used in NV_GPU_CONNECTOR_INFO typedef enum _NV_GPU_CONNECTOR_PLATFORM { NVAPI_GPU_CONNECTOR_PLATFORM_DEFAULT_ADD_IN_CARD = 0x00000000, NVAPI_GPU_CONNECTOR_PLATFORM_TWO_PLATE_ADD_IN_CARD = 0x00000001, NVAPI_GPU_CONNECTOR_PLATFORM_MOBILE_ADD_IN_CARD = 0x00000008, NVAPI_GPU_CONNECTOR_PLATFORM_MOBILE_BACK = 0x00000010, NVAPI_GPU_CONNECTOR_PLATFORM_MOBILE_BACK_LEFT = 0x00000011, NVAPI_GPU_CONNECTOR_PLATFORM_MOBILE_BACK_DOCK = 0x00000018, NVAPI_GPU_CONNECTOR_PLATFORM_MAINBOARD_DEFAULT = 0x00000020, NVAPI_GPU_CONNECTOR_PLATFORM_UNKNOWN = 0xFFFFFFFF, } NV_GPU_CONNECTOR_PLATFORM; //! \ingroup gpu //! Used in NV_GPU_CONNECTOR_INFO typedef struct { NV_GPU_CONNECTOR_TYPE type; //!< Connector type NvU32 locationIndex; //!< Connector location } NV_GPU_CONNECTOR_DATA; //! \ingroup gpu #define NV_API_MAX_CONNECTOR_PER_OUTPUT 4 //! \ingroup gpu //! Used in NvAPI_GPU_GetConnectorInfo() typedef struct _NV_GPU_CONNECTOR_INFO_V1 { NvU32 version; //!< Structure version NV_GPU_CONNECTOR_PLATFORM connectorPlatform; //!< Connector platform NvU32 connectorCount; //!< Number of valid entries in connector[] NV_GPU_CONNECTOR_DATA connector[NV_API_MAX_CONNECTOR_PER_OUTPUT]; } NV_GPU_CONNECTOR_INFO_V1; //! \ingroup gpu typedef NV_GPU_CONNECTOR_INFO_V1 NV_GPU_CONNECTOR_INFO; #define NV_GPU_CONNECTOR_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_CONNECTOR_INFO_V1,1) #define NV_GPU_CONNECTOR_INFO_VER NV_GPU_CONNECTOR_INFO_VER1 //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetConnectorInfo(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_CONNECTOR_INFO *pConnectorInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetConnectorInfoEx // //! \fn NvAPI_GPU_GetConnectorInfoEx(NvU32 displayId, NV_GPU_CONNECTOR_INFO_EX *pConnectorInfo) //! //! Description: This API returns the connector information for a given connector identified by the input //! displayId parameter. For vista and above, when the display id represents a device in a multi stream topology, //! the information of the physical connector to which the display is rooted to, will be returned. If the //! display is rooted to multiple physical connectors (when connected via a concentrator), the //! output can be of either of the connectors. In such cases, the user should pass the display id //! of the connector specifically. //! //! \note The connectorData count usually is 1 unless the connector type is an analog TV. Currently the maximum number of connectors per output is defined by //! NV_API_MAX_CONNECTOR_PER_OUTPUT. It is advisable the client (in order to avoid multiple calls) allocate NV_API_MAX_CONNECTOR_PER_OUTPUT elements for //! the connectorData member and set connectorDataCount to NV_API_MAX_CONNECTOR_PER_OUTPUT. //! //! \note If a monitor is connected or active on the given connector, then the current attached connector information is returned. //! If there is no monitor attached then all possible connections on the board are returned. //! Some TV outputs may have multiple connectors attached or could have an ambiguous connector layout on the board. //! In that case the connectorData array will list all connectors without indicating which one is 'active'. //! To get the active TV connector use NvAPI_GetTVOutputInfo. //! //! \param[in] displayId The displayId of a device connected to the required connector //! \param[in/out] pConnectorInfo Pointer to NV_GPU_CONNECTOR_INFO_EX structure that will receive the data //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval NVAPI_INSUFFICIENT_BUFFER There exists more connector data than what was allocated for the connectorData array. //! In this case the connectorDataCount will have the actual number of connector data available //! for the input connector. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu //! Used in NvAPI_GPU_GetConnectorInfoEx() typedef struct _NV_CONNECTOR_CAPS { NvU32 maxDisplaysVisibleToOS; //!< The maximum number of displays that can be exposed to the OS NvU32 maxNodesInMultiStreamTopology; //!< The maximum number of displays that can be connected in a MST behind a single connector NvU32 maxAddressHopsInMultiStreamTopology; //!< The maximum number of levels that the displays can be connected in a multi stream topology (MST) NvU32 maxHdcpHopsSupported; //!< The maximum number of levels beyond which HDCP will not be supported NvU64 isMultiStreamCapable : 1; //!< Specifies if this is a multi stream capable connector NvU64 isStreamCloneCapable : 1; //!< Specifies if this is a stream clone capable connector NvU64 reserved : 62; //!< Reserved. Must be set to ZERO. } NV_CONNECTOR_CAPS; //! \ingroup gpu //! Used in NvAPI_GPU_GetConnectorInfoEx() typedef struct { NvU32 version; //!< Structure version NV_GPU_CONNECTOR_PLATFORM connectorPlatform; //!< Connector platform NvU32 connectorDataCount; //!< IN: Number of entries allocated for connectorData array //!< OUT: The actual number of valid entries in connectorData array. NV_GPU_CONNECTOR_DATA* connectorData; //!< IN: Pointer to an array of NV_GPU_CONNECTOR_DATA structures //!< OUT: The connector data is filled in by the API NV_CONNECTOR_CAPS connectorCaps; //!< Connector capabilities } NV_GPU_CONNECTOR_INFO_EX_V1; typedef enum _NV_GPU_CONNECTOR_DONGLE_TYPE { NV_GPU_CONNECTOR_DONGLE_TYPE_OTHER = 0, NV_GPU_CONNECTOR_DONGLE_TYPE_DP2DVI = 1, NV_GPU_CONNECTOR_DONGLE_TYPE_DP2HDMI = 2, NV_GPU_CONNECTOR_DONGLE_TYPE_DMS592DVI = 3, NV_GPU_CONNECTOR_DONGLE_TYPE_DMS592VGA = 4, NV_GPU_CONNECTOR_DONGLE_TYPE_DP2VGA = 5, NV_GPU_CONNECTOR_DONGLE_TYPE_ACTIVE_DP2DVI = 6, NV_GPU_CONNECTOR_DONGLE_TYPE_ACTIVE_DP2HDMI = 7, //! keeping some reserved NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2VGA = 20, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2SVIDEO = 21, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2COMPOSITE = 22, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2COMPONENT = 23, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2DVI = 24, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2HDMI = 25, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2WFD = 26, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2EIAJRC5237 = 27, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2SDI = 28, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2DP = 29, //!< Deprecated. NV_GPU_CONNECTOR_DONGLE_TYPE_WFD2UDI = 30, //!< Deprecated. } NV_GPU_CONNECTOR_DONGLE_TYPE; typedef struct { NvU32 version; //!< Structure version NV_GPU_CONNECTOR_PLATFORM connectorPlatform; //!< Connector platform NvU32 connectorDataCount; //!< IN: Number of entries allocated for connectorData array //!< OUT: The actual number of valid entries in connectorData array. NV_GPU_CONNECTOR_DATA* connectorData; //!< IN: Pointer to an array of NV_GPU_CONNECTOR_DATA structures //!< OUT: The connector data is filled in by the API NV_CONNECTOR_CAPS connectorCaps; //!< Connector capabilities NV_GPU_CONNECTOR_DONGLE_TYPE dongleType; //!< dongle type. Valid for DP & WFD connector only. } NV_GPU_CONNECTOR_INFO_EX_V2; //! \ingroup gpu typedef NV_GPU_CONNECTOR_INFO_EX_V2 NV_GPU_CONNECTOR_INFO_EX; #define NV_GPU_CONNECTOR_INFO_EX_VER1 MAKE_NVAPI_VERSION(NV_GPU_CONNECTOR_INFO_EX_V1, 1) #define NV_GPU_CONNECTOR_INFO_EX_VER2 MAKE_NVAPI_VERSION(NV_GPU_CONNECTOR_INFO_EX_V2, 2) #define NV_GPU_CONNECTOR_INFO_EX_VER NV_GPU_CONNECTOR_INFO_EX_VER2 //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetConnectorInfoEx(__in NvU32 displayId, __inout NV_GPU_CONNECTOR_INFO_EX *pConnectorInfo); //////////////////////////////////////////////////////////////////////////////// // // NvAPI_TVOutput Information // /////////////////////////////////////////////////////////////////////////////// //! \ingroup tvapi //! Used in NV_DISPLAY_TV_OUTPUT_INFO typedef enum _NV_DISPLAY_TV_FORMAT { NV_DISPLAY_TV_FORMAT_NONE = 0, NV_DISPLAY_TV_FORMAT_SD_NTSCM = 0x00000001, NV_DISPLAY_TV_FORMAT_SD_NTSCJ = 0x00000002, NV_DISPLAY_TV_FORMAT_SD_PALM = 0x00000004, NV_DISPLAY_TV_FORMAT_SD_PALBDGH = 0x00000008, NV_DISPLAY_TV_FORMAT_SD_PALN = 0x00000010, NV_DISPLAY_TV_FORMAT_SD_PALNC = 0x00000020, NV_DISPLAY_TV_FORMAT_SD_576i = 0x00000100, NV_DISPLAY_TV_FORMAT_SD_480i = 0x00000200, NV_DISPLAY_TV_FORMAT_ED_480p = 0x00000400, NV_DISPLAY_TV_FORMAT_ED_576p = 0x00000800, NV_DISPLAY_TV_FORMAT_HD_720p = 0x00001000, NV_DISPLAY_TV_FORMAT_HD_1080i = 0x00002000, NV_DISPLAY_TV_FORMAT_HD_1080p = 0x00004000, NV_DISPLAY_TV_FORMAT_HD_720p50 = 0x00008000, NV_DISPLAY_TV_FORMAT_HD_1080p24 = 0x00010000, NV_DISPLAY_TV_FORMAT_HD_1080i50 = 0x00020000, NV_DISPLAY_TV_FORMAT_HD_1080p50 = 0x00040000, NV_DISPLAY_TV_FORMAT_UHD_4Kp30 = 0x00080000, NV_DISPLAY_TV_FORMAT_UHD_4Kp30_3840 = NV_DISPLAY_TV_FORMAT_UHD_4Kp30, NV_DISPLAY_TV_FORMAT_UHD_4Kp25 = 0x00100000, NV_DISPLAY_TV_FORMAT_UHD_4Kp25_3840 = NV_DISPLAY_TV_FORMAT_UHD_4Kp25, NV_DISPLAY_TV_FORMAT_UHD_4Kp24 = 0x00200000, NV_DISPLAY_TV_FORMAT_UHD_4Kp24_3840 = NV_DISPLAY_TV_FORMAT_UHD_4Kp24, NV_DISPLAY_TV_FORMAT_UHD_4Kp24_SMPTE = 0x00400000, NV_DISPLAY_TV_FORMAT_UHD_4Kp50_3840 = 0x00800000, NV_DISPLAY_TV_FORMAT_UHD_4Kp60_3840 = 0x00900000, NV_DISPLAY_TV_FORMAT_UHD_4Kp30_4096 = 0x00A00000, NV_DISPLAY_TV_FORMAT_UHD_4Kp25_4096 = 0x00B00000, NV_DISPLAY_TV_FORMAT_UHD_4Kp24_4096 = 0x00C00000, NV_DISPLAY_TV_FORMAT_UHD_4Kp50_4096 = 0x00D00000, NV_DISPLAY_TV_FORMAT_UHD_4Kp60_4096 = 0x00E00000, NV_DISPLAY_TV_FORMAT_UHD_8Kp24_7680 = 0x01000000, NV_DISPLAY_TV_FORMAT_UHD_8Kp25_7680 = 0x02000000, NV_DISPLAY_TV_FORMAT_UHD_8Kp30_7680 = 0x04000000, NV_DISPLAY_TV_FORMAT_UHD_8Kp48_7680 = 0x08000000, NV_DISPLAY_TV_FORMAT_UHD_8Kp50_7680 = 0x09000000, NV_DISPLAY_TV_FORMAT_UHD_8Kp60_7680 = 0x0A000000, NV_DISPLAY_TV_FORMAT_UHD_8Kp100_7680 = 0x0B000000, NV_DISPLAY_TV_FORMAT_UHD_8Kp120_7680 = 0x0C000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp48_3840 = 0x0D000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp48_4096 = 0x0E000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp100_4096 = 0x0F000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp100_3840 = 0x10000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp120_4096 = 0x11000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp120_3840 = 0x12000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp100_5120 = 0x13000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp120_5120 = 0x14000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp24_5120 = 0x15000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp25_5120 = 0x16000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp30_5120 = 0x17000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp48_5120 = 0x18000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp50_5120 = 0x19000000, NV_DISPLAY_TV_FORMAT_UHD_4Kp60_5120 = 0x20000000, NV_DISPLAY_TV_FORMAT_UHD_10Kp24_10240 = 0x21000000, NV_DISPLAY_TV_FORMAT_UHD_10Kp25_10240 = 0x22000000, NV_DISPLAY_TV_FORMAT_UHD_10Kp30_10240 = 0x23000000, NV_DISPLAY_TV_FORMAT_UHD_10Kp48_10240 = 0x24000000, NV_DISPLAY_TV_FORMAT_UHD_10Kp50_10240 = 0x25000000, NV_DISPLAY_TV_FORMAT_UHD_10Kp60_10240 = 0x26000000, NV_DISPLAY_TV_FORMAT_UHD_10Kp100_10240 = 0x27000000, NV_DISPLAY_TV_FORMAT_UHD_10Kp120_10240 = 0x28000000, NV_DISPLAY_TV_FORMAT_SD_OTHER = 0x30000000, NV_DISPLAY_TV_FORMAT_ED_OTHER = 0x40000000, NV_DISPLAY_TV_FORMAT_HD_OTHER = 0x50000000, NV_DISPLAY_TV_FORMAT_ANY = 0x80000000, } NV_DISPLAY_TV_FORMAT; //! \ingroup tvapi //! Used in NvAPI_SetGpuTopologies() and NvAPI_GetGpuTopologies() typedef struct { NvU32 version; //!< [IN] Structure version. NvU32 supportedFormats; //!< [OUT only] One or more TV formats defined in NV_DISPLAY_TV_FORMAT matching, encoder supported formats for analog TVs or EDID exposed modes for digital TVs. NV_DISPLAY_TV_FORMAT currentFormat; //!< [IN/OUT] One of the selected TV output format from supportedFormats defined in NV_DISPLAY_TV_FORMAT. NV_GPU_CONNECTOR_TYPE currentConnector; //!< [IN/OUT] For Analog TV, valid TV output connector is one of the NVAPI_GPU_CONNECTOR_TV types. //!< For Digital TV, valid TV output connector is one of the NVAPI_GPU_CONNECTOR_DVI types. } NV_DISPLAY_TV_OUTPUT_INFO; //! \ingroup tvapi #define NV_DISPLAY_TV_OUTPUT_INFO_VER MAKE_NVAPI_VERSION(NV_DISPLAY_TV_OUTPUT_INFO, 1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetTVOutputInfo // //! This function retrieves the TV display output information of the selected display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs or NvAPI_GetView, to identify the targeted TV. See \ref handles. //! Can be NULL to auto pick the TV output associated with hNvDisplay. //! The outputId must be of type #NVAPI_GPU_OUTPUT_TV or #NVAPI_GPU_OUTPUT_DFP in case of a digital HDTV. //! \param [out] pTVOutInfo The returned TV output information. //! With digital HDTV, the supportedFormats are limited to the available EIA-861B modes in the EDID //! or the custom 861B modes if added by the user. //! //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_INVALID_ARGUMENT pTVOutInfo is NULL. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_DISPLAY_TV_OUTPUT_INFO_VER struct is not supported. //! \retval NVAPI_EXPECTED_TV_DISPLAY Expected TV output display in outputId. //! \ingroup tvapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetTVOutputInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_TV_OUTPUT_INFO *pTVOutInfo); //! \ingroup dispcontrol //! @{ #define NVAPI_MAX_VIEW_TARGET 2 #define NVAPI_ADVANCED_MAX_VIEW_TARGET 4 #ifndef _NV_TARGET_VIEW_MODE_ #define _NV_TARGET_VIEW_MODE_ //! Used in NvAPI_SetView(). typedef enum _NV_TARGET_VIEW_MODE { NV_VIEW_MODE_STANDARD = 0, NV_VIEW_MODE_CLONE = 1, NV_VIEW_MODE_HSPAN = 2, NV_VIEW_MODE_VSPAN = 3, NV_VIEW_MODE_DUALVIEW = 4, NV_VIEW_MODE_MULTIVIEW = 5, } NV_TARGET_VIEW_MODE; #endif //! @} // Following definitions are used in NvAPI_SetViewEx. //! Scaling modes - used in NvAPI_SetViewEx(). //! \ingroup dispcontrol typedef enum _NV_SCALING { NV_SCALING_DEFAULT = 0, //!< No change // New Scaling Declarations NV_SCALING_GPU_SCALING_TO_CLOSEST = 1, //!< Balanced - Full Screen NV_SCALING_GPU_SCALING_TO_NATIVE = 2, //!< Force GPU - Full Screen NV_SCALING_GPU_SCANOUT_TO_NATIVE = 3, //!< Force GPU - Centered\No Scaling NV_SCALING_GPU_SCALING_TO_ASPECT_SCANOUT_TO_NATIVE = 5, //!< Force GPU - Aspect Ratio NV_SCALING_GPU_SCALING_TO_ASPECT_SCANOUT_TO_CLOSEST = 6, //!< Balanced - Aspect Ratio NV_SCALING_GPU_SCANOUT_TO_CLOSEST = 7, //!< Balanced - Centered\No Scaling NV_SCALING_GPU_INTEGER_ASPECT_SCALING = 8, //!< Force GPU - Integer Scaling // Legacy Declarations NV_SCALING_MONITOR_SCALING = NV_SCALING_GPU_SCALING_TO_CLOSEST, NV_SCALING_ADAPTER_SCALING = NV_SCALING_GPU_SCALING_TO_NATIVE, NV_SCALING_CENTERED = NV_SCALING_GPU_SCANOUT_TO_NATIVE, NV_SCALING_ASPECT_SCALING = NV_SCALING_GPU_SCALING_TO_ASPECT_SCANOUT_TO_NATIVE, NV_SCALING_CUSTOMIZED = 255 //!< For future use } NV_SCALING; //! Rotate modes- used in NvAPI_SetViewEx(). //! \ingroup dispcontrol typedef enum _NV_ROTATE { NV_ROTATE_0 = 0, NV_ROTATE_90 = 1, NV_ROTATE_180 = 2, NV_ROTATE_270 = 3, NV_ROTATE_IGNORED = 4, } NV_ROTATE; //! Color formats- used in NvAPI_SetViewEx(). //! \ingroup dispcontrol #define NVFORMAT_MAKEFOURCC(ch0, ch1, ch2, ch3) \ ((NvU32)(NvU8)(ch0) | ((NvU32)(NvU8)(ch1) << 8) | \ ((NvU32)(NvU8)(ch2) << 16) | ((NvU32)(NvU8)(ch3) << 24 )) //! Color formats- used in NvAPI_SetViewEx(). //! \ingroup dispcontrol typedef enum _NV_FORMAT { NV_FORMAT_UNKNOWN = 0, //!< unknown. Driver will choose one as following value. NV_FORMAT_P8 = 41, //!< for 8bpp mode NV_FORMAT_R5G6B5 = 23, //!< for 16bpp mode NV_FORMAT_A8R8G8B8 = 21, //!< for 32bpp mode NV_FORMAT_A16B16G16R16F = 113, //!< for 64bpp(floating point) mode. NV_FORMAT_R8G8B8 = 20, NV_FORMAT_X8R8G8B8 = 22, NV_FORMAT_X1R5G5B5 = 24, NV_FORMAT_A1R5G5B5 = 25, NV_FORMAT_A4R4G4B4 = 26, NV_FORMAT_R3G3B2 = 27, NV_FORMAT_A8 = 28, NV_FORMAT_A8R3G3B2 = 29, NV_FORMAT_X4R4G4B4 = 30, NV_FORMAT_A2B10G10R10 = 31, NV_FORMAT_A8B8G8R8 = 32, NV_FORMAT_X8B8G8R8 = 33, NV_FORMAT_G16R16 = 34, NV_FORMAT_A2R10G10B10 = 35, NV_FORMAT_A16B16G16R16 = 36, NV_FORMAT_A8P8 = 40, NV_FORMAT_L8 = 50, NV_FORMAT_A8L8 = 51, NV_FORMAT_A4L4 = 52, NV_FORMAT_V8U8 = 60, NV_FORMAT_L6V5U5 = 61, NV_FORMAT_X8L8V8U8 = 62, NV_FORMAT_Q8W8V8U8 = 63, NV_FORMAT_V16U16 = 64, NV_FORMAT_W11V11U10 = 65, NV_FORMAT_A2W10V10U10 = 67, NV_FORMAT_UYVY = NVFORMAT_MAKEFOURCC('U', 'Y', 'V', 'Y'), NV_FORMAT_R8G8_B8G8 = NVFORMAT_MAKEFOURCC('R', 'G', 'B', 'G'), NV_FORMAT_YUY2 = NVFORMAT_MAKEFOURCC('Y', 'U', 'Y', '2'), NV_FORMAT_G8R8_G8B8 = NVFORMAT_MAKEFOURCC('G', 'R', 'G', 'B'), NV_FORMAT_DXT1 = NVFORMAT_MAKEFOURCC('D', 'X', 'T', '1'), NV_FORMAT_DXT2 = NVFORMAT_MAKEFOURCC('D', 'X', 'T', '2'), NV_FORMAT_DXT3 = NVFORMAT_MAKEFOURCC('D', 'X', 'T', '3'), NV_FORMAT_DXT4 = NVFORMAT_MAKEFOURCC('D', 'X', 'T', '4'), NV_FORMAT_DXT5 = NVFORMAT_MAKEFOURCC('D', 'X', 'T', '5'), NV_FORMAT_D16_LOCKABLE = 70, NV_FORMAT_D32 = 71, NV_FORMAT_D15S1 = 73, NV_FORMAT_D24S8 = 75, NV_FORMAT_D24X8 = 77, NV_FORMAT_D24X4S4 = 79, NV_FORMAT_D16 = 80, NV_FORMAT_D32F_LOCKABLE = 82, NV_FORMAT_D24FS8 = 83, NV_FORMAT_D32_LOCKABLE = 84, NV_FORMAT_S8_LOCKABLE = 85, NV_FORMAT_S1D15 = 72, NV_FORMAT_S8D24 = 74, NV_FORMAT_X8D24 = 76, NV_FORMAT_X4S4D24 = 78, NV_FORMAT_L16 = 81, NV_FORMAT_VERTEXDATA =100, NV_FORMAT_INDEX16 =101, NV_FORMAT_INDEX32 =102, NV_FORMAT_Q16W16V16U16 =110, NV_FORMAT_R16F =111, NV_FORMAT_G16R16F =112, NV_FORMAT_R32F =114, NV_FORMAT_G32R32F =115, NV_FORMAT_A32B32G32R32F =116, NV_FORMAT_CxV8U8 =117, NV_FORMAT_A1 =118, } NV_FORMAT; // TV standard /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SetDisplaySettings /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol //! The connector is not supported yet; must be set to _AUTO typedef enum _NV_CONNECTOR { NV_CONN_AUTO = 0, }NV_CONNECTOR; typedef struct { float x; //!< x-coordinate of the viewport top-left point float y; //!< y-coordinate of the viewport top-left point float w; //!< Width of the viewport float h; //!< Height of the viewport } NV_VIEWPORTF; //! \ingroup dispcontrol //! The timing override is not supported yet; must be set to _AUTO. \n typedef enum _NV_TIMING_OVERRIDE { NV_TIMING_OVERRIDE_CURRENT = 0, //!< get the current timing NV_TIMING_OVERRIDE_AUTO, //!< the timing the driver will use based the current policy NV_TIMING_OVERRIDE_EDID, //!< EDID timing NV_TIMING_OVERRIDE_DMT, //!< VESA DMT timing NV_TIMING_OVERRIDE_DMT_RB, //!< VESA DMT timing with reduced blanking NV_TIMING_OVERRIDE_CVT, //!< VESA CVT timing NV_TIMING_OVERRIDE_CVT_RB, //!< VESA CVT timing with reduced blanking NV_TIMING_OVERRIDE_GTF, //!< VESA GTF timing NV_TIMING_OVERRIDE_EIA861, //!< EIA 861x pre-defined timing NV_TIMING_OVERRIDE_ANALOG_TV, //!< analog SD/HDTV timing NV_TIMING_OVERRIDE_CUST, //!< NV custom timings NV_TIMING_OVERRIDE_NV_PREDEFINED, //!< NV pre-defined timing (basically the PsF timings) NV_TIMING_OVERRIDE_NV_PSF = NV_TIMING_OVERRIDE_NV_PREDEFINED, NV_TIMING_OVERRIDE_NV_ASPR, NV_TIMING_OVERRIDE_SDI, //!< Override for SDI timing NV_TIMING_OVRRIDE_MAX, }NV_TIMING_OVERRIDE; #ifndef NV_TIMING_STRUCTS_DEFINED #define NV_TIMING_STRUCTS_DEFINED //*********************** // The Timing Structure //*********************** // //! \ingroup dispcontrol //! NVIDIA-specific timing extras \n //! Used in NV_TIMING. typedef struct tagNV_TIMINGEXT { NvU32 flag; //!< Reserved for NVIDIA hardware-based enhancement, such as double-scan. NvU16 rr; //!< Logical refresh rate to present NvU32 rrx1k; //!< Physical vertical refresh rate in 0.001Hz NvU32 aspect; //!< Display aspect ratio Hi(aspect):horizontal-aspect, Low(aspect):vertical-aspect NvU16 rep; //!< Bit-wise pixel repetition factor: 0x1:no pixel repetition; 0x2:each pixel repeats twice horizontally,.. NvU32 status; //!< Timing standard NvU8 name[40]; //!< Timing name }NV_TIMINGEXT; //! \ingroup dispcontrol //!The very basic timing structure based on the VESA standard: //! \code //! |<----------------------------htotal--------------------------->| //! ---------"active" video-------->|<-------blanking------>|<----- //! |<-------hvisible-------->|<-hb->|<-hfp->|<-hsw->|<-hbp->|<-hb->| //! --------- -+-------------------------+ | | | | | //! A A | | | | | | | //! : : | | | | | | | //! : : | | | | | | | //! :vertical| addressable video | | | | | | //! : visible| | | | | | | //! : : | | | | | | | //! : : | | | | | | | //! vertical V | | | | | | | //! total --+-------------------------+ | | | | | //! : vb border | | | | | //! : -----------------------------------+ | | | | //! : vfp front porch | | | | //! : -------------------------------------------+ | | | //! : vsw sync width | | | //! : ---------------------------------------------------+ | | //! : vbp back porch | | //! : -----------------------------------------------------------+ | //! V vb border | //! ---------------------------------------------------------------------------+ //! \endcode typedef struct _NV_TIMING { // VESA scan out timing parameters: NvU16 HVisible; //!< horizontal visible NvU16 HBorder; //!< horizontal border NvU16 HFrontPorch; //!< horizontal front porch NvU16 HSyncWidth; //!< horizontal sync width NvU16 HTotal; //!< horizontal total NvU8 HSyncPol; //!< horizontal sync polarity: 1-negative, 0-positive NvU16 VVisible; //!< vertical visible NvU16 VBorder; //!< vertical border NvU16 VFrontPorch; //!< vertical front porch NvU16 VSyncWidth; //!< vertical sync width NvU16 VTotal; //!< vertical total NvU8 VSyncPol; //!< vertical sync polarity: 1-negative, 0-positive NvU16 interlaced; //!< 1-interlaced, 0-progressive NvU32 pclk; //!< pixel clock in 10 kHz //other timing related extras NV_TIMINGEXT etc; }NV_TIMING; #endif //NV_TIMING_STRUCTS_DEFINED //! \addtogroup dispcontrol //! Timing-related constants //! @{ #define NV_TIMING_H_SYNC_POSITIVE 0 #define NV_TIMING_H_SYNC_NEGATIVE 1 #define NV_TIMING_H_SYNC_DEFAULT NV_TIMING_H_SYNC_NEGATIVE // #define NV_TIMING_V_SYNC_POSITIVE 0 #define NV_TIMING_V_SYNC_NEGATIVE 1 #define NV_TIMING_V_SYNC_DEFAULT NV_TIMING_V_SYNC_POSITIVE // #define NV_TIMING_PROGRESSIVE 0 #define NV_TIMING_INTERLACED 1 #define NV_TIMING_INTERLACED_EXTRA_VBLANK_ON_FIELD2 1 #define NV_TIMING_INTERLACED_NO_EXTRA_VBLANK_ON_FIELD2 2 //! @} //! \ingroup dispcontrol typedef enum _NVAPI_TIMING_TYPE { NV_TIMING_TYPE_DMT = 1, //!< DMT NV_TIMING_TYPE_GTF, //!< GTF NV_TIMING_TYPE_ASPR, //!< wide aspect ratio timing, for legacy support only NV_TIMING_TYPE_NTSC_TV, //!< NTSC TV timing. for legacy support only NV_TIMING_TYPE_PAL_TV, //!< PAL TV timing, legacy support only NV_TIMING_TYPE_CVT, //!< CVT timing NV_TIMING_TYPE_CVT_RB, //!< CVT timing with reduced blanking NV_TIMING_TYPE_CUST, //!< Customized timing NV_TIMING_TYPE_EDID_DTD, //!< EDID detailed timing NV_TIMING_TYPE_EDID_STD, //!< EDID standard timing NV_TIMING_TYPE_EDID_EST, //!< EDID established timing NV_TIMING_TYPE_EDID_CVT, //!< EDID defined CVT timing (EDID 1.4) NV_TIMING_TYPE_EDID_861ST, //!< EDID defined CEA/EIA 861 timing (in the EDID 861 extension) NV_TIMING_TYPE_NV_PREDEFINED, //!< NV pre-defined timings (PsF timings) NV_TIMING_TYPE_DMT_RB, //!< DMT timing with reduced blanking NV_TIMING_TYPE_EDID_EXT_DTD, //!< EDID detailed timing in the extension NV_TIMING_TYPE_SDTV, //!< SDTV timing (including NTSC, PAL etc) NV_TIMING_TYPE_HDTV, //!< HDTV timing (480p,480i,720p, 1080i etc) }NVAPI_TIMING_TYPE; //! \ingroup dispcontrol //! Config on the specified display is not supported yet. #define NV_DISP_INDEX_AUTO 0 //! \ingroup dispcontrol //! The generic display target configuration info, independent of any specific mode. \n //! Used in NvAPI_SetDisplaySettings() and NvAPI_GetDisplaySettings() typedef struct { NvU32 version; //!< Structure version NvU32 device; //!< Target display ID or target device mask NV_GPU_CONNECTOR_TYPE connector; NvU32 srcID; //!< The source display index NvU32 srcImportance; //!< (OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary. //!< NvAPI_SetDisplaySettings automatically selects the first target in NV_DISP_PATH index 0 as the GPU's primary view. // the source mode information NvU32 width; NvU32 height; NvU32 depth; NV_ROTATE rotation; NV_FORMAT colorFormat; //!< Color format. Not used now. // the section of the source surface for scan out, defined in normalized desktop coordinates NV_VIEWPORTF srcPartition; // not used now // the scan out viewport in (at the front end, i.e. the compositor/CRTC). // defined in the normalized desktop coordinates NV_VIEWPORTF viewportIn ; // not used now // the scaling mode NV_SCALING scaling; // the scan out viewport out (at the front end, i.e. the compositor/CRTC). // this is for the future arbitrary scaling support (not supported by any the current GPUs) // defined in the normalized raster/backend timing coordinates // viewportOut is not supported yet, must be set to {0.0, 0.0, 0.0, 0.0} NV_VIEWPORTF viewportOut; // not used now // the backend (raster) timing standard NV_TIMING_OVERRIDE timingOverride; NvU32 refreshRate; //!< only used for backward compatible when NV_DISP_PATH_VER1 is specified NvU32 interlaced :1; //!< only used for backward compatible when NV_DISP_PATH_VER1 is specified NvU32 hwModeSetOnly :1; //!< if this flag is set, the modeset is a pure h/w modeset without OS update. Only used with NV_DISP_PATH_VER; NvU32 SelectCustomTiming:1; //!< For HD modes over DVI to select custom timings NvU32 needNullModeset :1; //!< Read only - indicating a NULL modeset is needed on this monitor (for internal DP link training) NvU32 need6x4Modeset :1; //!< Read only - indicating a 640x480x32 at 60Hz modeset is needed (for bad EDID on DP fallback) NvU32 forceModeSet :1; //!< Used only on Win7 and higher during a call to NvAPI_SetDisplaySettings(). Turns off optimization & forces OS to set supplied mode. NvU32 gpuId :24; //!< The display/target physical Gpu ID which is the owner of the scan out (for SLI multimon, display from the slave Gpu) NvU32 isSliFocusDisplay :1; //!< this display path is the sli focus (so far it's read only) NvU32 forceModeEnum :1; //!< Used only on Windows7 and higher during a call to NvAPI_SetDisplaySettings(). Requests a modeset after forced mode enumeration. NV_DISPLAY_TV_FORMAT tvFormat; //!< Valid only on TV device. Set to 0 for other devices. NV_TIMING timing; //!< The scan out timing, NV_DISP_PATH_VER2 only, ignored it's on analog TV. } NV_DISP_PATH_V1; //! \ingroup dispcontrol typedef struct { NvU32 version; //!< Structure version NvU32 device; //!< target display ids or target device mask NV_GPU_CONNECTOR_TYPE connector; // the source display index NvU32 srcID; // the source importance NvU32 srcImportance; //!<(OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary. //! 127 devices NvU32 bRepeaterDepth : 3; //!< [10:8] Repeater depth NvU32 bMaxCascadeExceeded : 1; //!< [11] Topology Error > 7 levels repeater NvU32 bHDMImode : 1; //!< [12] HDCP Receiver in HDMI mode NvU32 bReserved : 19; //!< [31:13] Reserved for future expansion #pragma pack() } NV_HDCP_BSTATUS; //! The Connection State \n //! Used in NV_HDCP_PACKET typedef struct { #pragma pack(1) NvU64 uAttachPoints : 16; //!< [15:0] Transmitting Attach Point NvU64 bNonHDCP : 1; //!< [16] Transmitting Attach Point NvU64 uHeadIndex : 4; //!< [20:17] Index of Head NvU64 uRFUPlanes : 8; //!< [28:21] *NOT* yet supported NvU64 uNumberOfActiveHeads : 1; //!< [29:29] Number of Heads - 1, To be removed as it has invalid bit size to fit number of heads NvU64 bHDCP22Encrypting : 1; //!< [30:30] HDCP22 encryption status NvU64 uStreamIdType : 1; //!< [31:31] HDCP22 StreamID Type NvU64 uReserved2 : 8; //!< [39:32] Reserved for future use NvU64 uAttachedPlanes : 8; //!< [47:40] Will be moved to 28:21 in future chips NvU64 bCloneMode : 1; //!< [48] Dual-Display Clone Mode *NOT* yet supported NvU64 bSpanMode : 1; //!< [49] Dual-Display Span Mode *NOT* yet supported NvU64 reserved : 14; //!< [63:50] To fill up qword #pragma pack() } NV_HDCP_CS; //! The Status of the Attach-Point (HDCP-capable or other) \n //! Used in NV_HDCP_PACKET typedef struct { #pragma pack(1) NvU64 bEncrypting : 1; //!< [0] This Attach Point is Transmitting and has Output Encryption Enabled NvU64 bRepeater : 1; //!< [1] This Attach Point is Transmitting to a Repeater NvU64 bUserAccessible : 1; //!< [2] This Attach Point is Transmitting on a user-accessible external digital port NvU64 bExtUnprotected : 1; //!< [3] This Attach-point is Transmitting externally and is unprotected NvU64 uPortIndex : 4; //!< [7:4] Port/Attach-point index NvU64 uNumPorts : 4; //!< [11:8] Number of Connectable NvU64 bInternalPanel : 1; //!< [12] Compliant Internal / Non-User accessible Port Panel without HDCP Encryption NvU64 bWideScope : 1; //!< [13] Cs:16 is not enough to determine presence of non-compliant outputs+ (always '1') NvU64 bHasCs : 1; //!< [14] Supports Connection State (always '1') NvU64 bReadZ : 1; //!< [15] Supports ReadZ (always '0') NvU64 uReserved : 24; //!< [39:16] Reserved for Future Expansion NvU64 bDualLinkEven : 1; //!< [40] The Even half of a Dual-Link (0x74) NvU64 bDualLinkOdd : 1; //!< [41] The Odd half of a Dual-Link (0x76) NvU64 bDualLinkCapable : 1; //!< [42] This Attach Point has Dual-Link capability NvU64 reserved : 21; //!< [63:43] To fill up qword NvU32 DisplayId; //!< ID of the Display on this attach point #pragma pack() } NV_HDCP_STATUS; // Structure of data returned from monitor - as defined in HDCP Spec typedef struct { #pragma pack(1) NvU32 BCaps : 15; // [14:0] BCaps of HDCP22/HDCP1X NvU32 HDCPMode : 1; // [15:15] HDCP opearting mode DP/TMDS NvU32 HDCPVersion : 8; // [23:16] HDCP Version NvU32 bReserved : 8; // [31:24] Reserved for future expansion #pragma pack() } NV_HDCP_BCAPS; //! Flags used for indicating active member elements \n //! Used in NV_HDCP_PACKET typedef enum { NV_HDCP_FLAGS_NULL = 0x00000000, //!< Get AP Status NV_HDCP_FLAGS_APINDEX = 0x00000001, //!< Index of Attach Point NV_HDCP_FLAGS_AN = 0x00000010, //!< Downstream Session ID NV_HDCP_FLAGS_AKSV = 0x00000020, //!< Downstream/Xmtr KSV NV_HDCP_FLAGS_BKSV = 0x00000040, //!< Downstream/Rcvr KSV NV_HDCP_FLAGS_BSTATUS = 0x00000080, //!< Link/Repeater Status NV_HDCP_FLAGS_CN = 0x00000100, //!< Upstream Session ID NV_HDCP_FLAGS_CKSV = 0x00000200, //!< Upstream ClientApp KSV NV_HDCP_FLAGS_DKSV = 0x00000400, //!< Upstream/Xmtr KSV NV_HDCP_FLAGS_KP = 0x00001000, //!< Signature NV_HDCP_FLAGS_S = 0x00002000, //!< Status NV_HDCP_FLAGS_CS = 0x00004000, //!< Connection State NV_HDCP_FLAGS_V = 0x00010000, //!< V of the KSVList NV_HDCP_FLAGS_MP = 0x00020000, //!< Encrypted initializer for KSV List NV_HDCP_FLAGS_BKSVLIST = 0x00040000, //!< NumKsvs & BksvList[NumKsvs] NV_HDCP_FLAGS_DUAL_LINK = 0x00100000, //!< Two sets of An, Aksv, Kp, Bksv, Dksv NV_HDCP_FLAGS_ALWAYS_AUTH = 0x00200000, //!< Always authenticate NV_HDCP_FLAGS_ON_BY_DEMAND = 0x00000000, //!< Authenticate on demand NV_HDCP_FLAGS_ABORT_UNTRUST = 0x00400000, //!< Abort, Kp didn't match NV_HDCP_FLAGS_ABORT_UNRELBL = 0x00800000, //!< Abort, Repeated Link Failures NV_HDCP_FLAGS_ABORT_KSV_LEN = 0x01000000, //!< Abort, incorrect KSV Length NV_HDCP_FLAGS_ABORT_KSV_SIG = 0x02000000, //!< Abort, bad KSV Signature NV_HDCP_FLAGS_ABORT_SRM_SIG = 0x04000000, //!< Abort, bad SRM Signature NV_HDCP_FLAGS_ABORT_SRM_REV = 0x08000000, //!< Abort due to SRM Revocation NV_HDCP_FLAGS_ABORT_NORDY = 0x10000000, //!< Abort, Repeater Not Ready NV_HDCP_FLAGS_ABORT_KSVTOP = 0x20000000, //!< Abort, KSV Topology Error NV_HDCP_FLAGS_ABORT_BADBKSV = 0x40000000, //!< Abort due to invalid Bksv } NV_HDCP_FLAGS; //! HDCP Commands \n //! Used in NV_HDCP_PACKET typedef enum { NV_HDCP_CMD_NULL = 0x00, //!< Null command NV_HDCP_CMD_QUERY_HEAD_CONFIG = 0x01, //!< Status of the head attach-points NV_HDCP_CMD_READ_LINK_STATUS = 0x02, //!< Get the Status NV_HDCP_CMD_VALIDATE_LINK = 0x03, //!< Gets M & V NV_HDCP_CMD_RENEGOTIATE = 0x04, //!< Forced renegotiation of the link NV_HDCP_CMD_ABORTAUTHENTICATION= 0x05, //!< Abort authentication protocol NV_HDCP_CMD_SETLINKPOLICY = 0x06, //!< Set the link policy } NV_HDCP_COMMANDS; //! HDCP Return Status \n //! Used in NV_HDCP_PACKET typedef enum { NV_HDCP_STATUS_SUCCESS = (0x00000000L), //!< Function completed successfully NV_HDCP_STATUS_UNSUCCESSFUL = (0xC0000001L), //!< Function failed NV_HDCP_STATUS_PENDING = (0x00000103L), //!< Renegotiation is not complete, check status later NV_HDCP_STATUS_LINK_FAILED = (0xC000013EL), //!< Renegotiation could not complete NV_HDCP_STATUS_INVALID_PARAMETER = (0xC000000DL), //!< One or more of the calling parameters was invalid NV_HDCP_STATUS_INVALID_PARAMETER_MIX = (0xC0000030L), //!< The combination of flFlags was invalid NV_HDCP_STATUS_NO_MEMORY = (0xC0000017L), //!< Insufficient buffer space was allocated. Re-allocate using the size returned in the dwSize member NV_HDCP_STATUS_BAD_TOKEN_TYPE = (0xC00000A8L), //!< The Session ID &/or KSV supplied were rejected } NV_HDCP_RET_STATUS; //! HDCP Packet \n //! Used in NV_HDCP_INFO typedef struct _NV_HDCP_PACKET_V1 { #pragma pack(4) NV_UID uidHDCP; //!< (IN) NvU32 packetSize; //!< (IN/OUT) NvU32 hDisplayContext; //!< (IN/OUT) NV_HDCP_COMMANDS cmdCommand; //!< (IN) NV_HDCP_FLAGS flFlags; //!< (IN/OUT) NV_HDCP_RET_STATUS hdcpPacketStatus; //!< (OUT) NvU32 apIndex; //!< (IN) Attach point index NV_HDCP_CN cN; //!< (IN) Client Session ID NV_U40 cKsv; //!< (IN) NV_HDCP_BSTATUS bStatus[NVAPI_MAX_NUM_AP]; //!< (OUT) NV_HDCP_STATUS hdcpStatus[NVAPI_MAX_NUM_AP]; //!< (OUT) NV_HDCP_CS cS; //!< (OUT) Connection State NV_U56 kP[2]; //!< (OUT) KPRIME value NV_U40 aN[2]; //!< (OUT) NV_U40 aKsv[2]; //!< (OUT) NV_U40 dKsv[2]; //!< (OUT) NvU8 vP[20]; //!< (OUT) VPRIME value NvU64 mP; //!< (OUT) MPRIME value NvU32 numBKSVs; //!< (OUT) Valid KSVs in the bKsvList. Maximum is 127 devices NV_U40 bKsvList[NVAPI_MAX_DEVICES]; //!< (OUT) Up to 127 receivers & repeaters #pragma pack() } NV_HDCP_PACKET_V1; //! HDCP Packet \n //! Used in NV_HDCP_INFO typedef struct _NV_HDCP_PACKET { #pragma pack(4) NV_UID uidHDCP; //!< (IN) NvU32 packetSize; //!< (IN/OUT) NvU32 hDisplayContext; //!< (IN/OUT) NV_HDCP_COMMANDS cmdCommand; //!< (IN) NV_HDCP_FLAGS flFlags; //!< (IN/OUT) NV_HDCP_RET_STATUS hdcpPacketStatus; //!< (OUT) NvU32 apIndex; //!< (IN) Attach point index NV_HDCP_CN cN; //!< (IN) Client Session ID NV_U40 cKsv; //!< (IN) NV_HDCP_BSTATUS bStatus[NVAPI_MAX_NUM_AP]; //!< (OUT) NV_HDCP_STATUS hdcpStatus[NVAPI_MAX_NUM_AP]; //!< (OUT) NV_HDCP_CS cS; //!< (OUT) Connection State NV_U56 kP[2]; //!< (OUT) KPRIME value NV_U40 aN[2]; //!< (OUT) NV_U40 aKsv[2]; //!< (OUT) NV_U40 dKsv[2]; //!< (OUT) NvU8 vP[20]; //!< (OUT) VPRIME value NvU64 mP; //!< (OUT) MPRIME value NvU32 numBKSVs; //!< (OUT) Valid KSVs in the bKsvList. Maximum is 127 devices NV_U40 bKsvList[NVAPI_MAX_DEVICES]; //!< (OUT) Up to 127 receivers & repeaters NV_HDCP_BCAPS hdcpBCaps[NVAPI_MAX_NUM_AP]; //!< (OUT) #pragma pack() } NV_HDCP_PACKET; //! Used in NvAPI_GetHDCPLinkParameters() typedef struct _NV_HDCP_INFO_V1 { NvU32 version; NV_HDCP_PACKET_V1 nvHdcpPacket; } NV_HDCP_INFO_V1; //! Used in NvAPI_GetHDCPLinkParameters() typedef struct _NV_HDCP_INFO_V2 { NvU32 version; NV_HDCP_PACKET nvHdcpPacket; } NV_HDCP_INFO_V2; typedef NV_HDCP_INFO_V2 NV_HDCP_INFO; #define NV_HDCP_INFO_VER1 MAKE_NVAPI_VERSION(NV_HDCP_INFO_V1,1) #define NV_HDCP_INFO_VER2 MAKE_NVAPI_VERSION(NV_HDCP_INFO_V2,2) #define NV_HDCP_INFO_VER NV_HDCP_INFO_VER2 //! @} //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_GetHDCPLinkParameters(__in NvDisplayHandle hNvDisplay, __out NV_HDCP_INFO *pNvHdcpInfo); //! \ingroup hybridapi #define NVAPI_MAX_3D_Apps 128 //! \ingroup hybridapi //! Structure to get application processIds and processNames. \n //! Used in NvAPI_QueryNonMigratableApps(). typedef struct { NvU32 version; //!< Structure version NvU32 processId; NvAPI_ShortString processName; }NV_3D_APP_INFO_V1; typedef struct { NvU32 version; // Structure version NvU32 processId; NvAPI_LongString processName; } NV_3D_APP_INFO_V2; typedef NV_3D_APP_INFO_V2 NV_3D_APP_INFO; //! \ingroup hybridapi //! Used in NV_3D_APP_INFO. //! Macro for constructing the version field of NV_3D_APP_INFO //! @{ #define NV_3D_APP_INFO_VER_1 MAKE_NVAPI_VERSION(NV_3D_APP_INFO_V1,1) #define NV_3D_APP_INFO_VER_2 MAKE_NVAPI_VERSION(NV_3D_APP_INFO_V2,2) #define NV_3D_APP_INFO_VER NV_3D_APP_INFO_VER_2 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_QueryNonMigratableApps // //! This function queries all non-migratable applications which block successful driver reload such //! as for SLI or Hybrid transitions. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 173 //! //! \param [in,out] apps Empty structure passed as an input and upon successful exit, //! contains a list of non-migratable applications and processIDs. //! \param [in,out] total Total number of non-migratable applications currently running in the system. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter //! //! \ingroup hybridapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_QueryNonMigratableApps(NV_3D_APP_INFO apps[NVAPI_MAX_3D_Apps], NvU32 *total); //! \ingroup gpu //! @{ typedef struct { //! numerator / denominator gives the refresh rate in Hz NvU32 numerator; NvU32 denominator; } NV_DISPLAY_REFRESH_RATE; //! @} /////////////////////////////////////////////////////////////////////////////// // SetDisplayConfig/GetDisplayConfig /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol typedef struct _NV_POSITION { NvS32 x; NvS32 y; } NV_POSITION; //! \ingroup dispcontrol typedef struct _NV_RESOLUTION { NvU32 width; NvU32 height; NvU32 colorDepth; } NV_RESOLUTION; //! \ingroup dispcontrol typedef struct _NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1 { NvU32 version; // Rotation and Scaling NV_ROTATE rotation; //!< (IN) rotation setting. NV_SCALING scaling; //!< (IN) scaling setting. // Refresh Rate NvU32 refreshRate1K; //!< (IN) Non-interlaced Refresh Rate of the mode, multiplied by 1000, 0 = ignored //!< This is the value which driver reports to the OS. // Flags NvU32 interlaced:1; //!< (IN) Interlaced mode flag, ignored if refreshRate == 0 NvU32 primary:1; //!< (IN) Declares primary display in clone configuration. This is *NOT* GDI Primary. //!< Only one target can be primary per source. If no primary is specified, the first //!< target will automatically be primary. #ifdef NV_PAN_AND_SCAN_DEFINED NvU32 isPanAndScanTarget:1; //!< Whether on this target Pan and Scan is enabled or has to be enabled. Valid only //!< when the target is part of clone topology. #else NvU32 reservedBit1:1; #endif NvU32 disableVirtualModeSupport:1; NvU32 isPreferredUnscaledTarget:1; NvU32 reserved:27; // TV format information NV_GPU_CONNECTOR_TYPE connector; //!< Specify connector type. For TV only, ignored if tvFormat == NV_DISPLAY_TV_FORMAT_NONE NV_DISPLAY_TV_FORMAT tvFormat; //!< (IN) to choose the last TV format set this value to NV_DISPLAY_TV_FORMAT_NONE //!< In case of NvAPI_DISP_GetDisplayConfig(), this field will indicate the currently applied TV format; //!< if no TV format is applied, this field will have NV_DISPLAY_TV_FORMAT_NONE value. //!< In case of NvAPI_DISP_SetDisplayConfig(), this field should only be set in case of TVs; //!< for other displays this field will be ignored and resolution & refresh rate specified in input will be used to apply the TV format. // Backend (raster) timing standard NV_TIMING_OVERRIDE timingOverride; //!< Ignored if timingOverride == NV_TIMING_OVERRIDE_CURRENT NV_TIMING timing; //!< Scan out timing, valid only if timingOverride == NV_TIMING_OVERRIDE_CUST //!< The value NV_TIMING::NV_TIMINGEXT::rrx1k is obtained from the EDID. The driver may //!< tweak this value for HDTV, stereo, etc., before reporting it to the OS. } NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1; //! \ingroup dispcontrol typedef NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1 NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO; //! \ingroup dispcontrol #define NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1,1) //! \ingroup dispcontrol #define NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_VER NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_VER1 //! \ingroup dispcontrol typedef struct _NV_DISPLAYCONFIG_PATH_TARGET_INFO_V1 { NvU32 displayId; //!< Display ID NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO* details; //!< May be NULL if no advanced settings are required. NULL for Non-NVIDIA Display. } NV_DISPLAYCONFIG_PATH_TARGET_INFO_V1; //! \ingroup dispcontrol typedef struct _NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2 { NvU32 displayId; //!< Display ID NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO* details; //!< May be NULL if no advanced settings are required NvU32 targetId; //!< Windows CCD target ID. Must be present only for non-NVIDIA adapter, for NVIDIA adapter this parameter is ignored. } NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2; //! \ingroup dispcontrol //! As version is not defined for this structure, we will be using version of NV_DISPLAYCONFIG_PATH_INFO typedef NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2 NV_DISPLAYCONFIG_PATH_TARGET_INFO; //! \ingroup dispcontrol typedef enum _NV_DISPLAYCONFIG_SPANNING_ORIENTATION { NV_DISPLAYCONFIG_SPAN_NONE = 0, NV_DISPLAYCONFIG_SPAN_HORIZONTAL = 1, NV_DISPLAYCONFIG_SPAN_VERTICAL = 2, } NV_DISPLAYCONFIG_SPANNING_ORIENTATION; //! \ingroup dispcontrol typedef struct _NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1 { NV_RESOLUTION resolution; NV_FORMAT colorFormat; //!< Ignored at present, must be NV_FORMAT_UNKNOWN (0) NV_POSITION position; //!< Is all positions are 0 or invalid, displays will be automatically //!< positioned from left to right with GDI Primary at 0,0, and all //!< other displays in the order of the path array. NV_DISPLAYCONFIG_SPANNING_ORIENTATION spanningOrientation; //!< Spanning is only supported on XP NvU32 bGDIPrimary : 1; NvU32 bSLIFocus : 1; NvU32 reserved : 30; //!< Must be 0 } NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1; //! \ingroup dispcontrol typedef struct _NV_DISPLAYCONFIG_PATH_INFO_V1 { NvU32 version; NvU32 reserved_sourceId; //!< This field is reserved. There is ongoing debate if we need this field. //!< Identifies sourceIds used by Windows. If all sourceIds are 0, //!< these will be computed automatically. NvU32 targetInfoCount; //!< Number of elements in targetInfo array NV_DISPLAYCONFIG_PATH_TARGET_INFO_V1* targetInfo; NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1* sourceModeInfo; //!< May be NULL if mode info is not important } NV_DISPLAYCONFIG_PATH_INFO_V1; //! \ingroup dispcontrol //! This define is temporary and must be removed once DVS failure is fixed. #define _NV_DISPLAYCONFIG_PATH_INFO_V2 _NV_DISPLAYCONFIG_PATH_INFO //! \ingroup dispcontrol typedef struct _NV_DISPLAYCONFIG_PATH_INFO_V2 { NvU32 version; union { NvU32 sourceId; //!< Identifies sourceId used by Windows CCD. This can be optionally set. NvU32 reserved_sourceId; //!< Only for compatibility }; NvU32 targetInfoCount; //!< Number of elements in targetInfo array NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2* targetInfo; NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1* sourceModeInfo; //!< May be NULL if mode info is not important NvU32 IsNonNVIDIAAdapter : 1; //!< True for non-NVIDIA adapter. NvU32 reserved : 31; //!< Must be 0 void *pOSAdapterID; //!< Used by Non-NVIDIA adapter for pointer to OS Adapter of LUID //!< type, type casted to void *. } NV_DISPLAYCONFIG_PATH_INFO_V2; //! \ingroup dispcontrol #define NV_DISPLAYCONFIG_PATH_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAYCONFIG_PATH_INFO_V1,1) //! \ingroup dispcontrol #define NV_DISPLAYCONFIG_PATH_INFO_VER2 MAKE_NVAPI_VERSION(NV_DISPLAYCONFIG_PATH_INFO_V2,2) #ifndef NV_DISPLAYCONFIG_PATH_INFO_VER typedef NV_DISPLAYCONFIG_PATH_INFO_V2 NV_DISPLAYCONFIG_PATH_INFO; #define NV_DISPLAYCONFIG_PATH_INFO_VER NV_DISPLAYCONFIG_PATH_INFO_VER2 typedef NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1 NV_DISPLAYCONFIG_SOURCE_MODE_INFO; #endif //! \ingroup dispcontrol typedef enum _NV_DISPLAYCONFIG_FLAGS { NV_DISPLAYCONFIG_VALIDATE_ONLY = 0x00000001, NV_DISPLAYCONFIG_SAVE_TO_PERSISTENCE = 0x00000002, NV_DISPLAYCONFIG_DRIVER_RELOAD_ALLOWED = 0x00000004, //!< Driver reload is permitted if necessary NV_DISPLAYCONFIG_FORCE_MODE_ENUMERATION = 0x00000008, //!< Refresh OS mode list. NV_FORCE_COMMIT_VIDPN = 0x00000010, //!< Tell OS to avoid optimizing CommitVidPn call during a modeset } NV_DISPLAYCONFIG_FLAGS; #define NVAPI_UNICODE_STRING_MAX 2048 #define NVAPI_BINARY_DATA_MAX 4096 typedef NvU16 NvAPI_UnicodeString[NVAPI_UNICODE_STRING_MAX]; typedef const NvU16 *NvAPI_LPCWSTR; // Common //! \ingroup gpuclock //! @{ #define NVAPI_MAX_GPU_CLOCKS 32 #define NVAPI_MAX_GPU_PUBLIC_CLOCKS 32 #define NVAPI_MAX_GPU_PERF_CLOCKS 32 #define NVAPI_MAX_GPU_PERF_VOLTAGES 16 #define NVAPI_MAX_GPU_PERF_PSTATES 16 //! @} //! \ingroup gpuclock typedef enum _NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID { NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_CORE = 0, NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_UNDEFINED = NVAPI_MAX_GPU_PERF_VOLTAGES, } NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID; //! \ingroup gpuvoltage typedef enum _NV_GPU_CLIENT_VOLT_DOMAIN_ID { NV_GPU_CLIENT_VOLT_DOMAIN_CORE = 0, NV_GPU_CLIENT_VOLT_DOMAIN_MAX_ENTRIES, } NV_GPU_CLIENT_VOLT_DOMAIN_ID; //! \ingroup gpuclock typedef enum _NV_GPU_PERF_VOLTAGE_DOMAIN_ID { NVAPI_GPU_PERF_VOLTAGE_DOMAIN_CORE = 0, NVAPI_GPU_PERF_VOLTAGE_DOMAIN_FB = 1, NVAPI_GPU_PERF_VOLTAGE_DOMAIN_COLD_CORE = 2, NVAPI_GPU_PERF_VOLTAGE_DOMAIN_CORE_NOMINAL = 3, NVAPI_GPU_PERF_VOLTAGE_DOMAIN_UNDEFINED = NVAPI_MAX_GPU_PERF_VOLTAGES, } NV_GPU_PERF_VOLTAGE_DOMAIN_ID; //! \ingroup gpuclock typedef enum _NV_GPU_PUBLIC_CLOCK_ID { NVAPI_GPU_PUBLIC_CLOCK_GRAPHICS = 0, NVAPI_GPU_PUBLIC_CLOCK_MEMORY = 4, NVAPI_GPU_PUBLIC_CLOCK_PROCESSOR = 7, NVAPI_GPU_PUBLIC_CLOCK_VIDEO = 8, NVAPI_GPU_PUBLIC_CLOCK_UNDEFINED = NVAPI_MAX_GPU_PUBLIC_CLOCKS, } NV_GPU_PUBLIC_CLOCK_ID; //! \addtogroup gpupstate //! @{ typedef enum _NV_GPU_PERF_PSTATE_ID { NVAPI_GPU_PERF_PSTATE_P0 = 0, NVAPI_GPU_PERF_PSTATE_P1, NVAPI_GPU_PERF_PSTATE_P2, NVAPI_GPU_PERF_PSTATE_P3, NVAPI_GPU_PERF_PSTATE_P4, NVAPI_GPU_PERF_PSTATE_P5, NVAPI_GPU_PERF_PSTATE_P6, NVAPI_GPU_PERF_PSTATE_P7, NVAPI_GPU_PERF_PSTATE_P8, NVAPI_GPU_PERF_PSTATE_P9, NVAPI_GPU_PERF_PSTATE_P10, NVAPI_GPU_PERF_PSTATE_P11, NVAPI_GPU_PERF_PSTATE_P12, NVAPI_GPU_PERF_PSTATE_P13, NVAPI_GPU_PERF_PSTATE_P14, NVAPI_GPU_PERF_PSTATE_P15, NVAPI_GPU_PERF_PSTATE_UNDEFINED = NVAPI_MAX_GPU_PERF_PSTATES, NVAPI_GPU_PERF_PSTATE_ALL, } NV_GPU_PERF_PSTATE_ID; //! @} //! \addtogroup gpupstate //! @{ #define NVAPI_MAX_GPU_PSTATE20_PSTATES 16 #define NVAPI_MAX_GPU_PSTATE20_CLOCKS 8 #define NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES 4 //! Used to identify clock type typedef enum { //! Clock domains that use single frequency value within given pstate NVAPI_GPU_PERF_PSTATE20_CLOCK_TYPE_SINGLE = 0, //! Clock domains that allow range of frequency values within given pstate NVAPI_GPU_PERF_PSTATE20_CLOCK_TYPE_RANGE, } NV_GPU_PERF_PSTATE20_CLOCK_TYPE_ID; //! Used to describe both voltage and frequency deltas //! Fields marked with [SET] must be populated when making NvAPI_GPU_SetPstates20() call. typedef struct { //! [SET] //! Value of parameter delta (in respective units [kHz, uV]) NvS32 value; struct { //! Min value allowed for parameter delta (in respective units [kHz, uV]) NvS32 min; //! Max value allowed for parameter delta (in respective units [kHz, uV]) NvS32 max; } valueRange; } NV_GPU_PERF_PSTATES20_PARAM_DELTA; //! Used to describe single clock entry //! Fields marked with [SET] must be populated when making NvAPI_GPU_SetPstates20() call. typedef struct { //! [SET] //! ID of the clock domain NV_GPU_PUBLIC_CLOCK_ID domainId; //! Clock type ID NV_GPU_PERF_PSTATE20_CLOCK_TYPE_ID typeId; //! Set if this clock domain can be modified using NvAPI_GPU_SetPstates20() call, //! otherwise it is cleared NvU32 bIsEditable:1; //! These bits are reserved for future use (must be always 0) NvU32 reserved:31; //! [SET] //! Current frequency delta from nominal settings in (kHz) NV_GPU_PERF_PSTATES20_PARAM_DELTA freqDelta_kHz; //! Clock domain type dependant information union { struct { //! Clock frequency within given pstate in (kHz) NvU32 freq_kHz; } single; struct { //! Min clock frequency within given pstate in (kHz) NvU32 minFreq_kHz; //! Max clock frequency within given pstate in (kHz) NvU32 maxFreq_kHz; //! Voltage domain ID and value range in (uV) required for this clock NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId; NvU32 minVoltage_uV; NvU32 maxVoltage_uV; } range; } data; } NV_GPU_PSTATE20_CLOCK_ENTRY_V1; //! Used to describe single base voltage entry //! Fields marked with [SET] must be populated when making NvAPI_GPU_SetPstates20() call. typedef struct { //! [SET] //! ID of the voltage domain NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId; //! Set if this voltage domain can be modified using NvAPI_GPU_SetPstates20() call, //! otherwise it is cleared NvU32 bIsEditable:1; //! These bits are reserved for future use (must be always 0) NvU32 reserved:31; //! Current base voltage settings in [uV] NvU32 volt_uV; //! [SET] NV_GPU_PERF_PSTATES20_PARAM_DELTA voltDelta_uV; // Current base voltage delta from nominal settings in [uV] } NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1; //! Used in NvAPI_GPU_GetPstates20() interface call. //! Structure is used to retrieve/modify current clock and voltage pstate settings. //! Fields marked with [SET] must be populated when making NvAPI_GPU_SetPstates20() call. typedef struct { //! [SET] //! Version info of the structure (NV_GPU_PERF_PSTATES20_INFO_VER) NvU32 version; //! Set if at least one pstate parameter (clock and/or voltage) on this GPU //! can be modified using NvAPI_GPU_SetPstates20() call, otherwise it is cleared NvU32 bIsEditable:1; //! These bits are reserved for future use (must be always 0) NvU32 reserved:31; //! [SET] //! Number of populated pstates NvU32 numPstates; //! [SET] //! Number of populated clocks (per pstate) NvU32 numClocks; //! [SET] //! Number of populated base voltages (per pstate) NvU32 numBaseVoltages; //! Performance state (P-State) settings //! Valid index range is 0 to numPstates-1 struct { //! [SET] //! ID of the P-State NV_GPU_PERF_PSTATE_ID pstateId; //! Set if at least one parameter (clock and/or voltage) within this pstate //! can be modified using NvAPI_GPU_SetPstates20() call, otherwise it is cleared NvU32 bIsEditable:1; //! These bits are reserved for future use (must be always 0) NvU32 reserved:31; //! Array of clock entries //! Valid index range is 0 to numClocks-1 NV_GPU_PSTATE20_CLOCK_ENTRY_V1 clocks[NVAPI_MAX_GPU_PSTATE20_CLOCKS]; //! Array of baseVoltage entries //! Valid index range is 0 to numBaseVoltages-1 NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1 baseVoltages[NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES]; } pstates[NVAPI_MAX_GPU_PSTATE20_PSTATES]; } NV_GPU_PERF_PSTATES20_INFO_V1; //! Used in NvAPI_GPU_GetPstates20() interface call. //! Structure is used to retrieve/modify current clock and voltage pstate settings. //! Fields marked with [SET] must be populated when making NvAPI_GPU_SetPstates20() call. typedef struct _NV_GPU_PERF_PSTATES20_INFO_V2 { //! [SET] //! Version info of the structure (NV_GPU_PERF_PSTATES20_INFO_VER) NvU32 version; //! Set if at least one pstate parameter (clock and/or voltage) on this GPU //! can be modified using NvAPI_GPU_SetPstates20() call, otherwise it is cleared NvU32 bIsEditable:1; //! These bits are reserved for future use (must be always 0) NvU32 reserved:31; //! [SET] //! Number of populated pstates NvU32 numPstates; //! [SET] //! Number of populated clocks (per pstate) NvU32 numClocks; //! [SET] //! Number of populated base voltages (per pstate) NvU32 numBaseVoltages; //! Performance state (P-State) settings //! Valid index range is 0 to numPstates-1 struct { //! [SET] //! ID of the P-State NV_GPU_PERF_PSTATE_ID pstateId; //! Set if at least one parameter (clock and/or voltage) within this pstate //! can be modified using NvAPI_GPU_SetPstates20() call, otherwise it is cleared NvU32 bIsEditable:1; //! These bits are reserved for future use (must be always 0) NvU32 reserved:31; //! Array of clock entries //! Valid index range is 0 to numClocks-1 NV_GPU_PSTATE20_CLOCK_ENTRY_V1 clocks[NVAPI_MAX_GPU_PSTATE20_CLOCKS]; //! Array of baseVoltage entries //! Valid index range is 0 to numBaseVoltages-1 NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1 baseVoltages[NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES]; } pstates[NVAPI_MAX_GPU_PSTATE20_PSTATES]; //! OV settings - Please refer to NVIDIA over-volting recommendation to understand impact of this functionality //! Valid index range is 0 to numVoltages-1 struct { //! [SET] //! Number of populated voltages NvU32 numVoltages; //! Array of voltage entries //! Valid index range is 0 to numVoltages-1 NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1 voltages[NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES]; } ov; } NV_GPU_PERF_PSTATES20_INFO_V2; typedef NV_GPU_PERF_PSTATES20_INFO_V2 NV_GPU_PERF_PSTATES20_INFO; //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO_V1 #define NV_GPU_PERF_PSTATES20_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES20_INFO_V1,1) //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO_V2 #define NV_GPU_PERF_PSTATES20_INFO_VER2 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES20_INFO_V2,2) //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO_V2 #define NV_GPU_PERF_PSTATES20_INFO_VER3 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES20_INFO_V2,3) //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO #define NV_GPU_PERF_PSTATES20_INFO_VER NV_GPU_PERF_PSTATES20_INFO_VER3 //! @} //! \addtogroup gpu //! @{ /*! * Used in \ref NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_STATUS_V1 * and \ref NV_GPU_CLIENT_POWER_POLICIES_POLICY_INFO_V1 * and \ref NV_GPU_CLIENT_PFF_CURVE_TUPLE_V1 * * Describes single power value (reading or limit). */ typedef struct { /*! * On output it denotes if power is also provided in [mW] units (absolute * power, available only on Quadro/Tesla). * * On input (when used within \ref NvAPI_GPU_ClientPowerPoliciesSetStatus) * it denotes if caller is trying to set limit using absolute power or * scaled power (percentage). */ NvU32 bMilliWattValid:1; /*! * Reserved for future use. */ NvU32 reserved:31; /*! * Power value in 0.001 [%] units (normalized to respective default TDP limit). */ NvU32 mp; /*! * Power value in 1 [mW] units. */ NvU32 mW; } NV_GPU_CLIENT_POWER_READING_V1; /*! * Enumeration of Piecewise Frequency Flooring tuple types */ typedef enum { NV_GPU_CLIENT_PFF_CURVE_TUPLE_POWER, NV_GPU_CLIENT_PFF_CURVE_TUPLE_TEMPERATURE, } NV_GPU_CLIENT_PFF_CURVE_TUPLE_TYPE; /*! * Used in \ref NV_GPU_CLIENT_PFF_CURVE_V1. */ typedef struct { /*! * The anonymous union below should be accessed based * on this type. */ NV_GPU_CLIENT_PFF_CURVE_TUPLE_TYPE type; /*! * Frequency of the tuple in kHz. The frequency is * the floor at the given power or temperature for * the graphics clock domain (NVAPI_GPU_PUBLIC_CLOCK_GRAPHICS) */ NvU32 freqkHz; /*! * Domain value of the tuple. This is either a power or * temperature value depending on the tuple type. */ union { /*! * If the tuple is of type NV_GPU_CLIENT_PFF_CURVE_TUPLE_POWER, * this is the domain value associated with the given tuple. */ NV_GPU_CLIENT_POWER_READING_V1 power; /*! * If the tuple is of type NV_GPU_CLIENT_PFF_CURVE_TUPLE_TEMPERATURE, * this is the domain value associated with the given tuple. This value is in * 1/256's of a degree celsius. */ NvS32 temperature; }; } NV_GPU_CLIENT_PFF_CURVE_TUPLE_V1; /*! * Used in \ref NV_GPU_CLIENT_PFF_CURVE_STATUS_V1. */ typedef struct { /*! * Runtime frequency of the tuple in kHz. The frequency is * the floor at the given power or temperature for * the graphics clock domain (NVAPI_GPU_PUBLIC_CLOCK_GRAPHICS). * * This will be the value of * NV_GPU_CLIENT_PFF_CURVE_TUPLE_V1::freqkHz (+/-) any OC offset at that * particular frequency. */ NvU32 freqkHz; } NV_GPU_CLIENT_PFF_CURVE_TUPLE_STATUS_V1; #define NV_GPU_CLIENT_PFF_CURVE_NUM_TUPLES 3 /*! * Stucture defining the modifiable section of a pff curve. All tuples must have temperature/power * values between the current termperature/power target and the max temperature/power target. * The frequency values of the tuples must be monotonically dectreasing. The temperature/power values * of the tuples must be monitonically increasing. */ typedef struct { /*! * Tuples defining the shape of the piecewise flooring curve (power/temperature and frequency pairs) */ NV_GPU_CLIENT_PFF_CURVE_TUPLE_V1 tuples[NV_GPU_CLIENT_PFF_CURVE_NUM_TUPLES]; } NV_GPU_CLIENT_PFF_CURVE_V1; /*! * Structure representing dynamic data of the PFF curve. This can change at runtime with any offsetting * to the VF curve. \ref NvAPI_GPU_ClockClkVfPointsSetControl. */ typedef struct { /*! * Dynamic status information about each of the tuples in NV_GPU_CLIENT_PFF_CURVE_V1 */ NV_GPU_CLIENT_PFF_CURVE_TUPLE_STATUS_V1 tuples[NV_GPU_CLIENT_PFF_CURVE_NUM_TUPLES]; } NV_GPU_CLIENT_PFF_CURVE_STATUS_V1; //! @} // common between nvGpu.spec and nvPower.spec /////////////////////////////////////////////////////////////////////////////// // // BOARDOBJ MACROs and Structures // // These MACROs and Structures are required to iterate over the MASK of given // Board Object. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpupstate //! @{ /*! * Type to be used for indexing into a BOARDOBJGRP * PP-TODO : Planning to delete this in follow up in favor of @ref NvBoardObjIdx */ typedef NvU16 NV_GPU_BOARDOBJ_IDX; /*! * @brief Type for representing an index of a BOARDOBJ within a * BOARDOBJGRP. This type can also represent the number of elements * within a BOARDOBJGRP or the number of bits in a BOARDOBJGRPMASK. */ typedef NvU16 NvBoardObjIdx; /*! * Maximum number of Board Objects for different BOARDOBJGRP clasess. */ #define NV_GPU_BOARDOBJGRP_E32_MAX_OBJECTS (32) #define NV_GPU_BOARDOBJGRP_E255_MAX_OBJECTS (255) #define NV_GPU_BOARDOBJGRP_E512_MAX_OBJECTS (512) /*! * Defines number of bits stored in each element of 32-bit word array. * Define exists just to avoid hard-coding value 32 across code. */ #define NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_BIT_SIZE 32 /*! * Computes an array index of a 32-bit word storing requested bit. * * @param[in] _bit Index of a bit within a bit mask */ #define NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_INDEX(_bit) \ ((_bit) / NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_BIT_SIZE) /*! * Computes bit-position within 32-bit word corresponding to requested bit. * * @param[in] _bit Index of a bit within a bit mask */ #define NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_OFFSET(_bit) \ ((_bit) % NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_BIT_SIZE) /*! * Computes the size of an array of 32-bit words that can store all mask's bits. * * @param[in] _bits Size of the mask in bits. */ #define NV_GPU_BOARDOBJGRP_MASK_DATA_SIZE(_bits) \ (NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_INDEX((_bits) - 1) + 1) /*! * In order to avoid dynamic memory allocation and related code/data waste as * well as two levels of indirection while accessing the data bits are stored * in an array of 32-bit words. In the NV_GPU_BOARDOBJGRP_MASK super-class array's size * should be zero and actual data should be completely stored in childs' arrays. * Since most compilers reject structures with zero-sized arrays first 32-bit * word was moved to the super-class and remining array elements to child class. * Following macros are used to determine size of respective arrays based on the * total number of bits mask should store. * * @param[in] _bits Size of the mask in bits. */ #define NV_GPU_BOARDOBJGRP_MASK_ARRAY_START_SIZE 1 #define NV_GPU_BOARDOBJGRP_MASK_ARRAY_EXTENSION_SIZE(_bits) \ (NV_GPU_BOARDOBJGRP_MASK_DATA_SIZE(_bits) - \ NV_GPU_BOARDOBJGRP_MASK_ARRAY_START_SIZE) /*! * Helper macro allowing simple iteration over bits set in a NV_GPU_BOARDOBJGRP_MASK. * * @note This macro should never be called directly. Please instead use one of * the _E32 or _E255 or _E512 versions below. * * @param[in] maxObjects * Maximum number of objects/bits in BOARDOJBGRP and its BOARDOBJGRP_MASK. * @param[in,out] index * lvalue that is used as a bit index in the loop (can be declared as any * NvU* or NvS* variable) * @param[in] pMask * Pointer to NV_GPU_BOARDOBJGRP_MASK over which to iterate */ #define NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX(_maxObjects,_index,_pMask) \ { \ for (_index = 0; _index < _maxObjects; _index++) \ { \ if (0 == \ (NV_BIT(NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_OFFSET(_index)) & \ ((const NvU32 *)(_pMask)->pData)[NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_INDEX(_index)])) \ { \ continue; \ } #define NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX_END \ } \ } /*! * Helper macro to check if a bit is set within a BOARDOBJGRP_MASK */ #define NV_GPU_BOARDOBJGRP_MASK_BIT_IS_SET(_index,_pMask) \ (0 != (NV_BIT(NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_OFFSET(_index)) & \ ((const NvU32 *)(_pMask)->pData)[NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_INDEX(_index)])) /*! * @brief Macro to set input bit in NV_GPU_BOARDOBJGRP_MASK. * * @param[in] _pMask PBOARDOBJGRPMASK of mask. * @param[in] _bitIdx Index of the target bit within the mask. */ #define NV_GPU_BOARDOBJGRP_MASK_BIT_SET(_pMask, _bitIdx) \ do { \ (_pMask)->pData[ \ NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_INDEX(_bitIdx)] |= \ NVBIT_TYPE( \ NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_OFFSET(_bitIdx), \ NvU32); \ } while (NV_FALSE) /*! * @brief Macro to clear input bit in NV_GPU_BOARDOBJGRP_MASK. * * @param[in] _pMask PBOARDOBJGRPMASK of mask. * @param[in] _bitIdx Index of the target bit within the mask. */ #define NV_GPU_BOARDOBJGRP_MASK_BIT_CLR(_pMask, _bitIdx) \ do { \ (_pMask)->pData[ \ NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_INDEX(_bitIdx)] &= \ ~NVBIT_TYPE( \ NV_GPU_BOARDOBJGRP_MASK_MASK_ELEMENT_OFFSET(_bitIdx), \ NvU32); \ } while (NV_FALSE) /*! * Macro allowing simple iteration over bits set in a * NV_GPU_BOARDOBJGRP_MASK_E32. * * Wrapper to @ref NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX(). * * @copydoc NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX() */ #define NV_GPU_BOARDOBJGRP_MASK_E32_FOR_EACH_INDEX(_index,_pMask) \ NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX( \ NV_GPU_BOARDOBJGRP_E32_MAX_OBJECTS,_index,_pMask) /*! * Macro allowing simple iteration over bits set in a * NV_GPU_BOARDOBJGRP_MASK_E255. * * Wrapper to @ref NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX(). * * @copydoc NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX() */ #define NV_GPU_BOARDOBJGRP_MASK_E255_FOR_EACH_INDEX(_index,_pMask) \ NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX( \ NV_GPU_BOARDOBJGRP_E255_MAX_OBJECTS,_index,_pMask) /*! * Macro allowing simple iteration over bits set in a * NV_GPU_BOARDOBJGRP_MASK_E512. * * Wrapper to @ref NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX(). * * @copydoc NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX() */ #define NV_GPU_BOARDOBJGRP_MASK_E512_FOR_EACH_INDEX(_index,_pMask) \ NV_GPU_BOARDOBJGRP_MASK_FOR_EACH_INDEX( \ NV_GPU_BOARDOBJGRP_E512_MAX_OBJECTS,_index,_pMask) /*! * @brief Not to be called directly. Macro to initialize a * NV_GPU_BOARDOBJGRP_MASK to an empty mask. * * @param[in] _pMask NV_GPU_BOARDOBJGRP_MASK to initialize. * @param[in] _bitSize NvU8 specifying size of the mask in bits. */ #define NV_GPU_BOARDOBJGRP_MASK_INIT(_pMask,_bitSize) \ do { \ NvU8 _dataCount = NV_GPU_BOARDOBJGRP_MASK_DATA_SIZE(_bitSize); \ NvU8 _dataIndex; \ for (_dataIndex = 0; _dataIndex < _dataCount; _dataIndex++) \ { \ ((NvU32 *)(_pMask)->pData)[_dataIndex] = 0U; \ } \ } while (NV_FALSE) /*! * @brief Helper macro to copy E512 mask to E255. * * @param[in] _pMaskE512 E512 mask. * @param[in] _pMaskE255 E255 mask. */ #define NV_GPU_BOARDOBJGRP_MASK_COPY_E512_TO_E255(_pMaskE512, _pMaskE255) \ do { \ NvU8 _dataCount = NV_GPU_BOARDOBJGRP_MASK_DATA_SIZE( \ NV_GPU_BOARDOBJGRP_E255_MAX_OBJECTS); \ NvU8 _dataIndex; \ for (_dataIndex = 0; _dataIndex < _dataCount; _dataIndex++) \ { \ ((NvU32 *)(_pMaskE255)->pData)[_dataIndex] = \ ((const NvU32 *)(_pMaskE512)->pData)[_dataIndex]; \ } \ } while (NV_FALSE) /*! * @brief Macro to initialize NV_GPU_BOARDOBJGRP_MASK_E32 to an empty * mask. * * Wrapper for @ref NV_GPU_BOARDOBJGRP_MASK_INIT(). * * @copydetails NV_GPU_BOARDOBJGRP_MASK_INIT() */ #define NV_GPU_BOARDOBJGRP_MASK_E32_INIT(_pMask) \ NV_GPU_BOARDOBJGRP_MASK_INIT(_pMask, \ NV_GPU_BOARDOBJGRP_E32_MAX_OBJECTS) /*! * @brief Macro to initialize NV_GPU_BOARDOBJGRP_MASK_E255 to an empty * mask. * * Wrapper for @ref NV_GPU_BOARDOBJGRP_MASK_INIT(). * * @copydetails NV_GPU_BOARDOBJGRP_MASK_INIT() */ #define NV_GPU_BOARDOBJGRP_MASK_E255_INIT(_pMask) \ NV_GPU_BOARDOBJGRP_MASK_INIT(_pMask, \ NV_GPU_BOARDOBJGRP_E255_MAX_OBJECTS) /*! * @brief Macro to initialize NV_GPU_BOARDOBJGRP_MASK_E512 to an empty * mask. * * Wrapper for @ref NV_GPU_BOARDOBJGRP_MASK_INIT(). * * @copydetails NV_GPU_BOARDOBJGRP_MASK_INIT() */ #define NV_GPU_BOARDOBJGRP_MASK_E512_INIT(_pMask) \ NV_GPU_BOARDOBJGRP_MASK_INIT(_pMask, \ NV_GPU_BOARDOBJGRP_E512_MAX_OBJECTS) /*! * Board Object Group Mask super-structure. * Used to unify acess to all NV_GPU_BOARDOBJGRP_MASK_E** child classes. */ typedef struct { /*! * Start of the array of 32-bit words representing the bit-mask. * * Must be the last element of the structure. */ NvU32 pData[NV_GPU_BOARDOBJGRP_MASK_ARRAY_START_SIZE]; } NV_GPU_BOARDOBJGRP_MASK; /*! * NV_GPU_BOARDOBJGRP_MASK child class capable of storing 32 bits indexed * between 0..31. */ typedef struct { /*! * NV_GPU_BOARDOBJGRP_MASK super-class. Must be the first element of * the structure. */ NV_GPU_BOARDOBJGRP_MASK super; /*! * Continuation of the array of 32-bit words representing the bit-mask. * * Must be the second element of the structure. * * @note Since all 32-bits are stored within super-class to pacify * compilers we have to artificially comment out this array. */ //NvU32 pDataE32[NV_GPU_BOARDOBJGRP_MASK_ARRAY_EXTENSION_SIZE(NV_GPU_BOARDOBJGRP_E32_MAX_OBJECTS)]; } NV_GPU_BOARDOBJGRP_MASK_E32; /*! * NV_GPU_BOARDOBJGRP_MASK child class capable of storing 255 bits indexed * between 0..254. */ typedef struct { /*! * NV_GPU_BOARDOBJGRP_MASK super-class. Must be the first element of the structure. */ NV_GPU_BOARDOBJGRP_MASK super; /*! * Continuation of the array of 32-bit words representing the bit-mask. * * Must be the second element of the structure. */ NvU32 pDataE255[NV_GPU_BOARDOBJGRP_MASK_ARRAY_EXTENSION_SIZE(NV_GPU_BOARDOBJGRP_E255_MAX_OBJECTS)]; } NV_GPU_BOARDOBJGRP_MASK_E255; /*! * NV_GPU_BOARDOBJGRP_MASK child class capable of storing 512 bits indexed * between 0..511. */ typedef struct { /*! * NV_GPU_BOARDOBJGRP_MASK super-class. Must be the first element of the structure. */ NV_GPU_BOARDOBJGRP_MASK super; /*! * Continuation of the array of 32-bit words representing the bit-mask. * * Must be the second element of the structure. */ NvU32 pDataE512[NV_GPU_BOARDOBJGRP_MASK_ARRAY_EXTENSION_SIZE(NV_GPU_BOARDOBJGRP_E512_MAX_OBJECTS)]; } NV_GPU_BOARDOBJGRP_MASK_E512; //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetDisplayDriverVersion //! \fn NvAPI_GetDisplayDriverVersion(NvDisplayHandle hNvDisplay, NV_DISPLAY_DRIVER_VERSION *pVersion) //! This function returns a struct that describes aspects of the display driver //! build. //! //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_SYS_GetDriverAndBranchVersion. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param [in] hNvDisplay NVIDIA display handle. //! \param [out] pVersion Pointer to NV_DISPLAY_DRIVER_VERSION struc //! //! \retval NVAPI_ERROR //! \retval NVAPI_OK /////////////////////////////////////////////////////////////////////////////// //! \ingroup driverapi //! Used in NvAPI_GetDisplayDriverVersion() typedef struct { NvU32 version; // Structure version NvU32 drvVersion; NvU32 bldChangeListNum; NvAPI_ShortString szBuildBranchString; NvAPI_ShortString szAdapterString; } NV_DISPLAY_DRIVER_VERSION; //! \ingroup driverapi #define NV_DISPLAY_DRIVER_VERSION_VER MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_VERSION,1) //! \ingroup driverapi __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_SYS_GetDriverAndBranchVersion.") NVAPI_INTERFACE NvAPI_GetDisplayDriverVersion(NvDisplayHandle hNvDisplay, NV_DISPLAY_DRIVER_VERSION *pVersion); /////////////////////////////////////////////////////////////////////////////// // // 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). //! //! 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_INTERFACE NvAPI_GPU_GetMemoryInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_DISPLAY_DRIVER_MEMORY_INFO *pMemoryInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetDisplayDriverMemoryInfo // //! This function retrieves the display driver memory information for the active display handle. \n //! In a multi-GPU scenario, the physical framebuffer information is obtained for the GPU associated with active display handle. \n //! In an SLI-mode scenario, the physical framebuffer information is obtained only from the display owner GPU. \n //! //! //! \deprecated Do not use this function - it is deprecated in release 313. Instead, use NvAPI_GPU_GetMemoryInfo. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [out] pMemoryInfo The memory footprint available in the driver. //! //! \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_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \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 313. Instead, use NvAPI_GPU_GetMemoryInfo.") NVAPI_INTERFACE NvAPI_GetDisplayDriverMemoryInfo(NvDisplayHandle hNvDisplay, NV_DISPLAY_DRIVER_MEMORY_INFO *pMemoryInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetDriverMemoryInfo // //! \fn NvAPI_GetDriverMemoryInfo(NvDisplayHandle hNvDisplay, NV_DRIVER_MEMORY_INFO *pMemoryInfo) //! DESCRIPTION: This function retrieves the display driver memory information for the active display handle. //! In case of a multi-GPU scenario the physical framebuffer information is obtained for the GPU //! associated with the active display handle. //! In the case of SLI, the physical framebuffer information is obtained only from the display owner GPU. //! //! \deprecated Do not use this function - it is deprecated in release 313. Instead, use NvAPI_GPU_GetMemoryInfo. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [out] pMemoryInfo The memory footprint available in the driver. //! //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_OK //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND //! \retval ::NVAPI_EXPECTED_DISPLAY_HANDLE //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_DISPLAY_DRIVER_MEMORY_INFO structure version mismatch. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup driverapi //! Driver memory information - used in NvAPI_GetDriverMemoryInfo(). typedef struct { NvU32 version; //!< Version info NvU32 dedicatedVideoMemory; //!< Size(in kb) of the physical framebuffer. 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_DRIVER_MEMORY_INFO; //! \ingroup driverapi //! Used in NV_DRIVER_MEMORY_INFO. #define NV_DRIVER_MEMORY_INFO_VER MAKE_NVAPI_VERSION(NV_DRIVER_MEMORY_INFO,1) //! \ingroup driverapi __nvapi_deprecated_function("Do not use this function - it is deprecated in release 313. Instead, use NvAPI_GPU_GetMemoryInfo.") NVAPI_INTERFACE NvAPI_GetDriverMemoryInfo(NvDisplayHandle hNvDisplay, NV_DRIVER_MEMORY_INFO *pMemoryInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_OGL_ExpertModeSet[Get] // //! \name NvAPI_OGL_ExpertModeSet[Get] Functions //@{ //! This function configures OpenGL Expert Mode, an API usage feedback and //! advice reporting mechanism. The effects of this call are //! applied only to the current context, and are reset to the //! defaults when the context is destroyed. //! //! \note This feature is valid at runtime only when GLExpert //! functionality has been built into the OpenGL driver //! installed on the system. All Windows Vista OpenGL //! drivers provided by NVIDIA have this instrumentation //! included by default. Windows XP, however, requires a //! special display driver available with the NVIDIA //! PerfSDK found at developer.nvidia.com. //! //! \note These functions are valid only for the current OpenGL //! context. Calling these functions prior to creating a //! context and calling MakeCurrent with it will result //! in errors and undefined behavior. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param expertDetailMask Mask made up of NVAPI_OGLEXPERT_DETAIL bits, //! this parameter specifies the detail level in //! the feedback stream. //! //! \param expertReportMask Mask made up of NVAPI_OGLEXPERT_REPORT bits, //! this parameter specifies the areas of //! functional interest. //! //! \param expertOutputMask Mask made up of NVAPI_OGLEXPERT_OUTPUT bits, //! this parameter specifies the feedback output //! location. //! //! \param expertCallback Used in conjunction with OUTPUT_TO_CALLBACK, //! this is a simple callback function the user //! may use to obtain the feedback stream. The //! function will be called once per fully //! qualified feedback stream extry. //! //! \retval NVAPI_API_NOT_INTIALIZED NVAPI not initialized //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU found //! \retval NVAPI_OPENGL_CONTEXT_NOT_CURRENT No NVIDIA OpenGL context //! which supports GLExpert //! has been made current //! \retval NVAPI_ERROR OpenGL driver failed to load properly //! \retval NVAPI_OK Success // /////////////////////////////////////////////////////////////////////////////// //! \addtogroup oglapi //! @{ #define NVAPI_OGLEXPERT_DETAIL_NONE 0x00000000 #define NVAPI_OGLEXPERT_DETAIL_ERROR 0x00000001 #define NVAPI_OGLEXPERT_DETAIL_SWFALLBACK 0x00000002 #define NVAPI_OGLEXPERT_DETAIL_BASIC_INFO 0x00000004 #define NVAPI_OGLEXPERT_DETAIL_DETAILED_INFO 0x00000008 #define NVAPI_OGLEXPERT_DETAIL_PERFORMANCE_WARNING 0x00000010 #define NVAPI_OGLEXPERT_DETAIL_QUALITY_WARNING 0x00000020 #define NVAPI_OGLEXPERT_DETAIL_USAGE_WARNING 0x00000040 #define NVAPI_OGLEXPERT_DETAIL_ALL 0xFFFFFFFF #define NVAPI_OGLEXPERT_REPORT_NONE 0x00000000 #define NVAPI_OGLEXPERT_REPORT_ERROR 0x00000001 #define NVAPI_OGLEXPERT_REPORT_SWFALLBACK 0x00000002 #define NVAPI_OGLEXPERT_REPORT_PIPELINE_VERTEX 0x00000004 #define NVAPI_OGLEXPERT_REPORT_PIPELINE_GEOMETRY 0x00000008 #define NVAPI_OGLEXPERT_REPORT_PIPELINE_XFB 0x00000010 #define NVAPI_OGLEXPERT_REPORT_PIPELINE_RASTER 0x00000020 #define NVAPI_OGLEXPERT_REPORT_PIPELINE_FRAGMENT 0x00000040 #define NVAPI_OGLEXPERT_REPORT_PIPELINE_ROP 0x00000080 #define NVAPI_OGLEXPERT_REPORT_PIPELINE_FRAMEBUFFER 0x00000100 #define NVAPI_OGLEXPERT_REPORT_PIPELINE_PIXEL 0x00000200 #define NVAPI_OGLEXPERT_REPORT_PIPELINE_TEXTURE 0x00000400 #define NVAPI_OGLEXPERT_REPORT_OBJECT_BUFFEROBJECT 0x00000800 #define NVAPI_OGLEXPERT_REPORT_OBJECT_TEXTURE 0x00001000 #define NVAPI_OGLEXPERT_REPORT_OBJECT_PROGRAM 0x00002000 #define NVAPI_OGLEXPERT_REPORT_OBJECT_FBO 0x00004000 #define NVAPI_OGLEXPERT_REPORT_FEATURE_SLI 0x00008000 #define NVAPI_OGLEXPERT_REPORT_ALL 0xFFFFFFFF #define NVAPI_OGLEXPERT_OUTPUT_TO_NONE 0x00000000 #define NVAPI_OGLEXPERT_OUTPUT_TO_CONSOLE 0x00000001 #define NVAPI_OGLEXPERT_OUTPUT_TO_DEBUGGER 0x00000004 #define NVAPI_OGLEXPERT_OUTPUT_TO_CALLBACK 0x00000008 #define NVAPI_OGLEXPERT_OUTPUT_TO_ALL 0xFFFFFFFF //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION TYPE: NVAPI_OGLEXPERT_CALLBACK // //! DESCRIPTION: Used in conjunction with OUTPUT_TO_CALLBACK, this is a simple //! callback function the user may use to obtain the feedback //! stream. The function will be called once per fully qualified //! feedback stream entry. //! //! \param categoryId Contains the bit from the NVAPI_OGLEXPERT_REPORT //! mask that corresponds to the current message //! \param messageId Unique ID for the current message //! \param detailLevel Contains the bit from the NVAPI_OGLEXPERT_DETAIL //! mask that corresponds to the current message //! \param objectId Unique ID of the object that corresponds to the //! current message //! \param messageStr Text string from the current message //! //! \ingroup oglapi /////////////////////////////////////////////////////////////////////////////// typedef void (* NVAPI_OGLEXPERT_CALLBACK) (unsigned int categoryId, unsigned int messageId, unsigned int detailLevel, int objectId, const char *messageStr); //! \ingroup oglapi //! SUPPORTED OS: Windows 7 and higher //! NVAPI_INTERFACE NvAPI_OGL_ExpertModeSet(NvU32 expertDetailLevel, NvU32 expertReportMask, NvU32 expertOutputMask, NVAPI_OGLEXPERT_CALLBACK expertCallback); //! \addtogroup oglapi //! SUPPORTED OS: Windows 7 and higher //! NVAPI_INTERFACE NvAPI_OGL_ExpertModeGet(NvU32 *pExpertDetailLevel, NvU32 *pExpertReportMask, NvU32 *pExpertOutputMask, NVAPI_OGLEXPERT_CALLBACK *pExpertCallback); //@} /////////////////////////////////////////////////////////////////////////////// // //! \name NvAPI_OGL_ExpertModeDefaultsSet[Get] Functions //! //@{ //! This function configures OpenGL Expert Mode global defaults. These settings //! apply to any OpenGL application which starts up after these //! values are applied (i.e. these settings *do not* apply to //! currently running applications). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param expertDetailLevel Value which specifies the detail level in //! the feedback stream. This is a mask made up //! of NVAPI_OGLEXPERT_LEVEL bits. //! //! \param expertReportMask Mask made up of NVAPI_OGLEXPERT_REPORT bits, //! this parameter specifies the areas of //! functional interest. //! //! \param expertOutputMask Mask made up of NVAPI_OGLEXPERT_OUTPUT bits, //! this parameter specifies the feedback output //! location. Note that using OUTPUT_TO_CALLBACK //! here is meaningless and has no effect, but //! using it will not cause an error. //! //! \return ::NVAPI_ERROR or ::NVAPI_OK // /////////////////////////////////////////////////////////////////////////////// //! \ingroup oglapi //! SUPPORTED OS: Windows 7 and higher //! NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsSet(NvU32 expertDetailLevel, NvU32 expertReportMask, NvU32 expertOutputMask); //! \addtogroup oglapi //! SUPPORTED OS: Windows 7 and higher //! NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsGet(NvU32 *pExpertDetailLevel, NvU32 *pExpertReportMask, NvU32 *pExpertOutputMask); //@} // 3D profile for one key cinema feature //! \addtogroup appprofileapi //! @{ //! See NV_3D_SETTING_RANGE. #define NV_3D_MAX_RANGE 25 //! 3D property names used in NV_3D_SETTING and NV_3D_SETTING_RANGE typedef enum { NV_3D_PROPERTY_AS = 1, //!< Anti-Aliasing selector NV_3D_PROPERTY_AA = 2, //!< Anti-Aliasing setting NV_3D_PROPERTY_AF = 3, //!< Anisotropic filtering NV_3D_PROPERTY_MAX_FRAMES = 4, //!< Maximum pre-rendered frames NV_3D_PROPERTY_TEX_FILTER = 5, //!< Texture filtering } NV_3D_PROPERTY; //! Used in NvAPI_3D_GetProperty() and NvAPI_3D_SetProperty(). typedef struct { NvU32 version; //!< [in] Structure version NV_3D_PROPERTY settingName; //!< [in] 3D setting NvU32 flags; //!< [out] Indicates whether the settings are read only NvU32 defaultValue; //!< [out] Default base value at driver install NvU32 currentValue; //!< [in/out] Current value or new value to update } NV_3D_SETTING; //! Used in NvAPI_3D_GetPropertyRange(). typedef struct { NvU32 version; //!< [in] Structure version NV_3D_PROPERTY settingName; //!< [in] 3D setting NvU32 value[NV_3D_MAX_RANGE]; //!< [out] Range of values as unique array of numbers NvU32 validRangeCount; //!< [out] Number of valid items in the property } NV_3D_SETTING_RANGE; //! Macro for constructing the version field of NV_3D_SETTING #define NV_3D_PROFILE_VERSION MAKE_NVAPI_VERSION(NV_3D_SETTING,1) //! Macro for constructing the version field of NV_3D_SETTING_RANGE #define NV_3D_PROFILE_RANGE_VERSION MAKE_NVAPI_VERSION(NV_3D_SETTING_RANGE,1) //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_3D_GetProperty // //! DESCRIPTION: This API gets the specific 3D profile property. \n //! HOW TO USE: //! -# Set profileName to "Base Profile" //! -# Set 3D property name to settingName of NV_3D_SETTING //! -# On call success: It returns the specific profile property setting //! //! \param [in] profileName Which profile to access //! \param [in,out] p3dSettings Setting of the 3D profile property //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! //! \ingroup appprofileapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_3D_GetProperty(NvAPI_ShortString szProfileName, NV_3D_SETTING* p3dSetting); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_3D_SetProperty // //! DESCRIPTION: This API sets the specific 3D profile property. \n //! HOW TO USE: //! -# Set profileName to "Base Profile" //! -# Set 3D property name to settingName of NV_3D_SETTING //! -# On call success: It returns the specific profile property setting //! //! \param [in] profileName Which profile to access //! \param [in,out] p3dSettings Setting of the 3D profile property //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! //! \ingroup appprofileapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_3D_SetProperty(NvAPI_ShortString szProfileName, NV_3D_SETTING* p3dSetting); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_3D_GetPropertyRange // //! DESCRIPTION: This API gets the specific 3D profile property setting range. \n //! HOW TO USE: -# Set profileName to "Base Profile". //! -# Set 3D property name to settingName of NV_3D_SETTING_RANGE. //! -# On call success: It returns the specific profile property setting. //! //! \param [in] profileName Which profile to access //! \param [in,out] p3dSettingRange Setting range of the 3D profile property //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! //! \ingroup appprofileapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_3D_GetPropertyRange(NvAPI_ShortString szProfileName, NV_3D_SETTING_RANGE* p3dsettingRange); //! \addtogroup gpupower //! @{ /*! * Enumeration of Power Topology Channels. Unique identifiers for different * power topology channels of the GPU. */ typedef enum { NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_ID_TOTAL_GPU_POWER, NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_ID_NORMALIZED_TOTAL_POWER, } NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_ID; #define NV_GPU_CLIENT_POWER_CHANNEL_NUM_CHANNELS_V1 4 /*! * Used in \ref NV_GPU_CLIENT_POWER_TOPOLOGY_INFO_V1. */ typedef struct { /*! * Topology Channel ID. Unique identifier for a channel. */ NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_ID channelId; } NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_INFO_V1; /*! * Used in \ref NvAPI_GPU_ClientPowerTopologyGetInfo(). * * Describes the power topology of the GPU, including the set of channels * which are monitored. */ typedef struct { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Indicates that this GPU supports Client Power Topology Interfaces. */ NvU8 bSupported; /*! * Number of channels this GPU supports. */ NvU8 numChannels; /*! * Array of static information for each Power Topology Channel. This array * has a valid index ranging from 0 to numChannels - 1. */ NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_INFO_V1 channels[NV_GPU_CLIENT_POWER_CHANNEL_NUM_CHANNELS_V1]; } NV_GPU_CLIENT_POWER_TOPOLOGY_INFO_V1; #define NV_GPU_CLIENT_POWER_TOPOLOGY_INFO_VER_1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_POWER_TOPOLOGY_INFO_V1,1) #define NV_GPU_CLIENT_POWER_TOPOLOGY_INFO_VER NV_GPU_CLIENT_POWER_TOPOLOGY_INFO_VER_1 #define NV_GPU_CLIENT_POWER_TOPOLOGY_INFO NV_GPU_CLIENT_POWER_TOPOLOGY_INFO_V1 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientPowerTopologyGetInfo // //! DESCRIPTION: Accessor for static information describing the public GPU //! power topology and capabilities. //! //! Describes the power topology on the GPU, including the set of //! channels which are monitored and regularity with which they are //! monitored. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 295 //! //! \param [in] hPhysicalGPU GPU selection //! \param [out] pClientPowerTopologyInfo Structure containing the description //! of the GPU power topology and capabilities //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpupower /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientPowerTopologyGetInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_CLIENT_POWER_TOPOLOGY_INFO *pClientPowerTopologyInfo); //! \addtogroup gpupower //! @{ /*! * Used in \ref NV_GPU_CLIENT_POWER_TOPOLOGY_STATUS_V1. */ typedef struct { /*! * Topology Channel ID. Unique identifier for a channel. Client will * specify this value if querying only certain channels. */ NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_ID channelId; /*! * Latest power reading on specified channel. */ NV_GPU_CLIENT_POWER_READING_V1 power; } NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_STATUS_V1; /*! * Used in \ref NvAPI_GPU_ClientPowerTopologyGetStatus(). * * Retrieves the latest power readings (and other dynamic status) for a set of * topology channels. */ typedef struct { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Number of channels this GPU supports. Caller sets this value to 0 to * specify that all supported channels should be queried. */ NvU8 numChannels; /*! * Array of latest power readings (and other status) for each specified Power * Topology Channel. Array has a valid index ranging form 0 to numChannels - 1. */ NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_STATUS_V1 channels[NV_GPU_CLIENT_POWER_CHANNEL_NUM_CHANNELS_V1]; } NV_GPU_CLIENT_POWER_TOPOLOGY_STATUS_V1; #define NV_GPU_CLIENT_POWER_TOPOLOGY_STATUS_VER_1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_POWER_TOPOLOGY_STATUS_V1,1) #define NV_GPU_CLIENT_POWER_TOPOLOGY_STATUS_VER NV_GPU_CLIENT_POWER_TOPOLOGY_STATUS_VER_1 #define NV_GPU_CLIENT_POWER_TOPOLOGY_STATUS NV_GPU_CLIENT_POWER_TOPOLOGY_STATUS_V1 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientPowerTopologyGetStatus // //! DESCRIPTION: Accessor for the public GPU power topology readings. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 295 //! //! \param [in] hPhysicalGPU GPU selection //! \param [inout] pClientPowerTopologyStatus Structure containing GPU power //! topology readings. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpupower /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientPowerTopologyGetStatus(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_CLIENT_POWER_TOPOLOGY_STATUS *pClientPowerTopologyStatus); //! \addtogroup gpupower //! @{ /*! * Enumeration of Power Policies. Unique identifiers for different Power * Policies being enforced on the GPU. */ typedef enum { NV_GPU_CLIENT_POWER_POLICIES_POLICY_TOTAL_GPU_POWER, } NV_GPU_CLIENT_POWER_POLICIES_POLICY_ID; /*! * Enumeration of Power Policy class types. Unique class identifiers for * different Power Policies being enforced on the GPU. */ typedef enum { NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_BASE, NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_PFF, } NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS; /*! * Info specific to NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_PFF. */ typedef struct { /*! * System default parameters for the Piecewise Frequency Flooring curve. */ NV_GPU_CLIENT_PFF_CURVE_V1 curve; } NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_INFO_PFF_V1; /*! * Class specific data. Applies to all class types other than * NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_BASE. */ typedef union { /*! * Info specific to NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_PFF. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_INFO_PFF_V1 pff; /*! * Reserved for future use */ NvU8 rsvd[256]; } NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_INFO_UNION_V1; #define NV_GPU_CLIENT_POWER_POLICIES_NUM_POLICIES_V1 4 #define NV_GPU_CLIENT_POWER_POLICIES_NUM_POLICIES_V2 NV_GPU_CLIENT_POWER_POLICIES_NUM_POLICIES_V1 /*! * Used in \ref NV_GPU_CLIENT_POWER_POLICIES_INFO_V1. */ typedef struct { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_ID policyId; /*! * Topology channel ID this policy is controlling. */ NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_ID channelId; /*! * Minimum allowed power policy limit. */ NV_GPU_CLIENT_POWER_READING_V1 powerLimitMin; /*! * Default power policy limit. */ NV_GPU_CLIENT_POWER_READING_V1 powerLimitDefault; /*! * Maximum allowed power policy limit. */ NV_GPU_CLIENT_POWER_READING_V1 powerLimitMax; } NV_GPU_CLIENT_POWER_POLICIES_POLICY_INFO_V1; /*! * Used in \ref NV_GPU_CLIENT_POWER_POLICIES_INFO_V2. */ typedef struct { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_ID policyId; /*! * Policy Class type. Used to discern use of info union below. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS policyClass; /*! * Topology channel ID this policy is controlling. */ NV_GPU_CLIENT_POWER_TOPOLOGY_CHANNEL_ID channelId; /*! * Minimum allowed power policy limit. */ NV_GPU_CLIENT_POWER_READING_V1 powerLimitMin; /*! * Default power policy limit. */ NV_GPU_CLIENT_POWER_READING_V1 powerLimitDefault; /*! * Maximum allowed power policy limit. */ NV_GPU_CLIENT_POWER_READING_V1 powerLimitMax; /*! * Reserved for future use */ NvU8 rsvd[256]; /*! * Class specific info. Applies to all class types other than * NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_BASE. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_INFO_UNION_V1 classInfo; } NV_GPU_CLIENT_POWER_POLICIES_POLICY_INFO_V2; /*! * Used in \ref NV_GPU_CLIENT_POWER_POLICIES_INFO_V1. * * Describes the set of Power Policies which are controlling GPU power * consumption. */ typedef struct { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Indicates that this GPU supports Client Power Policy Interfaces. */ NvU8 bSupported; /*! * Number of Power Policies this GPU supports. */ NvU8 numPolicies; /*! * Array of static information for each Power Policy. Array has a valid * index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_INFO_V1 policies[NV_GPU_CLIENT_POWER_POLICIES_NUM_POLICIES_V1]; } NV_GPU_CLIENT_POWER_POLICIES_INFO_V1; /*! * Used in \ref NV_GPU_CLIENT_POWER_POLICIES_INFO_V2. * * Describes the set of Power Policies which are controlling GPU power * consumption. */ typedef struct { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Indicates that this GPU supports Client Power Policy Interfaces. */ NvU8 bSupported; /*! * Number of Power Policies this GPU supports. */ NvU8 numPolicies; /*! * Array of static information for each Power Policy. Array has a valid * index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_INFO_V2 policies[NV_GPU_CLIENT_POWER_POLICIES_NUM_POLICIES_V2]; } NV_GPU_CLIENT_POWER_POLICIES_INFO_V2; #define NV_GPU_CLIENT_POWER_POLICIES_INFO_VER_1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_POWER_POLICIES_INFO_V1,1) #define NV_GPU_CLIENT_POWER_POLICIES_INFO_VER_2 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_POWER_POLICIES_INFO_V2,2) #define NV_GPU_CLIENT_POWER_POLICIES_INFO_VER NV_GPU_CLIENT_POWER_POLICIES_INFO_VER_2 #define NV_GPU_CLIENT_POWER_POLICIES_INFO NV_GPU_CLIENT_POWER_POLICIES_INFO_V2 #define NV_GPU_CLIENT_POWER_POLICIES_POLICY_INFO NV_GPU_CLIENT_POWER_POLICIES_POLICY_INFO_V2 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientPowerPoliciesGetInfo // //! DESCRIPTION: Accessor for static information describing the public GPU //! power policies which are controlling GPU power consumption. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 295 //! //! \param [in] hPhysicalGPU GPU selection //! \param [out] pClientPowerPoliciesInfo Structure containing the description //! of the GPU power policies. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpupower /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientPowerPoliciesGetInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_CLIENT_POWER_POLICIES_INFO *pClientPowerPoliciesInfo); //! \addtogroup gpupower //! @{ /*! * Status specific to NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_PFF. */ typedef struct { /*! * [in] To be set if `curve` below has been modified * between getStatus and setStatus. Following a getStatus, * this field will always be NV_FALSE. */ NvBool bPffCurveChanged; /*! * [in/out] Current state of the Piecewise Frequency Flooring curve. * Can be modified during setStatus (must set bPffCurveChanged). */ NV_GPU_CLIENT_PFF_CURVE_V1 curve; /*! * [out] Parts of 'curve' above that will change at runtime with overclocking. * Represents base curve frequencies (+/-) vf-curve offsetting at given frequencies. */ NV_GPU_CLIENT_PFF_CURVE_STATUS_V1 curveRuntimeStatus; } NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_STATUS_PFF_V1; /*! * Class specific status. Applies to all class types other than * NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_BASE. */ typedef union { /*! * Status specific to NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_PFF. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_STATUS_PFF_V1 pff; /*! * Reserved for future use */ NvU8 rsvd[256]; } NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_STATUS_UNION_V1; /*! * Used in \ref NV_GPU_CLIENT_POWER_POLICIES_STATUS_V1. */ typedef struct { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_ID policyId; /*! * Current power policy limit. */ NV_GPU_CLIENT_POWER_READING_V1 powerLimit; } NV_GPU_CLIENT_POWER_POLICIES_POLICY_STATUS_V1; /*! * Used in \ref NV_GPU_CLIENT_POWER_POLICIES_STATUS_V2. */ typedef struct { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_ID policyId; /*! * Policy Class type. Used to discern use of status union below. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS policyClass; /*! * Current power policy limit. */ NV_GPU_CLIENT_POWER_READING_V1 powerLimit; /*! * Reserved for future use */ NvU8 rsvd[64]; /*! * Class specific status. Applies to all class types other than * NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_BASE. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_CLASS_STATUS_UNION_V1 classStatus; } NV_GPU_CLIENT_POWER_POLICIES_POLICY_STATUS_V2; /*! * Used in \ref NV_GPU_CLIENT_POWER_POLICIES_STATUS_V1. * * Describes/specifies the current settings of a set of Power Policies which are * controlling GPU power consumption. */ typedef struct { NvU32 version; /*! * Number of Power Policies specified in the policies array. Caller sets * this value to 0 to specify that all policies should be queried. */ NvU8 numPolicies; /*! * Array of current settings for each specified Power Policy. This array * has a valid index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_STATUS_V1 policies[NV_GPU_CLIENT_POWER_POLICIES_NUM_POLICIES_V1]; } NV_GPU_CLIENT_POWER_POLICIES_STATUS_V1; /*! * Used in \ref NV_GPU_CLIENT_POWER_POLICIES_STATUS_V2. * * Describes/specifies the current settings of a set of Power Policies which are * controlling GPU power consumption. */ typedef struct { NvU32 version; /*! * Number of Power Policies specified in the policies array. Caller sets * this value to 0 to specify that all policies should be queried. */ NvU8 numPolicies; /*! * Array of current settings for each specified Power Policy. This array * has a valid index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_POWER_POLICIES_POLICY_STATUS_V2 policies[NV_GPU_CLIENT_POWER_POLICIES_NUM_POLICIES_V2]; } NV_GPU_CLIENT_POWER_POLICIES_STATUS_V2; #define NV_GPU_CLIENT_POWER_POLICIES_STATUS_VER_1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_POWER_POLICIES_STATUS_V1,1) #define NV_GPU_CLIENT_POWER_POLICIES_STATUS_VER_2 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_POWER_POLICIES_STATUS_V2,2) #define NV_GPU_CLIENT_POWER_POLICIES_STATUS_VER NV_GPU_CLIENT_POWER_POLICIES_STATUS_VER_2 #define NV_GPU_CLIENT_POWER_POLICIES_STATUS NV_GPU_CLIENT_POWER_POLICIES_STATUS_V2 #define NV_GPU_CLIENT_POWER_POLICIES_POLICY_STATUS NV_GPU_CLIENT_POWER_POLICIES_POLICY_STATUS_V2 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientPowerPoliciesGetStatus // //! DESCRIPTION: Accessor for current state of the public GPU power //! policies which are controlling GPU power consumption. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 295 //! //! \param [in] hPhysicalGPU GPU selection //! \param [out] pClientPowerPoliciesStatus Structure containing the current //! state of a set of GPU power policies. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpupower /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientPowerPoliciesGetStatus(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_CLIENT_POWER_POLICIES_STATUS *pClientPowerPoliciesStatus); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientPowerPoliciesSetStatus // //! DESCRIPTION: Mutator for state of the public GPU power policies which //! are controlling GPU power consumption. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 295 //! //! \requires Administrator privileges since release 430.39 //! //! \param [in] hPhysicalGPU GPU selection //! \param [out] pClientPowerPoliciesStatus Structure containing the requested //! state of a set of GPU power policies. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - 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". //! //! \ingroup gpupower /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientPowerPoliciesSetStatus(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_POWER_POLICIES_STATUS *pClientPowerPoliciesStatus); /////////////////////////////////////////////////////////////////////////////// // POWERMIZER APIs // // Provides the ability to Limit PowerMizer's Maximum Performance. // Grants access on Adaptive Clocking turn on and off. // PowerMizer can be either Soft Limited or Hard Limited. // Soft Limit can be exceeded by the adaptive systems in the GPU if there is a need. // Hard Limit cannot be exceeded even if there is a need to exceed this limit. // ////////////////////////////////////////////////////////////////////////////// //! \ingroup powermizerapi //! Used in NvAPI_GPU_GetPowerMizerInfo() and NvAPI_GPU_GetPowerMizerInfo() typedef enum _NV_LEVEL_INFO { NVAPI_PWR_MZR_HARD_LIMIT_MAX = 0x00000001, //!< Power Mizer Maximum Performance for Hard limit NVAPI_PWR_MZR_HARD_LIMIT_BAL = 0x00000002, //!< Power Mizer Balanced Performance for Hard limit NVAPI_PWR_MZR_MAX_BATT = 0x00000003, //!< Power Mizer Maximum Battery Performance NVAPI_PWR_MZR_SOFT_LIMIT_MAX = 0x00000004, //!< Power mizer Maximum performance for Soft limit NVAPI_PWR_MZR_SOFT_LIMIT_BAL = 0x00000005, //!< Power mizer Balanced performance for Soft limit NVAPI_ADC_OFF = 0x00000006, //!< Adaptive Clocking Disable NVAPI_ADC_ON = 0x00000007, //!< Adaptive Clocking Enable } NV_LEVEL_INFO; //! \ingroup powermizerapi //! Used in NvAPI_GPU_GetPowerMizerInfo() and NvAPI_GPU_GetPowerMizerInfo() typedef enum _NV_PWR_SOURCE_INFO { NVAPI_PWR_SOURCE_AC = 0x00000001, //!< Power source AC NVAPI_PWR_SOURCE_BATT = 0x00000002, //!< Power source Battery } NV_PWR_SOURCE_INFO; //! \ingroup powermizerapi //! Used in NvAPI_GPU_GetPowerMizerInfo() and NvAPI_GPU_GetPowerMizerInfo() typedef enum _NV_SELECT_INFO { NVAPI_INDEX_PWR_MZR_HARD = 0x00000001, //!< To set/get PowerMizer Hard limits. Hard Limits modifies the hardware limits. NVAPI_INDEX_PWR_MZR_SOFT = 0x00000002, //!< To set/get PowerMizer Soft limits. Soft Limits sets the application preference and could be exceeded upto Hard limits if required by the system. NVAPI_INDEX_ADC = 0x00000003, //!< To set/get Adaptive Clocking parameters where the driver automatically selects the limits. } NV_SELECT_INFO; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_GetPowerMizerInfo // //! This function gets //! - the PowerMizer Maximum Limit for both Battery or AC //! - the Adaptive Clocking status for Battery or AC //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 100 //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in] powerSourceInfo Power source selection with one of the values from ::NV_PWR_SOURCE_INFO. //! \param [in] select PowerMizer type selection with one of the values from ::NV_SELECT_INFO. //! \param [out] pLevelInfo Pointer to return value //! //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_NOT_SUPPORTED Power Mizer Not supported. //! \retval NVAPI_ERROR Invalid return to API. //! \ingroup powermizerapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPowerMizerInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_PWR_SOURCE_INFO powerSourceInfo, NV_SELECT_INFO select, NV_LEVEL_INFO *pLevelInfo); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_SetPowerMizerInfo // //! This function sets //! - the PowerMizer Maximum Limit for both Battery and/or AC //! - the Adaptive Clocking status for Battery or AC //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 100 //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGpu GPU selection. //! \param [in] powerSourceInfo Power source selection with one of the values from ::NV_PWR_SOURCE_INFO. //! \param [in] select PowerMizer type selection with one of the values from ::NV_SELECT_INFO. //! \param [out] levelInfo Level that has to be set on PwrMzr /Adaptive clocking //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_NOT_SUPPORTED PowerMizer not supported //! \retval NVAPI_INVALID_ARGUMENT Invalid arguments //! //! \ingroup powermizerapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetPowerMizerInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_PWR_SOURCE_INFO powerSourceInfo, NV_SELECT_INFO select, NV_LEVEL_INFO levelInfo); //!< PG group enums typedef enum _NV_GPU_LPWR_PG_FEATURE_ID { NV_GPU_LPWR_PG_FEATURE_ID_GR = 0, NV_GPU_LPWR_PG_FEATURE_ID_MS, NV_GPU_LPWR_PG_FEATURE_ID_DI, NV_GPU_LPWR_PG_FEATURE_ID_GR_RG, NV_GPU_LPWR_PG_FEATURE_ID_EI, NV_GPU_LPWR_PG_FEATURE_ID_GR_PASSIVE, NV_GPU_LPWR_PG_FEATURE_ID_MS_PASSIVE, NV_GPU_LPWR_PG_FEATURE_ID_EI_PASSIVE, //!version - Define NV_GPU_LPWR_PG_SUPPORT_PARAM structure version //! pGpuLpwrPgSupportExt->ctrlId - Define PG-ENG feature ID. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 455 //! //! \param [in] hPhysicalGpu - Physical GPU Handle. //! \param [inout] pGpuLpwrPgSupportExt - Pointer to the NV_GPU_LPWR_PG_SUPPORT_EXT structure //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! NVAPI_INVALID_ARGUMENT : Incorrect Ctrl ID selected /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_LpwrPgGetSupportExt(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_LPWR_PG_SUPPORT_EXT *pGpuLpwrPgSupportExt); //!< API for Getting statistics for PgCtrl features. ////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_LpwrPgGetStatisticsExt //! //! DESCRIPTION: This API call is used to get the PgCtrl based features statistics from driver. //! If call succeeds, the statistics are contained in NV_GPU_LPWR_PG_STATISTICS structure. //! //! NVAPI USAGE : //! Before calling NvAPI, following MUST be populated : //! pGpuLpwrPgStatisticsExt->version - Define NV_GPU_LPWR_PG_STATISTICS structure version //! pGpuLpwrPgStatisticsExt->ctrlId - Define PgCtrl feature ID. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 455 //! //! \param [in] hPhysicalGpu - Physical GPU Handle. //! \param [inout] pGpuLpwrPgStatisticsExt - Pointer to the NV_GPU_LPWR_PG_STATISTICS_EXT structure //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! NVAPI_INVALID_ARGUMENT : Incorrect Ctrl ID selected /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_LpwrPgGetStatisticsExt(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_LPWR_PG_STATISTICS_EXT *pGpuLpwrPgStatisticsExt); // ****** END - LPWR: PG Group NDA ******// // ****** START - LPWR: PG Group Private ******// /////////////////////////////////////////////////////////////////////////////// // // 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); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_EnumTCCPhysicalGPUs // //! This function returns an array of physical GPU handles that are in TCC Mode. //! Each handle represents a physical GPU present in the system in TCC Mode. //! That GPU may not be visible to the OS directly. //! //! The array nvGPUHandle will be filled with physical GPU handle values. The returned //! gpuCount determines how many entries in the array are valid. //! //! NOTE: Handles enumerated by this API are only valid for NvAPIs that are tagged as TCC_SUPPORTED //! If handle is passed to any other API, it will fail with NVAPI_INVALID_HANDLE //! //! For WDDM GPU handles please use NvAPI_EnumPhysicalGPUs() //! //! SUPPORTED OS: Windows 7 and higher //! //! //! //! \param [out] nvGPUHandle Physical GPU array that will contain all TCC Physical GPUs //! \param [out] pGpuCount count represent the number of valid entries in nvGPUHandle //! //! //! \retval NVAPI_INVALID_ARGUMENT nvGPUHandle or pGpuCount is NULL //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_EnumTCCPhysicalGPUs( NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_EnumLogicalGPUs // //! This function returns an array of logical GPU handles. //! //! Each handle represents one or more GPUs acting in concert as a single graphics device. //! //! At least one GPU must be present in the system and running an NVIDIA display driver. //! //! The array nvGPUHandle will be filled with logical GPU handle values. The returned //! gpuCount determines how many entries in the array are valid. //! //! \note All logical GPUs handles get invalidated on a GPU topology change, so the calling //! application is required to renum the logical GPU handles to get latest physical handle //! mapping after every GPU topology change activated by a call to NvAPI_SetGpuTopologies(). //! //! To detect if SLI rendering is enabled, use NvAPI_D3D_GetCurrentSLIState(). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \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_EnumLogicalGPUs(NvLogicalGpuHandle nvGPUHandle[NVAPI_MAX_LOGICAL_GPUS], NvU32 *pGpuCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetPhysicalGPUsFromDisplay // //! This function returns an array of physical GPU handles associated with the specified display. //! //! 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. //! //! If the display corresponds to more than one physical GPU, the first GPU returned //! is the one with the attached active output. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \retval NVAPI_INVALID_ARGUMENT hNvDisp is not valid; 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_GetPhysicalGPUsFromDisplay(NvDisplayHandle hNvDisp, NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetPhysicalGPUFromUnAttachedDisplay // //! This function returns a physical GPU handle associated with the specified unattached display. //! The source GPU is a physical render GPU which renders the frame buffer but may or may not drive the scan out. //! //! At least one GPU must be present in the system and running an NVIDIA display driver. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \retval NVAPI_INVALID_ARGUMENT hNvUnAttachedDisp is not valid or pPhysicalGpu 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_GetPhysicalGPUFromUnAttachedDisplay(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvPhysicalGpuHandle *pPhysicalGpu); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetLogicalGPUFromDisplay // //! This function returns the logical GPU handle associated with the specified display. //! At least one GPU must be present in the system and running an NVIDIA display driver. //! hNvDisp can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \retval NVAPI_INVALID_ARGUMENT hNvDisp is not valid; pLogicalGPU 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_GetLogicalGPUFromDisplay(NvDisplayHandle hNvDisp, NvLogicalGpuHandle *pLogicalGPU); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetLogicalGPUFromPhysicalGPU // //! This function returns the logical GPU handle associated with specified physical GPU handle. //! At least one GPU must be present in the system and running an NVIDIA display driver. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGPU is not valid; pLogicalGPU 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_GetLogicalGPUFromPhysicalGPU(NvPhysicalGpuHandle hPhysicalGPU, NvLogicalGpuHandle *pLogicalGPU); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetPhysicalGPUsFromLogicalGPU // //! This function returns the physical GPU handles associated with the specified logical GPU handle. //! At least one GPU must be present in the system and running an NVIDIA display driver. //! //! The array hPhysicalGPU will be filled with physical GPU handle values. The returned //! gpuCount determines how many entries in the array are valid. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \retval NVAPI_INVALID_ARGUMENT hLogicalGPU is not valid; hPhysicalGPU 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 //! \retval NVAPI_EXPECTED_LOGICAL_GPU_HANDLE hLogicalGPU was not a logical GPU handle //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetPhysicalGPUsFromLogicalGPU(NvLogicalGpuHandle hLogicalGPU,NvPhysicalGpuHandle hPhysicalGPU[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetPhysicalGPUFromGPUID // //! Do not use this function for new software development. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 80 //! //! \retval NVAPI_INVALID_ARGUMENT gpuId is zero or pPhysicalGPU is NULL //! \retval NVAPI_OK Handle was returned //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetPhysicalGPUFromGPUID(NvU32 gpuId, NvPhysicalGpuHandle *pPhysicalGPU); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetGPUIDfromPhysicalGPU // //! Do not use this function for new software development. // //! SUPPORTED OS: Windows 10 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 95 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu is NULL or invalid. Re-enumerate the GPU handles. //! \retval NVAPI_OK Handle was returned //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetGPUIDfromPhysicalGPU(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pGpuId); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetShaderPipeCount // //! This function retrieves the number of Shader Pipes on the GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 80 //! //! \retval NVAPI_INVALID_ARGUMENT pCount is NULL. //! \retval NVAPI_OK *pCount is set. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetShaderPipeCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetShaderSubPipeCount // //! DESCRIPTION: This function retrieves the number of Shader SubPipes on the GPU //! On newer architectures, this corresponds to the number of SM units //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 170 //! //! RETURN STATUS: NVAPI_INVALID_ARGUMENT: pCount is NULL //! NVAPI_OK: *pCount is set //! NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found //! NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetShaderSubPipeCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPartitionCount // //! This function retrieves the number of memory partitions on the GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 95 //! //! \retval NVAPI_INVALID_ARGUMENT pCount is NULL. //! \retval NVAPI_OK *pCount is set. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPartitionCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetMemPartitionMask // //! DESCRIPTION: This function retrieves a 32-bit mask showing which memory partitions are enabled. //! NvAPI_GPU_GetPartitionCount() returns the count of enabled partitions. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 177 //! //! \retval NVAPI_INVALID_ARGUMENT pMask is NULL //! \retval NVAPI_OK *pMask is set //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetMemPartitionMask(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetTPCMask // //! DESCRIPTION: This function retrieves a 32-bit mask showing which TPCs //! (Texture Processor Cluster) are enabled. //! Returns 0 on architectures that don't have TPCs. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 177 //! //! \retval NVAPI_INVALID_ARGUMENT pMask is NULL //! \retval NVAPI_OK *pMask is set //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle //! \retval NVAPI_NOT_SUPPORTED API call is not supported on current architecture //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetTPCMask(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetSMMask // //! DESCRIPTION: This function retrieves a 32-bit mask showing which SMs //! (Streaming Multiprocessors) are enabled on the TPC identified by tpcNdx. \n //! tpcNdx values start at 0 and correspond to the position of bits //! returned by NvAPI_GPU_GetTPCMask(). [mask bit = 2^tpcNdx] //! Returns 0 on architectures that don't have SMs. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 177 //! //! \retval NVAPI_INVALID_ARGUMENT pMask is NULL, or tpcId does not match a TPC //! \retval NVAPI_OK *pMask is set //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle //! \retval NVAPI_NOT_SUPPORTED API call is not supported on current architecture //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetSMMask(NvPhysicalGpuHandle hPhysicalGpu,NvU32 tpcId,NvU32 *pMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetTotalTPCCount // //! DESCRIPTION: This function retrieves the total number of enabled TPCs (Texture Processor Clusters) //! Returns 0 on architectures that don't have TPCs. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 177 //! //! \retval NVAPI_INVALID_ARGUMENT pCount is NULL //! \retval NVAPI_OK *pCount is set //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetTotalTPCCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetTotalSMCount // //! DESCRIPTION: This function retrieves the total number of enabled SMs //! (Streaming Multiprocessors) across all TPCs (Texture Processor Clusters). \n //! Returns 0 on architectures that don't have SMs. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 177 //! //! \retval NVAPI_INVALID_ARGUMENT: pCount is NULL //! \retval NVAPI_OK: *pCount is set //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle //! \retval NVAPI_NOT_SUPPORTED API call is not supported on current architecture //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetTotalSMCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetTotalSPCount // //! DESCRIPTION: This function retrieves the total number of enabled SPs across all SMs //! (Streaming Multiprocessors) on all TPCs (Texture Processor Clusters). \n //! Returns 0 on architectures that don't have SPs. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 177 //! //! \retval NVAPI_INVALID_ARGUMENT: pCount is NULL //! \retval NVAPI_OK: *pCount is set //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle //! \retval NVAPI_NOT_SUPPORTED API call is not supported on current architecture //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetTotalSPCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetGpuCoreCount // //! DESCRIPTION: Retrieves the total number of cores defined for a GPU. //! Returns 0 on architectures that don't define GPU cores. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \retval ::NVAPI_INVALID_ARGUMENT pCount is NULL //! \retval ::NVAPI_OK *pCount is set //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND no NVIDIA GPU driving a display was found //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle //! \retval ::NVAPI_NOT_SUPPORTED API call is not supported on current architecture //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetGpuCoreCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetAllOutputs // //! This function returns set of all GPU-output identifiers as a bitmask. //! //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetAllDisplayIds. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetAllDisplayIds.") NVAPI_INTERFACE NvAPI_GPU_GetAllOutputs(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pOutputsMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetConnectedOutputs // //! This function is the same as NvAPI_GPU_GetAllOutputs() but returns only the set of GPU output //! identifiers that are connected to display devices. //! //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.") NVAPI_INTERFACE NvAPI_GPU_GetConnectedOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetConnectedSLIOutputs // //! DESCRIPTION: This function is the same as NvAPI_GPU_GetConnectedOutputs() but returns only the set of GPU-output //! identifiers that can be selected in an SLI configuration. //! NOTE: This function matches NvAPI_GPU_GetConnectedOutputs() //! - On systems which are not SLI capable. //! - If the queried GPU is not part of a valid SLI group. //! //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.") NVAPI_INTERFACE NvAPI_GPU_GetConnectedSLIOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask); //! \ingroup gpu typedef enum { NV_MONITOR_CONN_TYPE_UNINITIALIZED = 0, NV_MONITOR_CONN_TYPE_VGA, NV_MONITOR_CONN_TYPE_COMPONENT, NV_MONITOR_CONN_TYPE_SVIDEO, NV_MONITOR_CONN_TYPE_HDMI, NV_MONITOR_CONN_TYPE_DVI, NV_MONITOR_CONN_TYPE_LVDS, NV_MONITOR_CONN_TYPE_DP, NV_MONITOR_CONN_TYPE_COMPOSITE, NV_MONITOR_CONN_TYPE_UNKNOWN = -1 } NV_MONITOR_CONN_TYPE; //! \addtogroup gpu //! @{ #define NV_GPU_CONNECTED_IDS_FLAG_UNCACHED NV_BIT(0) //!< Get uncached connected devices #define NV_GPU_CONNECTED_IDS_FLAG_SLI NV_BIT(1) //!< Get devices such that those can be selected in an SLI configuration #define NV_GPU_CONNECTED_IDS_FLAG_LIDSTATE NV_BIT(2) //!< Get devices such that to reflect the Lid State #define NV_GPU_CONNECTED_IDS_FLAG_FAKE NV_BIT(3) //!< Get devices that includes the fake connected monitors #define NV_GPU_CONNECTED_IDS_FLAG_EXCLUDE_MST NV_BIT(4) //!< Excludes devices that are part of the multi stream topology. #define NV_GPU_CONNECTED_IDS_DIRECT_MODE NV_BIT(7) //!< Get devices that are detected as Direct Mode. //! @} //! \ingroup gpu typedef struct _NV_GPU_DISPLAYIDS { NvU32 version; NV_MONITOR_CONN_TYPE connectorType; //!< out: vga, tv, dvi, hdmi and dp. This is reserved for future use and clients should not rely on this information. Instead get the //!< GPU connector type from NvAPI_GPU_GetConnectorInfo/NvAPI_GPU_GetConnectorInfoEx NvU32 displayId; //!< this is a unique identifier for each device NvU32 isDynamic : 1; //!< if bit is set then this display is part of MST topology and it's a dynamic NvU32 isMultiStreamRootNode : 1; //!< if bit is set then this displayID belongs to a multi stream enabled connector(root node). Note that when multi stream is enabled and //!< a single multi stream capable monitor is connected to it, the monitor will share the display id with the RootNode. //!< When there is more than one monitor connected in a multi stream topology, then the root node will have a separate displayId. NvU32 isActive : 1; //!< if bit is set then this display is being actively driven NvU32 isCluster : 1; //!< if bit is set then this display is the representative display NvU32 isOSVisible : 1; //!< if bit is set, then this display is reported to the OS NvU32 isWFD : 1; //!< Deprecated. Will always return 0. NvU32 isConnected : 1; //!< if bit is set, then this display is connected NvU32 padding : 3; //!< Padding bits. Do not use NvU32 isVRDisplay : 1; //!< if bit is set, then this display is VR Capable NvU32 isDirectMode : 1; //!< if bit is set, then this display is in Direct Mode NvU32 reservedInternal : 5; //!< Do not use NvU32 isPhysicallyConnected : 1; //!< if bit is set, then this display is a phycially connected display; Valid only when isConnected bit is set NvU32 reserved : 14; //!< must be zero } NV_GPU_DISPLAYIDS; //! \ingroup gpu //! Macro for constructing the version field of ::_NV_GPU_DISPLAYIDS #define NV_GPU_DISPLAYIDS_VER1 MAKE_NVAPI_VERSION(NV_GPU_DISPLAYIDS,1) #define NV_GPU_DISPLAYIDS_VER2 MAKE_NVAPI_VERSION(NV_GPU_DISPLAYIDS,3) #define NV_GPU_DISPLAYIDS_VER NV_GPU_DISPLAYIDS_VER2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetConnectedDisplayIds // //! \code //! DESCRIPTION: Due to space limitation NvAPI_GPU_GetConnectedOutputs can return maximum 32 devices, but //! this is no longer true for DPMST. NvAPI_GPU_GetConnectedDisplayIds will return all //! the connected display devices in the form of displayIds for the associated hPhysicalGpu. //! This function can accept set of flags to request cached, uncached, sli and lid to get the connected devices. //! Default value for flags will be cached . //! HOW TO USE: 1) for each PhysicalGpu, make a call to get the number of connected displayId's //! using NvAPI_GPU_GetConnectedDisplayIds by passing the pDisplayIds as NULL //! On call success: //! 2) If pDisplayIdCount is greater than 0, allocate memory based on pDisplayIdCount. Then make a call NvAPI_GPU_GetConnectedDisplayIds to populate DisplayIds. //! However, if pDisplayIdCount is 0, do not make this call. //! SUPPORTED OS: Windows 7 and higher //! //! PARAMETERS: hPhysicalGpu (IN) - GPU selection //! flags (IN) - One or more defines from NV_GPU_CONNECTED_IDS_FLAG_* as valid flags. //! pDisplayIds (IN/OUT) - Pointer to an NV_GPU_DISPLAYIDS struct, each entry represents a one displayID and its attributes //! pDisplayIdCount(OUT)- Number of displayId's. //! //! RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pDisplayIds or pDisplayIdCount is NULL //! NVAPI_OK: *pDisplayIds contains a set of GPU-output identifiers //! NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found //! NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle //! \endcode //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetConnectedDisplayIds(__in NvPhysicalGpuHandle hPhysicalGpu, __inout_ecount_part_opt(*pDisplayIdCount, *pDisplayIdCount) NV_GPU_DISPLAYIDS* pDisplayIds, __inout NvU32* pDisplayIdCount, __in NvU32 flags); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetAllDisplayIds // //! DESCRIPTION: This API returns display IDs for all possible outputs on the GPU. //! For DPMST connector, it will return display IDs for all the video sinks in the topology. \n //! HOW TO USE: 1. The first call should be made to get the all display ID count. To get the display ID count, send in \n //! a) hPhysicalGpu - a valid GPU handle(enumerated using NvAPI_EnumPhysicalGPUs()) as input, \n //! b) pDisplayIds - NULL, as we just want to get the display ID count. \n //! c) pDisplayIdCount - a valid pointer to NvU32, whose value is set to ZERO. \n //! If all parameters are correct and this call is successful, this call will return the display ID's count. \n //! 2. To get the display ID array, make the second call to NvAPI_GPU_GetAllDisplayIds() with \n //! a) hPhysicalGpu - should be same value which was sent in first call, \n //! b) pDisplayIds - pointer to the display ID array allocated by caller based on display ID count, \n //! eg. malloc(sizeof(NV_GPU_DISPLAYIDS) * pDisplayIdCount). \n //! c) pDisplayIdCount - a valid pointer to NvU32. This indicates for how many display IDs \n //! the memory is allocated(pDisplayIds) by the caller. \n //! If all parameters are correct and this call is successful, this call will return the display ID array and actual //! display ID count (which was obtained in the first call to NvAPI_GPU_GetAllDisplayIds). If the input display ID count is //! less than the actual display ID count, it will overwrite the input and give the pDisplayIdCount as actual count and the //! API will return NVAPI_INSUFFICIENT_BUFFER. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hPhysicalGpu GPU selection. //! \param [in,out] DisplayIds Pointer to an array of NV_GPU_DISPLAYIDS structures, each entry represents one displayID //! and its attributes. //! \param [in,out] pDisplayIdCount As input, this parameter indicates the number of display's id's for which caller has //! allocated the memory. As output, it will return the actual number of display IDs. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval NVAPI_INSUFFICIENT_BUFFER When the input buffer(pDisplayIds) is less than the actual number of display IDs, this API //! will return NVAPI_INSUFFICIENT_BUFFER. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetAllDisplayIds(__in NvPhysicalGpuHandle hPhysicalGpu, __inout_ecount_part_opt(*pDisplayIdCount, *pDisplayIdCount) NV_GPU_DISPLAYIDS* pDisplayIds, __inout NvU32* pDisplayIdCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetConnectedOutputsWithLidState // //! This function is similar to NvAPI_GPU_GetConnectedOutputs(), and returns the connected display identifiers that are connected //! as an output mask but unlike NvAPI_GPU_GetConnectedOutputs() this API "always" reflects the Lid State in the output mask. //! Thus if you expect the LID close state to be available in the connection mask use this API. //! - If LID is closed then this API will remove the LID panel from the connected display identifiers. //! - If LID is open then this API will reflect the LID panel in the connected display identifiers. //! //! \note This API should be used on notebook systems and on systems where the LID state is required in the connection //! output mask. On desktop systems the returned identifiers will match NvAPI_GPU_GetConnectedOutputs(). //! //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.") NVAPI_INTERFACE NvAPI_GPU_GetConnectedOutputsWithLidState(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetConnectedSLIOutputsWithLidState // //! DESCRIPTION: This function is the same as NvAPI_GPU_GetConnectedOutputsWithLidState() but returns only the set //! of GPU-output identifiers that can be selected in an SLI configuration. With SLI disabled, //! this function matches NvAPI_GPU_GetConnectedOutputsWithLidState(). //! //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.") NVAPI_INTERFACE NvAPI_GPU_GetConnectedSLIOutputsWithLidState(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetSystemType // //! \fn NvAPI_GPU_GetSystemType(NvPhysicalGpuHandle hPhysicalGpu, NV_SYSTEM_TYPE *pSystemType) //! This function identifies whether the GPU is a notebook GPU or a desktop GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 95 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL //! \retval NVAPI_OK *pSystemType contains the GPU system type //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu //! Used in NvAPI_GPU_GetSystemType() typedef enum { NV_SYSTEM_TYPE_UNKNOWN = 0, NV_SYSTEM_TYPE_LAPTOP = 1, NV_SYSTEM_TYPE_DESKTOP = 2, } NV_SYSTEM_TYPE; //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetSystemType(NvPhysicalGpuHandle hPhysicalGpu, NV_SYSTEM_TYPE *pSystemType); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetActiveOutputs // //! This function is the same as NvAPI_GPU_GetAllOutputs but returns only the set of GPU output //! identifiers that are actively driving display devices. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetActiveOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_SetEDID // //! Thus function sets the EDID data for the specified GPU handle and connection bit mask. //! User can either send (Gpu handle & output id) or only display Id in variable displayOutputId parameter & hPhysicalGpu parameter can be default handle (0). //! \note The EDID will be cached across the boot session and will be enumerated to the OS in this call. //! To remove the EDID set sizeofEDID to zero. //! OS and NVAPI connection status APIs will reflect the newly set or removed EDID dynamically. //! //! This feature will NOT be supported on the following boards: //! - GeForce //! - Quadro VX //! - Tesla //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 100 //! //! \retval NVAPI_INVALID_ARGUMENT pEDID is NULL; displayOutputId has 0 or > 1 bits set //! \retval NVAPI_OK *pEDID data was applied to the requested displayOutputId. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle. //! \retval NVAPI_NOT_SUPPORTED For the above mentioned GPUs //! \retval NVAPI_INVALID_USER_PRIVILEGE 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". //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetTargetID //! \code //! DESCRIPTION: Returns the target ID for the specified displayOutputId. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 375 //! //! \param [in] hPhysicalGpu Handle to the physical GPU to which the display is connected. This parameter is ignored //! when the displayOutputId is a NvAPI display Id obtained from NvAPI_GPU_GetConnectedDisplayIds(). //! //! \param [in] displayOutputId This can either be the connection bit mask or the newer NvAPI display Id. When the legacy //! connection bit mask is passed, it should have exactly 1 bit set to indicate a single display. //! //! \param [out] pTargetId Pointer to a NvU32 that will receive the targetId output. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \endcode //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetTargetID(__in_opt NvPhysicalGpuHandle hPhysicalGpu, __in NvU32 displayOutputId, __out NvU32 *pTargetId); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetOutputType // //! \fn NvAPI_GPU_GetOutputType(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_OUTPUT_TYPE *pOutputType) //! This function returns the output type. User can either specify both 'physical GPU handle and outputId (exactly 1 bit set - see \ref handles)' or //! a valid displayId in the outputId parameter. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \Version Earliest supported ForceWare version: 82.61 //! //! \retval NVAPI_INVALID_ARGUMENT outputId, pOutputType is NULL; or if outputId parameter is not displayId and either it has > 1 bit set or hPhysicalGpu is NULL. //! \retval NVAPI_OK *pOutputType contains a NvGpuOutputType value //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu //! used in NvAPI_GPU_GetOutputType() typedef enum _NV_GPU_OUTPUT_TYPE { NVAPI_GPU_OUTPUT_UNKNOWN = 0, NVAPI_GPU_OUTPUT_CRT = 1, //!< CRT display device NVAPI_GPU_OUTPUT_DFP = 2, //!< Digital Flat Panel display device NVAPI_GPU_OUTPUT_TV = 3, //!< TV display device } NV_GPU_OUTPUT_TYPE; //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetOutputType(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_OUTPUT_TYPE *pOutputType); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetDeviceDisplayMode // //! \fn NvAPI_GPU_GetDeviceDisplayMode(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayId, NV_GPU_DISPLAY_MODE *pDeviceDisplayMode) //! DESCRIPTION: For the specified physical GPU handle and single active displayId (exactly 1 bit set), this API //! returns the device display mode (see NV_GPU_DISPLAY_MODE) according to hardware (including raster extension). This //! includes the backend timing info. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu, displayId or pOutputsMask is NULL; displayId has > 1 bit set; //! displayId is not an active display. //! \retval NVAPI_OK *pDeviceDisplayMode contains the returned display mode information. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu //! Used in NvAPI_GPU_GetDeviceDisplayMode(). typedef struct { NvU32 version; //!< Structure version NvU32 activeWidth; //!< Number of active horizontal pixels NvU32 activeHeight; //!< Number of active vertical pixels NvU32 totalWidth; //!< Total size of raster width (including blanking) NvU32 totalHeight; //!< Total size of raster height (including blanking) NvU32 depth; //!< Color depth NvU32 frequency; //!< Calculated refresh rate based upon current raster and pixel clock } NV_GPU_DISPLAY_MODE; //! \ingroup gpu #define NV_GPU_DISPLAY_MODE_VER MAKE_NVAPI_VERSION(NV_GPU_DISPLAY_MODE,1) //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetDeviceDisplayMode(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayId, NV_GPU_DISPLAY_MODE *pDeviceDisplayMode); //DISPLAYPORT is all private for now. Do not change category until that info is public. /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetFlatPanelInfo // //! \fn NvAPI_GPU_GetFlatPanelInfo(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_FLAT_PANEL_INFO *pFlatPanelInfo) //! Given a physical GPU handle and a single display outputId of the flat panel (see \ref handles), this API //! returns the flat panel attributes. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu, outputId, or pFlatPanelInfo is NULL; or outputId has > 1 bit set. //! \retval NVAPI_OK *pFlatPanelInfo contains the returned flat panel information. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \retval NVAPI_EXPECTED_DIGITAL_FLAT_PANEL outputId is not associated with digital flat panel. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu //! Used in NV_GPU_FLAT_PANEL_INFO typedef enum _NV_GPU_FLATPANEL_SIGNAL_TYPE { NV_GPU_FLATPANEL_SIGNAL_TYPE_TMDS = 0, NV_GPU_FLATPANEL_SIGNAL_TYPE_LVDS = 1, NV_GPU_FLATPANEL_SIGNAL_TYPE_SDI = 2, NV_GPU_FLATPANEL_SIGNAL_TYPE_DISPLAYPORT = 3, } NV_GPU_FLATPANEL_SIGNAL_TYPE; //! \ingroup gpu //! Used in NV_GPU_FLAT_PANEL_INFO typedef enum _NV_GPU_FLATPANEL_SIGNAL_LINK { NV_GPU_FLATPANEL_SIGNAL_SINGLE_LINK = 1, NV_GPU_FLATPANEL_SIGNAL_DUAL_LINK = 2, } NV_GPU_FLATPANEL_SIGNAL_LINK; //! \ingroup gpu //! Used in NV_GPU_FLAT_PANEL_INFO typedef enum _NV_GPU_FLATPANEL_SIGNAL_DISPLAYPORT_LANES { NV_GPU_FLATPANEL_SIGNAL_DISPLAYPORT_NONE = 0, NV_GPU_FLATPANEL_SIGNAL_DISPLAYPORT_SINGLE_LANE = 1, NV_GPU_FLATPANEL_SIGNAL_DISPLAYPORT_DUAL_LANE = 2, NV_GPU_FLATPANEL_SIGNAL_DISPLAYPORT_QUAD_LANE = 3, } NV_GPU_FLATPANEL_SIGNAL_DISPLAYPORT_LANES; //! \ingroup gpu //! Used in NV_GPU_FLAT_PANEL_INFO typedef enum _NV_GPU_FLATPANEL_SIGNAL_COLOR_FLAGS { NV_GPU_FLATPANEL_SIGNAL_COLOR_LIMITED_RANGE = 0x00000001, //!< Flatpanel supports limited color range. NV_GPU_FLATPANEL_SIGNAL_COLOR_AUTO_CONFIGURE = 0x00000002, //!< Flatpanel supports auto-configuring the color range. NV_GPU_FLATPANEL_SIGNAL_COLOR_FORMAT_YCBCR422_CAPABLE = 0x00000004, //!< Flatpanel is YCBCR422 color format capable. NV_GPU_FLATPANEL_SIGNAL_COLOR_FORMAT_YCBCR444_CAPABLE = 0x00000008, //!< Flatpanel is YCBCR444 color format capable. } NV_GPU_FLATPANEL_SIGNAL_COLOR_FLAGS; //! \ingroup gpu //! Used in NvAPI_GPU_GetFlatPanelInfo() typedef struct { NvU32 version; //!< Structure version NV_GPU_FLATPANEL_SIGNAL_TYPE signalType; //!< Flat panel signal type NV_GPU_FLATPANEL_SIGNAL_LINK linkType; //!< Link type NV_GPU_FLATPANEL_SIGNAL_DISPLAYPORT_LANES displayPortLanes; //!< 1, 2 or 4 DisplayPort lanesconnected panel. NvU32 colorFlags; //!< One or more bits from NV_GPU_FLATPANEL_SIGNAL_COLOR_FLAGS NvU32 hdmiCapable:1; //!< HMDI status NvU32 scalerDisabled:1; //!< Indicates if GPU scaling is disabled (possible with SLI active on certain GPUs) NvU32 refreshRateLocked:1; //!< Flat panel supports 60 Hz only } NV_GPU_FLAT_PANEL_INFO; //! \ingroup gpu #define NV_GPU_FLAT_PANEL_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_FLAT_PANEL_INFO,1) //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetFlatPanelInfo(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_FLAT_PANEL_INFO *pFlatPanelInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ValidateOutputCombination // //! This function determines if a set of GPU outputs can be active //! simultaneously. While a GPU may have outputs, typically they cannot //! all be active at the same time due to internal resource sharing. //! //! Given a physical GPU handle and a mask of candidate outputs, this call //! will return NVAPI_OK if all of the specified outputs can be driven //! simultaneously. It will return NVAPI_INVALID_COMBINATION if they cannot. //! //! Use NvAPI_GPU_GetAllOutputs() to determine which outputs are candidates. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \retval NVAPI_OK Combination of outputs in outputsMask are valid (can be active simultaneously). //! \retval NVAPI_INVALID_COMBINATION Combination of outputs in outputsMask are NOT valid. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or outputsMask does not have at least 2 bits set. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ValidateOutputCombination(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputsMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetFullName // //! This function retrieves the full GPU name as an ASCII string - for example, "Quadro FX 1400". //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \return NVAPI_ERROR or NVAPI_OK //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetFullName(NvPhysicalGpuHandle hPhysicalGpu, NvAPI_ShortString szName); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPCIIdentifiers // //! This function returns the PCI identifiers associated with this GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \param DeviceId The internal PCI device identifier for the GPU. //! \param SubSystemId The internal PCI subsystem identifier for the GPU. //! \param RevisionId The internal PCI device-specific revision identifier for the GPU. //! \param ExtDeviceId The external PCI device identifier for the GPU. //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or an argument is NULL //! \retval NVAPI_OK Arguments are populated with PCI identifiers //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPCIIdentifiers(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pDeviceId,NvU32 *pSubSystemId,NvU32 *pRevisionId,NvU32 *pExtDeviceId); //! \ingroup gpu //! Used in NvAPI_GPU_GetGPUType(). typedef enum _NV_GPU_TYPE { NV_SYSTEM_TYPE_GPU_UNKNOWN = 0, NV_SYSTEM_TYPE_IGPU = 1, //!< Integrated GPU NV_SYSTEM_TYPE_DGPU = 2, //!< Discrete GPU } NV_GPU_TYPE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetGPUType // //! DESCRIPTION: This function returns the GPU type (integrated or discrete). //! See ::NV_GPU_TYPE. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 173 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu //! \retval NVAPI_OK *pGpuType contains the GPU type //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetGPUType(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_TYPE *pGpuType); //! \ingroup gpu //! Used in NvAPI_GPU_GetBusType() typedef enum _NV_GPU_BUS_TYPE { NVAPI_GPU_BUS_TYPE_UNDEFINED = 0, NVAPI_GPU_BUS_TYPE_PCI = 1, NVAPI_GPU_BUS_TYPE_AGP = 2, NVAPI_GPU_BUS_TYPE_PCI_EXPRESS = 3, NVAPI_GPU_BUS_TYPE_FPCI = 4, NVAPI_GPU_BUS_TYPE_AXI = 5, } NV_GPU_BUS_TYPE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetBusType // //! This function returns the type of bus associated with this GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBusType is NULL. //! \retval NVAPI_OK *pBusType contains bus identifier. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetBusType(NvPhysicalGpuHandle hPhysicalGpu,NV_GPU_BUS_TYPE *pBusType); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetBusId // //! DESCRIPTION: Returns the ID of the bus associated with this GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 167 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBusId is NULL. //! \retval NVAPI_OK *pBusId contains the bus ID. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetBusId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusId); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetBusSlotId // //! DESCRIPTION: Returns the ID of the bus slot associated with this GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 167 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBusSlotId is NULL. //! \retval NVAPI_OK *pBusSlotId contains the bus slot ID. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetBusSlotId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusSlotId); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetIRQ // //! This function returns the interrupt number associated with this GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pIRQ is NULL. //! \retval NVAPI_OK *pIRQ contains interrupt number. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetIRQ(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pIRQ); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetVbiosRevision // //! This function returns the revision of the video BIOS associated with this GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBiosRevision is NULL. //! \retval NVAPI_OK *pBiosRevision contains revision number. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVbiosRevision(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pBiosRevision); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetVbiosOEMRevision // //! This function returns the OEM revision of the video BIOS associated with this GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBiosRevision is NULL //! \retval NVAPI_OK *pBiosRevision contains revision number //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVbiosOEMRevision(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pBiosRevision); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetVbiosVersionString // //! This function returns the full video BIOS version string in the form of xx.xx.xx.xx.yy where //! - xx numbers come from NvAPI_GPU_GetVbiosRevision() and //! - yy comes from NvAPI_GPU_GetVbiosOEMRevision(). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu is NULL. //! \retval NVAPI_OK szBiosRevision contains version string. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVbiosVersionString(NvPhysicalGpuHandle hPhysicalGpu,NvAPI_ShortString szBiosRevision); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetAGPAperture // //! This function returns the AGP aperture in megabytes. //! //! \deprecated Do not use this function - it is deprecated in release 455. //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \retval NVAPI_NOT_SUPPORTED //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 455.") NVAPI_INTERFACE NvAPI_GPU_GetAGPAperture(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetCurrentAGPRate // //! This function returns the current AGP Rate (0 = AGP not present, 1 = 1x, 2 = 2x, etc.). //! //! \deprecated Do not use this function - it is deprecated in release 455. //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \retval NVAPI_NOT_SUPPORTED //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 455.") NVAPI_INTERFACE NvAPI_GPU_GetCurrentAGPRate(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pRate); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetCurrentPCIEDownstreamWidth // //! This function returns the number of PCIE lanes being used for the PCIE interface //! downstream from the GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \retval NVAPI_INVALID_ARGUMENT pWidth is NULL. //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetCurrentPCIEDownstreamWidth(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pWidth); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPhysicalFrameBufferSize // //! This function returns the physical size of framebuffer in KB. This does NOT include any //! system RAM that may be dedicated for use by the GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \retval NVAPI_INVALID_ARGUMENT pSize is NULL //! \retval NVAPI_OK Call successful //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPhysicalFrameBufferSize(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetVirtualFrameBufferSize // //! This function returns the virtual size of framebuffer in KB. This includes the physical RAM plus any //! system RAM that has been dedicated for use by the GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 90 //! //! \retval NVAPI_INVALID_ARGUMENT pSize is NULL. //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle. //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVirtualFrameBufferSize(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetQuadroStatus // //! This function retrieves the Quadro status for the GPU (1 if Quadro, 0 if GeForce) //! //! This API is deprecated and it is recommended to instead query //! NV_GPU_WORKSTATION_FEATURE_TYPE_PROVIZ support from the API //! NvAPI_GPU_QueryWorkstationFeatureSupport. //! \deprecated Do not use this function - it is deprecated in release 460. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \return NVAPI_ERROR or NVAPI_OK //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 460.") NVAPI_INTERFACE NvAPI_GPU_GetQuadroStatus(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pStatus); //! \ingroup gpu #define NVAPI_GPU_MAX_PRODUCT_PART_NUMBER_LENGTH 0x00000014 //! \ingroup gpu typedef struct _NV_BOARD_INFO_V2 { NvU32 version; //!< structure version NvU8 BoardNum[16]; //!< Board Serial Number NvU8 productPartNumber[NVAPI_GPU_MAX_PRODUCT_PART_NUMBER_LENGTH]; NvU8 boardRevision[3]; NvU8 boardType; }NV_BOARD_INFO_V2; //! \ingroup gpu #define NVAPI_GPU_MAX_OEM_INFO_LENGTH 0x000001F8 //! \ingroup gpu typedef struct _NV_BOARD_INFO_V3 { NvU32 version; //!< structure version NvU8 BoardNum[16]; //!< Board Serial Number NvU8 productPartNumber[NVAPI_GPU_MAX_PRODUCT_PART_NUMBER_LENGTH]; NvU8 boardRevision[3]; NvU8 boardType; NvU8 oemInfo[NVAPI_GPU_MAX_OEM_INFO_LENGTH]; }NV_BOARD_INFO_V3; //! \ingroup gpu #define NV_BOARD_INFO_VER2 MAKE_NVAPI_VERSION(NV_BOARD_INFO_V2,2) //! \ingroup gpu #define NV_BOARD_INFO_VER3 MAKE_NVAPI_VERSION(NV_BOARD_INFO_V3,3) //! \ingroup gpu typedef NV_BOARD_INFO_V3 NV_BOARD_INFO; //! \ingroup gpu #define NV_BOARD_INFO_VER NV_BOARD_INFO_VER3 //! \ingroup gpu typedef struct _NV_BOARD_INFO { NvU32 version; //!< structure version NvU8 BoardNum[16]; //!< Board Serial Number }NV_BOARD_INFO_V1; #define NV_BOARD_INFO_VER1 MAKE_NVAPI_VERSION(NV_BOARD_INFO_V1,1) #ifndef NV_BOARD_INFO_VER //! \ingroup gpu typedef NV_BOARD_INFO_V1 NV_BOARD_INFO; //! \ingroup gpu //! \ingroup gpu #define NV_BOARD_INFO_VER NV_BOARD_INFO_VER1 #endif //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetBoardInfo // //! DESCRIPTION: This API Retrieves the Board information (a unique GPU Board Serial Number) stored in the InfoROM. //! //! \param [in] hPhysicalGpu Physical GPU Handle. //! \param [in,out] NV_BOARD_INFO Board Information. //! //! TCC_SUPPORTED //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_ERROR miscellaneous error occurred //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE handle passed is not a physical GPU handle //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized //! \retval ::NVAPI_INVALID_POINTER pBoardInfo is NULL //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION the version of the INFO struct is not supported //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetBoardInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_BOARD_INFO *pBoardInfo); //! \ingroup gpu //! Used in NvAPI_GPU_GetRamType() typedef enum { NV_GPU_RAM_TYPE_UNKNOWN = 0, NV_GPU_RAM_TYPE_SDRAM = 1, NV_GPU_RAM_TYPE_DDR1 = 2, NV_GPU_RAM_TYPE_DDR2 = 3, NV_GPU_RAM_TYPE_GDDR2 = 4, NV_GPU_RAM_TYPE_GDDR3 = 5, NV_GPU_RAM_TYPE_GDDR4 = 6, NV_GPU_RAM_TYPE_DDR3 = 7, NV_GPU_RAM_TYPE_GDDR5 = 8, NV_GPU_RAM_TYPE_LPDDR2 = 9, NV_GPU_RAM_TYPE_GDDR5X = 10, NV_GPU_RAM_TYPE_HBM1 = 11, NV_GPU_RAM_TYPE_HBM2 = 12, NV_GPU_RAM_TYPE_SDDR4 = 13, NV_GPU_RAM_TYPE_GDDR6 = 14, NV_GPU_RAM_TYPE_GDDR6X = 15, } NV_GPU_RAM_TYPE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetRamType // //! This function retrieves the type of VRAM associated with this GPU //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 95 //! //! \return NVAPI_ERROR or NVAPI_OK //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetRamType(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_RAM_TYPE *pRamType); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetRamVendorID // //! \fn NvAPI_GPU_GetRamVendorID(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_RAM_VENDOR_ID *pVendorID) //! \code //! DESCRIPTION: Retrieves an ID for the Vendor of VRAM associated with this GPU. //! The value comes from the Memory Information Table in the VBIOS //! See enum NV_GPU_RAM_VENDOR_ID. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! RETURN STATUS: //! NVAPI_OK: all ok, value returned (may be NV_GPU_RAM_VENDOR_ID_UNKNOWN) //! NVAPI_API_NOT_INTIALIZED: NVAPI not initialized //! NVAPI_ERROR: miscellaneous error occurred //! NVAPI_INVALID_ARGUMENT: pVendorID is NULL //! NVAPI_HANDLE_INVALIDATED: handle passed has been invalidated (see user guide) //! NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: handle passed is not a physical GPU handle //! \endcode /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu typedef enum { NV_GPU_RAM_VENDOR_ID_UNKNOWN = 0, NV_GPU_RAM_VENDOR_ID_SAMSUNG = 1, NV_GPU_RAM_VENDOR_ID_QIMONDA = 2, NV_GPU_RAM_VENDOR_ID_ELPIDA = 3, NV_GPU_RAM_VENDOR_ID_ETRON = 4, NV_GPU_RAM_VENDOR_ID_NANYA = 5, NV_GPU_RAM_VENDOR_ID_HYNIX = 6, NV_GPU_RAM_VENDOR_ID_MOSEL = 7, NV_GPU_RAM_VENDOR_ID_WINBOND = 8, NV_GPU_RAM_VENDOR_ID_ESMT = 9, NV_GPU_RAM_VENDOR_ID_MICRON = 10 } NV_GPU_RAM_VENDOR_ID; //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetRamVendorID(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_RAM_VENDOR_ID *pVendorID); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetFBWidthAndLocation // //! \fn NvAPI_GPU_GetFBWidthAndLocation(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusWidth, NV_GPU_FB_LOCATION *pFBLocation) //! DESCRIPTION: This API returns the width and location of the GPU's RAM memory bus. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 185 //! //! \return ::NVAPI_ERROR or ::NVAPI_OK // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu //! Used in NvAPI_GPU_GetFBWidthAndLocation(). typedef enum _NV_GPU_FB_LOCATION { NV_GPU_FB_RAM_LOCATION_UNKNOWN = 0, NV_GPU_FB_RAM_LOCATION_GPU_DEDICATED = 1, NV_GPU_FB_RAM_LOCATION_SYS_SHARED = 2, NV_GPU_FB_RAM_LOCATION_SYS_DEDICATED = 3, } NV_GPU_FB_LOCATION; //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetFBWidthAndLocation(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusWidth, NV_GPU_FB_LOCATION *pFBLocation); //! Used in NvAPI_GPU_GetArchInfo() typedef struct { NvU32 version; NvU32 architecture; NvU32 implementation; NvU32 revision; } NV_GPU_ARCH_INFO_V1; //! NV_GPU_ARCH_INFO() values to identify Architecture level for the GPU. typedef enum _NV_GPU_ARCHITECTURE_ID { NV_GPU_ARCHITECTURE_T2X = 0xE0000020, NV_GPU_ARCHITECTURE_T3X = 0xE0000030, NV_GPU_ARCHITECTURE_T4X = 0xE0000040, NV_GPU_ARCHITECTURE_T12X = 0xE0000040, NV_GPU_ARCHITECTURE_NV40 = 0x00000040, NV_GPU_ARCHITECTURE_NV50 = 0x00000050, NV_GPU_ARCHITECTURE_G78 = 0x00000060, NV_GPU_ARCHITECTURE_G80 = 0x00000080, NV_GPU_ARCHITECTURE_G90 = 0x00000090, NV_GPU_ARCHITECTURE_GT200 = 0x000000A0, NV_GPU_ARCHITECTURE_GF100 = 0x000000C0, NV_GPU_ARCHITECTURE_GF110 = 0x000000D0, NV_GPU_ARCHITECTURE_GK100 = 0x000000E0, NV_GPU_ARCHITECTURE_GK110 = 0x000000F0, NV_GPU_ARCHITECTURE_GK200 = 0x00000100, NV_GPU_ARCHITECTURE_GM000 = 0x00000110, NV_GPU_ARCHITECTURE_GM200 = 0x00000120, NV_GPU_ARCHITECTURE_GP100 = 0x00000130, NV_GPU_ARCHITECTURE_GV100 = 0x00000140, NV_GPU_ARCHITECTURE_GV110 = 0x00000150, NV_GPU_ARCHITECTURE_TU100 = 0x00000160, NV_GPU_ARCHITECTURE_GA100 = 0x00000170, }NV_GPU_ARCHITECTURE_ID; //! NV_GPU_ARCH_INFO() values to identify GPU Architecture Implementation. typedef enum _NV_GPU_ARCH_IMPLEMENTATION_ID { NV_GPU_ARCH_IMPLEMENTATION_T20 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_T30 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_T35 = 0x00000005, NV_GPU_ARCH_IMPLEMENTATION_T40 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_T124 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_NV40 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_NV41 = 0x00000001, NV_GPU_ARCH_IMPLEMENTATION_NV42 = 0x00000002, NV_GPU_ARCH_IMPLEMENTATION_NV43 = 0x00000003, NV_GPU_ARCH_IMPLEMENTATION_NV44 = 0x00000004, NV_GPU_ARCH_IMPLEMENTATION_NV44A = 0x0000000A, NV_GPU_ARCH_IMPLEMENTATION_NV46 = 0x00000006, NV_GPU_ARCH_IMPLEMENTATION_NV47 = 0x00000007, NV_GPU_ARCH_IMPLEMENTATION_NV49 = 0x00000009, NV_GPU_ARCH_IMPLEMENTATION_NV4B = 0x0000000B, NV_GPU_ARCH_IMPLEMENTATION_NV4C = 0x0000000C, NV_GPU_ARCH_IMPLEMENTATION_NV4E = 0x0000000E, NV_GPU_ARCH_IMPLEMENTATION_NV50 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_NV63 = 0x00000003, NV_GPU_ARCH_IMPLEMENTATION_NV67 = 0x00000007, NV_GPU_ARCH_IMPLEMENTATION_G84 = 0x00000004, NV_GPU_ARCH_IMPLEMENTATION_G86 = 0x00000006, NV_GPU_ARCH_IMPLEMENTATION_G92 = 0x00000002, NV_GPU_ARCH_IMPLEMENTATION_G94 = 0x00000004, NV_GPU_ARCH_IMPLEMENTATION_G96 = 0x00000006, NV_GPU_ARCH_IMPLEMENTATION_G98 = 0x00000008, NV_GPU_ARCH_IMPLEMENTATION_GT200 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_GT212 = 0x00000002, NV_GPU_ARCH_IMPLEMENTATION_GT214 = 0x00000004, NV_GPU_ARCH_IMPLEMENTATION_GT215 = 0x00000003, NV_GPU_ARCH_IMPLEMENTATION_GT216 = 0x00000005, NV_GPU_ARCH_IMPLEMENTATION_GT218 = 0x00000008, NV_GPU_ARCH_IMPLEMENTATION_MCP77 = 0x0000000A, NV_GPU_ARCH_IMPLEMENTATION_GT21C = 0x0000000B, NV_GPU_ARCH_IMPLEMENTATION_MCP79 = 0x0000000C, NV_GPU_ARCH_IMPLEMENTATION_GT21A = 0x0000000D, NV_GPU_ARCH_IMPLEMENTATION_MCP89 = 0x0000000F, NV_GPU_ARCH_IMPLEMENTATION_GF100 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_GF104 = 0x00000004, NV_GPU_ARCH_IMPLEMENTATION_GF106 = 0x00000003, NV_GPU_ARCH_IMPLEMENTATION_GF108 = 0x00000001, NV_GPU_ARCH_IMPLEMENTATION_GF110 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_GF116 = 0x00000006, NV_GPU_ARCH_IMPLEMENTATION_GF117 = 0x00000007, NV_GPU_ARCH_IMPLEMENTATION_GF118 = 0x00000008, NV_GPU_ARCH_IMPLEMENTATION_GF119 = 0x00000009, NV_GPU_ARCH_IMPLEMENTATION_GK104 = 0x00000004, NV_GPU_ARCH_IMPLEMENTATION_GK106 = 0x00000006, NV_GPU_ARCH_IMPLEMENTATION_GK107 = 0x00000007, NV_GPU_ARCH_IMPLEMENTATION_GK20A = 0x0000000A, NV_GPU_ARCH_IMPLEMENTATION_GK110 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_GK208 = 0x00000008, NV_GPU_ARCH_IMPLEMENTATION_GM204 = 0x00000004, NV_GPU_ARCH_IMPLEMENTATION_GM206 = 0x00000006, NV_GPU_ARCH_IMPLEMENTATION_GP100 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_GP000 = 0x00000001, NV_GPU_ARCH_IMPLEMENTATION_GP102 = 0x00000002, NV_GPU_ARCH_IMPLEMENTATION_GP104 = 0x00000004, NV_GPU_ARCH_IMPLEMENTATION_GP106 = 0x00000006, NV_GPU_ARCH_IMPLEMENTATION_GP107 = 0x00000007, NV_GPU_ARCH_IMPLEMENTATION_GP108 = 0x00000008, NV_GPU_ARCH_IMPLEMENTATION_GV100 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_GV10B = 0x0000000B, NV_GPU_ARCH_IMPLEMENTATION_TU100 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_TU102 = 0x00000002, NV_GPU_ARCH_IMPLEMENTATION_TU104 = 0x00000004, NV_GPU_ARCH_IMPLEMENTATION_TU106 = 0x00000006, NV_GPU_ARCH_IMPLEMENTATION_TU116 = 0x00000008, NV_GPU_ARCH_IMPLEMENTATION_TU117 = 0x00000007, NV_GPU_ARCH_IMPLEMENTATION_TU000 = 0x00000001, NV_GPU_ARCH_IMPLEMENTATION_GA100 = 0x00000000, NV_GPU_ARCH_IMPLEMENTATION_GA102 = 0x00000002, NV_GPU_ARCH_IMPLEMENTATION_GA104 = 0x00000004, }NV_GPU_ARCH_IMPLEMENTATION_ID; typedef enum _NV_GPU_CHIP_REVISION { NV_GPU_CHIP_REV_EMULATION_QT = 0x00000000, //!< QT chip NV_GPU_CHIP_REV_EMULATION_FPGA = 0x00000001, //!< FPGA implementation of the chipset NV_GPU_CHIP_REV_A01 = 0x00000011, //!< First silicon chipset revision NV_GPU_CHIP_REV_A02 = 0x00000012, //!< Second Silicon chipset revision NV_GPU_CHIP_REV_A03 = 0x00000013, //!< Third Silicon chipset revision NV_GPU_CHIP_REV_UNKNOWN = 0xffffffff, //!< Unknown chip revision }NV_GPU_CHIP_REVISION; //! \ingroup gpu //! Used in NvAPI_GPU_GetArchInfo() typedef struct { NvU32 version; union { NvU32 architecture; //!< architecture and architecture_id are the same. The former is NvU32 while the latter is an enum made for readability. NV_GPU_ARCHITECTURE_ID architecture_id; //!< specifies the architecture level for the GPU. }; union { NvU32 implementation; //!< implementation and implementation_id are the same. The former is NvU32 while the latter is an enum made for readability. NV_GPU_ARCH_IMPLEMENTATION_ID implementation_id; //!< specifies the implementation of the architecture for the GPU. }; union { NvU32 revision; //!< revision and revision_id are the same. The former is NvU32 while the latter is an enum made for readability. NV_GPU_CHIP_REVISION revision_id; //!< specifies the architecture revision of the GPU. }; } NV_GPU_ARCH_INFO_V2; //! \ingroup gpu typedef NV_GPU_ARCH_INFO_V2 NV_GPU_ARCH_INFO; //! \ingroup gpu #define NV_GPU_ARCH_INFO_VER_1 MAKE_NVAPI_VERSION(NV_GPU_ARCH_INFO_V1,1) #define NV_GPU_ARCH_INFO_VER_2 MAKE_NVAPI_VERSION(NV_GPU_ARCH_INFO_V2,2) #define NV_GPU_ARCH_INFO_VER NV_GPU_ARCH_INFO_VER_2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetArchInfo // //! \fn NvAPI_GPU_GetArchInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_ARCH_INFO *pGpuArchInfo) //! This function retrieves the architecture, implementation and chip revision for the specified GPU . //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! \since Release: 85 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetArchInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_ARCH_INFO *pGpuArchInfo); //! \ingroup gpu //! Used in NvAPI_GPU_SetDitherControl(). typedef enum _NVAPI_DITHER_TYPE { NVAPI_DITHER_TYPE_DEFAULT = 0, //!< enable/disable based on the default behavior NVAPI_DITHER_TYPE_ENABLE = 1, //!< enable dithering NVAPI_DITHER_TYPE_DISABLE = 2, //!< disable dithering } NVAPI_DITHER_TYPE; //! \ingroup gpu //! Used in NvAPI_GPU_SetDitherControl(). typedef enum _NVAPI_DITHER_BITS { NVAPI_DITHER_BITS_6BITS = 0, NVAPI_DITHER_BITS_8BITS = 1, } NVAPI_DITHER_BITS; //! \ingroup gpu //! Used in NvAPI_GPU_SetDitherControl(). typedef enum _NVAPI_DITHER_MODE { NVAPI_DITHER_MODE_DYNAMIC_ERR_ACC = 0, NVAPI_DITHER_MODE_STATIC_ERR_ACC = 1, NVAPI_DITHER_MODE_DYNAMIC_2X2 = 2, NVAPI_DITHER_MODE_STATIC_2X2 = 3, } NVAPI_DITHER_MODE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_SetDitherControl // //! DESCRIPTION: This API sets display related hardware dither controls (for example, dithering a higher bpp framebuffer to a lower bpp display). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or //! NvAPI_GetView(), to identify the targeted TV. //! \param [in] type The dithering mode to apply (default, enable, or disable) //! \param [in] bits The bits to dither to //! \param [in] mode The dither mode //! //! \retval ::NVAPI_OK Dither controls successfully set. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle. //! \retval ::NVAPI_INVALID_ARGUMENT Parameters passed do not match the hardware implementation. //! \retval ::NVAPI_NOT_SUPPORTED Dither control feature is not supported on the selected GPU. //! \retval ::NVAPI_NO_IMPLEMENTATION No implementation for dither controls implemented for this GPU. //! \retval ::NVAPI_ERROR Dither controls were not successfully propogated //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetDitherControl(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NVAPI_DITHER_TYPE type, NVAPI_DITHER_BITS bits, NVAPI_DITHER_MODE mode); //! \ingroup gpu //! @{ typedef enum _NVAPI_DITHER_CONTROL_CAP_MODE { NVAPI_DITHER_CONTROL_CAP_MODE_DYNAMIC_ERR_ACC = NV_BIT(NVAPI_DITHER_MODE_DYNAMIC_ERR_ACC), NVAPI_DITHER_CONTROL_CAP_MODE_STATIC_ERR_ACC = NV_BIT(NVAPI_DITHER_MODE_STATIC_ERR_ACC), NVAPI_DITHER_CONTROL_CAP_MODE_DYNAMIC_2X2 = NV_BIT(NVAPI_DITHER_MODE_DYNAMIC_2X2), NVAPI_DITHER_CONTROL_CAP_MODE_STATIC_2X2 = NV_BIT(NVAPI_DITHER_MODE_STATIC_2X2), } NVAPI_DITHER_CONTROL_CAP_MODE; typedef enum _NVAPI_DITHER_CONTROL_CAP_BITS { NVAPI_DITHER_CONTROL_CAP_BITS_6BITS = NV_BIT(NVAPI_DITHER_BITS_6BITS), NVAPI_DITHER_CONTROL_CAP_BITS_8BITS = NV_BIT(NVAPI_DITHER_BITS_8BITS), } NVAPI_DITHER_CONTROL_CAP_BITS; typedef struct _NV_GPU_DITHER_CONTROL_V1 { NvU32 version; //!< Structure version NVAPI_DITHER_TYPE ditherEnable; //!< The dithering mode to apply (default, enable, or disable) NVAPI_DITHER_BITS ditherBitDepth; //!< The bits per component of the output NVAPI_DITHER_MODE ditherMode; //!< The dither mode NvU32 ditherBitDepths; //!< Bitfield of supported NVAPI_DITHER_CONTROL_CAP_MODEs NvU32 ditherModes; //!< Bitfield of supported NVAPI_DITHER_CONTROL_CAP_BITS } NV_GPU_DITHER_CONTROL_V1; typedef NV_GPU_DITHER_CONTROL_V1 NV_GPU_DITHER_CONTROL; #define NV_GPU_DITHER_CONTROL_VER1 MAKE_NVAPI_VERSION(NV_GPU_DITHER_CONTROL_V1,1) #define NV_GPU_DITHER_CONTROL_VER NV_GPU_DITHER_CONTROL_VER1 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetDitherControl // //! DESCRIPTION: This API returns display-related GPU dither controls. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Address of target active GPU output //! \param [out] pDitherData Struct containing dithering state information //! //! \retval ::NVAPI_OK Dither controls successfully received. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle. //! \retval ::NVAPI_INVALID_ARGUMENT Parameters passed do not match the hardware implementation //! \retval ::NVAPI_NOT_SUPPORTED Dither control feature is not supported on the selected GPU //! \retval ::NVAPI_NO_IMPLEMENTATION No implementation for dither controls implemented for this GPU //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetDitherControl(NvU32 displayId, NV_GPU_DITHER_CONTROL *pDitherData); //! \ingroup gpucsc //! @{ #define NVAPI_CSC_MATRIX_WIDTH 3 #define NVAPI_CSC_MATRIX_HEIGHT 4 //! Colorspace conversion typedef struct _NVAPI_CSC_MATRIX { NvU32 useCustomMatrix : 1; //!< If this value is 0, aCSCCoeff values are ignored. NvU32 reserved : 31; //!< Reserved for future expansion float aCSCCoeff [NVAPI_CSC_MATRIX_WIDTH][NVAPI_CSC_MATRIX_HEIGHT]; //!< 3x4 matrix of CSC coefficients } NVAPI_CSC_MATRIX; //! Enum of predefined colorspaces that are supported typedef enum _NV_STANDARD_COLORSPACE { NV_STANDARD_COLORSPACE_DISABLED = 0, //!< CSC disabled, user matrices ignored NV_STANDARD_COLORSPACE_AUTOSELECT = 1, //!< Source colorspace is sRGB, output colorspace is defined by display EDID colorimetry info, plus user matrices if indicated NV_STANDARD_COLORSPACE_sRGB = 2, //!< sRGB colorspace, plus user matrices if indicated NV_STANDARD_COLORSPACE_MONITOR_RGB = 3, //!< Colorspace is defined by display EDID colorimetry info, plus user matrices if indicated NV_STANDARD_COLORSPACE_ADOBE_RGB = 4, //!< Adobe RGB colorspace, plus user matrices if indicated NV_STANDARD_COLORSPACE_ADOBE_WIDE_GAMUT = 5, //!< Adobe Wide Gamut RGB colorspace, plus user matrices if indicated NV_STANDARD_COLORSPACE_APPLE = 6, //!< Apple RGB colorspace, plus user matrices if indicated NV_STANDARD_COLORSPACE_NTSC = 7, //!< NTSC RGB colorspace, plus user matrices if indicated NV_STANDARD_COLORSPACE_HDTV = 8, //!< HDTV Rec709 RGB colorspace, plus user matrices if indicated NV_STANDARD_COLORSPACE_PAL = 9, //!< PAL/SECAM RGB colorspace, plus user matrices if indicated NV_STANDARD_COLORSPACE_DCIP3 = 10, //!< DCI-P3 (SMPTE-431-2) RGB colorspace, plus user matrices if indicated NV_STANDARD_COLORSPACE_BT2020 = 11, //!< BT2020 (ITU-R BT2020) RGB colorspace, plus user matrices if indicated NV_STANDARD_COLORSPACE_BT2020_PQ = 12, //!< BT2020 (ITU-R BT2020) RGB colorspace with PQ (SMPTE 2084) gamma, plus user matrices if indicated NV_STANDARD_COLORSPACE_MAX //!< Max valid value +1, for range checking } NV_STANDARD_COLORSPACE; //! Enum of colorspace status flags typedef enum _NV_COLORSPACE_CONVERSION_STATUS_FLAG { NV_COLORSPACE_CONVERSION_STATUS_FLAG_USER_MATRIX_RANGE_CLAMPED = NV_BIT(0), //!< If User Matrix coefficients were out of range, this flag means some values were automatically clamped to range NV_COLORSPACE_CONVERSION_STATUS_FLAG_SW_EMULATION = NV_BIT(1), //!< If present, CSC is performed by pixel shaders. Otherwise, CSC is done in dedicated hardware NV_COLORSPACE_CONVERSION_STATUS_FLAG_INFOFRAME_EXT_COLORIMETRY = NV_BIT(2), //!< If present, extended colorimetry bits have been set in AVI InfoFrame colorimetry data block } NV_COLORSPACE_CONVERSION_STATUS_FLAG; //! Param struct used by SetCSC and GetCSC typedef struct _NV_GPU_COLORSPACE_CONVERSION_V1 { NvU32 version; //!< Structure version NV_STANDARD_COLORSPACE sourceColorSpace; //!< Specify a predefined colorspace configuration that represents the source material NV_STANDARD_COLORSPACE outputColorSpace; //!< Specify a predefined colorspace configuration to output NvU32 flags; //!< Combination of NV_COLORSPACE_CONVERSION_STATUS_FLAGs NvU32 clientID; //!< Deprecated NVAPI_CSC_MATRIX MatrixPre; //!< Custom CSC Matrix, applied in preorder to colorspace config transform NVAPI_CSC_MATRIX MatrixPost; //!< Custom CSC Matrix, applied in postorder to colorspace config transform } NV_GPU_COLORSPACE_CONVERSION_V1; #define NV_GPU_COLORSPACE_CONVERSION_VER1 MAKE_NVAPI_VERSION(NV_GPU_COLORSPACE_CONVERSION_V1,1) #define NVAPI_CSC_LUT_SIZE 1024 typedef struct _NV_COLOR_RGB { float Red; float Green; float Blue; } NV_COLOR_RGB; //! Param struct V2 used by SetCSC and GetCSC typedef struct _NV_GPU_COLORSPACE_CONVERSION_V2 { NvU32 version; //!< Structure version NV_STANDARD_COLORSPACE sourceColorSpace; //!< Specify a predefined colorspace configuration that represents the source material NV_STANDARD_COLORSPACE outputColorSpace; //!< Specify a predefined colorspace configuration to output NvU32 flags; //!< Combination of NV_COLORSPACE_CONVERSION_STATUS_FLAGs NvU32 clientID; //!< Deprecated NVAPI_CSC_MATRIX MatrixPre; //!< Custom CSC Matrix, applied in preorder to colorspace config transform NVAPI_CSC_MATRIX MatrixPost; //!< Custom CSC Matrix, applied in postorder to colorspace config transform NV_COLOR_RGB* pDeGammaLut; //!< Optional de-gamma LUT data for RGB channels NV_COLOR_RGB* pReGammaLut; //!< Optional re-gamma LUT data for RGB channels void* pLutData; //!< Pointer to combined LUTs data buffer NvU32 lutDataSize; //!< Size of the LUTs data buffer } NV_GPU_COLORSPACE_CONVERSION_V2; #define NV_GPU_COLORSPACE_CONVERSION_VER2 MAKE_NVAPI_VERSION(NV_GPU_COLORSPACE_CONVERSION_V2, 2) //! Enum of supported 3D LUT sizes //! 3 indicates RGB channels while 4 indicates FP32 typedef enum _NV_CSC_3DLUT_SIZE { NV_CSC_3DLUT_SIZE_ZERO = 0, NV_CSC_3DLUT_SIZE_17x17x17 = sizeof(NV_COLOR_RGB) * 17 * 17 * 17, NV_CSC_3DLUT_SIZE_32x32x32 = sizeof(NV_COLOR_RGB) * 32 * 32 * 32, NV_CSC_3DLUT_SIZE_64x64x64 = sizeof(NV_COLOR_RGB) * 64 * 64 * 64 } NV_CSC_3DLUT_SIZE; //! Enum of 3D LUT transform placement in CSC pipeline : after the 3x4 CSC matrix (default) //! or at the head of CSC pipeline before the 1-st 1D LUT typedef enum _NV_CSC_3DLUT_PLACEMENT { NV_CSC_3DLUT_PLACEMENT_POST_MATRIX = 0, NV_CSC_3DLUT_PLACEMENT_PRE_FIRST_1DLUT = 1, } NV_CSC_3DLUT_PLACEMENT; //! Param struct V3 used by SetCSC and GetCSC typedef struct _NV_GPU_COLORSPACE_CONVERSION_V3 { NvU32 version; //!< Structure version NV_STANDARD_COLORSPACE sourceColorSpace; //!< Specify a predefined colorspace configuration that represents the source material NV_STANDARD_COLORSPACE outputColorSpace; //!< Specify a predefined colorspace configuration to output NvU32 flags; //!< Combination of NV_COLORSPACE_CONVERSION_STATUS_FLAGs NvU32 clientID; //!< Deprecated NVAPI_CSC_MATRIX MatrixPre; //!< Custom CSC Matrix, applied in preorder to colorspace config transform NVAPI_CSC_MATRIX MatrixPost; //!< Custom CSC Matrix, applied in postorder to colorspace config transform NV_COLOR_RGB* pDeGammaLut; //!< Optional de-gamma LUT data for RGB channels NV_COLOR_RGB* pReGammaLut; //!< Optional re-gamma LUT data for RGB channels void* pLutData; //!< Pointer to combined LUTs data buffer NvU32 lutDataSize; //!< Size of the LUTs data buffer NV_COLOR_RGB* p3dLut; //!< Optional 3D LUT data for RGB channels NV_CSC_3DLUT_SIZE lut3dDataSize; //!< Size of the 3D LUTs to use NV_CSC_3DLUT_PLACEMENT lut3dPlacement; //!< 3D LUT transform placement in CSC pipeline } NV_GPU_COLORSPACE_CONVERSION_V3; typedef NV_GPU_COLORSPACE_CONVERSION_V3 NV_GPU_COLORSPACE_CONVERSION; #define NV_GPU_COLORSPACE_CONVERSION_VER3 MAKE_NVAPI_VERSION(NV_GPU_COLORSPACE_CONVERSION_V3, 3) #define NV_GPU_COLORSPACE_CONVERSION_VER NV_GPU_COLORSPACE_CONVERSION_VER3 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetColorSpaceConversion // // //! DESCRIPTION: Returns the colorspace conversion configuration currently applied by the GPU //! //! USAGE: Sequence of calls which caller should make to get the information. //! 1. First call NvAPI_GPU_GetColorSpaceConversion() with NV_GPU_COLORSPACE_CONVERSION::lutDataSize set to zero to get the size of the optional LUTs data buffer. //! 2. Allocate memory for LUTs data buffer in NV_GPU_COLORSPACE_CONVERSION::pLutData depending on the returned data buffer size in lutDataSize field. //! 3. Call NvAPI_GPU_GetColorSpaceConversion() again with the valid pointer to the allocated LUTs data buffer to get LUTs arrays //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Address of target active GPU output //! \param [out] pColorData Current color space conversion configuration data //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \ingroup gpucsc /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetColorSpaceConversion(NvU32 displayId, NV_GPU_COLORSPACE_CONVERSION *pColorData); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_SetColorSpaceConversion // // //! DESCRIPTION: Sets the colorspace conversion matrix //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Address of target active GPU output //! \param [in] colorData New color space conversion data //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \ingropup gpucsc /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetColorSpaceConversion(NvU32 displayId, NV_GPU_COLORSPACE_CONVERSION *pColorData); /////////////////////////////////////////////////////////////////////////////////// // GPU topology reconfiguration APIs. // Provides ability to define one or more SLI devices and standalone GPU topology. // // NV_GPU_TOPOLOGY - this structure defines a set of all GPUs present in a system. All GPUs with // the same parentNdx value describe a single logical GPU. GPUs that have a unique parentNdx // represent standalone GPUs. // // The values returned in parentNdx are arbitrary. They are only used to determine which // physical GPUs will belong to the same logical-GPU. // //! \addtogroup gputopology //! @{ //! Used in NV_GPU_TOPOLOGY typedef enum { NV_GPU_TOPOLOGY_STATUS_OK = 0x00000000,//!< SLI is capable, topology "status" field indicates this state. NV_GPU_TOPOLOGY_STATUS_INVALID_GPU_COUNT = 0x00000001,//!< SLI is NOT capable, "pStatus" param in NvAPI_GetValidGpuTopologies() indicates these states. NV_GPU_TOPOLOGY_STATUS_OS_NOT_SUPPORTED = 0x00000002, NV_GPU_TOPOLOGY_STATUS_OS_ERROR = 0x00000004, NV_GPU_TOPOLOGY_STATUS_NO_VIDLINK = 0x00000008, NV_GPU_TOPOLOGY_STATUS_INSUFFICIENT_LINK_WIDTH = 0x00000010, NV_GPU_TOPOLOGY_STATUS_CPU_NOT_SUPPORTED = 0x00000020, NV_GPU_TOPOLOGY_STATUS_GPU_NOT_SUPPORTED = 0x00000040, NV_GPU_TOPOLOGY_STATUS_BUS_NOT_SUPPORTED = 0x00000080, NV_GPU_TOPOLOGY_STATUS_NON_APPROVED_CHIPSET = 0x00000100, NV_GPU_TOPOLOGY_STATUS_VBIOS_NOT_SUPPORTED = 0x00000200, //!< DEPRECATED - Do not use! NV_GPU_TOPOLOGY_STATUS_GR_MISMATCH = NV_GPU_TOPOLOGY_STATUS_VBIOS_NOT_SUPPORTED, NV_GPU_TOPOLOGY_STATUS_GPU_MISMATCH = 0x00000400, NV_GPU_TOPOLOGY_STATUS_ARCH_MISMATCH = 0x00000800, NV_GPU_TOPOLOGY_STATUS_IMPL_MISMATCH = 0x00001000, NV_GPU_TOPOLOGY_STATUS_SLI_WITH_TCC_NOT_SUPPORTED = 0x00002000, NV_GPU_TOPOLOGY_STATUS_NON_PCIE_BUS = 0x00004000, NV_GPU_TOPOLOGY_STATUS_FB_MISMATCH = 0x00008000, NV_GPU_TOPOLOGY_STATUS_VBIOS_MISMATCH = 0x00010000, NV_GPU_TOPOLOGY_STATUS_NVIDIA_RTX_MISMATCH = 0x00020000, //!< This GPU is not matching the corresponding NVIDIA RTX SLI GPU NV_GPU_TOPOLOGY_STATUS_QUADRO_MISMATCH = NV_GPU_TOPOLOGY_STATUS_NVIDIA_RTX_MISMATCH, //!< DEPRECATED name - do not use NV_GPU_TOPOLOGY_STATUS_BUS_TOPOLOGY_ERROR = 0x00040000, NV_GPU_TOPOLOGY_STATUS_PCI_ID_MISMATCH = 0x00080000, NV_GPU_TOPOLOGY_STATUS_CONFIGSPACE_ACCESS_ERROR = 0x00100000, NV_GPU_TOPOLOGY_STATUS_INCONSISTENT_CONFIG_SPACE = 0x00200000, NV_GPU_TOPOLOGY_STATUS_CONFIG_NOT_SUPPORTED = 0x00400000, NV_GPU_TOPOLOGY_STATUS_RM_NOT_SUPPORTED = 0x00800000, NV_GPU_TOPOLOGY_STATUS_TOPOLOGY_NOT_ALLOWED = 0x01000000, NV_GPU_TOPOLOGY_STATUS_MOBILE_MISMATCH = 0x02000000,//!< The system has a mix of notebook and desktop GPUs. NV_GPU_TOPOLOGY_STATUS_GPU_DRAINING = 0x04000000,//!< The GPU is in the "drain" state NV_GPU_TOPOLOGY_STATUS_INSUFFICIENT_FB = 0x08000000, NV_GPU_TOPOLOGY_STATUS_ECC_MISMATCH = 0x10000000,//!< The ECC state of the GPUs in the topology is mismatched NV_GPU_TOPOLOGY_STATUS_SLI_COOKIE_NOT_PRESENT = 0x20000000, //!< The required SLI cookie has not been found NV_GPU_TOPOLOGY_STATUS_SLI_FINGER_NOT_SUPPORTED = 0x40000000, //!< The SLI bridge is connected on the wrong finger NV_GPU_TOPOLOGY_STATUS_SLI_WITH_ECC_NOT_SUPPORTED = 0x80000000, //!< SLI + ECC is not supported on Quadro/NVIDIA RTX } NV_GPU_TOPOLOGY_STATUS_FLAGS; //! Used in NvAPI_SetGpuTopologies() typedef enum { NV_SET_GPU_TOPOLOGY_DEFER_APPLY = 0x00000001,//!< Calling application controls the reload of the display driver NV_SET_GPU_TOPOLOGY_DEFER_3D_APP_SHUTDOWN = 0x00000002,//!< Calling application will control the shutdown of 3d applications holding hw resources NV_SET_GPU_TOPOLOGY_DEFER_DISPLAY_RECONFIG = 0x00000004,//!< Calling application will control the display configuration required for the settopology to work NV_SET_GPU_TOPOLOGY_RELOAD_DRIVER = 0x80000000,//!< Calling application requesting force reload given correct topology. NV_SET_GPU_TOPOLOGY_DEFER_DISPLAY_REAPPLY = 0x00000008,//!< Calling application will control the display configuration after the settopology returns. } NV_SET_GPU_TOPOLOGY_FLAGS; //! Used in NV_GPU_TOPOLOGY. //! All of these flags are read-only unless otherwise noted in NvAPI_SetGpuTopologies(). typedef enum { NV_GPU_TOPOLOGY_ACTIVE = 0x00000001,//!< This topology is currently active. NV_GPU_TOPOLOGY_VIDLINK_PRESENT = 0x00000002,//!< Video link betweem all GPUs is present (physically bridged). NV_GPU_TOPOLOGY_MULTIGPU = 0x00000004,//!< This is a "multi-GPU" labelled topology. NV_GPU_TOPOLOGY_GX2_BOARD = 0x00000008,//!< GPUs comprising this topology are "Dagwoods". NV_GPU_TOPOLOGY_DYNAMIC_NOT_ALLOWED = 0x00000010,//!< Dynamically switching to SLI is not allowed, but requires a reboot. NV_GPU_TOPOLOGY_ACTIVE_IMPLICIT = 0x00000020,//!< Implicit read only SLI is ACTIVE on this topology of GPU. NvAPI_SetHybridMode() can be used to disable this topology. NV_GPU_TOPOLOGY_ENABLE_SLI_BY_DEFAULT = 0x00000040,//!< SLI must be enabled by default, otherwise SLI is optional NV_GPU_TOPOLOGY_ENABLE_CORELOGIC_BROADCAST = 0x00000080,//!< Deprecated. Do not use this value. NV_GPU_TOPOLOGY_BROADCAST = 0x00000100,//!< Broadcast mode is enabled NV_GPU_TOPOLOGY_UNICAST = 0x00000200,//!< Unicast mode enabled NV_GPU_TOPOLOGY_4_WAY_SLI = 0x00000400,//!< This is a "4-Way-SLI"-labeled topology. NV_GPU_TOPOLOGY_WS_OVERRIDE = 0x00000800,//!< The VBIOS indicates we can ignore card type (mobile/Quadro/GeForce) intinded for bringup testing only. NV_GPU_TOPOLOGY_NO_BRIDGE_REQUIRED = 0x00001000,//!< No bridge is required for that topology NV_GPU_TOPOLOGY_PREPASCAL = 0x00002000,//!< This topology has a pre-Pascal GPU. NV_GPU_TOPOLOGY_COMPUTE = 0x00010000,//!< GPUs in this topology are for SLI compute. //!< All GPUs of this SLI compute group can be enumerated using NvAPI_GPU_CudaEnumComputeCapableGpus(). NV_GPU_TOPOLOGY_SLIMULTIMON = 0x00020000,//!< This topology allows multi-display SLI output. NV_GPU_TOPOLOGY_VIDLINK_CONNECTOR_PRESENT = 0x00040000,//!< Video link connectors on all GPUs are present (but not necessarily connected). NV_GPU_TOPOLOGY_VIEW_CAN_SPAN_GPUS = 0x00080000,//!< This topology allows multi-display SLI output across GPUs. NV_GPU_TOPOLOGY_DRIVER_RELOADING = 0x00100000,//!< The display driver for this topology is currently being reloaded. NV_GPU_TOPOLOGY_BASE_MOSAIC = 0x00200000,//!< This topology is only for Base Mosaic mode. NV_GPU_TOPOLOGY_ALLOW_SLI_MOSAIC = 0x00400000,//!< This topology will allow SLI Mosaic mode. NV_GPU_TOPOLOGY_ALLOW_SLI_MOSAIC_ONLY = 0x00800000,//!< This topology will allow SLI Mosaic Only. Also, SLI without mosaic is not available. NV_GPU_TOPOLOGY_DUAL_MIO = 0x01000000,//!< The GPUs in this topology are configured for Dual MIO NV_GPU_TOPOLOGY_GPUS_DUAL_MIO_CAPABLE = 0x02000000,//!< The GPUs in this topology are capable of Dual MIO NV_GPU_TOPOLOGY_NVLINK_PRESENT = 0x04000000,//!< NvLink between GPUS is present. NV_GPU_TOPOLOGY_NVLINK_CONNECTOR_PRESENT = 0x08000000,//!< NvLink connectors on all GPUs are present (not necessarily connected). NV_GPU_TOPOLOGY_DUAL_MIO_OPTIMAL = 0x10000000,//!< For dualMIO capable systems this topology is optimal for currently connected displays. NV_GPU_TOPOLOGY_ALLOW_SLI_BASE_MOSAIC = 0x20000000,//!< This topology will allow SLI and Base Mosaic Mode. NV_GPU_TOPOLOGY_DUAL_MIO_POSSIBLE = 0x40000000,//!< DualMIO is possible on this topology NV_GPU_TOPOLOGY_HIGH_SPEED_VIDEO_BRIDGE = 0x80000000,//!< The GPUs in this topology are connected with a high speed bridge } NV_GPU_TOPOLOGY_FLAGS; typedef enum { NV_SLI_GROUP_ACTIVE = 0x00000001,//!< This SLI group is currently active. } NV_SLI_GROUP_FLAGS; //! Used in NV_GPU_TOPOLOGIES. //! This structure defines a set of all GPUs present in a system. All GPUs with //! the same parentNdx value describe a single logical GPU. GPUs that have a unique parentNdx //! represent standalone GPUs. \n //! The values returned in parentNdx are arbitrary. They are only used to determine which //! physical GPUs belong to the same logical-GPU. typedef struct { NvU32 version; //!< Structure version NvU32 gpuCount; //!< Count of GPUs in this topology NvPhysicalGpuHandle hPhysicalGpu[NVAPI_MAX_GPU_PER_TOPOLOGY]; //!< Array of GPU handles NvU32 displayGpuIndex; //!< Index of the display GPU owner in the GPU array NvU32 displayOutputTargetMask; //!< Target device mask NvU32 flags; //!< One or more topology flags from NV_GPU_TOPOLOGY_FLAGS NvU32 status; //!< Indicates one of the flags in NV_GPU_TOPOLOGY_STATUS_FLAGS } NV_GPU_TOPOLOGY_V1; //! Macro for constructing the version field of NV_GPU_TOPOLOGY_V1 #define NV_GPU_TOPOLOGY_VER_1 MAKE_NVAPI_VERSION(NV_GPU_TOPOLOGY_V1,1) //! Used in NV_GPU_TOPOLOGIES. //! This structure defines a set of all GPUs present in a system. All GPUs with //! the same parentNdx value describe a single logical GPU. GPUs that have a unique parentNdx //! represent standalone GPUs. \n //! The values returned in parentNdx are arbitrary. They are only used to determine which //! physical GPUs belong to the same logical-GPU. typedef struct { NvU32 version; //!< Structure version NvU32 gpuCount; //!< Count of GPUs in this topology NvPhysicalGpuHandle hPhysicalGpu[NVAPI_MAX_GPU_PER_TOPOLOGY]; //!< Array of GPU handles NvU32 displayGpuIndex; //!< Index of the display GPU owner in the GPU array union { NvU32 displayOutputTargetMask; //!< Target device mask NvU32 displayId; //!< Target displayId }; NvU32 noDisplayGpuMask; //!< Index mask in the hPhysicalGpu[] array pointing to GPUs that cannot display when SLI is enabled NvU32 flags; //!< One or more topology flags from NV_GPU_TOPOLOGY_FLAGS NvU32 status; //!< Indicates one or more of the flags defined in NV_GPU_TOPOLOGY_STATUS_FLAGS } NV_GPU_TOPOLOGY_V2; //! Macro for constructing the version field of NV_GPU_TOPOLOGY_V2 #define NV_GPU_TOPOLOGY_VER_2 MAKE_NVAPI_VERSION(NV_GPU_TOPOLOGY_V2,2) #define NV_GPU_TOPOLOGY NV_GPU_TOPOLOGY_V2 #define NV_GPU_TOPOLOGY_VER NV_GPU_TOPOLOGY_VER_2 typedef struct { NvU32 version; //!< Structure version NvU64 topologyMask; //!< Mask of indexes in gpuTopo NvU32 flags; //!< One or more SLI group flags from NV_GPU_SLI_GROUP_FLAGS } NV_SLI_GROUP; //! Macro for constucting the version field of NV_SLI_GROUP #define NV_GPU_SLI_GROUP_VER MAKE_NVAPI_VERSION(NV_SLI_GROUP,1) //! First version of NV_GPU_TOPOLOGIES typedef struct { NvU32 version; //!< Structure version NvU32 gpuTopoCount; //!< Count of valid topologies NV_GPU_TOPOLOGY_V1 gpuTopo[NVAPI_MAX_AVAILABLE_GPU_TOPOLOGIES];//!< Maximum number of GPU topologies } NV_GPU_TOPOLOGIES_V1; //! Macro for constructing the version field of NV_GPU_TOPOLOGIES_V1 #define NV_GPU_TOPOLOGIES_VER_1 MAKE_NVAPI_VERSION(NV_GPU_TOPOLOGIES_V1,1) //! Second version of NV_GPU_TOPOLOGIES typedef struct { NvU32 version; //!< Structure version NvU32 gpuTopoCount; //!< Count of valid topologies NV_GPU_TOPOLOGY_V1 gpuTopo[NVAPI_MAX_AVAILABLE_GPU_TOPOLOGIES];//!< Maximum gputopologies NvU32 sliGroupCount; //!< Count of valid SLI groups NV_SLI_GROUP sliGroup[NVAPI_MAX_AVAILABLE_SLI_GROUPS]; //!< Maximum SLI groups } NV_GPU_TOPOLOGIES_V2; //! Macro for constructing the version field of NV_GPU_TOPOLOGIES_V2 #define NV_GPU_TOPOLOGIES_VER_2 MAKE_NVAPI_VERSION(NV_GPU_TOPOLOGIES_V2,2) //! Used in NvAPI_GetValidGpuTopologies() and NvAPI_SetGpuTopologies() typedef struct { NvU32 version; //!< Structure version NvU32 gpuTopoCount; //!< Count of valid topologies NV_GPU_TOPOLOGY gpuTopo[NVAPI_MAX_AVAILABLE_GPU_TOPOLOGIES];//!< Maximum number of GPU topologies NvU32 sliGroupCount; //!< Count of valid SLI groups NV_SLI_GROUP sliGroup[NVAPI_MAX_AVAILABLE_SLI_GROUPS]; //!< Maximum number of SLI groups } NV_GPU_TOPOLOGIES; //! Macro for constructing the version field of NV_GPU_TOPOLOGIES #define NV_GPU_TOPOLOGIES_VER MAKE_NVAPI_VERSION(NV_GPU_TOPOLOGIES,3) #define NV_GPU_VALID_GPU_TOPOLOGIES NV_GPU_TOPOLOGIES #define NV_GPU_INVALID_GPU_TOPOLOGIES NV_GPU_TOPOLOGIES #define NV_GPU_VALID_GPU_TOPOLOGIES_VER NV_GPU_TOPOLOGIES_VER #define NV_GPU_INVALID_GPU_TOPOLOGIES_VER NV_GPU_TOPOLOGIES_VER #define NV_GPU_VALID_GPU_TOPOLOGIES_V1 NV_GPU_TOPOLOGIES_V1 #define NV_GPU_INVALID_GPU_TOPOLOGIES_V1 NV_GPU_TOPOLOGIES_V1 #define NV_GPU_VALID_GPU_TOPOLOGIES_VER_1 NV_GPU_TOPOLOGIES_VER_1 #define NV_GPU_INVALID_GPU_TOPOLOGIES_VER_1 NV_GPU_TOPOLOGIES_VER_1 #define NV_GPU_VALID_GPU_TOPOLOGIES_V2 NV_GPU_TOPOLOGIES_V2 #define NV_GPU_INVALID_GPU_TOPOLOGIES_V2 NV_GPU_TOPOLOGIES_V2 #define NV_GPU_VALID_GPU_TOPOLOGIES_VER_2 NV_GPU_TOPOLOGIES_VER_2 #define NV_GPU_INVALID_GPU_TOPOLOGIES_VER_2 NV_GPU_TOPOLOGIES_VER_2 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetValidGpuTopologies // //! This function returns all valid GPU topologies that can be used to configure the physical GPUs //! using the NvAPI_SetGpuTopologies API. It also returns the current active topologies. //! //! This call returns an array of NV_GPU_TOPOLOGY structs; one for each valid configuration //! of GPUs present in the system. Note that this list is constant as long as GPUs remain in the //! same slots in the system. It is not affected by which GPUs are presently in use. //! NV_GPU_TOPOLOGY.displayGpuIndex returned will match the boot GPU if it exists as an active topology. //! If it not an active topology, it points to the "first" GPU that has a display monitor connected. //! //! This call also returns an array of NV_SLI_GROUP, describing the list of topology combinations //! that can be enabled at the same time. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \param [out] ptopology An array of *pCount (OUT) topology structures. Use NvAPI_SetGpuTopologies() to set up //! one or several of these GPU topologies. //! \param [out] sliGroup An array of *sliGroupCount (OUT) SLI goup structures, describing which topologies //! can be set up concurrently. //! \param [out] pStatus Any system status returned in case zero topology is retrieved. //! System status is one or more flags in ::NV_GPU_TOPOLOGY_STATUS_FLAGS when SLI is NOT capable. //! //! \retval ::NVAPI_OK Call succeeded; If SLI is supported then one or more GPU topologies are returned; else zero topologies are returned. //! \retval ::NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval ::NVAPI_ERROR Miscellaneous Error. //! //! \ingroup gputopology /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetValidGpuTopologies(NV_GPU_VALID_GPU_TOPOLOGIES *pTopology, NvU32 *pStatus); /////////////////////////////////////////////////////////////////////////////////// // I2C API // Provides ability to read or write data using I2C protocol. // These APIs allow I2C access only to DDC monitors //! \addtogroup i2capi //! @{ #define NVAPI_MAX_SIZEOF_I2C_DATA_BUFFER 4096 #define NVAPI_MAX_SIZEOF_I2C_REG_ADDRESS 4 #define NVAPI_DISPLAY_DEVICE_MASK_MAX 24 #define NVAPI_I2C_SPEED_DEPRECATED 0xFFFF typedef enum { NVAPI_I2C_SPEED_DEFAULT, //!< Set i2cSpeedKhz to I2C_SPEED_DEFAULT if default I2C speed is to be chosen, ie.use the current frequency setting. NVAPI_I2C_SPEED_3KHZ, NVAPI_I2C_SPEED_10KHZ, NVAPI_I2C_SPEED_33KHZ, NVAPI_I2C_SPEED_100KHZ, NVAPI_I2C_SPEED_200KHZ, NVAPI_I2C_SPEED_400KHZ, } NV_I2C_SPEED; //! Used in NvAPI_I2CRead() and NvAPI_I2CWrite() typedef struct { NvU32 version; //!< The structure version. NvU32 displayMask; //!< The Display Mask of the concerned display. NvU8 bIsDDCPort; //!< This flag indicates either the DDC port (TRUE) or the communication port //!< (FALSE) of the concerned display. NvU8 i2cDevAddress; //!< The address of the I2C slave. The address should be shifted left by one. For //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored //!< here as 0xA0. This matches the position within the byte sent by the master, as //!< the last bit is reserved to specify the read or write direction. NvU8* pbI2cRegAddress; //!< The I2C target register address. May be NULL, which indicates no register //!< address should be sent. NvU32 regAddrSize; //!< The size in bytes of target register address. If pbI2cRegAddress is NULL, this //!< field must be 0. NvU8* pbData; //!< The buffer of data which is to be read or written (depending on the command). NvU32 cbSize; //!< The size of the data buffer, pbData, to be read or written. NvU32 i2cSpeed; //!< The target speed of the transaction (between 28Kbps to 40Kbps; not guaranteed). } NV_I2C_INFO_V1; //! Used in NvAPI_I2CRead() and NvAPI_I2CWrite() typedef struct { NvU32 version; //!< The structure version. NvU32 displayMask; //!< The Display Mask of the concerned display. NvU8 bIsDDCPort; //!< This flag indicates either the DDC port (TRUE) or the communication port //!< (FALSE) of the concerned display. NvU8 i2cDevAddress; //!< The address of the I2C slave. The address should be shifted left by one. For //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored //!< here as 0xA0. This matches the position within the byte sent by the master, as //!< the last bit is reserved to specify the read or write direction. NvU8* pbI2cRegAddress; //!< The I2C target register address. May be NULL, which indicates no register //!< address should be sent. NvU32 regAddrSize; //!< The size in bytes of target register address. If pbI2cRegAddress is NULL, this //!< field must be 0. NvU8* pbData; //!< The buffer of data which is to be read or written (depending on the command). NvU32 cbSize; //!< The size of the data buffer, pbData, to be read or written. NvU32 i2cSpeed; //!< Deprecated, Must be set to NVAPI_I2C_SPEED_DEPRECATED. NV_I2C_SPEED i2cSpeedKhz; //!< The target speed of the transaction in (kHz) (Chosen from the enum NV_I2C_SPEED). } NV_I2C_INFO_V2; //! Used in NvAPI_I2CRead() and NvAPI_I2CWrite() typedef struct { NvU32 version; //!< The structure version. NvU32 displayMask; //!< The Display Mask of the concerned display. NvU8 bIsDDCPort; //!< This flag indicates either the DDC port (TRUE) or the communication port //!< (FALSE) of the concerned display. NvU8 i2cDevAddress; //!< The address of the I2C slave. The address should be shifted left by one. For //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored //!< here as 0xA0. This matches the position within the byte sent by the master, as //!< the last bit is reserved to specify the read or write direction. NvU8* pbI2cRegAddress; //!< The I2C target register address. May be NULL, which indicates no register //!< address should be sent. NvU32 regAddrSize; //!< The size in bytes of target register address. If pbI2cRegAddress is NULL, this //!< field must be 0. NvU8* pbData; //!< The buffer of data which is to be read or written (depending on the command). NvU32 cbSize; //!< The size of the data buffer, pbData, to be read or written. NvU32 i2cSpeed; //!< Deprecated, Must be set to NVAPI_I2C_SPEED_DEPRECATED. NV_I2C_SPEED i2cSpeedKhz; //!< The target speed of the transaction in (kHz) (Chosen from the enum NV_I2C_SPEED). NvU8 portId; //!< The portid on which device is connected (remember to set bIsPortIdSet if this value is set) //!< Optional for pre-Kepler NvU32 bIsPortIdSet; //!< set this flag on if and only if portid value is set } NV_I2C_INFO_V3; typedef NV_I2C_INFO_V3 NV_I2C_INFO; #define NV_I2C_INFO_VER3 MAKE_NVAPI_VERSION(NV_I2C_INFO_V3,3) #define NV_I2C_INFO_VER2 MAKE_NVAPI_VERSION(NV_I2C_INFO_V2,2) #define NV_I2C_INFO_VER1 MAKE_NVAPI_VERSION(NV_I2C_INFO_V1,1) #define NV_I2C_INFO_VER NV_I2C_INFO_VER3 //! @} /***********************************************************************************/ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_I2CRead // //! This function reads the data buffer from the I2C port. //! The I2C request must be for a DDC port: pI2cInfo->bIsDDCPort = 1. //! //! A data buffer size larger than 16 bytes may be rejected if a register address is specified. In such a case, //! NVAPI_ARGUMENT_EXCEED_MAX_SIZE would be returned. //! //! If a register address is specified (i.e. regAddrSize is positive), then the transaction will be performed in //! the combined format described in the I2C specification. The register address will be written, followed by //! reading into the data buffer. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [out] NV_I2C_INFO *pI2cInfo The I2C data input structure //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide). //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION Structure version is not supported. //! \retval NVAPI_INVALID_ARGUMENT - argument does not meet specified requirements //! \retval NVAPI_ARGUMENT_EXCEED_MAX_SIZE - an argument exceeds the maximum //! //! \ingroup i2capi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_I2CRead(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_I2CWrite // //! This function writes the data buffer to the I2C port. //! //! The I2C request must be for a DDC port: pI2cInfo->bIsDDCPort = 1. //! //! A data buffer size larger than 16 bytes may be rejected if a register address is specified. In such a case, //! NVAPI_ARGUMENT_EXCEED_MAX_SIZE would be returned. //! //! If a register address is specified (i.e. regAddrSize is positive), then the register address will be written //! and the data buffer will immediately follow without a restart. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in] pI2cInfo The I2C data input structure //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide). //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION Structure version is not supported. //! \retval NVAPI_INVALID_ARGUMENT Argument does not meet specified requirements //! \retval NVAPI_ARGUMENT_EXCEED_MAX_SIZE Argument exceeds the maximum //! //! \ingroup i2capi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_I2CWrite(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo); //! \addtogroup i2capi //! @{ #define NVAPI_I2C_FLAGS_NONE 0 //!< None #define NVAPI_I2C_FLAGS_PRIVILEGE 0x1 //!< Used in NV_I2C_INFO_EX. #define NVAPI_I2C_FLAGS_DATA_ENCRYPTED 0x2 //!< Encrypted I2C has been deprecated. #define NVAPI_I2C_FLAGS_NONSTD_SI1930UC 0x4 //!< Used in NV_I2C_INFO_EX. #define NVAPI_I2C_FLAGS_FORCE_MOT 0x8 //!< Currently supports only DP and Vista above. //!< Forces MOT bit on irrespective of size of the data to be passed //!< till transaction is completed #define NVAPI_I2C_FLAGS_PX3540 0x10 //!< Used in NV_I2C_INFO_EX. //! @} //! \ingroup i2capi //! Used in NvAPI_I2CWriteEx() and NvAPI_I2CReadEx(). typedef struct { NvU32 flags; //!< I2C flags for Privileged, encrypted and non-standard Si1930uC i2c access NvU32 encrClientID; //!< Client ID for Encrypted I2C (unused) } NV_I2C_INFO_EX; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_I2CWriteEx // //! DESCRIPTION: This function writes the data buffer to the I2C port. \n //! Pass displayMask as zero, if I2C access is required for non-display devices. //! //! A data buffer size larger than 16 bytes may be rejected if a register address is specified. In such a case, //! NVAPI_ARGUMENT_EXCEED_MAX_SIZE would be returned. //! //! If a register address is specified (i.e. regAddrSize is positive), then the register address will be written //! and the data buffer will immediately follow without a restart. //! //! If a DDC port is passed (bIsDDCPort = 1), then displayMask is a required parameter. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hPhysicalGPU GPU selection //! \param NV_I2C_INFO *pI2cInfo The I2C data input structure //! \param NV_I2C_INFO_EX *pI2cInfoEx The I2C extended data input structure //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide) //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION Structure version is not supported //! \retval NVAPI_INVALID_ARGUMENT Argument does not meet specified requirements //! \retval NVAPI_ARGUMENT_EXCEED_MAX_SIZE Argument exceeds the maximum //! //! \ingroup i2capi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_I2CWriteEx(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo, NV_I2C_INFO_EX *pI2cInfoEx); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_I2CReadEx // //! DESCRIPTION: This function reads the data buffer from the I2C port. //! Please pass displayMask as zero, if I2C access required for non-display devices. //! //! A data buffer size larger than 16 bytes may be rejected if a register address is specified. In such a case, //! NVAPI_ARGUMENT_EXCEED_MAX_SIZE would be returned. //! //! If a register address is specified (i.e. regAddrSize is positive), then the transaction will be performed in //! the combined format described in the I2C specification. The register address will be written, followed by //! reading into the data buffer. //! //! If a DDC port is passed (bIsDDCPort = 1), then displayMask is a required parameter. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hPhysicalGPU GPU selection. //! \param NV_I2C_INFO *pI2cInfo The I2C data input structure //! \param NV_I2C_INFO_EX *pI2cInfoEx The I2C extended data input structure //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide) //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION Structure version is not supported //! \retval NVAPI_INVALID_ARGUMENT Argument does not meet specified requirements //! \retval NVAPI_ARGUMENT_EXCEED_MAX_SIZE An argument exceeds the maximum //! //! \ingroup i2capi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_I2CReadEx(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo, NV_I2C_INFO_EX *pI2cInfoEx); /////////////////////////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetInvalidGpuTopologies // //! DESCRIPTION: This API returns all invalid GPU topologies and the current active topologies. //! This call returns an array of NV_GPU_TOPOLOGY structs; one for each invalid configuration //! of GPUs present in the system. Note that this list is constant while GPUs remain in the //! same slots in the system. It is not affected by which GPUs that are presently in use. //! //! The topologies with the status ::NV_GPU_TOPOLOGY_STATUS_TOPOLOGY_NOT_ALLOWED are valid for //! the system but not for productization. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! //! \param [out] ptopology An array of *pCount (OUT) topology structures. //! \param [out] sliGroup No SLI groups returned here. //! \param [out] sliGroupCount *sliGroupCount = 0. //! //! \retval NVAPI_OK Call succeeded; one or more GPU topologies were returned. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_ERROR Miscellaneous Error. //! //! \ingroup gputopology /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetInvalidGpuTopologies(NV_GPU_INVALID_GPU_TOPOLOGIES *pTopology); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetGpuTopologies // //! This function configures the physical GPUs in the system into one or more logical devices //! defined by the NV_GPU_TOPOLOGY structure. After successful execution of this call, the caller needs to enumerate //! all the GPU handles again. //! //! It is recommended that the calling application: //! - Save the current GPU topology retrieved from NvAPI_EnumLogicalGPUs and NvAPI_GetPhysicalGPUsFromLogicalGPU APIs. //! - Save the current view state for associated displays on these GPUs using the GetView and GetDisplayTargets APIs. //! - Set NV_GPU_TOPOLOGY.displayGpuIndex to the GPU index in the topology with an active display connection. //! - If DEFER_3D_APP_SHUTDOWN is not set, notify the user that all 3D application will be forced to close. //! - Itself does not create 3D handles or objects that can block the topology transition. //! //! On Windows Vista: //! - The calling application must run in elevated mode for the transition to succeed. //! - This API can be called from a system service to derive the elevated context of the System service. //! //! - Running non-migratable applications can prevent a successful transition if DEFER_3D_APP_SHUTDOWN is set. //! - To query non-migratable applications, use the NvAPI_QueryNonMigratableApps() API. //! //! - When enabling more than one multi-GPU topology, set the NV_GPU_TOPOLOGY_SLI_GROUPS flag. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \param [in] pTopology a pointer to the NV_GPU_VALID_GPU_TOPOLOGIES structure defining the desired GPU topologies to be set. //! The set of possible GPU topologies can be first queried using NvAPI_GetValidGpuTopologies. //! \param [in] flags \see NV_SET_GPU_TOPOLOGY_FLAGS //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval NVAPI_TIMEOUT_RECONFIGURING_GPU_TOPO Timeout occurred while reconfiguring GPUs. //! \retval NVAPI_IMPLICIT_SET_GPU_TOPOLOGY_CHANGE_NOT_ALLOWED There is any implicit GPU topology active. Use NVAPI_SetHybridMode() to change the topology. //! \retval NVAPI_REQUEST_USER_TO_CLOSE_NON_MIGRATABLE_APPS Prompt the user to close all non-migratable applications. //! //! \ingroup gputopology /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetGpuTopologies(NV_GPU_VALID_GPU_TOPOLOGIES *pTopology, NvU32 flags); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPerGpuTopologyStatus // //! This function returns per-GPU topology state flags from NV_GPU_TOPOLOGY_STATUS_FLAGS for the queried GPU handle. //! \note The per-GPU topology status can be queried independent of the whether the queried GPU is part of a topology or not. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [out] hPhysicalGPU GPU selection. //! \param [out] pStatus Indicates one or more flags from NV_GPU_TOPOLOGY_STATUS_FLAGS which are the subset of the //! same flags retrieved from NV_GPU_TOPOLOGY.status or pStatus in NvAPI_GetValidGpuTopologies() API. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide) //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle //! \ingroup gputopology /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPerGpuTopologyStatus(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pStatus); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_GetChipSetTopologyStatus // //! This function returns topology state flags from NV_GPU_TOPOLOGY_STATUS_FLAGS possible with the System ChipSet. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [out] pStatus Indicates one or more flags from NV_GPU_TOPOLOGY_STATUS_FLAGS which are the subset of the //! same flags retrieved from NV_GPU_TOPOLOGY.status or pStatus in NvAPI_GetValidGpuTopologies() API. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \ingroup gputopology /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetChipSetTopologyStatus(NvU32 *pStatus); //! \ingroup gpu //! Used in NvAPI_GPU_Get_DisplayPort_DongleInfo(). typedef struct { NvU32 version; //!< Structure version struct{ NvU32 displayMask; //!< This field name should be outputid and will have only one bit set. } input; struct{ NvU32 isDP2DVI:1; //!< Passive DP to DVI Dongle. NvU32 isDP2HDMI:1; //!< Passive DP to HDMI Dongle. NvU32 isDMS592DVI:1; //!< LFH_DVI NvU32 isDMS592VGA:1; //!< LFH_VGA NvU32 isDP2VGA:1; //!< DP to VGA Dongle. NvU32 isDP2DVIActive:1; //!< Active DP to DVI Dongle. NvU32 isDP2HDMIActive:1; //!< Active DP to HDMI Dongle. NvU32 reserved : 25; } output; } NV_NVAPI_GET_DP_DONGLE_INFO; //! \ingroup gpu //! Macro for constructing the version field of NV_NVAPI_GET_DP_DONGLE_INFO #define NV_NVAPI_GET_DP_DONGLE_INFO_VER MAKE_NVAPI_VERSION(NV_NVAPI_GET_DP_DONGLE_INFO,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_Get_DisplayPort_DongleInfo // //! DESCRIPTION: This API gets DisplayPort dongle information, such as DP2DVI or DP2HDMI. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 180 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in,out] pDongleInfo Data input/output structure //! //! \retval ::NVAPI_OK Completed request //! \retval ::NVAPI_ERROR Miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT One or more args are invalid //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_Get_DisplayPort_DongleInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_NVAPI_GET_DP_DONGLE_INFO *pDongleInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_WorkstationFeatureSetup // //! \fn NvAPI_GPU_WorkstationFeatureSetup(NvPhysicalGpuHandle hPhysicalGpu, NvU32 featureEnableMask, NvU32 featureDisableMask) //! DESCRIPTION: This API configures the driver for a set of workstation features. //! The driver can allocate the memory resources accordingly. //! //! SUPPORTED OS: Windows 7 //! //! //! \param [in] hPhysicalGpu Physical GPU Handle of the display adapter to be configured. GPU handles may be retrieved //! using NvAPI_EnumPhysicalGPUs. A value of NULL is permitted and applies the same operation //! to all GPU handles enumerated by NvAPI_EnumPhysicalGPUs. //! \param [in] featureEnableMask Mask of features the caller requests to enable for use //! \param [in] featureDisableMask Mask of features the caller requests to disable //! //! As a general rule, features in the enable and disable masks are expected to be disjoint, although the disable //! mask has precedence and a feature flagged in both masks will be disabled. //! //! \retval ::NVAPI_OK configuration request succeeded //! \retval ::NVAPI_ERROR configuration request failed //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu is not a physical GPU handle. //! \retval ::NVAPI_GPU_WORKSTATION_FEATURE_INCOMPLETE requested feature set does not have all resources allocated for completeness. //! \retval ::NVAPI_NO_IMPLEMENTATION OS below Win7, implemented only for Win7 but returns NVAPI_OK on OS above Win7 to //! keep compatibility with apps written against Win7. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu typedef enum { NVAPI_GPU_WORKSTATION_FEATURE_MASK_SWAPGROUP = 0x00000001, NVAPI_GPU_WORKSTATION_FEATURE_MASK_STEREO = 0x00000010, NVAPI_GPU_WORKSTATION_FEATURE_MASK_WARPING = 0x00000100, NVAPI_GPU_WORKSTATION_FEATURE_MASK_PIXINTENSITY = 0x00000200, NVAPI_GPU_WORKSTATION_FEATURE_MASK_GRAYSCALE = 0x00000400, NVAPI_GPU_WORKSTATION_FEATURE_MASK_BPC10 = 0x00001000 } NVAPI_GPU_WORKSTATION_FEATURE_MASK; //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_WorkstationFeatureSetup(__in NvPhysicalGpuHandle hPhysicalGpu, __in NvU32 featureEnableMask, __in NvU32 featureDisableMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_WorkstationFeatureQuery // //! DESCRIPTION: This API queries the current set of workstation features. //! //! SUPPORTED OS: Windows 7 //! //! //! \param [in] hPhysicalGpu Physical GPU Handle of the display adapter to be configured. GPU handles may be retrieved //! using NvAPI_EnumPhysicalGPUs. //! \param [out] pConfiguredFeatureMask Mask of features requested for use by client drivers //! \param [out] pConsistentFeatureMask Mask of features that have all resources allocated for completeness. //! //! \retval ::NVAPI_OK configuration request succeeded //! \retval ::NVAPI_ERROR configuration request failed //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu is not a physical GPU handle. //! \retval ::NVAPI_NO_IMPLEMENTATION OS below Win7, implemented only for Win7 but returns NVAPI_OK on OS above Win7 to //! keep compatibility with apps written against Win7. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_WorkstationFeatureQuery(__in NvPhysicalGpuHandle hPhysicalGpu, __out_opt NvU32 *pConfiguredFeatureMask, __out_opt NvU32 *pConsistentFeatureMask); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_QueryActiveApps // //! DESCRIPTION: Query all applications running on the specified GPU. //! //! \param [in] hPhysicalGpu Physical GPU Handle for which apps will be retrieved. To get the list of apps on all GPUs, pass NVAPI_DEFAULT_HANDLE. //! \param [in,out] apps Empty structure passed as an input and upon successful exit, it contains list of apps. //! \param [in,out] total Total number of apps currently running. //! //! \deprecated Do not use this function - it is deprecated in release 340. Instead, use NvAPI_GPU_QueryActiveAppsEx. //! SUPPORTED OS: Windows 7 and higher //! //! //! RETURN STATUS: //! NVAPI_OK - completed request //! NVAPI_ERROR - miscellaneous error occurred //! NVAPI_INVALID_ARGUMENT - Invalid input parameter //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 340. Instead, use NvAPI_GPU_QueryActiveAppsEx.") NVAPI_INTERFACE NvAPI_GPU_QueryActiveApps(NvPhysicalGpuHandle hPhysicalGpu, NV_3D_APP_INFO apps[NVAPI_MAX_3D_Apps] , NvU32 *total); #define NV_APP_ALL 0x8fffffff //!< apps which statisfy atleast one of below flags #define NV_APP_3D_CONTEXT 0x00000001 //!< apps which created 3D context #define NV_APP_OPEN_ADAPTER 0x00000002 //!< apps which called open adapter. only supported on optimus system /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_QueryActiveAppsEx // //! DESCRIPTION: Query all applications running on the specified GPU. //! //! HOW TO USE: 1) For the PhysicalGpu, make a call to get count of active apps //! using NvAPI_GPU_QueryActiveAppsEx by passing the apps as NULL //! On successful call: //! 2) Allocate memory based on count then make a call NvAPI_GPU_QueryActiveAppsEx to get apps //! \param [in] hPhysicalGpu Physical GPU Handle for which apps will be retrieved. //! \param [in] flag one or more of NV_APP_*** //! \param [in,out] apps Empty structure passed as an input and upon successful exit, it contains list of apps. //! \param [in,out] count Total number of apps currently running. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! RETURN STATUS: //! NVAPI_OK - completed request //! NVAPI_INVALID_POINTER - An invalid argument pointer was provided. //! For example, //! a) count == NULL, while calling the API. //! NVAPI_ERROR - miscellaneous error occurred //! NVAPI_INVALID_ARGUMENT - Invalid input parameter. //! For example, //! a) apps != NULL && *count == 0 , while calling the API //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_QueryActiveAppsEx(__in NvPhysicalGpuHandle hPhysicalGpu, __in NvU32 flag, __inout NV_3D_APP_INFO *apps , __inout NvU32 *count); //! \ingroup gpugpio //! Used in NV_GPU_GPIO_LEGAL_PINS. #define NVAPI_GPIO_SIZE_QUERY_ARRAY 0x00000020 //! \ingroup gpugpio //! Used in NV_GPU_GPIO_PIN_DATA. typedef enum { NVAPI_GPIO_DIRECTION_INPUT, NVAPI_GPIO_DIRECTION_OUTPUT } NVAPI_GPIO_DIRECTION; //! \ingroup gpugpio //! Used in NvAPI_GPU_GPIOQueryLegalPins(). typedef struct { NvU32 version; NvU32 gpioPinCount; NvU32 gpioLegalPins[NVAPI_GPIO_SIZE_QUERY_ARRAY]; } NV_GPU_GPIO_LEGAL_PINS; //! \ingroup gpugpio //! Macro for generating the version for structure NV_GPU_GPIO_LEGAL_PINS #define NV_GPU_GPIO_LEGAL_PINS_VER MAKE_NVAPI_VERSION(NV_GPU_GPIO_LEGAL_PINS,1) /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_GPIOQueryLegalPins //! //! DESCRIPTION: This function returns the number of available GPIO customer asyncrw instances. //! //! HOW TO USE: //! - NV_GPU_GPIO_LEGAL_PINS gpioLegalPins = {0}; //! - gpioLegalPins.version = NV_GPU_GPIO_LEGAL_PINS_VER; //! - ret = NvAPI_GPU_GPIOQueryLegalPins(hPhysicalGpu, &gpioLegalPins); //! //! On call success: //! - The gpioLegalPins.gpioPinCount would contain some integer (for example, on some G96 GPUs it contains 3) //! - The gpioLegalPins.gpioLegalPins array would contain some values (for example, on some G96 GPUs it contains 0xd, 0xe & 0xf, others //! 0) to be used in NvAPI_GPU_GPIOReadFromPin() & NvAPI_GPU_GPIOWriteToPin() calls. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 175 //! //! \param [in] hPhysicalGpu GPU selection. //! \param [out] pgpioLegalPins Pointer to a versioned structure to get the number of the pin(s) associated with the //! CUSTOMER_ASYNCRW functions and an array of size NVAPI_GPIO_SIZE_QUERY_ARRAY in //! which the legal pin numbers are retrieved. These legal pin numbers are to be used //! while performing read and write operations on the GPIO port. //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_HANDLE physical GPU not found //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_NOT_SUPPORTED //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_API_NOT_INITIALIZED //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION //! //! \ingroup gpugpio /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GPIOQueryLegalPins(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_GPIO_LEGAL_PINS *pgpioLegalPins); //! ingroup gpugpio //! Contains GPIO pin, data, and data direction - used in NvAPI_GPU_GPIOReadFromPin() and NvAPI_GPU_GPIOWriteToPin() typedef struct { NvU32 version; NvU32 gpioPinNumber; NvU32 gpioDataReadWrite; NVAPI_GPIO_DIRECTION gpioDirection; } NV_GPU_GPIO_PIN_DATA; //! \ingroup gpugpio //! Macro for generating the version of structure NV_GPU_GPIO_PIN_DATA #define NV_GPU_GPIO_PIN_DATA_VER MAKE_NVAPI_VERSION(NV_GPU_GPIO_PIN_DATA,1) /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_GPIOReadFromPin //! //! DESCRIPTION: This function reads the data from the specified GPIO pin. //! //! HOW TO USE: First make a NvAPI_GPU_GPIOQueryLegalPins() call. //! - NV_GPU_GPIO_PIN_DATA gpioReadPin = {0}; //! - gpioReadPin.version = NV_GPU_GPIO_PIN_DATA_VER; //! - gpioReadPingpioDirection = NVAPI_GPIO_DIRECTION_INPUT; //! - gpioReadPin.gpioPinNumber = any legal pin data from gpioLegalPins array after successful call to NvAPI_GPU_GPIOQueryLegalPins() //! - ret = NvAPI_GPU_GPIOReadFromPin(hPhysicalGpu, &gpioReadPin); //! //! On call success: //! - The gpioReadPingpioDataReadWrite would contain the data value read (0 or 1) from the specified pin. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 175 //! //! \param [in] hPhysicalGpu GPU selection. //! \param pgpioReadPin Pointer to a versioned structure to pass the GPIO pin number from which the data is //! to be read, the GPIO direction and the variable in which the data is collected. //! The gpioPinNumber parameter is selected from pgpioLegalPins array by calling //! NvAPI_GPU_GPIOQueryLegalPins(). //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_HANDLE //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_API_NOT_INITIALIZED //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION //! \ingroup gpugpio /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GPIOReadFromPin(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_GPIO_PIN_DATA *pgpioReadPin); /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_GPIOWriteToPin //! //! DESCRIPTION: This function writes data to the specified GPIO pin. //! //! HOW TO USE: First make NvAPI_GPU_GPIOQueryLegalPins() call. //! - NV_GPU_GPIO_PIN_DATA gpioWritePin = {0}; //! - gpioWritePin.version = NV_GPU_GPIO_PIN_DATA_VER; //! - gpioWritePingpioDirection = NVAPI_GPIO_DIRECTION_OUTPUT; //! - gpioWritePingpioReadPin.gpioPinNumber = any legal pin data from gpioLegalPins array after successful call to NvAPI_GPU_GPIOQueryLegalPins() //! - gpioWritePin.gpioDataReadWrite = any bit value (0 or 1) //! - ret = NvAPI_GPU_GPIOReadFromPin(hPhysicalGpu, &gpioReadPin); //! //! On call success: //! - The gpioWritePingpioDataReadWrite value (0 or 1) is written to the specified pin. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 175 //! //! \param [in] hPhysicalGpu(IN) GPU selection. //! \param pgpioWritePin Pointer to a versioned structure to pass gpio pin number to which the data is //! to be written, the GPIO direction and the data value. The gpioPinNumber parameter //! is selected from pgpioLegalPins array by calling NvAPI_GPU_GPIOQueryLegalPins. //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_HANDLE //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_API_NOT_INITIALIZED //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION //! //! \ingroup gpugpio /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GPIOWriteToPin(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_GPIO_PIN_DATA *pgpioWritePin); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetHDCPSupportStatus // //! \fn NvAPI_GPU_GetHDCPSupportStatus(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_GET_HDCP_SUPPORT_STATUS *pGetHDCPSupportStatus) //! DESCRIPTION: This function returns a GPU's HDCP support status. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 175 //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION // //////////////////////////////////////////////////////////////////////////////// //! \addtogroup gpu //! @{ //! HDCP fuse states - used in NV_GPU_GET_HDCP_SUPPORT_STATUS typedef enum _NV_GPU_HDCP_FUSE_STATE { NV_GPU_HDCP_FUSE_STATE_UNKNOWN = 0, NV_GPU_HDCP_FUSE_STATE_DISABLED = 1, NV_GPU_HDCP_FUSE_STATE_ENABLED = 2, } NV_GPU_HDCP_FUSE_STATE; //! HDCP key sources - used in NV_GPU_GET_HDCP_SUPPORT_STATUS typedef enum _NV_GPU_HDCP_KEY_SOURCE { NV_GPU_HDCP_KEY_SOURCE_UNKNOWN = 0, NV_GPU_HDCP_KEY_SOURCE_NONE = 1, NV_GPU_HDCP_KEY_SOURCE_CRYPTO_ROM = 2, NV_GPU_HDCP_KEY_SOURCE_SBIOS = 3, NV_GPU_HDCP_KEY_SOURCE_I2C_ROM = 4, NV_GPU_HDCP_KEY_SOURCE_FUSES = 5, } NV_GPU_HDCP_KEY_SOURCE; //! HDCP key source states - used in NV_GPU_GET_HDCP_SUPPORT_STATUS typedef enum _NV_GPU_HDCP_KEY_SOURCE_STATE { NV_GPU_HDCP_KEY_SOURCE_STATE_UNKNOWN = 0, NV_GPU_HDCP_KEY_SOURCE_STATE_ABSENT = 1, NV_GPU_HDCP_KEY_SOURCE_STATE_PRESENT = 2, } NV_GPU_HDCP_KEY_SOURCE_STATE; //! HDPC support status - used in NvAPI_GPU_GetHDCPSupportStatus() typedef struct { NvU32 version; //! Structure version constucted by macro #NV_GPU_GET_HDCP_SUPPORT_STATUS NV_GPU_HDCP_FUSE_STATE hdcpFuseState; //! GPU's HDCP fuse state NV_GPU_HDCP_KEY_SOURCE hdcpKeySource; //! GPU's HDCP key source NV_GPU_HDCP_KEY_SOURCE_STATE hdcpKeySourceState; //! GPU's HDCP key source state } NV_GPU_GET_HDCP_SUPPORT_STATUS; //! Macro for constructing the version for structure NV_GPU_GET_HDCP_SUPPORT_STATUS #define NV_GPU_GET_HDCP_SUPPORT_STATUS_VER MAKE_NVAPI_VERSION(NV_GPU_GET_HDCP_SUPPORT_STATUS,1) //! @} //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetHDCPSupportStatus(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_GET_HDCP_SUPPORT_STATUS *pGetHDCPSupportStatus); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetTopologyFocusDisplayAndView //! DESCRIPTION: This API works on the active display GPU and lets the calling application switch //! the focus display. It accepts path information to specify single, Clone or Dualview. \n //! Note : If SLI is not active then this API returns ::NVAPI_NO_ACTIVE_SLI_TOPOLOGY. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 180 //! //! \param [in] hLogicalGPU Active logical gpu topology containing more than one physical gpus. //! \param [in] focusDisplayOutputId Connected display output Id on the target GPU which should be focused. //! \param [in] pPathInfo Pointer to NV_VIEW_PATH_INFO, specifying device properties in this view. //! The first device entry in the array is the physical primary. //! The device entry with the lowest source ID is the desktop primary. //! \param [in] displayView Display view selected from NV_TARGET_VIEW_MODE. //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not active on this device. //! //! \ingroup gputopology /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetTopologyFocusDisplayAndView(NvLogicalGpuHandle hLogicalGPU, NvU32 focusDisplayOutputId, NV_DISPLAY_PATH_INFO *pPathInfo, NV_TARGET_VIEW_MODE displayView); //! \addtogroup gpucuda //! @{ //! defgroup nvcomp_gpu_top NVIDIA Compute GPU Topology Flags //! @{ #define NV_COMPUTE_GPU_TOPOLOGY_PHYSICS_CAPABLE NV_BIT(0) //!< This is Read only GPU flag - Physics capable GPU. #define NV_COMPUTE_GPU_TOPOLOGY_PHYSICS_ENABLE NV_BIT(1) //!< This is Read/Write GPU flag - Indicates GPU is already enabled for physics. #define NV_COMPUTE_GPU_TOPOLOGY_PHYSICS_DEDICATED NV_BIT(2) //!< This is Read only GPU flag - Physics enabled GPU which is *dedicated* for physics indicates //!< this compute capable GPU was automatically made usable for Physx on CUDA. #define NV_COMPUTE_GPU_TOPOLOGY_PHYSICS_RECOMMENDED NV_BIT(3) //!< This is Read only GPU flag - Physics GPU which is recommended by the driver. #define NV_COMPUTE_GPU_TOPOLOGY_CUDA_AVAILABLE NV_BIT(4) //!< This is Read only GPU flag. #define NV_COMPUTE_GPU_TOPOLOGY_CUDA_CAPABLE NV_BIT(16) //!< This is Read only GPU flag. #define NV_COMPUTE_GPU_TOPOLOGY_CUDA_DISABLED NV_BIT(17) //!< This is Read only GPU flag. #define NV_COMPUTE_GPU_TOPOLOGY_PHYSICS_AVAILABLE NV_BIT(21) //!< This is Read only GPU flag - PhysX is able to use this GPU (PhysX is installed, etc) //! @} typedef struct { NvU32 version; //!< Structure version NvU32 gpuCount; //!< Total number of compute-capable GPUs struct { NvPhysicalGpuHandle hPhysicalGpu; //!< Compute-capable physical GPU handle NvU32 flags; //!< One or more flags from \ref nvcomp_gpu_top } computeGpus[NVAPI_MAX_GPU_PER_TOPOLOGY]; //!< Array of compute-capable physical GPUs. } NV_COMPUTE_GPU_TOPOLOGY_V1; typedef struct _NV_COMPUTE_GPU { NvPhysicalGpuHandle hPhysicalGpu; //!< Compute-capable physical GPU handle NvU32 flags; //!< One or more flags from \ref nvcomp_gpu_top } NV_COMPUTE_GPU; typedef struct _NV_COMPUTE_GPU_TOPOLOGY_V2 { NvU32 version; //!< Structure version NvU32 gpuCount; //!< Size of array NV_COMPUTE_GPU *computeGpus; //!< Array of compute-capable physical GPUs (allocate memory of size of Physical gpuCount of system). } NV_COMPUTE_GPU_TOPOLOGY_V2; //! Macro for constructing the version field of NV_COMPUTE_GPU_TOPOLOGY #define NV_COMPUTE_GPU_TOPOLOGY_VER1 MAKE_NVAPI_VERSION(NV_COMPUTE_GPU_TOPOLOGY_V1,1) #define NV_COMPUTE_GPU_TOPOLOGY_VER MAKE_NVAPI_VERSION(NV_COMPUTE_GPU_TOPOLOGY_V2,2) typedef NV_COMPUTE_GPU_TOPOLOGY_V2 NV_COMPUTE_GPU_TOPOLOGY; //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_CudaEnumComputeCapableGpus // //! DESCRIPTION: This API enumerates one or more compute-capable GPUs. //! Note that this API is deprecated and should no longer be used for new software development. //! \deprecated Do not use this function - it is deprecated in release 319. //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release: 180 //! //! \param [inout] pComputeTopo Pointer to the structure NV_COMPUTE_GPU_TOPOLOGY. //! //! \retval ::NVAPI_OK The request was completed successfully. //! The gpuCount indicates if one or more compute-capable GPUs are found. //! gpuCount >= 1 means atleast one compute-capable GPU is found. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Structure version is not supported, initialize to NV_COMPUTE_GPU_TOPOLOGY_VER. //! \retval ::NVAPI_ERROR Enumeration of the GPUs failed. Make sure at least one NVIDIA GPU exists in the system. //! //! \ingroup gpucuda /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 319.") NVAPI_INTERFACE NvAPI_GPU_CudaEnumComputeCapableGpus(__inout NV_COMPUTE_GPU_TOPOLOGY *pComputeTopo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetTachReading // //! DESCRIPTION: This API retrieves the fan speed tachometer reading for the specified physical GPU. //! //! HOW TO USE: //! - NvU32 Value = 0; //! - ret = NvAPI_GPU_GetTachReading(hPhysicalGpu, &Value); //! - On call success: //! - Value contains the tachometer reading //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGpu GPU selection. //! \param [out] pValue Pointer to a variable to get the tachometer reading //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_ERROR - miscellaneous error occurred //! \retval ::NVAPI_NOT_SUPPORTED - functionality not supported //! \retval ::NVAPI_API_NOT_INTIALIZED - nvapi not initialized //! \retval ::NVAPI_INVALID_ARGUMENT - invalid argument passed //! \retval ::NVAPI_HANDLE_INVALIDATED - handle passed has been invalidated (see user guide) //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE - handle passed is not a physical GPU handle //! //! \ingroup gpucooler /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetTachReading(NvPhysicalGpuHandle hPhysicalGPU, NvU32 *pValue); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_QueryDPTopology // // //! DESCRIPTION: This API returns the DPMST topology information for a given connector. //! HOW TO USE: //! -# For each PhysicalGpu, make a call to get the connected displayId's using NvAPI_GPU_GetConnectedDisplayIds() //! -# If we found any DPMST connector for the particular displayId, then try to do the step3 //! -# To find, number of nodes available under one displayId of DPMST topology use NvAPI_GPU_QueryDPTopology() bypassing pNodes as NULL //! -# On success allocate memory for pNodes based on pNumOfNodes returned and call NvAPI_GPU_QueryDPTopology() to get the nodes' details //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId This is the displayId of the DPMST connector to which the topology is rooted. //! \param [in,out] pNodes Pointer to an array of NV_DP_NODE_INFO structures, where each entry represents one node on the DPMST topology //! \param [in,out] pNumOfNodes When pNodes is NULL, this is treated as out parameter, and if the function successfully returns, will hold the //! total number of nodes in the DPMST topology. //! When pNodes in NOT NULL, this is treated as both IN and OUT parameter. //! On the input path, this will hold the total size of the array that pNodes is pointing to. //! On the output path, this will hold the actual number of nodes in the DPMST topology. If this actual //! value is greater than the input value, the API will return NVAPI_INSUFFICIENT_BUFFER. //! //! //! \retval ::NVAPI_INSUFFICIENT_BUFFER When the actual number of nodes in the topology exceed the number of elements allocated for pNodes. //! \retval ::NVAPI_DPMST_CHANGED The DPMST topology has changed midway while fetching the details. Please retry again. //! //! \ingroup gputopology /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_QueryDPTopology(__in NvU32 displayId, __inout_ecount_full_opt(*pNumOfNodes) NV_DP_NODE_INFO* pNodes, __inout NvU32* pNumOfNodes); #define MAX_PCLK_RANGES 10 //! \addtogroup gpuclock //! @{ //! Used in NV_SET_PCLK and NV_GET_PCLK. typedef struct { NvU32 uMaxPixClk; //!< Maximum Upper Frequency NvU32 uMinPixClk; //!< Minimum Upper Frequency } NV_PCLK_RANGE; //! Used in NvAPI_GPU_GetPixelClockRange(). typedef struct { NvU32 uOrgPixelClock; //!< Original Frequency in Hz NvU32 uCurrPixelClock; //!< Frequency in Hz NvU32 uCurrSpreadSpectrum; //!< Spread Spectrum Range in Hz NV_PCLK_RANGE uFineAdjustBounds; //!< Optional: Upper/Lower bounds //!< If not present then only //!< course adjustment is supported. NV_PCLK_RANGE uCourseAdjustBounds; //!< Timing Shift Upper/Lower } NV_GET_PCLK; //! Used in NvAPI_GPU_SetPixelClockRange(). typedef struct { NV_PCLK_RANGE uAllowedRanges[MAX_PCLK_RANGES]; //!< Allowed List NV_PCLK_RANGE uDisallowedRanges[MAX_PCLK_RANGES]; //!< Disallowed List } NV_SET_PCLK; //! @} /////////////////////////////////////////////////////////////////////////////// // // GPS (previously known as OptimusBoost) APIs // /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetPlatformPowerMode //! \fn NvAPI_GetPlatformPowerMode(__inout NV_GET_PLATFORM_POWER_MODE_PARM *pParams) //! //! DESCRIPTION: This API retrieves the current platform power mode, along with mask of //! supported Power Modes on the system. //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 440 //! //! \param[out] currentPPMIndex -- Current power mode the platform is in. //! \param[out] supportedPPMMask -- Mask of supported power modes. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \retval NVAPI_OK - completed request //! \retval NVAPI_ERROR - miscellaneous error occurred //! \retval NVAPI_NOT_SUPPORTED - GPS feature is not available on the target hardware //! \retval NVAPI_INVALID_ARGUMENT - invalid argument passed //! \retval NVAPI_API_NOT_INTIALIZED - nvapi not initialized //! /////////////////////////////////////////////////////////////////////////////// //! \ingroup nvpmapi typedef struct _NV_GET_PLATFORM_POWER_MODE_PARM_V1 { // IN NvU32 version; //!< Version of this structure. // OUT NvU32 currentPPMIndex; //!< Current Platform Power Mode Index. NvU32 supportedPPMMask; //!< Mask of Supported Power Modes on the platform. } NV_GET_PLATFORM_POWER_MODE_PARM_V1; //! \ingroup nvpmapi typedef NV_GET_PLATFORM_POWER_MODE_PARM_V1 NV_GET_PLATFORM_POWER_MODE_PARM; //! \ingroup nvpmapi #define NV_GET_PLATFORM_POWER_MODE_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GET_PLATFORM_POWER_MODE_PARM_V1,1) //! \ingroup nvpmapi #define NV_GET_PLATFORM_POWER_MODE_PARM_VER NV_GET_PLATFORM_POWER_MODE_PARM_VER_1 //! \ingroup nvpmapi NVAPI_INTERFACE NvAPI_GetPlatformPowerMode(__inout NV_GET_PLATFORM_POWER_MODE_PARM *pParams); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetPlatformPowerMode //! \fn NvAPI_SetPlatformPowerMode(__in NV_SET_PLATFORM_POWER_MODE_PARM *pParams) //! //! DESCRIPTION: This API sets the new Platform Power Mode. //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 440 //! //! \param[in] newPPMIndex Requested Power Mode Index. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \retval NVAPI_OK - completed request //! \retval NVAPI_ERROR - miscellaneous error occurred //! \retval NVAPI_NOT_SUPPORTED - GPS feature is not available on the target hardware //! \retval NVAPI_INVALID_ARGUMENT - invalid argument passed //! \retval NVAPI_API_NOT_INTIALIZED - nvapi not initialized //! /////////////////////////////////////////////////////////////////////////////// //! \ingroup nvpmapi typedef struct _NV_SET_PLATFORM_POWER_MODE_PARM_V1 { // IN NvU32 version; //!< Version of this structure. NvU32 newPPMIndex; //!< New Platform Power Mode Index to be set // OUT } NV_SET_PLATFORM_POWER_MODE_PARM_V1; //! \ingroup nvpmapi typedef NV_SET_PLATFORM_POWER_MODE_PARM_V1 NV_SET_PLATFORM_POWER_MODE_PARM; //! \ingroup nvpmapi #define NV_SET_PLATFORM_POWER_MODE_PARM_VER_1 MAKE_NVAPI_VERSION(NV_SET_PLATFORM_POWER_MODE_PARM_V1,1) //! \ingroup nvpmapi #define NV_SET_PLATFORM_POWER_MODE_PARM_VER NV_SET_PLATFORM_POWER_MODE_PARM_VER_1 //! \ingroup nvpmapi NVAPI_INTERFACE NvAPI_SetPlatformPowerMode(__in NV_SET_PLATFORM_POWER_MODE_PARM *pParams); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPS_GetPowerSteeringStatus //! \fn NvAPI_GPS_GetPowerSteeringStatus(__out NV_GPS_PS_STATUS *pPowerSteeringStatus) //! //! DESCRIPTION: This API retrieves the current power steering status. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param[out] pPowerSteeringStatus //! 0 = Power steering disabled //! 1 = PowerSteering enabled //! 2 = not supported on this platform //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \retval NVAPI_OK - completed request //! \retval NVAPI_ERROR - miscellaneous error occurred //! \retval NVAPI_NOT_SUPPORTED - GPS feature is not available on the target hardware //! \retval NVAPI_INVALID_ARGUMENT - invalid argument passed //! \retval NVAPI_API_NOT_INTIALIZED - nvapi not initialized //! /////////////////////////////////////////////////////////////////////////////// //! \ingroup nvpmapi typedef enum { NV_GPS_PS_DISABLED = 0, NV_GPS_PS_ENABLED = 1, NV_GPS_PS_NOT_SUPPORTED = 2 } NV_GPS_PS_STATUS; //! \ingroup nvpmapi NVAPI_INTERFACE NvAPI_GPS_GetPowerSteeringStatus(__out NV_GPS_PS_STATUS *pPowerSteeringStatus); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPS_SetPowerSteeringStatus // //! DESCRIPTION: This API enables or disables GPS power steering. //! //! SUPPORTED OS: Windows 7 and higher //! //! //!\ param[in] PowerSteeringStatus //! 0 = Power steering disabled //! 1 = PowerSteering enabled //! any other value - not invalid //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \retval NVAPI_OK - completed request //! \retval NVAPI_ERROR - miscellaneous error occurred //! \retval NVAPI_NOT_SUPPORTED - GPS feature is not available on the target hardware //! \retval NVAPI_INVALID_ARGUMENT - invalid argument passed //! \retval NVAPI_API_NOT_INTIALIZED - nvapi not initialized //! //! \ingroup nvpmapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPS_SetPowerSteeringStatus(__in NV_GPS_PS_STATUS PowerSteeringStatus); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPS_SetVPStateCap // //! DESCRIPTION: This API sets the Virtual P state cap //! //! SUPPORTED OS: Windows 7 and higher //! //! \param[in] newCap - Requested New Virtual P State Cap //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \retval NVAPI_OK - completed request //! \retval NVAPI_ERROR - miscellaneous error occurred //! \retval NVAPI_NOT_SUPPORTED - GPS is not available on the target hardware //! \retval NVAPI_INVALID_ARGUMENT - invalid argument passed //! \retval NVAPI_API_NOT_INTIALIZED - nvapi not initialized //! //! \ingroup nvpmapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPS_SetVPStateCap(__in NvPhysicalGpuHandle hPhysicalGpu, __in NvU32 newCap); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPS_GetVPStateCap // //! DESCRIPTION: This API retrieves the current Virtual P State Cap. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param[out] pCurCap - Current Virtual P State Cap //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \retval NVAPI_OK - completed request //! \retval NVAPI_ERROR - miscellaneous error occurred //! \retval NVAPI_NOT_SUPPORTED - GPS feature is not available on the target hardware //! \retval NVAPI_INVALID_ARGUMENT - invalid argument passed //! \retval NVAPI_API_NOT_INTIALIZED - nvapi not initialized //! //! \ingroup nvpmapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPS_GetVPStateCap(__in NvPhysicalGpuHandle hPhysicalGpu, __out NvU32 *pCurCap); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPS_GetThermalLimit //! \fn NvAPI_GPS_GetThermalLimit(__inout NV_GPS_GET_THERMAL_LIMIT_PARM *pParams) //! //! DESCRIPTION: This API retrieves the information on the limit for the requested sensor. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param[in/out] pParams -- pointer to parameter block //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \retval NVAPI_OK - completed request //! /////////////////////////////////////////////////////////////////////////////// //! \ingroup nvpmapi typedef enum { NV_GPS_SENSOR_INDEX_TGPU_LIMIT = 9, NV_GPS_SENSOR_INDEX_PDTS_LIMIT = 10, NV_GPS_SENSOR_INDEX_SFAN_LIMIT = 11, NV_GPS_SENSOR_INDEX_SKNT_LIMIT = 12, NV_GPS_SENSOR_INDEX_CPUE_LIMIT = 13, NV_GPS_SENSOR_INDEX_TMP1_LIMIT = 14, NV_GPS_SENSOR_INDEX_TMP2_LIMIT = 15 } NV_GPS_SENSOR_INDEX; //! \ingroup nvpmapi typedef enum { NV_GPS_THERM_LIMIT_SRC_USER_LIMITED = 1, NV_GPS_THERM_LIMIT_SRC_SBIOS_LIMITED = 2, NV_GPS_THERM_LIMIT_SRC_SBIOS_UNLIMITED = 3, NV_GPS_THERM_LIMIT_SRC_SBIOS_NOT_SUPPORTED = 4, NV_GPS_THERM_LIMIT_SRC_USER_DISABLED = 5 } NV_GPS_THERM_LIMIT_SRC; //! \ingroup nvpmapi #define NV_GPS_THERM_LIMIT_SBIOS_LIMITED 0 //! \ingroup nvpmapi #define NV_GPS_THERM_LIMIT_NOT_LIMITED 1 //! \ingroup nvpmapi typedef struct _NV_GPS_GET_THERMAL_LIMIT_PARM { // IN NvU32 version; //!< Version of this structure NV_GPS_SENSOR_INDEX sensorIndex; //!< Id of the sensor to retrieve the current thermal limit from. //!< refer to enum NV_GPS_SENSOR_INDEX above. // OUT NvU32 limit; //!< 0 = no limit //!< any other value -- current thermal limit. NvU32 lowerBound; //!< Minimum value permitted for thermal limit. NvU32 upperBound; //!< Maximim value permitted for thermal limit. NV_GPS_THERM_LIMIT_SRC limitSource; //!< specifies what is determining the limit for the specified sensor. //!< refer to enum NV_GPS_THERM_LIMIT_SRC above. } NV_GPS_GET_THERMAL_LIMIT_PARM_V1; //! \ingroup nvpmapi typedef NV_GPS_GET_THERMAL_LIMIT_PARM_V1 NV_GPS_GET_THERMAL_LIMIT_PARM; //! \ingroup nvpmapi #define NV_GPS_GET_THERMAL_LIMIT_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPS_GET_THERMAL_LIMIT_PARM_V1,1) //! \ingroup nvpmapi #define NV_GPS_GET_THERMAL_LIMIT_PARM_VER NV_GPS_GET_THERMAL_LIMIT_PARM_VER_1 //! \ingroup nvpmapi NVAPI_INTERFACE NvAPI_GPS_GetThermalLimit(__inout NV_GPS_GET_THERMAL_LIMIT_PARM *pParams); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPS_SetThermalLimit //! \fn NvAPI_GPS_SetThermalLimit(__in NV_GPS_SET_THERMAL_LIMIT_PARM *pParams) //! //! DESCRIPTION: This API sets the thermal limit for the specified sensor. //! //! \since Release: 290 //! SUPPORTED OS: Windows 7 and higher //! //! //! \param[in,out] pParams -- pointer to parameter block //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \retval NVAPI_OK - completed request //! /////////////////////////////////////////////////////////////////////////////// //! \ingroup nvpmapi typedef struct _NV_GPS_SET_THERMAL_LIMIT_PARM { // IN NvU32 version; //!< Version of this structure NV_GPS_SENSOR_INDEX sensorIndex; //!< Id of the sensor whose limit we are setting. //!< refer to enum NV_GPS_SENSOR_INDEX above. NvU32 newLimit; //!< the new limit to apply to the sensor. // OUT } NV_GPS_SET_THERMAL_LIMIT_PARM_V1; //! \ingroup nvpmapi typedef NV_GPS_SET_THERMAL_LIMIT_PARM_V1 NV_GPS_SET_THERMAL_LIMIT_PARM; //! \ingroup nvpmapi #define NV_GPS_SET_THERMAL_LIMIT_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPS_SET_THERMAL_LIMIT_PARM_V1,1) //! \ingroup nvpmapi #define NV_GPS_SET_THERMAL_LIMIT_PARM_VER NV_GPS_SET_THERMAL_LIMIT_PARM_VER_1 //! \ingroup nvpmapi NVAPI_INTERFACE NvAPI_GPS_SetThermalLimit(__in NV_GPS_SET_THERMAL_LIMIT_PARM *pParams); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPS_GetPerfSensors //! \fn NvAPI_GPS_GetPerfSensors(__inout NV_GPS_PERFSENSORS_PARM *pParams) //! //! \since Release: 290 //! //! DESCRIPTION: This API returns various counters that indicate the state of GPS, Thermal controller, and power steering //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param[in,out] pParams -- pointer to parameter block //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! /////////////////////////////////////////////////////////////////////////////// //! \ingroup nvpmapi //! @{ #define GPS_PSC_PS_TC_DYNAMIC_SENSOR_BLOCK 0 #define GPS_PSC_PS_TC_CPU_UTIL_SENSOR_BLOCK 2 #define GPS_PSC_ACPI_SENSOR_BLOCK 3 typedef enum { GPS_PSC_SB0_PS_SID = 0, //!< Power Steering Sample Id GPS_PSC_SB0_PS_ENABLE = 1, //!< Power steering enabled GPS_PSC_SB0_CPU_PSTATE_CAP = 5, //!< CPU PState Cap GPS_PSC_SB0_CPU_TSTATE_CAP = 7, //!< CPU TState Cap GPS_PSC_SB0_GPU_UTIL = 9, //!< GPU Utilization GPS_PSC_SB0_GPU_TEMP = 15, //!< current GPU temp GPS_PSC_SB0_TC_TRGT_TEMP = 16, //!< Thermal Controller Target temp GPS_PSC_SB0_PM1_STATE_AVAIL = 18, //!< PM1 availability GPS_PSC_SB0_TDP_IDX = 19, //!< TDP PState index GPS_PSC_SB0_GPU_VPSTATE = 24, //!< current GPU VPState GPS_PSC_SB0_GPU_VPSTATE_CAP = 25, //!< GPU VPState Cap GPS_PSC_SB0_TGPU_CURR_VALUE = 26, //!< current GPU temp } GPS_PSC_SB0_INDEX; //! @} //! \ingroup nvpmapi typedef struct _NV_GPS_GET_PERF_SENSOR_COUNTERS_PARAM_V1 { // IN NvU32 version; //!< Version of this structure NvU32 objHndl; //!< object handle NvU16 blockId; //!< Id of the BLock to return NvU32 nextExpectedSampleTime; //!< a relative time period in ms //!< indicating when the //!< application next expects to //!< sample the counters. This is //!< used as a hint to try to //!< optimize the collection of //!< the sensor data to minimize //!< overhead when the function is //!< called again. If it is not //!< known when the next expected //!< sampling will be done, or you //!< do not expect to do any more //!< sampling a value of 0 should //!< be used. (other values may //!< result in extra sensor //!< sampling) NvU32 countersReq; //!< Bitmap of counters within //!< specified block to return // OUT NvU32 countersReturned; //!< Bitmap of counters populated //!< within the returned block NvU32 counterBlock[32]; //!< Returned counters. Counters //!< not indicated as returned in //!< the CountersReturned bitmap //!< are undefined } NV_GPS_GET_PERF_SENSOR_COUNTERS_PARAM_V1; //! \ingroup nvpmapi typedef NV_GPS_GET_PERF_SENSOR_COUNTERS_PARAM_V1 NV_GPS_GET_PERF_SENSOR_COUNTERS_PARAM; //! \ingroup nvpmapi #define NV_GPS_GET_PERF_SENSOR_COUNTERS_PARAM_VER_1 MAKE_NVAPI_VERSION(NV_GPS_GET_PERF_SENSOR_COUNTERS_PARAM_V1,1) //! \ingroup nvpmapi #define NV_GPS_GET_PERF_SENSOR_COUNTERS_PARAM_VER NV_GPS_GET_PERF_SENSOR_COUNTERS_PARAM_VER_1 //! \ingroup nvpmapi NVAPI_INTERFACE NvAPI_GPS_GetPerfSensors(__inout NV_GPS_GET_PERF_SENSOR_COUNTERS_PARAM *pParams); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetECCStatusInfo // //! \fn NvAPI_GPU_GetECCStatusInfo(NvPhysicalGpuHandle hPhysicalGpu, //! NV_GPU_ECC_STATUS_INFO *pECCStatusInfo); //! DESCRIPTION: This function returns ECC memory status information. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGpu A handle identifying the physical GPU for which ECC //! status information is to be retrieved. //! \param [out] pECCStatusInfo A pointer to an ECC status structure. //! //! \retval ::NVAPI_OK The request was completed successfully. //! \retval ::NVAPI_ERROR An unknown error occurred. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle. //! \retval ::NVAPI_INVALID_HANDLE The provided GPU handle is invalid. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid. //! \retval ::NVAPI_INVALID_POINTER An invalid argument pointer was provided. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized. // /////////////////////////////////////////////////////////////////////////////// //! \addtogroup gpuecc //! Used in NV_GPU_ECC_STATUS_INFO. typedef enum _NV_ECC_CONFIGURATION { NV_ECC_CONFIGURATION_NOT_SUPPORTED = 0, NV_ECC_CONFIGURATION_DEFERRED, //!< Changes require a POST to take effect NV_ECC_CONFIGURATION_IMMEDIATE, //!< Changes can optionally be made to take effect immediately } NV_ECC_CONFIGURATION; //! \ingroup gpuecc //! Used in NvAPI_GPU_GetECCStatusInfo(). typedef struct { NvU32 version; //!< Structure version NvU32 isSupported : 1; //!< ECC memory feature support NV_ECC_CONFIGURATION configurationOptions; //!< Supported ECC memory feature configuration options NvU32 isEnabled : 1; //!< Active ECC memory setting } NV_GPU_ECC_STATUS_INFO; //! \ingroup gpuecc //! Macro for constructing the version field of NV_GPU_ECC_STATUS_INFO #define NV_GPU_ECC_STATUS_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_ECC_STATUS_INFO,1) //! \ingroup gpuecc NVAPI_INTERFACE NvAPI_GPU_GetECCStatusInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_ECC_STATUS_INFO *pECCStatusInfo); //! \ingroup gpuecc //! Used in NvAPI_GPU_GetECCErrorInfo()/ typedef struct { NvU32 version; //!< Structure version struct { NvU64 singleBitErrors; //!< Number of single-bit ECC errors detected since last boot NvU64 doubleBitErrors; //!< Number of double-bit ECC errors detected since last boot } current; struct { NvU64 singleBitErrors; //!< Number of single-bit ECC errors detected since last counter reset NvU64 doubleBitErrors; //!< Number of double-bit ECC errors detected since last counter reset } aggregate; } NV_GPU_ECC_ERROR_INFO; //! \ingroup gpuecc //! Macro for constructing the version field of NV_GPU_ECC_ERROR_INFO #define NV_GPU_ECC_ERROR_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_ECC_ERROR_INFO,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetECCErrorInfo // //! \fn NvAPI_GPU_GetECCErrorInfo(NvPhysicalGpuHandle hPhysicalGpu, //! NV_GPU_ECC_ERROR_INFO *pECCErrorInfo); //! //! DESCRIPTION: This function returns ECC memory error information. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGpu A handle identifying the physical GPU for //! which ECC error information is to be //! retrieved. //! \param [out] pECCErrorInfo A pointer to an ECC error structure. //! //! \retval ::NVAPI_OK The request was completed successfully. //! \retval ::NVAPI_ERROR An unknown error occurred. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle. //! \retval ::NVAPI_INVALID_ARGUMENT incorrect param value //! \retval ::NVAPI_INVALID_POINTER An invalid argument pointer was provided. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION structure version is not supported, initialize to NV_GPU_ECC_ERROR_INFO_VER. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpuecc NVAPI_INTERFACE NvAPI_GPU_GetECCErrorInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_ECC_ERROR_INFO *pECCErrorInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ResetECCErrorInfo // //! DESCRIPTION: This function resets ECC memory error counters. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \requires Administrator privileges since release 430.39 //! //! \param [in] hPhysicalGpu A handle identifying the physical GPU for //! which ECC error information is to be //! cleared. //! \param [in] bResetCurrent Reset the current ECC error counters. //! \param [in] bResetAggregate Reset the aggregate ECC error counters. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - 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". //! //! \ingroup gpuecc /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ResetECCErrorInfo(NvPhysicalGpuHandle hPhysicalGpu, NvU8 bResetCurrent, NvU8 bResetAggregate); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetECCConfigurationInfo // //! \fn NvAPI_GPU_GetECCConfigurationInfo(NvPhysicalGpuHandle hPhysicalGpu, //! NV_GPU_ECC_CONFIGURATION_INFO *pECCConfigurationInfo); //! DESCRIPTION: This function returns ECC memory configuration information. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGpu A handle identifying the physical GPU for //! which ECC configuration information //! is to be retrieved. //! \param [out] pECCConfigurationInfo A pointer to an ECC //! configuration structure. //! //! \retval ::NVAPI_OK The request was completed successfully. //! \retval ::NVAPI_ERROR An unknown error occurred. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle. //! \retval ::NVAPI_INVALID_HANDLE The provided GPU handle is invalid. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid. //! \retval ::NVAPI_INVALID_POINTER An invalid argument pointer was provided. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpuecc //! Used in NvAPI_GPU_GetECCConfigurationInfo(). typedef struct { NvU32 version; //! Structure version NvU32 isEnabled : 1; //! Current ECC configuration stored in non-volatile memory NvU32 isEnabledByDefault : 1; //! Factory default ECC configuration (static) } NV_GPU_ECC_CONFIGURATION_INFO; //! \ingroup gpuecc //! Macro for consstructing the verion field of NV_GPU_ECC_CONFIGURATION_INFO #define NV_GPU_ECC_CONFIGURATION_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_ECC_CONFIGURATION_INFO,1) //! \ingroup gpuecc NVAPI_INTERFACE NvAPI_GPU_GetECCConfigurationInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_ECC_CONFIGURATION_INFO *pECCConfigurationInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_SetECCConfiguration // //! DESCRIPTION: This function updates the ECC memory configuration setting. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \requires Administrator privileges since release 430.39 //! //! \param [in] hPhysicalGpu A handle identifying the physical GPU for //! which to update the ECC configuration //! setting. //! \param [in] bEnable The new ECC configuration setting. //! \param [in] bEnableImmediately Request that the new setting take effect immediately. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_CONFIGURATION - Possibly SLI is enabled. Disable SLI and retry. //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - 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". //! //! \ingroup gpuecc /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetECCConfiguration(NvPhysicalGpuHandle hPhysicalGpu, NvU8 bEnable, NvU8 bEnableImmediately); typedef enum { UNKNOWN_LEVEL = 0, NORMAL_LEVEL = 1, WARNING_LEVEL = 2, CRITICAL_LEVEL = 3, } NV_EVENT_LEVEL; // The following enum is providing definitions for events signaled by a Quadro Sync (QSYNC) device. // QSYNC event broadcast is supported for Windows 10 and later OS. typedef enum { NV_QSYNC_EVENT_NONE = 0, NV_QSYNC_EVENT_SYNC_LOSS = 1, // Frame Lock sync loss event NV_QSYNC_EVENT_SYNC_GAIN = 2, // Frame Lock sync gain event NV_QSYNC_EVENT_HOUSESYNC_GAIN = 3, // House cable gain(plug in) event NV_QSYNC_EVENT_HOUSESYNC_LOSS = 4, // House cable loss(plug out) event NV_QSYNC_EVENT_RJ45_GAIN = 5, // RJ45 cable gain(plug in) event NV_QSYNC_EVENT_RJ45_LOSS = 6, // RJ45 cable loss(plug out) event } NV_QSYNC_EVENT; typedef struct { NV_QSYNC_EVENT qsyncEvent; // One of the value of the enum NV_QSYNC_EVENT NvU32 reserved[7]; // Reserved for future use. Do not use this. } NV_QSYNC_EVENT_DATA; //! Callback for QSYNC event typedef void(__cdecl *NVAPI_CALLBACK_QSYNCEVENT)(NV_QSYNC_EVENT_DATA qyncEventData, void *callbackParam); //! Enum for Event IDs typedef enum { NV_EVENT_TYPE_NONE = 0, NV_EVENT_TYPE_FAN_SPEED_CHANGE = 1, NV_EVENT_TYPE_THERMAL_CHANGE = 2, NV_EVENT_TYPE_HOTPLUG_UNPLUG = 3, NV_EVENT_TYPE_HDCP_LINK_FAILED = 4, NV_EVENT_TYPE_HDCP_STATUS = 5, NV_EVENT_TYPE_QSYNC = 6, NV_EVENT_TYPE_GPU_POWER_STATE_CHANGE = 7, } NV_EVENT_TYPE; //! \ingroup gpu //! @{ //! Callback for thermal typedef void (__cdecl *NVAPI_CALLBACK_THERMALEVENT)(NvPhysicalGpuHandle gpuHandle, NV_EVENT_LEVEL thermalLevel, void *callbackParam); //! Callback for fan speed typedef void (__cdecl *NVAPI_CALLBACK_FANSPEEDEVENT)(NvPhysicalGpuHandle gpuHandle, NV_EVENT_LEVEL fanSpeedLevel, void *callbackParam); //! Callback for HPD typedef void(__cdecl *NVAPI_CALLBACK_HPDEVENT)(NvU32 displayId, NvU32 bIsHotplug, void *callbackParam); //! Callback for GPU power state change event typedef void(__cdecl *NVAPI_CALLBACK_GPU_POWERSTATEEVENT)(NvPhysicalGpuHandle gpuHandle, NvU8 bIsPowerOff, void *callbackParam); #define NV_HDCP_ERROR_LINK_LOST 1 #define NV_HDCP_ERROR_TAMPERED (1<<1) #define NV_HDCP_ERROR_DEVICE_REVOKED (1<<2) #define NV_HDCP_STATUS_CHANGED (1<<16) //! Callback for HDCP failure and HDCP status typedef void(__cdecl *NVAPI_CALLBACK_HDCPEVENT)(NvU32 displayId, NvU32 errorCode, void *callbackParam); //! Core NV_EVENT_REGISTER_CALLBACK structure declaration typedef struct { NvU32 version; //!< version field to ensure minimum version compatibility NV_EVENT_TYPE eventId; //!< ID of the event being sent void *callbackParam; //!< This value will be passed back to the callback function when an event occurs union { NVAPI_CALLBACK_THERMALEVENT nvThermalCallback; //!< Callback function pointer for thermal NVAPI_CALLBACK_FANSPEEDEVENT nvFanSpeedCallback; //!< Callback function pointer for fanSpeed NVAPI_CALLBACK_HPDEVENT nvHPDCallback; //!< Callback function pointer for HPD events NVAPI_CALLBACK_HDCPEVENT nvHDCPCallback; //!< Callback function pointer for HDCP failures NVAPI_CALLBACK_HDCPEVENT nvHDCPStatusCallback; //!< Callback function pointer for HDCP status change NVAPI_CALLBACK_GPU_POWERSTATEEVENT nvGpuPowerStateChangeEventCallback; //!< Callback function pointer for gpu power state change NVAPI_CALLBACK_QSYNCEVENT nvQSYNCEventCallback; //!< Callback function pointer for QSYNC events }nvCallBackFunc; } NV_EVENT_REGISTER_CALLBACK, *PNV_EVENT_REGISTER_CALLBACK; //! Macro for constructing the version field of ::NV_EVENT_REGISTER_CALLBACK #define NV_EVENT_REGISTER_CALLBACK_VERSION MAKE_NVAPI_VERSION(NV_EVENT_REGISTER_CALLBACK,1) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_GetBrandType // //! \fn NvAPI_GPU_GetBrandType(NvPhysicalGpuHandle physicalGpu, NV_GPU_BRAND_TYPE *gpuBrandType) //! \code //! DESCRIPTION: Returns the Brand type for the GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! DESCRIPTION: This API, when called with a valid physical gpu handle as Input, lets caller know the Brand type of that Gpu. //! //! PARAMETERS: physicalGpu(IN) : The handle of the GPU for the which caller wants to get the Brand Type. //! gpuBrandType(OUT) : The brand type for the GPU ; one of the values from enum NV_GPU_BRAND_TYPE. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \endcode /////////////////////////////////////////////////////////////////////////////// //! \ingroup gpu typedef enum { NV_GPU_BRAND_TYPE_UNKNOWN = 0, //!< Unknown Brand NV_GPU_BRAND_TYPE_GEFORCE_RTX = 1, //!< Geforce RTX Brand NV_GPU_BRAND_TYPE_GEFORCE = NV_GPU_BRAND_TYPE_GEFORCE_RTX, //!< DEPRECATED name - do not use NV_GPU_BRAND_TYPE_NVIDIA_RTX = 2, //!< NVIDIA RTX Brand NV_GPU_BRAND_TYPE_QUADRO = NV_GPU_BRAND_TYPE_NVIDIA_RTX, //!< DEPRECATED name - do not use NV_GPU_BRAND_TYPE_QUADRO_AD = 3, //!< Quadro AD Brand NV_GPU_BRAND_TYPE_QUADRO_NVS = 4, //!< Quadro NVS Brand NV_GPU_BRAND_TYPE_NVIDIA_NVS = 5, //!< NVS Brand NV_GPU_BRAND_TYPE_TESLA = 6, //!< Tesla Brand NV_GPU_BRAND_TYPE_TESLA_Q = 7, //!< Tesla Enabled AND Quadro NV_GPU_BRAND_TYPE_TITAN = 8, //!< Titan Geforce Brand NV_GPU_BRAND_TYPE_TITAN_Q = 9, //!< Titan Quadro Brand NV_GPU_BRAND_TYPE_NVIDIA_VAPPS = 10, //!< NVIDIA Virtual Applications Brand // vGPU brand type reporting is updated. // If any functionality is added based on brand type, // please include these brand types for vGPU in case the functionality is supported on vGPU platform. // In functionality, it maps to NV_GPU_BRAND_TYPE_NVIDIA_NVS and NV_GPU_BRAND_TYPE_QUADRO_NVS. NV_GPU_BRAND_TYPE_NVIDIA_VPC = 11, //!< NVIDIA Virtual PC Brand // In functionality, it maps to NV_GPU_BRAND_TYPE_NVIDIA_NVS and NV_GPU_BRAND_TYPE_QUADRO_NVS. NV_GPU_BRAND_TYPE_NVIDIA_VCS = 12, //!< NVIDIA Virtual Compute Server Brand // In functionality, it maps to NV_GPU_BRAND_TYPE_TESLA. NV_GPU_BRAND_TYPE_NVIDIA_VWS = 13, //!< NVIDIA RTX Virtual Workstation Brand // In functionality, it maps to NV_GPU_BRAND_TYPE_NVIDIA_RTX. NV_GPU_BRAND_TYPE_NVIDIA_CLOUD_GAMING = 14, //!< NVIDIA Cloud Gaming Brand // In functionality, it maps to NV_GPU_BRAND_TYPE_GEFORCE_RTX. NV_GPU_BRAND_TYPE_NVIDIA_VGAMING = NV_GPU_BRAND_TYPE_NVIDIA_CLOUD_GAMING, //!< DEPRECATED name - do not use }NV_GPU_BRAND_TYPE; //! \ingroup gpu NVAPI_INTERFACE NvAPI_GPU_GetBrandType(NvPhysicalGpuHandle physicalGpu, NV_GPU_BRAND_TYPE *gpuBrandType); //! \ingroup gpu typedef enum _NV_GPU_WORKSTATION_FEATURE_TYPE { NV_GPU_WORKSTATION_FEATURE_TYPE_NVIDIA_RTX_VR_READY = 1, //!< NVIDIA RTX VR Ready NV_GPU_WORKSTATION_FEATURE_TYPE_QUADRO_VR_READY = NV_GPU_WORKSTATION_FEATURE_TYPE_NVIDIA_RTX_VR_READY, //!< DEPRECATED name - do not use NV_GPU_WORKSTATION_FEATURE_TYPE_PROVIZ = 2, } NV_GPU_WORKSTATION_FEATURE_TYPE; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_QueryWorkstationFeatureSupport // //! \fn NvAPI_GPU_QueryWorkstationFeatureSupport(NvPhysicalGpuHandle physicalGpu, NV_GPU_WORKSTATION_FEATURE_TYPE gpuWorkstationFeature) //! \code //! DESCRIPTION: Indicates whether a queried workstation feature is supported by the requested GPU. //! //! SUPPORTED OS: Windows 10 and higher //! //! \since Release: 440 //! //! DESCRIPTION: This API, when called with a valid physical gpu handle as Input, lets caller know whether the given workstation feature is supported by this GPU. //! //! PARAMETERS: physicalGpu(IN) : The handle of the GPU for the which caller wants to get the support information. //! gpuWorkstationFeature(IN ) : The feature for the GPU in question. One of the values from enum NV_GPU_WORKSTATION_FEATURE_TYPE. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status listed below //! //! \retval ::NVAPI_OK the queried workstation feature is supported on the given GPU. //! \retval ::NVAPI_NO_IMPLEMENTATION the current driver doesn't support this interface. //! \retval ::NVAPI_INVALID_HANDLE the incoming physicalGpu handle is invalid. //! \retval ::NVAPI_NOT_SUPPORTED the requested gpuWorkstationFeature is not supported in the selected GPU. //! \retval ::NVAPI_SETTING_NOT_FOUND the requested gpuWorkstationFeature is unknown to the current driver version. //! //! \endcode //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_QueryWorkstationFeatureSupport(NvPhysicalGpuHandle physicalGpu, NV_GPU_WORKSTATION_FEATURE_TYPE gpuWorkstationFeature); //! \ingroup gpu typedef struct { NvU32 version; //!< version of this structure NvU32 width; //!< width of the input texture NvU32 height; //!< height of the input texture float* blendingTexture; //!< array of floating values building an intensity RGB texture } NV_SCANOUT_INTENSITY_DATA_V1; //! \ingroup gpu typedef struct { NvU32 version; //!< version of this structure NvU32 width; //!< width of the input texture NvU32 height; //!< height of the input texture float* blendingTexture; //!< array of floating values building an intensity RGB texture float* offsetTexture; //!< array of floating values building an offset texture NvU32 offsetTexChannels; //!< number of channels per pixel in the offset texture } NV_SCANOUT_INTENSITY_DATA_V2; typedef NV_SCANOUT_INTENSITY_DATA_V2 NV_SCANOUT_INTENSITY_DATA; //! \ingroup gpu #define NV_SCANOUT_INTENSITY_DATA_VER1 MAKE_NVAPI_VERSION(NV_SCANOUT_INTENSITY_DATA_V1, 1) #define NV_SCANOUT_INTENSITY_DATA_VER2 MAKE_NVAPI_VERSION(NV_SCANOUT_INTENSITY_DATA_V2, 2) #define NV_SCANOUT_INTENSITY_DATA_VER NV_SCANOUT_INTENSITY_DATA_VER2 /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_SetScanoutIntensity // //! DESCRIPTION: This API enables and sets up per-pixel intensity feature on the specified display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId combined physical display and GPU identifier of the display to apply the intensity control. //! \param [in] scanoutIntensityData the intensity texture info. //! \param [out] pbSticky(OUT) indicates whether the settings will be kept over a reboot. //! //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input data. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_SCANOUT_INTENSITY_DATA structure version mismatch. //! \retval ::NVAPI_OK Feature enabled. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetScanoutIntensity(NvU32 displayId, NV_SCANOUT_INTENSITY_DATA* scanoutIntensityData, int *pbSticky); //! \ingroup gpu typedef struct _NV_SCANOUT_INTENSITY_STATE_DATA { NvU32 version; //!< version of this structure NvU32 bEnabled; //!< intensity is enabled or not } NV_SCANOUT_INTENSITY_STATE_DATA; //! \ingroup gpu #define NV_SCANOUT_INTENSITY_STATE_VER MAKE_NVAPI_VERSION(NV_SCANOUT_INTENSITY_STATE_DATA, 1) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_GetScanoutIntensityState // //! DESCRIPTION: This API queries current state of the intensity feature on the specified display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration. //! \param [in,out] scanoutIntensityStateData intensity state data. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs. //! \retval ::NVAPI_OK Feature enabled. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetScanoutIntensityState(__in NvU32 displayId, __inout NV_SCANOUT_INTENSITY_STATE_DATA* scanoutIntensityStateData); //! \ingroup gpu typedef enum { NV_GPU_WARPING_VERTICE_FORMAT_TRIANGLESTRIP_XYUVRQ = 0, NV_GPU_WARPING_VERTICE_FORMAT_TRIANGLES_XYUVRQ = 1, } NV_GPU_WARPING_VERTICE_FORMAT; //! \ingroup gpu typedef struct { NvU32 version; //!< version of this structure float* vertices; //!< width of the input texture NV_GPU_WARPING_VERTICE_FORMAT vertexFormat; //!< format of the input vertices int numVertices; //!< number of the input vertices NvSBox* textureRect; //!< rectangle in desktop coordinates describing the source area for the warping } NV_SCANOUT_WARPING_DATA; //! \ingroup gpu #define NV_SCANOUT_WARPING_VER MAKE_NVAPI_VERSION(NV_SCANOUT_WARPING_DATA, 1) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_SetScanoutWarping // //! DESCRIPTION: This API enables and sets up the warping feature on the specified display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Combined physical display and GPU identifier of the display to apply the intensity control //! \param [in] scanoutWarpingData The warping data info //! \param [out] pbSticky Indicates whether the settings will be kept over a reboot. //! //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input data. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_SCANOUT_WARPING_DATA structure version mismatch. //! \retval ::NVAPI_OK Feature enabled. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetScanoutWarping(NvU32 displayId, NV_SCANOUT_WARPING_DATA* scanoutWarpingData, int* piMaxNumVertices, int* pbSticky); //! \ingroup gpu typedef struct _NV_SCANOUT_WARPING_STATE_DATA { NvU32 version; //!< version of this structure NvU32 bEnabled; //!< warping is enabled or not } NV_SCANOUT_WARPING_STATE_DATA; //! \ingroup gpu #define NV_SCANOUT_WARPING_STATE_VER MAKE_NVAPI_VERSION(NV_SCANOUT_WARPING_STATE_DATA, 1) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_GetScanoutWarpingState // //! DESCRIPTION: This API queries current state of the warping feature on the specified display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration. //! \param [in,out] scanoutWarpingStateData warping state data. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs. //! \retval ::NVAPI_OK Feature enabled. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetScanoutWarpingState(__in NvU32 displayId, __inout NV_SCANOUT_WARPING_STATE_DATA* scanoutWarpingStateData); typedef enum { NV_GPU_SCANOUT_COMPOSITION_PARAMETER_WARPING_RESAMPLING_METHOD = 0 } NV_GPU_SCANOUT_COMPOSITION_PARAMETER; //! This enum defines a collection of possible scanout composition values that can be used to configure //! possible scanout composition settings. (Currently the only parameter defined is the WARPING_RESAMPLING_METHOD). typedef enum { NV_GPU_SCANOUT_COMPOSITION_PARAMETER_SET_TO_DEFAULT = 0, // Set parameter to default value. // WARPING_RESAMPLING_METHOD section: NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BILINEAR = 0x100, NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_TRIANGULAR = 0x101, NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_BELL_SHAPED = 0x102, NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_BSPLINE = 0x103, NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_ADAPTIVE_TRIANGULAR = 0x104, NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_ADAPTIVE_BELL_SHAPED = 0x105, NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_ADAPTIVE_BSPLINE = 0x106 } NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_SetScanoutCompositionParameter // //! DESCRIPTION: This API sets various parameters that configure the scanout composition feature on the specified display. //! (currently there is only one configurable parameter defined: WARPING_RESAMPLING_METHOD, //! but this function is designed to support the addition of parameters as needed.) //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Combined physical display and GPU identifier of the display to apply the intensity control //! \param [in] parameter The scanout composition parameter to be set //! \param [in] parameterValue The data to be set for the specified parameter //! \param [in] pContainer Additional container for data associated with the specified parameter //! //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input data. //! \retval ::NVAPI_OK Feature enabled. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetScanoutCompositionParameter(NvU32 displayId, NV_GPU_SCANOUT_COMPOSITION_PARAMETER parameter, NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE parameterValue, float *pContainer); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_GetScanoutCompositionParameter // //! DESCRIPTION: This API queries current state of one of the various scanout composition parameters on the specified display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration. //! \param [in] parameter scanout composition parameter to by queried. //! \param [out] parameterData scanout composition parameter data. //! \param [out] pContainer Additional container for returning data associated with the specified parameter //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs. //! \retval ::NVAPI_OK Feature enabled. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetScanoutCompositionParameter(__in NvU32 displayId, __in NV_GPU_SCANOUT_COMPOSITION_PARAMETER parameter, __out NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE *parameterData, __out float *pContainer); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_GetScanoutConfiguration // //! DESCRIPTION: This API queries the desktop and scanout portion of the specified display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration. //! \param [in,out] desktopRect desktop area of the display in desktop coordinates. //! \param [in,out] scanoutRect scanout area of the display relative to desktopRect. //! //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs. //! \retval ::NVAPI_OK Feature enabled. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetScanoutConfiguration(NvU32 displayId, NvSBox* desktopRect, NvSBox* scanoutRect); //! \ingroup gpu //! Used in NvAPI_GPU_GetScanoutConfigurationEx(). typedef struct _NV_SCANOUT_INFORMATION { NvU32 version; //!< Structure version, needs to be initialized with NV_SCANOUT_INFORMATION_VER. NvSBox sourceDesktopRect; //!< Operating system display device rect in desktop coordinates displayId is scanning out from. NvSBox sourceViewportRect; //!< Area inside the sourceDesktopRect which is scanned out to the display. NvSBox targetViewportRect; //!< Area inside the rect described by targetDisplayWidth/Height sourceViewportRect is scanned out to. NvU32 targetDisplayWidth; //!< Horizontal size of the active resolution scanned out to the display. NvU32 targetDisplayHeight; //!< Vertical size of the active resolution scanned out to the display. NvU32 cloneImportance; //!< If targets are cloned views of the sourceDesktopRect the cloned targets have an importance assigned (0:primary,1 secondary,...). NV_ROTATE sourceToTargetRotation; //!< Rotation performed between the sourceViewportRect and the targetViewportRect. } NV_SCANOUT_INFORMATION; #define NV_SCANOUT_INFORMATION_VER MAKE_NVAPI_VERSION(NV_SCANOUT_INFORMATION,1) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_GetScanoutConfigurationEx // //! DESCRIPTION: This API queries the desktop and scanout portion of the specified display. //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 331 //! //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration. //! \param [in,out] pScanoutInformation desktop area to displayId mapping information. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetScanoutConfigurationEx(__in NvU32 displayId, __inout NV_SCANOUT_INFORMATION *pScanoutInformation); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetAdapterIdFromPhysicalGpu // //! DESCRIPTION: This API returns the OS-AdapterID from physicalGpu Handle. OS-AdapterID //! is the Adapter ID that is used by Win7 CCD APIs. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hPhysicalGpu PhysicalGpu Handle //! \param [out] pOSAdapterId Returns OS-AdapterId, it is typed as void * to //! avoid dependency with windows.h. User must type cast it to LUID. //! //! \retval ::NVAPI_INVALID_ARGUMENT pOSAdapterId is NULL; hPhysicalGpu is invalid //! \retval ::NVAPI_OK *pOSAdapterId contains valid data. //! \retval ::NVAPI_NOT_SUPPORTED This API is not supported on the system. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetAdapterIdFromPhysicalGpu(NvPhysicalGpuHandle hPhysicalGpu, void *pOSAdapterId); //! \ingroup gpu typedef enum _NV_VIRTUALIZATION_MODE { NV_VIRTUALIZATION_MODE_NONE = 0, //!< Represents Bare Metal GPU NV_VIRTUALIZATION_MODE_NMOS = 1, //!< Represents GPU-Passthrough NV_VIRTUALIZATION_MODE_VGX = 2, //!< Represents vGPU inside virtual machine NV_VIRTUALIZATION_MODE_HOST_VGPU = 3 //!< Represents VGX hypervisor in vGPU mode } NV_VIRTUALIZATION_MODE; //! \ingroup gpu typedef struct _NV_GPU_VIRTUALIZATION_INFO { NvU32 version; //!< Structure version NV_VIRTUALIZATION_MODE virtualizationMode; //!< one of NV_VIRTUALIZATION_MODE. NvU32 reserved; //!< reserved for future use. Should be set to ZERO. } NV_GPU_VIRTUALIZATION_INFO_V1; //! \ingroup gpu typedef NV_GPU_VIRTUALIZATION_INFO_V1 NV_GPU_VIRTUALIZATION_INFO; //! \ingroup gpu #define NV_GPU_VIRTUALIZATION_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_VIRTUALIZATION_INFO_V1,1) //! \ingroup gpu #define NV_GPU_VIRTUALIZATION_INFO_VER NV_GPU_VIRTUALIZATION_INFO_VER1 /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_GetVirtualizationInfo //! //! DESCRIPTION: This API returns virtualization information of the GPU //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 367 //! //! \param [in,out] pVirtualizationInfo Pointer to NV_GPU_VIRTUALIZATION_INFO structure. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVirtualizationInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_VIRTUALIZATION_INFO *pVirtualizationInfo); //! \ingroup gpu typedef struct _NV_LOGICAL_GPU_DATA_V1 { NvU32 version; //!< [in] Structure version. void *pOSAdapterId; //!< [out] Returns OS-AdapterId. User must send memory buffer of size atleast equal to the size of LUID structure before calling the NVAPI. NvU32 physicalGpuCount; //!< [out] Number of physical GPU handles associated with the specified logical GPU handle. NvPhysicalGpuHandle physicalGpuHandles[NVAPI_MAX_PHYSICAL_GPUS]; //!< [out] This array will be filled with physical GPU handles associated with the given logical GPU handle. //!< The array index refers to the Physical Gpu Index (Idx). //!< Idx value is the same as D3D11 MultiGPUDevice GPU index, D3D12 node index, OpenGL GL_NV_gpu_multicast GPU index. //!< When converted to a bit mask (1 << Idx), it matches: //!< 1. Vulkan deviceNodeMask in VkPhysicalDeviceIDProperties //!< 2. CUDA deviceNodeMask returned by cuDeviceGetLuid NvU32 reserved[8]; //!< Reserved for future use. Should be set to ZERO. } NV_LOGICAL_GPU_DATA_V1; //! \ingroup gpu typedef NV_LOGICAL_GPU_DATA_V1 NV_LOGICAL_GPU_DATA; #define NV_LOGICAL_GPU_DATA_VER1 MAKE_NVAPI_VERSION(NV_LOGICAL_GPU_DATA_V1,1) #define NV_LOGICAL_GPU_DATA_VER NV_LOGICAL_GPU_DATA_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetLogicalGpuInfo // //! This function is used to query Logical GPU information. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 421 //! //! \param [in] hLogicalGpu logical GPU Handle. //! \param [inout] pLogicalGpuData Pointer to NV_LOGICAL_GPU_DATA structure. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetLogicalGpuInfo(__in NvLogicalGpuHandle hLogicalGpu, __inout NV_LOGICAL_GPU_DATA *pLogicalGpuData); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetRasterBackendCount // //! This function retrieves the number of raster backend units (aka ROPs) in the GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 349 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetRasterBackendCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount); //! \addtogroup gridlicense //! @{ //! Maximum number of supported Feature License #define NV_LICENSE_MAX_COUNT 3 //! Signature length for GRID License #define NV_LICENSE_SIGNATURE_SIZE (128) //! Length for Grid License #define NV_LICENSE_INFO_MAX_LENGTH (128) //! License string typedef char NvAPI_LicenseString[NV_LICENSE_INFO_MAX_LENGTH]; //! Used in NV_LICENSE_FEATURE_DETAILS typedef enum _NV_LICENSE_FEATURE_TYPE { NV_LICENSE_FEATURE_UNKNOWN = 0, NV_LICENSE_FEATURE_VGPU = 1, NV_LICENSE_FEATURE_NVIDIA_RTX = 2, NV_LICENSE_FEATURE_QUADRO = NV_LICENSE_FEATURE_NVIDIA_RTX, //!< DEPRECATED name - do not use NV_LICENSE_FEATURE_GAMING = 3, } NV_LICENSE_FEATURE_TYPE; //! Used in NV_LICENSE_FEATURE_DETAILS //! //!< The 'status' variable holds any one of the following license expiry status codes : //!< 0 - Expiry information not available //!< 1 - Invalid expiry or error fetching expiry //!< 2 - Valid expiry //!< 3 - Expiry not applicable //!< 4 - Permanent expiry typedef struct _NV_LICENSE_EXPIRY_DETAILS { NvU32 year; //!< Year value of license expiry NvU16 month; //!< Month value of license expiry NvU16 day; //!< Day value of license expiry NvU16 hour; //!< Hour value of license expiry NvU16 min; //!< Minutes value of license expiry NvU16 sec; //!< Seconds value of license expiry NvU8 status; //!< License expiry status }NV_LICENSE_EXPIRY_DETAILS; //! Used in NV_LICENSABLE_FEATURES typedef struct _NV_LICENSE_FEATURE_DETAILS_V1 { NvU32 version; //!< IN - Structure version. NvU32 isEnabled : 1; //!< The current state of the licensed feature, true=enabled, false=disabled. NvU32 reserved : 31; //!< Reserved NV_LICENSE_FEATURE_TYPE featureCode; //!< Feature code that corresponds to the licensable feature. NvAPI_LicenseString licenseInfo; //!< Deprecated }NV_LICENSE_FEATURE_DETAILS_V1; typedef struct _NV_LICENSE_FEATURE_DETAILS_V2 { NvU32 version; //!< Unused. NvU32 isEnabled : 1; //!< The current state of the licensed feature, true=enabled, false=disabled. NvU32 reserved : 31; //!< Reserved NV_LICENSE_FEATURE_TYPE featureCode; //!< Feature code that corresponds to the licensable feature. NvAPI_LicenseString licenseInfo; //!< Deprecated NvAPI_LicenseString productName; //!< Nvidia Grid licensable product name. }NV_LICENSE_FEATURE_DETAILS_V2; typedef struct _NV_LICENSE_FEATURE_DETAILS_V3 { NvU32 version; //!< Unused. NvU32 isEnabled : 1; //!< The current state of license, true=licensed, false=unlicensed. NvU32 isFeatureEnabled : 1; //!< The current state of feature, true=enabled, false=disabled. NvU32 reserved : 30; //!< Reserved NV_LICENSE_FEATURE_TYPE featureCode; //!< Feature code that corresponds to the licensable feature. NvAPI_LicenseString licenseInfo; //!< Deprecated NvAPI_LicenseString productName; //!< Nvidia Grid licensable product name. }NV_LICENSE_FEATURE_DETAILS_V3; typedef struct _NV_LICENSE_FEATURE_DETAILS_V4 { NvU32 version; //!< Unused. NvU32 isEnabled : 1; //!< The current state of license, true=licensed, false=unlicensed. NvU32 isFeatureEnabled : 1; //!< The current state of feature, true=enabled, false=disabled. NvU32 reserved : 30; //!< Reserved NV_LICENSE_FEATURE_TYPE featureCode; //!< Feature code that corresponds to the licensable feature. NvAPI_LicenseString licenseInfo; //!< Deprecated NvAPI_LicenseString productName; //!< Nvidia Grid licensable product name. NV_LICENSE_EXPIRY_DETAILS licenseExpiry; //!< License expiry information. }NV_LICENSE_FEATURE_DETAILS_V4; typedef NV_LICENSE_FEATURE_DETAILS_V1 NV_LICENSE_FEATURE_DETAILS; #define NV_LICENSE_FEATURE_DETAILS_VER1 MAKE_NVAPI_VERSION(NV_LICENSE_FEATURE_DETAILS_V1, 1) #define NV_LICENSE_FEATURE_DETAILS_VER NV_LICENSE_FEATURE_DETAILS_VER1 //! Licensable features typedef struct _NV_LICENSABLE_FEATURES_V1 { NvU32 version; //!< IN - Structure version. NvU32 isLicenseSupported : 1; //!< True if Software Licensing is supported. NvU32 reserved : 31; //!< Reserved NvU32 licensableFeatureCount; //!< The number of licensable features. NvU8 signature[NV_LICENSE_SIGNATURE_SIZE]; //!< Dynamic signature required for Authentication of the components, //!< signature length limited to NV_LICENSE_SIGNATURE_SIZE NV_LICENSE_FEATURE_DETAILS_V1 licenseDetails[NV_LICENSE_MAX_COUNT]; //!< Array of licensable features }NV_LICENSABLE_FEATURES_V1; typedef struct _NV_LICENSABLE_FEATURES_V2 { NvU32 version; //!< IN - Structure version. NvU32 isLicenseSupported : 1; //!< True if Software Licensing is supported. NvU32 reserved : 31; //!< Reserved NvU32 licensableFeatureCount; //!< The number of licensable features. NvU8 signature[NV_LICENSE_SIGNATURE_SIZE]; //!< Dynamic signature required for Authentication of the components, //!< signature length limited to NV_LICENSE_SIGNATURE_SIZE NV_LICENSE_FEATURE_DETAILS_V2 licenseDetails[NV_LICENSE_MAX_COUNT]; //!< Array of licensable features }NV_LICENSABLE_FEATURES_V2; typedef struct _NV_LICENSABLE_FEATURES_V3 { NvU32 version; //!< IN - Structure version. NvU32 isLicenseSupported : 1; //!< True if Software Licensing is supported. NvU32 reserved : 31; //!< Reserved NvU32 licensableFeatureCount; //!< The number of licensable features. NvU8 signature[NV_LICENSE_SIGNATURE_SIZE]; //!< Dynamic signature required for Authentication of the components, //!< signature length limited to NV_LICENSE_SIGNATURE_SIZE NV_LICENSE_FEATURE_DETAILS_V3 licenseDetails[NV_LICENSE_MAX_COUNT]; //!< Array of licensable features }NV_LICENSABLE_FEATURES_V3; typedef struct _NV_LICENSABLE_FEATURES_V4 { NvU32 version; //!< IN - Structure version. NvU32 isLicenseSupported : 1; //!< True if Software Licensing is supported. NvU32 reserved : 31; //!< Reserved NvU32 licensableFeatureCount; //!< The number of licensable features. NvU8 signature[NV_LICENSE_SIGNATURE_SIZE]; //!< Dynamic signature required for Authentication of the components, //!< signature length limited to NV_LICENSE_SIGNATURE_SIZE NV_LICENSE_FEATURE_DETAILS_V4 licenseDetails[NV_LICENSE_MAX_COUNT]; //!< Array of licensable features }NV_LICENSABLE_FEATURES_V4; typedef NV_LICENSABLE_FEATURES_V4 NV_LICENSABLE_FEATURES; #define NV_LICENSABLE_FEATURES_VER1 MAKE_NVAPI_VERSION(NV_LICENSABLE_FEATURES_V1, 1) #define NV_LICENSABLE_FEATURES_VER2 MAKE_NVAPI_VERSION(NV_LICENSABLE_FEATURES_V2, 2) #define NV_LICENSABLE_FEATURES_VER3 MAKE_NVAPI_VERSION(NV_LICENSABLE_FEATURES_V3, 3) #define NV_LICENSABLE_FEATURES_VER4 MAKE_NVAPI_VERSION(NV_LICENSABLE_FEATURES_V4, 4) #define NV_LICENSABLE_FEATURES_VER NV_LICENSABLE_FEATURES_VER4 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetLicensableFeatures // //! DESCRIPTION: This function call identifies whether licenses are supported on this system and if //! they are supported, returns the details of the features that can be licensed. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hPhysicalGpu GPU selection //! \param [in,out] pLicensableFeatures Licensable features information. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup gridlicense ///////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetLicensableFeatures(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_LICENSABLE_FEATURES *pLicensableFeatures); typedef struct _NV_ENCODER_STATISTICS_V1 { NvU32 version; //!< Structure version value. NvU32 sessionsCount; //!< Count of active encoder sessions. NvU32 averageFps; //!< Trailing average FPS of all active sessions. NvU32 averageLatency; //!< Encode latency in milliseconds. } NV_ENCODER_STATISTICS_V1; typedef NV_ENCODER_STATISTICS_V1 NV_ENCODER_STATISTICS; #define NV_ENCODER_STATISTICS_VER1 MAKE_NVAPI_VERSION(NV_ENCODER_STATISTICS_V1, 1) #define NNV_ENCODER_STATISTICS_VER NV_ENCODER_STATISTICS_VER1 /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_GetEncoderStatistics //! //! DESCRIPTION: This API can be used to get encoder statistics for the specified Nvidia GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 384 //! //! \param [in] hPhysicalGpu - Handle of the Nvidia GPU. //! \param [inout] pEncoderStatistics - Pointer to the structure containing encoder statistics data. //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetEncoderStatistics(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_ENCODER_STATISTICS *pEncoderStatistics); typedef enum _NV_ENCODER_TYPE { NV_ENCODER_H264, NV_ENCODER_HEVC, NV_ENCODER_UNKNOWN = 0xFFFFFFFF, }NV_ENCODER_TYPE; typedef struct _NV_ENCODER_PER_SESSION_INFO_V1 { NvU32 sessionId; //!< Unique session ID. NvU32 processId; //!< Owning process ID. NvU32 vgpuInstance; //!< Owning vGPU instance ID (only valid on vGPU hosts, otherwise zero). NV_ENCODER_TYPE codecType; //!< Video encoder type. NvU32 hResolution; //!< Current encode horizontal resolution. NvU32 vResolution; //!< Current encode vertical resolution. NvU32 averageEncodeFps; //!< Moving average encode frames per second. NvU32 averageEncodeLatency; //!< Moving average encode latency in milliseconds. }NV_ENCODER_PER_SESSION_INFO_V1; #define NV_ENCODER_SESSION_INFO_MAX_ENTRIES_V1 0x200 //!< 512 entries. typedef struct _NV_ENCODER_SESSIONS_INFO_V1 { NvU32 version; //!< Structure version value. NvU32 sessionsCount; //!< OUTPUT : Count of active encoder sessions. NV_ENCODER_PER_SESSION_INFO_V1 *pSessionInfo; //!< OUTPUT : Array of session info. Caller should allocate memory for this field before making //!< the NvAPI_GPU_GetEncoderSessionsInfo() call, memory allocated should be of //!< size = sizeof(NV_ENCODER_PER_SESSION_INFO_V1) * NV_ENCODER_SESSION_INFO_MAX_ENTRIES_V1. } NV_ENCODER_SESSIONS_INFO_V1; typedef NV_ENCODER_SESSIONS_INFO_V1 NV_ENCODER_SESSIONS_INFO; #define NV_ENCODER_SESSIONS_INFO_VER1 MAKE_NVAPI_VERSION(NV_ENCODER_SESSIONS_INFO_V1, 1) #define NV_ENCODER_SESSIONS_INFO_VER NV_ENCODER_SESSIONS_INFO_VER1 /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_GetEncoderSessionsInfo //! //! DESCRIPTION: This API can be used to retrieve information about active encoder sessions on the specified GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 384 //! //! \param [in] hPhysicalGpu - Handle of the Nvidia GPU. //! \param [inout] pEncoderSessionsInfo - Pointer to the structure containing information related to encoder sessions. //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetEncoderSessionsInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_ENCODER_SESSIONS_INFO *pEncoderSessionsInfo); typedef struct _NV_PROCESS_UTILIZATION_SAMPLE_V1 { NvU32 pid; //!< PID of process. NvU64 timeStamp; //!< CPU Timestamp in microseconds. NvU32 smUtilization; //!< SM (3D/Compute) utilization value. NvU32 memUtilization; //!< Frame buffer memory utilization value. NvU32 encUtilization; //!< Encoder utilization value. NvU32 decUtilization; //!< Decoder utilization value. } NV_PROCESS_UTILIZATION_SAMPLE_V1; #define NV_PROCESS_UTILIIZATION_MAX_SAMPLE_COUNT_V1 100 //!< Max sample entries. typedef struct _NV_PROCESS_UTILIZATION_INFO_V1 { NvU32 version; //!< Structure version value. NvU64 previousQueryTimestamp; //!< INPUT : Timestamp from one of the previous queries. Samples taken after this timestamp will only be returned. //!< If 0, samples with all timestamps will be returned. NvU32 samplesCount; //!< OUTPUT : Total no. of samples being returned. NV_PROCESS_UTILIZATION_SAMPLE_V1 *pUtilizationSample; //!< OUTPUT : Per process utilization info. Caller should allocate memory for this field before making //!< the NvAPI_GPU_GetProcessUtilizationInfo() call, memory allocated should be of //!< size = sizeof(NV_PROCESS_UTILIZATION_SAMPLE_V1) * NV_PROCESS_UTILIIZATION_MAX_SAMPLE_COUNT_V1. } NV_PROCESS_UTILIZATION_INFO_V1; typedef NV_PROCESS_UTILIZATION_INFO_V1 NV_PROCESS_UTILIZATION_INFO; #define NV_PROCESS_UTILIZATION_INFO_VER1 MAKE_NVAPI_VERSION(NV_PROCESS_UTILIZATION_INFO_V1, 1) #define NV_PROCESS_UTILIZATION_INFO_VER NV_PROCESS_UTILIZATION_INFO_VER1 /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_GetProcessUtilizationInfo //! //! DESCRIPTION: This API can be used to retrieve per process GPU utilization info for the specified GPU. // //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 384 //! //! \param [in] hPhysicalGpu - Handle of the Nvidia GPU. //! \param [inout] pProcessUtilizationInfo - Pointer to the structure containing information related to process utilization. //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetProcessUtilizationInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_PROCESS_UTILIZATION_INFO *pProcessUtilizationInfo); typedef struct _NV_GPU_INFO_V1 { NvU32 version; //!< Structure Version. NvU32 bIsExternalGpu:1; //!< This flag is set for external GPU. NvU32 reserved:31; //!< Reserved for future use } NV_GPU_INFO_V1; typedef struct _NV_GPU_INFO_V2 { NvU32 version; //!< Structure Version. NvU32 bIsExternalGpu:1; //!< This flag is set for external GPU. NvU32 reserved:31; //!< Reserved for future use NvU64 pdi; //!< Per Device Identifier of the GPU. This is a 64 bit hexadecimal value. //!< The value of this field will be 0 if PDI query is not supported on this GPU. NvU32 rayTracingCores; //!< Number of "Ray Tracing Cores" supported by the GPU. NvU32 tensorCores; //!< Number of "Tensor Cores" supported by the GPU. NvU32 reservedEx[14]; //!< Reserved for future use. } NV_GPU_INFO_V2; #define NV_GPU_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_INFO_V1, 1) #define NV_GPU_INFO_VER2 MAKE_NVAPI_VERSION(NV_GPU_INFO_V2, 2) #define NV_GPU_INFO_VER NV_GPU_INFO_VER2 typedef NV_GPU_INFO_V2 NV_GPU_INFO; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetGPUInfo // //! DESCRIPTION: This API will return NVIDIA GPU related information. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 400 //! //! \param [inout] pGpuInfo - This structure will be filled with required information. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetGPUInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_INFO *pGpuInfo); typedef struct _NV_GPU_VR_READY_V1 { NvU32 version; //!< Structure Version. NvU32 isVRReady : 1; //!< Is the requested GPU VR ready. NvU32 reserved : 31; } NV_GPU_VR_READY_V1; #define NV_GPU_VR_READY_VER1 MAKE_NVAPI_VERSION(NV_GPU_VR_READY_V1, 1) #define NV_GPU_VR_READY_VER NV_GPU_VR_READY_VER1 typedef NV_GPU_VR_READY_V1 NV_GPU_VR_READY; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetVRReadyData // //! DESCRIPTION: This API will return NVIDIA GPU VR Ready state. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 465 //! //! \param [inout] pGpuVrReadyData - This structure will be filled with required information. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVRReadyData(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_VR_READY *pGpuVrReadyData); //Performance table overclocking //! \addtogroup gpuPerf //! @{ #define NVAPI_MAX_PERF_CLOCK_LEVELS 12 #define NVAPI_TARGET_ALL_PERF_LEVELS 0xffffffff #define NV_PERF_CLOCK_LEVEL_STATE_DEFAULT 0x00000000 //!< Level is in its default state #define NV_PERF_CLOCK_LEVEL_STATE_OVERCLOCKED 0x00000001 //!< Level is overclocked #define NV_PERF_CLOCK_LEVEL_STATE_DESKTOP 0x00000002 //!< 2D Desktop perf level #define NV_PERF_CLOCK_LEVEL_STATE_PERFORMANCE 0x00000004 //!< 3D applications perf level #define NV_PERF_CLOCK_LEVEL_STATE_TEST 0x00000008 //!< Test the new clocks for this level. Does not apply. #define NV_PERF_CLOCK_LEVEL_STATE_TEST_SUCCESS 0x00000010 //!< Test result #define NV_PERF_CLOCK_GPU_STATE_DEFAULT 0x00000000 //!< Default state #define NV_PERF_CLOCK_GPU_STATE_DYNAMIC_SUPPORTED 0x00000001 //!< GPU supports dynamic performance level transitions #define NV_PERF_CLOCK_GPU_STATE_DESKTOP 0x00000002 //!< GPU in desktop level #define NV_PERF_CLOCK_GPU_STATE_PERFORMANCE 0x00000004 //!< GPU in performance level #define NV_PERF_CLOCK_GPU_STATE_ACTIVE_CLOCKING_SUPPORTED 0x00000008 //!< Active clocking supported #define NV_PERF_CLOCK_GPU_STATE_ACTIVE_CLOCKING_ENABLE 0x00000010 //!< Enable active clocking #define NV_PERF_CLOCK_GPU_STATE_ACTIVE_CLOCKING_DISABLE 0x00000020 //!< Disable active clocking #define NV_PERF_CLOCK_GPU_STATE_MEMCLK_CONTROL_DISABLED 0x00000040 //!< Memory clock control disabled #define NV_PERF_CLOCK_GPU_STATE_GFXCLK_CONTROL_DISABLED 0x00000080 //!< Core clock control disabled #define NV_PERF_CLOCK_GPU_STATE_SET_DEFERRED 0x00000100 //!< No immediate perf transitions. Deferred until perf triggers kick in. #define NV_PERF_CLOCK_GPU_STATE_TESTING_CLOCKS_SUPPORTED 0x00000200 //!< Testing clocks supported //! @} //! \ingroup gpuPerf //! Used in NvAPI_GPU_GetPerfClocks() and NvAPI_GPU_GetPerfClocks() typedef struct { NvU32 version; //!< IN perf clock table version NvU32 levelCount; //!< number of the performance levels. count increases everytime a level is overclocked NvU32 gpuPerflevel; //!< OUT the current perf level. This is a dynamic level which can possibly change on every call NvU32 domainCount; //!< IN/OUT number of domains NvU32 gpuPerfFlags; //!< IN/OUT gpu flags - one of the flags defined in NV_PERF_CLOCK_GPU_STATE struct { NvU32 level; //!< IN/OUT performance level indicator, range 0 to levelCount - 1. NvU32 flags; //!< IN/OUT per level flags - one of more flags defined in NV_PERF_CLOCK_LEVEL_STATE struct { NV_GPU_PUBLIC_CLOCK_ID domainId; //!< IN/OUT current domain indicator - one of the ids from NV_GPU_PUBLIC_CLOCK_ID NvU32 domainFlags; //!< reserved unused domain flags NvU32 currentFreq; //!< IN/OUT current clock kHz NvU32 defaultFreq; //!< default clock kHz NvU32 minFreq; //!< min kHz NvU32 maxFreq; //!< max kHz NvU32 bSetClock:1; //!< IN if set during NvAPI_GPU_SetPerfClocks call, this domain currentFreq will be applied } domain[NVAPI_MAX_GPU_PERF_CLOCKS]; } perfLevel[NVAPI_MAX_PERF_CLOCK_LEVELS]; } NV_GPU_PERF_CLOCK_TABLE; //! \ingroup gpuPerf #define NV_GPU_PERF_CLOCK_TABLE_VER1 MAKE_NVAPI_VERSION(NV_GPU_PERF_CLOCK_TABLE,1) #define NV_GPU_PERF_CLOCK_TABLE_VER2 MAKE_NVAPI_VERSION(NV_GPU_PERF_CLOCK_TABLE,2) #define NV_GPU_PERF_CLOCK_TABLE_VER NV_GPU_PERF_CLOCK_TABLE_VER2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPerfClocks // //! This function retrieves the performance clock table information for one or all the supported levels. //! NOTE: This call will return 0 for system memory. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 85 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in] level Specific level selection. Zero for all levels. Number of levels increases with overclocking of the levels. //! \param [out] pPerfClkTable Table of performance levels retrieved. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide) //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the PERF_CLOCK_TABLE struct is not supported //! \ingroup gpuPerf /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPerfClocks(NvPhysicalGpuHandle hPhysicalGpu, NvU32 level, NV_GPU_PERF_CLOCK_TABLE *pPerfClkTable); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_SetPerfClocks // //! This function sets the Overclock to a specific level in the performance table or overclocks all levels with bSetClock set. //! \note The clocks represented by NV_GPU_PUBLIC_CLOCK_ID are interlocked on some GPU families. //! The API will fail to set the clocks if the interlocking ratios are violated. //! For the Fermi family : PROCESSOR_CLK = 2 x GRAPHICS_CLK //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 85 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in] level Specific level selection. Zero for all levels. Number of levels increases with overclocking of the levels. //! \param [in] pPerfClkTable Table of performance levels to set. //! Any other than DEFAULT for GPU and Level flags - gpuPerfFlags and level flags gets applied. //! If bSetClock is set, currentFreq gets applied. //! Overclocking DOMAIN_NV requires simulteneous overclocking of DOMAIN_M, else overclocking will fail. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide) //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the PERF_CLOCK_TABLE struct is not supported //! \retval NVAPI_TESTING_CLOCKS_NOT_SUPPORTED Testing clocks not supported //! //! \ingroup gpuPerf /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetPerfClocks(NvPhysicalGpuHandle hPhysicalGpu, NvU32 level, NV_GPU_PERF_CLOCK_TABLE *pPerfClkTable); //! \addtogroup gpuPerf //! @{ #define NV_GPU_PERF_SET_FORCE_PSTATE_FLAGS_ASYNC 0x00000001 #define NV_GPU_PERF_INPUT_FLAGS_DEFAULT_SETTINGS 0x00000001 #define NV_GPU_PERF_INPUT_FLAGS_MAX_CLOCK_FREQ 0x00000002 #define NV_GPU_PERF_INPUT_FLAGS_MIN_CLOCK_FREQ 0x00000004 #define NV_GPU_PERF_PSTATES_FLAGS_PERFMON_ENABLED 0x00000001 #define NV_GPU_PERF_PSTATES_FLAGS_DYN_PSTATES_CAPABLE 0x00000002 #define NV_GPU_PERF_PSTATES_FLAGS_DYNAMIC_PSTATE_ENABLED 0x00000004 #define NV_GPU_PERF_PSTATES_FLAGS_MODE_INTERNAL_TEST 0x00000008 #define NV_GPU_PERF_PSTATE_FLAGS_PCIELIMIT_GEN1 0x00000001 #define NV_GPU_PERF_PSTATE_FLAGS_OVERCLOCKED_TRUE 0x00000002 #define NV_GPU_PERF_PSTATE_FLAGS_OVERCLOCKABLE 0x00000004 #define NV_GPU_PERF_PSTATE_CLOCK_FLAGS_OVERCLOCKABLE 0x00000001 #define NV_GPU_PERF_PSTATE_CLOCK_INTERNAL_FLAGS_FORCE_PLL 0x00000001 #define NV_GPU_PERF_PSTATE_CLOCK_INTERNAL_FLAGS_FORCE_BYPASS 0x00000002 #define NV_GPU_PERF_PSTATE_VOLTAGE_FLAGS_VDT 0x00000001 //! @} //! \ingroup gpuPerf //! @{ typedef enum _NV_GPU_PERF_VID_ENG { NV_GPU_PERF_VID_ENG_NVENC, //!< GPU Video encoder engine. NV_GPU_PERF_VID_ENG_NVDEC, //!< GPU video decoder engine. }NV_GPU_PERF_VID_ENG; typedef struct _NV_GPU_GET_VID_ENG_PERF_SAMPLE { NvU32 version; //!< [in] Version of the structure, must always be the first element of the structure. NV_GPU_PERF_VID_ENG engineType; //!< [in] allows clients to set type of video engine in question. NvU32 clkPercentBusy; //!< [out] contains the percentage during the sample that the clock remains busy. NvU32 samplingPeriodUs; //!< [out] returns the sampling period in microseconds. } NV_GPU_GET_VID_ENG_PERF_SAMPLE_V1; typedef NV_GPU_GET_VID_ENG_PERF_SAMPLE_V1 NV_GPU_GET_VID_ENG_PERF_SAMPLE; #define NV_GPU_GET_VID_ENG_PERF_SAMPLE_VER1 MAKE_NVAPI_VERSION(NV_GPU_GET_VID_ENG_PERF_SAMPLE_V1,1) #define NV_GPU_GET_VID_ENG_PERF_SAMPLE_VER NV_GPU_GET_VID_ENG_PERF_SAMPLE_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetVideoEnginePerfSample // //! DESCRIPTION: This API can be used to obtain video encoder/decoder utilization of the associated Gpu. //! //! \since Release: 370 //! //! TCC_SUPPORTED //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpuPerf /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVideoEnginePerfSample(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_GET_VID_ENG_PERF_SAMPLE *pParams); //! @} //! \ingroup gpuPerf //! @{ #define NV_CTRL_PERF_BOOST_DURATION_MAX 30 //! Used in NV_GPU_PERF_BOOST_PARAMS_V1 typedef enum _NV_GPU_PERF_BOOST_FLAGS_CMD { NV_GPU_PERF_BOOST_FLAGS_CMD_CLEAR = 0x00000000, //!< to clear existing boost. NV_GPU_PERF_BOOST_FLAGS_CMD_BOOST_1LEVEL = 0x00000001, //!< to boost P-State one level higher. NV_GPU_PERF_BOOST_FLAGS_CMD_BOOST_TO_MAX = 0x00000002 //!< to the highest P-State. }NV_GPU_PERF_BOOST_FLAGS_CMD; //! Used in NvAPI_GPU_PerfModeBoost() typedef struct { /*! * Version of this structure. Must always be first element in this structure. */ NvU32 version; /*! *This parameter specifies the actual command. One of the flags mentioned in enum NV_GPU_PERF_BOOST_FLAGS_CMD. */ NV_GPU_PERF_BOOST_FLAGS_CMD flags; /*! *This parameter specifies the duration of the boost in seconds. *This has to be less than or equal to NV_CTRL_PERF_BOOST_DURATION_MAX which is 30 seconds. */ NvU32 duration; }NV_GPU_PERF_BOOST_PARAMS_V1; typedef NV_GPU_PERF_BOOST_PARAMS_V1 NV_GPU_PERF_BOOST_PARAMS; #define NV_GPU_PERF_BOOST_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_GPU_PERF_BOOST_PARAMS_V1,1) #define NV_GPU_PERF_BOOST_PARAMS_VER NV_GPU_PERF_BOOST_PARAMS_VER1 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_PerfModeBoost // //! DESCRIPTION: This function is used to boost the pstate to max or 1 level higher or also to clear the existing boost. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 370 //! //! \param [in] hPhysicalGPU GPU selection //! \param [in] NV_GPU_PERF_BOOST_PARAMS This structure contains the flag and duration of boost. //! Also need to specify the version. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpuPerf /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_PerfModeBoost(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_PERF_BOOST_PARAMS *boostParams); //! \addtogroup gpuPerf //! @{ /*! * The software performance policy. Each policy could request to set * performance in software. */ typedef enum { /*! * Power. Indicating perf is limited by total power limit. */ NV_GPU_PERF_POLICY_ID_SW_POWER = 0, /*! * Thermal. Indicating perf is limited by temperature limit. */ NV_GPU_PERF_POLICY_ID_SW_THERMAL, /*! * Reliability. Indicating perf is limited by reliability voltage. */ NV_GPU_PERF_POLICY_ID_SW_RELIABILITY, /*! * Operating. Indicating perf is limited by max operating voltage. */ NV_GPU_PERF_POLICY_ID_SW_OPERATING, /*! * Utilization. Indicating perf is limited by GPU utilization. */ NV_GPU_PERF_POLICY_ID_SW_UTILIZATION, /*! * SLI GPUBoost Synchronization. */ NV_GPU_PERF_POLICY_ID_SW_SLI_GPU_BOOST_SYNC, } NV_GPU_PERF_POLICY_ID_SW; #define NV_GPU_PERF_POLICY_ID_SW_NUM_V1 12 /*! * The performance point. Each perf point represents a specific upper limit * of performance. */ typedef enum { /*! * Max clock. Indicating the request is to set GPC2CLK below maximum clock. */ NV_GPU_PERF_POINT_ID_MAX_CLOCK = 0, /*! * Turbo Boost. Indicating the request is to set GPC2CLK below Tubo Boost clock. */ NV_GPU_PERF_POINT_ID_BOOST_CLOCK, /*! * Rated TDP. Indicating the request is to set GPC2CLK below Rated TDP, * aka base clock. */ NV_GPU_PERF_POINT_ID_BASE_CLOCK, /*! * Display. Indicating the request is to set GPC2CLK frequeuncy such that it's * operating voltage matches that of DISPCLK's, i.e. such that the clocks are * intersecting. */ NV_GPU_PERF_POINT_ID_DISPLAY, } NV_GPU_PERF_POINT_ID; #define NV_GPU_PERF_POINT_ID_NUM_V1 6 /*! * Structure to store perf policies info. * Used in NvAPI_GPU_PerfPoliciesGetInfo(). */ typedef struct { /*! * Version of this structure. Must always be first element in this structure. */ NvU32 version; /*! * Output: Mask of supported perf points. */ NvU32 supportedPointMask; /*! * Output: Mask of supported perf policies. */ NvU32 supportedPolicyMask; /*! * Reserved space for future use. */ NvU32 rsvd[16]; } NV_GPU_PERF_POLICIES_INFO_PARAMS_V1; #define NV_GPU_PERF_POLICIES_INFO_PARAMS_VER_1 MAKE_NVAPI_VERSION(NV_GPU_PERF_POLICIES_INFO_PARAMS_V1, 1) #define NV_GPU_PERF_POLICIES_INFO_PARAMS_VER NV_GPU_PERF_POLICIES_INFO_PARAMS_VER_1 typedef NV_GPU_PERF_POLICIES_INFO_PARAMS_V1 NV_GPU_PERF_POLICIES_INFO_PARAMS; //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_PerfPoliciesGetInfo() // //! DESCRIPTION: Returns perf limiting policies information, including supported performance points //! and supported performance policies. Values are returned in bitmasks. //! Application should call this API to obtain info before calling to the //! @ref NvAPI_GPU_PerfPoliciesGetStatus() API. //! //! \since Release: 313 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGPU - GPU selection. //! \param [inout] pPerfPoliciesInfo - Returned performance policies info structure. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! \retval: NVAPI_INVALID_POINTER: if pPerfPoliciesInfo is invalid pointer //! //! \ingroup gpuPerf /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_PerfPoliciesGetInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_PERF_POLICIES_INFO_PARAMS *pPerfPoliciesInfo); //! \addtogroup gpuPerf //! @{ /*! * Structure representing one perf policy's status. */ typedef struct { /*! * Output: mask of perf points that are currently violated. */ NvU32 perfPointMask; /*! * Output: violation time for each perf point. Units in nanoseconds. */ NvU64 perfPointTimeNs[NV_GPU_PERF_POINT_ID_NUM_V1]; /*! * Reserved space for future use. */ NvU32 rsvd[8]; } NV_GPU_PERF_POLICY_STATUS_V1; /*! * Structure to hold perf policy's status data * Used in NvAPI_GPU_PerfPoliciesGetStatus(). */ typedef struct { /*! * Version of this structure. Must always be first element in this structure. */ NvU32 version; /*! * Input: Requested policies mask by user. Will only retrieve status for * designated policies. */ NvU32 requestedPolicyMask; /*! * Output: reference timer's output. Units in nano-seconds. */ NvU64 referenceTimeNs; /*! * Output: mask of current limiting SW perf policies. */ NvU32 limitingPoliciesMask; /*! * Output: system's global status and violation time for each perf point. */ NV_GPU_PERF_POLICY_STATUS_V1 global; /*! * Output: Each SW policy's current status and violation time for each perf * point. */ NV_GPU_PERF_POLICY_STATUS_V1 policies[NV_GPU_PERF_POLICY_ID_SW_NUM_V1]; /*! * Reserved space for future use. */ NvU32 rsvd[48]; } NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1; #define NV_GPU_PERF_POLICIES_STATUS_PARAMS_VER_1 MAKE_NVAPI_VERSION(NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1, 1) #define NV_GPU_PERF_POLICIES_STATUS_PARAMS_VER NV_GPU_PERF_POLICIES_STATUS_PARAMS_VER_1 typedef NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1 NV_GPU_PERF_POLICIES_STATUS_PARAMS; //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_PerfPoliciesGetStatus() // //! DESCRIPTION: Returns @ref NV_GPU_PERF_POLICIES_STATUS_PARAMS structure. //! The global status is the result of all currently engaged policies. //! The per-policy status contains information specific to a policy. //! For parameter detail, see @ref NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1. //! //! \since Release: 313 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGPU - GPU selection. //! \param [out] pPerfPoliciesStatus - Returned performance reason status. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! \retval: NVAPI_INVALID_POINTER: if pPerfPoliciesStatus is invalid pointer //! //! \ingroup gpuPerf /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_PerfPoliciesGetStatus(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_PERF_POLICIES_STATUS_PARAMS *pPerfPoliciesStatus); //! \addtogroup gpuPerf //! @{ //! Used in various Perf Client Limit APIs below. Unique IDs corresponding to a //! set of Perf Client Limits exposed to allow users to set limits on their current //! clocks. typedef enum _NV_PERF_CLIENT_LIMIT_ID { /*! * Need to alias here because existing LIMIT IDs cannot be removed. * However, the new names indicate the intended usage. */ NVAPI_PERF_CLIENT_LIMIT_0_MAX = 0x00000000, //!< GRAPHICS Clock Maximum Client Limit NVAPI_PERF_CLIENT_LIMIT_GRAPHICS_MAX = NVAPI_PERF_CLIENT_LIMIT_0_MAX, NVAPI_PERF_CLIENT_LIMIT_0_MIN, //!< GRAPHICS Clock Minimum Client Limit NVAPI_PERF_CLIENT_LIMIT_GRAPHICS_MIN = NVAPI_PERF_CLIENT_LIMIT_0_MIN, NVAPI_PERF_CLIENT_LIMIT_1_MAX, //!< MEMORY Clock Maximum Client Limit NVAPI_PERF_CLIENT_LIMIT_MEMORY_MAX = NVAPI_PERF_CLIENT_LIMIT_1_MAX, NVAPI_PERF_CLIENT_LIMIT_1_MIN, //!< MEMORY Clock Minimum Client Limit NVAPI_PERF_CLIENT_LIMIT_MEMORY_MIN = NVAPI_PERF_CLIENT_LIMIT_1_MIN, NVAPI_PERF_CLIENT_LIMIT_2_MAX, //!< PSTATE Maximum Client Limit NVAPI_PERF_CLIENT_LIMIT_PSTATE_MAX = NVAPI_PERF_CLIENT_LIMIT_2_MAX, NVAPI_PERF_CLIENT_LIMIT_2_MIN, //!< PSTATE Minimum Client Limit NVAPI_PERF_CLIENT_LIMIT_PSTATE_MIN = NVAPI_PERF_CLIENT_LIMIT_2_MIN, NVAPI_PERF_CLIENT_LIMIT_VOLTAGE, //!< VOLTAGE Client Limit - Locks to a single voltage value NVAPI_PERF_CLIENT_LIMIT_MAX_LIMITS = 0x00000020, //!< Maximum number of supported client limits - cannot change this without changing structure version. } NV_GPU_PERF_CLIENT_LIMIT_ID; //! Type of data corresponding to a Perf Client Limit. typedef enum _NV_PERF_CLIENT_LIMIT_TYPE { NVAPI_PERF_CLIENT_LIMIT_TYPE_DISABLED = 0x00000000, NVAPI_PERF_CLIENT_LIMIT_TYPE_PSTATE, NVAPI_PERF_CLIENT_LIMIT_TYPE_FREQ, NVAPI_PERF_CLIENT_LIMIT_TYPE_VOLT, } NV_GPU_PERF_CLIENT_LIMIT_TYPE; /*! * Used in \ref NV_GPU_PERF_CLIENT_LIMIT_DATA_V1. Data specific to the _PSTATE * Limit type. */ typedef struct { /*! * Flags - currently reserved. */ NvU32 flags; /*! * Pstate ID at which to apply the limitiation. */ NV_GPU_PERF_PSTATE_ID pstateId; } NV_GPU_PERF_CLIENT_LIMIT_DATA_PSTATE; /*! * Used in \ref NV_GPU_PERF_CLIENT_LIMIT_DATA_V1. Data specific to the _FREQ * Limit type. */ typedef struct { /*! * Flags - currently reserved. */ NvU32 flags; /*! * Clock frequency at which to apply the limit. */ NvU32 freqKHz; /*! * Clock domain on which to apply the limit. */ NV_GPU_PUBLIC_CLOCK_ID domainId; } NV_GPU_PERF_CLIENT_LIMIT_DATA_FREQ; /*! * Used in \ref NV_GPU_PERF_CLIENT_LIMIT_DATA_V1. Data specific to the _VOLT * Perf Client Limit type. */ typedef struct { /*! * Flags - currently reserved. */ NvU32 flags; /*! * Voltage value at which to apply the limit. */ NvU32 voltageuV; /*! * ID of the voltage domain */ NV_GPU_CLIENT_VOLT_DOMAIN_ID railId; } NV_GPU_PERF_CLIENT_LIMIT_DATA_VOLT; /*! * Used in \ref NV_GPU_PERF_CLIENT_LIMIT_V1. Union of type-specific input * data. */ typedef union { /*! * Pstate type-specific data. */ NV_GPU_PERF_CLIENT_LIMIT_DATA_PSTATE pstate; /*! * Clock domain/frequency type-specific data. */ NV_GPU_PERF_CLIENT_LIMIT_DATA_FREQ freq; /*! * Voltage domain type-specific data. */ NV_GPU_PERF_CLIENT_LIMIT_DATA_VOLT volt; } NV_GPU_PERF_CLIENT_LIMIT_DATA_V1; //! Used in \ref NV_GPU_PERF_CLIENT_LIMITS_V1. Structure representing the //! current or desired status/settings of a Perf Client Limit. typedef struct { /*! * NV_GPU_PERF_CLIENT_LIMIT_ID for this Perf Client Limit. */ NV_GPU_PERF_CLIENT_LIMIT_ID limitId; /*! * Flags - currently reserved. */ NvU32 flags; /*! * The type of data used to specify this Perf Client Limit. */ NV_GPU_PERF_CLIENT_LIMIT_TYPE type; /*! * Type-specific data used to specify this Perf Client Limit. */ NV_GPU_PERF_CLIENT_LIMIT_DATA_V1 data; } NV_GPU_PERF_CLIENT_LIMIT_V1; //! Used in \ref NV_GPU_PERF_CLIENT_LIMITS. Flags to represent the following //! configurations: //! //! _ASYNC //! Apply new Perf Client Limits to HW asynchronously, not blocking //! returning from this call for values to be applied. Only applicable to //! \ref NvAPI_GPU_PerfClientLimitsSetStatus(). #define NV_GPU_PERF_CLIENT_LIMITS_FLAGS_ASYNC 0x1 //! Used in \ref NvAPI_GPU_PerfClientLimitsGetStatus() and //! \ref NvAPI_GPU_PerfClientLimitsSetStatus(). Structure representing the //! current or desired status/settings of a set of Perf Client Limits. typedef struct { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * NV_GPU_PERF_CLIENT_LIMITS_FLAGS_ */ NvU32 flags; /*! * Number of limits specified in the limits array. Caller sets this value * to 0 to specify that all limits should be queried. */ NvU32 numLimits; /*! * Array of Perf Client Limit status entries. This array has a valid index * ranging from 0 to numLimits - 1. */ NV_GPU_PERF_CLIENT_LIMIT_V1 limits[NVAPI_PERF_CLIENT_LIMIT_MAX_LIMITS]; } NV_GPU_PERF_CLIENT_LIMITS_V1; typedef NV_GPU_PERF_CLIENT_LIMITS_V1 NV_GPU_PERF_CLIENT_LIMITS; //! Macro for constructing the version field of NV_GPU_PERF_CLIENT_LIMITS_V1 #define NV_GPU_PERF_CLIENT_LIMITS_VER1 MAKE_NVAPI_VERSION(NV_GPU_PERF_CLIENT_LIMITS_V1,1) #define NV_GPU_PERF_CLIENT_LIMITS_VER2 MAKE_NVAPI_VERSION(NV_GPU_PERF_CLIENT_LIMITS_V1,2) //! Macro for constructing the version field of NV_GPU_PERF_CLIENT_LIMITS #define NV_GPU_PERF_CLIENT_LIMITS_VER NV_GPU_PERF_CLIENT_LIMITS_VER2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_PerfClientLimitsGetStatus // //! DESCRIPTION: This function retrieves the current status/settings //! associated with a set of Perf Client Limits. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 285 //! //! \param [in] hPhysicalGPU GPU selection //! \param [out] pLimits Structure containing the current status of a //! set of Perf Client Limits. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_PerfClientLimitsGetStatus(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_PERF_CLIENT_LIMITS *pLimits); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_PerfClientLimitsSetStatus // //! DESCRIPTION: This function sets the status/settings //! associated with a set of Perf Client Limits. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 285 //! //! \requires Administrator privileges since release 430.39 //! //! \param [in] hPhysicalGPU GPU selection //! \param [out] pLimits Structure containing the desired status of a //! set of Perf Client Limits. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - 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_INTERFACE NvAPI_GPU_PerfClientLimitsSetStatus(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_PERF_CLIENT_LIMITS *pLimits); //! @} //! Used in NvAPI_GPU_GetPerfDecreaseInfo. //! Bit masks for knowing the exact reason for performance decrease typedef enum _NVAPI_GPU_PERF_DECREASE { NV_GPU_PERF_DECREASE_NONE = 0, //!< No Slowdown detected NV_GPU_PERF_DECREASE_REASON_THERMAL_PROTECTION = 0x00000001, //!< Thermal slowdown/shutdown/POR thermal protection NV_GPU_PERF_DECREASE_REASON_POWER_CONTROL = 0x00000002, //!< Power capping / pstate cap NV_GPU_PERF_DECREASE_REASON_AC_BATT = 0x00000004, //!< AC->BATT event NV_GPU_PERF_DECREASE_REASON_API_TRIGGERED = 0x00000008, //!< API triggered slowdown NV_GPU_PERF_DECREASE_REASON_INSUFFICIENT_POWER = 0x00000010, //!< Power connector missing NV_GPU_PERF_DECREASE_REASON_UNKNOWN = 0x80000000, //!< Unknown reason } NVAPI_GPU_PERF_DECREASE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPerfDecreaseInfo // //! DESCRIPTION: This function retrieves - in NvU32 variable - reasons for the current performance decrease. //! //! SUPPORTED OS: Windows 7 and higher //! //! \param [in] hPhysicalGPU (IN) - GPU for which performance decrease is to be evaluated. //! \param [out] pPerfDecrInfo (OUT) - Pointer to a NvU32 variable containing performance decrease info //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup gpuPerf /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPerfDecreaseInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NvU32 *pPerfDecrInfo); //! \addtogroup gpuvoltage //! @{ //! Used in NvAPI_GPU_GetVoltageDomainsInfo(). //! Fields marked with [SET] must be populated when making NvAPI_GPU_GetVoltageDomainsInfo() call. typedef struct _NV_GPU_VOLTAGE_DOMAIN_INFO_V1 { //! Domain ID (To be [SET] only if NV_GPU_VOLTAGE_DOMAINS_INFO_V::numDomains > 0). NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId; //! Voltage step size for this domain in uV. NvU32 stepSizeuV; } NV_GPU_VOLTAGE_DOMAIN_INFO_V1; //! Used in NvAPI_GPU_GetVoltageDomainsInfo(). //! Fields marked with [SET] must be populated when making NvAPI_GPU_GetVoltageDomainsInfo() call. typedef struct _NV_GPU_VOLTAGE_DOMAINS_INFO_V1 { //! [SET] Version info of the structure (NV_GPU_VOLTAGE_DOMAINS_INFO_VER). NvU32 version; //! Reserved for future use. NvU32 flags; //! [SET] Number of voltage domains to query for obtaining their static information. //! Clients should set this to 0 to query all supported domains. NvU32 numDomains; //! Array of voltage domains and has 0 to numDomains - 1 as valid index range. NV_GPU_VOLTAGE_DOMAIN_INFO_V1 domains[NVAPI_MAX_GPU_PERF_VOLTAGES]; } NV_GPU_VOLTAGE_DOMAINS_INFO_V1; //! Used in NvAPI_GPU_GetVoltageDomainsInfo(). typedef NV_GPU_VOLTAGE_DOMAINS_INFO_V1 NV_GPU_VOLTAGE_DOMAINS_INFO; //! Macro for constructing the version field of NV_GPU_VOLTAGE_DOMAINS_INFO_V1. #define NV_GPU_VOLTAGE_DOMAINS_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_VOLTAGE_DOMAINS_INFO_V1, 1) //! Macro for constructing the version field of NV_GPU_VOLTAGE_DOMAINS_INFO_VER1. #define NV_GPU_VOLTAGE_DOMAINS_INFO_VER NV_GPU_VOLTAGE_DOMAINS_INFO_VER1 //! @} /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_GetVoltageDomainsInfo //! //! DESCRIPTION: This API returns static information for the specified domains. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 313.xx //! //! \param [in] hPhysicalGpu The physical GPU handle //! \param [out] pVoltageDomainsInfo Pointer to structure containing the static information //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! \retval NVAPI_INVALID_ARGUMENT Number of requested domains exceed NVAPI_MAX_GPU_PERF_VOLTAGES. //! \ingroup gpuvoltage /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVoltageDomainsInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_VOLTAGE_DOMAINS_INFO *pVoltageDomainsInfo); //! \addtogroup gpuvoltage //! @{ //! Used in NvAPI_GPU_GetVoltageDomainsStatus(). //! Fields marked with [SET] must be populated when making NvAPI_GPU_GetVoltageDomainsStatus() call. typedef struct { //! Domain ID (To be [SET] only if NV_GPU_VOLTAGE_DOMAINS_STATUS_V::numDomains > 0). NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId; //! Current voltage for this domain in uV. NvU32 voltageuV; } NV_GPU_VOLTAGE_DOMAIN_STATUS_V1; //! Used in NvAPI_GPU_GetVoltageDomainsStatus(). //! Fields marked with [SET] must be populated when making NvAPI_GPU_GetVoltageDomainsStatus() call. typedef struct { //! [SET] Version info of the structure (NV_GPU_VOLTAGE_DOMAINS_STATUS_VER). NvU32 version; //! Reserved for future use. NvU32 flags; //! [SET] Number of voltage domains to query for obtaining their current status. //! Clients should set this to 0 to query all supported domains. NvU32 numDomains; //! Array of voltage domains and has 0 to numDomains - 1 as valid index range. NV_GPU_VOLTAGE_DOMAIN_STATUS_V1 domains[NVAPI_MAX_GPU_PERF_VOLTAGES]; } NV_GPU_VOLTAGE_DOMAINS_STATUS_V1; //! Used in NvAPI_GPU_GetVoltageDomainsStatus(). typedef NV_GPU_VOLTAGE_DOMAINS_STATUS_V1 NV_GPU_VOLTAGE_DOMAINS_STATUS; //! Macro for constructing the version field of NV_GPU_VOLTAGE_DOMAINS_STATUS_V1. #define NV_GPU_VOLTAGE_DOMAINS_STATUS_VER1 MAKE_NVAPI_VERSION(NV_GPU_VOLTAGE_DOMAINS_STATUS_V1, 1) //! Macro for constructing the version field of NV_GPU_VOLTAGE_DOMAINS_STATUS_VER1. #define NV_GPU_VOLTAGE_DOMAINS_STATUS_VER NV_GPU_VOLTAGE_DOMAINS_STATUS_VER1 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetVoltageDomainsStatus // //! DESCRIPTION: This API returns current status for the specified domains. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 295.xx //! //! \param [in] hPhysicalGpu The physical GPU handle //! \param [out] pVoltageDomainsStatus Pointer to structure containing the current status //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! \retval NVAPI_INVALID_ARGUMENT Number of requested domains exceed NVAPI_MAX_GPU_PERF_VOLTAGES. //! \ingroup gpuvoltage /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVoltageDomainsStatus(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_VOLTAGE_DOMAINS_STATUS *pVoltageDomainsStatus); //! \ingroup gpuVoltage #define NVAPI_MAX_GPU_PERF_DOMAIN_VOLTAGES 128 //! \ingroup gpuVoltage typedef struct { NvU32 version; NvU32 flags; //!< Currently unsupported NvU32 numDomains; //!< The number of voltage domains supported on the board struct { NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId; //!< Domain ID NvU32 flags; //!< Currently unsupported NvU32 numVoltages; //!< The number of voltage levels defined for this domain struct { NvU32 flags; //!< Currently unsupported NvU32 mvolt; //!< Voltage in mV } voltages[NVAPI_MAX_GPU_PERF_DOMAIN_VOLTAGES]; //!< Valid index range from 0 to domains[i].numVoltages - 1 } domains[NVAPI_MAX_GPU_PERF_VOLTAGES]; //!< Valid index range from 0 to numDomains-1 } NV_GPU_PERF_VOLTAGES; //! \ingroup gpuVoltage //! Macro for contructing the version field of NV_GPU_PERF_VOLTAGES #define NV_GPU_PERF_VOLTAGES_VER MAKE_NVAPI_VERSION(NV_GPU_PERF_VOLTAGES,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetVoltages // //! DESCRIPTION: This API returns the supported voltage levels for each supported voltage domain on the board. //! These are the valid voltage levels which can be used for NvAPI_GPU_SetPstates() and //! NvAPI_GPU_SetPstatesInfo(). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hPhysicalGPU GPU selection. //! \param [out] pPerfVoltages Voltage information retrieved, as detailed below: //! - flags - currently unsupported //! - numDomains - the number of voltage domains supported on the board //! - domains - valid index range from 0 to numDomains - 1 //! - domains[i].domainId - the ID of the voltage domain //! - domains[i].flags - currently unsupported //! - domains[i].numVoltages - number of voltage levels defined for this domain //! - domains[i].voltages - valid index range from 0 to domains[i].numVoltages - 1 //! - domains[i].voltages[j].flags - currently unsupported //! - domains[i].voltages[j].mvolt - voltage in mV //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_ERROR - miscellaneous error occurred //! \retval ::NVAPI_HANDLE_INVALIDATED - handle passed has been invalidated (see user guide) //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE - handle passed is not a physical GPU handle //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION - the version of the NV_GPU_PERF_PSTATES struct is not supported //! //! \ingroup gpuVoltage /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetVoltages(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_VOLTAGES *pPerfVoltages); //! \ingroup gpuvoltage //! @{ //! Used in NvAPI_GPU_ClientVoltRailsGetStatus(). typedef struct _NV_GPU_CLIENT_VOLT_RAIL_STATUS_V1 { //! ID of the voltage rail. NV_GPU_CLIENT_VOLT_DOMAIN_ID railId; //! Current voltage value of voltage rail in uV. NvU32 currVoltuV; //! //! Reserved space such that new elements can be added to the structure //! without need to create a new version. //! NvU8 reserved[32]; } NV_GPU_CLIENT_VOLT_RAIL_STATUS_V1; typedef struct _NV_GPU_CLIENT_VOLT_RAILS_STATUS_V1 { //! Version of structure. Must always be first. NvU32 version; //! //! Reserved space such that new elements can be added to the structure //! without need to create a new version. //! NvU8 reserved[32]; //! Array to store individual volt rail status. NV_GPU_CLIENT_VOLT_RAIL_STATUS_V1 rails[NV_GPU_CLIENT_VOLT_DOMAIN_MAX_ENTRIES]; } NV_GPU_CLIENT_VOLT_RAILS_STATUS_V1; typedef NV_GPU_CLIENT_VOLT_RAILS_STATUS_V1 NV_GPU_CLIENT_VOLT_RAILS_STATUS; //! Macro for constructing the version field of NV_GPU_CLIENT_VOLT_RAILS_STATUS_V1 #define NV_GPU_CLIENT_VOLT_RAILS_STATUS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_VOLT_RAILS_STATUS_V1, 1) //! Macro for constructing the version field of NV_GPU_CLIENT_VOLT_RAILS_STATUS #define NV_GPU_CLIENT_VOLT_RAILS_STATUS_VER NV_GPU_CLIENT_VOLT_RAILS_STATUS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientVoltRailsGetStatus // //! This function gets dynamic parameters associated with a voltage rail. //! Note: On some GPU-s, the rail voltage returned by this interface may be 0 //! due to some inherent operating conditions in the GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 367 //! //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle is invalid. //! \retval NVAPI_OK Successfully got dynamic parameters. //! \retval NVAPI_ERROR Failed to get dynamic parameters. //! //! \ingroup gpuvoltage /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientVoltRailsGetStatus(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_VOLT_RAILS_STATUS *pClientRailsStatus); //! @} //! \ingroup gpuvoltage //! @{ //! //! //! Structure representing the control parameters associated with //! Voltage Rails. //! typedef struct { //! //! Structure version. Must always be first element in structure. //! NvU32 version; //! //! Percentage voltage delta to be applied for overvolting purpose. //! NvU8 pctDelta; //! //! Reserved space such that new elements can be added to the structure //! without need to create a new version. //! NvU8 reserved[32]; } NV_GPU_CLIENT_VOLT_RAILS_CONTROL_V1; typedef NV_GPU_CLIENT_VOLT_RAILS_CONTROL_V1 NV_GPU_CLIENT_VOLT_RAILS_CONTROL; //! Macro for constructing the version field of NV_GPU_CLIENT_VOLT_RAILS_CONTROL_V1 #define NV_GPU_CLIENT_VOLT_RAILS_CONTROL_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_VOLT_RAILS_CONTROL_V1, 1) //! Macro for constructing the version field of NV_GPU_CLIENT_VOLT_RAILS_CONTROL #define NV_GPU_CLIENT_VOLT_RAILS_CONTROL_VER NV_GPU_CLIENT_VOLT_RAILS_CONTROL_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientVoltRailsGetControl // //! This function gets control parameters associated with a voltage rail. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 367 //! //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle is invalid. //! \retval NVAPI_OK Successfully got control parameters. //! \retval NVAPI_ERROR Failed to get control parameters. //! //! \ingroup gpuvoltage /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientVoltRailsGetControl(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_CLIENT_VOLT_RAILS_CONTROL *pClientRailsControl); ////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientVoltRailsSetControl // //! Accessor of control parameters associated with a Voltage Rail. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 367 //! //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle is invalid. //! \retval NVAPI_OK Successfully set control parameters. //! \retval NVAPI_ERROR Failed to set control parameters. //! //! \ingroup gpuvoltage /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientVoltRailsSetControl(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_VOLT_RAILS_CONTROL *pClientRailsControl); //! \ingroup gpupstate //! Used in NvAPI_GPU_GetPstatesInfoEx() //! Used in NvAPI_GPU_GetPstatesInfo() and NvAPI_GPU_SetPstatesInfo(). typedef struct { NvU32 version; NvU32 flags; //!< - bit 0 indicates if perfmon is enabled or not //!< - bit 1 indicates if dynamic Pstate is capable or not //!< - bit 2 indicates if dynamic Pstate is enable or not //!< - all other bits must be set to 0 NvU32 numPstates; //!< The number of available p-states NvU32 numClocks; //!< The number of clock domains supported by each P-State struct { NV_GPU_PERF_PSTATE_ID pstateId; //!< ID of the p-state. NvU32 flags; //!< - bit 0 indicates if the PCIE limit is GEN1 or GEN2 //!< - bit 1 indicates if the Pstate is overclocked or not //!< - bit 2 indicates if the Pstate is overclockable or not //!< - all other bits must be set to 0 struct { NV_GPU_PUBLIC_CLOCK_ID domainId; //!< ID of the clock domain NvU32 flags; //!< Reserved. Must be set to 0 NvU32 freq; //!< Clock frequency in kHz } clocks[NVAPI_MAX_GPU_PERF_CLOCKS]; } pstates[NVAPI_MAX_GPU_PERF_PSTATES]; } NV_GPU_PERF_PSTATES_INFO_V1; //! \ingroup gpupstate typedef struct { NvU32 version; NvU32 flags; //!< - bit 0 indicates if perfmon is enabled or not //!< - bit 1 indicates if dynamic Pstate is capable or not //!< - bit 2 indicates if dynamic Pstate is enable or not //!< - all other bits must be set to 0 NvU32 numPstates; //!< The number of available p-states NvU32 numClocks; //!< The number of clock domains supported by each P-State NvU32 numVoltages; struct { NV_GPU_PERF_PSTATE_ID pstateId; //!< ID of the p-state. NvU32 flags; //!< - bit 0 indicates if the PCIE limit is GEN1 or GEN2 //!< - bit 1 indicates if the Pstate is overclocked or not //!< - bit 2 indicates if the Pstate is overclockable or not //!< - all other bits must be set to 0 struct { NV_GPU_PUBLIC_CLOCK_ID domainId; NvU32 flags; //!< bit 0 indicates if this clock is overclockable //!< all other bits must be set to 0 NvU32 freq; } clocks[NVAPI_MAX_GPU_PERF_CLOCKS]; struct { NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId; //!< ID of the voltage domain, containing flags and mvolt info NvU32 flags; //!< Reserved for future use. Must be set to 0 NvU32 mvolt; //!< Voltage in mV } voltages[NVAPI_MAX_GPU_PERF_VOLTAGES]; } pstates[NVAPI_MAX_GPU_PERF_PSTATES]; //!< Valid index range is 0 to numVoltages-1 } NV_GPU_PERF_PSTATES_INFO_V2; //! \ingroup gpupstate typedef NV_GPU_PERF_PSTATES_INFO_V2 NV_GPU_PERF_PSTATES_INFO; //! \ingroup gpupstate //! @{ //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO_V1 #define NV_GPU_PERF_PSTATES_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES_INFO_V1,1) //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO_V2 #define NV_GPU_PERF_PSTATES_INFO_VER2 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES_INFO_V2,2) //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO_V2 #define NV_GPU_PERF_PSTATES_INFO_VER3 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES_INFO_V2,3) //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO #define NV_GPU_PERF_PSTATES_INFO_VER NV_GPU_PERF_PSTATES_INFO_VER3 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPstatesInfo // //! DESCRIPTION: This API retrieves all performance states (P-States) information. //! //! P-States are GPU active/executing performance capability and power consumption states. //! P-States range from P0 to P15, with P0 being the highest performance/power state, and //! P15 being the lowest performance/power state. Each P-State, if available, maps to a //! performance level. Not all P-States are available on a given system. The definition //! of each P-States are currently as follow: //! - P0/P1 - Maximum 3D performance //! - P2/P3 - Balanced 3D performance-power //! - P8 - Basic HD video playback //! - P10 - DVD playback //! - P12 - Minimum idle power consumption //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [out] pPerfPstates P-States information retrieved, as detailed below: //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_GPU_PERF_PSTATES struct is not supported //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPstatesInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATES_INFO *pPerfPstatesInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPstatesInfoEx // //! DESCRIPTION: This API retrieves all performance states (P-States) information. This is the same as //! NvAPI_GPU_GetPstatesInfo(), but supports an input flag for various options. //! //! P-States are GPU active/executing performance capability and power consumption states. //! //! P-States ranges from P0 to P15, with P0 being the highest performance/power state, and //! P15 being the lowest performance/power state. Each P-State, if available, maps to a //! performance level. Not all P-States are available on a given system. The definitions //! of each P-State are currently as follows: \n //! - P0/P1 - Maximum 3D performance //! - P2/P3 - Balanced 3D performance-power //! - P8 - Basic HD video playback //! - P10 - DVD playback //! - P12 - Minimum idle power consumption //! //! \deprecated Do not use this function - it is deprecated in release 304. Instead, use NvAPI_GPU_GetPstates20. //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hPhysicalGPU GPU selection. //! \param [out] pPerfPstatesInfo P-States information retrieved, as detailed below: \n //! - flags is reserved for future use. //! - numPstates is the number of available P-States //! - numClocks is the number of clock domains supported by each P-State //! - pstates has valid index range from 0 to numPstates - 1 //! - pstates[i].pstateId is the ID of the P-State, //! containing the following info: //! - pstates[i].flags containing the following info: //! - bit 0 indicates if the PCIE limit is GEN1 or GEN2 //! - bit 1 indicates if the Pstate is overclocked or not //! - bit 2 indicates if the Pstate is overclockable or not //! - pstates[i].clocks has valid index range from 0 to numClocks -1 //! - pstates[i].clocks[j].domainId is the public ID of the clock domain, //! containing the following info: //! - pstates[i].clocks[j].flags containing the following info: //! bit 0 indicates if the clock domain is overclockable or not //! - pstates[i].clocks[j].freq is the clock frequency in kHz //! - pstates[i].voltages has a valid index range from 0 to numVoltages - 1 //! - pstates[i].voltages[j].domainId is the ID of the voltage domain, //! containing the following info: //! - pstates[i].voltages[j].flags is reserved for future use. //! - pstates[i].voltages[j].mvolt is the voltage in mV //! inputFlags(IN) - This can be used to select various options: //! - if bit 0 is set, pPerfPstatesInfo would contain the default settings //! instead of the current, possibily overclocked settings. //! - if bit 1 is set, pPerfPstatesInfo would contain the maximum clock //! frequencies instead of the nominal frequencies. //! - if bit 2 is set, pPerfPstatesInfo would contain the minimum clock //! frequencies instead of the nominal frequencies. //! - all other bits must be set to 0. //! //! \retval ::NVAPI_OK Completed request //! \retval ::NVAPI_ERROR Miscellaneous error occurred //! \retval ::NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide) //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_GPU_PERF_PSTATES struct is not supported //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 304. Instead, use NvAPI_GPU_GetPstates20.") NVAPI_INTERFACE NvAPI_GPU_GetPstatesInfoEx(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATES_INFO *pPerfPstatesInfo, NvU32 inputFlags); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_SetPstatesInfo // //! DESCRIPTION: This API set the performance states (P-States) of the specified GPU. //! //! P-States are GPU active/executing performance capability and power consumption states. //! P-States ranges from P0 to P15, with P0 being the highest performance/power state, and //! P15 being the lowest performance/power state. Each P-State, if available, maps to a //! performance level. Not all P-States are available on a given system. The definition //! of each P-States are currently as follow: //! - P0/P1 - Maximum 3D performance //! - P2/P3 - Balanced 3D performance-power //! - P8 - Basic HD video playback //! - P10 - DVD playback //! - P12 - Minimum idle power consumption //! //! The changes this API makes are *not* persistent across a driver unload or reboot. //! Client applications must handle enforcing persistence. However, client apps should //! also be careful not to persist bad pstate configurations across reboots (i.e. if the //! bad pstate configuration hangs the chip and the client application always applies that //! configuration on boot, the user will never be able to boot and revert those changes //! without booting to safe mode). //! //! NOTE: This API was introduced starting with NV_GPU_PERF_PSTATES_INFO structure version //! NV_GPU_PERF_PSTATES_INFO_VER2. This API must be called with structure version //! >= NV_GPU_PERF_PSTATES_INFO_VER2. //! This API is deprecated, use NvAPI_GPU_SetPstates20 instead. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in] pPerfPstates P-States information retrieved, as detailed below: //! - flags is reserved for future use. //! - numPstates the number of p-states specified //! - numClocks is the number of clock domains specified in each p-state. //! - numVoltages is the number of voltage domains specified in each p-State //! - pstates has valid index range from 0 to numPstates - 1 //! - pstates[i].pstateId is the ID of the P-State, //! containing the following info: //! - pstates[i].flags is reserved for future use //! - pstates[i].clocks has valid index range from 0 to numClocks -1 //! - pstates[i].clocks[j].domainId is the public ID of the clock domain, //! containing the following info: //! - pstates[i].clocks[j].flags is reserved for future use. //! - pstates[i].clocks[j].freq is the clock frequency in kHz //! - pstates[i].voltages has a valid index range from 0 to numVoltages - 1 //! - pstates[i].voltages[j].domainId is the ID of the voltage domain, //! containing the following info: //! - pstates[i].voltages[j].flags is reserved for future use. //! - pstates[i].voltages[j].mvolt is the voltage in mV //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_ERROR - miscellaneous error occurred //! \retval ::NVAPI_HANDLE_INVALIDATED - handle passed has been invalidated (see user guide) //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE - handle passed is not a physical GPU handle //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION - the version of the NV_GPU_PERF_PSTATES struct is not supported //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetPstatesInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATES_INFO *pPerfPstatesInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPstates20 // //! DESCRIPTION: This API retrieves all performance states (P-States) 2.0 information. //! //! P-States are GPU active/executing performance capability states. //! They range from P0 to P15, with P0 being the highest performance state, //! and P15 being the lowest performance state. Each P-State, if available, //! maps to a performance level. Not all P-States are available on a given system. //! The definition of each P-States are currently as follow: //! - P0/P1 - Maximum 3D performance //! - P2/P3 - Balanced 3D performance-power //! - P8 - Basic HD video playback //! - P10 - DVD playback //! - P12 - Minimum idle power consumption //! //! TCC_SUPPORTED //! //! \since Release: 295 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hPhysicalGPU GPU selection //! \param [out] pPstatesInfo P-States information retrieved, as documented in declaration above //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPstates20(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_PERF_PSTATES20_INFO *pPstatesInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_SetPstates20 // //! DESCRIPTION: This API sets the performance states (P-States) 2.0 information. //! This API can modify only parameters (frequencies/voltages) that //! support overrides by specifying delta offset to the parameter's nominal //! value (as advertized in the flags of given parameter). //! //! Note: Only fields marked as [SET] are required to be populated within //! the NV_GPU_PERF_PSTATES20_INFO structure before calling this API. //! Note: Call expects correctly populated structure, and obsolete voltage //! and/or clock entries can be ignored providing _UNDEFINDED ID-s //! (NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_UNDEFINED or //! NVAPI_GPU_PUBLIC_CLOCK_UNDEFINED respectively) //! //! P-States are GPU active/executing performance capability states. //! They range from P0 to P15, with P0 being the highest performance state, //! and P15 being the lowest performance state. Each P-State, if available, //! maps to a performance level. Not all P-States are available on a given system. //! The definition of each P-States are currently as follow: //! - P0/P1 - Maximum 3D performance //! - P2/P3 - Balanced 3D performance-power //! - P8 - Basic HD video playback //! - P10 - DVD playback //! - P12 - Minimum idle power consumption //! //! \since Release: 295 //! //! \requires Administrator privileges since release 430.39 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGPU GPU selection //! \param [out] pPstatesInfo P-States information to be applied //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \retval ::NVAPI_NOT_SUPPORTED - at least one requested parameter cannot be modified as requested //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - 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". //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetPstates20(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_PERF_PSTATES20_INFO *pPstatesInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetCurrentPstate // //! DESCRIPTION: This function retrieves the current performance state (P-State). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! TCC_SUPPORTED //! //! \param [in] hPhysicalGPU GPU selection //! \param [out] pCurrentPstate The ID of the current P-State of the GPU - see \ref NV_GPU_PERF_PSTATES. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide). //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle. //! \retval NVAPI_NOT_SUPPORTED P-States is not supported on this setup. //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetCurrentPstate(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATE_ID *pCurrentPstate); //! \ingroup gpupstate //! Used in NvAPI_GPU_GetPstateClientLimits(). typedef enum _NV_PERF_PSTATE_CLIENT_LIMIT_ID { NVAPI_PERF_PSTATE_CLIENT_LIMIT_HARD = 0x00000001, //!< P-States Hard limit NVAPI_PERF_PSTATE_CLIENT_LIMIT_SOFT = 0x00000002, //!< P-States Soft limit NVAPI_PERF_PSTATE_CLIENT_LIMIT_BOTH = 0x00000003 //!< For both hard and soft P-States limits } NV_GPU_PERF_PSTATE_CLIENT_LIMIT_ID; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetPstateClientLimits // //! DESCRIPTION: This API gets the soft or hard performance state (P-State) limit //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 185 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in] limitId Indicates hard limit or soft limit //! \param [out] PstateLimit The ID of the P-State that is the current limit //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_NOT_SUPPORTED P-States is not supported on this setup //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetPstateClientLimits(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATE_CLIENT_LIMIT_ID limitId, NV_GPU_PERF_PSTATE_ID* PstateLimit); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_SetPstateClientLimits // //! DESCRIPTION: This API sets the soft or hard performance state (P-State) limit. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 185 //! //! \requires Administrator privileges since release 430.39 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in] limitId To indicate hard limit, soft limit or both //! \param [in] PstateLimit The ID of the P-State to be the new limit //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - 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". //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetPstateClientLimits(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATE_CLIENT_LIMIT_ID limitId, NV_GPU_PERF_PSTATE_ID PstateLimit); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_EnableOverclockedPstates // //! DESCRIPTION: This API allows overclocked P-states. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 185 //! //! \param [in] hPhysicalGP GPU selection //! \param [in] bEnable (Boolean) Enables or disables overclocked P-states //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_NOT_SUPPORTED P-States or overclocked P-states is not supported on this setup //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_EnableOverclockedPstates(NvPhysicalGpuHandle hPhysicalGpu, NvU8 bEnable); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_EnableDynamicPstates // //! DESCRIPTION: This API enables or disables dynamic P-states //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 185 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in] bEnable (Boolean) Enables or disables dynamic P-states //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_NOT_SUPPORTED P-States is not supported on this setup //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_EnableDynamicPstates(NvPhysicalGpuHandle hPhysicalGpu, NvU8 bEnable); //! \addtogroup gpupstate //! @{ //! Used in NV_GPU_DYNAMIC_PSTATES_INFO. #define NVAPI_MAX_GPU_UTILIZATIONS 8 //! Used in NV_GPU_DYNAMIC_PSTATES_INFO -> utilization[]. typedef enum _NV_GPU_UTILIZATION_DOMAIN_ID { NVAPI_GPU_UTILIZATION_DOMAIN_GPU = 0, //!< Graphics engine domain NVAPI_GPU_UTILIZATION_DOMAIN_FB = 1, //!< Frame buffer domain NVAPI_GPU_UTILIZATION_DOMAIN_VID = 2, //!< Video engine domain NVAPI_GPU_UTILIZATION_DOMAIN_BUS = 3, //!< Bus interface domain } NV_GPU_UTILIZATION_DOMAIN_ID; //! @} //! \ingroup gpupstate #define NVAPI_MAX_GPU_UTILIZATIONS 8 //! \ingroup gpupstate //! Used in NvAPI_GPU_GetDynamicPstatesInfoEx(). typedef struct { NvU32 version; //!< Structure version NvU32 flags; //!< bit 0 indicates if the dynamic Pstate is enabled or not struct { NvU32 bIsPresent:1; //!< Set if this utilization domain is present on this GPU NvU32 percentage; //!< Percentage of time where the domain is considered busy in the last 1 second interval } utilization[NVAPI_MAX_GPU_UTILIZATIONS]; } NV_GPU_DYNAMIC_PSTATES_INFO_EX; //! \ingroup gpupstate //! Macro for constructing the version field of NV_GPU_DYNAMIC_PSTATES_INFO_EX #define NV_GPU_DYNAMIC_PSTATES_INFO_EX_VER MAKE_NVAPI_VERSION(NV_GPU_DYNAMIC_PSTATES_INFO_EX,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetDynamicPstatesInfoEx // //! DESCRIPTION: This API retrieves the NV_GPU_DYNAMIC_PSTATES_INFO_EX structure for the specified physical GPU. //! Each domain's info is indexed in the array. For example: //! - pDynamicPstatesInfo->utilization[NVAPI_GPU_UTILIZATION_DOMAIN_GPU] holds the info for the GPU domain. \p //! There are currently 4 domains for which GPU utilization and dynamic P-State thresholds can be retrieved: //! graphic engine (GPU), frame buffer (FB), video engine (VID), and bus interface (BUS). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! //! TCC_SUPPORTED //! \since Release: 185 //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT pDynamicPstatesInfo is NULL //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the INFO struct is not supported //! //! \ingroup gpupstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetDynamicPstatesInfoEx(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_DYNAMIC_PSTATES_INFO_EX *pDynamicPstatesInfoEx); /////////////////////////////////////////////////////////////////////////////////// // Thermal API // Provides ability to get temperature levels from the various thermal sensors associated with the GPU //! \ingroup gputhermal #define NVAPI_MAX_THERMAL_SENSORS_PER_GPU 3 //! \ingroup gputhermal //! Used in NV_GPU_THERMAL_SETTINGS typedef enum { NVAPI_THERMAL_TARGET_NONE = 0, NVAPI_THERMAL_TARGET_GPU = 1, //!< GPU core temperature requires NvPhysicalGpuHandle NVAPI_THERMAL_TARGET_MEMORY = 2, //!< GPU memory temperature requires NvPhysicalGpuHandle NVAPI_THERMAL_TARGET_POWER_SUPPLY = 4, //!< GPU power supply temperature requires NvPhysicalGpuHandle NVAPI_THERMAL_TARGET_BOARD = 8, //!< GPU board ambient temperature requires NvPhysicalGpuHandle NVAPI_THERMAL_TARGET_VCD_BOARD = 9, //!< Visual Computing Device Board temperature requires NvVisualComputingDeviceHandle NVAPI_THERMAL_TARGET_VCD_INLET = 10, //!< Visual Computing Device Inlet temperature requires NvVisualComputingDeviceHandle NVAPI_THERMAL_TARGET_VCD_OUTLET = 11, //!< Visual Computing Device Outlet temperature requires NvVisualComputingDeviceHandle NVAPI_THERMAL_TARGET_ALL = 15, NVAPI_THERMAL_TARGET_UNKNOWN = -1, } NV_THERMAL_TARGET; //! \ingroup gputhermal //! Used in NV_GPU_THERMAL_SETTINGS typedef enum { NVAPI_THERMAL_CONTROLLER_NONE = 0, NVAPI_THERMAL_CONTROLLER_GPU_INTERNAL, NVAPI_THERMAL_CONTROLLER_ADM1032, NVAPI_THERMAL_CONTROLLER_MAX6649, NVAPI_THERMAL_CONTROLLER_MAX1617, NVAPI_THERMAL_CONTROLLER_LM99, NVAPI_THERMAL_CONTROLLER_LM89, NVAPI_THERMAL_CONTROLLER_LM64, NVAPI_THERMAL_CONTROLLER_ADT7473, NVAPI_THERMAL_CONTROLLER_SBMAX6649, NVAPI_THERMAL_CONTROLLER_VBIOSEVT, NVAPI_THERMAL_CONTROLLER_OS, NVAPI_THERMAL_CONTROLLER_UNKNOWN = -1, } NV_THERMAL_CONTROLLER; //! \ingroup gputhermal //! Used in NvAPI_GPU_GetThermalSettings() typedef struct { NvU32 version; //!< structure version NvU32 count; //!< number of associated thermal sensors struct { NV_THERMAL_CONTROLLER controller; //!< internal, ADM1032, MAX6649... NvU32 defaultMinTemp; //!< The min default temperature value of the thermal sensor in degree Celsius NvU32 defaultMaxTemp; //!< The max default temperature value of the thermal sensor in degree Celsius NvU32 currentTemp; //!< The current temperature value of the thermal sensor in degree Celsius NV_THERMAL_TARGET target; //!< Thermal sensor targeted @ GPU, memory, chipset, powersupply, Visual Computing Device, etc. } sensor[NVAPI_MAX_THERMAL_SENSORS_PER_GPU]; } NV_GPU_THERMAL_SETTINGS_V1; //! \ingroup gputhermal typedef struct { NvU32 version; //!< structure version NvU32 count; //!< number of associated thermal sensors struct { NV_THERMAL_CONTROLLER controller; //!< internal, ADM1032, MAX6649... NvS32 defaultMinTemp; //!< Minimum default temperature value of the thermal sensor in degree Celsius NvS32 defaultMaxTemp; //!< Maximum default temperature value of the thermal sensor in degree Celsius NvS32 currentTemp; //!< Current temperature value of the thermal sensor in degree Celsius NV_THERMAL_TARGET target; //!< Thermal sensor targeted - GPU, memory, chipset, powersupply, Visual Computing Device, etc } sensor[NVAPI_MAX_THERMAL_SENSORS_PER_GPU]; } NV_GPU_THERMAL_SETTINGS_V2; //! \ingroup gputhermal typedef NV_GPU_THERMAL_SETTINGS_V2 NV_GPU_THERMAL_SETTINGS; //! \ingroup gputhermal //! @{ //! Macro for constructing the version field of NV_GPU_THERMAL_SETTINGS_V1 #define NV_GPU_THERMAL_SETTINGS_VER_1 MAKE_NVAPI_VERSION(NV_GPU_THERMAL_SETTINGS_V1,1) //! Macro for constructing the version field of NV_GPU_THERMAL_SETTINGS_V2 #define NV_GPU_THERMAL_SETTINGS_VER_2 MAKE_NVAPI_VERSION(NV_GPU_THERMAL_SETTINGS_V2,2) //! Macro for constructing the version field of NV_GPU_THERMAL_SETTINGS #define NV_GPU_THERMAL_SETTINGS_VER NV_GPU_THERMAL_SETTINGS_VER_2 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetThermalSettings // //! This function retrieves the thermal information of all thermal sensors or specific thermal sensor associated with the selected GPU. //! Thermal sensors are indexed 0 to NVAPI_MAX_THERMAL_SENSORS_PER_GPU-1. //! //! - To retrieve specific thermal sensor info, set the sensorIndex to the required thermal sensor index. //! - To retrieve info for all sensors, set sensorIndex to NVAPI_THERMAL_TARGET_ALL. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 85 //! //! \param [in] hPhysicalGPU GPU selection. //! \param [in] sensorIndex Explicit thermal sensor index selection. //! \param [out] pThermalSettings Array of thermal settings. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred. //! \retval NVAPI_INVALID_ARGUMENT pThermalInfo is NULL. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide). //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the INFO struct is not supported. //! \ingroup gputhermal /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetThermalSettings(NvPhysicalGpuHandle hPhysicalGpu, NvU32 sensorIndex, NV_GPU_THERMAL_SETTINGS *pThermalSettings); //! \addtogroup gputhermal //! @{ /*! * Enumeration of Thermal Policies. Unique identifiers for different Thermal * Policies being enforced on the GPU. */ typedef enum { NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_GPS, NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_ACOUSTIC, } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_ID; /*! * Enumeration of Thermal Policy class types. Unique class identifiers for * different Thermal Policies being enforced on the GPU. */ typedef enum { NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_BASE, NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_PFF, } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS; /*! * Enumeration of thermal readings. Specifies the type of temperature reading * that is driving the Thermal Policy. */ typedef enum { NV_GPU_CLIENT_THERMAL_READING_ID_GPU_AVG, NV_GPU_CLIENT_THERMAL_READING_ID_GPU_MAX, NV_GPU_CLIENT_THERMAL_READING_ID_BOARD, NV_GPU_CLIENT_THERMAL_READING_ID_MEMORY, NV_GPU_CLIENT_THERMAL_READING_ID_PWR_SUPPLY } NV_GPU_CLIENT_THERMAL_READING_ID; /*! * Info specific to NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_PFF. */ typedef struct { /*! * System default parameters for the Piecewise Frequency Flooring curve. */ NV_GPU_CLIENT_PFF_CURVE_V1 curve; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_INFO_PFF_V1; /*! * Class specific data. Applies to all class types other than * NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_BASE. */ typedef union { /*! * Info specific to NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_PFF. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_INFO_PFF_V1 pff; /*! * Reserved for future use */ NvU8 rsvd[256]; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_INFO_UNION_V1; #define NV_GPU_CLIENT_THERMAL_POLICIES_NUM_POLICIES_MAX 4 /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V1. */ typedef struct { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_ID policyId; /*! * Thermal reading ID driving this thermal policy. */ NV_GPU_CLIENT_THERMAL_READING_ID channelId; /*! * Minimum allowed thermal policy limit. */ NvS32 thermalLimitMin; /*! * Default thermal policy limit. */ NvS32 thermalLimitDefault; /*! * Maximum allowed thermal policy limit. */ NvS32 thermalLimitMax; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_INFO_V1; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V2. */ typedef struct { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_ID policyId; /*! * Thermal reading ID driving this thermal policy. */ NV_GPU_CLIENT_THERMAL_READING_ID channelId; /*! * Minimum allowed thermal policy limit. */ NvS32 thermalLimitMin; /*! * Default thermal policy limit. */ NvS32 thermalLimitDefault; /*! * Maximum allowed thermal policy limit. */ NvS32 thermalLimitMax; /*! * Specifies whether or not the thermal policy can impose greater * performance restrictions to maintain acoustic levels. */ NvU8 acousticPreferenceAvailable:1; NvU8 reserved :7; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_INFO_V2; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V3. */ typedef struct { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_ID policyId; /*! * Policy Class type. Used to discern use of info union below. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS policyClass; /*! * Thermal reading ID driving this thermal policy. */ NV_GPU_CLIENT_THERMAL_READING_ID channelId; /*! * Minimum allowed thermal policy limit. */ NvS32 thermalLimitMin; /*! * Default thermal policy limit. */ NvS32 thermalLimitDefault; /*! * Maximum allowed thermal policy limit. */ NvS32 thermalLimitMax; /*! * Specifies whether or not the thermal policy can impose greater * performance restrictions to maintain acoustic levels. */ NvU8 acousticPreferenceAvailable:1; NvU8 reserved :7; /*! * Reserved for future use */ NvU8 rsvd[64]; /*! * Class specific info. Applies to all class types other than * NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_BASE. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_INFO_UNION_V1 classInfo; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_INFO_V3; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V1. * * Describes the set of Thermal Policies which are controlling GPU temperature. */ typedef struct { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Indicates that this GPU support Client Thermal Policy Interfaces. */ NvU8 isSupported:1; NvU8 reserved :7; /*! * Number of Thermal Policies this GPU supports. */ NvU8 numPolicies; /* * Array of static information for each Thermal Policy. Array has a valid * index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_INFO_V1 policies[NV_GPU_CLIENT_THERMAL_POLICIES_NUM_POLICIES_MAX]; } NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V1; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V2. * * Describes the set of Thermal Policies which are controlling GPU temperature. */ typedef struct _NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V2 { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Indicates that this GPU support Client Thermal Policy Interfaces. */ NvU8 isSupported:1; NvU8 reserved :7; /*! * Number of Thermal Policies this GPU supports. */ NvU8 numPolicies; /* * Array of static information for each Thermal Policy. Array has a valid * index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_INFO_V2 policies[NV_GPU_CLIENT_THERMAL_POLICIES_NUM_POLICIES_MAX]; } NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V2; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V3. * * Describes the set of Thermal Policies which are controlling GPU temperature. */ typedef struct _NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V3 { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Indicates that this GPU support Client Thermal Policy Interfaces. */ NvU8 isSupported:1; NvU8 reserved :7; /*! * Number of Thermal Policies this GPU supports. */ NvU8 numPolicies; /* * Array of static information for each Thermal Policy. Array has a valid * index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_INFO_V3 policies[NV_GPU_CLIENT_THERMAL_POLICIES_NUM_POLICIES_MAX]; } NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V3; #define NV_GPU_CLIENT_THERMAL_POLICIES_INFO_VER_1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V1,1) #define NV_GPU_CLIENT_THERMAL_POLICIES_INFO_VER_2 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V2,2) #define NV_GPU_CLIENT_THERMAL_POLICIES_INFO_VER_3 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V3,3) #define NV_GPU_CLIENT_THERMAL_POLICIES_INFO_VER NV_GPU_CLIENT_THERMAL_POLICIES_INFO_VER_3 typedef NV_GPU_CLIENT_THERMAL_POLICIES_INFO_V3 NV_GPU_CLIENT_THERMAL_POLICIES_INFO; typedef NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_INFO_V3 NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_INFO; //! @} /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_ClientThermalPoliciesGetInfo //! //! DESCRIPTION: Accessor for static information describing the public GPU //! thermal policies which are controlling GPU temperature. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 310 //! //! \param [in] hPhysicalGpu GPU selection //! \param [out] pClientThermalPoliciesInfo Structure containing the description //! of the GPU thermal policies. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gputhermal /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientThermalPoliciesGetInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_CLIENT_THERMAL_POLICIES_INFO *pClientThermalPoliciesInfo); //! \addtogroup gputhermal //! @{ /*! * Status specific to NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_PFF. */ typedef struct { /*! * [in] To be set if `curve` below has been modified * between getStatus and setStatus. Following a getStatus, * this field will always be NV_FALSE. */ NvBool bPffCurveChanged; /*! * [in/out] Current base control state of the Piecewise Frequency Flooring curve. * Can be modified during setStatus (must set bPffCurveChanged). */ NV_GPU_CLIENT_PFF_CURVE_V1 curve; /*! * [out] Parts of 'curve' above that will change at runtime with overclocking. * Represents base curve frequencies (+/-) vf-curve offsetting at given frequencies. */ NV_GPU_CLIENT_PFF_CURVE_STATUS_V1 curveRuntimeStatus; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_STATUS_PFF_V1; /*! * Class specific data. Applies to all class types other than * NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_BASE. */ typedef union { /*! * Status specific to NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_PFF. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_STATUS_PFF_V1 pff; /*! * Reserved for future use */ NvU8 rsvd[256]; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_STATUS_UNION_V1; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V1. */ typedef struct { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_ID policyId; /*! * Current thermal policy limit. */ NvS32 thermalLimit; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS_V1; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V2. */ typedef struct _NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS_V2 { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_ID policyId; /*! * Current thermal policy limit. */ NvS32 thermalLimit; /*! * Specifies the calling is willing to sacrifice performance to maintain * acoustics. */ NvU8 preferAcoustics:1; NvU8 reserved :7; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS_V2; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V3. */ typedef struct _NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS_V3 { /*! * Policy ID. Unique identifier for a policy. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_ID policyId; /*! * Policy Class type. Used to discern use of status union below. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS policyClass; /*! * Current thermal policy limit. */ NvS32 thermalLimit; /*! * Specifies the calling is willing to sacrifice performance to maintain * acoustics. */ NvU8 preferAcoustics:1; NvU8 reserved :7; /*! * Reserved for future use */ NvU8 rsvd[64]; /*! * Class specific status. Applies to all class types other than * NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_BASE. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_CLASS_STATUS_UNION_V1 classStatus; } NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS_V3; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V1. * * Describes/specifies the current settings of a set of Thermal Policies which * are controlling GPU temperature. */ typedef struct { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Number of Thermal Policies specified in the policies array. Caller sets * this value to 0 to specify that all policies should be queried. */ NvU8 numPolicies; /*! * Array of current settings for each specified Thermal Policy. This array * has a valid index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS_V1 policies[NV_GPU_CLIENT_THERMAL_POLICIES_NUM_POLICIES_MAX]; } NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V1; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V2. * * Describes/specifies the current settings of a set of Thermal Policies which * are controlling GPU temperature. */ typedef struct _NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V2 { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Number of Thermal Policies specified in the policies array. Caller sets * this value to 0 to specify that all policies should be queried. */ NvU8 numPolicies; /*! * Array of current settings for each specified Thermal Policy. This array * has a valid index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS_V2 policies[NV_GPU_CLIENT_THERMAL_POLICIES_NUM_POLICIES_MAX]; } NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V2; /*! * Used in \ref NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V3. * * Describes/specifies the current settings of a set of Thermal Policies which * are controlling GPU temperature. */ typedef struct _NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V3 { /*! * Version of structure. Must always be first. */ NvU32 version; /*! * Number of Thermal Policies specified in the policies array. Caller sets * this value to 0 to specify that all policies should be queried. */ NvU8 numPolicies; /*! * Array of current settings for each specified Thermal Policy. This array * has a valid index ranging from 0 to numPolicies - 1. */ NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS_V3 policies[NV_GPU_CLIENT_THERMAL_POLICIES_NUM_POLICIES_MAX]; } NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V3; #define NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_VER_1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V1,1) #define NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_VER_2 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V2,2) #define NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_VER_3 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V3,3) #define NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_VER NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_VER_3 typedef NV_GPU_CLIENT_THERMAL_POLICIES_STATUS_V3 NV_GPU_CLIENT_THERMAL_POLICIES_STATUS; typedef NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS_V3 NV_GPU_CLIENT_THERMAL_POLICIES_POLICY_STATUS; //! @} /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_ClientThermalPoliciesGetStatus //! //! DESCRIPTION: Accessor for current state of the public GPU thermal //! policies which are controlling GPU temperature. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 310 //! //! \param [in] hPhysicalGpu GPU selection //! \param [out] pClientThermalPoliciesStatus Structure containing the current //! state of a set of GPU thermal policies. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gputhermal /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientThermalPoliciesGetStatus(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_CLIENT_THERMAL_POLICIES_STATUS *pClientThermalPoliciesStatus); /////////////////////////////////////////////////////////////////////////////// //! //! FUNCTION NAME: NvAPI_GPU_ClientThermalPoliciesSetStatus //! //! DESCRIPTION: Mutator for state of the public GPU thermal policies which //! are controlling GPU temperature. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \since Release: 310 //! //! \requires Administrator privileges since release 430.39 //! //! \param [in] hPhysicalGpu GPU selection //! \param [in] pClientThermalPoliciesStatus Structure containing the requested //! state of a set of GPU thermal policies. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - 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". //! //! \ingroup gputhermal /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientThermalPoliciesSetStatus(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_THERMAL_POLICIES_STATUS *pClientThermalPoliciesStatus); ///////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_GetCurrentThermalLevel // // //! DESCRIPTION: This API returns the current Level (Normal, Medium or //! Critical) of the thermal sensor. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! TCC_SUPPORTED //! //! \param [in] nvGPUHandle Physical GPU handle. //! \param [out] pThermalLevel Returns Thermal Level. //! //! \retval ::NVAPI_OK - Success //! \retval ::NVAPI_API_NOT_INTIALIZED - NvAPI not initialized //! \retval ::NVAPI_INVALID_ARGUMENT - Invalid argument //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE - Invalid GPU handle //! \retval ::NVAPI_NOT_SUPPORTED - API not supported //! \retval ::NVAPI_ERROR - miscellaneous error occurred //! //! \ingroup gputhermal ///////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_GetCurrentThermalLevel(NvPhysicalGpuHandle nvGPUHandle, NV_EVENT_LEVEL *pThermalLevel); /////////////////////////////////////////////////////////////////////////////////// // GPU Cooler Controls // Provides ability to Get and Set the fan level or equivalent cooler levels for various target devices associated with the GPU //! \addtogroup gpucooler //! @{ #define NVAPI_MAX_COOLERS_PER_GPU_VER1 3 #define NVAPI_MAX_COOLERS_PER_GPU_VER2 20 #define NVAPI_MAX_COOLERS_PER_GPU_VER3 NVAPI_MAX_COOLERS_PER_GPU_VER2 #define NVAPI_MAX_COOLERS_PER_GPU_VER4 NVAPI_MAX_COOLERS_PER_GPU_VER2 #define NVAPI_MAX_COOLERS_PER_GPU NVAPI_MAX_COOLERS_PER_GPU_VER3 #define NVAPI_MIN_COOLER_LEVEL 0 #define NVAPI_MAX_COOLER_LEVEL 100 #define NVAPI_MAX_COOLER_LEVELS 24 //! Used in NV_GPU_GETCOOLER_SETTINGS_V1 and NV_GPU_GETCOOLER_SETTINGS_V2 typedef enum { NVAPI_COOLER_TYPE_NONE = 0, NVAPI_COOLER_TYPE_FAN, NVAPI_COOLER_TYPE_WATER, NVAPI_COOLER_TYPE_LIQUID_NO2, } NV_COOLER_TYPE; //! Used in NV_GPU_GETCOOLER_SETTINGS_V1 and NV_GPU_GETCOOLER_SETTINGS_V2 typedef enum { NVAPI_COOLER_CONTROLLER_NONE = 0, NVAPI_COOLER_CONTROLLER_ADI, NVAPI_COOLER_CONTROLLER_INTERNAL, } NV_COOLER_CONTROLLER; //! Used in NV_GPU_GETCOOLER_SETTINGS_V1 and NV_GPU_GETCOOLER_SETTINGS_V2 typedef enum { NVAPI_COOLER_POLICY_NONE = 0x00000000, NVAPI_COOLER_POLICY_MANUAL = 0x00000001, //!version. //! \retval ::NVAPI_ID_OUT_OF_RANGE Incorrect displayId. /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_EnumHDMIStereoModes(NV_HDMI_STEREO_MODES_LIST *pHDMIStereoModes); //! @} //! \ingroup dispcontrol //! Use in NvAPI_GetInfoFrame(), NvAPI_SetInfoFrame(), NvAPI_GetInfoFrameState(), and NvAPI_SetInfoFrameState(). typedef enum _NV_INFOFRAME_TYPE { NV_INFOFRAME_TYPE_AVI = 2, NV_INFOFRAME_TYPE_SPD = 3, NV_INFOFRAME_TYPE_AUDIO = 4, NV_INFOFRAME_TYPE_MS = 5, } NV_INFOFRAME_TYPE; //! Used in \ref NV_INFOFRAME //! \ingroup dispcontrol typedef struct { NvU8 type; NvU8 version; NvU8 length; } NV_INFOFRAME_HEADER; //! Since this is for Windows OS so far, we use this bit little endian definition //! to handle the translation. //! Used in \ref NV_INFOFRAME //! \ingroup dispcontrol typedef struct { // byte 1 NvU8 channelCount : 3; NvU8 rsvd_bits_byte1 : 1; NvU8 codingType : 4; // byte 2 NvU8 sampleSize : 2; NvU8 sampleRate : 3; NvU8 rsvd_bits_byte2 : 3; // byte 3 NvU8 codingExtensionType : 5; NvU8 rsvd_bits_byte3 : 3; // byte 4 NvU8 speakerPlacement; // byte 5 NvU8 lfePlaybackLevel : 2; NvU8 rsvd_bits_byte5 : 1; NvU8 levelShift : 4; NvU8 downmixInhibit : 1; // byte 6~10 NvU8 rsvd_byte6; NvU8 rsvd_byte7; NvU8 rsvd_byte8; NvU8 rsvd_byte9; NvU8 rsvd_byte10; }NV_AUDIO_INFOFRAME; //! Used in \ref NV_INFOFRAME //! \ingroup dispcontrol typedef struct { // byte 1 NvU8 scanInfo : 2; NvU8 barInfo : 2; NvU8 activeFormatInfoPresent : 1; NvU8 colorSpace : 2; NvU8 rsvd_bits_byte1 : 1; // byte 2 NvU8 activeFormatAspectRatio : 4; NvU8 picAspectRatio : 2; NvU8 colorimetry : 2; // byte 3 NvU8 nonuniformScaling : 2; NvU8 rgbQuantizationRange : 2; NvU8 extendedColorimetry : 3; NvU8 itContent : 1; // byte 4 NvU8 vic : 7; NvU8 rsvd_bits_byte4 : 1; // byte 5 NvU8 pixelRepeat : 4; NvU8 contentTypes : 2; NvU8 yccQuantizationRange : 2; // byte 6~13 NvU8 topBarLow; NvU8 topBarHigh; NvU8 bottomBarLow; NvU8 bottomBarHigh; NvU8 leftBarLow; NvU8 leftBarHigh; NvU8 rightBarLow; NvU8 rightBarHigh; } NV_VIDEO_INFOFRAME; //! \ingroup dispcontrol //! \sa NvAPI_GetInfoFrame(); NvAPI_SetInfoFrame typedef struct { NV_INFOFRAME_HEADER header; union { NV_AUDIO_INFOFRAME audio; NV_VIDEO_INFOFRAME video; }u; } NV_INFOFRAME; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetInfoFrame // //! DESCRIPTION: This API returns the current infoframe data on the specified device(monitor). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] displayId If Display Id is passed then hNvDisplay need not be specified. //! If output Id is passed then hNvDisplay needs to be specified. //! If the value passed is "0" then the default outputId from NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles. //! \param [in] type The type of infoframe to get. See NV_INFOFRAME_TYPE . //! \param [out] pInfoFrame Pointer to the The infoframe data. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetInfoFrame(__in NvDisplayHandle hNvDisplay, __in NvU32 displayId, __in NV_INFOFRAME_TYPE type, __out NV_INFOFRAME *pInfoFrame); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SetInfoFrame // //! DESCRIPTION: This API returns the current infoframe data on the specified device(monitor). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] displayId If Display Id is passed then hNvDisplay need not be specified. //! If output Id is passed then hNvDisplay needs to be specified. //! If the value passed is "0" then the default outputId from NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles. //! \param [in] type The type of infoframe to set. See NV_INFOFRAME_TYPE . //! \param [in] pInfoFrame Pointer to the The infoframe data. NULL means reset to the default value. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetInfoFrame(__in NvDisplayHandle hNvDisplay, __in NvU32 displayId, __in NV_INFOFRAME_TYPE type, __in NV_INFOFRAME *pInfoFrame); //! ingroup dispcontrol //! Used in NvAPI_SetInfoFrameState() and NvAPI_GetInfoFrameState(). typedef struct _NV_INFOFRAME_STATE { NvU32 bDisabled : 1; //!< Enable or disable the infoframe when "bDriverCtrl" is 0. NvU32 bDriverCtrl : 1; //!< If set, let the driver control the infoframe state and ignore "bDisabled". NvU32 reserved : 30; } NV_INFOFRAME_STATE; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SetInfoFrameState // //! DESCRIPTION: This API disables or enables the sending of infoframe packets. Currently, this is supported for audio packets only. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] displayId If Display Id is passed then hNvDisplay need not be specified. //! If output Id is passed then hNvDisplay needs to be specified. //! If the value passed is "0" then the default outputId from NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles. //! \param [in] type The type of infoframe to set //! \param [in] state state of infoframe to set //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetInfoFrameState(__in NvDisplayHandle hNvDisplay, __in NvU32 displayId, __in NV_INFOFRAME_TYPE type, __in NV_INFOFRAME_STATE *pState); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetInfoFrameState // //! DESCRIPTION: This API gets the state of the infoframe. Currently, this is supported for audio packets only. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] displayId If Display Id is passed then hNvDisplay need not be specified. //! If output Id is passed then hNvDisplay needs to be specified. //! If the value passed is "0" then the default outputId from NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles. //! \param [in] type The type of infoframe of which to get the state //! \param [out] state State of the infoframe //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetInfoFrameState(__in NvDisplayHandle hNvDisplay, __in NvU32 displayId, __in NV_INFOFRAME_TYPE type, __out NV_INFOFRAME_STATE *pState); //! \ingroup dispcontrol typedef enum { NV_INFOFRAME_CMD_GET_DEFAULT = 0, //!< Returns the fields in the infoframe with values set by the manufacturer - NVIDIA/OEM. NV_INFOFRAME_CMD_RESET, //!< Sets the fields in the infoframe to auto, and infoframe to the default infoframe for use in a set. NV_INFOFRAME_CMD_GET, //!< Get the current infoframe state. NV_INFOFRAME_CMD_SET, //!< Set the current infoframe state (flushed to the monitor), the values are one time and do not persist. NV_INFOFRAME_CMD_GET_OVERRIDE, //!< Get the override infoframe state, non-override fields will be set to value = AUTO, overridden fields will have the current override values. NV_INFOFRAME_CMD_SET_OVERRIDE, //!< Set the override infoframe state, non-override fields will be set to value = AUTO, other values indicate override; persist across modeset/reboot NV_INFOFRAME_CMD_GET_PROPERTY, //!< get properties associated with infoframe (each of the infoframe type will have properties) NV_INFOFRAME_CMD_SET_PROPERTY, //!< set properties associated with infoframe } NV_INFOFRAME_CMD; typedef enum { NV_INFOFRAME_PROPERTY_MODE_AUTO = 0, //!< Driver determines whether to send infoframes. NV_INFOFRAME_PROPERTY_MODE_ENABLE, //!< Driver always sends infoframe. NV_INFOFRAME_PROPERTY_MODE_DISABLE, //!< Driver never sends infoframe. NV_INFOFRAME_PROPERTY_MODE_ALLOW_OVERRIDE, //!< Driver only sends infoframe when client requests it via infoframe escape call. } NV_INFOFRAME_PROPERTY_MODE; //! Returns whether the current monitor is in blacklist or force this monitor to be in blacklist. typedef enum { NV_INFOFRAME_PROPERTY_BLACKLIST_FALSE = 0, NV_INFOFRAME_PROPERTY_BLACKLIST_TRUE, } NV_INFOFRAME_PROPERTY_BLACKLIST; typedef struct { NvU32 mode : 4; NvU32 blackList : 2; NvU32 reserved : 10; NvU32 version : 8; NvU32 length : 8; } NV_INFOFRAME_PROPERTY; //! Byte1 related typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_NODATA = 0, NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_OVERSCAN, NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_UNDERSCAN, NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_FUTURE, NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_NOT_PRESENT = 0, NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_VERTICAL_PRESENT, NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_HORIZONTAL_PRESENT, NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_BOTH_PRESENT, NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_AFI_ABSENT = 0, NV_INFOFRAME_FIELD_VALUE_AVI_AFI_PRESENT, NV_INFOFRAME_FIELD_VALUE_AVI_AFI_AUTO = 3 } NV_INFOFRAME_FIELD_VALUE_AVI_ACTIVEFORMATINFO; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_RGB = 0, NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_YCbCr422, NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_YCbCr444, NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_FUTURE, NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_F17_FALSE = 0, NV_INFOFRAME_FIELD_VALUE_AVI_F17_TRUE, NV_INFOFRAME_FIELD_VALUE_AVI_F17_AUTO = 3 } NV_INFOFRAME_FIELD_VALUE_AVI_F17; //! Byte2 related typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_NO_AFD = 0, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE01, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE02, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE03, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_LETTERBOX_GT16x9, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE05, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE06, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE07, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_EQUAL_CODEDFRAME = 8, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_CENTER_4x3, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_CENTER_16x9, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_CENTER_14x9, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE12, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_4x3_ON_14x9, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_16x9_ON_14x9, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_16x9_ON_4x3, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_AUTO = 31, } NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_NO_DATA = 0, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_4x3, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_16x9, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_FUTURE, NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_NO_DATA = 0, NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_SMPTE_170M, NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_ITUR_BT709, NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_USE_EXTENDED_COLORIMETRY, NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY; //! Byte 3 related typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_NO_DATA = 0, NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_HORIZONTAL, NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_VERTICAL, NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_BOTH, NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_DEFAULT = 0, NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_LIMITED_RANGE, NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_FULL_RANGE, NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_RESERVED, NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_XVYCC601 = 0, NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_XVYCC709, NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_SYCC601, NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_ADOBEYCC601, NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_ADOBERGB, NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_RESERVED05, NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_RESERVED06, NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_RESERVED07, NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_AUTO = 15 } NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_ITC_VIDEO_CONTENT = 0, NV_INFOFRAME_FIELD_VALUE_AVI_ITC_ITCONTENT, NV_INFOFRAME_FIELD_VALUE_AVI_ITC_AUTO = 3 } NV_INFOFRAME_FIELD_VALUE_AVI_ITC; //! Byte 4 related typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_NONE = 0, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X02, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X03, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X04, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X05, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X06, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X07, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X08, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X09, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X10, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED10, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED11, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED12, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED13, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED14, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED15, NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_AUTO = 31 } NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_GRAPHICS = 0, NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_PHOTO, NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_CINEMA, NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_GAME, NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE; typedef enum { NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_LIMITED_RANGE = 0, NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_FULL_RANGE, NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_RESERVED02, NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_RESERVED03, NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION; //! Adding an Auto bit to each field typedef struct { NvU32 vic : 8; NvU32 pixelRepeat : 5; NvU32 colorSpace : 3; NvU32 colorimetry : 3; NvU32 extendedColorimetry : 4; NvU32 rgbQuantizationRange : 3; NvU32 yccQuantizationRange : 3; NvU32 itContent : 2; NvU32 contentTypes : 3; NvU32 scanInfo : 3; NvU32 activeFormatInfoPresent : 2; NvU32 activeFormatAspectRatio : 5; NvU32 picAspectRatio : 3; NvU32 nonuniformScaling : 3; NvU32 barInfo : 3; NvU32 top_bar : 17; NvU32 bottom_bar : 17; NvU32 left_bar : 17; NvU32 right_bar : 17; NvU32 Future17 : 2; NvU32 Future47 : 2; } NV_INFOFRAME_VIDEO; //! Byte 1 related typedef enum { NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_IN_HEADER = 0, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_2, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_3, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_4, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_5, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_6, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_7, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_8, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_AUTO = 15 } NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT; typedef enum { NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_IN_HEADER = 0, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_PCM, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_AC3, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MPEG1, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MP3, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MPEG2, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_AACLC, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DTS, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_ATRAC, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DSD, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_EAC3, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DTSHD, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MLP, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DST, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_WMAPRO, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_USE_CODING_EXTENSION_TYPE, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_AUTO = 31 } NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE; //! Byte 2 related typedef enum { NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_IN_HEADER = 0, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_16BITS, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_20BITS, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_24BITS, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE; typedef enum { NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_IN_HEADER = 0, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_32000HZ, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_44100HZ, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_48000HZ, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_88200KHZ, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_96000KHZ, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_176400KHZ, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_192000KHZ, NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_AUTO = 15 } NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY; //! Byte 3 related typedef enum { NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_USE_CODING_TYPE = 0, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_HEAAC, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_HEAACV2, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_MPEGSURROUND, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE04, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE05, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE06, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE07, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE08, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE09, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE10, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE11, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE12, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE13, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE14, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE15, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE16, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE17, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE18, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE19, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE20, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE21, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE22, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE23, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE24, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE25, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE26, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE27, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE28, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE29, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE30, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE31, NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_AUTO = 63 } NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE; //! Byte 4 related typedef enum { NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_X_X_FR_FL =0, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_X_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_X_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_X_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_X_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_X_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_X_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_X_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_FCH_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_FCH_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_X_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_X_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_X_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_X_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_X_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_RC_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_RC_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FCH_RC_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FCH_RC_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_FCH_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_FCH_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_FC_LFE_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_FC_X_FR_FL, NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_FC_LFE_FR_FL = 0X31, // all other values should default to auto NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_AUTO = 0x1FF } NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION; //! Byte 5 related typedef enum { NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_NO_DATA = 0, NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_0DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_PLUS10DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_RESERVED03, NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_AUTO = 7 } NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL; typedef enum { NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_0DB = 0, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_1DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_2DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_3DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_4DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_5DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_6DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_7DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_8DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_9DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_10DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_11DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_12DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_13DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_14DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_15DB, NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_AUTO = 31 } NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES; typedef enum { NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX_PERMITTED = 0, NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX_PROHIBITED, NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX_AUTO = 3 } NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX; typedef struct { NvU32 codingType : 5; NvU32 codingExtensionType : 6; NvU32 sampleSize : 3; NvU32 sampleRate : 4; NvU32 channelCount : 4; NvU32 speakerPlacement : 9; NvU32 downmixInhibit : 2; NvU32 lfePlaybackLevel : 3; NvU32 levelShift : 5; NvU32 Future12 : 2; NvU32 Future2x : 4; NvU32 Future3x : 4; NvU32 Future52 : 2; NvU32 Future6 : 9; NvU32 Future7 : 9; NvU32 Future8 : 9; NvU32 Future9 : 9; NvU32 Future10 : 9; } NV_INFOFRAME_AUDIO; typedef struct { NvU32 version; //!< version of this structure NvU16 size; //!< size of this structure NvU8 cmd; //!< The actions to perform from NV_INFOFRAME_CMD NvU8 type; //!< type of infoframe union { NV_INFOFRAME_PROPERTY property; //!< This is NVIDIA-specific and corresponds to the property cmds and associated infoframe. NV_INFOFRAME_AUDIO audio; NV_INFOFRAME_VIDEO video; } infoframe; } NV_INFOFRAME_DATA; //! Macro for constructing the version field of ::NV_INFOFRAME_DATA #define NV_INFOFRAME_DATA_VER MAKE_NVAPI_VERSION(NV_INFOFRAME_DATA,1) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Disp_InfoFrameControl // //! DESCRIPTION: This API controls the InfoFrame values. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Monitor Identifier //! \param [in,out] pInfoframeData Contains data corresponding to InfoFrame //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Disp_InfoFrameControl(__in NvU32 displayId, __inout NV_INFOFRAME_DATA *pInfoframeData); //! \ingroup dispcontrol //! @{ /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Disp_ColorControl // //! \fn NvAPI_Disp_ColorControl(NvU32 displayId, NV_COLOR_DATA *pColorData) //! DESCRIPTION: This API controls the Color values. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Monitor Identifier //! \param [in,out] pColorData Contains data corresponding to color information //! //! \return RETURN STATUS: //! ::NVAPI_OK, //! ::NVAPI_ERROR, //! ::NVAPI_INVALID_ARGUMENT // /////////////////////////////////////////////////////////////////////////////// typedef enum { NV_COLOR_CMD_GET = 1, NV_COLOR_CMD_SET, NV_COLOR_CMD_IS_SUPPORTED_COLOR, NV_COLOR_CMD_GET_DEFAULT } NV_COLOR_CMD; //! See Table 14 of CEA-861E. Not all of this is supported by the GPU. typedef enum { NV_COLOR_FORMAT_RGB = 0, NV_COLOR_FORMAT_YUV422, NV_COLOR_FORMAT_YUV444, NV_COLOR_FORMAT_YUV420, NV_COLOR_FORMAT_DEFAULT = 0xFE, NV_COLOR_FORMAT_AUTO = 0xFF } NV_COLOR_FORMAT; typedef enum { NV_COLOR_COLORIMETRY_RGB = 0, NV_COLOR_COLORIMETRY_YCC601, NV_COLOR_COLORIMETRY_YCC709, NV_COLOR_COLORIMETRY_XVYCC601, NV_COLOR_COLORIMETRY_XVYCC709, NV_COLOR_COLORIMETRY_SYCC601, NV_COLOR_COLORIMETRY_ADOBEYCC601, NV_COLOR_COLORIMETRY_ADOBERGB, NV_COLOR_COLORIMETRY_BT2020RGB, NV_COLOR_COLORIMETRY_BT2020YCC, NV_COLOR_COLORIMETRY_BT2020cYCC, NV_COLOR_COLORIMETRY_DEFAULT = 0xFE, NV_COLOR_COLORIMETRY_AUTO = 0xFF } NV_COLOR_COLORIMETRY; typedef enum _NV_DYNAMIC_RANGE { NV_DYNAMIC_RANGE_VESA = 0x0, NV_DYNAMIC_RANGE_CEA = 0x1, NV_DYNAMIC_RANGE_AUTO = 0xFF } NV_DYNAMIC_RANGE; typedef enum _NV_BPC { NV_BPC_DEFAULT = 0, NV_BPC_6 = 1, NV_BPC_8 = 2, NV_BPC_10 = 3, NV_BPC_12 = 4, NV_BPC_16 = 5, } NV_BPC; typedef enum _NV_COLOR_SELECTION_POLICY { NV_COLOR_SELECTION_POLICY_USER = 0, //!< app/nvcpl make decision to select the desire color format NV_COLOR_SELECTION_POLICY_BEST_QUALITY = 1, //!< driver/ OS make decision to select the best color format NV_COLOR_SELECTION_POLICY_DEFAULT = NV_COLOR_SELECTION_POLICY_BEST_QUALITY, NV_COLOR_SELECTION_POLICY_UNKNOWN = 0xFF, } NV_COLOR_SELECTION_POLICY; typedef enum _NV_DESKTOP_COLOR_DEPTH { NV_DESKTOP_COLOR_DEPTH_DEFAULT = 0x0, // set if the current setting should be kept NV_DESKTOP_COLOR_DEPTH_8BPC = 0x1, //8 bit int per color component (8 bit int alpha) NV_DESKTOP_COLOR_DEPTH_10BPC = 0x2, //10 bit int per color component (2 bit int alpha) NV_DESKTOP_COLOR_DEPTH_16BPC_FLOAT = 0x3, //16 bit float per color component (16 bit float alpha) NV_DESKTOP_COLOR_DEPTH_16BPC_FLOAT_WCG = 0x4, //16 bit float per color component (16 bit float alpha) wide color gamut NV_DESKTOP_COLOR_DEPTH_16BPC_FLOAT_HDR = 0x5, //16 bit float per color component (16 bit float alpha) HDR NV_DESKTOP_COLOR_DEPTH_MAX_VALUE = NV_DESKTOP_COLOR_DEPTH_16BPC_FLOAT_HDR, // must be set to highest enum value } NV_DESKTOP_COLOR_DEPTH; typedef struct _NV_COLOR_DATA_V1 { NvU32 version; //!< Version of this structure NvU16 size; //!< Size of this structure NvU8 cmd; struct { NvU8 colorFormat; //!< One of NV_COLOR_FORMAT enum values. NvU8 colorimetry; //!< One of NV_COLOR_COLORIMETRY enum values. } data; } NV_COLOR_DATA_V1; typedef struct _NV_COLOR_DATA_V2 { NvU32 version; //!< Version of this structure NvU16 size; //!< Size of this structure NvU8 cmd; struct { NvU8 colorFormat; //!< One of NV_COLOR_FORMAT enum values. NvU8 colorimetry; //!< One of NV_COLOR_COLORIMETRY enum values. NvU8 dynamicRange; //!< One of NV_DYNAMIC_RANGE enum values. } data; } NV_COLOR_DATA_V2; typedef struct _NV_COLOR_DATA_V3 { NvU32 version; //!< Version of this structure NvU16 size; //!< Size of this structure NvU8 cmd; struct { NvU8 colorFormat; //!< One of NV_COLOR_FORMAT enum values. NvU8 colorimetry; //!< One of NV_COLOR_COLORIMETRY enum values. NvU8 dynamicRange; //!< One of NV_DYNAMIC_RANGE enum values. NV_BPC bpc; //!< One of NV_BPC enum values. } data; } NV_COLOR_DATA_V3; typedef struct _NV_COLOR_DATA_V4 { NvU32 version; //!< Version of this structure NvU16 size; //!< Size of this structure NvU8 cmd; struct { NvU8 colorFormat; //!< One of NV_COLOR_FORMAT enum values. NvU8 colorimetry; //!< One of NV_COLOR_COLORIMETRY enum values. NvU8 dynamicRange; //!< One of NV_DYNAMIC_RANGE enum values. NV_BPC bpc; //!< One of NV_BPC enum values. NV_COLOR_SELECTION_POLICY colorSelectionPolicy; //!< One of the color selection policy } data; } NV_COLOR_DATA_V4; typedef struct _NV_COLOR_DATA_V5 { NvU32 version; //!< Version of this structure NvU16 size; //!< Size of this structure NvU8 cmd; struct { NvU8 colorFormat; //!< One of NV_COLOR_FORMAT enum values. NvU8 colorimetry; //!< One of NV_COLOR_COLORIMETRY enum values. NvU8 dynamicRange; //!< One of NV_DYNAMIC_RANGE enum values. NV_BPC bpc; //!< One of NV_BPC enum values. NV_COLOR_SELECTION_POLICY colorSelectionPolicy; //!< One of the color selection policy NV_DESKTOP_COLOR_DEPTH depth; //!< One of NV_DESKTOP_COLOR_DEPTH enum values. } data; } NV_COLOR_DATA_V5; typedef NV_COLOR_DATA_V5 NV_COLOR_DATA; #define NV_COLOR_DATA_VER1 MAKE_NVAPI_VERSION(NV_COLOR_DATA_V1, 1) #define NV_COLOR_DATA_VER2 MAKE_NVAPI_VERSION(NV_COLOR_DATA_V2, 2) #define NV_COLOR_DATA_VER3 MAKE_NVAPI_VERSION(NV_COLOR_DATA_V3, 3) #define NV_COLOR_DATA_VER4 MAKE_NVAPI_VERSION(NV_COLOR_DATA_V4, 4) #define NV_COLOR_DATA_VER5 MAKE_NVAPI_VERSION(NV_COLOR_DATA_V5, 5) #define NV_COLOR_DATA_VER NV_COLOR_DATA_VER5 NVAPI_INTERFACE NvAPI_Disp_ColorControl(NvU32 displayId, NV_COLOR_DATA *pColorData); //! @} typedef enum { NV_STATIC_METADATA_TYPE_1 = 0 //!< Tells the type of structure used to define the Static Metadata Descriptor block. }NV_STATIC_METADATA_DESCRIPTOR_ID; typedef struct _NV_HDR_CAPABILITIES_V1 { NvU32 version; //!< Version of this structure NvU32 isST2084EotfSupported :1; //!< HDMI2.0a UHDA HDR with ST2084 EOTF (CEA861.3). Boolean: 0 = not supported, 1 = supported; NvU32 isTraditionalHdrGammaSupported :1; //!< HDMI2.0a traditional HDR gamma (CEA861.3). Boolean: 0 = not supported, 1 = supported; NvU32 isEdrSupported :1; //!< Extended Dynamic Range on SDR displays. Boolean: 0 = not supported, 1 = supported; NvU32 driverExpandDefaultHdrParameters :1; //!< If set, driver will expand default (=zero) HDR capabilities parameters contained in display's EDID. //!< Boolean: 0 = report actual HDR parameters, 1 = expand default HDR parameters; NvU32 isTraditionalSdrGammaSupported :1; //!< HDMI2.0a traditional SDR gamma (CEA861.3). Boolean: 0 = not supported, 1 = supported; NvU32 reserved :27; NV_STATIC_METADATA_DESCRIPTOR_ID static_metadata_descriptor_id; //!< Static Metadata Descriptor Id (0 for static metadata type 1) struct //!< Static Metadata Descriptor Type 1, CEA-861.3, SMPTE ST2086 { NvU16 displayPrimary_x0; //!< x coordinate of color primary 0 (e.g. Red) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y0; //!< y coordinate of color primary 0 (e.g. Red) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_x1; //!< x coordinate of color primary 1 (e.g. Green) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y1; //!< y coordinate of color primary 1 (e.g. Green) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_x2; //!< x coordinate of color primary 2 (e.g. Blue) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y2; //!< y coordinate of color primary 2 (e.g. Blue) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayWhitePoint_x; //!< x coordinate of white point of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayWhitePoint_y; //!< y coordinate of white point of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 desired_content_max_luminance; //!< Maximum display luminance = desired max luminance of HDR content ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) NvU16 desired_content_min_luminance; //!< Minimum display luminance = desired min luminance of HDR content ([0x0001-0xFFFF] = [1.0 - 6.55350] cd/m^2) NvU16 desired_content_max_frame_average_luminance; //!< Desired maximum Frame-Average Light Level (MaxFALL) of HDR content ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) }display_data; } NV_HDR_CAPABILITIES_V1; typedef struct _NV_HDR_CAPABILITIES_V2 { NvU32 version; //!< Version of this structure NvU32 isST2084EotfSupported :1; //!< HDMI2.0a UHDA HDR with ST2084 EOTF (CEA861.3). Boolean: 0 = not supported, 1 = supported; NvU32 isTraditionalHdrGammaSupported :1; //!< HDMI2.0a traditional HDR gamma (CEA861.3). Boolean: 0 = not supported, 1 = supported; NvU32 isEdrSupported :1; //!< Extended Dynamic Range on SDR displays. Boolean: 0 = not supported, 1 = supported; NvU32 driverExpandDefaultHdrParameters :1; //!< If set, driver will expand default (=zero) HDR capabilities parameters contained in display's EDID. //!< Boolean: 0 = report actual HDR parameters, 1 = expand default HDR parameters; NvU32 isTraditionalSdrGammaSupported :1; //!< HDMI2.0a traditional SDR gamma (CEA861.3). Boolean: 0 = not supported, 1 = supported; NvU32 isDolbyVisionSupported :1; //!< Dolby Vision Support. Boolean: 0 = not supported, 1 = supported; NvU32 reserved :26; NV_STATIC_METADATA_DESCRIPTOR_ID static_metadata_descriptor_id; //!< Static Metadata Descriptor Id (0 for static metadata type 1) struct //!< Static Metadata Descriptor Type 1, CEA-861.3, SMPTE ST2086 { NvU16 displayPrimary_x0; //!< x coordinate of color primary 0 (e.g. Red) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y0; //!< y coordinate of color primary 0 (e.g. Red) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_x1; //!< x coordinate of color primary 1 (e.g. Green) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y1; //!< y coordinate of color primary 1 (e.g. Green) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_x2; //!< x coordinate of color primary 2 (e.g. Blue) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y2; //!< y coordinate of color primary 2 (e.g. Blue) of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayWhitePoint_x; //!< x coordinate of white point of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayWhitePoint_y; //!< y coordinate of white point of the display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 desired_content_max_luminance; //!< Maximum display luminance = desired max luminance of HDR content ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) NvU16 desired_content_min_luminance; //!< Minimum display luminance = desired min luminance of HDR content ([0x0001-0xFFFF] = [1.0 - 6.55350] cd/m^2) NvU16 desired_content_max_frame_average_luminance; //!< Desired maximum Frame-Average Light Level (MaxFALL) of HDR content ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) }display_data; struct { NvU32 VSVDB_version : 3; //!< Version of Vendor Data block,Version 0: 25 bytes Version 1: 14 bytes NvU32 dm_version : 8; //!< Upper Nibble represents major version of Display Management(DM) while lower represents minor version of DM NvU32 supports_2160p60hz : 1; //!< If set sink is capable of 4kx2k @ 60hz NvU32 supports_YUV422_12bit : 1; //!< If set, sink is capable of YUV422-12 bit NvU32 supports_global_dimming : 1; //!< Indicates if sink supports global dimming NvU32 colorimetry : 1; //!< If set indicates sink supports DCI P3 colorimetry, REc709 otherwise NvU32 supports_backlight_control : 2; //!< This is set when sink is using lowlatency interface and can control its backlight. NvU32 backlt_min_luma : 2; //!< It is the level for Backlt min luminance value. NvU32 interface_supported_by_sink : 2; //!< Indicates the interface (standard or low latency) supported by the sink. NvU32 supports_10b_12b_444 : 2; //!< It is set when interface supported is low latency, it tells whether it supports 10 bit or 12 bit RGB 4:4:4 or YCbCr 4:4:4 or both. NvU32 reserved : 9; //!< Should be set to zero //!< All values below are encoded use DolbyVisionHDMITransmissionSpecification document to decode NvU16 target_min_luminance; //!< Represents min luminance level of Sink NvU16 target_max_luminance; //!< Represents max luminance level of sink NvU16 cc_red_x; //!< Red primary chromaticity coordinate x NvU16 cc_red_y; //!< Red primary chromaticity coordinate y NvU16 cc_green_x; //!< Green primary chromaticity coordinate x NvU16 cc_green_y; //!< Green primary chromaticity coordinate Y NvU16 cc_blue_x; //!< Blue primary chromaticity coordinate x NvU16 cc_blue_y; //!< Blue primary chromaticity coordinate y NvU16 cc_white_x; //!< White primary chromaticity coordinate x NvU16 cc_white_y; //!< White primary chromaticity coordinate y }dv_static_metadata; } NV_HDR_CAPABILITIES_V2; #define NV_HDR_CAPABILITIES_VER1 MAKE_NVAPI_VERSION(NV_HDR_CAPABILITIES_V1, 1) #define NV_HDR_CAPABILITIES_VER2 MAKE_NVAPI_VERSION(NV_HDR_CAPABILITIES_V2, 2) #define NV_HDR_CAPABILITIES_VER NV_HDR_CAPABILITIES_VER2 typedef NV_HDR_CAPABILITIES_V2 NV_HDR_CAPABILITIES; //! \ingroup dispcontrol //! @{ /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Disp_GetHdrCapabilities // //! \fn NvAPI_Disp_GetHdrCapabilities(NvU32 displayId, NV_HDR_CAPABILITIES *pHdrCapabilities) //! DESCRIPTION: This API gets High Dynamic Range (HDR) capabilities of the display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Monitor Identifier //! \param [in,out] pHdrCapabilities display's HDR capabilities //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Disp_GetHdrCapabilities(__in NvU32 displayId, __inout NV_HDR_CAPABILITIES *pHdrCapabilities); //! @} typedef enum { NV_HDR_CMD_GET = 0, //!< Get current HDR output configuration NV_HDR_CMD_SET = 1 //!< Set HDR output configuration } NV_HDR_CMD; typedef enum { // Official production-ready HDR modes NV_HDR_MODE_OFF = 0, //!< Turn off HDR NV_HDR_MODE_UHDA = 2, //!< Source: CCCS [a.k.a FP16 scRGB, linear, sRGB primaries, [-65504,0, 65504] range, RGB(1,1,1) = 80nits] Output : UHDA HDR [a.k.a HDR10, RGB/YCC 10/12bpc ST2084(PQ) EOTF RGB(1,1,1) = 10000 nits, Rec2020 color primaries, ST2086 static HDR metadata]. This is the only supported production HDR mode. // Experimental NV_HDR_MODE_UHDA_PASSTHROUGH = 5, //!< Experimental mode only, not for production! Source: HDR10 RGB 10bpc Output: HDR10 RGB 10 bpc - signal UHDA HDR mode (PQ + Rec2020) to the sink but send source pixel values unmodified (no PQ or Rec2020 conversions) - assumes source is already in HDR10 format. NV_HDR_MODE_DOLBY_VISION = 7, //!< Experimental mode only, not for production! Source: RGB8 Dolby Vision encoded (12 bpc YCbCr422 packed into RGB8) Output: Dolby Vision encoded : Application is to encoded frames in DV format and embed DV dynamic metadata as described in Dolby Vision specification. // Unsupported/obsolete HDR modes NV_HDR_MODE_EDR = 3, //!< Do not use! Internal test mode only, to be removed. Source: CCCS (a.k.a FP16 scRGB) Output : EDR (Extended Dynamic Range) - HDR content is tonemapped and gamut mapped to output on regular SDR display set to max luminance ( ~300 nits ). NV_HDR_MODE_SDR = 4, //!< Do not use! Internal test mode only, to be removed. Source: any Output: SDR (Standard Dynamic Range), we continuously send SDR EOTF InfoFrame signaling, HDMI compliance testing. NV_HDR_MODE_UHDA_NB = 6, //!< Do not use! Internal test mode only, to be removed. Source: CCCS (a.k.a FP16 scRGB) Output : notebook HDR NV_HDR_MODE_UHDBD = 2 //!< Do not use! Obsolete, to be removed. NV_HDR_MODE_UHDBD == NV_HDR_MODE_UHDA, reflects obsolete pre-UHDA naming convention. } NV_HDR_MODE; typedef struct _NV_HDR_COLOR_DATA_V1 { NvU32 version; //!< Version of this structure NV_HDR_CMD cmd; //!< Command get/set NV_HDR_MODE hdrMode; //!< HDR mode NV_STATIC_METADATA_DESCRIPTOR_ID static_metadata_descriptor_id; //!< Static Metadata Descriptor Id (0 for static metadata type 1) struct //!< Static Metadata Descriptor Type 1, CEA-861.3, SMPTE ST2086 { NvU16 displayPrimary_x0; //!< x coordinate of color primary 0 (e.g. Red) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y0; //!< y coordinate of color primary 0 (e.g. Red) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_x1; //!< x coordinate of color primary 1 (e.g. Green) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y1; //!< y coordinate of color primary 1 (e.g. Green) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_x2; //!< x coordinate of color primary 2 (e.g. Blue) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y2; //!< y coordinate of color primary 2 (e.g. Blue) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayWhitePoint_x; //!< x coordinate of white point of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayWhitePoint_y; //!< y coordinate of white point of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 max_display_mastering_luminance; //!< Maximum display mastering luminance ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) NvU16 min_display_mastering_luminance; //!< Minimum display mastering luminance ([0x0001-0xFFFF] = [1.0 - 6.55350] cd/m^2) NvU16 max_content_light_level; //!< Maximum Content Light level (MaxCLL) ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) NvU16 max_frame_average_light_level; //!< Maximum Frame-Average Light Level (MaxFALL) ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) } mastering_display_data; } NV_HDR_COLOR_DATA_V1; typedef struct _NV_HDR_COLOR_DATA_V2 { NvU32 version; //!< Version of this structure NV_HDR_CMD cmd; //!< Command get/set NV_HDR_MODE hdrMode; //!< HDR mode NV_STATIC_METADATA_DESCRIPTOR_ID static_metadata_descriptor_id; //!< Static Metadata Descriptor Id (0 for static metadata type 1) struct //!< Static Metadata Descriptor Type 1, CEA-861.3, SMPTE ST2086 { NvU16 displayPrimary_x0; //!< x coordinate of color primary 0 (e.g. Red) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y0; //!< y coordinate of color primary 0 (e.g. Red) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_x1; //!< x coordinate of color primary 1 (e.g. Green) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y1; //!< y coordinate of color primary 1 (e.g. Green) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_x2; //!< x coordinate of color primary 2 (e.g. Blue) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayPrimary_y2; //!< y coordinate of color primary 2 (e.g. Blue) of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayWhitePoint_x; //!< x coordinate of white point of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 displayWhitePoint_y; //!< y coordinate of white point of mastering display ([0x0000-0xC350] = [0.0 - 1.0]) NvU16 max_display_mastering_luminance; //!< Maximum display mastering luminance ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) NvU16 min_display_mastering_luminance; //!< Minimum display mastering luminance ([0x0001-0xFFFF] = [1.0 - 6.55350] cd/m^2) NvU16 max_content_light_level; //!< Maximum Content Light level (MaxCLL) ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) NvU16 max_frame_average_light_level; //!< Maximum Frame-Average Light Level (MaxFALL) ([0x0001-0xFFFF] = [1.0 - 65535.0] cd/m^2) } mastering_display_data; NV_COLOR_FORMAT hdrColorFormat; //!< Optional, One of NV_COLOR_FORMAT enum values, if set it will apply requested color format for HDR session NV_DYNAMIC_RANGE hdrDynamicRange; //!< Optional, One of NV_DYNAMIC_RANGE enum values, if set it will apply requested dynamic range for HDR session NV_BPC hdrBpc; //!< Optional, One of NV_BPC enum values, if set it will apply requested color depth //!< Dolby Vision mode: DV supports specific combinations of colorformat, dynamic range and bpc. Please refer Dolby Vision specification. //!< If invalid or no combination is passed driver will force default combination of RGB format + full range + 8bpc. //!< HDR mode: These fields are ignored in hdr mode } NV_HDR_COLOR_DATA_V2; #define NV_HDR_COLOR_DATA_VER1 MAKE_NVAPI_VERSION(NV_HDR_COLOR_DATA_V1, 1) #define NV_HDR_COLOR_DATA_VER2 MAKE_NVAPI_VERSION(NV_HDR_COLOR_DATA_V2, 2) #ifndef NV_HDR_COLOR_DATA_VER #define NV_HDR_COLOR_DATA_VER NV_HDR_COLOR_DATA_VER2 typedef NV_HDR_COLOR_DATA_V2 NV_HDR_COLOR_DATA; #endif //! \ingroup dispcontrol //! @{ /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Disp_HdrColorControl // //! \fn NvAPI_Disp_HdrColorControl(NvU32 displayId, NV_HDR_COLOR_DATA *pHdrColorData) //! DESCRIPTION: This API configures High Dynamic Range (HDR) and Extended Dynamic Range (EDR) output. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Monitor Identifier //! \param [in,out] pHdrColorData HDR configuration data //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Disp_HdrColorControl(__in NvU32 displayId, __inout NV_HDR_COLOR_DATA *pHdrColorData); //! @} //! \ingroup dispcontrol //! Used in NvAPI_GetDVCInfo() typedef struct { NvU32 version; //!< [IN] Version info NvU32 currentLevel; //!< [OUT] The current DVC level NvU32 minLevel; //!< [OUT] Minimim range level NvU32 maxLevel; //!< [OUT] Maximum range level } NV_DISPLAY_DVC_INFO; //! \ingroup dispcontrol #define NV_DISPLAY_DVC_INFO_VER MAKE_NVAPI_VERSION(NV_DISPLAY_DVC_INFO,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetDVCInfo // //! This function retrieves the Digital Vibrance Control (DVC) information of the selected display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or NvAPI_GetView(), to identify the target //! output in case multiple targets are associated with the selected hNvDisplay. //! Can be NULL to pick the display output ID associated with hNvDisplay. See \ref handles. //! For Win10 & above OSs, display id should be sent in this parameter instead of outputid. //! For Win10 & above OSs and if the display is part of cross adapter clone, display id must be sent in this parameter instead of outputid, //! otherwise the call will fail. //! NvAPI_GPU_GetConnectedDisplayIds() can be used to get the display id. //! \param [out] pDVCInfo The returned DVC information. //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_INVALID_ARGUMENT pDVCInfo is NULL. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_DISPLAY_DVC_INFO struct is not supported //! \retval NVAPI_NOT_SUPPORTED DVC feature is not supported on the selected GPU //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetDVCInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_DVC_INFO *pDVCInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetDVCLevel // //! This function sets the DVC level for the selected display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or NvAPI_GetView(), to identify the target //! output in case multiple targets are associated with the selected hNvDisplay. //! Can be NULL to pick the display output id associated with hNvDisplay. See \ref handles. //! For Win10 & above OSs, display id should be sent in this parameter instead of outputid. //! For Win10 & above OSs and if the display is part of cross adapter clone, display id must be sent in this parameter instead of outputid, //! otherwise the call will fail. //! NvAPI_GPU_GetConnectedDisplayIds() can be used to get the display id. //! \param [out] level The new level to apply. Value should be within the range of min and max. //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_NOT_SUPPORTED DVC is not supported on the selected GPU //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetDVCLevel(NvDisplayHandle hNvDisplay, NvU32 outputId, NvU32 level); //! \ingroup dispcontrol //! Used in NvAPI_GetDVCInfoEx() and NvAPI_SetDVCLevelEx() typedef struct { NvU32 version; //!< IN version info NvS32 currentLevel; //!< OUT current DVC level NvS32 minLevel; //!< OUT min range level NvS32 maxLevel; //!< OUT max range level NvS32 defaultLevel; //!< OUT default DVC level } NV_DISPLAY_DVC_INFO_EX; //! \ingroup dispcontrol //! Macro for constucting the version field of NV_DISPLAY_DVC_INFO_EX #define NV_DISPLAY_DVC_INFO_EX_VER MAKE_NVAPI_VERSION(NV_DISPLAY_DVC_INFO_EX,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetDVCInfoEx // //! DESCRIPTION: This API retrieves the Digital Vibrance Control(DVC) information of the selected display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or NvAPI_GetView(), to identify the target //! output in case multiple targets are associated with the selected hNvDisplay. //! Can be NULL to pick the display output ID associated with hNvDisplay. //! For Win10 & above OSs, display id should be sent in this parameter instead of outputid. //! For Win10 & above OSs and if the display is part of cross adapter clone, display id must be sent in this parameter instead of outputid, //! otherwise the call will fail. //! NvAPI_GPU_GetConnectedDisplayIds() can be used to get the display id. //! \param [out] pDVCInfo The returned DVC information. //! //! \retval ::NVAPI_OK: call successful. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found. //! \retval ::NVAPI_EXPECTED_DISPLAY_HANDLE: hNvDisplay is not a valid display handle. //! \retval ::NVAPI_INVALID_ARGUMENT: pDVCInfo is NULL. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION - the version of the NV_DISPLAY_DVC_INFO struct is not supported //! \retval ::NVAPI_NOT_SUPPORTED - DVC feature is not supported on the selected GPU //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetDVCInfoEx(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_DVC_INFO_EX *pDVCInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetDVCLevelEx // //! DESCRIPTION: This API sets the DVC level for the selected display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or NvAPI_GetView(), to identify the target //! output in case multiple targets are associated with the selected hNvDisplay. //! Can be NULL to pick the display output ID associated with hNvDisplay. //! For Win10 & above OSs, display id should be sent in this parameter instead of outputid. //! For Win10 & above OSs and if the display is part of cross adapter clone, display id must be sent in this parameter instead of outputid, //! otherwise the call will fail. //! NvAPI_GPU_GetConnectedDisplayIds() can be used to get the display id. //! \param [in] dvcInfo The new DVC to apply. This structure can be accessed by GetDVCInfo() API. //! //! \retval ::NVAPI_OK Call successful. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval ::NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval ::NVAPI_NOT_SUPPORTED DVC is not supported on the selected GPU //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetDVCLevelEx(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_DVC_INFO_EX *pDVCInfo); //! \ingroup dispcontrol //! Used in NvAPI_GetHUEInfo() typedef struct { NvU32 version; //!< IN Version info NvU32 currentHueAngle; //!< OUT Current HUE Angle. Typically between 0 - 360 degrees NvU32 defaultHueAngle; //!< OUT Default HUE Angle } NV_DISPLAY_HUE_INFO; //! \ingroup dispcontrol //! Macro for constructing the version field of NV_DISPLAY_HUE_INFO #define NV_DISPLAY_HUE_INFO_VER MAKE_NVAPI_VERSION(NV_DISPLAY_HUE_INFO,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetHUEInfo // //! DESCRIPTION: This API retrieves the HUE information of the selected display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or NvAPI_GetView(), to identify the target //! output in case multiple targets are associated with the selected hNvDisplay. //! Can be NULL to pick the display output id associated with hNvDisplay. //! \param [out] pHUEInfo The returned HUE information. //! //! \retval ::NVAPI_OK Call successful. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVidia GPU driving a display was found. //! \retval ::NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval ::NVAPI_INVALID_ARGUMENT pHUEInfo is NULL. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_DISPLAY_HUE_INFO struct is not supported //! \retval ::NVAPI_NOT_SUPPORTED HUE feature is not supported on the selected GPU //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetHUEInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_HUE_INFO *pHUEInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetHUEAngle // //! DESCRIPTION: This API sets the HUE level for the selected display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or NvAPI_GetView(), to identify the target //! output in case multiple targets are associated with the selected hNvDisplay. //! Can be NULL to pick the display output ID associated with hNvDisplay. //! \param [in] level The new level to apply. Value should be within the range of minimum and maximum. //! //! \retval ::NVAPI_OK Call successful. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVidia GPU driving a display was found. //! \retval ::NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval ::NVAPI_NOT_SUPPORTED HUE feature is not supported on the selected GPU. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetHUEAngle(NvDisplayHandle hNvDisplay, NvU32 outputId, NvU32 hueAngle); //! \ingroup dispcontrol //! Used in NvAPI_GetImageSharpeningInfo() typedef struct { NvU32 version; //!< IN version info NvU32 currentLevel; //!< OUT current Image Sharpening level NvU32 minLevel; //!< OUT min range level NvU32 maxLevel; //!< OUT max range level } NV_DISPLAY_IMAGE_SHARPENING_INFO; //! \ingroup dispcontrol #define NV_DISPLAY_IMAGE_SHARPENING_INFO_VER MAKE_NVAPI_VERSION(NV_DISPLAY_IMAGE_SHARPENING_INFO,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetImageSharpeningInfo // //! This function retrieves the Image Sharpening information of the selected display. //! //! \deprecated Do not use this function - it is deprecated in release 440. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or NvAPI_GetView(), to identify the target //! output in case multiple targets are associated with the selected hNvDisplay. //! Can be NULL to pick the display output id associated with hNvDisplay. See \ref handles. //! \param [out] pImageSharpeningInfo The returned Image Sharpening information. //! //! \retval NVAPI_OK: call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_INVALID_ARGUMENT pImageSharpeningInfo is NULL. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_DISPLAY_IMAGE_SHARPENING_INFO struct is not supported //! \retval NVAPI_NOT_SUPPORTED Image Sharpening is not supported on the selected GPU //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 440.") NVAPI_INTERFACE NvAPI_GetImageSharpeningInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_IMAGE_SHARPENING_INFO *pImageSharpeningInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetImageSharpeningLevel // //! This function sets the Image Sharpening level for the selected display. //! //! \deprecated Do not use this function - it is deprecated in release 440. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or NvAPI_GetView(), to identify the target //! output in case multiple targets are associated with the selected hNvDisplay. //! Can be NULL to pick the display output id associated with hNvDisplay. See \ref handles. //! \param [in] level The new level to apply. Value should be within the range of min and max. //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_NOT_SUPPORTED Image Sharpening is not supported on the selected GPU //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 440.") NVAPI_INTERFACE NvAPI_SetImageSharpeningLevel(NvDisplayHandle hNvDisplay, NvU32 outputId, NvU32 level); //! \ingroup tvapi //! Use in NvAPI_SetTVEncoderControls() and NvAPI_GetTVEncoderControls(). typedef struct { NvU32 version; //!< [IN] Version info struct { NvU32 defaultLevel; //!< [OUT] Default level NvU32 currentLevel; //!< [IN/OUT] Current level NvU32 minLevel; //!< [OUT] Minimum range level NvU32 maxLevel; //!< [OUT] Maximum range level } flicker, saturation; } NV_TV_ENCODER_CONTROLS; //! \ingroup tvapi #define NV_TV_ENCODER_CONTROLS_VER MAKE_NVAPI_VERSION(NV_TV_ENCODER_CONTROLS,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetTVEncoderControls // //! DESCRIPTION: This function retrieves the flicker and saturation levels for the selected TV. //! //! \deprecated Do not use this function - it is deprecated in release 440. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or //! a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or //! NvAPI_GetView(), to identify the target output in case multiple targets are //! associated with the selected hNvDisplay. //! Can be NULL to pick the display output ID associated with hNvDisplay. See \ref handles. //! \param [out] pTvEncoderInfo The returned TV encoder controls and its levels. See \ref NV_TV_ENCODER_CONTROLS. //! //! \note If maxLevel and minLevel are both zero then that control is not supported on this GPU and should not be used. //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_INVALID_ARGUMENT pTvEncoderInfo is NULL. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_TV_ENCODER_CONTROLS struct is not supported. //! \retval NVAPI_NOT_SUPPORTED TV or this API is not supported on the selected GPU. //! //! \ingroup tvapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 440.") NVAPI_INTERFACE NvAPI_GetTVEncoderControls(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_TV_ENCODER_CONTROLS *pTvEncoderInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetTVEncoderControls // //! DESCRIPTION: This function sets the flicker and saturation levels for the selected TV. //! //! \deprecated Do not use this function - it is deprecated in release 440. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or //! a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or //! NvAPI_GetView(), to identify the target output in case multiple targets are //! associated with the selected hNvDisplay. See \ref handles. //! Can be NULL to pick the display output ID associated with hNvDisplay. //! \param [in] pTvEncoderInfo The selected TV encoder controls and its levels that are applied. See \ref NV_TV_ENCODER_CONTROLS. //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_TV_ENCODER_CONTROLS struct is not supported. //! \retval NVAPI_NOT_SUPPORTED TV or this API is not supported on the selected GPU. //! //! \ingroup tvapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 440.") NVAPI_INTERFACE NvAPI_SetTVEncoderControls(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_TV_ENCODER_CONTROLS *pTvEncoderInfo); //! \ingroup tvapi //! Used in NvAPI_SetTVOutputBorderColor() and NvAPI_GetTVOutputBorderColor(). typedef enum { NV_TV_BORDER_COLOR_BLACK = 0, NV_TV_BORDER_COLOR_GREY = 1, } NV_TV_BORDER_COLOR; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetTVOutputBorderColor // //! DESCRIPTION: This function retrieves the color of the TV border. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or //! a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs() or //! NvAPI_GetView(), to identify the target output in case multiple targets are //! associated with the selected hNvDisplay. //! Can be NULL to pick the display output ID associated with hNvDisplay. See \ref handles. //! \param [out] pBorderColor The returned TV border color. //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_INVALID_ARGUMENT pBorderColor is NULL. //! \retval NVAPI_NOT_SUPPORTED TV or this API is not supported on the selected GPU. //! //! \ingroup tvapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetTVOutputBorderColor(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_TV_BORDER_COLOR *pBorderColor); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetTVOutputBorderColor // //! DESCRIPTION: This function sets the color of the TV border. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or //! a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs or //! NvAPI_GetView, to identify the target output in case multiple targets are //! associated with the selected hNvDisplay. See \ref handles. //! Can be NULL to pick the display output ID associated with hNvDisplay. //! \param [in] pBorderColor The TV border color to set. //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_NOT_SUPPORTED TV or this API is not supported on the selected GPU. //! //! \ingroup tvapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetTVOutputBorderColor(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_TV_BORDER_COLOR borderColor); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetDisplayPosition // //! DESCRIPTION: This function retrieves the display position of the associated analog display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or //! a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs or //! NvAPI_GetView, to identify the target output in case multiple targets are //! associated with the selected hNvDisplay. See \ref handles. //! Can be NULL to pick the display output ID associated with hNvDisplay. //! \param [out] pXOffset The returned display position x-offset. //! \param [out] pYOffset The returned display position y-offset. //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_INVALID_ARGUMENT pXOffset or pYOffset is NULL. //! \retval NVAPI_NOT_SUPPORTED This API is not supported. //! \retval NVAPI_EXPECTED_ANALOG_DISPLAY The selected display is not an analog display. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetDisplayPosition(NvDisplayHandle hNvDisplay, NvU32 outputId, NvU32 *pXOffset, NvU32 *pYOffset); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetDisplayPosition // //! DESCRIPTION: This function sets the display position of the associated analog display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or //! a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] outputId One of the selected outputId retrieved from NvAPI_GPU_GetActiveOutputs or //! NvAPI_GetView, to identify the target output in case multiple targets are //! associated with the selected hNvDisplay. See \ref handles. //! Can be NULL to pick the display output ID associated with hNvDisplay. //! \param [in] XOffset The set display position x-offset. //! \param [in] YOffset The set display position y-offset. //! //! \retval NVAPI_OK Call successful. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! \retval NVAPI_NOT_SUPPORTED This API is not supported. //! \retval NVAPI_EXPECTED_ANALOG_DISPLAY The selected display is not an analog display. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetDisplayPosition(NvDisplayHandle hNvDisplay, NvU32 outputId, NvU32 xOffset, NvU32 yOffset); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetDisplaySettings // //! This function retrieves the target display arrangement for a selected display source. //! \note Display PATH with this API is limited to a single GPU. DUALVIEW across GPUs will be returned as STANDARD VIEW. //! Use NvAPI_SYS_GetDisplayTopologies() to query views across GPUs. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 100 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! #NVAPI_DEFAULT_HANDLE is not allowed, it must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [out] pPaths Detailed target display arrangement for clone, span, and edge blending display modes. //! \param [out] pathCount Count of targets for the selected display source. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval NVAPI_DEVICE_BUSY - ModeSet has not yet completed. Please wait and call it again. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetDisplaySettings(NvDisplayHandle hNvDisplay, NV_DISP_PATH *pPaths, NvU32 *pPathCount); //! \ingroup dispcontrol //! Used in NvAPI_DISP_GetTiming(). typedef struct { NvU32 isInterlaced : 4; //!< To retrieve interlaced/progressive timing NvU32 reserved0 : 12; union { NvU32 tvFormat : 8; //!< The actual analog HD/SDTV format. Used when the timing type is //! NV_TIMING_OVERRIDE_ANALOG_TV and width==height==rr==0. NvU32 ceaId : 8; //!< The EIA/CEA 861B/D predefined short timing descriptor ID. //! Used when the timing type is NV_TIMING_OVERRIDE_EIA861 //! and width==height==rr==0. NvU32 nvPsfId : 8; //!< The NV predefined PsF format Id. //! Used when the timing type is NV_TIMING_OVERRIDE_NV_PREDEFINED. }; NvU32 scaling : 8; //!< Define preferred scaling }NV_TIMING_FLAG; //! \ingroup dispcontrol //! Used in NvAPI_DISP_GetTiming(). typedef struct _NV_TIMING_INPUT { NvU32 version; //!< (IN) structure version NvU32 width; //!< Visible horizontal size NvU32 height; //!< Visible vertical size float rr; //!< Timing refresh rate NV_TIMING_FLAG flag; //!< Flag containing additional info for timing calculation. NV_TIMING_OVERRIDE type; //!< Timing type(formula) to use for calculating the timing }NV_TIMING_INPUT; #define NV_TIMING_INPUT_VER MAKE_NVAPI_VERSION(NV_TIMING_INPUT,1) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetTiming // //! \fn NvAPI_GetTiming(NvDisplayHandle hNvDisplay, NvU32 width, NvU32 height, float rr, NV_TIMING_FLAG flag, NvU32 outputId, //! DESCRIPTION: This function calculates the timing from the visible width/height/refresh-rate and timing type info. //! //! \deprecated Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_GetTiming. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] width Visible horizontal size //! \param [in] height Visible vertical size //! \param [in] rr Timing refresh rate //! \param [in] flag Flag containing additional info for timing calculation. //! \param [in] outputId The monitor Id(mask) - only used to get the EDID timing or custom timing or NV policy related timing. See \ref handles. //! (NV_TIMING_OVERRIDE_AUTO). //! \param [in] type Timing type(formula) to use for calculating the timing //! \param [out] pT Pointer to the NV_TIMING structure //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// //! \addtogroup dispcontrol //! @{ //! Get CEA format (digital TV format) from NV_TIMING(::etc.status) #define NV_GET_CEA_FORMAT(n) (((n)&0x3F800000)>>23) //! Get the analog TV format from NV_TIMING(::etc.status) #define NV_GET_ANALOG_TV_FORMAT(n) ((((n)&0x0FF00)==0x1100||((n)&0x0FF00)==0x1200)?((n)&0x0FF):0) //! Check if the timing(NV_TIMING::etc.status) is an analog TV format #define NV_IS_ANALOG_TV_FORMAT(n) ((((n)&0x0FF00)==0x1100||((n)&0x0FF00)==0x1200)?1:0) //! @} //! \ingroup dispcontrol __nvapi_deprecated_function("Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_GetTiming.") NVAPI_INTERFACE NvAPI_GetTiming(NvDisplayHandle hNvDisplay, NvU32 width, NvU32 height, float rr, NV_TIMING_FLAG flag, NvU32 outputId, NV_TIMING_OVERRIDE type, NV_TIMING *pT); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetTiming // //! DESCRIPTION: This function calculates the timing from the visible width/height/refresh-rate and timing type info. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! //! \param [in] displayId Display ID of the display. //! \param [in] timingInput Inputs used for calculating the timing. //! \param [out] pTiming Pointer to the NV_TIMING structure. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetTiming( __in NvU32 displayId,__in NV_TIMING_INPUT *timingInput, __out NV_TIMING *pTiming); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetMonitorCapabilities // //! \fn NvAPI_DISP_GetMonitorCapabilities(NvU32 displayId, NV_MONITOR_CAPABILITIES *pMonitorCapabilities) //! DESCRIPTION: This API returns the Monitor capabilities //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Monitor Identifier //! \param [out] pMonitorCapabilities The monitor support info //! //! \return ::NVAPI_OK, //! ::NVAPI_ERROR, //! ::NVAPI_INVALID_ARGUMENT // /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol //! @{ //! HDMI-related and extended CAPs typedef enum { // hdmi related caps NV_MONITOR_CAPS_TYPE_HDMI_VSDB = 0x1000, NV_MONITOR_CAPS_TYPE_HDMI_VCDB = 0x1001, } NV_MONITOR_CAPS_TYPE; typedef struct _NV_MONITOR_CAPS_VCDB { NvU8 quantizationRangeYcc : 1; NvU8 quantizationRangeRgb : 1; NvU8 scanInfoPreferredVideoFormat : 2; NvU8 scanInfoITVideoFormats : 2; NvU8 scanInfoCEVideoFormats : 2; } NV_MONITOR_CAPS_VCDB; //! See NvAPI_DISP_GetMonitorCapabilities(). typedef struct _NV_MONITOR_CAPS_VSDB { // byte 1 NvU8 sourcePhysicalAddressB : 4; //!< Byte 1 NvU8 sourcePhysicalAddressA : 4; //!< Byte 1 // byte 2 NvU8 sourcePhysicalAddressD : 4; //!< Byte 2 NvU8 sourcePhysicalAddressC : 4; //!< Byte 2 // byte 3 NvU8 supportDualDviOperation : 1; //!< Byte 3 NvU8 reserved6 : 2; //!< Byte 3 NvU8 supportDeepColorYCbCr444 : 1; //!< Byte 3 NvU8 supportDeepColor30bits : 1; //!< Byte 3 NvU8 supportDeepColor36bits : 1; //!< Byte 3 NvU8 supportDeepColor48bits : 1; //!< Byte 3 NvU8 supportAI : 1; //!< Byte 3 // byte 4 NvU8 maxTmdsClock; //!< Bye 4 // byte 5 NvU8 cnc0SupportGraphicsTextContent : 1; //!< Byte 5 NvU8 cnc1SupportPhotoContent : 1; //!< Byte 5 NvU8 cnc2SupportCinemaContent : 1; //!< Byte 5 NvU8 cnc3SupportGameContent : 1; //!< Byte 5 NvU8 reserved8 : 1; //!< Byte 5 NvU8 hasVicEntries : 1; //!< Byte 5 NvU8 hasInterlacedLatencyField : 1; //!< Byte 5 NvU8 hasLatencyField : 1; //!< Byte 5 // byte 6 NvU8 videoLatency; //!< Byte 6 // byte 7 NvU8 audioLatency; //!< Byte 7 // byte 8 NvU8 interlacedVideoLatency; //!< Byte 8 // byte 9 NvU8 interlacedAudioLatency; //!< Byte 9 // byte 10 NvU8 reserved13 : 7; //!< Byte 10 NvU8 has3dEntries : 1; //!< Byte 10 // byte 11 NvU8 hdmi3dLength : 5; //!< Byte 11 NvU8 hdmiVicLength : 3; //!< Byte 11 // Remaining bytes NvU8 hdmi_vic[7]; //!< Keeping maximum length for 3 bits NvU8 hdmi_3d[31]; //!< Keeping maximum length for 5 bits } NV_MONITOR_CAPS_VSDB; typedef struct _NV_MONITOR_CAPS_GENERIC { NvU8 supportVRR : 1; //!< monitor supports variable refresh rate. Valid for NV_MONITOR_CAPS_TYPE_GENERIC only. NvU8 supportULMB : 1; //!< monitor supports ULMB with variable refresh rate. Valid for NV_MONITOR_CAPS_TYPE_GENERIC only. NvU8 isTrueGsync : 1; //!< whether the monitor is actually GSYNC or adaptive sync monitor : 0 for adaptive sync. NvU8 isRLACapable : 1; //!< whether monitor supports RLA NvU8 reserved : 4; } NV_MONITOR_CAPS_GENERIC; //! See NvAPI_DISP_GetMonitorCapabilities(). typedef struct _NV_MONITOR_CAPABILITIES_V1 { NvU32 version; NvU16 size; NvU32 infoType; NvU32 connectorType; //!< Out: VGA, TV, DVI, HDMI, DP NvU8 bIsValidInfo : 1; //!< Boolean : Returns invalid if requested info is not present such as VCDB not present union { NV_MONITOR_CAPS_VSDB vsdb; NV_MONITOR_CAPS_VCDB vcdb; NV_MONITOR_CAPS_GENERIC caps; } data; } NV_MONITOR_CAPABILITIES_V1; typedef NV_MONITOR_CAPABILITIES_V1 NV_MONITOR_CAPABILITIES; //! Macro for constructing the version field of ::NV_MONITOR_CAPABILITIES_V1 #define NV_MONITOR_CAPABILITIES_VER1 MAKE_NVAPI_VERSION(NV_MONITOR_CAPABILITIES_V1,1) #define NV_MONITOR_CAPABILITIES_VER NV_MONITOR_CAPABILITIES_VER1 //! @} //! SUPPORTED OS: Windows 7 and higher //! //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_DISP_GetMonitorCapabilities(__in NvU32 displayId, __inout NV_MONITOR_CAPABILITIES *pMonitorCapabilities); //! \ingroup dispcontrol typedef struct _NV_MONITOR_COLOR_DATA { NvU32 version; // We are only supporting DP monitors for now. We need to extend this to HDMI panels as well NV_DP_COLOR_FORMAT colorFormat; //!< One of the supported color formats NV_DP_BPC backendBitDepths; //!< One of the supported bit depths } NV_MONITOR_COLOR_CAPS_V1; typedef NV_MONITOR_COLOR_CAPS_V1 NV_MONITOR_COLOR_CAPS; //! \ingroup dispcontrol #define NV_MONITOR_COLOR_CAPS_VER1 MAKE_NVAPI_VERSION(NV_MONITOR_COLOR_CAPS_V1,1) #define NV_MONITOR_COLOR_CAPS_VER NV_MONITOR_COLOR_CAPS_VER1 /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetMonitorColorCapabilities // //! DESCRIPTION: This API returns all the color formats and bit depth values supported by a given DP monitor. //! //! USAGE: Sequence of calls which caller should make to get the information. //! 1. First call NvAPI_DISP_GetMonitorColorCapabilities() with pMonitorColorCapabilities as NULL to get the count. //! 2. Allocate memory for color caps(NV_MONITOR_COLOR_CAPS) array. //! 3. Call NvAPI_DISP_GetMonitorColorCapabilities() again with the pointer to the memory allocated to get all the //! color capabilities. //! //! Note : //! 1. pColorCapsCount should never be NULL, else the API will fail with NVAPI_INVALID_ARGUMENT. //! 2. *pColorCapsCount returned from the API will always be the actual count in any/every call. //! 3. Memory size to be allocated should be (*pColorCapsCount * sizeof(NV_MONITOR_COLOR_CAPS)). //! 4. If the memory allocated is less than what is required to return all the timings, this API will return the //! amount of information which can fit in user provided buffer and API will return NVAPI_INSUFFICIENT_BUFFER. //! 5. If the caller specifies a greater value for *pColorCapsCount in second call to NvAPI_DISP_GetMonitorColorCapabilities() //! than what was returned from first call, the API will return only the actual number of elements in the color //! capabilities array and the extra buffer will remain unused. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Monitor Identifier //! \param [in, out] pMonitorColorCapabilities The monitor color capabilities information //! \param [in, out] pColorCapsCount - During input, the number of elements allocated for the pMonitorColorCapabilities pointer //! - During output, the actual number of color data elements the monitor supports //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval NVAPI_INSUFFICIENT_BUFFER The input buffer size is not sufficient to hold the total contents. In this case //! *pColorCapsCount will hold the required amount of elements. //! \retval NVAPI_INVALID_DISPLAY_ID The input monitor is either not connected or is not a DP panel. //! //! \ingroup dispcontrol //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetMonitorColorCapabilities(__in NvU32 displayId, __inout_ecount_part_opt(*pColorCapsCount, *pColorCapsCount) NV_MONITOR_COLOR_CAPS *pMonitorColorCapabilities, __inout NvU32 *pColorCapsCount); //! \ingroup dispcontrol //! Used in NvAPI_DISP_EnumCustomDisplay() and NvAPI_DISP_TryCustomDisplay(). typedef struct { NvU32 version; // the source mode information NvU32 width; //!< Source surface(source mode) width NvU32 height; //!< Source surface(source mode) height NvU32 depth; //!< Source surface color depth."0" means all 8/16/32bpp NV_FORMAT colorFormat; //!< Color format (optional) NV_VIEWPORTF srcPartition; //!< For multimon support, should be set to (0,0,1.0,1.0) for now. float xRatio; //!< Horizontal scaling ratio float yRatio; //!< Vertical scaling ratio NV_TIMING timing; //!< Timing used to program TMDS/DAC/LVDS/HDMI/TVEncoder, etc. NvU32 hwModeSetOnly : 1; //!< If set, it means a hardware modeset without OS update }NV_CUSTOM_DISPLAY; //! \ingroup dispcontrol //! Used in NV_CUSTOM_DISPLAY. #define NV_CUSTOM_DISPLAY_VER MAKE_NVAPI_VERSION(NV_CUSTOM_DISPLAY,1) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_EnumCustomDisplay // //! \fn NvAPI_EnumCustomDisplay(NvDisplayHandle hNvDisplay, NvU32 index, NvU32 outputId, NV_CUSTOM_DISPLAY *pC) //! DESCRIPTION: This function enumerates the custom displays. //! //! \deprecated Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_EnumCustomDisplay. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! #NVAPI_DEFAULT_HANDLE is not allowed. It must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] index Enum index //! \param [in] outputId Monitor Id to which the custom display configuration should be obtained. //! "-1" is to enum all custom display configurations. See \ref handles. //! \param [out] pC Pointer to the NV_CUSTOM_DISPLAY structure //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol __nvapi_deprecated_function("Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_EnumCustomDisplay.") NVAPI_INTERFACE NvAPI_EnumCustomDisplay(NvDisplayHandle hNvDisplay, NvU32 index, NvU32 outputId, NV_CUSTOM_DISPLAY *pC); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_TryCustomDisplay // //! DESCRIPTION: This API is a wrapper function of NvAPI_SetDisplaySettings() to set up a custom display without saving the configuration. //! //! \note //! All the members of srcPartition, present in NV_CUSTOM_DISPLAY structure, should have their range in (0.0,1.0). //! In clone mode the timings can applied to both the target monitors but only one target at a time. \n //! For the secondary target the applied timings works under the following conditions: //! - If the secondary monitor EDID supports the selected timing, OR //! - If the selected custom timings can be scaled by the secondary monitor for the selected source resolution on the primary, OR //! - If the selected custom timings matches the existing source resolution on the primary. //! //! \deprecated Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_TryCustomDisplay. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! #NVAPI_DEFAULT_HANDLE is not allowed, it must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] pDispOutId Array of the target monitor output IDs - See \ref handles. //! \param [in] pCustDisp Pointer to the NV_CUSTOM_DISPLAY structure //! \param [in] count Total number of the incoming NV_CUSTOM_DISPLAY structure. This is for the multi-head support. //! \param [in] hwModeSetOnly Option to let the user flush the timing without OS update //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. //! \retval NVAPI_NO_IMPLEMENTATION Not implemented. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of NV_CUSTOM_DISPLAY is not supported. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_TryCustomDisplay.") NVAPI_INTERFACE NvAPI_TryCustomDisplay(NvDisplayHandle hNvDisplay, NvU32 *pDispOutputId, NV_CUSTOM_DISPLAY *pCustDisp, NvU32 count, NvU32 hwModeSetOnly); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_RevertCustomDisplayTrial // //! DESCRIPTION: This API is used to restore the old display configuration before NvAPI_TryCustomDisplay() was called. This function //! must be called only after a custom display configuration is tested on the hardware, using NvAPI_TryCustomDisplay(), //! otherwise no action is taken. //! This API is not supported under Windows XP, in which case it returns NVAPI_NO_IMPLEMENTATION. //! //! \deprecated Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_RevertCustomDisplayTrial. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay NVIDIA Display selection //! #NVAPI_DEFAULT_HANDLE is not allowed, it must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_RevertCustomDisplayTrial.") NVAPI_INTERFACE NvAPI_RevertCustomDisplayTrial(NvDisplayHandle hNvDisplay); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DeleteCustomDisplay // //! DESCRIPTION: This function deletes the index-specified custom display configuration from the registry. //! //! \deprecated Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_DeleteCustomDisplay. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! #NVAPI_DEFAULT_HANDLE is not allowed. It must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] displayOutputId Display ID on which the underscan configuration is to be applied. It must be a legal display Id (one bit set) //! -"0" is allowed, and indicates the default display used by the hNvDisplay handle. //! -"-1" is allowed, and indicates that the "index" is the absolute index and not a displayOutputId-related //! index - the index of the custom display //! //! \retval NVAPI_OK - completed request //! \retval NVAPI_ERROR - miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT: Invalid input parameter. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_DeleteCustomDisplay.") NVAPI_INTERFACE NvAPI_DeleteCustomDisplay(NvDisplayHandle hNvDisplay, NvU32 displayOutputId, NvU32 index); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SaveCustomDisplay // //! DESCRIPTION: This function saves the current hardware display configuration on the specified output ID as a custom display configuration. //! This function should be called right after NvAPI_TryCustomDisplay() to save the custom display from the current //! hardware context. This function will not do anything if the custom display configuration is not tested on the hardware. //! //! \deprecated Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_SaveCustomDisplay. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! NVAPI_DEFAULT_HANDLE not allowed, it has to be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] isThisOutputIdOnly If set, the saved custom display will only be applied on the monitor with the same outputId (see \ref handles). //! \param [in] isThisMonitorIdOnly If set, the saved custom display will only be applied on the monitor with the same EDID ID or //! the same TV connector in case of analog TV. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 313. Instead, use NvAPI_DISP_SaveCustomDisplay.") NVAPI_INTERFACE NvAPI_SaveCustomDisplay(NvDisplayHandle hNvDisplay, NvU32 isThisOutputIdOnly, NvU32 isThisMonitorIdOnly); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_EnumCustomDisplay // //! DESCRIPTION: This API enumerates the custom timing specified by the enum index. //! The client should keep enumerating until it returns NVAPI_END_ENUMERATION. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [in] displayId Dispaly ID of the display. //! \param [in] index Enum index //! \param [inout] pCustDisp Pointer to the NV_CUSTOM_DISPLAY structure //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval NVAPI_INVALID_DISPLAY_ID: Custom Timing is not supported on the Display, whose display id is passed //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_EnumCustomDisplay( __in NvU32 displayId, __in NvU32 index, __inout NV_CUSTOM_DISPLAY *pCustDisp); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_TryCustomDisplay // //! DESCRIPTION: This API is used to set up a custom display without saving the configuration on multiple displays. //! //! \note //! All the members of srcPartition, present in NV_CUSTOM_DISPLAY structure, should have their range in (0.0,1.0). //! In clone mode the timings can applied to both the target monitors but only one target at a time. \n //! For the secondary target the applied timings works under the following conditions: //! - If the secondary monitor EDID supports the selected timing, OR //! - If the selected custom timings can be scaled by the secondary monitor for the selected source resolution on the primary, OR //! - If the selected custom timings matches the existing source resolution on the primary. //! Setting up a custom display on non-active but connected monitors is supported only for Win7 and above. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! //! \param [in] pDisplayIds Array of the target display Dispaly IDs - See \ref handles. //! \param [in] count Total number of the incoming Display IDs and corresponding NV_CUSTOM_DISPLAY structure. This is for the multi-head support. //! \param [in] pCustDisp Pointer to the NV_CUSTOM_DISPLAY structure array. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval NVAPI_INVALID_DISPLAY_ID: Custom Timing is not supported on the Display, whose display id is passed //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_TryCustomDisplay( __in_ecount(count) NvU32 *pDisplayIds, __in NvU32 count, __in_ecount(count) NV_CUSTOM_DISPLAY *pCustDisp); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_DeleteCustomDisplay // //! DESCRIPTION: This function deletes the custom display configuration, specified from the registry for all the displays whose display IDs are passed. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! //! \param [in] pDisplayIds Array of Dispaly IDs on which custom display configuration is to be saved. //! \param [in] count Total number of the incoming Dispaly IDs. This is for the multi-head support. //! \param [in] pCustDisp Pointer to the NV_CUSTOM_DISPLAY structure //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval NVAPI_INVALID_DISPLAY_ID: Custom Timing is not supported on the Display, whose display id is passed //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_DeleteCustomDisplay( __in_ecount(count) NvU32 *pDisplayIds, __in NvU32 count, __in NV_CUSTOM_DISPLAY *pCustDisp); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_SaveCustomDisplay // //! DESCRIPTION: This function saves the current hardware display configuration on the specified Display IDs as a custom display configuration. //! This function should be called right after NvAPI_DISP_TryCustomDisplay() to save the custom display from the current //! hardware context. This function will not do anything if the custom display configuration is not tested on the hardware. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! //! \param [in] pDisplayIds Array of Dispaly IDs on which custom display configuration is to be saved. //! \param [in] count Total number of the incoming Dispaly IDs. This is for the multi-head support. //! \param [in] isThisOutputIdOnly If set, the saved custom display will only be applied on the monitor with the same outputId (see \ref handles). //! \param [in] isThisMonitorIdOnly If set, the saved custom display will only be applied on the monitor with the same EDID ID or //! the same TV connector in case of analog TV. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval NVAPI_INVALID_DISPLAY_ID: Custom Timing is not supported on the Display, whose display id is passed //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_SaveCustomDisplay( __in_ecount(count) NvU32 *pDisplayIds, __in NvU32 count, __in NvU32 isThisOutputIdOnly, __in NvU32 isThisMonitorIdOnly); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_RevertCustomDisplayTrial // //! DESCRIPTION: This API is used to restore the display configuration, that was changed by calling NvAPI_DISP_TryCustomDisplay(). This function //! must be called only after a custom display configuration is tested on the hardware, using NvAPI_DISP_TryCustomDisplay(), //! otherwise no action is taken. On Vista, NvAPI_DISP_RevertCustomDisplayTrial should be called with an active display that //! was affected during the NvAPI_DISP_TryCustomDisplay() call, per GPU. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! //! \param [in] pDisplayIds Pointer to display Id, of an active display. //! \param [in] count Total number of incoming Display IDs. For future use only. Currently it is expected to be passed as 1. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_RevertCustomDisplayTrial( __in_ecount(count) NvU32* pDisplayIds, __in NvU32 count); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_QueryUnderscanCap // //! \fn NvAPI_QueryUnderscanCap(NvDisplayHandle hNvDisplay, NvU32 displayOutputId, NV_UNDERSCAN_CAP* cap) //! DESCRIPTION: This function gets the maximum underscan/overscan ratio and the supported underscan type(s). //! //! Supported Underscan Options for GPU and Display Outputs //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //!
GPUDisplay OutputAvailable Underscan Options
GeForce8/post-GeForce8 CRT/TV/DFP/HDMI Source and scaler underscan
GeForce7/pre-GeForce7TV/DFP/HDMI Source underscan only
GeForce7/pre-GeForce7CRT No underscan option yet
//! //! EDID Checking Behavior //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //! //!
supportMonitorIdMatchsupportDisplayOutputIdMatchBehavior
00No EDID check, apply to all devices (not recommended).
01No EDID check, apply to a specified device only (the old WinXP style).
10Apply to the specified EDID regardless of the device mask.
11Apply to the specified EDID on a specified device.
//! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! #NVAPI_DEFAULT_HANDLE is not allowed. It must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] displayOutputId The display ID on which to apply the underscan configuration. //! It must be a legal display ID (one bit set). \n //! "0" is allowed, indicating the default display used by the hNvDisplay handle. See \ref handles. //! \param [out] cap The pointer to the NV_UNDERSCAN_CAP structure //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter // /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol //! Used in NvAPI_QueryUnderscanCap(). typedef struct { NvU32 version; //!< Structure version float xRatioMin; //!< The supported min horizontal underscan ratio (e.g. 0.75 ~ 1.25 etc) float xRatioMax; //!< The supported max horizontal underscan ratio float yRatioMin; //!< The supported min vertical underscan ratio (e.g. 0.75 ~ 1.25) float yRatioMax; //!< The supported max vertical underscan ratio NvU32 supportSourceUnderscan : 1; //!< Indicate if source underscan is supported. NvU32 supportScalerUnderscan : 1; //!< Indicate if the scaler-based underscan is supported. NvU32 supportMonitorIdMatch : 1; //!< Indicate if the underscan configuration can be set for the monitors with the same EDID. NvU32 supportDisplayOutputIdMatch : 1; //!< Indicate if the underscan configuration can be set for monitors connected to the same display output ID. NvU32 supportXYIndependentCtrl : 1; //!< Indicate if we can independently control in the X and Y direction. //! \code //! Note 1: //!------------------------+--------------------+------------------------------------------------ //! GPU | DisplayOutput | Available Underscan option //!------------------------+--------------------+------------------------------------------------ //! GeForce8/post-GeForce8 | CRT/TV/DFP/HDMI | source and scaler underscan //! GeForce7/pre-GeForce7 | TV/DFP/HDMI | source under only, the API will automatically //! | | fall back if scaler underscan is specified //! GeForce7/pre-GeForce7 | CRT | no underscan option yet, the API will return //! | | failure //!------------------------+--------------------+------------------------------------------------- //! //! Note 2: //!-------------------+-----------------------------+------------------------------------------- //! supportEdidMatch | supportDisplayOutputIdMatch | behavior //!-------------------+-----------------------------+--------------------------------------------- //! 0 | 0 | no EDID check, apply to all devices //! | | (not recommended) //! 0 | 1 | no EDID check, apply to a specified device //! | | only (the old XP style) //! 1 | 0 | apply to the specified Edid regardless of //! | | the device mask (new) //! 1 | 1 | apply to the specified Edid on a specified //! | | device (new) //!-------------------+-----------------------------+--------------------------------------------- //! \endcode NvU32 isSourceUnderscanRecommended : 1; //!< Indicate if source underscan is recommended under the current display context. NvU32 isScalerUnderscanRecommended : 1; //!< Indicate if the scaler based underscan is recommended under the current display context. } NV_UNDERSCAN_CAP; //! \ingroup dispcontrol //! Macro for constructing the version field of NV_UNDERSCAN_CAP #define NV_UNDERSCAN_CAP_VER MAKE_NVAPI_VERSION(NV_UNDERSCAN_CAP,1) //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_QueryUnderscanCap(NvDisplayHandle hNvDisplay, NvU32 displayOutputId, NV_UNDERSCAN_CAP* cap); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_EnumUnderscanConfig // //! \fn NvAPI_EnumUnderscanConfig(NvDisplayHandle hNvDisplay, NvU32 displayOutputId, NvU32 index, NV_UNDERSCAN_CONFIG* config) //! DESCRIPTION: This function enumerates the user-customized underscan configurations on the given device. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! #NVAPI_DEFAULT_HANDLE is not allowed - it must be a handle enumerated with //! NvAPI_EnumNVidiaDisplayHandle(). //! //! \param [in] displayOutputId The display ID to which the underscan configuration applies. See \ref handles. //! It must be a legal display ID (one bit set). //! - Use "0" to specify the default display used by the hNvDisplay handle. //! - Use "-1" to enumerate all saved underscan configurations regardless of //! the target display //! //! \param [in] index The regular the enum index. //! - Use "-1"(0xFFFFFFFF) to enumerate the current active underscan config on //! the display uniquely indicated by displayOutId //! //! \param [out] config The output pointer for the API to populate the underscan config info. //! See \ref NV_UNDERSCAN_CONFIG. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol //! @{ //! Used in NvAPI_EnumUnderscanConfig(). typedef struct { NvU32 version; //!< Structure version float xRatio; //!< Horizontal underscan ratio float yRatio; //!< Vertical undercan ratio \n //! The API may modify the client passed in config due to the //! hardware restrictions. For example, the xRatio/yRatio may be //! fine tuned so that they're aligned on a certain number //! because of the tiled memory restriction. Also "isSrcUnderscan" //! may also be changed if the hardware can't do backend underscan. NvU32 nativeWidth; //!< Width of the native mode NvU32 nativeHeight; //!< Height of the native mode NvU32 nativeRR; //!< Refresh rate of the native mode NvU32 isInterlaced : 1; //!< Whether native timing is interlaced or not NvU32 isScalerUnderscan : 1; //!< Scaler-based underscan or sourcedbased underscan NvU32 isOnThisMonitorOnly : 1; //!< Whether this config is applied only to this specific monitor (EDID) NvU32 isOnThisDisplayOutputIdOnly : 1; //!< Whether this underscan configuration is applied only to this display output ID NvU32 isEnabled : 1; //!< whether this underscan config is enabled or not. NvU32 reserved : 27; } NV_UNDERSCAN_CONFIG; #define NV_UNDERSCAN_CONFIG_VER1 MAKE_NVAPI_VERSION(NV_UNDERSCAN_CONFIG,1) #define NV_UNDERSCAN_CONFIG_VER2 MAKE_NVAPI_VERSION(NV_UNDERSCAN_CONFIG,2) #define NV_UNDERSCAN_CONFIG_VER NV_UNDERSCAN_CONFIG_VER2 //! @} //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_EnumUnderscanConfig(NvDisplayHandle hNvDisplay, NvU32 displayOutputId, NvU32 index, NV_UNDERSCAN_CONFIG* config); //! \ingroup dispcontrol #define NVAPI_INDEX_CURRENT_ENTRY -1 //! \ingroup dispcontrol #define NVAPI_INDEX_ALL_ENTRIES -2 //! \ingroup dispcontrol #define NVAPI_INDEX_UNINITIALIZED -3 /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DeleteUnderscanConfig // //! DESCRIPTION: This function deletes the specified underscan configuration entry. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! #NVAPI_DEFAULT_HANDLE is not allowed, it must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! //! \param [in] displayOutputId The display ID to which the underscan config is applied. See \ref handles. //! It must be a legal display Id (one bit set) //! - Use "0" to specify the default display used by the hNvDisplay handle. //! - Use "-1" to indicate that "index" is the absolute index and not //! displayOutputId related //! //! \param [in] index The config index enumerated from NvAPI_EnumUnderScanConfig //! - Use "-1" for the current active underscan config being applied on //! the specified display output ID. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. //! \retval NVAPI_UNKNOWN_UNDERSCAN_CONFIG The current active underscan config is from an unknown source //! and can't be deleted. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DeleteUnderscanConfig(NvDisplayHandle hNvDisplay, NvU32 displayOutputId, NvU32 index); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SetUnderscanConfig // //! DESCRIPTION: This function adds and sets a custom underscan configuration on the given device. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, //! it must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! //! \param [in] displayOutputId The display Id on which the underscan config is to apply. See \ref handles. //! It must be a legal display ID (one bit set). //! - Use "0" to indicate the default display used by the hNvDisplay handle. //! NOTE: 0xFFFFFFFF(-1) is not allowed in NvAPI_SetUnderScanConfig() //! //! \param [in,out] config The underscan config to set. See \ref NV_UNDERSCAN_CONFIG. //! \param [in] setDeferred //! - "0": Apply the setup immediately. //! - "1": Apply refresh at the next OS modeset. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetUnderscanConfig(NvDisplayHandle hNvDisplay, NvU32 displayOutputId, NV_UNDERSCAN_CONFIG* config, NvU32 setDeferred); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetDisplayFeatureConfig // //! \fn NvAPI_GetDisplayFeatureConfig(NvDisplayHandle hNvDisplay, NV_DISPLAY_FEATURE* pFeature) //! DESCRIPTION: This function returns the current display feature configuration. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! #NVAPI_DEFAULT_HANDLE is not allowed, it must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [in,out] feature Pointer to NV_DISPLAY_FEATURE structure to retrieve the current feature configuration. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. // /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol //! Used in NvAPI_GetDisplayFeatureConfig() and NvAPI_SetDisplayFeatureConfig(). typedef struct _NV_DISPLAY_FEATURE { NvU32 enableScalerUnderscan : 1; //!< Enable/disable HDTV scaler-based resizing. NvU32 enableCEoverHDMI : 1; //!< Enable/disable the feature to force CE timings over HDMI. //!< If this feature is enabled, then CE timings will only be used for HDMI displays. NvU32 reservedOEM : 1; //!< Reserved bit for OEM configuration NvU32 isDriverCtrlCEoverHDMI : 1; //!< if == 1, the feature "Force CE timing over HDMI" is dynamically controlled by the driver so //!< it's selectively enabled/disabled based on internal driver policy. //!< if == 0, this feature is statically controlled by the application. NvU32 isSGMClockLockSet : 1; //!< SGM Clock lock value needs to be set. NvU32 enableSGMClockLock : 1; //!< SGM Clock lock to be enabled(0) or disabled (1). NvU32 isConsistentPerformanceSet : 1; //!< Consistent Performance value needs to be set. NvU32 enableConsistentPerformance : 1; //!< Consistent Performance to be enabled(0) or disabled (1) NvU32 reserved : 24; } NV_DISPLAY_FEATURE; //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_GetDisplayFeatureConfig(NvDisplayHandle hNvDisplay, NV_DISPLAY_FEATURE* pFeature); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SetDisplayFeatureConfig // //! DESCRIPTION: This sets the display feature configuration. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay NVIDIA Display selection. This can be null when setting SGMClockLock or ConsistentPerformance. //! If SGMClockLock or ConsistentPerformance is set then other feature settings cannot be set. //! #NVAPI_DEFAULT_HANDLE is not allowed, it must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [in,out] feature Copy of NV_DISPLAY_FEATURE structure to set up the new feature configuration //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetDisplayFeatureConfig(NvDisplayHandle hNvDisplay, NV_DISPLAY_FEATURE feature); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetDisplayFeatureConfigDefaults // //! DESCRIPTION: This function returns the default display feature configuration. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \param [in] hNvDisplay NVIDIA display selection. \n //! #NVAPI_DEFAULT_HANDLE is not allowed, it must be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). //! \param [in,out] feature A copy of the NV_DISPLAY_FEATURE structure to set up the default feature configuration //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetDisplayFeatureConfigDefaults(NvDisplayHandle hNvDisplay, NV_DISPLAY_FEATURE* pFeature); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetView // //! This API lets caller retrieve the target display arrangement for selected source display handle. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs will be returned as STANDARD VIEW. //! Use NvAPI_SYS_GetDisplayTopologies() to query views across GPUs. //! //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from //! NvAPI_EnumNVidiaDisplayHandle(). //! \param [out] pTargets User allocated storage to retrieve an array of NV_VIEW_TARGET_INFO. Can be NULL to retrieve //! the targetCount. //! \param [in,out] targetMaskCount Count of target device mask specified in pTargetMask. //! \param [out] targetView Target view selected from NV_TARGET_VIEW_MODE. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.") NVAPI_INTERFACE NvAPI_GetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargets, NvU32 *pTargetMaskCount, NV_TARGET_VIEW_MODE *pTargetView); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetViewEx // //! DESCRIPTION: This API lets caller retrieve the target display arrangement for selected source display handle. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs will be returned as STANDARD VIEW. //! Use NvAPI_SYS_GetDisplayTopologies() to query views across GPUs. //! //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with //! NvAPI_EnumNVidiaDisplayHandle(). //! \param [in,out] pPathInfo Count field should be set to NVAPI_MAX_DISPLAY_PATH. Can be NULL to retrieve just the pathCount. //! \param [in,out] pPathCount Number of elements in array pPathInfo->path. //! \param [out] pTargetViewMode Display view selected from NV_TARGET_VIEW_MODE. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_API_NOT_INTIALIZED NVAPI not initialized //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.") NVAPI_INTERFACE NvAPI_GetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NvU32 *pPathCount, NV_TARGET_VIEW_MODE *pTargetViewMode); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetSupportedViews // //! This API lets caller enumerate all the supported NVIDIA display views - nView and Dualview modes. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 85 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from //! NvAPI_EnumNVidiaDisplayHandle(). //! \param [out] pTargetViews Array of supported views. Can be NULL to retrieve the pViewCount first. //! \param [in,out] pViewCount Count of supported views. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetSupportedViews(NvDisplayHandle hNvDisplay, NV_TARGET_VIEW_MODE *pTargetViews, NvU32 *pViewCount); //! \ingroup dispcontrol //! See _NV_DPCD_PARAMS. #define NVAPI_DPCD_MAX_DATA_SIZE 16 //! \ingroup dispcontrol //! Used in _NV_DPCD_PARAMS. typedef enum _NV_DPCD_CMD { NV_DP_AUXCH_CMD_REQ_TYPE_WRITE = 0, //!< DisplayPort Aux Channel write NV_DP_AUXCH_CMD_REQ_TYPE_READ, //!< DisplayPort Aux Channel read NV_DP_AUXCH_CMD_REQ_TYPE_I2C_WRITE, //!< I2C write request NV_DP_AUXCH_CMD_REQ_TYPE_I2C_READ, //!< I2C read request NV_DP_AUXCH_CMD_REQ_TYPE_I2C_WRITE_STATUS, //!< I2C write status request NV_DP_AUXCH_CMD_REQ_TYPE_MOT_I2C_WRITE, //!< I2C write request in the middle of the transaction NV_DP_AUXCH_CMD_REQ_TYPE_MOT_I2C_READ //!< I2C read request in the middle of the transaction } NV_DPCD_CMD; //! \ingroup dispcontrol //! Used in _NV_DPCD_PARAMS. typedef enum _NV_DPCD_REPLY_TYPE { NV_DP_AUXCH_REPLYTYPE_ACK = 0, //!< For write: transaction completed and all data bytes are written. //!< For read: ACK indicates it is ready for another read request. NV_DP_AUXCH_REPLYTYPE_NACK = 1, //!< Deprecated if displayId is sent as input to API in pDpcdParams->displayId field. //!< In that case specific NACK reasons will be sent to the client. //!< For write: the first return size bytes have been written. //!< For read: there is no requested data for the read request transaction. NV_DP_AUXCH_REPLYTYPE_NACK_WRITE_FAILURE = 1, //!< Insufficient buffer space to store message transaction. NV_DP_AUXCH_REPLYTYPE_NACK_INVALID_RAD = 2, //!< Invalid address including link count. NV_DP_AUXCH_REPLYTYPE_NACK_CRC_FAILURE = 3, //!< Message Transaction CRC failure NV_DP_AUXCH_REPLYTYPE_NACK_BAD_PARAM = 4, //!< Invalid request parameter. NV_DP_AUXCH_REPLYTYPE_DEFER = 5, //!< Not ready for the write/read request and client should retry later. NV_DP_AUXCH_REPLYTYPE_NACK_LINK_FAILURE = 6, //!< Link failure. NV_DP_AUXCH_REPLYTYPE_NACK_NO_RESOURCES = 7, //!< Insufficient resources. NV_DP_AUXCH_REPLYTYPE_NACK_DPCD_FAIL = 8, //!< DPCD access failure. NV_DP_AUXCH_REPLYTYPE_NACK_I2C_FAIL = 9, //!< I2C NACK received. NV_DP_AUXCH_REPLYTYPE_NACK_ALLOCATE_FAIL = 10, //!< Allocate request failed. NV_DP_AUXCH_REPLYTYPE_TIMEOUT = 0x100, //!< The receiver did not respond within the time-out period defined in the DisplayPort 1.1a specification. NV_DP_AUXCH_REPLYTYPE_INVALID_ARGUMENT = 0xFFFFFFFF //!<.Invalid size and type is passed for aux transaction. } NV_DPCD_REPLY_TYPE; //! \ingroup dispcontrol //! Used in NvAPI_Disp_DpAuxChannelControl(). typedef struct _NV_DPCD_PARAMS_V1 { NvU32 version; //!< Structure version NvU32 displayId; //!< NvAPI displayId of the DisplayPort NV_DPCD_CMD cmd; //!< See ::_NV_DPCD_CMD NvU32 addr; //!< The address of the I2C slave. The address should be shifted left by one. For //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored //!< here as 0xA0. This matches the position within the byte sent by the master, as //!< the last bit is reserved to specify the read or write direction. NvU8 data[NVAPI_DPCD_MAX_DATA_SIZE]; //!< Data for the read/write command NvU32 size; //!< Number of bytes to read/write. The input size value should be indexed from 0. Returns //! the total number of data bytes successfully read/written, indexed from 1. NV_DPCD_REPLY_TYPE replyType; //!< See ::_NV_DPCD_REPLY_TYPE } NV_DPCD_PARAMS_V1; //! \ingroup dispcontrol //! Used in NvAPI_Disp_DpAuxChannelControl(). typedef struct _NV_DPCD_PARAMS_V2 { NvU32 version; //!< Structure version NvU32 displayId; //!< IN - NvAPI displayId of the DisplayPort NV_DPCD_CMD cmd; //!< IN - See ::_NV_DPCD_CMD NvU32 addr; //!< The address of the I2C slave. The address should be shifted left by one. For //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored //!< here as 0xA0. This matches the position within the byte sent by the master, as //!< the last bit is reserved to specify the read or write direction. NvU8 data[NVAPI_DPCD_MAX_DATA_SIZE]; //!< IN/OUT - Data for the read/write command NvU32 size; //!< IN/OUT - Number of bytes to read/write. The input size value should be indexed from 0. Returns //! the total number of data bytes successfully read/written, indexed from 1. NV_DPCD_REPLY_TYPE replyType; //!< OUT - See ::_NV_DPCD_REPLY_TYPE NV_DP_ADDRESS auxAddress; //!< IN - The AUX address that is associated with the device in a multi stream topology //!< When this is set, the above displayId should be set to the root connector on which //!< the multi stream topology is hosted. When the displayId of a sink device is set in //!< the above field, this auxAddress input will be ignored } NV_DPCD_PARAMS_V2; //! \ingroup dispcontrol //! Used in NvAPI_Disp_DpAuxChannelControl(). typedef struct _NV_DPCD_PARAMS_V3 { NvU32 version; //!< Structure version NvU32 displayId; //!< IN - NvAPI displayId of the DisplayPort NV_DPCD_CMD cmd; //!< IN - See ::_NV_DPCD_CMD NvU32 addr; //!< The address of the I2C slave. The address should be shifted left by one. For //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored //!< here as 0xA0. This matches the position within the byte sent by the master, as //!< the last bit is reserved to specify the read or write direction. NvU8 data[NVAPI_DPCD_MAX_DATA_SIZE]; //!< IN/OUT - Data for the read/write command NvU32 size; //!< IN/OUT - Number of bytes to read/write. The input size value should be indexed from 0. Returns //! the total number of data bytes successfully read/written, indexed from 1. NV_DPCD_REPLY_TYPE replyType; //!< OUT - See ::_NV_DPCD_REPLY_TYPE NV_DP_ADDRESS auxAddress; //!< IN - The AUX address that is associated with the device in a multi stream topology //!< When this is set, the above displayId should be set to the root connector on which //!< the multi stream topology is hosted. When the displayId of a sink device is set in //!< the above field, this auxAddress input will be ignored NV_POSITION tilePosition; //!< IN - Specifies the position in row(x),column(y) for individual tiles of a tiled display represented by the above displayId. //!< E.g. for a non-tiled display set x=0,y=0; for a 2-tiled display(left-right tile configuration) set x=0,y=0 for the left tile & x=0,y=1 for the right tile. } NV_DPCD_PARAMS_V3; //! \ingroup dispcontrol //! Macro for constructing the version field of _NV_DPCD_PARAMS #define NV_DPCD_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_DPCD_PARAMS_V1, 1) #define NV_DPCD_PARAMS_VER2 MAKE_NVAPI_VERSION(NV_DPCD_PARAMS_V2, 2) #define NV_DPCD_PARAMS_VER3 MAKE_NVAPI_VERSION(NV_DPCD_PARAMS_V3, 3) #define NV_DPCD_PARAMS_VER NV_DPCD_PARAMS_VER3 typedef NV_DPCD_PARAMS_V3 NV_DPCD_PARAMS; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Disp_DpAuxChannelControl // //! DESCRIPTION: This API read/writes to the DisplayPort Aux Channel //! The DisplayPort display needs to be active for this NvAPI call. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] hNvDisplay Display handle associated with the attached DisplayPort monitor //! \param [in,out] pDpcdParams Pointer to _NV_DPCD_PARAMS structure for input/output parameters //! \param [in] reserved Reserved for future use. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Disp_DpAuxChannelControl(__in NvDisplayHandle hNvDisplay, __inout NV_DPCD_PARAMS *pDpcdParams, __in NvU32 reserved); //! \ingroup dispcontrol #define NV_DP_MAX_LANES 4 typedef enum { NV_DP_PREEMPHASIS_LEVEL_NONE, //!< No-preemphasis for this lane. NV_DP_PREEMPHASIS_LEVEL_1, //!< Preemphasis set to 3.5 dB. NV_DP_PREEMPHASIS_LEVEL_2, //!< Preemphasis set to 6.0 dB. NV_DP_PREEMPHASIS_LEVEL_3, //!< Preemphasis set to 9.5 dB. NV_DP_PREEMPHASIS_LEVEL_UNDEFINED = 0xFF //!< Undefined Preemphasis value. } NV_DP_PREEMPHASIS_LEVEL; //! \ingroup dispcontrol typedef enum { NV_DP_DRIVE_CURRENT_LEVEL_0, //!< Drive current level set to 8 mA NV_DP_DRIVE_CURRENT_LEVEL_1, //!< Drive current level set to 12 mA NV_DP_DRIVE_CURRENT_LEVEL_2, //!< Drive current level set to 16 mA NV_DP_DRIVE_CURRENT_LEVEL_3, //!< Drive current level set to 24 mA NV_DP_DRIVE_CURRENT_LEVEL_UNDEFINED = 0xFF //!< Undefined Drive current level } NV_DP_DRIVE_CURRENT_LEVEL; typedef enum _NV_DP_VOLTAGE_SWING_LEVEL { NV_DP_VOLTAGE_SWING_LEVEL_0, //!< Voltage swing level set to 400 mV NV_DP_VOLTAGE_SWING_LEVEL_1, //!< Voltage swing level set to 600 mV NV_DP_VOLTAGE_SWING_LEVEL_2, //!< Voltage swing level set to 800 mV NV_DP_VOLTAGE_SWING_LEVEL_3, //!< Voltage swing level set to 1200 mV NV_DP_VOLTAGE_SWING_LEVEL_UNDEFINED = 0xFF //!< Undefined Voltage swing level } NV_DP_VOLTAGE_SWING_LEVEL; //! \ingroup dispcontrol typedef struct _NV_DP_LANE_DATA { NV_DP_PREEMPHASIS_LEVEL preEmphasisLevel; union { NV_DP_DRIVE_CURRENT_LEVEL driveCurrent; //!< deprecated, Do not use this enum value. //!< Also note that there is a 1-1 mapping between driveCurrent and voltageSwing levels. NV_DP_VOLTAGE_SWING_LEVEL voltageSwingLevel; //!< voltage swing levels - Refer enum NV_DP_VOLTAGE_SWING_LEVEL for possible values. }; } NV_DP_LANE_DATA; //! \ingroup dispcontrol typedef struct _NV_DP_LANE_CONFIG { NvU32 version; //!< structure version NvU32 rootDisplayId; //!< displayID of the root DP connector (IN) NvU32 numLanes; //!< Number of DP lanes. NV_DP_LANE_DATA data[NV_DP_MAX_LANES]; //!< Lane data i.e. preemphasis & drive current. } NV_DP_LANE_CONFIG_V1; #define NV_DP_LANE_CONFIG_VER1 MAKE_NVAPI_VERSION(NV_DP_LANE_CONFIG_V1,1) #define NV_DP_LANE_CONFIG_VER NV_DP_LANE_CONFIG_VER1 typedef NV_DP_LANE_CONFIG_V1 NV_DP_LANE_CONFIG; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Disp_DP_GetLaneConfig // //! DESCRIPTION: This API gets the Pre-Emphasis/DriveCurrent Level for //! each lane on the DisplayPort. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [inout] pDpLaneConfig Pointer to NV_DP_LANE_CONFIG structure //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Disp_DP_GetLaneConfig(__inout NV_DP_LANE_CONFIG *pDpLaneConfig); //! \ingroup hybridapi //! Used in NvAPI_SetHybridMode(), NvAPI_GetHybridMode(), and NvAPI_SetHybridModeEx(). typedef enum _NV_HYBRID_MODE { NV_HYBRID_MODE_IGPU = 0x00, //!< Integrated GPU NV_HYBRID_MODE_DGPU = 0x01, //!< Discrete GPU NV_HYBRID_MODE_MULTI_ADAPTER = 0x02, //!< Multiple adapters NV_HYBRID_MODE_INVALID = 0x03, //!< Invalid mode NV_HYBRID_MODE_DGPU_WARMUP = 0x04, NV_HYBRID_MODE_DGPU_DEEP_IDLE = 0x05, NV_HYBRID_MODE_INSTALL = 0x06, NV_HYBRID_MODE_ADAPTIVE = 0x07, //!< This mode is only applicable for GetSwitchSettings. } NV_HYBRID_MODE; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SetHybridMode // //! \fn NvAPI_SetHybridMode(NV_HYBRID_MODE mode) //! DESCRIPTION: This API sets Hybrid mode. Supported on Vista and higher. //! Applications calling this API are required to run in elevated mode. //! This API can be called from a system service to derive the elevated context of the System service. //! \note Non-migratable applications that are running can prevent a successful transition. //! To query non-migratable applications use NvAPI_QueryNonMigratableApps(). //! //! //! \deprecated Do not use this function - it is deprecated in release 445. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 173 //! //! \param [in] mode hybrid mode; see ::NV_HYBRID_MODE //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter // /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 445.") NVAPI_INTERFACE NvAPI_SetHybridMode(NV_HYBRID_MODE mode); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetHybridMode // //! DESCRIPTION: This function gets the current Hybrid mode. Supported on Vista and higher. //! //! \deprecated Do not use this function - it is deprecated in release 445. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 173 //! //! \param [out] pMode hybrid mode; see ::NV_HYBRID_MODE //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Miscellaneous error occurred //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter //! //! \ingroup hybridapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 445.") NVAPI_INTERFACE NvAPI_GetHybridMode(NV_HYBRID_MODE *pMode); //! \ingroup hybridapi //! Reference: Hybrid Spec 3.0 DSM Function HYBRIDCAPS bit 28:27 typedef enum _NV_HYBRID_SWITCH_METHOD { NV_HYBRID_SWITCH_METHOD_NONE = 0x00, //!< None of physical selector available //!< (no hotkey, no physical button/switch, etc.) NV_HYBRID_SWITCH_METHOD_UNKNOWN = 0x01, //!< Uses unspecified means to pass required state via //!< POLICYSELECT, or other API NV_HYBRID_SWITCH_METHOD_HOTKEY = 0x02, NV_HYBRID_SWITCH_METHOD_PHYSICAL_SWITCH = 0x03, } NV_HYBRID_SWITCH_METHOD; //! \ingroup hybridapi typedef struct { NV_HYBRID_SWITCH_METHOD method; NvU32 numberOfWays; } NV_HYBRID_TRANSITION_METHOD; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Coproc_GetCoprocStatus // //! \fn NvAPI_Coproc_GetCoprocStatus(NvU32 *pCoprocStatus, NV_COPROC_STATE* pCoprocState) //! DESCRIPTION: This API queries the the coproc status and state. //! Supported on Vista and higher. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in,out] pCoprocStatus The coproc status //! \param [in,out] pCoprocState The coproc state //! //! \retval ::NVAPI_OK Completed request //! \retval ::NVAPI_NOT_SUPPORTED This feature is not supported on Windows XP //! \retval ::NVAPI_API_NOT_INTIALIZED You must call NvAPI_Initialize first //! \retval ::NVAPI_ERROR Miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameter /////////////////////////////////////////////////////////////////////////////// //! \ingroup coprocapi //! Used in NvAPI_Coproc_GetCoprocStatus(). typedef enum _NV_COPROC_STATUS { NV_COPROC_STATUS_OK = 0x00000000, NV_COPROC_STATUS_CHIPSET_NOT_SUPPORTED = 0x00000001, NV_COPROC_STATUS_MGPU_NOT_SUPPORTED = 0x00000002, NV_COPROC_STATUS_DGPU_NOT_SUPPORTED = 0x00000004, NV_COPROC_STATUS_INVALID_GPU_COUNT = 0x00000008, NV_COPROC_STATUS_DISABLED_BY_REG_KEY = 0x00000010, NV_COPROC_STATUS_DGPU_POSTING_DEVICE = 0x00000020, NV_COPROC_STATUS_DISABLED_BY_HYBRID = 0x00000040, NV_COPROC_STATUS_OS_NOT_SUPPORTED = 0x00000080, NV_COPROC_STATUS_SBIOS_NOT_CONFIGURED = 0x00000100, NV_COPROC_STATUS_DGPU_NOT_SUPPORTED_BY_MSHYBRID = 0x00000200, NV_COPROC_STATUS_TRANSCODE_ONLY_NOT_SUPPORTED = 0x00000400, NV_COPROC_STATUS_XGPU_NOT_SUPPORTED = 0x00000800, NV_COPROC_STATUS_DISABLED_NOT_SUPPORTED_IGPU_DRIVER_MODEL = 0x00001000, NV_COPROC_STATUS_UNKNOWN = 0xFFFFFFFF, } NV_COPROC_STATUS; typedef enum _NV_COPROC_PROBLEM_TYPE { NV_COPROC_PROBLEM_MISC = 0x00000001, NV_COPROC_PROBLEM_DISABLED = 0x00000002, NV_COPROC_PROBLEM_DDI_ACQUIRE = 0x00000004, NV_COPROC_PROBLEM_BUS_SCAN = 0x00000008, NV_COPROC_PROBLEM_POWER_EVENT = 0x00000010, NV_COPROC_PROBLEM_PS_RULE = 0x00000020, NV_COPROC_PROBLEM_ACPI = 0x00000040, NV_COPROC_PROBLEM_DEVICE = 0x00000080, NV_COPROC_PROBLEM_OUTSTANDING_LOCK = 0x00000100, NV_COPROC_PROBLEM_CPUVISIBLE_SURFACE = 0x00000200, NV_COPROC_PROBLEM_SRLESS_MONITOR = 0x00000400, NV_COPROC_PROBLEM_AUDIO_MONITOR = 0x00000800, NV_COPROC_PROBLEM_FLIP = 0x00001000, NV_COPROC_PROBLEM_CMD_BUF = 0x00002000, NV_COPROC_PROBLEM_DEFERRED_WORK = 0x00004000, NV_COPROC_PROBLEM_SR_INACTIVE = 0x00008000, NV_COPROC_PROBLEM_REF_RM = 0x00010000, NV_COPROC_PROBLEM_REF_MSHYBRID = 0x00020000, } NV_COPROC_PROBLEM_TYPE; //! \ingroup coprocapi //! Used in NvAPI_Coproc_GetCoprocStatus(). typedef enum _NV_COPROC_STATE { NV_COPROC_STATE_DGPU_GOLD = 0x00000000, NV_COPROC_STATE_DGPU_ON = 0x00000001, NV_COPROC_STATE_DGPU_GC6 = 0x00000002, } NV_COPROC_STATE; //! \ingroup coprocapi //! Used in NvAPI_Coproc_GetCoprocStatus(). typedef enum _NV_COPROC_GC6_TYPE { NV_COPROC_GC6_TYPE_NONE = 0x00000000, NV_COPROC_GC6_TYPE_NVPM = 0x00000001, NV_COPROC_GC6_TYPE_OSPM = 0x00000002, NV_COPROC_GC6_TYPE_FAST = 0x00000003, // Fast GC6 has been deprecated NV_COPROC_GC6_TYPE_INCREMENTAL = 0x00000004, // Fast GC6 has been deprecated } NV_COPROC_GC6_TYPE; //! \ingroup coprocapi //! Used in NvAPI_Coproc_GetCoprocInfo(). //! JT flags represent the JT GPU capabilities. typedef enum _NV_JT_FLAGS { NV_JT_FLAGS_NONE = 0x00000000, NV_JT_FLAGS_GC6_ENABLED = 0x00000001, NV_JT_FLAGS_SUPPORTS_GC6_TDR = 0x00000002, } NV_JT_FLAGS; //! \ingroup coprocapi NVAPI_INTERFACE NvAPI_Coproc_GetCoprocStatus(NvU32 *pCoprocStatus, NV_COPROC_STATE* pCoprocState); //! \ingroup coprocapi //! @{ /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Coproc_GetCoprocStatusEx // //! \fn NvAPI_Coproc_GetCoprocStatusEx(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NvU32 *pCoprocStatus, __inout NV_COPROC_STATE* pCoprocState) //! DESCRIPTION: This API queries the coproc status and state. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 367 //! //! \param [in] hPhysicalGpu Physical Gpu Handle //! \param [in,out] pCoprocStatus The coproc status //! \param [in,out] pCoprocState The coproc state //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \ingroup coprocapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Coproc_GetCoprocStatusEx(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NvU32 *pCoprocStatus, __inout NV_COPROC_STATE* pCoprocState); //! @} //! \ingroup coprocapi typedef struct _NV_COPROC_FLAGS_EX_V1 { NvU32 version; NvU32 is_IGPU_MODE_ONLY : 1; //!< Indicates if the IGPU_MODE_ONLY flag is set or needs to be set NvU32 is_DGPU_MODE_ONLY : 1; //!< Indicates if the DGPU_MODE_ONLY flag is set or needs to be set NvU32 reserved : 30; //!< Should be set to ZERO } NV_COPROC_FLAGS_EX_V1; typedef struct _NV_COPROC_FLAGS_EX_V2 { NvU32 version; //!< [in] Version of the structure. NvU32 is_IGPU_MODE_ONLY : 1; //!< [in] Indicates if the IGPU_MODE_ONLY flag is set or needs to be set NvU32 is_DGPU_MODE_ONLY : 1; //!< [in] Indicates if the DGPU_MODE_ONLY flag is set or needs to be set NvU32 reserved : 30; //!< [in] Should be set to ZERO NvPhysicalGpuHandle hPhysicalGpu; //!< [in] Physical GPU handle. } NV_COPROC_FLAGS_EX_V2; //! \ingroup coprocapi #define NV_COPROC_FLAGS_EX_VER1 MAKE_NVAPI_VERSION(NV_COPROC_FLAGS_EX_V1, 1) #define NV_COPROC_FLAGS_EX_VER2 MAKE_NVAPI_VERSION(NV_COPROC_FLAGS_EX_V2, 2) #define NV_COPROC_FLAGS_EX_VER NV_COPROC_FLAGS_EX_VER2 typedef NV_COPROC_FLAGS_EX_V2 NV_COPROC_FLAGS_EX; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Coproc_SetCoprocInfoFlagsEx // //! DESCRIPTION: This API sets the coproc info flags. //! //! \param [in] coprocInfoExFlags pointer to the NV_COPROC_FLAGS_EX indicating the mask to be set //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_ERROR miscellaneous error occurred //! \retval ::NVAPI_INVALID_POINTER null input parameter //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION //! //! \ingroup coprocapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Coproc_SetCoprocInfoFlagsEx(NV_COPROC_FLAGS_EX* coprocInfoExFlags); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Coproc_GetCoprocInfoFlagsEx // //! DESCRIPTION: This API gets the coproc info flags. //! //! \param [out] coprocInfoExFlags pointer to the NV_COPROC_FLAGS_EX indicating the mask to get //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_ERROR miscellaneous error occurred //! \retval ::NVAPI_INVALID_POINTER null input parameter //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION //! //! \ingroup coprocapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Coproc_GetCoprocInfoFlagsEx(NV_COPROC_FLAGS_EX* coprocInfoExFlags); //! \ingroup coprocapi typedef enum _NVAPI_COPROC_OVERRIDE_OPTION { NVAPI_COPROC_OVERRIDE_OPTION_SET = 0, NVAPI_COPROC_OVERRIDE_OPTION_RESET = 1 } NVAPI_COPROC_OVERRIDE_OPTION; //! \ingroup coprocapi typedef struct _NV_COPROC_OVERRIDE_INFO_FLAGS { NvU32 version; NVAPI_COPROC_OVERRIDE_OPTION coprocOverrideOption; //!< Indicates option to set or reset the required flag NvU32 is_STOP_WHITELISTING_APP_FOR_DGPU : 1; //!< Indicates if the Stop Whitelisting coproc flag is to be overridden NvU32 reserved : 31; //!< Should be set to ZERO } NV_COPROC_OVERRIDE_INFO_FLAGS_V1; //! \ingroup coprocapi typedef NV_COPROC_OVERRIDE_INFO_FLAGS_V1 NV_COPROC_OVERRIDE_INFO_FLAGS; #define NV_COPROC_OVERRIDE_INFO_FLAGS_VER1 MAKE_NVAPI_VERSION(NV_COPROC_OVERRIDE_INFO_FLAGS_V1, 1) #define NV_COPROC_OVERRIDE_INFO_FLAGS_VER NV_COPROC_OVERRIDE_INFO_FLAGS_VER1 /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Coproc_OverrideCoprocInfoFlags // //! DESCRIPTION: This API sets or resets the coproc info flag. And these //! flags will not be changed by internal hardware settings. //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] coprocOverrideInfoFlags pointer to the NV_COPROC_OVERRIDE_INFO_FLAGS \n //! indicating the flags to be set or reset //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup coprocapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Coproc_OverrideCoprocInfoFlags(NV_COPROC_OVERRIDE_INFO_FLAGS* coprocOverrideInfoFlags); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Coproc_NotifyCoprocPowerState // //! \fn NvAPI_Coproc_NotifyCoprocPowerState(NvU32 IsSafetoPowerOff, NvU64 SequenceNumber, NvU32 *pStatus) //! //! DESCRIPTION: This API tells driver that now it is safe to power off dGPU since No running Application is using the coproc. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! PARAMETERS: IsSafetoPowerOff (IN) - decides if it is safe to power off the dGPU. TRUE to turn off dGPU. //! SequenceNumber (IN) - In response to event with matching sequence number //! pStatus(OUT) - returns the status if powering off dGPU has started. //! //! RETURN STATUS: //! NVAPI_OK - completed request //! NVAPI_ERROR - miscellaneous error occurred //! NVAPI_INVALID_ARGUMENT - Invalid input parameter // /////////////////////////////////////////////////////////////////////////////// //! \ingroup coprocapi typedef enum { NV_COPROC_POWER_OFF_MODE_UNSAFE = 0, NV_COPROC_POWER_OFF_MODE_GPU_OFF = 1, NV_COPROC_POWER_OFF_MODE_HDA_REMOVE = 0xff10, } NV_COPROC_POWER_OFF_MODE; //! \ingroup coprocapi NVAPI_INTERFACE NvAPI_Coproc_NotifyCoprocPowerState(NvU32 IsSafetoPowerOff, NvU64 SequenceNumber, NvU32 *pStatus); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_Coproc_GetApplicationCoprocInfo // //! \fn NvAPI_Coproc_GetApplicationCoprocInfo(NV_COPROC_APP_INFO *pCoprocAppInfo) //! DESCRIPTION: This API queries the the coproc status for the application //! running in the current process. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pCoprocAppInfo The coproc application info structure //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_ERROR - miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT - Invalid input parameter //! \retval ::NVAPI_NOT_SUPPORTED - function is not supported in this platform //! \retval ::NVAPI_API_NOT_INTIALIZED //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION // /////////////////////////////////////////////////////////////////////////////// //! \ingroup coprocapi //! Used in NvAPI_Coproc_GetApplicationCoprocInfo(). typedef struct { NvU32 version; //!< the structure version NvU32 appStatus; //!< the application status } NV_COPROC_APP_INFO; //! \ingroup coprocapi //! Macro for onstructing the version field of NV_COPROC_APP_INFO #define NV_COPROC_APP_INFO_VER MAKE_NVAPI_VERSION(NV_COPROC_APP_INFO, 1) //! \ingroup coprocapi //! See .NV_COPROC_APP_INFO typedef enum { NV_COPROC_APP_STATUS_ENABLED = 0x00000000, //!< coproc mode has been enabled NV_COPROC_APP_STATUS_DISABLED = 0x00000001, //!< copro mode has been disabled. } NV_COPROC_APP_STATUS; //! \ingroup coprocapi NVAPI_INTERFACE NvAPI_Coproc_GetApplicationCoprocInfo(NV_COPROC_APP_INFO *pCoprocAppInfo); //! \ingroup hybridapi typedef struct { NvU32 version; //!< Structure version NvAPI_LongString appName; NvAPI_LongString friendlyName; }NV_HYBRID_APP_INFO; //! \ingroup hybridapi //! Macro for constructing the version field of NV_HYBRID_APP_INFO #define NV_HYBRID_APP_INFO_VER MAKE_NVAPI_VERSION(NV_HYBRID_APP_INFO,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Hybrid_QueryUnblockedNonMigratableApps // //! DESCRIPTION: This API queries the user white-list applications for Hybrid transition. //! //! //! \deprecated Do not use this function - it is deprecated in release 445. //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in,out] apps Empty structure passed as an input and upon successfull exit, it contains list of Unblocked(user white-list) applications. //! \param [in,out] total Total number of applications returned from the white list. //! //! \retval ::NVAPI_OK completed request. //! \retval ::NVAPI_ERROR miscellaneous error occurred. //! \retval ::NVAPI_INVALID_ARGUMENT invalid input parameter. //! \retval ::NVAPI_NO_IMPLEMENTATION not implemented. //! //! \ingroup hybridapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 445.") NVAPI_INTERFACE NvAPI_Hybrid_QueryUnblockedNonMigratableApps(NV_HYBRID_APP_INFO apps[NVAPI_MAX_3D_Apps] , NvU32 *total); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Hybrid_QueryBlockedMigratableApps // //! DESCRIPTION: This API queries the user black-list applications for Hybrid transition. //! //! //! \deprecated Do not use this function - it is deprecated in release 445. //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in,out] apps Empty structure passed as an input and upon successfull exit, it contains list of Unblocked(user black-list) applications.. //! \param [in,out] total Total number of applications returned from the black list. //! //! \retval ::NVAPI_OK completed request. //! \retval ::NVAPI_ERROR miscellaneous error occurred. //! \retval ::NVAPI_INVALID_ARGUMENT invalid input parameter. //! \retval ::NVAPI_NO_IMPLEMENTATION not implemented. //! //! \ingroup hybridapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 445.") NVAPI_INTERFACE NvAPI_Hybrid_QueryBlockedMigratableApps(NV_HYBRID_APP_INFO apps[NVAPI_MAX_3D_Apps] , NvU32 *total); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Hybrid_SetAppMigrationState // //! DESCRIPTION: This API overrides the pre-determined application migration state. //! //! \deprecated Do not use this function - it is deprecated in release 445. //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] app Application executable name that is to be blocked, unblocked, reset or removed //! \param [in] flag Decides on the block, unblock, reset or remove operation. \n //! block =0, unblock =1, reset =2, remove =3 //! //! \retval ::NVAPI_OK completed request. //! \retval ::NVAPI_ERROR miscellaneous error occurred. //! \retval ::NVAPI_INVALID_ARGUMENT invalid input parameter. //! \retval ::NVAPI_SET_NOT_ALLOWED the application list override is not allowed. //! \retval ::NVAPI_NO_IMPLEMENTATION not implemented. //! //! \ingroup hybridapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 445.") NVAPI_INTERFACE NvAPI_Hybrid_SetAppMigrationState(NV_HYBRID_APP_INFO app , NvU32 flag); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Hybrid_IsAppMigrationStateChangeable // //! DESCRIPTION: This API queries if an application's migration state can be changed by the user. //! //! \deprecated Do not use this function - it is deprecated in release 445. //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] app Application executable name which user is querying about //! \param [out] allowed Change in migration state of app is allowed or not. \n //! not_allowed =0, allowed =1 //! //! \retval ::NVAPI_OK completed request. //! \retval ::NVAPI_ERROR miscellaneous error occurred. //! \retval ::NVAPI_INVALID_ARGUMENT invalid input parameter. //! //! \ingroup hybridapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 445.") NVAPI_INTERFACE NvAPI_Hybrid_IsAppMigrationStateChangeable(NV_HYBRID_APP_INFO app , NvU32 *allowed); //! \ingroup dispcontrol //! Used in NvAPI_GetScalingCaps(), which returns scaling capability information for the specified display device. typedef struct { NvU32 version; //!< Structure version NvU32 isGPUScalingAvailable : 1; //!< If the GPU scaling mode available NvU32 isGPUFixedAspectRatioScalingAvailable : 1; //!< If the GPU Fixed-Aspect ratio scaling mode available NvU32 isMonitorScalingAvailable : 1; //!< If the monitor scaling mode available NvU32 isCenterScalingAvailable : 1; //!< If center scaling mode available } NV_GET_SCALING_CAPS_V1; //! \ingroup dispcontrol typedef struct { NvU32 version; union // if Force GPU - Full Screen scaling available. { NvU32 isGPUScalingAvailable : 1; NvU32 isGPUScalingToNative : 1; }; union // if Force GPU - Aspect Ratio scaling available. { NvU32 isGPUFixedAspectRatioScalingAvailable : 1; NvU32 isGPUScalingToAspectScanoutToNative : 1; }; union // if Balanced - Full Screen scaling available. { NvU32 isMonitorScalingAvailable : 1; NvU32 isGPUScalingToClosest : 1; }; union // if Force GPU - Centered scaling available. { NvU32 isCenterScalingAvailable : 1; NvU32 isGPUScanoutToNative : 1; }; NvU32 isGPUScalingToAspectScanoutToClosest : 1; //!< if Balanced - Aspect Ratio scaling available. NvU32 isGPUScanoutToClosest : 1; //!< if Balanced - Centered scaling available. NvU32 isGpuRepeatToAspectScanoutToNative : 1; //!< if Force GPU - Integer Scaling. NvU32 reserved : 29; NV_SCALING defaultScaling; //!< Default scaling setting for the display. NV_SCALING currentScaling; //!< Currently applied scaling setting for the display. } NV_GET_SCALING_CAPS_V2; //! \ingroup dispcontrol typedef NV_GET_SCALING_CAPS_V2 NV_GET_SCALING_CAPS; //! \ingroup dispcontrol //! @{ #define NV_GET_SCALING_CAPS_VER1 MAKE_NVAPI_VERSION(NV_GET_SCALING_CAPS_V1,1) #define NV_GET_SCALING_CAPS_VER2 MAKE_NVAPI_VERSION(NV_GET_SCALING_CAPS_V2,2) #define NV_GET_SCALING_CAPS_VER NV_GET_SCALING_CAPS_VER2 //! @} /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_SetScalingCapsOverride // //! DESCRIPTION: This API lets caller set scaling override for a particular display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 440 //! //! PARAMETERS: displayId(IN) - Display ID corresponding to the connected display for which the caller wants to override scaling. //! pScalingCaps(IN) - The requested scaling capabilities the caller wishes to use instead of the true scaling capabilities. //! Due to a driver limitation, there can be only one bit set in the scaling cap override structure. //! To disable the scaling cap override feature, set pScalingCaps to the true scaling capabilities //! (from NvAPI_DISP_GetScalingCaps). //! preferredScaling(IN) - Changes the current display scaling to preferredScaling settings. This parameter is ignored if the display is inactive. //! //! RETURN STATUS: //! NVAPI_OK - Completed request. //! NVAPI_ERROR - Miscellaneous error occurred. //! NVAPI_INVALID_POINTER - Invalid pointer to NV_GET_SCALING_CAPS. //! NVAPI_ID_OUT_OF_RANGE - Incorrect display ID. //! NVAPI_INVALID_ARGUMENT - Invalid value passed for preferredScaling. //! NVAPI_NO_IMPLEMENTATION - Only supported on Windows Vista and above. //! NVAPI_API_NOT_INTIALIZED - NVAPI not initialized. //! NVAPI_INVALID_COMBINATION - Invalid combination of pScalingCaps and preferredScaling. //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - The structure version passed is invalid. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_SetScalingCapsOverride(NvU32 displayId, NV_GET_SCALING_CAPS * pScalingCaps, NV_SCALING preferredScaling); //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_GetDisplayIdByDisplayName // //! DESCRIPTION: This API retrieves the Display Id of a given display by //! display name. The display must be active to retrieve the //! displayId. In the case of clone mode or Surround gaming, //! the primary or top-left display will be returned. //! //! \param [in] displayName Name of display (Eg: "\\DISPLAY1" to //! retrieve the displayId for. //! \param [out] displayId Display ID of the requested display. //! //! 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_NO_IMPLEMENTATION: This entrypoint not available //! retval ::NVAPI_ERROR: Miscellaneous error occurred //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetDisplayIdByDisplayName(const char *displayName, NvU32* displayId); //! 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); #ifndef NV_CLUSTER_STRUCTS_DEFINED #define NV_CLUSTER_STRUCTS_DEFINED //! \addtogroup clusterapi //! @{ //! PIVOT structure that stores the configuration information of a cluster typedef struct _NV_PIVOT_V1 { NvU32 version; NV_TIMING timing; //!< The backend timing NV_DP_COLOR_FORMAT colorFormat; //!< The color format enum specifier: (RGB/YCbCr422/YCbCr444) NV_DP_BPC backendBitDepth; //!< The backend bit-per-component enum specifier: (6,8,10,12, or 16 bits per component) } NV_PIVOT_V1; typedef NV_PIVOT_V1 NV_PIVOT; #define NV_PIVOT_VER1 MAKE_NVAPI_VERSION(NV_PIVOT_V1,1) #define NV_PIVOT_VER NV_PIVOT_VER1 //! Enum values for representing the types of the cluster typedef enum _NV_CLUSTER_TYPE { NV_CLUSTER_TYPE_UNKNOWN = 0, //!< Unknown cluster type NV_CLUSTER_TYPE_DP_STREAM_CLONE = 1, //!< DisplayPort 1.2 stream cloning cluster } NV_CLUSTER_TYPE; //! Enum values for representing the states of the cluster typedef enum _NV_CLUSTER_STATE { NV_CLUSTER_STATE_UNKNOWN = 0,//!< Unknown state NV_CLUSTER_STATE_DISABLED, //!< A cluster has not been defined yet or is disabled by the user NV_CLUSTER_STATE_ENABLED, //!< Enabled. The cluster may or may not be empty. If the node count is ZERO, the cluster is in DORMANT state, else in ACTIVE state NV_CLUSTER_STATE_DELETE, //!< This flag should be used in NvAPI_GPU_SetupClusterTopology() to delete an existing cluster. } NV_CLUSTER_STATE; //! Enum values for representing the discovery mode of the cluster typedef enum _NV_CLUSTER_DISCOVERY_MODE { NV_CLUSTER_DISCOVERY_MODE_UNKNOWN = 0, //!< Unknown mode type NV_CLUSTER_DISCOVERY_MODE_MANUAL, //!< The client is responsible for adding/deleting nodes from the cluster. This mode is currently not supported yet. NV_CLUSTER_DISCOVERY_MODE_AUTO //!< The driver is responsible for adding/deleting nodes from the cluster based on its internal policy } NV_CLUSTER_DISCOVERY_MODE; #define NV_DEFAULT_CLUSTER_PRIORITY 0 //!< The driver will assign priority to a given cluster typedef struct _NV_CLUSTER_V1 { NvU32 version; NvU32 id; //!< ID that uniquely identifies a cluster. This is a read-only value and is generated by the display driver while setting up the cluster. NvU32 displayId; //!< Read only value. This field will be populated while enumerating existing clusters or during creating a new cluster. NvU32 priority; //!< Priority of the cluster, 1 being the highest possible priority. The driver will assign a default priority during //!< setting up the cluster and during creation, this needs to be initialized to NV_DEFAULT_CLUSTER_PRIORITY. NV_PIVOT pivot; //!< The pivot configuration of this cluster NV_CLUSTER_TYPE type; //!< The type of cluster (DP1.2 Stream cloning cluster, etc) NV_CLUSTER_DISCOVERY_MODE discoveryMode; //!< The nodes' discovery policy NV_CLUSTER_STATE state; //!< The current state of the cluster NvU32 numOfNodeEntries; //!< The number of nodes in the cluster union // The possible types of NODES will be part of this union. The type of nodes will be based on the value of type (NV_CLUSTER_TYPE_ENUM) { NV_DP_NODE_INFO* pDPNodeEntries; //!< The list of DP1.2 nodes in the cluster // When new cluster types are defined, corresponding node types will be added to this union }; NvU32 isCEDevice : 1; //!< If at least one of the device in the cluster is CE device, then the cluster will be marked as CE device //!< This is a read-only value and is set by DD while setting up the cluster. NvU32 isAudioCapable : 1; //!< If there exists at least one audio capable device in the cluster //!< This is a read-only value and is set by DD while setting up the cluster. NvU32 reserved : 30;//!< Should be zero } NV_CLUSTER_V1; typedef NV_CLUSTER_V1 NV_CLUSTER; #define NV_CLUSTER_VER1 MAKE_NVAPI_VERSION(NV_CLUSTER_V1,1) #define NV_CLUSTER_VER NV_CLUSTER_VER1 //! @} // This category is intentionally added before the #endif. The #ifdef should also be in the same scope #endif // NV_CLUSTER_STRUCTS_DEFINED /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_EnumClusterTopologies // //! DESCRIPTION: This API enumerates the clusters associated with a physical connector. Use this API to either enumerate all the //! possible cluster topologies on the physical connector for a given Pivot configuration or //! to enumerate all the clusters that were created/defined on the physical connector. The client //! should keep enumerating until NVAPI_END_ENUMERATION is returned. //! //! - To enumerate the possible clusters for a given configuration, set pPivot to the configuration needed. //! - To enumerate the current clusters that are defined on the connector, set pPivot to NULL. //! //! To enumerate the possible clusters for a given configuration: //! # Set the pPivot value to the desired configuration. //! # Set the following fields of the NV_CLUSTER structure : //! 1. discoveryMode to NV_CLUSTER_DISCOVERY_MODE_AUTO. //! 2. type to one of the NV_CLUSTER_TYPE enum values. //! # Starting with ZERO for thisENUM, repeatedly call NvAPI_GPU_EnumClusterTopologies in a loop, while incrementing thisENUM //! for each iteration until NVAPI_END_ENUMERATION is returned. //! # For each iteration, call NvAPI_GPU_EnumClusterTopologies twice (see the note below), first to get the cluster details including the number //! of nodes in the cluster, and then to retrieve the complete node list. //! # During the first call, set the corresponding node's pointer to NULL. If the call succeeds, //! the numOfNodeEntries value will have the node count for the cluster. //! # Allocate memory based on numOfNodeEntries and set the pointer for the nodes list and call NvAPI_GPU_EnumClusterTopologies //! again to fetch the complete node topology. //! //! To enumerate the clusters defined on a given connector: //! # Follow the same steps as above, except set pPivot to NULL. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] rootDisplayId For NV_CLUSTER_TYPE_DP_STREAM_CLONE, this is the displayId of the connector to which the topology is rooted. //! For NV_CLUSTER_TYPE_TILE, by passing any displayId of GPU, all Tile cluster of that GPU can be enumerated. //! \param [in] pPivot This is the pivot that defines the cluster parameters. If this is NULL, then this call translates into //! enumerating the existing clusters. //! \param [in] thisEnum Index of cluster whose topology is requested //! \param [in,out] pClusterTopology Pointer to a NV_CLUSTER structure //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval ::NVAPI_END_ENUMERATION - no more clusters to enumerate. //! \retval ::NVAPI_INSUFFICIENT_BUFFER - the number of nodes allocated for pClusterTopology->pDPNodeEntries is insufficient. //! The actual nodes' count is returned in pClusterTopology->numOfNodeEntries. //! //! \ingroup clusterapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_EnumClusterTopologies(__in NvU32 rootDisplayId, __in_opt NV_PIVOT* pPivot, __in NvU32 thisEnum, __inout NV_CLUSTER* pClusterTopology); //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_SetupClusterTopology // //! DESCRIPTION: This API sets up - or re-configures - a cluster on the physical connector identified by the passed in rootDisplayId. //! The pivot within the NV_CLUSTER structure holds the configuration information of the target cluster. //! A node cannot belong to more than 1 cluster at any given point of time. The pivot configuration, combined //! with the list of nodes in the cluster, uniquely describes a cluster. //! //! //! This API can be used to set up a completely new cluster and also to re-configure any existing cluster. The clusterId parameter is //! used to distinguish between both the scenarios. When this parameter is set to NULL, this API reconfigures an existing cluster, otherwise //! it sets up a new cluster. Note that, if a cluster has been created on a connector with the discovery mode set to //! NV_CLUSTER_DISCOVERY_MODE_AUTO, then no more clusters can be set up on the same connector until the auto mode cluster is torn down. //! //! ============================================================================================================ //! //! Setting up a new cluster //! //! //! \param [in] rootDisplayId This is the displayId of the physical connector on which the cluster is to be defined. //! //! The client should fill the following member variables in the NV_CLUSTER structure //! \param [in] pClusterTopology::pivot The configuration of the cluster to be set up. //! This is only used when discoveryMode = NV_CLUSTER_DISCOVERY_MODE_AUTO. //! When discoveryMode = NV_CLUSTER_DISCOVERY_MODE_MANUAL, //! the driver will decide the best pivot configuration possible //! for the given list of monitors. //! In this mode, if there is no common configuration possible, this API will fail //! with NVAPI_CLUSTER_NODES_MISMATCH error. //! //! NOTE: Currently interlaced timing is not supported and when pivot.timing.interlaced is set to '1', this API will fail with NVAPI_SET_NOT_ALLOWED. //! //! //! \param [in] pClusterTopology::type The type of cluster //! \param [in] pClusterTopology::discoveryMode The nodes' inclusion and exclusion policy. Currently only NV_CLUSTER_DISCOVERY_MODE_AUTO is supported. //! When discoveryMode = NV_CLUSTER_DISCOVERY_MODE_AUTO, the numOfNodeEntries //! should be 0 and pDPNodeEntries should be NULL. //! When discoveryMode = NV_CLUSTER_DISCOVERY_MODE_MANUAL, //! - if the numOfNodeEntries > 0, then pDPNodeEntries cannot be NULL. //! - if the numOfNodeEntries == 0, then pDPNodeEntries should be NULL. In this //! case a empty cluster will be set up and the cluster state will be set to //! NV_CLUSTER_STATE_DORMANT. //! \param [in/out] pClusterTopology::numOfNodeEntries The number of nodes in the cluster //! ([in] Valid only when discoveryMode = NV_CLUSTER_DISCOVERY_MODE_MANUAL) //! ([out] Valid only when discoveryMode = NV_CLUSTER_DISCOVERY_MODE_AUTO) //! \param [in] pClusterTopology::pDPNodeEntries The list of nodes in the cluster //! (Valid only when discoveryMode = NV_CLUSTER_DISCOVERY_MODE_MANUAL) //! //! All other variables of the NV_CLUSTER struct are ignored and should be set to ZERO. //! //! \param [out] clusterId The id of the cluster that gets created if the call is successful. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval ::NVAPI_CLUSTER_ALREADY_EXISTS - Another cluster with the same configuration or whose discovery mode is //! NV_CLUSTER_DISCOVERY_MODE_AUTO is already created on this connector. //! \retval ::NVAPI_SET_NOT_ALLOWED - The combination of the input is not allowed or is not currently supported. //! //! ====================================================================================================================== //! //! Configuring an existing cluster //! //! \param [in] rootDisplayId This is the displayId of the physical connector on which the cluster is already defined. //! //! The client should fill the following variables in the NV_CLUSTER structure: //! \param [in] NV_CLUSTER::id The id of the cluster that was generated during creation. //! \param [in] NV_CLUSTER::priority To keep the priority unchanged, set this to NV_DEFAULT_CLUSTER_PRIORITY. //! To alter the existing priority, set this to the desired value (non-zero) and if the priority //! already exists, it slides the priority down of every item = or >. //! So if you insert priority 1, it becomes the highest, and everyone else slides down the line. //! \param [in] NV_CLUSTER::discoveryMode The discovery mode of an existing cluster cannot be changed. //! The value set here will be used in tandem with the nodes' list to alter the nodes in the existing cluster. //! The only valid values in this scenario are NV_CLUSTER_DISCOVERY_MODE_UNKNOWN and NV_CLUSTER_DISCOVERY_MODE_MANUAL. //! Use NV_CLUSTER_DISCOVERY_MODE_UNKNOWN when no change is required in the nodes' list. //! Use NV_CLUSTER_DISCOVERY_MODE_MANUAL, when altering the nodes in the cluster. Note that modifying the nodes //! list is only possible when the cluster itself was created with NV_CLUSTER_DISCOVERY_MODE_MANUAL //! in the first place. //! \param [in] NV_CLUSTER::numOfNodeEntries The number of nodes in the cluster //! (Valid only when discoveryMode = NV_CLUSTER_DISCOVERY_MODE_MANUAL) //! \param [in] NV_CLUSTER::pDPNodeEntries The list of nodes in the cluster //! (Valid only when discoveryMode = NV_CLUSTER_DISCOVERY_MODE_MANUAL) //! \param [in] NV_CLUSTER::state - NV_CLUSTER_STATE_DISABLED : to disable an exisiting cluster. //! - NV_CLUSTER_STATE_ENABLED : to enable an exisiting disabled cluster. //! - NV_CLUSTER_STATE_DELETE : to delete an exisiting cluster. //! //! All other variables of the NV_CLUSTER struct are ignored and should be set to ZERO. //! //! \param [out]clusterId Not set by the callee. Clients should not use this and should be passing NULL. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup clusterapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetupClusterTopology(__in NvU32 rootDisplayId, __inout NV_CLUSTER* pClusterTopology, __out_opt NvU32* clusterId); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetDisplayConfig // //! DESCRIPTION: This API lets caller retrieve the current global display //! configuration. //! USAGE: The caller might have to call this three times to fetch all the required configuration details as follows: //! First Pass: Caller should Call NvAPI_DISP_GetDisplayConfig() with pathInfo set to NULL to fetch pathInfoCount. //! Second Pass: Allocate memory for pathInfo with respect to the number of pathInfoCount(from First Pass) to fetch //! targetInfoCount. If sourceModeInfo is needed allocate memory or it can be initialized to NULL. //! Third Pass(Optional, only required if target information is required): Allocate memory for targetInfo with respect //! to number of targetInfoCount(from Second Pass). //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in,out] pathInfoCount Number of elements in pathInfo array, returns number of valid topologies, this cannot be null. //! \param [in,out] pathInfo Array of path information //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval NVAPI_INVALID_ARGUMENT - Invalid input parameter. Following can be the reason for this return value: //! -# pathInfoCount is NULL. //! -# *pathInfoCount is 0 and pathInfo is not NULL. //! -# *pathInfoCount is not 0 and pathInfo is NULL. //! \retval NVAPI_DEVICE_BUSY - ModeSet has not yet completed. Please wait and call it again. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetDisplayConfig(__inout NvU32 *pathInfoCount, __out_ecount_full_opt(*pathInfoCount) NV_DISPLAYCONFIG_PATH_INFO *pathInfo); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_SetDisplayConfig // // //! DESCRIPTION: This API lets caller apply a global display configuration //! across multiple GPUs. //! //! If all sourceIds are zero, then NvAPI will pick up sourceId's based on the following criteria : //! - If user provides sourceModeInfo then we are trying to assign 0th sourceId always to GDIPrimary. //! This is needed since active windows always moves along with 0th sourceId. //! - For rest of the paths, we are incrementally assigning the sourceId per adapter basis. //! - If user doesn't provide sourceModeInfo then NVAPI just picks up some default sourceId's in incremental order. //! Note : NVAPI will not intelligently choose the sourceIDs for any configs that does not need a modeset. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pathInfoCount Number of supplied elements in pathInfo //! \param [in] pathInfo Array of path information //! \param [in] flags Flags for applying settings //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized //! \retval ::NVAPI_ERROR - miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT - Invalid input parameter. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_SetDisplayConfig(__in NvU32 pathInfoCount, __in_ecount(pathInfoCount) NV_DISPLAYCONFIG_PATH_INFO* pathInfo, __in NvU32 flags); typedef struct { NvU32 gvo : 1; //!< [DEPRECATED] NvU32 sdtv : 1; NvU32 lenovoSlowRefreshRate : 1; NvU32 unused2 : 1; //!< [DEPRECATED in R465] was NEC LUI (VirtualMode) NvU32 hybridList : 1; NvU32 nbsi : 1; NvU32 infStandard : 1; //!< from registry key NV_Modes NvU32 infCustom : 1; //!< from registry key NV_CustModes NvU32 hdtv : 1; //!< from registry key NV_HDTVModes NvU32 fallbackNvmode : 1; //!< from hardcoded nvmode string NvU32 fallbackHdtv : 1; //!< from hardcoded hdtv mode string NvU32 underscan : 1; NvU32 custom : 1; //!< from custom timing NvU32 osAdditionalMode : 1; //!< additional mode added by OS in win7 NvU32 nativeRotation : 1; NvU32 hSpan : 1; NvU32 vSpan : 1; NvU32 edid : 1; //!< Mode was added from EDID, but detailed origins information could not be obtained NvU32 edidNativeRefreshRate : 1; //!< Mode added because EDID indciates a native RR different than the INF mode NvU32 edidDTD : 1; //!< EDID detailed timing from base block NvU32 edidSTD : 1; //!< EDID standard timing from base block NvU32 edidEST : 1; //!< EDID established timing from base block NvU32 edidCVT : 1; //!< EDID defined CVT timing (EDID 1.4) NvU32 edid861ST : 1; //!< EDID CEA861 extension block NvU32 edidExtDTD : 1; //!< EDID detailed timing from extension block NvU32 edidExtVTB : 1; //!< EDID defined VTB extension timing NvU32 edidHdmiExt : 1; //!< EDID HDMI 4kx2k extended resolutions NvU32 reserved : 5; } NV_DISPLAY_TARGET_ORIGIN; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetTimingInfo // //! \fn NvAPI_DISP_GetTimingInfo(__in NvU32 displayID, __inout NvU32 *timingInfoCount, __out_ecount_part_opt(*timingInfoCount, *timingInfoCount) NV_BACKEND_TIMING_INFO *timingInfo) //! //! DESCRIPTION: This API lets caller retrieve backend timings supported by the display along with timing origin information. //! Currently the API returns only the timings present in EDID. //! //! USAGE: Sequence of calls which caller should make to get the timing information. //! 1. First call NVAPI_DISP_GetTimingInfo() with timingInfo as NULL to get the count of timings. //! 2. Allocate memory for timing info array. //! 3. Call NVAPI_DISP_GetTimingInfo() again with the pointer to the memory allocated to get all the timing info. //! //! Note : //! 1. timingInfoCount should never be NULL, else the API will fail with NVAPI_INVALID_ARGUMENT. //! 2. *timingInfoCount returned from the API will always be the actual count in any/every call. //! 3. Memory size to be allocated should be (*timingInfoCount * sizeof(NV_BACKEND_TIMING_INFO)). //! 4. If the memory allocated is less than what is required to return all the timings, this API will return the //! amount of timing information which can fit in user provided buffer and API will return NVAPI_INSUFFICIENT_BUFFER. //! 5. If the caller specifies a greater value for *timingInfoCount in second call to NVAPI_DISP_GetTimingInfo() than //! what was returned from first call, the API will return only the actual number of elements in the timingInfo array //! and the extra buffer will remain unused. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in,out] timingInfoCount - Always returns the actual number of timings. //! \param [in,out] timingInfo - Array of NV_BACKEND_TIMING_INFO structure which holds the timing info. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol //! Target timing related information. typedef struct { NvU32 version; NV_DISPLAY_TARGET_ORIGIN targetOrigin; NV_TIMING timingInfo; } NV_BACKEND_TIMING_INFO_V1; typedef NV_BACKEND_TIMING_INFO_V1 NV_BACKEND_TIMING_INFO; #define NV_BACKEND_TIMING_INFO_VER1 MAKE_NVAPI_VERSION(NV_BACKEND_TIMING_INFO_V1, 1) #define NV_BACKEND_TIMING_INFO_VER NV_BACKEND_TIMING_INFO_VER1 //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_DISP_GetTimingInfo(__in NvU32 displayID, __inout NvU32 *timingInfoCount, __inout_ecount_part_opt(*timingInfoCount, *timingInfoCount) NV_BACKEND_TIMING_INFO *timingInfo); //! \ingroup dispcontrol //! @{ typedef struct _NV_DISPLAY_BLANKING_INFO_V1 { NvU32 version; NvU32 blankingState : 1; //!< 1 - Set , 0 - Unset. NvU32 persistBlankingAcrossHotPlugUnplug : 1; //!< 1 - Persist, 0 - Do Not persist. NvU32 reserved : 30; }NV_DISPLAY_BLANKING_INFO_V1; typedef NV_DISPLAY_BLANKING_INFO_V1 NV_DISPLAY_BLANKING_INFO; #define NV_DISPLAY_BLANKING_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAY_BLANKING_INFO_V1, 1) #define NV_DISPLAY_BLANKING_INFO_VER NV_DISPLAY_BLANKING_INFO_VER1 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_GetDisplayBlankingState // //! DESCRIPTION: This API returns the information about the display's blanking state. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId - NVIDIA Display selection. //! \param [out] pDisplayBlankingState - Pointer to the structure containing the flags about the display's current blanking state. //! //! \retval ::NVAPI_OK - Completed request. //! \retval ::NVAPI_ERROR - Miscellaneous error occurred. //! \retval ::NVAPI_NOT_SUPPORTED - Feature not supported on GPU. Will work on Quadro's only. //! \retval ::NVAPI_ID_OUT_OF_RANGE - Incorrect display ID. //! \retval ::NVAPI_INVALID_POINTER - Invalid pointer to NV_DISPLAY_BLANKING_INFO structure. //! \retval ::NVAPI_API_NOT_INTIALIZED - NvAPI_Initialize() has not been called or was not successfull. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION - The structure version passed is invalid. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetDisplayBlankingState(NvU32 displayId, NV_DISPLAY_BLANKING_INFO *pDisplayBlankingState); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_SetDisplayBlankingState // //! DESCRIPTION: This API sets the display's blanking state information provided by the user. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId - NVIDIA Display selection. //! \param [in] pDisplayBlankingState - Pointer to the structure containing the blanking flags which the user //! wants to set on the display. //! //! \retval ::NVAPI_OK - Completed request. //! \retval ::NVAPI_ERROR - Miscellaneous error occurred. //! \retval ::NVAPI_ACCESS_DENIED - Access denied to the current caller process of this API. //! Until the process which has blanked the display doesn't unblank the display //! or exits, no other process can set the blanking state. //! \retval ::NVAPI_NOT_SUPPORTED - Feature not supported on GPU. Will work on Quadro's only. //! \retval ::NVAPI_ID_OUT_OF_RANGE - Incorrect display ID. //! \retval ::NVAPI_INVALID_POINTER - Invalid pointer to NV_DISPLAY_BLANKING_INFO structure. //! \retval ::NVAPI_API_NOT_INTIALIZED - NvAPI_Initialize() has not been called or was not successfull. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION - The structure version passed is invalid. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_SetDisplayBlankingState(NvU32 displayId, NV_DISPLAY_BLANKING_INFO * pDisplayBlankingState); //! \ingroup dispcontrol //! @{ typedef struct _NV_DISPLAY_EDID_MONITOR_RANGE { NvU16 minRefreshRateHz; // Minimum frame rate in Hz NvU16 maxRefreshRateHz; // Maximum frame rate in Hz NvU16 minLineRateKHz; // Minimum line rate in kHz NvU16 maxLineRateKHz; // Maximum line rate in kHz NvU16 maxPclkMHz; // Maximum pixel rate in MHz } NV_DISPLAY_EDID_TIMING_RANGE; typedef struct _NV_DISPLAY_EDID_DATA_V1 { NvU32 version; NvAPI_ShortString displayName; // Display name string. NvAPI_ShortString manufacturerName; // Manufacturer name string. NvU32 specificID; // 32 bit CRC32, will be the same for all displays with identical EDID data. NvU32 commonID; // 32 bit CRC calculated after purging 'Week of Manufacture', 'Year of Manufacture', 'Product ID String' & 'Serial Number' from EDID. NvU32 isValid : 1; // EDID validity NvU32 reserved : 31; }NV_DISPLAY_EDID_DATA_V1; typedef struct _NV_DISPLAY_EDID_DATA_V2 { NvU32 version; NvAPI_ShortString displayName; // Display name string. NvAPI_ShortString manufacturerName; // Manufacturer name string. NvU32 specificID; // 32 bit CRC32, will be the same for all displays with identical EDID data. NvU32 commonID; // 32 bit CRC calculated after purging 'Week of Manufacture', 'Year of Manufacture', 'Product ID String' & 'Serial Number' from EDID. NvU32 isValid : 1; // EDID validity NvU32 reserved : 31; NV_DISPLAY_EDID_TIMING_RANGE timingRangeLimit; // EDID timing range limit }NV_DISPLAY_EDID_DATA_V2; typedef NV_DISPLAY_EDID_DATA_V2 NV_DISPLAY_EDID_DATA; #define NV_DISPLAY_EDID_DATA_VER1 MAKE_NVAPI_VERSION(NV_DISPLAY_EDID_DATA_V1, 1) #define NV_DISPLAY_EDID_DATA_VER2 MAKE_NVAPI_VERSION(NV_DISPLAY_EDID_DATA_V2, 2) #define NV_DISPLAY_EDID_DATA_VER NV_DISPLAY_EDID_DATA_VER2 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_GetEdidParsed // //! DESCRIPTION: This API returns the parsed edid data from Driver. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! PARAMETERS: displayId(IN) - NVIDIA Display selection. //! pEdidData(OUT) - Pointer to the structure to get the parsed edid data. //! //! RETURN STATUS: //! NVAPI_OK - Completed request. //! NVAPI_ERROR - Miscellaneous error occurred. //! NVAPI_ID_OUT_OF_RANGE - Incorrect display ID. //! NVAPI_INVALID_POINTER - Invalid pointer to NV_DISPLAY_EDID_DATA structure. //! NVAPI_API_NOT_INTIALIZED - NvAPI_Initialize() has not been called or was not successfull. //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - The structure version passed is invalid. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetEdidParsed(NvU32 displayId, NV_DISPLAY_EDID_DATA *pEdidData); /////////////////////////////////////////////////////////////////////////////// // Heterogeneous Clone related APIs. /////////////////////////////////////////////////////////////////////////////// //! \ingroup hcloneapi typedef struct { NvU32 width; NvU32 height; NV_FORMAT colorFormat; NV_DISPLAY_REFRESH_RATE refreshRate; NvU32 reserved; //!< Must be initialized to zero. } NV_DISPLAY_SETTING; //! \ingroup hcloneapi typedef struct { NvU32 version; NvU32 isNonNVIDIA :1; //!< True for non-NVIDIA GPU and False for NVIDIA GPU. We assume there is only one non-NVIDIA iGPU in the system. NvU32 isAttachedToDesktop :1;//!< True for path attached to desktop (currently path index 0 and until primary path is different from attached one). NvU32 reserved :30; NvU32 sourceId; //!< For SET call: //!< IN: For the main adapter which is the primary of this HClone node that is attached and visible to the desktop, //!< pass in the sourceId as seen by the OS. //!< N/A: For the paths not visible to the OS, Driver will internally pick the sourceId. Note that this sourceId can //!< dynamically be changed by Driver at runtime such as when MSPanel extends a monitor on the main adapter. //!< For the GET call: //!< OUT: Driver will return the sourceId for all the paths involved in this Hclone Node. The main adapter's //!< sourceId, is guaranteed to remain the same as passed in at the SET time but the value might have changed for //!< the other paths union { NvU32 targetId; //!< same as in SDC() and QDC() for non NVIDIA display. This will be used when isNonNVIDIA is 1. NvU32 displayId; //!, NVIDIA display ID only for NVIDIA displays. This will be used when isNonNVIDIA is 0. }; NV_DISPLAY_SETTING dispSetting; NvU32 reserved1; //!< Must be initialized to zero. } NV_HCLONE_PATH_V1; //! \ingroup hcloneapi typedef NV_HCLONE_PATH_V1 NV_HCLONE_PATH; //! \ingroup hcloneapi #define NV_HCLONE_PATH_VER1 MAKE_NVAPI_VERSION(NV_HCLONE_PATH_V1,1) //! \ingroup hcloneapi #define NV_HCLONE_PATH_VER NV_HCLONE_PATH_VER1 //! \ingroup hcloneapi typedef struct { NvU32 version; NvU32 numPaths; //!< Number of paths in this node. NV_HCLONE_PATH *pHClonePathArray;//!< index 0 is primary (of highest priority) NvU32 reserved1; //!< Must be initialized to zero. } NV_HCLONE_NODE_V1; //! \ingroup hcloneapi typedef NV_HCLONE_NODE_V1 NV_HCLONE_NODE; //! \ingroup hcloneapi #define NV_HCLONE_NODE_VER1 MAKE_NVAPI_VERSION(NV_HCLONE_NODE_V1,1) //! \ingroup hcloneapi #define NV_HCLONE_NODE_VER NV_HCLONE_NODE_VER1 //! \ingroup hcloneapi typedef enum NV_HCLONE_HOTPLUG_BEHAVIOR { NV_HCLONE_HOTPLUG_BEHAVIOR_CCD=0, //!< Default behavior, using CCD rules for hotplug behavior NV_HCLONE_HOTPLUG_BEHAVIOR_EXTENDED,//!< Override Hotplug for the 1st display - will ignore persistence and go to extended mode NV_HCLONE_HOTPLUG_BEHAVIOR_UI, //!< Override Hotplug for the 1st display - will invoke the Hotplug Dialog interraction //!< (note, also depends on //!< the additional setting persisted within the dialog) } NV_HCLONE_HOTPLUG_BEHAVIOR; //! \ingroup hcloneapi typedef struct { NvU32 version; NvU32 numHCloneNodes; NV_HCLONE_NODE *pHCloneNodeArray; NvU32 isMultiHClonePairsEnabled:1; //!< True: allow more than 1 hclone pairs simultaneously. //!< False: Only a single pair is allowed with integrated adapter as primary display. NvU32 isNWayHCloneNodesEnabled:1; //!< True: 3-way and 4-way nodes are enabled. False: Only 2-way hclone nodes are enabled. NvU32 reserved1:30; //!< Must be initialized to zero. NV_HCLONE_HOTPLUG_BEHAVIOR HCloneHotPlugBehavior; //!< Different flavors of behaviors on hotplug. } NV_HCLONE_TOPOLOGY_V1; //! \ingroup hcloneapi typedef NV_HCLONE_TOPOLOGY_V1 NV_HCLONE_TOPOLOGY; //! \ingroup hcloneapi #define NV_HCLONE_TOPOLOGY_VER1 MAKE_NVAPI_VERSION(NV_HCLONE_TOPOLOGY_V1,1) //! \ingroup hcloneapi #define NV_HCLONE_TOPOLOGY_VER NV_HCLONE_TOPOLOGY_VER1 ///////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_SetHCloneTopology //! DESCRIPTION: This API applies the Heterogeneous clone over displays given in pHCloneTopology. //! Caller should first set the topology over all primary display using OS-API and then call this NVAPI. //! //! \deprecated Do not use this function - it is deprecated in release 510. //! SUPPORTED OS: Windows 7 //! //! \param [in] pHCloneTopology Heterogeneous clone topology information //! //! \retval ::NVAPI_NOT_SUPPORTED: This software feature is not supported on the system. //! //! \ingroup hcloneapi ////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 510.") NVAPI_INTERFACE NvAPI_DISP_SetHCloneTopology(__in NV_HCLONE_TOPOLOGY *pHCloneTopology); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetHCloneTopology // //! DESCRIPTION: This API retrieves the current HClone topology information. //! Use the following steps to retrieve pHCloneTopology completely: //! -# Call this function with pHCloneTopology->pHCloneNodeArray set to NULL, to get the total number nodes in the HClone. //! -# Allocate memory to pHCloneTopology->pHCloneNodeArray of size sizeof(NV_HCLONE_NODE)*pHCloneTopology->numHCloneNodes. //! -# Assign NULL to all pHCloneTopology->pHCloneNodeArray[count].pHClonePathArray in a loop and call this function //! to get all the pHCloneTopology->pHCloneNodeArray[count].numPaths. //! -# In loop allocate memory to pHCloneTopology->pHCloneNodeArray[code].pHClonePathArray //! of size sizeof(NV_HCLONE_PATH)*pHCloneTopology->pHCloneNodeArray[count].numPaths. //! -# Call this function to get entire topology. //! //! In step 5, if HClone is not completed, return value will be NVAPI_DEVICE_BUSY. \p //! In step 1 and step 3, even if HClone is not completed you will get return value as ::NVAPI_OK. //! //! \deprecated Do not use this function - it is deprecated in release 510. //! SUPPORTED OS: Windows 7 //! //! //! \param [out] pHCloneTopology(gives current Heterogeneous clone topology information. //! //! \retval ::NVAPI_NOT_SUPPORTED This software feature is not supported on the system. //! //! \ingroup hcloneapi ////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 510.") NVAPI_INTERFACE NvAPI_DISP_GetHCloneTopology(__inout NV_HCLONE_TOPOLOGY *pHCloneTopology); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_ValidateHCloneTopology // //! DESCRIPTION: This API validates the HClone topology if that is supported/valid.It will validate only topology (Not the display setting) //! any NV_DISPLAY_SETTING in pHCloneTopology would be ignored //! //! \deprecated Do not use this function - it is deprecated in release 510. //! SUPPORTED OS: Windows 7 //! //! //! \param [in] pHCloneTopology Heterogenous clone topology information. //! \param [out] pValid TRUE if valid/supported otherwise FALSE //! //! \retval ::NVAPI_NOT_SUPPORTED This software feature is not supported on the system. //! \ingroup hcloneapi ////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 510.") NVAPI_INTERFACE NvAPI_DISP_ValidateHCloneTopology(__in NV_HCLONE_TOPOLOGY *pHCloneTopology, __out NvU32 *pValid); typedef enum _NV_RESOLUTION_SPEC { NV_RESOLUTION_SPEC_UNKNOWN = 0, NV_RESOLUTION_SPEC_VESA = 1, NV_RESOLUTION_SPEC_CEA = 2, NV_RESOLUTION_SPEC_HANDHELD = 3, } NV_RESOLUTION_SPEC; typedef struct _NV_RESOLUTION_EX_V1 { NvU32 version; NvU32 width; NvU32 height; NvU32 colorDepth; NvU32 refreshRate; NvU16 isInterlaced:1; NvU16 isNative :1; NvU16 is3D :1; NvU16 reserved :13; NV_RESOLUTION_SPEC originSpec; } NV_RESOLUTION_EX_V1; typedef NV_RESOLUTION_EX_V1 NV_RESOLUTION_EX; #define NV_RESOLUTION_EX_VER1 MAKE_NVAPI_VERSION(NV_RESOLUTION_EX_V1,1) #define NV_RESOLUTION_EX_VER NV_RESOLUTION_EX_VER1 //! @} //! \ingroup disphandle /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetDisplayHandleFromDisplayId // //! DESCRIPTION: This API maps a Display ID to the Display Handle of a display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! PARAMETERS: displayId(IN) - Display ID assigned to a display selection. //! phNvDisplay(OUT) - Pointer to display handle associated with the input displayId. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \endcode /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetDisplayHandleFromDisplayId(__in NvU32 displayId, __out NvDisplayHandle *phNvDisplay); //! \ingroup disphandle /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetDisplayIdFromDisplayHandle // //! DESCRIPTION: This API maps a Display Handle to the Display ID of a display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! PARAMETERS: hNvDisplay(IN) - Display handle assigned to a display selection. //! pdisplayId(OUT) - Pointer to display ID associated with the input hNvDisplay. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \endcode /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetDisplayIdFromDisplayHandle(__in NvDisplayHandle hNvDisplay, __out NvU32 *pDisplayId); //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_ApplyAndSaveCustomResolution // //! DESCRIPTION: This API is used to apply the given resolution directly on the specified display. //! //! Currently this API is only supported on a virtualized platform. //! The originSpec field in the NV_RESOLUTION_EX structure is ignored. //! Minimum RefreshRate supported is 20Hz. If lower than 20Hz RefreshRate //! is specified, this API will override refreshRate to 20Hz //! //! \param [in] displayId Display ID //! \param [in] pResolution pointer to NV_RESOLUTION_EX structure. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_ApplyAndSaveCustomResolution(__in NvU32 displayId, __in NV_RESOLUTION_EX *pResolution); #define NV_HYPER_SAMPLING_FLAG_CREATE_DESKTOP_RESOLUTION 0x00000001 #define NV_HYPER_SAMPLING_FLAG_FOR_DL_DSR_RESOLUTION 0x00000002 #define NV_HYPER_SAMPLING_FLAG_FOR_UPSCALING_RESOLUTION 0x00000008 #define NVAPI_MAX_SMOOTH_SCALING_SETTING_COUNT 10 //Keep this value synced with SMOOTH_SCALING_MULTIPLIERS_MAX value typedef enum _NV_HYPER_SAMPLING_CMD { NV_HYPER_SAMPLING_CREATE = 1, NV_HYPER_SAMPLING_APPLY_SHARPNESS_ONLY = 2, } NV_HYPER_SAMPLING_CMD; typedef struct _NV_HYPER_SAMPLING_V1 { NvU32 version; NvU32 samplingFactorsCount; //!< number of entries in samplingFactors NvU32 *samplingFactors; //!< Array of factor in multipleS of 10K to which native resolution of monitor is multiplied NvU32 sharpness; //!< sharpness in percentage. It will be same for all smooth sampling factors. //!< 0 means maximum sharpness, minimum smoothness.100 means minimum sharpness, maximum smoothness. } NV_HYPER_SAMPLING_V1; typedef struct _NV_HYPER_SAMPLING_V2 { NvU32 version; NvU32 samplingFactorsCount; //!< number of entries in samplingFactors and hyperSampledRes NvU32 *samplingFactors; //!< Array of factor in multipleS of 10K to which native resolution of monitor is multiplied NvU32 sharpness; //!< sharpness in percentage. It will be same for all smooth sampling factors. //!< 0 means maximum sharpness, minimum smoothness.100 means minimum sharpness, maximum smoothness. NV_RESOLUTION *hyperSampledRes; //!< Array of width, height multipled by samplingFactor. //!< bloated height/ width of samplingFcators[i] is at hyperSampledRes[i]. colordepth is 32 bit. //!< only used in NvAPI_DISP_GetHyperSamplingSettings } NV_HYPER_SAMPLING_V2; #define NV_HYPER_SAMPLING_VER1 MAKE_NVAPI_VERSION(NV_HYPER_SAMPLING_V1,1) #define NV_HYPER_SAMPLING_VER2 MAKE_NVAPI_VERSION(NV_HYPER_SAMPLING_V2,2) #define NV_HYPER_SAMPLING_VER NV_HYPER_SAMPLING_VER2 typedef NV_HYPER_SAMPLING_V2 NV_HYPER_SAMPLING; typedef struct _NV_HYPER_SAMPLING_EX_V3 { NvU32 version; NvU32 samplingFactorsCount; //!< number of entries in pSamplingFactors and pHyperSampledRes NvU32 *pSamplingFactors; //!< Array of factor in multipleS of 10K to which native resolution of monitor is multiplied NvU32 sharpness; //!< sharpness in percentage. It will be same for all sampling factors. NV_RESOLUTION *pHyperSampledRes; //!< Array of width, height multipled by samplingFactor. //!< bloated height/ width of pSamplingFactors[i] is at pHyperSampledRes[i]. colordepth is 32 bit. //!< only used in NvAPI_DISP_GetHyperSamplingSettingsEx NvU32 flag; //!< one or more of NV_HYPER_SAMPLING_FLAG_XXXX. Currently used in NvAPI_DISP_GetHyperSamplingSettingsEx only } NV_HYPER_SAMPLING_EX_V3; typedef struct _NV_HYPER_SAMPLING_EX_V4 { NvU32 version; NvU32 samplingFactorsCount; //!< number of entries in pSamplingFactors and pHyperSampledRes NvU32 *pSamplingFactors; //!< Array of factor in multipleS of 10K to which native resolution of monitor is multiplied NvU32 sharpness; //!< sharpness in percentage. It will be same for all sampling factors. NV_RESOLUTION *pHyperSampledRes; //!< Array of width, height multipled by samplingFactor. //!< bloated height/ width of pSamplingFactors[i] is at pHyperSampledRes[i]. colordepth is 32 bit. //!< only used in NvAPI_DISP_GetHyperSamplingSettingsEx NvU32 flag; //!< one or more of NV_HYPER_SAMPLING_FLAG_XXXX. NvU32 customWidth; //!< User provided width to create custom DSR. NvU32 customHeight; //!< User provided height to create custom DSR. } NV_HYPER_SAMPLING_EX_V4; typedef NV_HYPER_SAMPLING_V1 NV_HYPER_SAMPLING_EX_V1; typedef NV_HYPER_SAMPLING_V2 NV_HYPER_SAMPLING_EX_V2; #define NV_HYPER_SAMPLING_EX_VER1 NV_HYPER_SAMPLING_VER1 #define NV_HYPER_SAMPLING_EX_VER2 NV_HYPER_SAMPLING_VER2 #define NV_HYPER_SAMPLING_EX_VER3 MAKE_NVAPI_VERSION(NV_HYPER_SAMPLING_EX_V3,3) #define NV_HYPER_SAMPLING_EX_VER4 MAKE_NVAPI_VERSION(NV_HYPER_SAMPLING_EX_V4,4) #define NV_HYPER_SAMPLING_EX_VER NV_HYPER_SAMPLING_EX_VER4 typedef NV_HYPER_SAMPLING_EX_V4 NV_HYPER_SAMPLING_EX; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_SetHyperSamplingSettingsEx // //! DESCRIPTION: This API is used to enable hyper sampling. After successful return of API, native(max) resolution*sampling factor //! will be enabled on the display. //! In case of cmd NV_HYPER_SAMPLING_APPLY_SHARPNESS, sharpness would be applied on all Hyper Sampling factors. //! samplingFactorsCount can have a maximum value of NVAPI_MAX_SMOOTH_SCALING_SETTING_COUNT. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 440 //! //! \param [in] displayId display identifier. Ignored in case of cmd NV_HYPER_SAMPLING_APPLY_SHARPNESS. //! \param [in] cmd one of command of NV_HYPER_SAMPLING_CMD. //! \param [in,out] pHyperSampling pointer to NV_HYPER_SAMPLING_EX //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval ::NVAPI_SET_NOT_ALLOWED - Either custom resolution is active or active sampling factor is getting removed. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_SetHyperSamplingSettingsEx(__in_opt NvU32 displayId, __in NV_HYPER_SAMPLING_CMD cmd, __inout NV_HYPER_SAMPLING_EX *pHyperSampling); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_GetHyperSamplingSettingsEx // //! DESCRIPTION: This API is used to get all Hyper sampling setting applied on the display. //! //! HOW TO USE: 1.make a call to NvAPI_DISP_GetHyperSamplingSettingsEx to get the hyperSampling->hyperSamplingcount by passing the hyperSampling->pSamplingFactors as NULL. //! On call success: //! 2.Allocate memory (samplingFactorsCount * sizeof(NvU32)) then make a call NvAPI_DISP_GetHyperSamplingSettingsEx to get hyperSampling info. //! Allocate memory (samplingFactorsCount * sizeof(NV_RESOLUTION)) to get multiplied hyperSampled resolutions //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 440 //! //! \param [in] displayId display identifier. Ignored in case of cmd NV_HYPER_SAMPLING_APPLY_SHARPNESS_ONLY. //! \param [in,out] pHyperSampling pointer to NV_HYPER_SAMPLING_EX //! \param [in] flag if flag = 0, API will return already created factors. //! if flag = 1, API will return supported factors and recommended sharpness. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetHyperSamplingSettingsEx(__in_opt NvU32 displayId, __in_opt NV_HYPER_SAMPLING_EX *pHyperSampling, __in NvU32 flag); #define NV_VRR_GPU_NO_SUPPORT NV_BIT(0) #define NV_VRR_DISPLAY_NO_SUPPORT NV_BIT(1) #define NV_VRR_CURRENT_DISPLAY_SETTINGS_NO_SUPPORT NV_BIT(2) #define NV_VRR_MODE_DISABLED NV_BIT(3) typedef enum _NV_VRR_MODE { NV_VRR_MODE_NOT_SUPPORTED = 0, //!< VRR not supported NV_VRR_MODE_FULLSCREEN_ONLY = 1, //!< VRR supported only in fullscreen NV_VRR_MODE_FULLSCREEN_AND_WINDOWED = 2, //!< VRR supported in fullscreen and windowed mode } NV_VRR_MODE; typedef struct _NV_VRR_SETTINGS { NvU32 version; //!< Structure version NV_VRR_MODE currentSupportedMode; //!< The current VRR mode supported NvU32 problemFlags; //!< The problem flags when currentSupportedMode is NV_VRR_MODE_NOT_SUPPORTED }NV_VRR_SETTINGS_V1; #define NV_VRR_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_VRR_SETTINGS_V1,1) #define NV_VRR_SETTINGS_VER NV_VRR_SETTINGS_VER1 typedef NV_VRR_SETTINGS_V1 NV_VRR_SETTINGS; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_GetCurrentVRRSettings // //! DESCRIPTION: This API is used to get the current VRR capabilities and settings. //! //! SUPPORTED OS: Windows 7 and higher //! //! \param [in] displayId display identifier of the display device. //! \param [in] pVRRSettings pointer to structure which will contain current VRR settings after the call //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetCurrentVRRSettings(__in NvU32 displayId, __inout NV_VRR_SETTINGS *pVRRSettings); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_EnableDirectMode // //! DESCRIPTION: This API enables the Direct mode on the specified display //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] vendorId Vendor Id of the target VR solution //! \param [in] reserved Reserved for future use //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval //! NVAPI_INVALID_DIRECT_MODE_DISPLAY HMD is not allowlisted for the directmode usage. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_EnableDirectMode(__in NvU32 vendorId, __in NvU32 reserved); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_DisableDirectMode // //! DESCRIPTION: This API disables the Direct mode on the specified display //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] vendorId Vendor Id of the target VR solution //! \param [in] reserved Reserved for future use //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval //! NVAPI_INVALID_DIRECT_MODE_DISPLAY Vendor is not Allowlisted to use VR DirectMode. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_DisableDirectMode(__in NvU32 vendorId, __in NvU32 reserved); typedef struct _NV_DIRECT_MODE_DISPLAY_HANDLE { NvU32 displayId; //!< DisplayId of the VR Headset void* pDisplayContext; //!< IHV's VR display context } NV_DIRECT_MODE_DISPLAY_HANDLE; typedef enum _NV_ENUM_DIRECTMODE_DISPLAY_FLAG { NV_ENUM_DIRECTMODE_DISPLAY_CAPABLE = 0, //!< Used to enumerate all VR capable displays for a given vendorId NV_ENUM_DIRECTMODE_DISPLAY_ENABLED //!< Used to enumerate all VR displays in DirectMode for a given vendorId } NV_ENUM_DIRECTMODE_DISPLAY_FLAG; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_EnumerateDirectModeDisplays // //! DESCRIPTION: This API enumerates the Direct mode displays //! //! HOW TO USE: 1) For a given vendor Id, make a call to get the number of DirectMode display handles //! using NvAPI_DISP_EnumerateDirectModeDisplays by passing the phDisplay as NULL //! On call success: //! 2) Allocate memory based on pNumDisplays then make a call NvAPI_DISP_EnumerateDirectModeDisplays to populate DirectMode display handles //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] vendorId - Vendor Id of the target VR solution //! \param [in,out] pNumDisplays - IN -> Number of entries in the phDisplay array. //! - OUT -> Number of actual displayHandles in the system //! \param [in,out] phDisplay - Pointer to an NV_DIRECT_MODE_DISPLAY_HANDLE struct, each entry represents a one display handle //! \param [in] flags - A value from NV_ENUM_DIRECTMODE_DISPLAY_FLAG. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_INSUFFICIENT_BUFFER When the input buffer(phDisplay)'s size(*pNumDisplays) is less than the available displays. //! The *pNumDisplays will return the actual available displays count. //! //! \retval NVAPI_INVALID_ARGUMENT When phDisplay is NULL and *pNumDisplays > 0, then this error is returned. //! //! \ingroup disphandle /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_EnumerateDirectModeDisplays(__in NvU32 vendorId, __inout NvU32 *pNumDisplays, __inout_opt NV_DIRECT_MODE_DISPLAY_HANDLE *phDisplay, __in NV_ENUM_DIRECTMODE_DISPLAY_FLAG flag); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetDirectModeDisplayHandleFromDisplayId // //! DESCRIPTION: This API maps a Display ID to the Display Handle of a display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId - Display Id assigned to a display selection. //! \param [out] phNvDisplay - Pointer to display handle associated with the input displayId. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup disphandle /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetDirectModeDisplayHandleFromDisplayId(__in NvU32 displayId, __out NV_DIRECT_MODE_DISPLAY_HANDLE *phNvDisplay); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetDisplayIdFromDirectModeDisplayHandle // //! DESCRIPTION: This API maps a Display Handle to the Display ID of a display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] phNvDisplay - Display handle assigned to a display selection. //! \param [out] pDisplayId - Pointer to display ID associated with the input hNvDisplay. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \ingroup disphandle /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetDisplayIdFromDirectModeDisplayHandle(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phNvDisplay, __out NvU32 *pDisplayId); typedef enum _NV_DIRECTMODE_DISPLAY_CONTROL { NV_DM_DISPLAY_CONTROL_POWER_ON, NV_DM_DISPLAY_CONTROL_POWER_OFF, NV_DM_DISPLAY_CONTROL_VISIBILITY_ON, NV_DM_DISPLAY_CONTROL_VISIBILITY_OFF } NV_DIRECTMODE_DISPLAY_CONTROL; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_DirectModeDisplayControl // //! DESCRIPTION: This API can be used to control the defined features of a Direct Mode Display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] phNvDisplay - Display handle assigned to a display selection. //! \param [in] dispControl - One of the NV_DIRECTMODE_DISPLAY_CONTROL values. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \retval NVAPI_INVALID_DIRECT_MODE_DISPLAY Directmode is not enabled for this display. //! NVAPI_DISPLAY_IN_USE HMD is currently in use by other process. HMD controls are only available to the process that acquired the HMD. //! //! \ingroup disphandle /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_DirectModeDisplayControl(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phNvDisplay, __in NV_DIRECTMODE_DISPLAY_CONTROL dispControl); NV_DECLARE_HANDLE(NvNotifyHandle); //!< A handle to a waitable object /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_DirectModeGetVSyncWaitableObject // //! DESCRIPTION: This API returns a waitable object that signals on every vsync. //! On Windows, this is a HANDLE to an auto reset event. //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 361 //! //! \param [in] phNvDisplay - Display handle assigned to a display selection whose VSync events are of interest. //! \param [out] phEvent - Handle to a waitable event object. On Windows, clients can use this in a WaitForSingleObject() function //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! NVAPI_INVALID_HANDLE : NvAPI_D3D_AcquireDirectModeDisplay has not been called on the desired display //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_DirectModeGetVSyncWaitableObject(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phNvDisplay, __out NvNotifyHandle* phEvent); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_DirectModeGetPresentWaitableObject // //! DESCRIPTION: This API returns a waitable object that signals when the display has finished presenting a new frame. //! On Windows, this is a HANDLE to an auto reset event. //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 361 //! //! \param [in] phNvDisplay - Display handle assigned to a display selection whose VSync events are of interest. //! \param [out] phEvent - Handle to a waitable event object. On Windows, clients can use this in a WaitForSingleObject() function //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! NVAPI_INVALID_HANDLE : NvAPI_D3D_AcquireDirectModeDisplay has not been called on the desired display //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_DirectModeGetPresentWaitableObject(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phNvDisplay, __out NvNotifyHandle* phEvent); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_DirectModeGetMissedFrameWaitableObject // //! DESCRIPTION: This API returns a waitable object that signals when the display has finished presenting a frame but new frame is not ready for presenting. //! On Windows, this is a HANDLE to an auto reset event. //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 367 //! //! \param [in] phNvDisplay - Display handle assigned to a display selection whose VSync events are of interest. //! \param [out] phEvent - Handle to a waitable event object. On Windows, clients can use this in a WaitForSingleObject() function //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! NVAPI_INVALID_HANDLE : NvAPI_D3D_AcquireDirectModeDisplay has not been called on the desired display //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_DirectModeGetMissedFrameWaitableObject(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phNvDisplay, __out NvNotifyHandle* phEvent); //! \ingroup dispcontrol //! @{ typedef struct _NV_EDID_DATA_V1 { NvU32 version; //!< Structure version. NvU8 *pEDID; //!< Pointer to EDID data. NvU32 sizeOfEDID; //!< Size of EDID data. } NV_EDID_DATA_V1; typedef struct _NV_EDID_DATA_V2 { NvU32 version; //!< Structure version. NvU8 *pEDID; //!< Pointer to EDID data. NvU32 sizeOfEDID; //!< Size of EDID data. NvU32 reserved[8]; //!< Reserved for future use. } NV_EDID_DATA_V2; typedef NV_EDID_DATA_V2 NV_EDID_DATA; #define NV_EDID_DATA_VER1 MAKE_NVAPI_VERSION(NV_EDID_DATA_V1, 1) #define NV_EDID_DATA_VER2 MAKE_NVAPI_VERSION(NV_EDID_DATA_V2, 2) #define NV_EDID_DATA_VER NV_EDID_DATA_VER2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_GetEdidData // //! \code //! DESCRIPTION: This API returns the EDID data for the specified display Id. //! (NvAPI_GPU_GetConnectedDisplayIds() can be used to get the DisplayIds). //! pEdidParams->pEDID buffer has to be allocated by caller and to get the buffer size, //! user should first call this API with pEdidParams->pEDID as NULL. //! If the API returns NVAPI_INSUFFICIENT_BUFFER, call this API again after freeing old buffer //! and allocating a new buffer of size pEdidParams->sizeOfEDID, returned in previous call. //! //! PARAMETERS: displayId(IN) - NVIDIA Display ID. //! //! pEdidParams(IN/OUT) - This structure contains pointer to EDID buffer and its size. //! //! pFlag(IN/OUT) - The type of EDID to be retrieved (IN). To only retrieve the EDID type, //! user should send pEdidParams->pEDID as NULL and pEdidParams->sizeOfEDID as 0. //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 400 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! NVAPI_INSUFFICIENT_BUFFER: Reallocate buffer with pEdidParams->sizeOfEDID and call again to get complete data. //! In this case pEdidParams->pEDID contains undefined data. //! This error occurs only when pEdidParams->pEDID is present. //! \endcode //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetEdidData(__in NvU32 displayId, __inout NV_EDID_DATA *pEdidParams, __inout NV_EDID_FLAG *pFlag); //! @} //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_ValidateEdidData // //! DESCRIPTION: Check the possible errors with the given Edid, call validates EDID of size upto NV_EDID_DATA_SIZE_MAX bytes. //! //! PARAMETERS: displayId(IN) - NVIDIA Display ID. //! //! pEdidParams(IN) - This structure contains pointer to EDID buffer and its size. //! //! pFlag(OUT) - Bit-wised Edid errors (NV_EDID_OK, NV_EDID_BAD_CHECKSUM, NV_EDID_INCOMPATIBLE_CONNECTOR and so on) //! EDID can be faked inspite of these errors but is not recommended. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 400 //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_ValidateEdidData(__in NvU32 displayId, __in NV_EDID_DATA *pEdidParams, __out NvU32 *pFlag); //! @} //! \ingroup dispcontrol //! @{ /////////////////////////////////////////////////////////////////////////////// //! FUNCTION NAME: NvAPI_DISP_SetEdidData //! //! DESCRIPTION: This API sets the EDID data for the specified Display. Can allow to set EDID upto NV_EDID_DATA_SIZE_MAX bytes size. //! Note:The EDID will be cached across the boot session and will be enumerated to the OS in this call. //! To remove the EDID set pEdidParams->sizeOfEDID to zero. //! OS and NVAPI connection status APIs will reflect the newly set or removed EDID dynamically. //! //! PARAMETERS: displayId(IN) - NVIDIA Display ID. //! //! pEdidParams(IN) - This structure contains pointer to EDID buffer and its size. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 400 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! NVAPI_INVALID_ARGUMENT: displayId is 0 or pEdidParams->sizeOfEDID is non zero and pEdidParams->pEDID is null. //! NVAPI_ARGUMENT_EXCEED_MAX_SIZE: pEdidParams->sizeOfEDID is greater than NV_EDID_DATA_SIZE_MAX. //! \retval NVAPI_INVALID_USER_PRIVILEGE - 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". //! \endcode /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_SetEdidData(__in NvU32 displayId, __in NV_EDID_DATA* pEdidParams); typedef struct _NV_GET_ADAPTIVE_SYNC_DATA_V1 { NvU32 version ; //!< [in] structure version NvU32 maxFrameInterval; //!< [out] maximum frame interval in micro seconds as set previously using NvAPI_DISP_SetAdaptiveSyncData function. //!< If default values from EDID are used, this parameter returns 0. NvU32 bDisableAdaptiveSync : 1; //!< [out] Indicates if adaptive sync is disabled on the display. NvU32 bDisableFrameSplitting : 1; //!< [out] Indicates if frame splitting is disabled on the display. NvU32 reserved : 30; //!< reserved for future use. NvU32 lastFlipRefreshCount; //!< [out] Number of times the last flip was shown on the screen NvU64 lastFlipTimeStamp; //!< [out] Timestamp for the lastest flip on the screen NvU32 reservedEx[4]; //!< reserved for future use. } NV_GET_ADAPTIVE_SYNC_DATA_V1; #define NV_GET_ADAPTIVE_SYNC_DATA_VER1 MAKE_NVAPI_VERSION(NV_GET_ADAPTIVE_SYNC_DATA_V1,1) #define NV_GET_ADAPTIVE_SYNC_DATA_VER NV_GET_ADAPTIVE_SYNC_DATA_VER1 typedef NV_GET_ADAPTIVE_SYNC_DATA_V1 NV_GET_ADAPTIVE_SYNC_DATA; /////////////////////////////////////////////////////////////////////////////// // //! \fn NvAPI_DISP_GetAdaptiveSyncData(__in NvU32 displayId, __inout NV_GET_ADAPTIVE_SYNC_DATA *pAdaptiveSyncData) //! \code //! DESCRIPTION: This function is used to get data for the Adaptive Sync Display. //! //! SUPPORTED OS: Windows 10 and higher //! //! \since Release: 415 //! //! \param [in] displayId - display id of the display //! \param [inout] pAdaptiveSyncData - A pointer to NV_GET_ADAPTIVE_SYNC_DATA, containing the information about the values of parameters that are to be retrieved on given display. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_DISP_GetAdaptiveSyncData(__in NvU32 displayId, __inout NV_GET_ADAPTIVE_SYNC_DATA *pAdaptiveSyncData); typedef struct _NV_SET_ADAPTIVE_SYNC_DATA_V1 { NvU32 version ; //!< [in] structure version NvU32 maxFrameInterval; //!< [in] maximum frame interval in micro seconds. //!< If maxFrameInterval is send as 0, default values from EDID will be used. NvU32 bDisableAdaptiveSync : 1; //!< [in] Indicates if adaptive sync is disabled on the display. NvU32 bDisableFrameSplitting : 1; //!< [in] Indicates if Frame Splitting should be disabled. NvU32 reserved : 30; //!< reserved for future use. NvU32 reservedEx[7]; //!< reserved for future use. } NV_SET_ADAPTIVE_SYNC_DATA_V1; #define NV_SET_ADAPTIVE_SYNC_DATA_VER1 MAKE_NVAPI_VERSION(NV_SET_ADAPTIVE_SYNC_DATA_V1,1) #define NV_SET_ADAPTIVE_SYNC_DATA_VER NV_SET_ADAPTIVE_SYNC_DATA_VER1 typedef NV_SET_ADAPTIVE_SYNC_DATA_V1 NV_SET_ADAPTIVE_SYNC_DATA; /////////////////////////////////////////////////////////////////////////////// // //! \fn NvAPI_DISP_SetAdaptiveSyncData(__in NvU32 displayId, __in NV_SET_ADAPTIVE_SYNC_DATA *pAdaptiveSyncData) //! \code //! DESCRIPTION: This function is used to set data for Adaptive Sync Display. //! //! SUPPORTED OS: Windows 10 and higher //! //! \since Release: 415 //! //! \param [in] displayId - display id of the display //! \param [in] pAdaptiveSyncData - A pointer to NV_SET_ADAPTIVE_SYNC_DATA, containing the information about the values of parameters that are to be set on given display. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_DISP_SetAdaptiveSyncData(__in NvU32 displayId, __in NV_SET_ADAPTIVE_SYNC_DATA *pAdaptiveSyncData); typedef struct _NV_GET_VIRTUAL_REFRESH_RATE_DATA_V1 { NvU32 version ; //!< [in] structure version NvU32 frameIntervalUs; //!< [out] frame interval in micro seconds if Virtual RR is currently applied NvU32 reservedEx[8]; //!< reserved for future use. } NV_GET_VIRTUAL_REFRESH_RATE_DATA_V1; #define NV_GET_VIRTUAL_REFRESH_RATE_DATA_VER1 MAKE_NVAPI_VERSION(_NV_GET_VIRTUAL_REFRESH_RATE_DATA_V1,1) #define NV_GET_VIRTUAL_REFRESH_RATE_DATA_VER NV_GET_VIRTUAL_REFRESH_RATE_DATA_VER1 typedef NV_GET_VIRTUAL_REFRESH_RATE_DATA_V1 NV_GET_VIRTUAL_REFRESH_RATE_DATA; /////////////////////////////////////////////////////////////////////////////// // //! \fn NvAPI_DISP_GetVirtualRefreshRateData(__in NvU32 displayId, __inout NV_GET_VIRTUAL_REFRESH_RATE_DATA *pVirtualRefreshRateData) //! \code //! DESCRIPTION: This function is used to get Virtual Refresh Rate data for a VRR Capable Display. //! //! SUPPORTED OS: Windows 10 and higher //! //! \since Release: 510 //! //! \param [in] displayId - display id of the display //! \param [inout] pVirtualRefreshRateData - A pointer to NV_GET_VIRTUAL_REFRESH_RATE_DATA, containing the information about the values of parameters that are to be retrieved on given display. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_DISP_GetVirtualRefreshRateData(__in NvU32 displayId, __inout NV_GET_VIRTUAL_REFRESH_RATE_DATA *pVirtualRefreshRateData); typedef struct _NV_SET_VIRTUAL_REFRESH_RATE_DATA_V1 { NvU32 version ; //!< [in] structure version NvU32 frameIntervalUs; //!< [in] frame interval in micro seconds if Virtual RR is currently applied NvU32 reservedEx[8]; //!< reserved for future use. } NV_SET_VIRTUAL_REFRESH_RATE_DATA_V1; #define NV_SET_VIRTUAL_REFRESH_RATE_DATA_VER1 MAKE_NVAPI_VERSION(_NV_SET_VIRTUAL_REFRESH_RATE_DATA_V1,1) #define NV_SET_VIRTUAL_REFRESH_RATE_DATA_VER NV_SET_VIRTUAL_REFRESH_RATE_DATA_VER1 typedef NV_SET_VIRTUAL_REFRESH_RATE_DATA_V1 NV_SET_VIRTUAL_REFRESH_RATE_DATA; /////////////////////////////////////////////////////////////////////////////// // //! \fn NvAPI_DISP_SetVirtualRefreshRateData(__in NvU32 displayId, __in NV_SET_VIRTUAL_REFRESH_RATE_DATA *pVirtualRefreshRateData) //! \code //! DESCRIPTION: This function is used to set Virtual Refresh Rate data for a VRR Capable Display. //! //! SUPPORTED OS: Windows 10 and higher //! //! \since Release: 510 //! //! \param [in] displayId - display id of the display //! \param [inout] pVirtualRefreshRateData - A pointer to NV_SET_VIRTUAL_REFRESH_RATE_DATA, containing the information about the values of parameters that are to be retrieved on given display. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_DISP_SetVirtualRefreshRateData(__in NvU32 displayId, __in NV_SET_VIRTUAL_REFRESH_RATE_DATA *pVirtualRefreshRateData); typedef enum _NV_MUX_STATE { NV_MUX_STATE_INVALID = 0, //!< Invalid Mux state NV_MUX_STATE_IGPU = 1, //!< Current Mux state is iGPU NV_MUX_STATE_DGPU = 2 //!< Current Mux state is dGPU } NV_MUX_STATE; typedef enum _NV_DYNAMIC_DISPLAY_MUX_SWITCH_TYPE { NV_DYNAMIC_DISPLAY_MUX_SWITCH_TYPE_INVALID = 0, //!< Invalid switch type NV_DYNAMIC_DISPLAY_MUX_SWITCH_TYPE_AUTOMATIC = 1, //!< Automatic switch type NV_DYNAMIC_DISPLAY_MUX_SWITCH_TYPE_MANUAL = 2, //!< Manual switch type }NV_DYNAMIC_DISPLAY_MUX_SWITCH_TYPE; typedef struct _NV_GET_DISPLAY_MUX_INFO_V1 { NvU32 version; //!< IN structure version NV_DYNAMIC_DISPLAY_MUX_SWITCH_TYPE muxSwitchType; //!< OUT Indicates whether the mux switch type is automatic or manual NV_MUX_STATE muxState; //!< OUT mux state NvU32 isSupported : 1; //!< OUT caps bit NvU32 reserved : 31; //!< OUT reserved for future use }NV_GET_DISPLAY_MUX_INFO_V1; #define NV_GET_DISPLAY_MUX_INFO_VER1 MAKE_NVAPI_VERSION(NV_GET_DISPLAY_MUX_INFO_V1,1) #define NV_GET_DISPLAY_MUX_INFO_VER NV_GET_DISPLAY_MUX_INFO_VER1 typedef NV_GET_DISPLAY_MUX_INFO_V1 NV_GET_DISPLAY_MUX_INFO; /////////////////////////////////////////////////////////////////////////////// // //! \fn NvAPI_DISP_GetDisplayMuxCaps(__in NvU32 displayId, __inout NV_GET_DISPLAY_MUX_INFO *pDisplayMuxInfo) //! \code //! DESCRIPTION: This function is used to Get Display MUX info //! //! SUPPORTED OS: Windows 10 and higher //! //! \since Release: 421 //! //! \param [in] displayId - display id of the display //! \param [inout] pDisplayMuxInfo - pointer to NV_GET_DISPLAY_MUX_INFO structure //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode /////////////////////////////////////////////////////////////////////////////// //! \ingroup dispcontrol NVAPI_INTERFACE NvAPI_DISP_GetDisplayMuxCaps(__in NvU32 displayId, __inout NV_GET_DISPLAY_MUX_INFO *pDisplayMuxInfo); //! \ingroup dispcontrol typedef struct { NvU32 version; //!< [in] Structure version NvU32 displayId; //!< [in] Monitor Identifier to be set NvU32 reserved; //!< Reserved for future use without adding versioning } NV_SET_PREFERRED_STEREO_DISPLAY_V1; //! \ingroup dispcontrol typedef NV_SET_PREFERRED_STEREO_DISPLAY_V1 NV_SET_PREFERRED_STEREO_DISPLAY; //! \ingroup dispcontrol #define NV_SET_PREFERRED_STEREO_DISPLAY_VER1 MAKE_NVAPI_VERSION(NV_SET_PREFERRED_STEREO_DISPLAY_V1,1) //! \ingroup dispcontrol #define NV_SET_PREFERRED_STEREO_DISPLAY_VER NV_SET_PREFERRED_STEREO_DISPLAY_VER1 /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_SetPreferredStereoDisplay // //! DESCRIPTION: Specifies a display output that drives the 3pin DIN output signal //! in a workstation stereo system environment. //! If display output is specified as a displayId of 0, the preferred //! stereo display target is reset to the driver default selection. //! //! SUPPORTED OS: Windows 10 and higher //! //! \since Release: 470 //! //! \param [in] pPreferredStereoDisplay Pointer to a NV_SET_PREFERRED_STEREO_DISPLAY structure //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_ERROR miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameter. //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - 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". //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_SetPreferredStereoDisplay(__in NV_SET_PREFERRED_STEREO_DISPLAY *pPreferredStereoDisplay); //! \ingroup dispcontrol typedef struct { NvU32 version; //!< [in] Structure version NvU32 displayId; //!< [out] The queried stereo display NvU32 reserved; //!< Reserved for future use without adding versioning } NV_GET_PREFERRED_STEREO_DISPLAY_V1; //! \ingroup dispcontrol typedef NV_GET_PREFERRED_STEREO_DISPLAY_V1 NV_GET_PREFERRED_STEREO_DISPLAY; //! \ingroup dispcontrol #define NV_GET_PREFERRED_STEREO_DISPLAY_VER1 MAKE_NVAPI_VERSION(NV_GET_PREFERRED_STEREO_DISPLAY_V1,1) //! \ingroup dispcontrol #define NV_GET_PREFERRED_STEREO_DISPLAY_VER NV_GET_PREFERRED_STEREO_DISPLAY_VER1 /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_DISP_GetPreferredStereoDisplay // //! DESCRIPTION: Queries the displayId of the display output driving the 3pin //! DIN stereo signal, if any. //! SUPPORTED OS: Windows 10 and higher //! //! \since Release: 470 //! //! \param [inout] pPreferredStereoDisplay Pointer to a NV_GET_PREFERRED_STEREO_DISPLAY structure //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_ERROR miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameter. //! \retval ::NVAPI_INVALID_POINTER An invalid pointer was passed as an argument (probably NULL). //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetPreferredStereoDisplay(__inout NV_GET_PREFERRED_STEREO_DISPLAY *pPreferredStereoDisplay); //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) typedef struct _NV_MANAGED_DEDICATED_DISPLAY_INFO { NvU32 version; //!< [in] Version of this structure. NvU32 displayId; //!< [out] DisplayId. NvU32 isAcquired : 1; //!< [out] If bit is set, this display has been acquired by another process through NvAPI_DISP_AcquireDedicatedDisplay(). NvU32 isMosaic : 1; //!< [out] If bit is set, this display represents a Mosaic grid. NvU32 reserved : 30; //!< [out] Reserved for future use without adding versioning. } NV_MANAGED_DEDICATED_DISPLAY_INFO_V1; #define NV_MANAGED_DEDICATED_DISPLAY_INFO_VER1 MAKE_NVAPI_VERSION(NV_MANAGED_DEDICATED_DISPLAY_INFO_V1,1) #define NV_MANAGED_DEDICATED_DISPLAY_INFO_VER NV_MANAGED_DEDICATED_DISPLAY_INFO_VER1 typedef NV_MANAGED_DEDICATED_DISPLAY_INFO_V1 NV_MANAGED_DEDICATED_DISPLAY_INFO; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_GetNvManagedDedicatedDisplays // //! DESCRIPTION: This API returns the count of dedicated displays managed by //! the Nvidia driver, and specific driver info of each display. //! This API does not return VR displays. //! //! HOW TO USE: 1) First make a call NvAPI_DISP_GetNvManagedDedicatedDisplays to get the number of dedicated displays managed by the Nvidia driver //! by passing pDedicatedDisplays as NULL. //! On call success: //! 2) Allocate memory based on pDisplayCount, then call NvAPI_DISP_GetNvManagedDedicatedDisplays to populate pDedicatedDisplays. //! //! \since Release: 495 //! //! \param [in/out] pDedicatedDisplayCount The count of dedicated displays managed by the Nvidia driver. //! \param [in/out] pDedicatedDisplays Pointer to an array of NV_MANAGED_DEDICATED_DISPLAY_INFO data structure. //! //! \retval ::NVAPI_OK The call succeeded. //! \retval ::NVAPI_ERROR The call failed. //! \retval ::NVAPI_NO_IMPLEMENTATION The API is not implemented in current driver. //! \retval ::NVAPI_OUT_OF_MEMORY Could not allocate sufficient memory to complete the call. //! \retval ::NVAPI_INVALID_POINTER An invalid pointer was passed as an argument. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not initialized. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of NV_MANAGED_DEDICATED_DISPLAY_INFO structure is invalid. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_GetNvManagedDedicatedDisplays(__inout NvU32* pDedicatedDisplayCount, __inout NV_MANAGED_DEDICATED_DISPLAY_INFO* pDedicatedDisplays); #endif // defined(__cplusplus) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_AcquireDedicatedDisplay // //! DESCRIPTION: This API requests exclusive access to the specified dedicated //! display managed by the Nvidia driver. If the call succeeds, a handle //! is returned which could be opened as a DisplaySource. //! The call fails if the display is not managed by the Nvidia driver. //! The call fails if the display has already been acquired by another process. //! //! \since Release: 495 //! //! \param [in] displayId Display ID of the dedicated display to be acquired. //! \param [in/out] pDisplaySourceHandle Pointer to memory that receives the shared handle to a DisplaySource. //! //! \retval ::NVAPI_OK The call succeeded. //! \retval ::NVAPI_ERROR The call failed. //! \retval ::NVAPI_NO_IMPLEMENTATION The API not implemented. //! \retval ::NVAPI_INVALID_POINTER An invalid pointer was passed as an argument. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized. //! \retval ::NVAPI_INVALID_DISPLAY_ID An invalid displayId was passed as an argument. //! \retval ::NVAPI_UNREGISTERED_RESOURCE The display is not managed by the Nvidia driver. //! \retval ::NVAPI_RESOURCE_IN_USE The display has already been acquired by another process. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_AcquireDedicatedDisplay(__in NvU32 displayId, __inout NvU64* pDisplaySourceHandle); #endif // defined(__cplusplus) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DISP_ReleaseDedicatedDisplay // //! DESCRIPTION: This API releases the exclusive ownership of a specific dedicated //! display previously acquired by the process. //! //! \since Release: 495 //! //! \param [in] displayId Display ID of the dedicated display to be released. //! //! \retval ::NVAPI_OK The call succeeded. //! \retval ::NVAPI_ERROR The call failed. //! \retval ::NVAPI_NO_IMPLEMENTATION The API not implemented. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized. //! \retval ::NVAPI_UNREGISTERED_RESOURCE The display is not managed by the Nvidia driver. //! \retval ::NVAPI_DDISPLAY_NOT_ACQUIRED The display is not acquired by the process. //! //! \ingroup dispcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DISP_ReleaseDedicatedDisplay(__in NvU32 displayId); #endif // defined(__cplusplus) //////////////////////////////////////////////////////////////////////////////////////// // // MOSAIC allows a multi display target output scanout on a single source. // // SAMPLE of MOSAIC 1x4 topo with 8 pixel horizontal overlap // //+-------------------------++-------------------------++-------------------------++-------------------------+ //| || || || | //| || || || | //| || || || | //| DVI1 || DVI2 || DVI3 || DVI4 | //| || || || | //| || || || | //| || || || | //| || || || | //+-------------------------++-------------------------++-------------------------++-------------------------+ //! \addtogroup mosaicapi //! @{ #define NVAPI_MAX_MOSAIC_DISPLAY_ROWS 8 #define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS 8 #define NV_MOSAIC_MAX_DISPLAYS (64) // // These bits are used to describe the validity of a topo. // #define NV_MOSAIC_TOPO_VALIDITY_VALID 0x00000000 //!< The topology is valid #define NV_MOSAIC_TOPO_VALIDITY_MISSING_GPU 0x00000001 //!< Not enough SLI GPUs were found to fill the entire //! topology. hPhysicalGPU will be 0 for these. #define NV_MOSAIC_TOPO_VALIDITY_MISSING_DISPLAY 0x00000002 //!< Not enough displays were found to fill the entire //! topology. displayOutputId will be 0 for these. #define NV_MOSAIC_TOPO_VALIDITY_MIXED_DISPLAY_TYPES 0x00000004 //!< The topoogy is only possible with displays of the same //! NV_GPU_OUTPUT_TYPE. Check displayOutputIds to make //! sure they are all CRTs, or all DFPs. // //! This structure defines the topology details. typedef struct { NvU32 version; //!< Version of this structure NvLogicalGpuHandle hLogicalGPU; //!< Logical GPU for this topology NvU32 validityMask; //!< 0 means topology is valid with the current hardware. //! If not 0, inspect bits against NV_MOSAIC_TOPO_VALIDITY_*. NvU32 rowCount; //!< Number of displays in a row NvU32 colCount; //!< Number of displays in a column struct { NvPhysicalGpuHandle hPhysicalGPU; //!< Physical GPU to be used in the topology (0 if GPU missing) NvU32 displayOutputId; //!< Connected display target (0 if no display connected) NvS32 overlapX; //!< Pixels of overlap on left of target: (+overlap, -gap) NvS32 overlapY; //!< Pixels of overlap on top of target: (+overlap, -gap) } gpuLayout[NVAPI_MAX_MOSAIC_DISPLAY_ROWS][NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS]; } NV_MOSAIC_TOPO_DETAILS; //! Macro for constructing te vesion field of NV_MOSAIC_TOPO_DETAILS #define NVAPI_MOSAIC_TOPO_DETAILS_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_DETAILS,1) // //! These values refer to the different types of Mosaic topologies that are possible. When //! getting the supported Mosaic topologies, you can specify one of these types to narrow down //! the returned list to only those that match the given type. typedef enum { NV_MOSAIC_TOPO_TYPE_ALL, //!< All mosaic topologies NV_MOSAIC_TOPO_TYPE_BASIC, //!< Basic Mosaic topologies NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO, //!< Passive Stereo topologies NV_MOSAIC_TOPO_TYPE_SCALED_CLONE, //!< Not supported at this time NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO_SCALED_CLONE, //!< Not supported at this time NV_MOSAIC_TOPO_TYPE_MAX, //!< Always leave this at end of the enum } NV_MOSAIC_TOPO_TYPE; // //! This is a complete list of supported Mosaic topologies. //! //! Using a "Basic" topology combines multiple monitors to create a single desktop. //! //! Using a "Passive" topology combines multiples monitors to create a passive stereo desktop. //! In passive stereo, two identical topologies combine - one topology is used for the right eye and the other identical //! topology (targeting different displays) is used for the left eye. \n //! NOTE: common\inc\nvEscDef.h shadows a couple PASSIVE_STEREO enums. If this //! enum list changes and effects the value of NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO //! please update the corresponding value in nvEscDef.h typedef enum { NV_MOSAIC_TOPO_NONE, // 'BASIC' topos start here // // The result of using one of these Mosaic topos is that multiple monitors // will combine to create a single desktop. // NV_MOSAIC_TOPO_BEGIN_BASIC, NV_MOSAIC_TOPO_1x2_BASIC = NV_MOSAIC_TOPO_BEGIN_BASIC, NV_MOSAIC_TOPO_2x1_BASIC, NV_MOSAIC_TOPO_1x3_BASIC, NV_MOSAIC_TOPO_3x1_BASIC, NV_MOSAIC_TOPO_1x4_BASIC, NV_MOSAIC_TOPO_4x1_BASIC, NV_MOSAIC_TOPO_2x2_BASIC, NV_MOSAIC_TOPO_2x3_BASIC, NV_MOSAIC_TOPO_2x4_BASIC, NV_MOSAIC_TOPO_3x2_BASIC, NV_MOSAIC_TOPO_4x2_BASIC, NV_MOSAIC_TOPO_1x5_BASIC, NV_MOSAIC_TOPO_1x6_BASIC, NV_MOSAIC_TOPO_7x1_BASIC, // Add padding for 10 more entries. 6 will be enough room to specify every // possible topology with 8 or fewer displays, so this gives us a little // extra should we need it. NV_MOSAIC_TOPO_END_BASIC = NV_MOSAIC_TOPO_7x1_BASIC + 9, // 'PASSIVE_STEREO' topos start here // // The result of using one of these Mosaic topos is that multiple monitors // will combine to create a single PASSIVE STEREO desktop. What this means is // that there will be two topos that combine to create the overall desktop. // One topo will be used for the left eye, and the other topo (of the // same rows x cols), will be used for the right eye. The difference between // the two topos is that different GPUs and displays will be used. // NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO, // value shadowed in nvEscDef.h NV_MOSAIC_TOPO_1x2_PASSIVE_STEREO = NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO, NV_MOSAIC_TOPO_2x1_PASSIVE_STEREO, NV_MOSAIC_TOPO_1x3_PASSIVE_STEREO, NV_MOSAIC_TOPO_3x1_PASSIVE_STEREO, NV_MOSAIC_TOPO_1x4_PASSIVE_STEREO, NV_MOSAIC_TOPO_4x1_PASSIVE_STEREO, NV_MOSAIC_TOPO_2x2_PASSIVE_STEREO, NV_MOSAIC_TOPO_END_PASSIVE_STEREO = NV_MOSAIC_TOPO_2x2_PASSIVE_STEREO + 4, // // Total number of topos. Always leave this at the end of the enumeration. // NV_MOSAIC_TOPO_MAX //! Total number of topologies. } NV_MOSAIC_TOPO; // //! This is a "topology brief" structure. It tells you what you need to know about //! a topology at a high level. A list of these is returned when you query for the //! supported Mosaic information. //! //! If you need more detailed information about the topology, call //! NvAPI_Mosaic_GetTopoGroup() with the topology value from this structure. typedef struct { NvU32 version; //!< Version of this structure NV_MOSAIC_TOPO topo; //!< The topology NvU32 enabled; //!< 1 if topo is enabled, else 0 NvU32 isPossible; //!< 1 if topo *can* be enabled, else 0 } NV_MOSAIC_TOPO_BRIEF; //! Macro for constructing the version field of NV_MOSAIC_TOPO_BRIEF #define NVAPI_MOSAIC_TOPO_BRIEF_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_BRIEF,1) // //! Basic per-display settings that are used in setting/getting the Mosaic mode typedef struct _NV_MOSAIC_DISPLAY_SETTING_V1 { NvU32 version; //!< Version of this structure NvU32 width; //!< Per-display width NvU32 height; //!< Per-display height NvU32 bpp; //!< Bits per pixel NvU32 freq; //!< Display frequency } NV_MOSAIC_DISPLAY_SETTING_V1; typedef struct NV_MOSAIC_DISPLAY_SETTING_V2 { NvU32 version; //!< Version of this structure NvU32 width; //!< Per-display width NvU32 height; //!< Per-display height NvU32 bpp; //!< Bits per pixel NvU32 freq; //!< Display frequency NvU32 rrx1k; //!< Display frequency in x1k } NV_MOSAIC_DISPLAY_SETTING_V2; typedef NV_MOSAIC_DISPLAY_SETTING_V2 NV_MOSAIC_DISPLAY_SETTING; //! Macro for constructing the version field of NV_MOSAIC_DISPLAY_SETTING #define NVAPI_MOSAIC_DISPLAY_SETTING_VER1 MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_SETTING_V1,1) #define NVAPI_MOSAIC_DISPLAY_SETTING_VER2 MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_SETTING_V2,2) #define NVAPI_MOSAIC_DISPLAY_SETTING_VER NVAPI_MOSAIC_DISPLAY_SETTING_VER2 // // Set a reasonable max number of display settings to support // so arrays are bound. // #define NV_MOSAIC_DISPLAY_SETTINGS_MAX 40 //!< Set a reasonable maximum number of display settings to support //! so arrays are bound. // //! This structure is used to contain a list of supported Mosaic topologies //! along with the display settings that can be used. typedef struct _NV_MOSAIC_SUPPORTED_TOPO_INFO_V1 { NvU32 version; //!< Version of this structure NvU32 topoBriefsCount; //!< Number of topologies in below array NV_MOSAIC_TOPO_BRIEF topoBriefs[NV_MOSAIC_TOPO_MAX]; //!< List of supported topologies with only brief details NvU32 displaySettingsCount; //!< Number of display settings in below array NV_MOSAIC_DISPLAY_SETTING_V1 displaySettings[NV_MOSAIC_DISPLAY_SETTINGS_MAX]; //!< List of per display settings possible } NV_MOSAIC_SUPPORTED_TOPO_INFO_V1; typedef struct _NV_MOSAIC_SUPPORTED_TOPO_INFO_V2 { NvU32 version; //!< Version of this structure NvU32 topoBriefsCount; //!< Number of topologies in below array NV_MOSAIC_TOPO_BRIEF topoBriefs[NV_MOSAIC_TOPO_MAX]; //!< List of supported topologies with only brief details NvU32 displaySettingsCount; //!< Number of display settings in below array NV_MOSAIC_DISPLAY_SETTING_V2 displaySettings[NV_MOSAIC_DISPLAY_SETTINGS_MAX]; //!< List of per display settings possible } NV_MOSAIC_SUPPORTED_TOPO_INFO_V2; typedef NV_MOSAIC_SUPPORTED_TOPO_INFO_V2 NV_MOSAIC_SUPPORTED_TOPO_INFO; //! Macro forconstructing the version field of NV_MOSAIC_SUPPORTED_TOPO_INFO #define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER1 MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPO_INFO_V1,1) #define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER2 MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPO_INFO_V2,2) #define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER2 // // Indices to use to access the topos array within the mosaic topology #define NV_MOSAIC_TOPO_IDX_DEFAULT 0 #define NV_MOSAIC_TOPO_IDX_LEFT_EYE 0 #define NV_MOSAIC_TOPO_IDX_RIGHT_EYE 1 #define NV_MOSAIC_TOPO_NUM_EYES 2 // //! This defines the maximum number of topos that can be in a topo group. //! At this time, it is set to 2 because our largest topo group (passive //! stereo) only needs 2 topos (left eye and right eye). //! //! If a new topo group with more than 2 topos is added above, then this //! number will also have to be incremented. #define NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP 2 // //! This structure defines a group of topologies that work together to create one //! overall layout. All of the supported topologies are represented with this //! structure. //! //! For example, a 'Passive Stereo' topology would be represented with this //! structure, and would have separate topology details for the left and right eyes. //! The count would be 2. A 'Basic' topology is also represented by this structure, //! with a count of 1. //! //! The structure is primarily used internally, but is exposed to applications in a //! read-only fashion because there are some details in it that might be useful //! (like the number of rows/cols, or connected display information). A user can //! get the filled-in structure by calling NvAPI_Mosaic_GetTopoGroup(). //! //! You can then look at the detailed values within the structure. There are no //! entrypoints which take this structure as input (effectively making it read-only). typedef struct { NvU32 version; //!< Version of this structure NV_MOSAIC_TOPO_BRIEF brief; //!< The brief details of this topo NvU32 count; //!< Number of topos in array below NV_MOSAIC_TOPO_DETAILS topos[NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP]; } NV_MOSAIC_TOPO_GROUP; //! Macro for constructing the version field of NV_MOSAIC_TOPO_GROUP #define NVAPI_MOSAIC_TOPO_GROUP_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_GROUP,1) //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_GetSupportedTopoInfo // //! DESCRIPTION: This API returns information on the topologies and display resolutions //! supported by Mosaic mode. //! //! NOTE: Not all topologies returned can be set immediately. //! See 'OUT' Notes below. //! //! Once you get the list of supported topologies, you can call //! NvAPI_Mosaic_GetTopoGroup() with one of the Mosaic topologies if you need //! more information about it. //! //! 'IN' Notes: pSupportedTopoInfo->version must be set before calling this function. //! If the specified version is not supported by this implementation, //! an error will be returned (NVAPI_INCOMPATIBLE_STRUCT_VERSION). //! //! 'OUT' Notes: Some of the topologies returned might not be valid for one reason or //! another. It could be due to mismatched or missing displays. It //! could also be because the required number of GPUs is not found. //! At a high level, you can see if the topology is valid and can be enabled //! by looking at the pSupportedTopoInfo->topoBriefs[xxx].isPossible flag. //! If this is true, the topology can be enabled. If it //! is false, you can find out why it cannot be enabled by getting the //! details of the topology via NvAPI_Mosaic_GetTopoGroup(). From there, //! look at the validityMask of the individual topologies. The bits can //! be tested against the NV_MOSAIC_TOPO_VALIDITY_* bits. //! //! It is possible for this function to return NVAPI_OK with no topologies //! listed in the return structure. If this is the case, it means that //! the current hardware DOES support Mosaic, but with the given configuration //! no valid topologies were found. This most likely means that SLI was not //! enabled for the hardware. Once enabled, you should see valid topologies //! returned from this function. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! //! \param [in,out] pSupportedTopoInfo Information about what topologies and display resolutions //! are supported for Mosaic. //! \param [in] type The type of topologies the caller is interested in //! getting. See NV_MOSAIC_TOPO_TYPE for possible values. //! //! \retval ::NVAPI_OK No errors in returning supported topologies. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware. //! \retval ::NVAPI_INVALID_ARGUMENT One or more arguments 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_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not // compatible with this entry point. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_GetSupportedTopoInfo(NV_MOSAIC_SUPPORTED_TOPO_INFO *pSupportedTopoInfo, NV_MOSAIC_TOPO_TYPE type); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_GetTopoGroup // //! DESCRIPTION: This API returns a structure filled with the details //! of the specified Mosaic topology. //! //! If the pTopoBrief passed in matches the current topology, //! then information in the brief and group structures //! will reflect what is current. Thus the brief would have //! the current 'enable' status, and the group would have the //! current overlap values. If there is no match, then the //! returned brief has an 'enable' status of FALSE (since it //! is obviously not enabled), and the overlap values will be 0. //! //! 'IN' Notes: pTopoGroup->version must be set before calling this function. //! If the specified version is not supported by this implementation, //! an error will be returned (NVAPI_INCOMPATIBLE_STRUCT_VERSION). //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] pTopoBrief The topology for getting the details //! This must be one of the topology briefs //! returned from NvAPI_Mosaic_GetSupportedTopoInfo(). //! \param [in,out] pTopoGroup The topology details matching the brief //! //! \retval ::NVAPI_OK Details were retrieved successfully. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss 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_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not // compatible with this entry point. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_GetTopoGroup(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_TOPO_GROUP *pTopoGroup); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_GetOverlapLimits // //! DESCRIPTION: This API returns the X and Y overlap limits required if //! the given Mosaic topology and display settings are to be used. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] pTopoBrief The topology for getting limits //! This must be one of the topo briefs //! returned from NvAPI_Mosaic_GetSupportedTopoInfo(). //! \param [in] pDisplaySetting The display settings for getting the limits. //! This must be one of the settings //! returned from NvAPI_Mosaic_GetSupportedTopoInfo(). //! \param [out] pMinOverlapX X overlap minimum //! \param [out] pMaxOverlapX X overlap maximum //! \param [out] pMinOverlapY Y overlap minimum //! \param [out] pMaxOverlapY Y overlap maximum //! //! \retval ::NVAPI_OK Details were retrieved successfully. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss 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_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not //! compatible with this entry point. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_GetOverlapLimits(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 *pMinOverlapX, NvS32 *pMaxOverlapX, NvS32 *pMinOverlapY, NvS32 *pMaxOverlapY); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_SetCurrentTopo // //! DESCRIPTION: This API sets the Mosaic topology and performs a mode switch //! using the given display settings. //! //! If NVAPI_OK is returned, the current Mosaic topology was set //! correctly. Any other status returned means the //! topology was not set, and remains what it was before this //! function was called. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] pTopoBrief The topology to set. This must be one of the topologies returned from //! NvAPI_Mosaic_GetSupportedTopoInfo(), and it must have an isPossible value of 1. //! \param [in] pDisplaySetting The per display settings to be used in the Mosaic mode. This must be one of the //! settings returned from NvAPI_Mosaic_GetSupportedTopoInfo(). //! \param [in] overlapX The pixel overlap to use between horizontal displays (use positive a number for //! overlap, or a negative number to create a gap.) If the overlap is out of bounds //! for what is possible given the topo and display setting, the overlap will be clamped. //! \param [in] overlapY The pixel overlap to use between vertical displays (use positive a number for //! overlap, or a negative number to create a gap.) If the overlap is out of bounds for //! what is possible given the topo and display setting, the overlap will be clamped. //! \param [in] enable If 1, the topology being set will also be enabled, meaning that the mode set will //! occur. \n //! If 0, you don't want to be in Mosaic mode right now, but want to set the current //! Mosaic topology so you can enable it later with NvAPI_Mosaic_EnableCurrentTopo(). //! //! \retval ::NVAPI_OK The Mosaic topology was set. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss passed in are invalid. //! \retval ::NVAPI_TOPO_NOT_POSSIBLE The topology passed in is not currently possible. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not //! compatible with this entrypoint. //! \retval ::NVAPI_MODE_CHANGE_FAILED There was an error changing the display mode. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_SetCurrentTopo(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 overlapX, NvS32 overlapY, NvU32 enable); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_GetCurrentTopo // //! DESCRIPTION: This API returns information for the current Mosaic topology. //! This includes topology, display settings, and overlap values. //! //! You can call NvAPI_Mosaic_GetTopoGroup() with the topology //! if you require more information. //! //! If there isn't a current topology, then pTopoBrief->topo will //! be NV_MOSAIC_TOPO_NONE. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [out] pTopoBrief The current Mosaic topology //! \param [out] pDisplaySetting The current per-display settings //! \param [out] pOverlapX The pixel overlap between horizontal displays //! \param [out] pOverlapY The pixel overlap between vertical displays //! //! \retval ::NVAPI_OK Success getting current info. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss passed in are invalid. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first. //! \retval ::NVAPI_NO_IMPLEMENTATION This entry point not available. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_GetCurrentTopo(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 *pOverlapX, NvS32 *pOverlapY); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_EnableCurrentTopo // //! DESCRIPTION: This API enables or disables the current Mosaic topology //! based on the setting of the incoming 'enable' parameter. //! //! An "enable" setting enables the current (previously set) Mosaic topology. //! Note that when the current Mosaic topology is retrieved, it must have an isPossible value of 1 or //! an error will occur. //! //! A "disable" setting disables the current Mosaic topology. //! The topology information will persist, even across reboots. //! To re-enable the Mosaic topology, call this function //! again with the enable parameter set to 1. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] enable 1 to enable the current Mosaic topo, 0 to disable it. //! //! \retval ::NVAPI_OK The Mosaic topo was enabled/disabled. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware. //! \retval ::NVAPI_INVALID_ARGUMENT One or more arguments passed in are invalid. //! \retval ::NVAPI_TOPO_NOT_POSSIBLE The current topology is not currently possible. //! \retval ::NVAPI_MODE_CHANGE_FAILED There was an error changing the display mode. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_EnableCurrentTopo(NvU32 enable); //! \ingroup mosaicapi //! @{ typedef struct _NV_MOSAIC_GRID_TOPO_DISPLAY_V1 { NvU32 displayId; //!< DisplayID of the display NvS32 overlapX; //!< (+overlap, -gap) NvS32 overlapY; //!< (+overlap, -gap) NV_ROTATE rotation; //!< Rotation of display NvU32 cloneGroup; //!< Reserved, must be 0 } NV_MOSAIC_GRID_TOPO_DISPLAY_V1; typedef enum _NV_PIXEL_SHIFT_TYPE { NV_PIXEL_SHIFT_TYPE_NO_PIXEL_SHIFT = 0, //!< No pixel shift will be applied to this display. NV_PIXEL_SHIFT_TYPE_2x2_TOP_LEFT_PIXELS = 1, //!< This display will be used to scanout top left pixels in 2x2 PixelShift configuration NV_PIXEL_SHIFT_TYPE_2x2_BOTTOM_RIGHT_PIXELS = 2, //!< This display will be used to scanout bottom right pixels in 2x2 PixelShift configuration NV_PIXEL_SHIFT_TYPE_2x2_TOP_RIGHT_PIXELS = 4, //!< This display will be used to scanout top right pixels in 2x2 PixelShift configuration NV_PIXEL_SHIFT_TYPE_2x2_BOTTOM_LEFT_PIXELS = 8, //!< This display will be used to scanout bottom left pixels in 2x2 PixelShift configuration } NV_PIXEL_SHIFT_TYPE; typedef struct _NV_MOSAIC_GRID_TOPO_DISPLAY_V2 { NvU32 version; //!< Version of this structure NvU32 displayId; //!< DisplayID of the display NvS32 overlapX; //!< (+overlap, -gap) NvS32 overlapY; //!< (+overlap, -gap) NV_ROTATE rotation; //!< Rotation of display NvU32 cloneGroup; //!< Reserved, must be 0 NV_PIXEL_SHIFT_TYPE pixelShiftType; //!< Type of the pixel shift enabled display } NV_MOSAIC_GRID_TOPO_DISPLAY_V2; #ifndef NV_MOSAIC_GRID_TOPO_DISPLAY_VER typedef NV_MOSAIC_GRID_TOPO_DISPLAY_V1 NV_MOSAIC_GRID_TOPO_DISPLAY; #endif typedef struct _NV_MOSAIC_GRID_TOPO_V1 { NvU32 version; //!< Version of this structure NvU32 rows; //!< Number of rows NvU32 columns; //!< Number of columns NvU32 displayCount; //!< Number of display details NvU32 applyWithBezelCorrect : 1; //!< When enabling and doing the modeset, do we switch to the bezel-corrected resolution NvU32 immersiveGaming : 1; //!< Enable as immersive gaming instead of Mosaic SLI (for Quadro-boards only) NvU32 baseMosaic : 1; //!< Enable as Base Mosaic (Panoramic) instead of Mosaic SLI (for NVS and Quadro-boards only) NvU32 driverReloadAllowed : 1; //!< If necessary, reloading the driver is permitted (for Vista and above only). Will not be persisted. Value undefined on get. NvU32 acceleratePrimaryDisplay : 1; //!< Enable SLI acceleration on the primary display while in single-wide mode (For Immersive Gaming only). Will not be persisted. Value undefined on get. NvU32 reserved : 27; //!< Reserved, must be 0 NV_MOSAIC_GRID_TOPO_DISPLAY_V1 displays[NV_MOSAIC_MAX_DISPLAYS]; //!< Displays are done as [(row * columns) + column] NV_MOSAIC_DISPLAY_SETTING_V1 displaySettings; //!< Display settings } NV_MOSAIC_GRID_TOPO_V1; typedef struct _NV_MOSAIC_GRID_TOPO_V2 { NvU32 version; //!< Version of this structure NvU32 rows; //!< Number of rows NvU32 columns; //!< Number of columns NvU32 displayCount; //!< Number of display details NvU32 applyWithBezelCorrect : 1; //!< When enabling and doing the modeset, do we switch to the bezel-corrected resolution NvU32 immersiveGaming : 1; //!< Enable as immersive gaming instead of Mosaic SLI (for Quadro-boards only) NvU32 baseMosaic : 1; //!< Enable as Base Mosaic (Panoramic) instead of Mosaic SLI (for NVS and Quadro-boards only) NvU32 driverReloadAllowed : 1; //!< If necessary, reloading the driver is permitted (for Vista and above only). Will not be persisted. Value undefined on get. NvU32 acceleratePrimaryDisplay : 1; //!< Enable SLI acceleration on the primary display while in single-wide mode (For Immersive Gaming only). Will not be persisted. Value undefined on get. NvU32 pixelShift : 1; //!< Enable Pixel shift NvU32 reserved : 26; //!< Reserved, must be 0 NV_MOSAIC_GRID_TOPO_DISPLAY_V2 displays[NV_MOSAIC_MAX_DISPLAYS]; //!< Displays are done as [(row * columns) + column] NV_MOSAIC_DISPLAY_SETTING_V1 displaySettings; //!< Display settings } NV_MOSAIC_GRID_TOPO_V2; //! Macro for constructing the version field of ::NV_MOSAIC_GRID_TOPO #define NV_MOSAIC_GRID_TOPO_VER1 MAKE_NVAPI_VERSION(NV_MOSAIC_GRID_TOPO_V1,1) #define NV_MOSAIC_GRID_TOPO_VER2 MAKE_NVAPI_VERSION(NV_MOSAIC_GRID_TOPO_V2,2) #ifndef NV_MOSAIC_GRID_TOPO_VER typedef NV_MOSAIC_GRID_TOPO_V2 NV_MOSAIC_GRID_TOPO; //! Macro for constructing the version field of ::NV_MOSAIC_GRID_TOPO #define NV_MOSAIC_GRID_TOPO_VER NV_MOSAIC_GRID_TOPO_VER2 #endif //! @} //! \ingroup mosaicapi //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_SetGridTopology // //! \fn NvAPI_Mosaic_SetGridTopology(NV_MOSAIC_GRID_TOPO *pGridTopology, NvU32 enable) //! DESCRIPTION: This API sets a grid-based Mosaic topology and does a //! mode change using the given display settings. //! //! If NVAPI_OK is returned, the requested Mosaic topo was set //! correctly. Any other status returned means the //! topo was not set, and remains what it was before this //! function was called. It is possible for this API to return //! success, but the displays enabled have an issue, leading //! to a black screen. //! //! Note: Not all exposed features are available on all //! platforms. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pGridTopology The topology details to set. //! \param [in] enable If 1, the topo being set will also be enabled, //! meaning that the mode set will occur. //! Passing a 0 means you don't want to be in //! Mosaic mode right now, but want to set the current //! Mosaic topo so you can enable it later with //! NvAPI_Mosaic_EnableCurrentTopo(). //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! \retval ::NVAPI_NO_ACTIVE_SLI_TOPOLOGY GPUs are not currently in SLI //! \retval ::NVAPI_INVALID_COMBINATION The current SLI set does not support Mosaic SLI or Immersive Gaming //! \retval ::NVAPI_SLI_RENDERING_MODE_NOTALLOWED The current display configuration cannot be used for the requested //! mosaic topology (for instance, having the displays only in the center //! of the SLI topology), or does not support center display //! acceleration // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_SetGridTopology(NV_MOSAIC_GRID_TOPO *pGridTopology, NvU32 enable); //! @} //! \ingroup mosaicapi //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_GetMosaicCapabilities // //! \fn NvAPI_Mosaic_GetMosaicCapabilities(NV_GPU_VALID_GPU_TOPOLOGIES *pSliTopology, NV_MOSAIC_CAPS *pCaps) //! DESCRIPTION: This API returns a set of capabilities based on a provided //! SLI topology. The pSliTopology is the same parameter as //! used for NvAPI_SetGpuTopologies. If more than one SLI //! topology is marked to be active, only the first active //! topology will be validated. //! At least one topology in pSliTopology must have the //! NV_GPU_TOPOLOGY_ACTIVE flag set. This does not require the //! topology to be currently active, but marks which topology //! will have the capabilities retrieved for. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pSliTopology SLI topology for capabilties query //! \param [out] pCaps Capabilities for Mosaic SLI //! //! \retval ::NVAPI_OK Capabilities have been returned. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumenets passed in are invalid. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first. //! \retval ::NVAPI_NO_ACTIVE_SLI_TOPOLOGY No topology had the ::NV_GPU_TOPOLOGY_ACTIVE flag marked. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint is not available. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. // /////////////////////////////////////////////////////////////////////////////// //! See NvAPI_Mosaic_GetMosaicCapabilities{}. typedef struct { NvU32 version; //!< Must be set to ::NV_MOSAIC_CAPS_VER. NvU32 bSupportsImmersiveGaming : 1; //!< These GPUs could enter immersive gaming if proper displays are attached. NvU32 bSupportsMosaicSli : 1; //!< Supports QuadroPlex Mosaic SLI. NvU32 bSupportsGlobalRotation : 1; //!< All displays must share rotation. NvU32 bSupportsPerDisplayRotation : 1; //!< Each display may have a different rotation. NvU32 bSupportsPerDisplaySettings : 1; //!< Each display may have a different resolution. NvU32 bSupportsOverlap : 1; //!< Overlap is supported (+overlap). NvU32 bSupportsGaps : 1; //!< Gap is supported (-overlap). NvU32 bSupportsUnevenGapping : 1; //!< Allows for each display to have different overlap values. NvU32 bSupportsBaseMosaic : 1; //!< These GPUs could enter base Mosaic if proper displays are attached NvU32 reserved : 23; //!< Reserved, must be 0 } NV_MOSAIC_CAPS_V1; //! See NvAPI_Mosaic_GetMosaicCapabilities{}. typedef struct { NvU32 version; //!< Must be set to ::NV_MOSAIC_CAPS_VER. NvU32 bSupportsImmersiveGaming : 1; //!< These GPUs could enter immersive gaming if proper displays are attached. NvU32 bSupportsMosaic : 1; //!< Supports Mosaic. NvU32 bSupportsGlobalRotation : 1; //!< All displays must share rotation. NvU32 bSupportsPerDisplayRotation : 1; //!< Each display may have a different rotation. NvU32 bSupportsPerDisplaySettings : 1; //!< Each display may have a different resolution. NvU32 bSupportsOverlap : 1; //!< Overlap is supported (+overlap). NvU32 bSupportsGaps : 1; //!< Gap is supported (-overlap). NvU32 bSupportsUnevenGapping : 1; //!< Allows for each display to have different overlap values. NvU32 bSupportsPassiveStereo : 1; //!< Allows passive stereo using clone groups. NvU32 bSupportsPixelShift : 1; //!< Supports Pixel Shift mode. NvU32 reserved : 22; //!< Reserved, must be 0 } NV_MOSAIC_CAPS_V2; //! See NvAPI_Mosaic_GetMosaicCapabilities{}. typedef struct { NvU32 version; //!< Must be set to ::NV_MOSAIC_CAPS_VER. NvU32 bSupportsImmersiveGaming : 1; //!< These GPUs could enter immersive gaming if proper displays are attached. NvU32 bSupportsMosaic : 1; //!< Supports Mosaic. NvU32 bSupportsGlobalRotation : 1; //!< All displays must share rotation. NvU32 bSupportsPerDisplayRotation : 1; //!< Each display may have a different rotation. NvU32 bSupportsPerDisplaySettings : 1; //!< Each display may have a different resolution. NvU32 bSupportsOverlap : 1; //!< Overlap is supported (+overlap). NvU32 bSupportsGaps : 1; //!< Gap is supported (-overlap). NvU32 bSupportsUnevenGapping : 1; //!< Allows for each display to have different overlap values. NvU32 bSupportsPassiveStereo : 1; //!< Allows passive stereo using clone groups. NvU32 bSupportsPixelShift : 1; //!< Supports 2 Quadrant (top left + bottom right) Pixel Shift mode. NvU32 bSupports4QuadrantPixelShift : 1; //!< Supports 4 Quadrant (top left + bottom right + top right + bottom left) Pixel Shift mode. NvU32 bSupportsPerDisplayMirroring : 1; //!< Supports horizontal and vertical mirroring for each individual display. NvU32 reserved : 20; //!< Reserved, must be 0 } NV_MOSAIC_CAPS_V3; typedef NV_MOSAIC_CAPS_V3 NV_MOSAIC_CAPS; //! Macro for constructing the version field of NV_MOSAIC_CAPS #define NV_MOSAIC_CAPS_VER1 MAKE_NVAPI_VERSION(NV_MOSAIC_CAPS_V1,1) #define NV_MOSAIC_CAPS_VER2 MAKE_NVAPI_VERSION(NV_MOSAIC_CAPS_V2,2) #define NV_MOSAIC_CAPS_VER3 MAKE_NVAPI_VERSION(NV_MOSAIC_CAPS_V3,3) #define NV_MOSAIC_CAPS_VER NV_MOSAIC_CAPS_VER3 NVAPI_INTERFACE NvAPI_Mosaic_GetMosaicCapabilities(NV_GPU_VALID_GPU_TOPOLOGIES *pSliTopology, NV_MOSAIC_CAPS *pCaps); //! @} //! since Release R290 #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_DISPLAY_ON_INVALID_GPU NV_BIT(0) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_DISPLAY_ON_WRONG_CONNECTOR NV_BIT(1) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_COMMON_TIMINGS NV_BIT(2) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_EDID_AVAILABLE NV_BIT(3) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_MISMATCHED_OUTPUT_TYPE NV_BIT(4) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_DISPLAY_CONNECTED NV_BIT(5) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_GPU_TOPOLOGY NV_BIT(6) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NOT_SUPPORTED NV_BIT(7) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_SLI_BRIDGE NV_BIT(8) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_ECC_ENABLED NV_BIT(9) #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_GPU_TOPOLOGY_NOT_SUPPORTED NV_BIT(10) //! \ingroup mosaicapi //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_GetDisplayCapabilities // //! \fn NvAPI_Mosaic_GetDisplayCapabilities(NV_MOSAIC_DISPLAY_CAPS *pDisplayCaps) //! DESCRIPTION: This API returns a set of capabilities based on a provided //! displays. The caller uses this function to determine if a //! given set of displays, regardless of SLI topology, would //! support Mosaic SLI / Immersive Gaming. This API can also //! assist in identifying if a display would be compatible, //! but is currently plugged into the wrong connector of a GPU. //! //! Problem flags are SLI-agnostic. This API will not verify //! that all displays are on the same SLI topology. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in,out] pDisplayCaps List of display capabilities and //! problem codes, as well as list of //! valid display settings shared by the //! selected monitors. //! //! \retval ::NVAPI_OK The display capabilities have been returned. //! \retval ::NVAPI_INVALID_ARGUMENT One or more arguments passed in are invalid. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint is not available. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. // /////////////////////////////////////////////////////////////////////////////// //! See ::NV_MOSAIC_DISPLAY_CAPS. typedef struct { NvU32 displayId; //!< (IN) DisplayID of display NvU32 problemFlags; //!< (OUT) Any problem flags found (NV_MOSAIC_DISPLAYCAPS_PROBLEM_*) NvU32 supportsRotation : 1; //!< (OUT) This display can be rotated NvU32 reserved : 31; //!< (OUT) reserved } NV_MOSAIC_DISPLAY_DETAILS; //! See NvAPI_Mosaic_GetDisplayCapabilities(). typedef struct _NV_MOSAIC_DISPLAY_CAPS_V1 { NvU32 version; //!< (IN) Must be NV_MOSAIC_DISPLAY_CAPS_VER NvU32 displayCount; //!< (IN) Number of valid displays in displays array NV_MOSAIC_DISPLAY_DETAILS displays[NVAPI_MAX_DISPLAYS]; //!< (IN/OUT) Array of individual displays, the first //!< display will be used to validate the remaining displays //!< for EDID matching. There is other order dependency. NvU32 displaySettingsCount; //!< (OUT) Number of valid display settings found NV_MOSAIC_DISPLAY_SETTING_V1 displaySettings[NV_MOSAIC_DISPLAY_SETTINGS_MAX]; //!< (OUT) List of common timings NvU32 problemFlags; //!< (OUT) Any problem flags found (NV_MOSAIC_DISPLAYCAPS_PROBLEM_*) } NV_MOSAIC_DISPLAY_CAPS_V1; #define NV_MOSAIC_DISPLAY_CAPS_MAX 1600 //! See NvAPI_Mosaic_GetDisplayCapabilities(). typedef struct _NV_MOSAIC_DISPLAY_CAPS_V2 { NvU32 version; //!< (IN) Must be NV_MOSAIC_DISPLAY_CAPS_VER NvU32 displayCount; //!< (IN) Number of valid displays in displays array NV_MOSAIC_DISPLAY_DETAILS displays[NVAPI_MAX_DISPLAYS]; //!< (IN/OUT) Array of individual displays, the first //!< display will be used to validate the remaining displays //!< for EDID matching. There is other order dependency. NvU32 displaySettingsCount; //!< (OUT) Number of valid display settings found NV_MOSAIC_DISPLAY_SETTING_V1 displaySettings[NV_MOSAIC_DISPLAY_CAPS_MAX]; // (OUT) List of common timings NvU32 problemFlags; //!< (OUT) Any problem flags found (NV_MOSAIC_DISPLAYCAPS_PROBLEM_*) } NV_MOSAIC_DISPLAY_CAPS_V2; typedef struct _NV_MOSAIC_DISPLAY_CAPS_V3 { NvU32 version; //!< (IN) Must be NV_MOSAIC_DISPLAY_CAPS_VER NvU32 displayCount; //!< (IN) Number of valid displays in displays array NV_MOSAIC_DISPLAY_DETAILS displays[NVAPI_MAX_DISPLAYS]; //!< (IN/OUT) Array of individual displays, the first //!< display will be used to validate the remaining displays //!< for EDID matching. There is other order dependency. NvU32 displaySettingsCount; //!< (OUT) Number of valid display settings found NV_MOSAIC_DISPLAY_SETTING_V2 displaySettings[NV_MOSAIC_DISPLAY_CAPS_MAX]; // (OUT) List of common timings NvU32 problemFlags; //!< (OUT) Any problem flags found (NV_MOSAIC_DISPLAYCAPS_PROBLEM_*) } NV_MOSAIC_DISPLAY_CAPS_V3; typedef NV_MOSAIC_DISPLAY_CAPS_V3 NV_MOSAIC_DISPLAY_CAPS; //! Macro for constructing the version field of ::NV_MOSAIC_DISPLAY_CAPS_V1 #define NV_MOSAIC_DISPLAY_CAPS_VER1 MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_CAPS_V1,1) //! Macro for constructing the version field of ::NV_MOSAIC_DISPLAY_CAPS_V2 #define NV_MOSAIC_DISPLAY_CAPS_VER2 MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_CAPS_V2,2) //! Macro for constructing the version field of ::NV_MOSAIC_DISPLAY_CAPS_V3 #define NV_MOSAIC_DISPLAY_CAPS_VER3 MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_CAPS_V3,3) //! Macro for constructing the version field of ::NV_MOSAIC_DISPLAY_CAPS #define NV_MOSAIC_DISPLAY_CAPS_VER NV_MOSAIC_DISPLAY_CAPS_VER3 NVAPI_INTERFACE NvAPI_Mosaic_GetDisplayCapabilities(NV_MOSAIC_DISPLAY_CAPS *pDisplayCaps); //! @} //! \ingroup mosaicapi //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_EnumGridTopologies // //! \fn NvAPI_Mosaic_EnumGridTopologies(NvU32 index, NvU32 flags, NV_MOSAIC_GRID_TOPO *pGridTopology, NvU8* bEnabled) //! DESCRIPTION: This API retrieves the current grid topology information //! for Mosaic SLI. //! //! If there has been no existing call to set a topology //! (either enabled or disable), this call will return //! ::NVAPI_DATA_NOT_FOUND. If the existing data is no longer //! valid due to display connectors being moved, or GPUs //! being moved, ::NVAPI_DATA_NOT_FOUND will also be returned. //! This API does not validate whether SLI is currently //! enabled. //! //! When enumerating all current grid topologies, ::NVAPI_DATA_NOT_FOUND will //! be returned when there are no more topologies. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] index A zero-based index to enumerate //! multiple applied grid topologies. //! \param [in] flags This field controls which data is returned. //! By default, all known topologies are returned. //! A known topology is either an active topology //! or a topology which has been disabled and not //! included in another topology. Unless specified, //! topology validity will be applied during enum, //! and topologies which are no longer valid will //! not be returned (ex: a monitor was disconnected). //! Only topologies which have been enabled in the //! past will be returned, this API will not //! enumerate all possible topologies. To determine //! all possible topologies, manually create each //! possible topology and validate each using //! NvAPI_Mosaic_GetDisplayCapabilities. //! //! \param [in,out] pGridTopology The topology details of the current //! topology. On input, version must be //! properly set, all other fields are ignored. //! \param [out] bEnabled (May pass in NULL to ignore) //! -1 if Mosaic is enabled, //! -0 if Mosaic is currently disabled. //! //! \retval ::NVAPI_OK Mosaic topology was set. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware. //! \retval ::NVAPI_INVALID_ARGUMENT One or more arguments passed in are invalid. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint is not available. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not //! compatible with this entrypoint. //! \retval ::NVAPI_DATA_NOT_FOUND There was no existing valid topology information. //! \retval ::NVAPI_ERROR Miscellaneous error occurred. // /////////////////////////////////////////////////////////////////////////////// #define NVAPI_MOSAIC_ENUMGRIDTOPOS_FLAG_ACTIVE_ONLY NV_BIT(0) #define NVAPI_MOSAIC_ENUMGRIDTOPOS_FLAG_NO_VALIDATION NV_BIT(1) NVAPI_INTERFACE NvAPI_Mosaic_EnumGridTopologies(NvU32 index, NvU32 flags, NV_MOSAIC_GRID_TOPO *pGridTopology, NvU8* bEnabled); //! @} //! 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); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_GetMosaicViewports // //! DESCRIPTION: This API returns the viewport information for a mosaic mode //! passed in by the user. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pGridTopology A grid topology to calculate the //! viewport information. Does not need //! to be currently active. //! \param [in] baseWidth Width of a single display in the //! topology. //! \param [in] baseHeight Height of a single display in the //! topology. //! \param [in] bezelCorrected If set to 1, returns the details for //! bezel corrected. If set to 0, returns //! the details without bezel correction. //! \param [out] totalWidth May be NULL. If passed, will return //! the total width of the mosaic. //! \param [out] totalHeight May be NULL. If passed, will return //! the total height of the mosaic. //! \param [out] viewports Array will be filled in with the //! individual viewport details for //! the topology. //! //! \retval ::NVAPI_OK Capabilities have been returned. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED The NvAPI API needs to be initialized first //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available //! \retval ::NVAPI_ERROR Miscellaneous error occurred //! \ingroup mosaciapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_GetMosaicViewports(NV_MOSAIC_GRID_TOPO *pGridTopology, NvU32 baseWidth, NvU32 baseHeight, NvU8 bezelCorrected, NvU32* totalWidth, NvU32* totalHeight, NV_RECT viewports[NV_MOSAIC_MAX_DISPLAYS]); //! Do not change the current GPU topology. If the NO_DRIVER_RELOAD bit is not //! specified, then it may still require a driver reload. #define NV_MOSAIC_SETDISPLAYTOPO_FLAG_CURRENT_GPU_TOPOLOGY NV_BIT(0) //! Do not allow a driver reload. That is, stick with the same master GPU as well as the //! same SLI configuration. #define NV_MOSAIC_SETDISPLAYTOPO_FLAG_NO_DRIVER_RELOAD NV_BIT(1) //! When choosing a GPU topology, choose the topology with the best performance. //! Without this flag, it will choose the topology that uses the smallest number //! of GPU's. #define NV_MOSAIC_SETDISPLAYTOPO_FLAG_MAXIMIZE_PERFORMANCE NV_BIT(2) //! Do not return an error if no configuration will work with all of the grids. #define NV_MOSAIC_SETDISPLAYTOPO_FLAG_ALLOW_INVALID NV_BIT(3) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_SetDisplayGrids // //! DESCRIPTION: Sets a new display topology, replacing any existing topologies //! that use the same displays. //! //! This function will look for an SLI configuration that will //! allow the display topology to work. //! //! To revert to a single display, specify that display as a 1x1 //! grid. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pGridTopologies The topology details to set. //! \param [in] gridCount The number of elements in the pGridTopologies array. //! \param [in] setTopoFlags Zero or more of the NVAPI_MOSAIC_SETDISPLAYTOPO_FLAG_* //! flags. //! //! //! \retval ::NVAPI_OK Capabilities 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_NO_IMPLEMENTATION This entrypoint not available //! \retval ::NVAPI_NO_ACTIVE_SLI_TOPOLOGY No matching GPU topologies could be found. //! \retval ::NVAPI_TOPO_NOT_POSSIBLE One or more of the display grids are not valid. //! \retval ::NVAPI_ERROR Miscellaneous error occurred //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_SetDisplayGrids(__in_ecount(gridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies, __in NvU32 gridCount, __in NvU32 setTopoFlags); //! \ingroup mosaicapi //! Indicates that a display's position in the grid is sub-optimal. #define NV_MOSAIC_DISPLAYTOPO_WARNING_DISPLAY_POSITION NV_BIT(0) //! \ingroup mosaicapi //! Indicates that SetDisplaySettings would need to perform a driver reload. #define NV_MOSAIC_DISPLAYTOPO_WARNING_DRIVER_RELOAD_REQUIRED NV_BIT(1) //! \ingroup mosaicapi typedef struct { NvU32 version; NvU32 errorFlags; //!< (OUT) Any of the NV_MOSAIC_DISPLAYTOPO_ERROR_* flags. NvU32 warningFlags; //!< (OUT) Any of the NV_MOSAIC_DISPLAYTOPO_WARNING_* flags. NvU32 displayCount; //!< (OUT) The number of valid entries in the displays array. struct { NvU32 displayId; //!< (OUT) The DisplayID of this display. NvU32 errorFlags; //!< (OUT) Any of the NV_MOSAIC_DISPLAYCAPS_PROBLEM_* flags. NvU32 warningFlags; //!< (OUT) Any of the NV_MOSAIC_DISPLAYTOPO_WARNING_* flags. NvU32 supportsRotation : 1; //!< (OUT) This display can be rotated NvU32 reserved : 31; //!< (OUT) reserved } displays[NVAPI_MAX_DISPLAYS]; } NV_MOSAIC_DISPLAY_TOPO_STATUS; //! \ingroup mosaicapi #define NV_MOSAIC_DISPLAY_TOPO_STATUS_VER MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_TOPO_STATUS,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_ValidateDisplayGridsWithSLI // //! \fn NvAPI_Mosaic_ValidateDisplayGridsWithSLI //! \code //! DESCRIPTION: Determines if a list of grid topologies is valid. //! //! This function works the same way as NvAPI_Mosaic_ValidateDisplayGrids90, except //! that the caller specifies an SLI configuration, rather than having NvAPI choose //! one. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! PARAMETERS: pGpuTopologies(IN): The GPU topologies to use. //! pGridTopologies(IN): The array of grid topologies to verify. //! pTopoStatus(IN/OUT): The array of problems and warnings with each topology. //! gridCount(IN): The number of elements in the pGridTopologies and //! pTopoStatus arrays. //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! \endcode /////////////////////////////////////////////////////////////////////////////// //! \ingroup mosaicapi NVAPI_INTERFACE NvAPI_Mosaic_ValidateDisplayGridsWithSLI(__in NV_GPU_VALID_GPU_TOPOLOGIES *pGpuTopologies, __in_ecount(gridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies, __inout_ecount_full(gridCount) NV_MOSAIC_DISPLAY_TOPO_STATUS *pTopoStatus, __in NvU32 gridCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_ValidateDisplayGrids // //! DESCRIPTION: Determines if a list of grid topologies is valid. It will choose an SLI //! configuration in the same way that NvAPI_Mosaic_SetDisplayGrids() does. //! //! On return, each element in the pTopoStatus array will contain any errors or //! warnings about each grid topology. If any error flags are set, then the topology //! is not valid. If any warning flags are set, then the topology is valid, but //! sub-optimal. //! //! If the ALLOW_INVALID flag is set, then it will continue to validate the grids //! even if no SLI configuration will allow all of the grids. In this case, a grid //! grid with no matching GPU topology will have the error //! flags NO_GPU_TOPOLOGY or NOT_SUPPORTED set. //! //! If the ALLOW_INVALID flag is not set and no matching SLI configuration is //! found, then it will skip the rest of the validation and return //! NVAPI_NO_ACTIVE_SLI_TOPOLOGY. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] setTopoFlags Zero or more of the NVAPI_MOSAIC_SETDISPLAYTOPO_FLAG_* //! flags. //! \param [in] pGridTopologies The array of grid topologies to verify. //! \param [in,out] pTopoStatus The array of problems and warnings with each grid topology. //! \param [in] gridCount The number of elements in the pGridTopologies and //! pTopoStatus arrays. //! //! //! \retval ::NVAPI_OK: Capabilities 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_NO_IMPLEMENTATION: This entrypoint not available //! \retval ::NVAPI_NO_ACTIVE_SLI_TOPOLOGY: No matching GPU topologies could be found. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_ValidateDisplayGrids(__in NvU32 setTopoFlags, __in_ecount(gridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies, __inout_ecount_full(gridCount) NV_MOSAIC_DISPLAY_TOPO_STATUS *pTopoStatus, __in NvU32 gridCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_EnumDisplayModes // //! DESCRIPTION: Determines the set of available display modes for a given grid topology. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pGridTopology The grid topology to use. //! \param [in,out] pDisplaySettings A pointer to an array of display settings to populate, //! or NULL to find out the total number of available modes. //! \param [in,out] pDisplayCount If pDisplaySettings is not NULL, then pDisplayCount //! should point to the number of elements in the //! pDisplaySettings array. On return, it will contain the //! number of modes that were actually returned. If //! pDisplaySettings is NULL, then pDisplayCount will receive //! the total number of modes that are available. //! //! //! \retval ::NVAPI_OK Capabilities 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_NO_IMPLEMENTATION This entrypoint not available //! \retval ::NVAPI_ERROR Miscellaneous error occurred //! //! \ingroup mosaciapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_EnumDisplayModes(__in NV_MOSAIC_GRID_TOPO *pGridTopology, __inout_ecount_part_opt(*pDisplayCount, *pDisplayCount) NV_MOSAIC_DISPLAY_SETTING *pDisplaySettings, __inout NvU32 *pDisplayCount); //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_ChooseGpuTopologies // //! DESCRIPTION: Chooses an SLI configuration for a list of grid topologies. //! //! This function will look for a valid SLI configuration that will allow //! each of the grid topologies to work. //! //! On return, the displayGpuIndex field of each active GPU topology will specify //! the master GPU for that topology. //! //! If the CURRENT_GPU_TOPOLOGY flag is set, then it will keep the same physical //! GPU's in each logical GPU, but it may change the master GPU. If the //! NO_DRIVER_RELOAD flag is set, then it will not change the current GPU topology //! at all, but will still verify that the GPU topology is valid. //! //! \param [in] pGridTopologies The grid topologies to use. //! \param [in] gridCount The number of elements in the pGridTopologies array. //! \param [in] setTopoFlags Zero or more of the NVAPI_MOSAIC_SETDISPLAYTOPO_FLAG_* //! flags. //! \param [out] pGpuTopologies The chosen SLI configuration. //! //! //! \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_NO_IMPLEMENTATION This entrypoint not available //! \retval ::NVAPI_NO_ACTIVE_SLI_TOPOLOGY No matching GPU topologies could be found. //! \retval ::NVAPI_ERROR Miscellaneous error occurred //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_ChooseGpuTopologies(__in_ecount(gridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies, __in NvU32 gridCount, __in NvU32 setTopoFlags, __inout NV_GPU_VALID_GPU_TOPOLOGIES *pGpuTopologies); //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Mosaic_EnumDisplayGrids // //! DESCRIPTION: Enumerates the current active grid topologies. This includes Mosaic, IG, and //! Panoramic topologies, as well as single displays. //! //! If pGridTopologies is NULL, then pGridCount will be set to the number of active //! grid topologies. //! //! If pGridTopologies is not NULL, then pGridCount contains the maximum number of //! grid topologies to return. On return, pGridCount will be set to the number of //! grid topologies that were returned. //! //! \param [out] pGridTopologies The list of active grid topologies. //! \param [in,out] pGridCount A pointer to the number of grid topologies returned. //! //! \retval ::NVAPI_OK Capabilties have been returned. //! \retval ::NVAPI_END_ENUMERATION There are no more topologies to return. //! \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 mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Mosaic_EnumDisplayGrids(__inout_ecount_part_opt(*pGridCount, *pGridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies, __inout NvU32 *pGridCount); //////////////////////////////////////////////////////////////////////////////////////// // // ########################################################################### // DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS // // Below is the Phase 1 Mosaic stuff, the Phase 2 stuff above is what will remain // once Phase 2 is complete. For a small amount of time, the two will co-exist. As // soon as apps (nvapichk, NvAPITestMosaic, and CPL) are updated to use the Phase 2 // entrypoints, the code below will be deleted. // // DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS // ########################################################################### // // Supported topos 1x4, 4x1 and 2x2 to start with. // // Selected scan out targets can be one per GPU or more than one on the same GPU. // // SAMPLE of MOSAIC 1x4 SCAN OUT TOPO with 8 pixel horizontal overlap // //+-------------------------++-------------------------++-------------------------++-------------------------+ //| || || || | //| || || || | //| || || || | //| DVI1 || DVI2 || DVI3 || DVI4 | //| || || || | //| || || || | //| || || || | //| || || || | //+-------------------------++-------------------------++-------------------------++-------------------------+ //! \addtogroup mosaicapi //! @{ //! Used in NV_MOSAIC_TOPOLOGY. #define NVAPI_MAX_MOSAIC_DISPLAY_ROWS 8 //! Used in NV_MOSAIC_TOPOLOGY. #define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS 8 //! Used in NV_MOSAIC_TOPOLOGY. #define NVAPI_MAX_MOSAIC_TOPOS 16 //! Used in NvAPI_GetCurrentMosaicTopology() and NvAPI_SetCurrentMosaicTopology(). typedef struct { NvU32 version; //!< Version number of the mosaic topology NvU32 rowCount; //!< Horizontal display count NvU32 colCount; //!< Vertical display count struct { NvPhysicalGpuHandle hPhysicalGPU; //!< Physical GPU to be used in the topology NvU32 displayOutputId; //!< Connected display target NvS32 overlapX; //!< Pixels of overlap on the left of target: (+overlap, -gap) NvS32 overlapY; //!< Pixels of overlap on the top of target: (+overlap, -gap) } gpuLayout[NVAPI_MAX_MOSAIC_DISPLAY_ROWS][NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS]; } NV_MOSAIC_TOPOLOGY; //! Used in NV_MOSAIC_TOPOLOGY. #define NVAPI_MOSAIC_TOPOLOGY_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPOLOGY,1) //! Used in NvAPI_GetSupportedMosaicTopologies(). typedef struct { NvU32 version; NvU32 totalCount; //!< Count of valid topologies NV_MOSAIC_TOPOLOGY topos[NVAPI_MAX_MOSAIC_TOPOS]; //!< Maximum number of topologies } NV_MOSAIC_SUPPORTED_TOPOLOGIES; //! Used in NV_MOSAIC_SUPPORTED_TOPOLOGIES. #define NVAPI_MOSAIC_SUPPORTED_TOPOLOGIES_VER MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPOLOGIES,1) //!@} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetSupportedMosaicTopologies // //! DESCRIPTION: This API returns all valid Mosaic topologies. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 177 //! //! \param [out] pMosaicTopos An array of valid Mosaic topologies. //! //! \retval NVAPI_OK Call succeeded; 1 or more topologies were returned //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid //! \retval NVAPI_MIXED_TARGET_TYPES Mosaic topology is only possible with all targets of the same NV_GPU_OUTPUT_TYPE. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetSupportedMosaicTopologies(NV_MOSAIC_SUPPORTED_TOPOLOGIES *pMosaicTopos); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetCurrentMosaicTopology // //! DESCRIPTION: This API gets the current Mosaic topology. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 177 //! //! \param [out] pMosaicTopo The current Mosaic topology //! \param [out] pEnabled TRUE if returned topology is currently enabled, else FALSE //! //! \retval NVAPI_OK Call succeeded //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetCurrentMosaicTopology(NV_MOSAIC_TOPOLOGY *pMosaicTopo, NvU32 *pEnabled); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SetCurrentMosaicTopology // //! DESCRIPTION: This API sets the Mosaic topology, and enables it so that the //! Mosaic display settings are enumerated upon request. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 177 //! //! \param [in] pMosaicTopo A valid Mosaic topology //! //! \retval NVAPI_OK Call succeeded //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetCurrentMosaicTopology(NV_MOSAIC_TOPOLOGY *pMosaicTopo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_EnableCurrentMosaicTopology // //! DESCRIPTION: This API enables or disables the current Mosaic topology. //! When enabling, the last Mosaic topology will be set. //! //! - If enabled, enumeration of display settings will include valid Mosaic resolutions. //! - If disabled, enumeration of display settings will not include Mosaic resolutions. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 177 //! //! \param [in] enable TRUE to enable the Mosaic Topology, FALSE to disable it. //! //! \retval NVAPI_OK Call succeeded //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed. //! //! \ingroup mosaicapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_EnableCurrentMosaicTopology(NvU32 enable); #define NVAPI_MAX_GSYNC_DEVICES 4 // Sync Display APIs /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GSync_EnumSyncDevices // //! DESCRIPTION: This API returns an array of Sync device handles. A Sync device handle represents a //! single Sync device on the system. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [out] nvGSyncHandles- The caller provides an array of handles, which must contain at least //! NVAPI_MAX_GSYNC_DEVICES elements. The API will zero out the entire array and then fill in one //! or more handles. If an error occurs, the array is invalid. //! \param [out] *gsyncCount- The caller provides the storage space. NvAPI_GSync_EnumSyncDevices //! sets *gsyncCount to indicate how many of the elements in the nvGSyncHandles[] array are valid. //! If an error occurs, *gsyncCount will be set to zero. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval ::NVAPI_INVALID_ARGUMENT nvGSyncHandles or gsyncCount is NULL. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device. //! //! \ingroup gsyncapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GSync_EnumSyncDevices(__out NvGSyncDeviceHandle nvGSyncHandles[NVAPI_MAX_GSYNC_DEVICES], __out NvU32 *gsyncCount); // GSync boardId values #define NVAPI_GSYNC_BOARD_ID_P358 856 //!< GSync board ID 0x358, see NV_GSYNC_CAPABILITIES #define NVAPI_GSYNC_BOARD_ID_P2060 8288 //!< GSync board ID 0x2060, see NV_GSYNC_CAPABILITIES //! \since Release: 375 #define NVAPI_GSYNC_BOARD_ID_P2061 8289 //!< GSync board ID 0x2061, see NV_GSYNC_CAPABILITIES //! Used in NvAPI_GSync_QueryCapabilities(). typedef struct _NV_GSYNC_CAPABILITIES_V1 { NvU32 version; //!< Version of the structure NvU32 boardId; //!< Board ID NvU32 revision; //!< FPGA Revision NvU32 capFlags; //!< Capabilities of the Sync board. Reserved for future use } NV_GSYNC_CAPABILITIES_V1; typedef struct _NV_GSYNC_CAPABILITIES_V2 { NvU32 version; //!< Version of the structure NvU32 boardId; //!< Board ID NvU32 revision; //!< FPGA major revision NvU32 capFlags; //!< Capabilities of the Sync board. Reserved for future use NvU32 extendedRevision; //!< FPGA minor revision } NV_GSYNC_CAPABILITIES_V2; typedef NV_GSYNC_CAPABILITIES_V2 NV_GSYNC_CAPABILITIES; //! \ingroup gsyncapi //! Macro for constructing the version field of NV_GSYNC_CAPABILITIES. #define NV_GSYNC_CAPABILITIES_VER1 MAKE_NVAPI_VERSION(NV_GSYNC_CAPABILITIES_V1,1) #define NV_GSYNC_CAPABILITIES_VER2 MAKE_NVAPI_VERSION(NV_GSYNC_CAPABILITIES_V2,2) #define NV_GSYNC_CAPABILITIES_VER NV_GSYNC_CAPABILITIES_VER2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GSync_QueryCapabilities // //! DESCRIPTION: This API returns the capabilities of the Sync device. //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [in] hNvGSyncDevice- The handle for a Sync device for which the capabilities will be queried. //! \param [inout] *pNvGSyncCapabilities- The caller provides the storage space. NvAPI_GSync_QueryCapabilities() sets //! *pNvGSyncCapabilities to the version and capabilities details of the Sync device //! If an error occurs, *pNvGSyncCapabilities will be set to NULL. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device. //! //! \ingroup gsyncapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GSync_QueryCapabilities(__in NvGSyncDeviceHandle hNvGSyncDevice, __inout NV_GSYNC_CAPABILITIES *pNvGSyncCapabilities); //! Connector values for a GPU. Used in NV_GSYNC_GPU. typedef enum _NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR { NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_NONE = 0, NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_PRIMARY = 1, NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_SECONDARY = 2, NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_TERTIARY = 3, NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_QUARTERNARY = 4, } NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR; //! Display sync states. Used in NV_GSYNC_DISPLAY. typedef enum _NVAPI_GSYNC_DISPLAY_SYNC_STATE { NVAPI_GSYNC_DISPLAY_SYNC_STATE_UNSYNCED = 0, NVAPI_GSYNC_DISPLAY_SYNC_STATE_SLAVE = 1, NVAPI_GSYNC_DISPLAY_SYNC_STATE_MASTER = 2, } NVAPI_GSYNC_DISPLAY_SYNC_STATE; typedef struct _NV_GSYNC_GPU { NvU32 version; //!< Version of the structure NvPhysicalGpuHandle hPhysicalGpu; //!< GPU handle NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR connector; //!< Indicates which connector on the device the GPU is connected to. NvPhysicalGpuHandle hProxyPhysicalGpu; //!< GPU through which hPhysicalGpu is connected to the Sync device (if not directly connected) //!< - this is NULL otherwise NvU32 isSynced : 1; //!< Whether this GPU is sync'd or not. NvU32 reserved : 31; //!< Should be set to ZERO } NV_GSYNC_GPU; typedef struct _NV_GSYNC_DISPLAY { NvU32 version; //!< Version of the structure NvU32 displayId; //!< display identifier for displays.The GPU to which it is connected, can be retireved from NvAPI_SYS_GetPhysicalGpuFromDisplayId NvU32 isMasterable : 1; //!< Can this display be the master? (Read only) NvU32 reserved : 31; //!< Should be set to ZERO NVAPI_GSYNC_DISPLAY_SYNC_STATE syncState; //!< Is this display slave/master //!< (Retrieved with topology or set by caller for enable/disable sync) } NV_GSYNC_DISPLAY; #define NV_GSYNC_DISPLAY_VER MAKE_NVAPI_VERSION(NV_GSYNC_DISPLAY,1) #define NV_GSYNC_GPU_VER MAKE_NVAPI_VERSION(NV_GSYNC_GPU,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GSync_GetTopology // //! DESCRIPTION: This API returns the topology for the specified Sync device. //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [in] hNvGSyncDevice- The caller provides the handle for a Sync device for which the topology will be queried. //! \param [in, out] gsyncGpuCount- It returns number of GPUs connected to Sync device //! \param [in, out] gsyncGPUs- It returns info about GPUs connected to Sync device //! \param [in, out] gsyncDisplayCount- It returns number of active displays that belongs to Sync device //! \param [in, out] gsyncDisplays- It returns info about all active displays that belongs to Sync device //! //! HOW TO USE: 1) make a call to get the number of GPUs connected OR displays synced through Sync device //! by passing the gsyncGPUs OR gsyncDisplays as NULL respectively. Both gsyncGpuCount and gsyncDisplayCount can be retrieved in same call by passing //! both gsyncGPUs and gsyncDisplays as NULL //! On call success: //! 2) Allocate memory based on gsyncGpuCount(for gsyncGPUs) and/or gsyncDisplayCount(for gsyncDisplays) then make a call to populate gsyncGPUs and/or gsyncDisplays respectively. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device. //! \retval ::NVAPI_INSUFFICIENT_BUFFER When the actual number of GPUs/displays in the topology exceed the number of elements allocated for SyncGPUs/SyncDisplays respectively. //! //! \ingroup gsyncapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GSync_GetTopology(__in NvGSyncDeviceHandle hNvGSyncDevice, __inout_opt NvU32 *gsyncGpuCount, __inout_ecount_part_opt(*gsyncGpuCount, *gsyncGpuCount) NV_GSYNC_GPU *gsyncGPUs, __inout_opt NvU32 *gsyncDisplayCount, __inout_ecount_part_opt(*gsyncDisplayCount, *gsyncDisplayCount) NV_GSYNC_DISPLAY *gsyncDisplays); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GSync_SetSyncStateSettings // //! DESCRIPTION: Sets a new sync state for the displays in system. //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [in] gsyncDisplayCount- The number of displays in gsyncDisplays. //! \param [in] pGsyncDisplays- The caller provides the structure containing all displays that need to be synchronized in the system. //! The displays that are not part of pGsyncDisplays, will be un-synchronized. //! \param [in] flags- Reserved for future use. //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval ::NVAPI_INVALID_ARGUMENT If the display topology or count not valid. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device. //! \retval ::NVAPI_INVALID_SYNC_TOPOLOGY 1.If any mosaic grid is partial. //! 2.If timing(HVisible/VVisible/refreshRate) applied of any display is different. //! 3.If There is a across GPU mosaic grid in system and that is not a part of pGsyncDisplays. //! //! \ingroup gsyncapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GSync_SetSyncStateSettings(__in NvU32 gsyncDisplayCount, __in_ecount(gsyncDisplayCount) NV_GSYNC_DISPLAY *pGsyncDisplays, __in NvU32 flags); //! \ingroup gsyncapi //! Source signal edge to be used for output pulse. See NV_GSYNC_CONTROL_PARAMS. typedef enum _NVAPI_GSYNC_POLARITY { NVAPI_GSYNC_POLARITY_RISING_EDGE = 0, NVAPI_GSYNC_POLARITY_FALLING_EDGE = 1, NVAPI_GSYNC_POLARITY_BOTH_EDGES = 2, } NVAPI_GSYNC_POLARITY; //! Used in NV_GSYNC_CONTROL_PARAMS. typedef enum _NVAPI_GSYNC_VIDEO_MODE { NVAPI_GSYNC_VIDEO_MODE_NONE = 0, NVAPI_GSYNC_VIDEO_MODE_TTL = 1, NVAPI_GSYNC_VIDEO_MODE_NTSCPALSECAM = 2, NVAPI_GSYNC_VIDEO_MODE_HDTV = 3, NVAPI_GSYNC_VIDEO_MODE_COMPOSITE = 4, } NVAPI_GSYNC_VIDEO_MODE; //! Used in NV_GSYNC_CONTROL_PARAMS. typedef enum _NVAPI_GSYNC_SYNC_SOURCE { NVAPI_GSYNC_SYNC_SOURCE_VSYNC = 0, NVAPI_GSYNC_SYNC_SOURCE_HOUSESYNC = 1, } NVAPI_GSYNC_SYNC_SOURCE; //! Used in NV_GSYNC_CONTROL_PARAMS. typedef struct _NV_GSYNC_DELAY { NvU32 version; //!< Version of the structure NvU32 numLines; //!< delay to be induced in number of horizontal lines. NvU32 numPixels; //!< delay to be induced in number of pixels. NvU32 maxLines; //!< maximum number of lines supported at current display mode to induce delay. Updated by NvAPI_GSync_GetControlParameters(). Read only. NvU32 minPixels; //!< minimum number of pixels required at current display mode to induce delay. Updated by NvAPI_GSync_GetControlParameters(). Read only. } NV_GSYNC_DELAY; #define NV_GSYNC_DELAY_VER MAKE_NVAPI_VERSION(NV_GSYNC_DELAY,1) //! Used in NvAPI_GSync_GetControlParameters() and NvAPI_GSync_SetControlParameters(). typedef struct _NV_GSYNC_CONTROL_PARAMS { NvU32 version; //!< Version of the structure NVAPI_GSYNC_POLARITY polarity; //!< Leading edge / Falling edge / both NVAPI_GSYNC_VIDEO_MODE vmode; //!< None, TTL, NTSCPALSECAM, HDTV NvU32 interval; //!< Number of pulses to wait between framelock signal generation NVAPI_GSYNC_SYNC_SOURCE source; //!< VSync/House sync NvU32 interlaceMode:1; //!< interlace mode for a Sync device NvU32 syncSourceIsOutput:1; //!< Set this to make house sync as an output; valid only when NV_GSYNC_CONTROL_PARAMS::source is NVAPI_GSYNC_SYNC_SOURCE_VSYNC on P2061 boards. //!< syncSourceIsOutput should always be NVAPI_GSYNC_SYNC_SOURCE_HOUSESYNC i.e. 0 on P2060 boards or when NV_GSYNC_CONTROL_PARAMS::source is set to NVAPI_GSYNC_SYNC_SOURCE_HOUSESYNC. NvU32 reserved:30; //!< should be set zero NV_GSYNC_DELAY syncSkew; //!< The time delay between the frame sync signal and the GPUs signal. NV_GSYNC_DELAY startupDelay; //!< Sync start delay for master. } NV_GSYNC_CONTROL_PARAMS; #define NV_GSYNC_CONTROL_PARAMS_VER MAKE_NVAPI_VERSION(NV_GSYNC_CONTROL_PARAMS,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GSync_GetControlParameters // //! DESCRIPTION: This API queries for sync control parameters as defined in NV_GSYNC_CONTROL_PARAMS. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [in] hNvGSyncDevice- The caller provides the handle of the Sync device for which to get parameters //! \param [inout] *pGsyncControls- The caller provides the storage space. NvAPI_GSync_GetControlParameters() populates *pGsyncControls with values. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device. //! //! \ingroup gsyncapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GSync_GetControlParameters(__in NvGSyncDeviceHandle hNvGSyncDevice, __inout NV_GSYNC_CONTROL_PARAMS *pGsyncControls); ////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GSync_SetControlParameters // //! DESCRIPTION: This API sets control parameters as defined in NV_SYNC_CONTROL_PARAMS. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [in] hNvGSyncDevice- The caller provides the handle of the Sync device for which to get parameters //! \param [inout] *pGsyncControls- The caller provides NV_GSYNC_CONTROL_PARAMS. skew and startDelay will be updated to the applied values. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device. //! \retval ::NVAPI_SYNC_MASTER_NOT_FOUND Control Parameters can only be set if there is a Sync Master enabled on the Gsync card. //! //! \ingroup gsyncapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GSync_SetControlParameters(__in NvGSyncDeviceHandle hNvGSyncDevice, __inout NV_GSYNC_CONTROL_PARAMS *pGsyncControls); //! Used in NvAPI_GSync_AdjustSyncDelay() typedef enum _NVAPI_GSYNC_DELAY_TYPE { NVAPI_GSYNC_DELAY_TYPE_UNKNOWN = 0, NVAPI_GSYNC_DELAY_TYPE_SYNC_SKEW = 1, NVAPI_GSYNC_DELAY_TYPE_STARTUP = 2 } NVAPI_GSYNC_DELAY_TYPE; ////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GSync_AdjustSyncDelay // //! DESCRIPTION: This API adjusts the skew and startDelay to the closest possible values. Use this API before calling NvAPI_GSync_SetControlParameters for skew or startDelay. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 319 //! //! \param [in] hNvGSyncDevice- The caller provides the handle of the Sync device for which to get parameters //! \param [in] delayType- Specifies whether the delay is syncSkew or startupDelay. //! \param [inout] *pGsyncDelay- The caller provides NV_GSYNC_DELAY. skew and startDelay will be adjusted and updated to the closest values. //! \param [out] *syncSteps- This parameter is optional. It returns the sync delay in unit steps. If 0, it means either the NV_GSYNC_DELAY::numPixels is less than NV_GSYNC_DELAY::minPixels or NV_GSYNC_DELAY::numOfLines exceeds the NV_GSYNC_DELAY::maxLines. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup gsyncapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GSync_AdjustSyncDelay(__in NvGSyncDeviceHandle hNvGSyncDevice, __in NVAPI_GSYNC_DELAY_TYPE delayType, __inout NV_GSYNC_DELAY *pGsyncDelay, __out_opt NvU32* syncSteps); //! Used in NvAPI_GSync_GetSyncStatus(). typedef struct _NV_GSYNC_STATUS { NvU32 version; //!< Version of the structure NvU32 bIsSynced; //!< Is timing in sync? NvU32 bIsStereoSynced; //!< Does the phase of the timing signal from the GPU = the phase of the master sync signal? NvU32 bIsSyncSignalAvailable; //!< Is the sync signal available? } NV_GSYNC_STATUS; //! Macro for constructing the version field for NV_GSYNC_STATUS. #define NV_GSYNC_STATUS_VER MAKE_NVAPI_VERSION(NV_GSYNC_STATUS,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GSync_GetSyncStatus // //! DESCRIPTION: This API queries the sync status of a GPU - timing, stereosync and sync signal availability. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [in] hNvGSyncDevice- Handle of the Sync device //! \param [in] hPhysicalGpu- GPU to be queried for sync status. //! \param [out] *status- The caller provides the storage space. NvAPI_GSync_GetSyncStatus() populates *status with //! values - timing, stereosync and signal availability. On error, *status is set to NULL. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL / SyncTarget is NULL. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any G-Sync Device. //! //! \ingroup gsyncapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GSync_GetSyncStatus(__in NvGSyncDeviceHandle hNvGSyncDevice, __in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GSYNC_STATUS *status); //! \ingroup gsyncapi #define NVAPI_MAX_RJ45_PER_GSYNC 2 //! Used in NV_GSYNC_STATUS_PARAMS. typedef enum _NVAPI_GSYNC_RJ45_IO { NVAPI_GSYNC_RJ45_OUTPUT = 0, NVAPI_GSYNC_RJ45_INPUT = 1, NVAPI_GSYNC_RJ45_UNUSED = 2 //!< This field is used to notify that the framelock is not actually present. } NVAPI_GSYNC_RJ45_IO; //! \ingroup gsyncapi //! Used in NvAPI_GSync_GetStatusParameters(). typedef struct _NV_GSYNC_STATUS_PARAMS_V1 { NvU32 version; NvU32 refreshRate; //!< The refresh rate NVAPI_GSYNC_RJ45_IO RJ45_IO[NVAPI_MAX_RJ45_PER_GSYNC]; //!< Configured as input / output NvU32 RJ45_Ethernet[NVAPI_MAX_RJ45_PER_GSYNC]; //!< Connected to ethernet hub? [ERRONEOUSLY CONNECTED!] NvU32 houseSyncIncoming; //!< Incoming house sync frequency in Hz NvU32 bHouseSync; //!< Is house sync connected? } NV_GSYNC_STATUS_PARAMS_V1; typedef struct _NV_GSYNC_STATUS_PARAMS_V2 { NvU32 version; NvU32 refreshRate; //!< The refresh rate NVAPI_GSYNC_RJ45_IO RJ45_IO[NVAPI_MAX_RJ45_PER_GSYNC]; //!< Configured as input / output NvU32 RJ45_Ethernet[NVAPI_MAX_RJ45_PER_GSYNC]; //!< Connected to ethernet hub? [ERRONEOUSLY CONNECTED!] NvU32 houseSyncIncoming; //!< Incoming house sync frequency in Hz NvU32 bHouseSync; //!< Is house sync connected? NvU32 bInternalSlave : 1; //!< Valid only for P2061 board. //!< If set to 1, it means that this P2061 board receives input from another P2061 board. NvU32 reserved : 31; //!< Reserved for future use. } NV_GSYNC_STATUS_PARAMS_V2; typedef NV_GSYNC_STATUS_PARAMS_V2 NV_GSYNC_STATUS_PARAMS; //! \ingroup gsyncapi //! Macro for constructing the version field of NV_GSYNC_STATUS_PARAMS #define NV_GSYNC_STATUS_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_GSYNC_STATUS_PARAMS_V1,1) #define NV_GSYNC_STATUS_PARAMS_VER2 MAKE_NVAPI_VERSION(NV_GSYNC_STATUS_PARAMS_V2,2) #define NV_GSYNC_STATUS_PARAMS_VER NV_GSYNC_STATUS_PARAMS_VER2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GSync_GetStatusParameters // //! DESCRIPTION: This API queries for sync status parameters as defined in NV_GSYNC_STATUS_PARAMS. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [in] hNvGSyncDevice The caller provides the handle of the GSync device for which to get parameters //! \param [out] *pStatusParams The caller provides the storage space. NvAPI_GSync_GetStatusParameters populates *pStatusParams with //! values. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL / pStatusParams is NULL. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any GSync Device. //! //! \ingroup gsyncapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GSync_GetStatusParameters(NvGSyncDeviceHandle hNvGSyncDevice, NV_GSYNC_STATUS_PARAMS *pStatusParams); //! @} //----------------------------------------------------------------------------- // 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(__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(_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__) /////////////////////////////////////////////////////////////////////////////// // // 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_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_RegisterResource // //! DESCRIPTION: This API binds a resource (surface/texture) so that it can be retrieved //! internally by NVAPI. //! //! SUPPORTED OS: Windows 7 and higher //! //! \param [in] pResource surface/texture //! //! \return ::NVAPI_OK, ::NVAPI_ERROR //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_RegisterResource(IDirect3DResource9* pResource); #endif //defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_UnregisterResource // //! DESCRIPTION: This API unbinds a resource (surface/texture) after use. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pResource surface/texture //! //! \return ::NVAPI_OK, ::NVAPI_ERROR //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_UnregisterResource(IDirect3DResource9* pResource); #endif //defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_AliasSurfaceAsTexture // //! \fn NvAPI_D3D9_AliasSurfaceAsTexture(IDirect3DDevice9* pDev, //! IDirect3DSurface9* pSurface, //! IDirect3DTexture9 **ppTexture, //! DWORD dwFlag); //! DESCRIPTION: Create a texture that is an alias of a surface registered with NvAPI. The //! new texture can be bound with IDirect3DDevice9::SetTexture(). Note that the texture must //! be unbound before drawing to the surface again. //! Unless the USE_SUPER flag is passed, MSAA surfaces will be resolved before //! being used as a texture. MSAA depth buffers are resolved with a point filter, //! and non-depth MSAA surfaces are resolved with a linear filter. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDev The D3D device that owns the objects //! \param [in] pSurface Pointer to a surface that has been registered with NvAPI //! to which a texture alias is to be provided //! \param [out] ppTexture Fill with the texture created //! \param [in] dwFlag NVAPI_ALIAS_SURFACE_FLAG to describe how to handle the texture //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_INVALID_POINTER A null pointer was passed as an argument //! \retval ::NVAPI_INVALID_ARGUMENT One of the arguments was invalid, probably dwFlag. //! \retval ::NVAPI_UNREGISTERED_RESOURCE pSurface has not been registered with NvAPI //! \retval ::NVAPI_ERROR error occurred // /////////////////////////////////////////////////////////////////////////////// //! \ingroup dx //! See NvAPI_D3D9_AliasSurfaceAsTexture(). typedef enum { NVAPI_ALIAS_SURFACE_FLAG_NONE = 0x00000000, NVAPI_ALIAS_SURFACE_FLAG_USE_SUPER = 0x00000001, //!< Use the surface's msaa buffer directly as a texture, rather than resolving. (This is much slower, but potentially has higher quality.) NVAPI_ALIAS_SURFACE_FLAG_MASK = 0x00000001 } NVAPI_ALIAS_SURFACE_FLAG; //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_AliasSurfaceAsTexture(IDirect3DDevice9* pDev, IDirect3DSurface9* pSurface, IDirect3DTexture9 **ppTexture, DWORD dwFlag); #endif //defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_StretchRectEx // //! DESCRIPTION: This API copies the contents of the source resource to the destination //! resource. This function can convert //! between a wider range of surfaces than //! IDirect3DDevice9::StretchRect. For example, it can copy //! from a depth/stencil surface to a texture. //! //! The source and destination resources *must* be registered //! with NvAPI before being used with NvAPI_D3D9_StretchRectEx(). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDevice The D3D device that owns the objects. //! \param [in] pSourceResource Pointer to the source resource. //! \param [in] pSrcRect Defines the rectangle on the source to copy from. If NULL, copy from the entire resource. //! \param [in] pDestResource Pointer to the destination resource. //! \param [in] pDstRect Defines the rectangle on the destination to copy to. If NULL, copy to the entire resource. //! \param [in] Filter Choose a filtering method: D3DTEXF_NONE, D3DTEXF_POINT, D3DTEXF_LINEAR. //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_INVALID_POINTER An invalid pointer was passed as an argument (probably NULL) //! \retval ::NVAPI_INVALID_ARGUMENT One of the arguments was invalid //! \retval ::NVAPI_UNREGISTERED_RESOURCE a resource was passed in without being registered //! \retval ::NVAPI_ERROR error occurred //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_StretchRectEx(IDirect3DDevice9 * pDevice, IDirect3DResource9 * pSourceResource, CONST RECT * pSourceRect, IDirect3DResource9 * pDestResource, CONST RECT * pDestRect, D3DTEXTUREFILTERTYPE Filter); #endif //defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_ClearRT // //! DESCRIPTION: This API Clears the currently bound render target(s) with the //! given color //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDevice The D3D device that owns the objects. //! \param [in] dwNumRects The no of rectangles to clear. If 0, clear the entire surface (clipped to viewport) //! \param [in] pRects Defines the rectangles to clear. Should be NULL if dwNumRects == 0 //! \param [in] r red component of the clear color //! \param [in] g green component of the clear color //! \param [in] b blue component of the clear color //! \param [in] a alpha component of the clear color //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_ClearRT(IDirect3DDevice9 * pDevice, NvU32 dwNumRects, CONST RECT * pRects, float r, float g, float b, float a); #endif //if defined(_D3D9_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__) #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__) /////////////////////////////////////////////////////////////////////////////// // NVAPI Query Types /////////////////////////////////////////////////////////////////////////////// //! \ingroup dx //! Used in NvAPI_D3D_CreateQuery() and NvAPI_D3D_Query_GetType(). typedef enum _NVAPI_D3D_QUERY_TYPE { NVAPI_D3D_QUERY_TYPE_RESERVED0 = 0, NVAPI_D3D_QUERY_TYPE_RESERVED1 = 1, NVAPI_D3D_QUERY_TYPE_RESERVED2 = 2, NVAPI_D3D_QUERY_TYPE_RESERVED3 = 3, NVAPI_D3D_QUERY_TYPE_ROP_TIMESTAMP = 4, }NVAPI_D3D_QUERY_TYPE; //! \ingroup dx //! See NvAPI_D3D_Query_GetData(). typedef enum _NVAPI_D3D_QUERY_GETDATA_FLAGS { NVAPI_D3D_QUERY_GETDATA_FLUSH = 0, NVAPI_D3D_QUERY_GETDATA_DONOTFLUSH = 1 }NVAPI_D3D_QUERY_GETDATA_FLAGS; #if defined(_D3D9_H_) || defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_CreateQuery // //! DESCRIPTION: This API creates NVIDIA-specific D3D Query Objects. For DirectX 11, if a device is supplied the query will //! always execute on the immediate context. This makes sense for almost all queries since GetData is //! invalid on deferred contexts. If a DirectX 11 context is supplied, the query will always execute on that context. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] pDeviceOrContext The D3D9, D3D10, D3D11 device, or D3D11 device context to create this query object on //! \param [in] type Type of the query to be created (see NVAPI_D3D_QUERY_TYPE) //! \param [out] pHandle The handle to the Query object //! //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_INVALID_POINTER - pDevice was NULL //! \retval ::NVAPI_INVALID_ARGUMENT - one of the arguments was not valid //! \retval ::NVAPI_OUT_OF_MEMORY - unable to allocate sufficient memory to complete the call //! \retval ::NVAPI_ERROR - error occurred //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_CreateQuery(IUnknown *pDeviceOrContext, NVAPI_D3D_QUERY_TYPE type, NVDX_ObjectHandle *pHandle); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) //NvAPI_D3D_DestroyQuery /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DestroyQuery // //! DESCRIPTION: This API destroys NVIDIA-specific Direct3D query objects. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] queryHandle The handle to the Query object //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_INVALID_HANDLE The Query object handle is invalid. //! \retval ::NVAPI_INVALID_CALL The call could not be completed. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DestroyQuery(NVDX_ObjectHandle queryHandle); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_Query_Begin // //! DESCRIPTION: This API mark the beginning of a series of commands. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] queryHandle The handle to the Query object //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_INVALID_HANDLE The Query object handle is invalid. //! \retval ::NVAPI_INVALID_CALL The call could not be completed. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_Query_Begin(NVDX_ObjectHandle queryHandle); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_Query_End // //! DESCRIPTION: This API marks the end of a series of commands. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] queryHandle The handle to the Query object //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_INVALID_HANDLE The Query object handle is invalid. //! \retval ::NVAPI_INVALID_CALL The call could not be completed. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_Query_End(NVDX_ObjectHandle queryHandle); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_Query_GetData // //! DESCRIPTION: This API polls a queried resource to get the query state or a query result. //! This makes it possible to get data from the GPU or the driver asynchronously. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] queryHandle The handle to the Query object //! \param [in] dwSize Size of the data to retrieve or 0; //! This value can be obtained with NvAPI_D3D_Query_GetDataSize(). //! \param [in] dwGetDataFlags Optional flags; can be 0 or any combination of NVAPI_D3D_QUERY_GETDATA_FLAGS //! \param [out] pData Address of memory that will receive the data //! If NULL, GetData will be used only to check status. //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_INVALID_HANDLE The Query object handle is invalid //! \retval ::NVAPI_INVALID_CALL The call could not be completed //! \retval ::NVAPI_DATA_NOT_FOUND The Queried data was not yet available //! \retval ::NVAPI_ERROR //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_Query_GetData(NVDX_ObjectHandle queryHandle, void* pData, UINT dwSize, UINT dwGetDataFlags); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_Query_GetDataSize // //! DESCRIPTION: This API gets the size of the data (in bytes) that is output when calling //! NvAPI_D3D_Query_GetData(). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] queryHandle The handle to the Query object //! \param [out] pDwSize The requested size //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_INVALID_HANDLE the Query object handle is invalid //! \retval ::NVAPI_INVALID_POINTER pDwSize is NULL //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_Query_GetDataSize(NVDX_ObjectHandle queryHandle, UINT *pDwSize); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_Query_GetType // //! DESCRIPTION: This API gets the NVAPI_D3D_QUERY_TYPE of the given query object. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] queryHandle The handle to the Query object //! \param [out] pType The requested NVAPI_D3D_QUERY_TYPE value //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_INVALID_HANDLE the Query object handle is invalid //! \retval ::NVAPI_INVALID_POINTER pType is NULL //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_Query_GetType(NVDX_ObjectHandle queryHandle, NVAPI_D3D_QUERY_TYPE *pType); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_RegisterApp // //! DESCRIPTION: This API allows known DirectX12, DirectX 11, DirectX 10, or DirectX 9 applications to register themselves in order to enable specific driver modes. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 180 //! //! \param [in] userAppId A predetermined NVIDIA-specified number that the driver uses to //! turn on application-specific features. //! If the code is not recognized, it would return ::NVAPI_NOT_SUPPORTED. //! Otherwise, it would return ::NVAPI_OK. //! //! \retval ::NVAPI_ERROR Registration failed. //! \retval ::NVAPI_OK The application is supported. //! \retval ::NVAPI_INVALID_ARGUMENT Bad parameters were given. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_RegisterApp(IUnknown *pDev, NvU32 userAppId); #endif // defined(_D3D9_H_) || defined(__d3d10_h__) //NvAPI_D3D_RegisterApp #if defined(_D3D9_H_) && defined(__cplusplus) //----------------------------------------------------------------------------- // Direct3D9 APIs //----------------------------------------------------------------------------- //! \ingroup dx //! @{ typedef enum _NV_PATH_DATATYPE { NV_BYTE = 0, NV_UNSIGNED_BYTE, NV_SHORT, NV_UNSIGNED_SHORT, NV_INT, NV_UNSIGNED_INT, NV_FLOAT, NV_FIXED } NvPathDataType; typedef enum _NV_PATH_PARAMTYPE { PATH_QUALITY_NV = 0x8ED8, FILL_RULE_NV = 0x8ED9, STROKE_CAP0_STYLE_NV = 0x8EE0, STROKE_CAP1_STYLE_NV = 0x8EE1, STROKE_CAP2_STYLE_NV = 0x8EE2, STROKE_CAP3_STYLE_NV = 0x8EE3, STROKE_JOIN_STYLE_NV = 0x8EE8, STROKE_MITER_LIMIT_NV = 0x8EE9 } NVPathParamType; typedef enum _NV_PATH_FILLRULE { EVEN_ODD_NV = 0x8EF0, NON_ZERO_NV = 0x8EF1 } NVPathFillRule; typedef enum _NV_PATH_CAPSTYLE { CAP_BUTT_NV = 0x8EF4, CAP_ROUND_NV = 0x8EF5, CAP_SQUARE_NV = 0x8EF6, CAP_TRIANGLE_NV = 0x8EF7 } NVPathCapStyle; typedef enum _NV_PATH_JOINSTYLE { JOIN_MITER_NV = 0x8EFC, JOIN_ROUND_NV = 0x8EFD, JOIN_BEVEL_NV = 0x8EFE, JOIN_CLIPPED_MITER_NV = 0x8EFF } NVPathJoinStyle; typedef enum _NV_PATH_TARGETTYPE { MATRIX_PATH_TO_CLIP_NV = 0x8F04, MATRIX_STROKE_TO_PATH_NV = 0x8F05, MATRIX_PATH_COORD0_NV = 0x8F08, MATRIX_PATH_COORD1_NV = 0x8F09, MATRIX_PATH_COORD2_NV = 0x8F0A, MATRIX_PATH_COORD3_NV = 0x8F0B } NVPathTargetType; typedef enum _NV_PATH_MODE { FILL_PATH_NV = 0x8F18, STROKE_PATH_NV = 0x8F19 } NVPathMode; typedef enum _NV_PATH_CMD { MOVE_TO_NV = 0x00, LINE_TO_NV = 0x01, QUADRATIC_BEZIER_TO_NV = 0x02, CUBIC_BEZIER_TO_NV = 0x03, START_MARKER_NV = 0x20, CLOSE_NV = 0x21, STROKE_CAP0_NV = 0x40, STROKE_CAP1_NV = 0x41, STROKE_CAP2_NV = 0x42, STROKE_CAP3_NV = 0x43, } NVPathCmd; //! @} #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_CreatePathContextNV // //! \fn NvAPI_D3D9_CreatePathContextNV(IDirect3DDevice9* pDevice, NvU32* context) //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Creates a new NVPL context. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDevice Direct3D 9 device //! \param [out] context NVPL context //! //!\return NvAPI status code or DX HRESULT code // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_CreatePathContextNV(IDirect3DDevice9* pDevice, NvU32* context); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_DestroyPathContextNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Destroys a NVPL context. This function *MUST* be called //! on all created path contexts or else memory leaks will //! occur. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] context NVPL context //! //! \return ::NVAPI_OK or ::NVAPI_INVALID_ARGUMENT //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_DestroyPathContextNV(NvU32 context); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_CreatePathNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Creates a NVPL path. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] context NVPL context //! \param [in] datatype Type of path vertex data //! \param [in] numCommands Number of commands in path //! \param [in] commands Path command buffer //! //! \param [out] path Path handle //! //! \return NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_CreatePathNV(NvU32 context, NvPathDataType datatype, NvU32 numCommands, const NvU8* commands, NvU32* path); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_DeletePathNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Destroys a NVPL path. This function *MUST* be called //! on all created paths or else memory leaks will occur. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] path NVPL path handle //! //! \return ::NVAPI_OK or ::NVAPI_INVALID_ARGUMENT //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_DeletePathNV(NvU32 path); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PathVerticesNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Sets vertex data for a path. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] path NVPL path handle //! \param [in vertices vertex data //! //! \return NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_PathVerticesNV(NvU32 path, const void* vertices); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PathParameterfNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Sets a path rendering parameter of type float //! //! SUPPORTED OS: Windows 7 and higher //! //! //! INPUT: path - NVPL path handle //! INPUT: paramType - parameter name //! INPUT: param - parameter value //! //! \return NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_PathParameterfNV(NvU32 path, NVPathParamType paramType, float param); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PathParameteriNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Sets a path rendering parameter of type int //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] path NVPL path handle //! \param [in] paramType parameter name //! \param [in] param parameter value //! //! \return NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_PathParameteriNV(NvU32 path, NVPathParamType paramType, int param); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PathMatrixNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Sets a transformation matrix //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] context NVPL context handle //! \param [in] target type of transformation //! \param [in] value matrix values //! //! \return NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_PathMatrixNV(NvU32 context, NVPathTargetType paramType, const float* value); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PathDepthNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Sets the current path depth //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] context NVPL context handle //! \param [in] value depth value //! //! \return NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_PathDepthNV(NvU32 context, float value); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PathClearDepthNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Clears the depth buffer //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] context NVPL context handle //! \param [in] value depth value //! //! \return NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_PathClearDepthNV(NvU32 context, float value); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PathEnableDepthTestNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Enables / Disables depth testing //! //! SUPPORTED OS: Windows 7 and higher //! //! //! INPUT: context - NVPL context handle //! INPUT: enable - enable depth test if true, else disable //! //! RETURN STATUS: a NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_PathEnableDepthTestNV(NvU32 context, bool enable); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PathEnableColorWriteNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Enables / Disables color write //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] context NVPL context handle //! \param [in] enable enable color write if true, else disable //! //! \return NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_PathEnableColorWriteNV(NvU32 context, bool enable); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_DrawPathNV // //! DESCRIPTION: This API call is part of the DX implementation of the //! NV Path Library. //! Draws the path. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] path NVPL path handle //! \param [in] mode path rendering mode //! //! \return NvAPI status code or DX HRESULT code //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_DrawPathNV(NvU32 path, NVPathMode mode); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GetSurfaceHandle // //! This function gets the handle of a given surface. This handle uniquely //! identifies the surface through all NvAPI entries. //! //! //! \since Release: 313 //! //! \param [in] pSurface Surface to be identified //! \param [out] pHandle Will be filled by the return handle //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GetSurfaceHandle(IDirect3DSurface9 *pSurface, NVDX_ObjectHandle *pHandle); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GetOverlaySurfaceHandle // //! \fn NvAPI_D3D9_GetOverlaySurfaceHandles(IDirect3DDevice9 *pDev, NV_OVLY_SURFS_INFO *pInfo) //! DESCRIPTION: This function gets the surface handles for the YUY2 overlay surfaces created. //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 175 //! //! \param [in] pDev Device whose YUY2 surface handles need to be retrieved. //! //! \param [out] pInfo Array (see NV_OVLY_SURFS_INFO) of surface handles (NVDX_ObjectHandle) that will be filled by //! the driver. The array has to initialized before it is passed on to //! the function. The handles are populated in the order in which they //! are created. For example, the handle of the first surface created will be //! stored in pHandle[0], second surface will be stored in pHandle[1], and so on. //! //! \return An int which could be an NvAPI status or DX HRESULT code ////////////////////////////////////////////////////////////////////////////// //! \ingroup dx //! Used in NV_OVLY_SURFS_INFO. #define MAX_OVLY_SURFS 6 //! \ingroup dx //! Overlay surface handle and other information - used in NvAPI_D3D9_GetOverlaySurfaceHandles(). typedef struct _NV_OVLY_SURFS_INFO { NVDX_ObjectHandle handle[MAX_OVLY_SURFS]; unsigned int numSurfs; }NV_OVLY_SURFS_INFO; //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_GetOverlaySurfaceHandles(IDirect3DDevice9 *pDev, NV_OVLY_SURFS_INFO *pInfo); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GetTextureHandle // //! This function gets the handle of a given DirectX 9 texture. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param [in] pTexture Surface to be identified //! \param [out] pHandle Will be filled by the return handle //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GetTextureHandle(IDirect3DTexture9 *pTexture, NVDX_ObjectHandle *pHandle); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GpuSyncGetHandleSize // //! This function returns the size of the init and copy sync handles. These handles are //! then allocated and initialized to zero by the application. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 90 //! //! \param [out] pInitHandleSize size of GpuSync init handle //! \param [out] pMapHandleSize size of GpuSync copy handle //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GpuSyncGetHandleSize(IDirect3DDevice9 *pDev, unsigned int *pInitHandleSize, unsigned int *pMapHandleSize); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GpuSyncInit // //! This function sets up sync functionality. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 90 //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GpuSyncInit(IDirect3DDevice9 *pDev, void * syncInitData); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GpuSyncEnd // //! This function tears down sync structures. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 90 //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GpuSyncEnd(IDirect3DDevice9 *pDev, void * syncData); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GpuSyncMapTexBuffer // //! This function maps a texture to receive OpenGL data. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 90 //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GpuSyncMapTexBuffer(IDirect3DDevice9 *pDev, IDirect3DTexture9 *pTexture, void * syncData); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GpuSyncMapSurfaceBuffer // //! This function maps a texture to receive OpenGL data. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GpuSyncMapSurfaceBuffer(IDirect3DDevice9 *pDev, IDirect3DSurface9 *pSurface, void * syncData); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GpuSyncMapVertexBuffer // //! This function maps a vertex buffer to receive OpenGL data. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 90 //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GpuSyncMapVertexBuffer(IDirect3DDevice9 *pDev, IDirect3DVertexBuffer9 *pVertexBuffer, void * syncData); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GpuSyncMapIndexBuffer // //! This function maps an index buffer to receive OpenGL data. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 177 //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GpuSyncMapIndexBuffer(IDirect3DDevice9 *pDev, IDirect3DIndexBuffer9 *pIndexBuffer, void * syncData); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_SetPitchSurfaceCreation // //! This function forces the next CreateTexture()/CreateRenderTarget() call to use pitch surfaces. //! The action is applied only once for the next surface. Set Signature==0 to make sure this is disabled. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 177 //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_SetPitchSurfaceCreation(IDirect3DDevice9 *pDev, NvU32 Signature); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GpuSyncAcquire // //! This function acquires a semaphore for synchronization control of a mapped buffer. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 90 //! //! \param [in] accessMode Acquire mapped buffer read/write access //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GpuSyncAcquire(IDirect3DDevice9 *pDev, void * syncData); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GpuSyncRelease // //! This function releases a semaphore for synchronization control of a mapped buffer. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 90 //! //! \param [in] accessMode Release mapped buffer read/write access //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GpuSyncRelease(IDirect3DDevice9 *pDev, void * syncData); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GetCurrentRenderTargetHandle // //! This function gets the handle of the current render target or z-buffer. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param [in] pDev Device whose current render target is to be identified //! //! \param [out] pHandle Will be filled by the return handle //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GetCurrentRenderTargetHandle(IDirect3DDevice9 *pDev, NVDX_ObjectHandle *pHandle); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GetCurrentZBufferHandle // //! //! This function gets the handle of the current z-buffer. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param [in] pDev Device whose current z-buffer is to be identified //! //! \param [out] pHandle Will be filled by the return handle //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GetCurrentZBufferHandle(IDirect3DDevice9 *pDev, NVDX_ObjectHandle *pHandle); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GetIndexBufferHandle // //! This function gets the handle of a given DirectX 9 index buffer. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param [in] pIndexBuffer Index Buffer to be identified //! \param [out] pHandle Will be filled by the return handle //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GetIndexBufferHandle(IDirect3DIndexBuffer9 *pIndexBuffer, NVDX_ObjectHandle *pHandle); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GetVertexBufferHandle // //! This function gets the handle of a given DirectX 9 vertex buffer. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param [in] pVertexBuffer Vertex Buffer to be identified //! \param [out] pHandle Will be filled by the return handle //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GetVertexBufferHandle(IDirect3DVertexBuffer9 *pVertexBuffer, NVDX_ObjectHandle *pHandle); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_CreateTexture // //! \fn NvAPI_D3D9_CreateTexture(IDirect3DDevice9 *pDev, //! DESCRIPTION: This function creates a texture with special properties. \note The texture //! is always created in "POOL_DEFAULT", not managed. \p //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 173 //! //! \param [in] pDev The device to get primary surface from Width,Height,Levels,Format //! \param [in] Width Width of the top-level of the texture, in pixels. //! (See MS DirectX interface Direct3D9Device::CreateTexture.) //! \param [in] Height Height of the top-level of the texture, in pixels. //! (See MS DirectX interface Direct3D9Device::CreateTexture.) //! \param [in] Level Number of levels in the texture. //! (See MS DirectX interface Direct3D9Device::CreateTexture.) //! \param [in] Flags The flags for special texture creation - \p //! - FORCEVIDMEM This will force the texture into video memory, //! if that cannot be done, the texture creation will fail. //! - FORCELINEAR Ensure the texture is stored in pitched-linear layout. //! - NOTMOVABLE Indicates the texture should not be moved once allocated. //! This is usually used to accommodate a 3rd party DMA engine. //! \note This is only a hint, the OS may still move the texture //! under memory-constrained circumstances. //! \param [in] format Describes the format of all levels in the texture. (See the MS DirectX SDK D3DFORMAT enumerated type) //! \param [out] ppTexture Fill with the texture created. (See MS DirectX SDK IDirect3DTexture9 interface) //! \param [out] pHandle If non-NULL, fill with the NVDX handle of the created texture. // ////////////////////////////////////////////////////////////////////////////// //! \addtogroup dx //! @{ #define NV_SURFACEFLAG_FORCEVIDMEM 0x00000001 //!< Flag for texture creation in NvAPI_D3D9_CreateTexture() #define NV_SURFACEFLAG_FORCELINEAR 0x00000010 //!< Flag for texture creation in NvAPI_D3D9_CreateTexture() #define NV_SURFACEFLAG_NOTMOVABLE 0x00000100 //!< Flag for texture creation in NvAPI_D3D9_CreateTexture() //! @} //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_CreateTexture(IDirect3DDevice9 *pDev, NvU32 Width, NvU32 Height, NvU32 Level, NvU32 Flags, D3DFORMAT Format, IDirect3DTexture9 **ppTexture, NVDX_ObjectHandle *pHandle = 0); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) //////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_AliasPrimaryAsTexture // //! This function creates a texture that is an alias of the current device's primary surface. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 80 //! //! \param [in] pDev The device from which to get the primary surface //! \param [in] dwIndex The index to the primary flipchain of device (usually 0) //! \param [out] ppTexture Fill with the texture created //! \param [out] pHandle If non-NULL, fill with the NVDX handle of the created texture //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_AliasPrimaryAsTexture(IDirect3DDevice9 *pDev, NvU32 dwIndex, IDirect3DTexture9 **ppTexture, NVDX_ObjectHandle *pHandle = 0); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PresentSurfaceToDesktop // //! \fn NvAPI_D3D9_PresentSurfaceToDesktop(IDirect3DDevice9 *pDev, //! This function presents a given surface to the desktop. This interface can be //! used to start a full-screen flipping mode even within windowed Direct 3D application. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 80 //! //! \param [in] pDev The device (display) to present to //! \param [in] surfaceHandle The surface handle obtained from NVD3D9_GetSurfaceHandle(). //! NOTE: NVDX_OBJECT_NONE means restore //! \param [in] dwFlipFlags Flags to indicate SYNC mode (other bits reserved and must be 0) //! \param [in] dwExcludeDevices This is a bitmask (usually 0) to indicate which device //! will be EXCLUDED from this present. This is only //! effective when used in a Clone mode configuration where //! the application wants one monitor to show the specially //! rendered screen and the other the normal desktop. //! //! \note It is application's responsibility to determine which devices are //! available on the current Clone mode configuration, through nvcpl interfaces. //! //! \return An int which could be an NvAPI status or DX HRESULT code // /////////////////////////////////////////////////////////////////////////////// //! Parameters used for dwFlipFlags (All other bits reserved) - See NvAPI_D3D9_PresentSurfaceToDesktop() //! \addtogroup dwFlipFlags //! @{ #define NV_FLIPFLAG_VSYNC 0x00000001 //!< SYNCMODE (bit 0:1) - 0:NOSYNC, 1:VSYNC, 2:HSYNC #define NV_FLIPFLAG_HSYNC 0x00000002 #define NV_FLIPFLAG_TRIPLEBUFFERING 0x00000004 //!< TRIPLEBUFFERING (bit 2) - 0: DoubleBuffer, 1:TripleBuffer or more //! @} //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_PresentSurfaceToDesktop(IDirect3DDevice9 *pDev, NVDX_ObjectHandle surfaceHandle, NvU32 dwFlipFlags, NvU32 dwExcludeDevices = 0); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION_NAME: NvAPI_D3D9_CreateVideoBegin // //! DESCRIPTION: This function signals the driver that the application will next create a set of //! D3DFMT_X8R8G8B8 render targets for overlay use. The call will fail //! if the driver/hardware doesn't support this mode, in which case the //! application should fall back to the traditional overlay (with driver //! internal overlay buffers). If this call returns successfully, then //! before the driver sees _CreateVideoEnd, all D3DFMT_A8R8G8B8 render //! targets will be allocated as overlay surfaces. //! See _CreateVideo, \ref NV_CVFLAG_EXTERNAL_OVERLAY flag for more details. //! This interface is only available on Windows Vista. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] pDev The device (display) to present to //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx //! \deprecated Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_CreateVideoBegin. /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_CreateVideoBegin.") NVAPI_INTERFACE NvAPI_D3D9_CreateVideoBegin(IDirect3DDevice9 *pDev); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION_NAME: NvAPI_D3D9_CreateVideoEnd // //! DESCRIPTION: This function signals the driver that the application has finished creating //! D3DFMT_X8R8G8B8 render targets for overlays. //! See _CreateVideo, \ref NV_CVFLAG_EXTERNAL_OVERLAY flag for more details. //! This interface is only available on Windows Vista. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \param [in] pDev The device (display) to present to //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx //! \deprecated Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_CreateVideoEnd. /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_CreateVideoEnd.") NVAPI_INTERFACE NvAPI_D3D9_CreateVideoEnd(IDirect3DDevice9 *pDev); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION_NAME: NvAPI_D3D9_CreateVideo // //! \fn NvAPI_D3D9_CreateVideo(IDirect3DDevice9 *pDev, //! This function allocates and initializes video resources for playback within a D3D9 context. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 90 //! //! \param [in] pDev The device (display) to present to //! \param [in] pCVParams Pointer to the create video paramater structures. See NV_DX_CREATE_VIDEO_PARAMS1. //! //! \return An int which could be an NvAPI status or DX HRESULT code // //! \deprecated Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_CreateVideo. /////////////////////////////////////////////////////////////////////////////////////// //! \addtogroup cvflags //! Create Video Flags - See NV_DX_CREATE_VIDEO_PARAMS1 //! @{ //! Overlay will be used #define NV_CVFLAG_OVERLAY 0x00000001 //! Change source size or flip queue hint once overlay //! resources have already been allocated. Be wary //! of upward allocating new resources, if there is //! a failure, be prepared to deallocate everything //! and start from scratch. #define NV_CVFLAG_OVERLAY_REINIT 0x00000002 //! Use overlay surfaces allocated by the application. This flag //! is supported only in NV_DX_CREATE_VIDEO_PARAMS_VER2 and above //! on Windows Vista. //! //! The application sets this flag to indicate that the driver should //! not allocate any internal overlay buffers, and the first //! dwNumOvlSurfs surfaces in pCVParams->hOvlSurfs[] will be used for //! overlay scan-out directly. The driver will validate these surfaces //! against the following conditions, and fail the call otherwise: //! //! -# No less than NV_CV_MIN_OVERLAY_SURFACE_NUMBER and no more than //! NV_CV_MAX_OVERLAY_SURFACE_NUMBER should be passed in. //! -# Only surface handles of D3DFMT_A8R8G8B8 render targets created //! inside a pair of _CreateVideoBegin ()/_CreateVideoEnd() should be //! used. //! -# The size of the surfaces must be identical to the target display. //! //! If all of the above condictions are met for each of the surfaces, //! then the driver will not allocate any internal overlay buffers. Upon //! _PresentVideo(), the source surface will be used for overlay scan- //! out directly without the driver copying the content to an overlay //! buffer first. #define NV_CVFLAG_EXTERNAL_OVERLAY 0x00000004 //! Forces full screen video on secondary device to be //! disabled in multihead modes, regardless of user setting #define NV_CVFLAG_2ND_FORCE_DISABLE 0x00010000 //! Forces full screen video on secondary device to be //! enabled on the default device in multihead modes, //! regardless of user setting #define NV_CVFLAG_2ND_FORCE_ENABLE 0x00020000 //! Forces full screen video on secondary device to be //! enabled on the primary device in clone mode, //! regardless of user setting #define NV_CVFLAG_2ND_FORCE_ENABLE1 0x00040000 //! If another application owns the secondary full-screen //! device, forcibly take possession of it. #define NV_CVFLAG_2ND_COMMANDEER 0x00100000 //! Is the target display secondary display when in Dualview mode #define NV_CVFLAG_SECONDARY_DISPLAY 0x01000000 //! @} //! \ingroup dx //! Used in NvAPI_D3D9_CreateVideo() typedef struct { NvU32 version; //!< Version of the CreateVideoParams structure NvU32 cvFlags; //!< Initialization flags (See \ref cvflags for description) NvU32 flipQueueHint; //!< If an overlay is allocated, this indicates the desired number of flips //! to be queued (minimum of 1). A larger number is better for performance, //! but also consumes more frame buffer resources. This number should be //! set according to the number of fields/frames that can be decoded in //! advance of presentation. For example, if the decoder cannot decode in advance and //! must display immediately after decoding a frame, then set this to 1. //! If the decoder is decoding field content one frame at a time, then it //! is decoding one field ahead - set this to 2. If the decoder //! can decode n flips ahead, then set this to n+1. If the GPU has //! constrained frame buffer resources, then set this number lower, and also //! reduce the decode-ahead pipeline resources accordingly. NvU32 maxSrcWidth; //!< Maximum video source width NvU32 maxSrcHeight; //!< Maximum video source height } NV_DX_CREATE_VIDEO_PARAMS1; //! \ingroup dx #define NV_CV_MIN_OVERLAY_SURFACE_NUMBER 2 //! \ingroup dx #define NV_CV_MAX_OVERLAY_SURFACE_NUMBER 6 //! \ingroup dx //! Used in NvAPI_D3D9_CreateVideo() typedef struct { NvU32 version; //!< Version of the CreateVideoParams structure NvU32 cvFlags; //!< Initialization flags (See \ref cvflags for description) NvU32 flipQueueHint; //!< If an overlay is allocated, this indicates the desired number of flips //! to be queued (minimum of 1). A larger number is better for performance, //! but also consumes more frame buffer resources. This number should be //! set according to the number of fields/frames that can be decoded in //! advance of presentation. For example, if the decoder cannot decode in advance and //! must display immediately after decoding a frame, then set this to 1. //! If the decoder is decoding field content one frame at a time, then it //! is decoding one field ahead - set this to 2. If the decoder //! can decode n flips ahead, then set this to n+1. If the GPU has //! constrained frame buffer resources, then set this number lower, and also //! reduce the decode-ahead pipeline resources accordingly. NvU32 maxSrcWidth; //!< Maximum video source width NvU32 maxSrcHeight; //!< Maximum video source height NvU32 dwNumOvlSurfs; //!< Number of surfaces that the application intends to use for the //! overlay (also refer to the NV_CVFLAG_EXTERNAL_OVERLAY flag) NVDX_ObjectHandle hOvlSurfs[NV_CV_MAX_OVERLAY_SURFACE_NUMBER]; //!< Handles to the surfaces that the application intends to use //! for the overlay (also refer to the NV_CVFLAG_EXTERNAL_OVERLAY flag) } NV_DX_CREATE_VIDEO_PARAMS2; //! \ingroup dx typedef NV_DX_CREATE_VIDEO_PARAMS2 NV_DX_CREATE_VIDEO_PARAMS; //! \ingroup dx #define NV_DX_CREATE_VIDEO_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_DX_CREATE_VIDEO_PARAMS1,1) //! \ingroup dx #define NV_DX_CREATE_VIDEO_PARAMS_VER2 MAKE_NVAPI_VERSION(NV_DX_CREATE_VIDEO_PARAMS2,2) //! \ingroup dx #define NV_DX_CREATE_VIDEO_PARAMS_VER NV_DX_CREATE_VIDEO_PARAMS_VER2 //! \ingroup dx __nvapi_deprecated_function("Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_CreateVideo.") NVAPI_INTERFACE NvAPI_D3D9_CreateVideo(IDirect3DDevice9 *pDev, NV_DX_CREATE_VIDEO_PARAMS *pCVParams); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION_NAME: NvAPI_D3D9_FreeVideo // //! This function releases all video resources. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] pDev The device (display) to present to //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx //! \deprecated Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_FreeVideo. /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_FreeVideo.") NVAPI_INTERFACE NvAPI_D3D9_FreeVideo(IDirect3DDevice9 *pDev); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_PresentVideo // //! \fn NvAPI_D3D9_PresentVideo(IDirect3DDevice9 *pDev, //! This function signals a final and complete frame ready for presentation. //! It can optionally render to the overlay, but should be called //! regardless of whether any actual rendering occurs. If the //! user has enabled full screen video in a multi-head mode, //! this frame will also be rendered on the secondary device. //! //! \note Use NV_DX_PRESENT_VIDEO_PARAMS_VER in the "version" method for both 32 bit and 64 bit //! callers. For older drivers that do not support 64 bit callers, 32 bit callers //! should use the evaluation of MAKE_NVAPI_VERSION(NV_DX_PRESENT_VIDEO_PARAMS1,1) //! in that field. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \param [in] pDev The device (display) to present to //! \param [in] pPVParams The present video parameters structure. See NV_DX_PRESENT_VIDEO_PARAMS1. //! //! \return An int which could be an NvAPI status or DX HRESULT code //! //! NVAPI_DEVICE_BUSY - This return value indicates the flip request was dropped //! because the hardware flip queue was too deep, thus no more present requests can be //! accepted at the moment. \n //! //! When an external overlay is used (for "external overlay" please refer to NvAPI_D3D9_CreateVideoBegin(), //! NvAPI_D3D9_CreateVideoEnd(), and VER2-only descriptions of NvAPI_D3D9_CreateVideo()), //! a failure in _PresentVideo means the current front (on-screen) buffer will remain //! unchanged. In this case the application should be careful not to render to the current //! front buffer, as it will cause video tearing. The application could retry presenting //! the same frame during the next V-Sync, or continue with rendering the next frame to a //! back buffer. // //! \deprecated Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_PresentVideo. /////////////////////////////////////////////////////////////////////////////// //! \addtogroup pvflags //! PresentVideo flags - See NV_DX_PRESENT_VIDEO_PARAMS1 //! @{ //! Field is odd #define NV_PVFLAG_ODD 0x00000001 //! Field is even #define NV_PVFLAG_EVEN 0x00000002 //! Indicates that this frame is protected and guarantees full //! screen video will not display this frame on any secondary device. //! Conversely, not setting this indicates an unprotected frame. #define NV_PVFLAG_PROTECTED 0x00000004 //! Indicates progressive frame. If the odd or even flags are set //! in conjunction with this, it indicates the original field that //! generated this deinterlaced frame, and attempts to synchronize //! this presentation to the corresponding display field of an //! interlaced display #define NV_PVFLAG_PROGRESSIVE 0x00000008 //! Show the overlay. \n //! If the application is minimized or obscured, continue to call NvAPI_D3D9_PresentVideo() //! for every complete frame without this flag set. \n //! If enabled, the unprotected video will continue to play in full-screen mode //! on the secondary device, using the pixel aspect cached from //! the last time a frame was shown. To change the pixel aspect while hidden, //! the caller must "show" a frame at least once with a new clipped source and //! destination rectangle. This shown frame can be rendered invisible with //! appropriate color key selection. #define NV_PVFLAG_SHOW 0x00000010 //! Move overlay position without waiting for vblank. //! The only parameters used are dwDstX, dwDstY, and NV_PVFLAG_SHOW. #define NV_PVFLAG_FAST_MOVE 0x00000020 //! If set, blocking flips, wait until the flip queue can accept another flip. //! A non-blocking flip will return an error if the flip cannot be queued yet. #define NV_PVFLAG_WAIT 0x00000040 //! Video data is completely unchanged from the previous flip (used for telecine) #define NV_PVFLAG_REPEAT 0x00000080 //! Use destination color key. #define NV_PVFLAG_DST_KEY 0x00000100 //! Indicates that the overlay is playing full-screen on the desktop. //! This bit is used to automatically overscan the image on TVs. #define NV_PVFLAG_FULLSCREEN 0x00000200 //! Set the current time. #define NV_PVFLAG_SET_STAMP 0x00001000 //! If set, use timestamps. \n //! If not set, flip on the next vblank. #define NV_PVFLAG_USE_STAMP 0x00002000 //! Use source color key. #define NV_PVFLAG_SRC_KEY 0x00004000 //! @} //! \ingroup dxvidcontrol //! Used in NvAPI_D3D9_PresentVideo(). typedef struct { NvU32 version; //!< Structure version NVDX_ObjectHandle surfaceHandle; //!< The surface handle obtained from NvAPI_D3D9_GetSurfaceHandle //! or NvAPI_D3D9_GetCurrentRenderTargetHandle NvU32 pvFlags; //!< Presentation flags (See \ref pvflags for description) NvU32 colourKey; //!< Colour key to use if NV_PVFLAG_DST_KEY is set NvU32 timeStampLow; // // NvU32 timeStampHigh; // NvU32 flipRate; //!< Set to the current flip rate. //! Set to zero if the frame to be presented is a still frame. NvSBox srcUnclipped; //!< Unclipped source rectangle of the entire frame of data NvSBox srcClipped; //!< Cropped source rectangle. It is the caller's responsibility to crop //! the source if the desktop crops the destination. NvSBox dst; // } NV_DX_PRESENT_VIDEO_PARAMS1; //! \ingroup dxvidcontrol typedef NV_DX_PRESENT_VIDEO_PARAMS1 NV_DX_PRESENT_VIDEO_PARAMS; #ifdef _WIN32 //! \ingroup dxvidcontrol #define NV_DX_PRESENT_VIDEO_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_DX_PRESENT_VIDEO_PARAMS1,1) #endif //_WIN32 //! \ingroup dxvidcontrol #define NV_DX_PRESENT_VIDEO_PARAMS_VER MAKE_NVAPI_VERSION(NV_DX_PRESENT_VIDEO_PARAMS1,2) //! \ingroup dxvidcontrol __nvapi_deprecated_function("Do not use this function - it is deprecated in release 375. Instead, use NvAPI_D3D9_PresentVideo.") NVAPI_INTERFACE NvAPI_D3D9_PresentVideo(IDirect3DDevice9 *pDev, NV_DX_PRESENT_VIDEO_PARAMS *pPVParams); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) //! SUPPORTED OS: Windows 7 and higher //! //! \addtogroup dxvidcontrol //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION_NAME: NvAPI_D3D9_VideoSetStereoInfo // //! \fn NvAPI_D3D9_VideoSetStereoInfo(IDirect3DDevice9 *pDev, //! NV_DX_VIDEO_STEREO_INFO *pStereoInfo); //! \code //! DESCRIPTION: This api specifies the stereo format of a surface, so that the //! surface could be used for stereo video processing or compositing. //! In particular, this api could be used to link the left and right //! views of a decoded picture. //! //! \since Release: 313 //! //! INPUT: pDev - The device on which the stereo surface will be used //! pStereoInfo - The stereo format of the surface //! //! RETURN STATUS: an int which could be an NvAPI status or DX HRESULT code //! \endcode /////////////////////////////////////////////////////////////////////////////// #ifndef NV_STEREO_VIDEO_FORMAT_DEFINE #define NV_STEREO_VIDEO_FORMAT_DEFINE typedef enum _NV_STEREO_VIDEO_FORMAT { NV_STEREO_VIDEO_FORMAT_NOT_STEREO = 0, NV_STEREO_VIDEO_FORMAT_SIDE_BY_SIDE_LR = 1, NV_STEREO_VIDEO_FORMAT_SIDE_BY_SIDE_RL = 2, NV_STEREO_VIDEO_FORMAT_TOP_BOTTOM_LR = 3, NV_STEREO_VIDEO_FORMAT_TOP_BOTTOM_RL = 4, NV_STEREO_VIDEO_FORMAT_ROW_INTERLEAVE_LR = 5, NV_STEREO_VIDEO_FORMAT_ROW_INTERLEAVE_RL = 6, NV_STEREO_VIDEO_FORMAT_TWO_FRAMES_LR = 7, NV_STEREO_VIDEO_FORMAT_MONO_PLUS_OFFSET = 8, NV_STEREO_VIDEO_FORMAT_LAST = 9, } NV_STEREO_VIDEO_FORMAT; #endif // NV_STEREO_VIDEO_FORMAT_DEFINE typedef struct _NV_DX_VIDEO_STEREO_INFO { NvU32 dwVersion; //!< Must be NV_DX_VIDEO_STEREO_INFO_VER NVDX_ObjectHandle hSurface; //!< The surface whose stereo format is to be set NVDX_ObjectHandle hLinkedSurface; //!< The linked surface (must be valid when eFormat==NV_STEREO_VIDEO_FORMAT_TWO_FRAMES_LR) NV_STEREO_VIDEO_FORMAT eFormat; //!< Stereo format of the surface NvS32 sViewOffset; //!< Signed offset of each view (positive offset indicating left view is shifted left) BOOL bStereoEnable; //!< Whether stereo rendering should be enabled (if FALSE, only left view will be used) } NV_DX_VIDEO_STEREO_INFO; //! Macro for constructing the version field of ::NV_DX_VIDEO_STEREO_INFO #define NV_DX_VIDEO_STEREO_INFO_VER MAKE_NVAPI_VERSION(NV_DX_VIDEO_STEREO_INFO,1) NVAPI_INTERFACE NvAPI_D3D9_VideoSetStereoInfo(IDirect3DDevice9 *pDev, NV_DX_VIDEO_STEREO_INFO *pStereoInfo); //! @} #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_SetGamutData // //! \fn NvAPI_D3D9_SetGamutData(IDirect3DDevice9 *pDev, NvU32 outputId, NV_GAMUT_FORMAT format, NV_GAMUT_METADATA *pGamutData) //! DESCRIPTION: This API sets the Gamut Boundary Description (GBD) data. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 175 //! //! \param [in] pDev The device (display) to present to. //! \param [in] outputId The display output ID, which can be determined using NvAPI_GetAssociatedDisplayOutputId() //! for an intended display. //! \param [in] format The format of GBD data structure. //! \param [in] pGamutData The GBD data. //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT // ///////////////////////////////////////////////////////////////////////////////// //! \ingroup dx //! Gamut format data - used in NvAPI_D3D9_SetGamutData(). typedef enum _NV_GAMUT_FORMAT { NV_GAMUT_FORMAT_VERTICES = 0, NV_GAMUT_FORMAT_RANGE, } NV_GAMUT_FORMAT; //! \ingroup dx //! Gamut range metadata - used in NV_GAMUT_METADATA. typedef struct _NV_GAMUT_METADATA_RANGE { // Header NvU32 GBD_Color_Space:3; NvU32 GBD_Color_Precision:2; NvU32 Rsvd:2; //!< Must be set to 0 NvU32 Format_Flag:1; //!< Must be set to 1 // Packaged data NvU32 Min_Red_Data:12; NvU32 Max_Red_Data:12; NvU32 Min_Green_Data:12; NvU32 Max_Green_Data:12; NvU32 Min_Blue_Data:12; NvU32 Max_Blue_Data:12; } NV_GAMUT_METADATA_RANGE; //! \ingroup dx //! Gamut vertices metadata - used in NV_GAMUT_METADATA. typedef struct _NV_GAMUT_METADATA_VERTICES { // Header NvU32 GBD_Color_Space:3; NvU32 GBD_Color_Precision:2; NvU32 Rsvd:1; NvU32 Facet_Mode:1; //!< Must be set to 0 NvU32 Format_Flag:1; //!< Must be set to 0 NvU32 Number_Vertices_H:8; //!< Must be set to 0 NvU32 Number_Vertices_L:8; //!< Must be set to 4 // Packaged data NvU32 Black_Y_R:12; NvU32 Black_Cb_G:12; NvU32 Black_Cr_B:12; NvU32 Red_Y_R:12; NvU32 Red_Cb_G:12; NvU32 Red_Cr_B:12; NvU32 Green_Y_R:12; NvU32 Green_Cb_G:12; NvU32 Green_Cr_B:12; NvU32 Blue_Y_R:12; NvU32 Blue_Cb_G:12; NvU32 Blue_Cr_B:12; } NV_GAMUT_METADATA_VERTICES; //! \ingroup dx //! Gamut boundary description data - used in NvAPI_D3D9_SetGamutData(). typedef struct _NV_GAMUT_METADATA { union { NV_GAMUT_METADATA_RANGE rangeData; NV_GAMUT_METADATA_VERTICES verticesData; }data; }NV_GAMUT_METADATA; //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_SetGamutData(IDirect3DDevice9 *pDev, NvU32 outputId, NV_GAMUT_FORMAT format, NV_GAMUT_METADATA *pGamutData); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) //! \ingroup dx //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_SetSurfaceCreationLayout // //! \fn NvAPI_D3D9_SetSurfaceCreationLayout(IDirect3DDevice9 *pDev, //! NVAPI_SURFACE_LAYOUT_STRUCT *pSurfaceLayout); //! \code //! DESCRIPTION: This call will be used primarily for testing VIC for MCP89. //! This will set up the layout of surfaces that are created through CreateSurface calls //! //! SUPPORTED OS: Windows 7 and higher //! //! //! INPUT: pDev The device (display) to present to //! pSurfaceLayout The pointer to the surface layout //! Surface layouts supported right now include Block-Linear (BL), //! Pitch-Linear (PL) and Tiled (16x16) //! //! RETURN STATUS: an int which could be an NvAPI status or DX HRESULT code //! \endcode /////////////////////////////////////////////////////////////////////////////// typedef enum _NVAPI_SURFACE_LAYOUT { NVAPI_SURFACE_LAYOUT_BL = 0, NVAPI_SURFACE_LAYOUT_PL = 1, NVAPI_SURFACE_LAYOUT_TILED = 2, } NVAPI_SURFACE_LAYOUT; typedef struct _NVAPI_SURFACE_LAYOUT_STRUCT { BOOL bEnableLayoutOverride; NVAPI_SURFACE_LAYOUT slLayout; DWORD reserved[4]; } NVAPI_SURFACE_LAYOUT_STRUCT; NVAPI_INTERFACE NvAPI_D3D9_SetSurfaceCreationLayout(IDirect3DDevice9 *pDev, NVAPI_SURFACE_LAYOUT_STRUCT *pSurfaceLayout); //! @} #endif //defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_Video_GetVideoCapabilities // //! \fn NvAPI_D3D9_GetVideoCapabilities(IDirect3DDevice9 *pDev, //! DESCRIPTION: This function gets the GPU's video processing capabilities. The caller is responsible for furnishing //! the inputs within the NVAPI_VIDEO_CAPS_PACKET. This packet shall contain the output //! consisting of the supported video features for the current configuration. The number of //! NVAPI_VIDEO_CAPS will match the number of input video streams for which the capabilites //! have been requested. Multiple supported video profiles may be returned that would include //! a combination of various video features. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 158 //! //! \param [in] pDev The device (display) to present to //! \param [in] version Version of the NV_DX_VIDEO_CAPS structure //! \param [in] videoCaps NVAPI_VIDEO_CAPS_PACKET containing both the //! input Video Source information for which the capabilities //! are requested, as well as the output available //! supported video features for the current configuration. //! //! \return An int which could be an NvAPI status or DX HRESULT code // /////////////////////////////////////////////////////////////////////////////// //! \ingroup dxvidcontrol //! Used in _NVAPI_VIDEO_SRC_INFO. typedef enum _NV_CODEC { NV_CODEC_TYPE_NONE, NV_CODEC_TYPE_MPEG2, NV_CODEC_TYPE_H264, NV_CODEC_TYPE_VC1, NV_CODEC_TYPE_MVC, } NV_CODEC; //! Current video surface to be played back. \n //! Used in _NVAPI_VIDEO_CAPS_PACKET. //! \ingroup dxvidcontrol typedef struct _NVAPI_VIDEO_SRC_INFO { NvU32 srcWidth; //!< Input video width NvU32 srcHeight; //!< Input video height NV_CODEC codecType; //!< One of the available NV_CODEC's NvU32 avgBitrate; //!< Average bit rate for each stream in Kbps NvU64 reserved1; //!< reserved for future expansion NvU64 reserved2; } NVAPI_VIDEO_SRC_INFO; //! Current desktop resolution. \n //! Used in _NVAPI_VIDEO_CAPS_PACKET. //! \ingroup dxvidcontrol typedef struct _NVAPI_DESKTOP_RES { NvU32 width; //!< Current resolution width NvU32 height; //!< Current resolution height NvU32 bitsPerPixel; //!< Current resolution depth NvU32 refreshRate; //!< Current display refresh rate NvU64 reserved1; //!< Reserved for future expansion NvU64 reserved2; } NVAPI_DESKTOP_RES; //! \addtogroup dxvidcontrol //! @{ #define NV_DEINTERLACE_PIXADAPTIVE_BIT 0 //!< Hardware pixel adaptive deinterlacing available #define NV_VID_ENHANCE_EDGE_ENHANCE_BIT 0 //!< Edge enhancement present #define NV_VID_ENHANCE_NOISE_REDUCTION_BIT 1 //!< Noise reduction present #define NV_COLOR_CTRL_PROCAMP_BIT 0 //!< ProCamp is supported #define NV_COLOR_CTRL_COLOR_TEMP_BIT 1 //!< Color temp control supported #define NV_COLOR_CTRL_COLORSPACE_601_BIT 2 //!< Color space format ITU-R BT.601 supported #define NV_COLOR_CTRL_COLORSPACE_709_BIT 3 //!< Color space format ITU-R BT.709 supported #define NV_COLOR_CTRL_COLORSPACE_RGB_BIT 4 //!< Color space format RGB supported #define NV_GAMMA_Y_BIT 0 //!< Y-Gamma controls present #define NV_GAMMA_RGB_BIT 1 //!< RGB-Gamma controls present #define NV_MISC_CAPS_INV_TELECINE_BIT 0 //!< Inverse telecine is available //! @} //! Available video post-process features.\n //! Used in _NVAPI_VIDEO_CAPS. //! \ingroup dxvidcontrol typedef struct _NVAPI_VIDEO_PROCESSING_CAPS { NvU64 deinterlaceMode; //!< Possible deinterlace modes supported, "check NV_DEINTERLACE_xxx bits" NvU64 videoEnhance; //!< Possible HW postproc enhancements e.g. NR, EE, "check NV_VID_ENHANCE_xxx bits" NvU64 colorControl; //!< Color control is supported, "check NV_COLOR_xxx bits" NvU64 gamma; //!< Available gamma conversions, "check NV_GAMMA_xxx bits" NvU64 miscCaps; //!< Miscellaneous post processing caps supported, "check NV_MISC_CAPS_xxx bits" NvU64 reserved1; //!< Rserved for future use NvU64 reserved2; NvU64 reserved3; } NVAPI_VIDEO_PROCESSING_CAPS; //! \addtogroup vidFeature //! Video feature cap bits. \n //! Used in \ref _NVAPI_VIDEO_CAPS. //! @{ #define NV_VID_FEATURE_NO_SYNC_FLIPS_BIT 0 //!< When this bit is set, the application needs to lock the RGB render target //!< before calling RGB overlay to present video. //!< In general this bit is set for G7x, and not set for G8x and later chips. #define NV_VID_FEATURE_HALF_RES_ON_INTERLACED_BIT 1 //!< When this bit is set, it means that GPU can only show half resolution //!< video on the interlaced display, which is true for G7x. The application //!< needs a special workaround to show full-resolution video. #define NV_VID_FEATURE_DX_PROTECTION_VERSION_2 2 //!< When this bit it set, the driver supports version 2 of //!< DirectX video protection. #define NV_VID_FEATURE_STEREO_VIDEO_BIT 3 //!< When this bit is set, the driver supports stereo //!< VPBlit/VBBlitHD using NvAPI_D3D9_VideoSetStereoInfo(). #define NV_VID_FEATURE_STEREO_OVERLAY_VIDEO_BIT 4 //!< When this bit is set, it means the driver supports stereo overlay through //!< VPBlit/VBBlitHD using NvAPI_D3D9_VideoSetStereoInfo. //! @} //! \addtogroup perfLevel //! Performance level bits. \n //! Used in \ref _NVAPI_VIDEO_CAPS. //! @{ #define NV_PERF_LEVEL_RED_BIT 0 //!< When this bit is set, the GPU CANNOT support HD DVD/BluRay disc playback #define NV_PERF_LEVEL_YELLOW_BIT 1 //!< When this bit is set, the GPU meets the minimum requirement for //!< HD DVD/BluRay disc playback #define NV_PERF_LEVEL_GREEN_BIT 2 //!< When this bit is set, the GPU can support HD DVD/BluRay disc playback. #define NV_PERF_LEVEL_AERO_BIT 3 //!< When this bit is set, it means the GPU can support HD/BD playback with Aero enabled. #define NV_PERF_LEVEL_FRUC_BIT 4 //!< When this bit is set, it means the GPU can support FRUC. #define NV_PERF_LEVEL_3DBD_COMPOSITE_BIT 6 //!< When this bit is set, it means the GPU can support compositing for 3DBD //! @} //! Available video decode and post-process features \n //! Used in _NVAPI_VIDEO_CAPS_PACKET. //! \ingroup dxvidcontrol typedef struct _NVAPI_VIDEO_CAPS { NvU32 maxFlipRate; //!< Maximum flipping rate supported NV_CODEC hwDecode; //!< Supported codec for HW decoding NvU64 vidFeature; //!< Indicates presence of special video processing features NvU32 perfLevel; //!< GPU dependent level; can be red, yellow, or green NvU32 numVidProfiles; //!< Number of returned video profiles NvU32 maxResPixels; //!< Number of pixels in the max screen resolution supported at maxFlipRate for the input //! codecType (refer to codecType field of the NVAPI_VIDEO_SRC_INFO structure). NvU32 reserved1; NVAPI_VIDEO_PROCESSING_CAPS vidProcCaps[NV_MAX_VID_PROFILES]; } NVAPI_VIDEO_CAPS; //! \addtogroup dxvidcontrol //! @{ #define RENDER_MODE_DWM_BIT 0 #define RENDER_MODE_OVERLAY_BIT 1 #define RENDER_MODE_STEREO_FULLSCREEN_BIT 2 //! @} //! Used in _NV_DX_VIDEO_CAPS. //! \ingroup dxvidcontrol typedef struct _NVAPI_VIDEO_CAPS_PACKET_V1 { NvU32 packetVer; //!< (IN) Packet version that needs to match NVAPI_VIDEO_CAPS_PACKET_VER_1 NvU32 numVidStreams; //!< (IN) Number of streams for which the video caps are requested NVAPI_VIDEO_SRC_INFO vidSrcInfo[NV_MAX_VID_STREAMS]; //!< (IN) Video source info NVAPI_DESKTOP_RES res[NV_MAX_HEADS]; //!< (IN) Current desktop resolution(s) NvU64 renderMode; //!< (IN) Requested rendering mode for the video source NvU64 totalFB; //!< (OUT) Total framebuffer supported NvU16 NumExtOvlBufNeeded; //!< (OUT) Recommended number of external overlay buffers NvU16 reserved1; //!< (IN/OUT) Reserved for future expansion NvU32 reserved2; //!< (IN/OUT) NVAPI_VIDEO_CAPS videoCaps[NV_MAX_VID_STREAMS]; //!< (OUT) Available video features for requested video streams } NVAPI_VIDEO_CAPS_PACKET_V1; //! Macro for constructing the version field of structure NVAPI_VIDEO_CAPS_PACKET typedef NVAPI_VIDEO_CAPS_PACKET_V1 NVAPI_VIDEO_CAPS_PACKET; #define NVAPI_VIDEO_CAPS_PACKET_VER_1 2 // Have to keep as earlier defined "2" for apps using earlier version 1 #define NVAPI_VIDEO_CAPS_PACKET_VER NVAPI_VIDEO_CAPS_PACKET_VER_1 //! Used in NvAPI_D3D9_GetVideoCapabilities(). //! \ingroup dxvidcontrol typedef struct _NV_DX_VIDEO_CAPS_V1 { NvU32 version; //!< (IN) NVAPI version that matched NV_DX_VIDEO_CAPS_VER_1 NVAPI_VIDEO_CAPS_PACKET_V1 videoCapsPacket; //!< (IN/OUT) } NV_DX_VIDEO_CAPS_V1; typedef NV_DX_VIDEO_CAPS_V1 NV_DX_VIDEO_CAPS; //! \ingroup dxvidcontrol #define NV_DX_VIDEO_CAPS_VER_1 MAKE_NVAPI_VERSION(NV_DX_VIDEO_CAPS_V1,1) #define NV_DX_VIDEO_CAPS_VER NV_DX_VIDEO_CAPS_VER_1 #if defined(_D3D9_H_) && defined(__cplusplus) //! SUPPORTED OS: Windows 7 and higher //! //! \ingroup dxvidcontrol NVAPI_INTERFACE NvAPI_D3D9_GetVideoCapabilities(IDirect3DDevice9 *pDev, NV_DX_VIDEO_CAPS *pVideoCaps); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) //! \ingroup dx //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_QueryVideoInfo // //! \fn NvAPI_D3D9_QueryVideoInfo(IDirect3DDevice9 *pDev, //! NVAPI_D3D9_QUERY_VIDEO_INFO *pQueryInfo) //! DESCRIPTION: Extensible NvAPI command for mechanism to retrieve various video related information //! The information may not be specific to the GPU, but will appear like it is from the //! application's POV. The calling application can various query commands, and fill in the //! appropriate structure packet (if necessary), for the specified command. The list of //! queries available to the application and exposed through this command is intended to be //! customizable so we only need to expose as much as needed. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDev The D3D9 device //! \param [in] pQueryInfo NVAPI_D3D9_QUERY_VIDEO_INFO containing the type of query to //! perform and returned information. //! //! \return An int which could be an NvAPI status or DX HRESULT code //! /////////////////////////////////////////////////////////////////////////////// //! Query video info commands typedef enum _NVAPI_D3D9_QUERY_COMMAND { NVAPI_D3D9_QUERY_NULL_CMD = 0, //!< Null command NVAPI_D3D9_QUERY_STEREO_INFO_CMD = 1, //!< Stereo video information NVAPI_D3D9_QUERY_COLOR_INFO_CMD = 2, //!< Color space and range information } NVAPI_D3D9_QUERY_COMMAND; //! Query stereo input formats typedef enum _NV_QUERY_STEREO_INFO_FORMAT { NVAPI_QUERY_STEREO_INFO_FORMAT_NOT_STEREO = 0x00000000, NVAPI_QUERY_STEREO_INFO_FORMAT_SIDE_BY_SIDE_LR = 0x00000001, NVAPI_QUERY_STEREO_INFO_FORMAT_SIDE_BY_SIDE_RL = 0x00000002, NVAPI_QUERY_STEREO_INFO_FORMAT_TOP_BOTTOM_LR = 0x00000004, NVAPI_QUERY_STEREO_INFO_FORMAT_TOP_BOTTOM_RL = 0x00000008, NVAPI_QUERY_STEREO_INFO_FORMAT_ROW_INTERLEAVE_LR = 0x00000010, NVAPI_QUERY_STEREO_INFO_FORMAT_ROW_INTERLEAVE_RL = 0x00000020, NVAPI_QUERY_STEREO_INFO_FORMAT_TWO_FRAMES_LR = 0x00000040, NVAPI_QUERY_STEREO_INFO_FORMAT_MONO_PLUS_OFFSET = 0x00000080, } NV_QUERY_STEREO_INFO_FORMAT; #define NVAPI_QUERY_STEREO_INFO_FORMAT_ALL NVAPI_QUERY_STEREO_INFO_FORMAT_SIDE_BY_SIDE_LR | \ NVAPI_QUERY_STEREO_INFO_FORMAT_SIDE_BY_SIDE_RL | \ NVAPI_QUERY_STEREO_INFO_FORMAT_TOP_BOTTOM_LR | \ NVAPI_QUERY_STEREO_INFO_FORMAT_TOP_BOTTOM_RL | \ NVAPI_QUERY_STEREO_INFO_FORMAT_ROW_INTERLEAVE_LR | \ NVAPI_QUERY_STEREO_INFO_FORMAT_ROW_INTERLEAVE_RL | \ NVAPI_QUERY_STEREO_INFO_FORMAT_TWO_FRAMES_LR | \ NVAPI_QUERY_STEREO_INFO_FORMAT_MONO_PLUS_OFFSET //! Query stereo info packet typedef struct _NVAPI_QUERY_STEREO_INFO { NvU32 dwFormats; //!< (OUT) Mask of supported stereo formats NvU32 bIsSupported : 1; //!< (OUT) Whether stereo is supported NvU32 bIsEnabled : 1; //!< (OUT) Whether stereo is current enabled NvU32 dwReserved1 :30; //!< (IN/OUT) Future expansion NvU32 dwReserved2[4]; //!< (IN/OUT) Future expansion } NVAPI_QUERY_STEREO_INFO; //! Query color colorspace formats typedef enum _NVAPI_QUERY_COLOR_INFO_COLORSPACE { NVAPI_QUERY_COLOR_INFO_COLORSPACE_NONE = 0x00000000, NVAPI_QUERY_COLOR_INFO_COLORSPACE_601 = 0x00000001, NVAPI_QUERY_COLOR_INFO_COLORSPACE_709 = 0x00000002, NVAPI_QUERY_COLOR_INFO_COLORSPACE_RGB = 0x00000004, } NVAPI_QUERY_COLOR_INFO_COLORSPACE; #define NVAPI_QUERY_COLOR_INFO_COLORSPACE_ALL NVAPI_QUERY_COLOR_INFO_COLORSPACE_601 | \ NVAPI_QUERY_COLOR_INFO_COLORSPACE_709 | \ NVAPI_QUERY_COLOR_INFO_COLORSPACE_RGB //! Query color info packet typedef struct _NVAPI_QUERY_COLOR_INFO { NvU32 dwColorSpaces; //!< (OUT) Mask of supported color spaces NvU32 dwReserved[4]; //!< (IN/OUT) Future expansion } NVAPI_QUERY_COLOR_INFO; //! Query video info packet typedef struct _NVAPI_DX_QUERY_VIDEO_INFO { NvU32 dwVersion; //!< (IN) NVAPI version that matched NV_DX_QUERY_INFO_VER NVAPI_D3D9_QUERY_COMMAND eQueryCommand; //!< (IN) Type of query to perform or information requested union { NVAPI_QUERY_STEREO_INFO stStereoInfo; //!< (OUT) NVAPI_QUERY_COLOR_INFO stColorInfo; //!< (OUT) }; } NVAPI_D3D9_QUERY_VIDEO_INFO; //! Macro for constructing the version field of ::NVAPI_D3D9_QUERY_VIDEO_INFO #define NVAPI_D3D9_QUERY_VIDEO_INFO_VER MAKE_NVAPI_VERSION(NVAPI_D3D9_QUERY_VIDEO_INFO,1) NVAPI_INTERFACE NvAPI_D3D9_QueryVideoInfo(IDirect3DDevice9 *pDev, NVAPI_D3D9_QUERY_VIDEO_INFO *pQueryInfo); //! @} #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_RestoreDesktop // //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \return NVAPI_ERROR or NVAPI_OK //! //! \note This is not an interface, this is just a short-hand helper //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// inline int NvAPI_D3D9_RestoreDesktop(IDirect3DDevice9 *pDev) { return NvAPI_D3D9_PresentSurfaceToDesktop(pDev,NVDX_OBJECT_NONE,0); } #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_AliasPrimaryFromDevice // //! This function creates an alias surface from the given pDevFrom's primary swap chain. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 80 //! //! \param [in] pDevTo Where new surfaces created in //! \param [in] pDevFrom Where the surfaces aliased from //! \param [in] dwIndex Index to the primary flipchain of pDevFrom //! //! \param [out] ppSurf Filled with new surface pointer (to be released by the caller) //! \param [out] pHandle (optional) If non-NULL, filled with SurfaceHandle of the surface //! The same can be achieved by calling NVD3D9_GetSurfaceHandle afterwards. //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx ////////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_AliasPrimaryFromDevice(IDirect3DDevice9 *pDevTo, IDirect3DDevice9 *pDevFrom, NvU32 dwIndex, IDirect3DSurface9 **ppSurf, NVDX_ObjectHandle *pHandle = 0); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_SetResourceHint // //! \fn NvAPI_D3D9_SetResourceHint(IDirect3DDevice9 *pDev, NVDX_ObjectHandle obj, //! This API has been deprecated. //! 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 cateroy. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \param [in] pDev Valid device context //! \param [in] obj Previously obtained HV resource handle //! \param [in] dwHintCategory Category of the hints //! \param [in] dwHintType A hint within this category //! \param [in] *pdwHintValue Pointer to location containing hint value //! \param [out] *dwHintValue Receives previous value of this hint. //! //! \return An int which could be an NvAPI status or DX HRESULT code // //////////////////////////////////////////////////////////////////////////////// //! Available hint categories / hint names: //! - SLI: //! \ingroup dx typedef enum _NVAPI_SETRESOURCEHINT_CATEGORY { NvApiHints_Sli = 1, } NVAPI_SETRESOURCEHINT_CATEGORY; //! Types of SLI hints; //! NvApiHints_Sli_InterframeAwareForTexturing - deprecated //! //! Default value: zero //! \ingroup dx typedef enum _NVAPI_SETRESOURCEHINT_SLI_HINTS { NvApiHints_Sli_InterframeAwareForTexturing = 1, } NVAPI_SETRESOURCEHINT_SLI_HINTS; // // end of categories //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_SetResourceHint(IDirect3DDevice9 *pDev, NVDX_ObjectHandle obj, NVAPI_SETRESOURCEHINT_CATEGORY dwHintCategory, NvU32 dwHintName, NvU32 *pdwHintValue); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_Lock // //! \fn NvAPI_D3D9_Lock(IDirect3DDevice9 *pDev, NVDX_ObjectHandle obj, NvU32 dwLockFlags, //! This function locks and unlocks a given surface identified by handle. This //! function can provide CPU access to all object including //! RTs, ZBs, textures, VBs and IBs. //! //! \note //! - (a) Do not use this if an object can be accessed using normal DX9 means. //! - (b) Lock should be called right before CPU access, and Unlock called right after //! the access is completed. Any 3D rendering or state change may cause the locked //! surface to be lost. When that happens, trying to access the cached CPU //! address may cause the application to crash. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \return An int which could be an NvAPI status or DX HRESULT code // /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- //! \ingroup dx #define NV_ACCESSFLAG_READONLY 0x00000001 // TBD: do these go with dwLockFlags? //! \ingroup dx #define NV_ACCESSFLAG_DISCARD 0x00000002 //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_Lock(IDirect3DDevice9 *pDev, NVDX_ObjectHandle obj, NvU32 dwLockFlags, void **ppAddress, NvU32 *pPitch); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_Unlock // //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 80 //! //! \return An int which could be an NvAPI status or DX HRESULT code //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_Unlock(IDirect3DDevice9 *pDev, NVDX_ObjectHandle obj); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) #ifndef NV_VIDEO_COMPONENTS_DEFINE #define NV_VIDEO_COMPONENTS_DEFINE /////////////////////////////////////////////////////////////////////////////// // Structs and enums related to Video state /////////////////////////////////////////////////////////////////////////////// //! \ingroup dxvidstate //! Used in NVAPI_GET_VIDEO_STATE_COMPONENT \n //! Components related to the video state typedef enum _NVAPI_VIDEO_STATE_COMPONENT_ID { NVAPI_VIDEO_STATE_COMPONENT_ID_NONE = -1, //!< Placeholder for invalid component ID NVAPI_VIDEO_STATE_COMPONENT_BRIGHTNESS , //!< Permits control of video's brightness value NVAPI_VIDEO_STATE_COMPONENT_CONTRAST , //!< Allows control of video's contrast value NVAPI_VIDEO_STATE_COMPONENT_HUE , //!< To control the hue value NVAPI_VIDEO_STATE_COMPONENT_SATURATION , //!< Allows control of video's saturation value NVAPI_VIDEO_STATE_COMPONENT_COLORTEMP , //!< Allows control of the color temperature value NVAPI_VIDEO_STATE_COMPONENT_Y_GAMMA , //!< To set the Y-gamma values NVAPI_VIDEO_STATE_COMPONENT_RGB_GAMMA_R , //!< To set the R value of RGB gamma NVAPI_VIDEO_STATE_COMPONENT_RGB_GAMMA_G , //!< To set the G value of RGB gamma NVAPI_VIDEO_STATE_COMPONENT_RGB_GAMMA_B , //!< To set the B value of RGB gamma NVAPI_VIDEO_STATE_COMPONENT_COLOR_SPACE , //!< Permits choice of various color spaces using VIDEO_COMP_ALGO_COLOR_SPACE_xxx NVAPI_VIDEO_STATE_COMPONENT_COLOR_RANGE , //!< Allows setting between a limited/full color range using VIDEO_COMP_ALGO_COLOR_RANGE_xxx NVAPI_VIDEO_STATE_COMPONENT_PLAYBACK_PROFILE, //!< Permits using special postprocessing for Adobe Flash 9 Content NVAPI_VIDEO_STATE_COMPONENT_DEINTERLACE , //!< To set various types of deinterlacing algorithms NVAPI_VIDEO_STATE_COMPONENT_SCALING , //!< Allows setting video scaling algorithms NVAPI_VIDEO_STATE_COMPONENT_CADENCE , //!< Allows control of the cadence algorithms NVAPI_VIDEO_STATE_COMPONENT_NOISE_REDUCE , //!< Allows setting post-processing noise reduction values NVAPI_VIDEO_STATE_COMPONENT_EDGE_ENHANCE , //!< Permits post-processing edge enhancement value adjustment NVAPI_VIDEO_STATE_COMPONENT_OVERDRIVE , //!< To control the overdrive feature NVAPI_VIDEO_STATE_COMPONENT_SPLITSCREEN , //!< To permit setting a splitscreen using one of VIDEO_COMP_ALGO_SPLITSCREEN_xxx NVAPI_VIDEO_STATE_COMPONENT_DEBLOCKING , //!< Allows out-of-loop deblocking NVAPI_VIDEO_STATE_COMPONENT_DYNAMIC_CONTRAST, //!< This feature will be deprecated from the driver soon so pls. do not use this enum NVAPI_VIDEO_STATE_COMPONENT_GREEN_STRETCH , //!< This feature will be deprecated from the driver soon so pls. do not use this enum NVAPI_VIDEO_STATE_COMPONENT_BLUE_STRETCH , //!< This feature will be deprecated from the driver soon so pls. do not use this enum NVAPI_VIDEO_STATE_COMPONENT_SKIN_TONE_CORRECTION, //!< This feature will be deprecated from the driver soon so pls. do not use this enum NVAPI_VIDEO_STATE_COMPONENT_GAMUT_REMAPPING , //!< Applies gamut remapping on video NVAPI_VIDEO_STATE_COMPONENT_2DTO3D , //!< Converts 2D video to 3D stereo video NVAPI_VIDEO_STATE_COMPONENT_3D_ANALYSIS , //!< Analyzing 3D stereo video NVAPI_VIDEO_STATE_COMPONENT_FRC , //!< Frame Rate Converter NVAPI_VIDEO_STATE_COMPONENT_BEN , //!< Applies deblocking on video NVAPI_VIDEO_STATE_COMPONENT_ID_LAST , //!< All valid components defined before this one } NVAPI_VIDEO_STATE_COMPONENT_ID; //! Dynamic contrast value - kept for backward compatibility. #define NVAPI_VIDEO_STATE_COMPONENT_DYNAMIC_CONSTRAST NVAPI_VIDEO_STATE_COMPONENT_DYNAMIC_CONTRAST //! \ingroup dxvidstateypes //! See \ref #NVAPI_VIDEO_COMPONENT_ALGORITHM. #define VIDEO_COMP_ALGO_CUSTOM_BASE 64 //! \ingroup dxvidstate //! Used in NVAPI_GET_VIDEO_STATE_COMPONENT. \n //! Algorithms controlling various video components typedef enum _NVAPI_VIDEO_COMPONENT_ALGORITHM { VIDEO_COMP_ALGO_COLOR_SPACE_601 = 0, //!< Use the ITU-R BT.601 standard in color-space conversion for xxx_COLOR_SPACE component VIDEO_COMP_ALGO_COLOR_SPACE_709 = 1, //!< Use the ITU-R BT.709 standard in color-space conversion for xxx_COLOR_SPACE component VIDEO_COMP_ALGO_COLOR_SPACE_CUSTOM_04 = VIDEO_COMP_ALGO_CUSTOM_BASE+4, //!< Use custom color matrix VIDEO_COMP_ALGO_COLOR_RANGE_STD = 0, //!< Full range of (0-255) for xxx_COLOR_RANGE component, equivalent to Microsoft's DXVADDI_NOMINALRANGE::DXVADDI_NominalRange_0_255 VIDEO_COMP_ALGO_COLOR_RANGE_EXT = 1, //!< Limited range of (16-235) for xxx_COLOR_RANGE component, equivalent to Microsoft's DXVADDI_NOMINALRANGE::DXVADDI_NominalRange_16_235 VIDEO_COMP_ALGO_PLAYBACK_PROFILE_NONE = 0, //!< Use no playback profile VIDEO_COMP_ALGO_PLAYBACK_PROFILE_ADOBE_FLASH_9 = 1, //!< Use the internet video enhancement postprocessing for Adobe Flash 9 VIDEO_COMP_ALGO_DEINTERLACE_NONE = 0, //!< No deinterlacing is done VIDEO_COMP_ALGO_DEINTERLACE_BOB = 1, //!< Perform Bob deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_WEAVE = 2, //!< Use weave deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_SIMPLE_ADAPTIVE = 3, //!< Perform a simple motion adaptive deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_GRADIENT_SIMPLE = 4, //!< Use a simple gradient deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_GRADIENT_FULL = 5, //!< Use advanced gradient deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_ADAPTIVE_FOUR_FIELD = 6, //!< Perform four field motion adaptive deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_DIR_SPATIAL = 7, //!< User directional spatial deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_ADVANCED = 8, //!< Perform proprietary advanced deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_GPU_CAPABLE = 9, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_DEINTERLACE_MEDIAN = 10, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_DEINTERLACE_DIR_SPATIAL_LIGHT = 11, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_DEINTERLACE_DIR_SPATIAL_SD = 12, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_DEINTERLACE_DIR_SPATIAL_HD = 13, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_DEINTERLACE_ONE_PASS = 14, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_DEINTERLACE_COMPUTE = 15, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_DEINTERLACE_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom Deinterlacing algorithm VIDEO_COMP_ALGO_DEINTERLACE_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom Deinterlacing algorithm VIDEO_COMP_ALGO_SCALING_ALG_SIMPLE = 0, //!< Do scaling using a simple algorithm VIDEO_COMP_ALGO_SCALING_ALG_4x4FILTER = 1, //!< Perform scaling using a 4x4 filter VIDEO_COMP_ALGO_SCALING_ALG_8x8FILTER = 2, //!< Perform scaling using a 8x8 filter VIDEO_COMP_ALGO_SCALING_ALG_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom scaling component VIDEO_COMP_ALGO_SCALING_ALG_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom scaling component VIDEO_COMP_ALGO_CADENCE_NONE = 0, //!< Turn cadence OFF VIDEO_COMP_ALGO_CADENCE_SIMPLE = 1, //!< Use simple cadence detection VIDEO_COMP_ALGO_CADENCE_VOF = 2, //!< Use video on film cadence detection VIDEO_COMP_ALGO_CADENCE_COMPUTE = 3, //!< Use compute cadence detection VIDEO_COMP_ALGO_CADENCE_GPU_CAPABLE = 4, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_NOISE_REDUCE_PUREVIDEO = 0, //!< Use PureVideo noise reduction VIDEO_COMP_ALGO_NOISE_REDUCE_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom noise reduction VIDEO_COMP_ALGO_NOISE_REDUCE_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom noise reduction VIDEO_COMP_ALGO_EDGE_ENHANCE_PUREVIDEO = 0, //!< Use PureVideo Sharpening Filter VIDEO_COMP_ALGO_EDGE_ENHANCE_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom Sharpening Filter VIDEO_COMP_ALGO_EDGE_ENHANCE_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom Sharpening Filter VIDEO_COMP_ALGO_OVERDRIVE_SIMPLE = 0, //!< Use simple overdrive algorithm VIDEO_COMP_ALGO_SPLITSCREEN_TYPE_NORMAL = 0, //!< Set the splitscreen in normal mode VIDEO_COMP_ALGO_SPLITSCREEN_TYPE_REPEATED = 1, //!< Set the splitscreen to be repeated VIDEO_COMP_ALGO_SPLITSCREEN_TYPE_ON_MIRROR = 2, //!< Set the splitscreen as a mirror VIDEO_COMP_ALGO_DYNAMIC_CONTRAST_PRESET_NONE = 0, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_DYNAMIC_CONTRAST_PRESET_LOW = 1, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_DYNAMIC_CONTRAST_PRESET_MEDIUM = 2, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_DYNAMIC_CONTRAST_PRESET_HIGH = 3, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_GREEN_STRETCH_PRESET_NONE = 0, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_GREEN_STRETCH_PRESET_LOW = 1, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_GREEN_STRETCH_PRESET_MEDIUM = 2, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_GREEN_STRETCH_PRESET_HIGH = 3, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_BLUE_STRETCH_PRESET_NONE = 0, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_BLUE_STRETCH_PRESET_LOW = 1, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_BLUE_STRETCH_PRESET_MEDIUM = 2, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_BLUE_STRETCH_PRESET_HIGH = 3, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_SKIN_TONE_CORRECTION_PRESET_NONE = 0, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_SKIN_TONE_CORRECTION_PRESET_SQUEEZE = 1, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_SKIN_TONE_CORRECTION_PRESET_RED = 2, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_SKIN_TONE_CORRECTION_PRESET_YELLOW = 3, //!< This feature will be deprecated from the driver soon so pls. do not use this enum VIDEO_COMP_ALGO_GAMUT_REMAPPING_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom 3x3 gamut remapping matrix VIDEO_COMP_ALGO_GAMUT_REMAPPING_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom 3x3 gamut remapping matrix VIDEO_COMP_ALGO_2DTO3D_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom 2Dto3D conversion VIDEO_COMP_ALGO_2DTO3D_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom 2Dto3D conversion VIDEO_COMP_ALGO_3D_ANALYSIS_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom 3DAnalysis algorithm VIDEO_COMP_ALGO_3D_ANALYSIS_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom 3DAnalysis algorithm VIDEO_COMP_ALGO_FRC_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom frame rate converter VIDEO_COMP_ALGO_FRC_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom frame rate converter VIDEO_COMP_ALGO_BEN_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom deblocking algorithm VIDEO_COMP_ALGO_BEN_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom deblocking algorithm } NVAPI_VIDEO_COMPONENT_ALGORITHM; //! \ingroup dxvidstate //! Used in NVAPI_GET_VIDEO_STATE_COMPONENT. \n //! Bit masks for enabling video components at various resolutions typedef enum _NVAPI_VIDEO_COMPONENT_ENABLE { VIDEO_COMP_ENA_480i = 0x00000001, //!< component is enabled at 480i video resolution VIDEO_COMP_ENA_480p = 0x00000002, //!< component is enabled at 480p video resolution VIDEO_COMP_ENA_576i = 0x00000004, //!< component is enabled at 576i video resolution VIDEO_COMP_ENA_576p = 0x00000008, //!< component is enabled at 576p video resolution VIDEO_COMP_ENA_720p = 0x00000010, //!< component is enabled at 720p video resolution VIDEO_COMP_ENA_1080i = 0x00000020, //!< component is enabled at 1080i video resolution VIDEO_COMP_ENA_1080p = 0x00000040, //!< component is enabled at 1080p video resolution } NVAPI_VIDEO_COMPONENT_ENABLE; //! \ingroup dxvidstate //! Used in NvAPI_D3D9_GetVideoState(). \n //! Packet that facilitates retrieving information about a video component typedef struct _NVAPI_GET_VIDEO_STATE_COMPONENT { NvU32 version; //!< (IN) NVAPI version that matches NVAPI_GET_VIDEO_STATE_COMPONENT_VER NvU32 componentID; //!< (IN) identify the individual component, one of NVAPI_VIDEO_STATE_COMPONENT_xxx enums NvU32 bIsSupported : 1; //!< (OUT) set if this component feature is supported NvU32 bIsOverridenByUser : 1; //!< (OUT) set if component is overriden by user's choice NvU32 reserved1 : 30; //!< (OUT) reserved for future expansion NvU32 isEnabled; //!< (OUT) set if component is enabled, one or more of NVAPI_VIDEO_COMPONENT_ENABLE bitmasks NvU32 minValue; //!< (OUT) minimum valid value NvU32 maxValue; //!< (OUT) maximum valid value NvU32 totalSteps; //!< (OUT) number of steps between min and max NvU32 defaultValue; //!< (OUT) pre-defined NVIDIA default NvU32 unityValue; //!< (OUT) unity is the disable value for a component NvU32 currentValueActive; //!< (OUT) value in use NvU64 defaultAlgo; //!< (OUT) default algorithm, one or more of NVAPI_VIDEO_COMPONENT_ALGORITHM enums NvU64 currentAlgoActive; //!< (OUT) algorithm in use, one or more of NVAPI_VIDEO_COMPONENT_ALGORITHM enums union { NvU64 qwReserved[9]; struct { NvU32 dwAppKey; //!< (IN) Secret key to authenticate the caller, ONLY used in NvAPI_SetVideoState NvU32 bTopPriority : 1; //!< (OUT)Indicates that these settings have precedence over D3D NvAPI settings, ONLY valid in NvAPI_GetVideoState NvU32 bHasCustomAlgo : 1; //!< (OUT)Indicates whether an out-of-process application has custom algorithm data NvU32 bReserved : 30;//!< (OUT)Reserved for expansion struct { NvU64 pData; //!< (IN) Buffer to hold the retrieved custom algo data NvU32 dwSize; //!< (IN) Size in bytes of the above buffer, must be <= NVAPI_VIDEO_STATE_MAX_CUSTOM_ALGO_SIZE. } customAlgo; } appInfo; }; } NVAPI_GET_VIDEO_STATE_COMPONENT; //! \ingroup dxvidstate //! Used in NVAPI_GET_VIDEO_STATE_COMPONENT. #define NVAPI_GET_VIDEO_STATE_COMPONENT_VER MAKE_NVAPI_VERSION(NVAPI_GET_VIDEO_STATE_COMPONENT,1) //! \ingroup dxvidstate //! Used in NVAPI_SET_VIDEO_STATE_COMPONENT. \n //! Return status after attempting to set a video component typedef enum _NVAPI_VIDEO_COMP_RETURN_STATUS { VIDEO_COMP_STATUS_SUCCESS = 0x00000000, //!< Video component is set successfully VIDEO_COMP_STATUS_UNSUCCESSFUL = 0x00000001, //!< Failed to set video component VIDEO_COMP_STATUS_COMPONENT_NOT_SUPPORTED = 0x00000002, //!< Video component is not supported VIDEO_COMP_STATUS_VALUE_OUT_OF_RANGE = 0x00000004, //!< Video component's value is invalid and does not fall into range VIDEO_COMP_STATUS_ALGO_NOT_RECOGNIZED = 0x00000008, //!< Video component's algorithm is invalid VIDEO_COMP_STATUS_OVERRIDDEN_BY_USER = 0x00000010, //!< Request not completed because of user-mandated override VIDEO_COMP_STATUS_Y_GAMMA_ENABLED = 0x00000020, //!< Cannot set RGB-gamma because Y-Gamma is already enabled VIDEO_COMP_STATUS_RGB_GAMMA_ENABLED = 0x00000040, //!< Cannot set Y-gamma because RGB-Gamma is already enabled } NVAPI_VIDEO_COMP_RETURN_STATUS; // Packet containing information to allow setting the video component //! \ingroup dxvidstate #define NVAPI_VIDEO_STATE_MAX_CUSTOM_ALGO_SIZE 128 //! \ingroup dxvidstate //! Packet containing information to allow setting the video component. \n //! Used in NvAPI_D3D9_SetVideoState(). typedef struct _NVAPI_SET_VIDEO_STATE_COMPONENT { NvU32 version; //!< (IN) NVAPI version that matches NVAPI_SET_VIDEO_STATE_COMPONENT_VER NvU32 componentID; //!< (IN) identify the individual component, one of NVAPI_VIDEO_STATE_COMPONENT_xxx enums NvU32 enable; //!< (IN) flag to enable setting of component, one or more of NVAPI_VIDEO_COMPONENT_ENABLE bitmasks NvU32 setToValue; //!< (IN) value to use NvU64 setToAlgo; //!< (IN) algorithm to use NvU32 retStatus; //!< (OUT) result of video-component-set operation; a combination of VIDEO_COMP_STATUS_xxx bitmasks NvU32 reserved; union { NvU64 qwReserved[4]; struct { NvU32 dwAppKey; //!< (IN) Secret key to authenticate the caller, ONLY used in NvAPI_SetVideoState() NvU32 bTopPriority : 1; //!< (IN) Force these settings to have priority over D3D NvAPI settings, ONLY valid in NvAPI_GetVideoState() NvU32 bHasCustomAlgo : 1; //!< (IN) Out-of-process application has custom algorithm data NvU32 bReserved : 30;//!< (IN) reserved for expansion struct { NvU64 pData; //!< (IN) (Used only when bHasCustomAlgo == 1) Pointer to the custom algorithm data. NvU32 dwSize; //!< (IN) (Used only when bHasCustomAlgo == 1) Size in Bytes of the custom algorithm data, must be <= NVAPI_VIDEO_STATE_MAX_CUSTOM_ALGO_SIZE. } customAlgo; } appInfo; }; } NVAPI_SET_VIDEO_STATE_COMPONENT; //! \ingroup dxvidstate //! Used in NVAPI_SET_VIDEO_STATE_COMPONENT. #define NVAPI_SET_VIDEO_STATE_COMPONENT_VER MAKE_NVAPI_VERSION(NVAPI_SET_VIDEO_STATE_COMPONENT,1) #endif // NV_VIDEO_COMPONENTS_DEFINE /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GetVideoState // //! DESCRIPTION: This function returns the video state component for the specified component ID. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] pDev The Direct3D device for which the component is requested //! \param [in,out] pGetVidStateComp NVAPI_GET_VIDEO_STATE_COMPONENT packet containing //! a valid component ID //! //! \return An int which could be an NvAPI status (NVAPI_OK, NVAPI_INVALID_ARGUMENT, //! NVAPI_INCOMPATIBLE_STRUCT_VERSION, NVAPI_ERROR) or DX HRESULT code //! //! \ingroup dxvidstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_GetVideoState(IDirect3DDevice9 *pDev, NVAPI_GET_VIDEO_STATE_COMPONENT *pGetVidStateComp); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) ///////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_SetVideoState // //! DESCRIPTION: This function sets a particular video state component for the specific component ID. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] pDev The Direct3D device for which the component-set is requested //! \param [in,out] pSetVidStateComp NVAPI_SET_VIDEO_STATE_COMPONENT packet containing //! the video component information to be applied //! //! \return An int which could be an NvAPI status (NVAPI_OK, NVAPI_INVALID_ARGUMENT, //! NVAPI_INCOMPATIBLE_STRUCT_VERSION, NVAPI_ERROR) or DX HRESULT code //! //! \ingroup dxvidstate /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_SetVideoState(IDirect3DDevice9 *pDev, NVAPI_SET_VIDEO_STATE_COMPONENT *pSetVidStateComp); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_EnumVideoFeatures // //! \fn NvAPI_D3D9_EnumVideoFeatures(IDirect3DDevice9 *pDev, NVAPI_DX_VIDEO_FEATURE_DETAILS *pVideoFeatureDetails) //! DESCRIPTION: This API enumerates all video features supported on the current configuration. //! //! - First, the client should call the function with VF_GET_COUNT flag set. This will return the total //! feature count. //! - Then the client calls this function again iteratively, with the VF_GET_DETAILS flag until all of //! the features are enumerated. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \return An int which could be an NvAPI status or DX HRESULT code // /////////////////////////////////////////////////////////////////////////////// // enums and structs related to Video Features //! \addtogroup dxvidfeatures //! @{ #define NVAPI_MAX_FEATURES_PER_PACKET 3 //!< Maximum number of structs that can fit into dwArgs[20] of nvdxExtensionData struct // Update the nvVidFeatureNames[] array in nvd3d.cpp when adding a new Feature ID. //! Video feature IDs; used in _NVAPI_VIDEO_FEATURE_DETAILS typedef enum _NVAPI_VIDEO_FEATURE { NVAPI_VF_UNKNOWN = 0, NVAPI_VF_MPEG2SDDecodeAcceleration, NVAPI_VF_MPEG2HDDecodeAcceleration, NVAPI_VF_VC1SDDecodeAcceleration, NVAPI_VF_VC1HDDecodeAcceleration, NVAPI_VF_H264SDDecodeAcceleration, NVAPI_VF_H264HDDecodeAcceleration, NVAPI_VF_WMV9SDDecodeAcceleration, NVAPI_VF_WMV9HDDecodeAcceleration, NVAPI_VF_ProcAmp, NVAPI_VF_ColorTemperatureCorrection, NVAPI_VF_ColorSpaceConversion, NVAPI_VF_GammaCorrection, NVAPI_VF_OverDrive, NVAPI_VF_DynamicContrastEnhancement, NVAPI_VF_StretchBlueGreenSkin, NVAPI_VF_AdaptiveDeInterlacing, NVAPI_VF_NoiseReduction, NVAPI_VF_EdgeEnhancement, NVAPI_VF_InverseTelecine, NVAPI_VF_Scaling, NVAPI_VF_VideoMirror, NVAPI_VF_Blend, NVAPI_VF_DxvaHDTest, NVAPI_VF_GamutRemap, NVAPI_VF_MftXcode, NVAPI_VF_SkinToneCorrection, NVAPI_VF_MftYUY2Xcode, NVAPI_VF_MftDivxXcode, NVAPI_VF_MftWmv9Encode, NVAPI_VF_DynamicPState, NVAPI_VF_PostProcessVIC, NVAPI_VF_MVCHDDecodeAcceleration, NVAPI_VF_SVCHDDecodeAcceleration, NVAPI_VF_SimpleScaling, NVAPI_VF_VP8HDDecodeAcceleration, NVAPI_VF_VP9HDDecodeAcceleration, NVAPI_VF_ID_LAST, } NVAPI_VIDEO_FEATURE; // Update the nvVidEngineNames[] array in nvd3d.cpp when adding a new Engine name. //! Video feature engine names; used in _NVAPI_VIDEO_FEATURE_DETAILS typedef enum _NVAPI_VIDEO_ENGINES { NVAPI_VE_UNKNOWN = 0, NVAPI_VE_PixelShader, NVAPI_VE_MPEG2Decoder, NVAPI_VE_VideoProcessor1, NVAPI_VE_VideoProcessor2, NVAPI_VE_MSDEC, NVAPI_VE_VIC, } NVAPI_VIDEO_ENGINES; // Update the nvVidEntryPointNames[] array in nvd3d.cpp when adding a new Entry point in this enum. //! Video driver entry point; used in _NVAPI_VIDEO_FEATURE_DETAILS typedef enum _NVAPI_VIDEO_DRIVER_ENTRY_POINT { NVAPI_EP_UNKNOWN = 0, NVAPI_EP_DecodeEndFrame, NVAPI_EP_OverlayTransfer, NVAPI_EP_DIBlitEx, NVAPI_EP_VideoProcessBlt, NVAPI_EP_D3DBlt, NVAPI_EP_Blit32, NVAPI_EP_VPBltHD, } NVAPI_VIDEO_DRIVER_ENTRY_POINT; //! Used in _NVAPI_VIDEO_FEATURE_DESCRIPTOR typedef enum _NVAPI_VIDEO_FEATURE_GET_FLAG { NVAPI_VF_GET_COUNT = 0, NVAPI_VF_GET_DETAILS, } NVAPI_VIDEO_FEATURE_GET_FLAG; //! Used in _NVAPI_VIDEO_FEATURE_DESCRIPTOR typedef struct _NVAPI_VIDEO_FEATURE_DETAILS { NVAPI_VIDEO_FEATURE eFeature; NVAPI_VIDEO_ENGINES eEngine; NVAPI_VIDEO_DRIVER_ENTRY_POINT eEntryPoint; NvU32 dwReserved; } NVAPI_VIDEO_FEATURE_DETAILS; //! Returns the strings for each feature to the client. \n //! Used in _NVAPI_DX_VIDEO_FEATURE_DETAILS typedef struct _NVAPI_VID_FEATURE_STRINGS { NVAPI_VIDEO_FEATURE eFeature; NvAPI_ShortString szFeature; //!< Feature name NvAPI_ShortString szEngine; //!< Video engine name NvAPI_ShortString szDrvEntryPoint; //!< drv Entry Point name NvAPI_ShortString szReserved1; //!< Reserved for future expansion } NVAPI_VID_FEATURE_STRINGS; //! Macro for constructing the version field of NVAPI_VIDEO_FEATURE_DESCRIPTOR #define NVAPI_VIDEO_FEATURE_DESCRIPTOR_VER 1 //! Used in _NVAPI_DX_VIDEO_FEATURE_DETAILS typedef struct _NVAPI_VIDEO_FEATURE_DESCRIPTOR { NvU32 version; //!< (IN) Version that matches NVAPI_VIDEO_FEATURE_DETAILS_PACKET_VER NVAPI_VIDEO_FEATURE_GET_FLAG eVideoFeatureGetID; //!< (IN) Get total feature count or feature details NvU32 dwVFCount; //!< (OUT) Feature count returned NvU32 dwStartVFCount; //!< (IN) Starting surface count when reading the data NVAPI_VIDEO_FEATURE_DETAILS astFeatureDetails[NVAPI_MAX_FEATURES_PER_PACKET]; //!< (OUT) Array of video feature details NvU32 adwReserved[4]; //!< (IN/OUT) Reserved for future expansion } NVAPI_VIDEO_FEATURE_DESCRIPTOR; //! Used in NvAPI_D3D9_EnumVideoFeatures(). typedef struct _NVAPI_DX_VIDEO_FEATURE_DETAILS { NvU32 version; //!< (IN) NVAPI version that matched NVAPI_DX_VIDEO_FEATURE_DETAILS_VER NVAPI_VIDEO_FEATURE_DESCRIPTOR videoFeaturesPacket; //!< (IN/OUT) NVAPI_VID_FEATURE_STRINGS astFeatureDescNames[NVAPI_MAX_FEATURES_PER_PACKET]; //!< (OUT) Descriptor strings } NVAPI_DX_VIDEO_FEATURE_DETAILS; //! Macro for constructing the version field of _NVAPI_DX_VIDEO_FEATURE_DETAILS #define NVAPI_DX_VIDEO_FEATURE_DETAILS_VER MAKE_NVAPI_VERSION(NVAPI_DX_VIDEO_FEATURE_DETAILS,1) //! @} //! \ingroup dxvidfeatures NVAPI_INTERFACE NvAPI_D3D9_EnumVideoFeatures(IDirect3DDevice9 *pDev, NVAPI_DX_VIDEO_FEATURE_DETAILS *pVideoFeatureDetails); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) ////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GetSLIInfo // //! \fn NvAPI_D3D9_GetSLIInfo(IDirect3DDevice9 *pDev, NV_SLI_INFO *pSliInfo) //! This API is obsolete, please use NvAPI_D3D_GetCurrentSLIState(). //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 100 //! //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not active on this device //! \retval NVAPI_ERROR Error occurred // /////////////////////////////////////////////////////////////////////////////// //! \ingroup dx //! Used in NV_SLI_INFO typedef enum _NV_SLI_MODE { NV_SLI_RENDERING_MODE_AUTOSELECT = 0, //!< AutoSelect NV_SLI_RENDERING_MODE_AFR = 1, //!< Alternate Frames NV_SLI_RENDERING_MODE_SFR = 2, //!< Split Frame NV_SLI_RENDERING_MODE_SINGLE = 3, //!< Single GPU NV_SLI_RENDERING_MODE_AFR_OF_SFR = 4 //!< AFR of SFR } NV_SLI_MODE; //! \ingroup dx //! Used in NvAPI_D3D9_GetSLIInfo() typedef struct { NvU32 version; //!< Structure version NV_SLI_MODE mode; //!< [OUT] Current SLI mode NvU32 gpus; //!< [OUT] Number of GPUs } NV_SLI_INFO; //! \ingroup dx #define NV_SLI_INFO_VER MAKE_NVAPI_VERSION(NV_SLI_INFO,1) //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_GetSLIInfo(IDirect3DDevice9 *pDev, NV_SLI_INFO *pSliInfo); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_SetSLIMode // //! This function sets the SLI rendering mode for the Direct 3D device. The NVAPI_SLI_RENDERING_MODE_NOTALLOWED //! return status occurs when SLI mode is enabled in the middle of a rendering. An application may try //! to recreate/reset device and perform the call again. The normal way to set up SLI mode //! is immediately after CreateDevice() or Reset(). The NVAPI_NO_ACTIVE_SLI_TOPOLOGY value is //! returned when SLI is not active on this device. //! //! SUPPORTED OS: Windows XP //! //! //! \since Release: 100 //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not active on this device //! \retval NVAPI_SLI_RENDERING_MODE_NOTALLOWED Setup of SLI mode is not possible right now //! \retval NVAPI_INVALID_ARGUMENT Invalid rendering mode //! \retval NVAPI_ERROR Error occurred //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_SetSLIMode(IDirect3DDevice9 *pDev, NV_SLI_MODE SliMode); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_QueryAAOverrideMode // //! \fn NvAPI_D3D9_QueryAAOverrideMode(IDirect3DDevice9 *pDev, NvU32* pRenderingSampleCount, NvU32* pBufferSampleCount, NvU32* pAAMode) //! DESCRIPTION: This function returns the antialiasing level selected through NVCPL, //! the corresponding buffer requirement, and the equivalent multisample quality. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \param [in] pDev The Direct3D device for which the component is requested //! \param [out] pRenderingSampleCount The number of equivalent sample counts for this AA method, 0 indicates no AA set in the control panel //! \param [out] pBufferSampleCount The number of buffer samples required for every pixel, 0 indicates no AA set in the control panel //! \param [out] pAAMode The AA mode that is currently selected //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Error occurred // /////////////////////////////////////////////////////////////////////////////// //! \ingroup dx //! Used in NvAPI_D3D9_QueryAAOverrideMode(). enum { NVAPI_AAMODE_VCAA = 0x00000001, //!< The current AA method is one of the VCAA methods NVAPI_AAMODE_SLIAA = 0x00000002, //!< The current AA method is one of the SLI-AA methods NVAPI_AAMODE_VCAA_HIGHQUALITY = 0x00000004 //!< The current AA method is a VCAA high-quality method }; //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_QueryAAOverrideMode(IDirect3DDevice9 *pDev, NvU32* pRenderingSampleCount, NvU32* pBufferSampleCount, NvU32* pAAMode); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_D3D9_VideoSurfaceEncryptionControl // //! \fn NvAPI_D3D9_VideoSurfaceEncryptionControl(IDirect3DDevice9 *pDev, NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS *pVidSurfEncrCtrlParams) //! DESCRIPTION: This API is deprecated. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 165 //! //! \retval NVAPI_NOT_SUPPORTED Deprecated // /////////////////////////////////////////////////////////////////////////////// //! \addtogroup dxvidcontrol //! @{ //! Video Surface Encryption Control Commands, //! used in \ref NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS. typedef enum { NVAPI_VIDSURF_ENCRYPT_CMD_NULL = 0x00, //!< Null command NVAPI_VIDSURF_ENCRYPT_CMD_GET_GUID_COUNT = 0x01, //!< Get GUID count NVAPI_VIDSURF_ENCRYPT_CMD_GET_GUIDS = 0x02, //!< Get GUIDs NVAPI_VIDSURF_ENCRYPT_CMD_SET_GUID = 0x03, //!< Set GUID NVAPI_VIDSURF_ENCRYPT_CMD_ENABLE = 0x04, //!< Enable encryption NVAPI_VIDSURF_ENCRYPT_CMD_SET_KEY = 0x05, //!< Set key NVAPI_VIDSURF_ENCRYPT_CMD_SET_IV = 0x06 //!< Set IV } NVAPI_VIDSURF_ENCRYPT_COMMANDS; //! Used in NVAPI_VIDSURF_ENCRYPT_CTRL_GET_GUIDS #define NVAPI_VIDSURF_ENCRYPT_MAX_GUIDS (4) //! Used in NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS typedef struct { NvU32 dwGuidCount; // (OUT) } NVAPI_VIDSURF_ENCRYPT_CTRL_GET_GUID_COUNT; //! Used in NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS typedef struct { GUID guids[NVAPI_VIDSURF_ENCRYPT_MAX_GUIDS]; // (OUT) } NVAPI_VIDSURF_ENCRYPT_CTRL_GET_GUIDS; //! Used in NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS typedef struct { GUID guid; // (IN) } NVAPI_VIDSURF_ENCRYPT_CTRL_SET_GUID; //! Used in NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS typedef struct { IDirect3DSurface9 *pSurface; // D3D9 surface ptr (IN) NvU32 bEnable; // (IN) } NVAPI_VIDSURF_ENCRYPT_CTRL_ENABLE; //! Used in NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS typedef struct { NvU32 dwEncryptKeyProtectionMode; NvU32 dwEncryptKeyProtectionIdentifier; NvU32 dwKey[4]; // (IN) } NVAPI_VIDSURF_ENCRYPT_CTRL_SET_KEY; //! Used in NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS typedef struct { NvU32 dwEncryptKeyProtectionMode; NvU32 dwEncryptKeyProtectionIdentifier; NvU32 dwIV[4]; // (IN) } NVAPI_VIDSURF_ENCRYPT_CTRL_SET_IV; //! Used in NvAPI_D3D9_VideoSurfaceEncryptionControl() typedef struct { NvU32 version; // structure version (IN) NvU32 dwCommand; // command (IN) union { NVAPI_VIDSURF_ENCRYPT_CTRL_GET_GUID_COUNT GetGuidCount; NVAPI_VIDSURF_ENCRYPT_CTRL_GET_GUIDS GetGuids; NVAPI_VIDSURF_ENCRYPT_CTRL_SET_GUID SetGuid; NVAPI_VIDSURF_ENCRYPT_CTRL_ENABLE Enable; NVAPI_VIDSURF_ENCRYPT_CTRL_SET_KEY SetKey; NVAPI_VIDSURF_ENCRYPT_CTRL_SET_IV SetIV; }; } NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS; #define NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS_VER \ MAKE_NVAPI_VERSION(NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS,1) //! @} //! \ingroup dxvidcontrol NVAPI_INTERFACE NvAPI_D3D9_VideoSurfaceEncryptionControl(IDirect3DDevice9 *pDev, NVAPI_VIDSURF_ENCRYPT_CTRL_PARAMS *pVidSurfEncrCtrlParams); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_D3D9_DMA // //! \fn NvAPI_D3D9_DMA(IDirect3DDevice9 *pDev, NVAPI_D3D9_DMA_PARAMS *pVideoDMAParams) //! //! DESCRIPTION: This API lets the caller perform a number of functions related to //! the efficient DMA transfer of data between a Direct3D/DirectX 9 surface and //! user-allocated system memory. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 190 //! //! \retval ::NVAPI_OK Completed request //! \retval ::NVAPI_ERROR Miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameter. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of struct NVAPI_D3D9_DMA_PARAMS //! is not supported. /////////////////////////////////////////////////////////////////////////////// //! \addtogroup dxdma //! @{ //! Direct3D/DirectX 9 DMA commands used in _NVAPI_D3D9_DMA_PARAMS. typedef enum _NVAPI_D3D9_DMA_COMMANDS { NVAPI_D3D9_DMA_CMD_NULL = 0x00, //!< Null command NVAPI_D3D9_DMA_CMD_DESCRIBE = 0x01, //!< Describe allocation requirements - See _NVAPI_D3D9_DMA_DESCRIBE_PARAMS for parameters. NVAPI_D3D9_DMA_CMD_MAP = 0x02, //!< Map user-allocated system memory - See _NVAPI_D3D9_DMA_MAP_PARAMS for parameters. NVAPI_D3D9_DMA_CMD_UNMAP = 0x03, //!< Unmap user-allocated system memory - See _NVAPI_D3D9_DMA_UNMAP_PARAMS for parameters. NVAPI_D3D9_DMA_CMD_REG_EVENT = 0x04, //!< Register user-mode event handle - See _NVAPI_D3D9_DMA_EVENT_PARAMS for parameters. NVAPI_D3D9_DMA_CMD_UNREG_EVENT = 0x05, //!< Unregister user-mode event handle - See _NVAPI_D3D9_DMA_EVENT_PARAMS for parameters. NVAPI_D3D9_DMA_CMD_TRANSFER = 0x06, //!< Transfer between user system memory and Direct3D/DirectX 9 surface //!< See _NVAPI_D3D9_DMA_TRANSFER_PARAMS for parameters. NVAPI_D3D9_DMA_CMD_COLOR_MATRIX = 0x07, //!< Set up the color matrix for the transfer } NVAPI_D3D9_DMA_COMMANDS; //! Specifies the direction of the DMA transfer. //! See NVAPI_D3D9_DMA_TRANSFER_PARAMS for more details. typedef enum _NVAPI_D3D9_DMA_TRANSFER_DIR { NVAPI_D3D9_DMA_TRANSFER_DIR_UPLOAD = 0x00, //!< Transfer from user system memory to Direct3D/DirectX 9 surface. NVAPI_D3D9_DMA_TRANSFER_DIR_DOWNLOAD = 0x01, //!< Transfer from Direct3D/DirectX 9 surface to user system memory. } NVAPI_D3D9_DMA_TRANSFER_DIR; //! Specifies the type of the DMA transfer. //! See NVAPI_D3D9_DMA_TRANSFER_PARAMS for more details. typedef enum _NVAPI_D3D9_DMA_TRANSFER_TYPE { NVAPI_D3D9_DMA_TRANSFER_TYPE_PROGRESSIVE = 0x00, //!< Transfer progressive frame. NVAPI_D3D9_DMA_TRANSFER_TYPE_INTERLACED = 0x01, //!< Transfer both fields and keep the result interleaved. NVAPI_D3D9_DMA_TRANSFER_TYPE_BOB_TOP_FIELD = 0x02, //!< Perform bob deinterlacing on the top field. NVAPI_D3D9_DMA_TRANSFER_TYPE_BOB_BTM_FIELD = 0x03, //!< Perform bob deinterlacing on the bottom field. } NVAPI_D3D9_DMA_TRANSFER_TYPE; #define NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_STD_MASK (NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_STD_601|NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_STD_709|NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_STD_240|NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_STD_CUSTOM) #define NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_RANGE_MASK (NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_RANGE_FULL| NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_RANGE_LIM) //! Specifies the type of the color space and range. //! See ::NVAPI_D3D9_DMA_CMD_COLOR_MATRIX for more details typedef enum _NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS { NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_STD_601 = 0x01, //!< Color Standard: 601 NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_STD_709 = 0x02, //!< Color Standard: 709 NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_STD_240 = 0x04, //!< Color Standard: 240 NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_STD_CUSTOM = 0x08, //!< Color Standard: Custom NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_RANGE_FULL = 0x10, //!< Color Range: Full [0 .. 255] NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_RANGE_LIM = 0x20, //!< Color Range: Limited [16 .. 235] } NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS; //! Parameter data structure for the NVAPI_D3D9_DMA_CMD_DESCRIBE command (See ::_NVAPI_D3D9_DMA_COMMANDS.) //! Given the surface dimension and format as input, the command //! provides the driver requirements (such as alignment) for memory allocation. typedef struct _NVAPI_D3D9_DMA_DESCRIBE_PARAMS { NvU32 dwWidth; //!< width (IN) NvU32 dwHeight; //!< height (IN) NvU32 dwFormat; //!< FOURCC format (IN) NvU32 dwPitch; //!< pitch (OUT) NvU32 dwSize; //!< size (OUT) NvU32 dwAlignment; //!< alignment (OUT) } NVAPI_D3D9_DMA_DESCRIBE_PARAMS; //! Parameter data structure for the NVAPI_D3D9_DMA_CMD_MAP command. (See ::_NVAPI_D3D9_DMA_COMMANDS.) //! The command maps user-allocated system memory buffer to an NVIDIA DirectX object handle. //! The pMemory buffer must satisfy the driver requirements. //! Supported FOURCC formats are: NV12, YV12, YUY2 typedef struct _NVAPI_D3D9_DMA_MAP_PARAMS { NvU32 dwWidth; //!< width (IN) NvU32 dwHeight; //!< height (IN) NvU32 dwFormat; //!< FOURCC format (IN) void *pMemory; //!< memory pointer (IN) NVDX_ObjectHandle hSysmemSurface; //!< sysmem surface handle (OUT) } NVAPI_D3D9_DMA_MAP_PARAMS; //! Parameter data structure for the NVAPI_D3D9_DMA_CMD_UNMAP command. (See ::_NVAPI_D3D9_DMA_COMMANDS.) //! The command unmaps the user-allocated system memory buffer. typedef struct _NVAPI_D3D9_DMA_UNMAP_PARAMS { NVDX_ObjectHandle hSysmemSurface; //ARGB transfers only. typedef struct _NVAPI_D3D9_DMA_TRANSFER_PARAMS { NVAPI_D3D9_DMA_TRANSFER_DIR direction; //!< Direction of the transfer (IN) NVDX_ObjectHandle hSysmemSurface; //!< sysmem surface handle (IN) RECT* pSysmemSurfaceRect; //!< sysmem surface rectangle (IN) NVDX_ObjectHandle hD3D9Surface; //!< D3D9 surface handle (IN) RECT* pD3D9SurfaceRect; //!< floatSrcRectFlag=0 => (RECT *) D3D9 Surface rectangle with integral co-ords (IN) //!< floatSrcRectFlag=1 => (RECTF *)D3D9 Surface rectangle with float co-ords appended to integral co-ords (IN) HANDLE hCompletionEvent; //!< Completion event handle (IN) NVAPI_D3D9_DMA_TRANSFER_TYPE transferType; //!< Type of the transfer (IN) NvU32 floatSrcRectFlag:1; //!< 1=>pD3D9SurfaceRectF has float co-ords appended (IN) NvU32 smoothingLevel:2; //!< Type of interpolation for scaling. //!< 0=>Bilinear, 1=>Nearest Neighbor, 2,3=>Reserved for future. NvU32 reserved:17; //!< Reserved for future expansion (IN / OUT) NvU32 reservedFlagValid:12;//!< Secret keyword that implies floatSrcRectFlag/smoothingLevel flags are valid (IN) } NVAPI_D3D9_DMA_TRANSFER_PARAMS; //! Used in _NVAPI_D3D9_DMA_COLOR_MATRIX_PARAMS. #define NVAPI_D3D9_DMA_COLOR_MATRIX_SIZE 12 //! parameter data structure for the NVAPI_D3D9_DMA_CMD_COLOR_MATRIX command \n //! Specifies the flags for the color spaces and color range. //! Currently color Spaces 601 and 709 are available inside the driver. For others, the input //! color matrix [cm0-cm11] will be used. It has the following format for a YUV to RGB color conversion //! \code //! | cm0 cm1 cm2 | | y | | cm9 | | r | //! | cm3 cm4 cm5 | * (| u | + | cm10 |) = | g | //! | cm6 cm7 cm8 | | v | | cm11 | | b | //! i.e. MATRIX * (YUV + const) = RGB //! \endcode //! The offsets cm9..cm11 are divided by 255. typedef struct _NVAPI_D3D9_DMA_COLOR_MATRIX_PARAMS { NvU32 colorMatrixFlags; //!< NVAPI_D3D9_DMA_COLOR_MATRIX_FLAGS_XX flags to define the color space and range. float* colorMatrix; //!< 4x3 float array containing the matrix (NVAPI_D3D9_DMA_COLOR_MATRIX_SIZE) } NVAPI_D3D9_DMA_COLOR_MATRIX_PARAMS; //! Used in NvAPI_D3D9_DMA(). typedef struct _NVAPI_D3D9_DMA_PARAMS { NvU32 version; //!< Structure version (IN) NvU32 dwCommand; //!< Command (IN) union { NVAPI_D3D9_DMA_DESCRIBE_PARAMS DescribeParams; NVAPI_D3D9_DMA_MAP_PARAMS MapParams; NVAPI_D3D9_DMA_UNMAP_PARAMS UnmapParams; NVAPI_D3D9_DMA_EVENT_PARAMS EventParams; NVAPI_D3D9_DMA_TRANSFER_PARAMS TransferParams; NVAPI_D3D9_DMA_COLOR_MATRIX_PARAMS ColorMatrixParams; }; } NVAPI_D3D9_DMA_PARAMS; //! Macro for constructing the version field of _NVAPI_D3D9_DMA_PARAMS. #define NVAPI_D3D9_DMA_PARAMS_VER \ MAKE_NVAPI_VERSION(NVAPI_D3D9_DMA_PARAMS, 1) //! @} //! \ingroup dxdma NVAPI_INTERFACE NvAPI_D3D9_DMA(IDirect3DDevice9 *pDev, NVAPI_D3D9_DMA_PARAMS *pVideoDMAParams); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) //! SUPPORTED OS: Windows 7 and higher //! //! \ingroup dx //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION_NAME: NvAPI_D3D9_EnableStereo // //! \fn NvAPI_D3D9_EnableStereo(IDirect3DDevice9 *pDev, //! NVAPI_D3D9_ENABLE_STEREO_PARAMS *pEnableStereoParams) //! DESCRIPTION: This API allows an approved application to enable stereo viewing //! on an HDMI 1.4 TV. //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_INVALID_ARGUMENT the vendor ID and/or response is invalid //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION the version of NVAPI_D3D9_ENABLE_STEREO_PARAMS struct not supported. // /////////////////////////////////////////////////////////////////////////////// //! D3D9 Enable Stereo Commands typedef enum _NVAPI_D3D9_ENABLE_STEREO_COMMANDS { NVAPI_D3D9_ENABLE_STEREO_CMD_CHALLENGE = 0x01, NVAPI_D3D9_ENABLE_STEREO_CMD_RESPONSE = 0x02, } NVAPI_D3D9_ENABLE_STEREO_COMMANDS; //! D3D9 Enable Stereo Constants #define NVAPI_D3D9_ENABLE_STEREO_CHALLENGE_SIZE 16 //! D3D9 Enable Stereo Constants #define NVAPI_D3D9_ENABLE_STEREO_RESPONSE_SIZE 20 // //! Parameter data structure for the NVAPI_D3D9_ENABLE_STEREO_CMD_CHALLENGE command - //! This command requests a random challenge from driver. //! It must be invoked before the NVAPI_D3D9_ENABLE_STEREO_CMD_RESPONSE command. typedef struct _NVAPI_D3D9_ENABLE_STEREO_CHALLENGE_PARAMS { NvU8 challenge[NVAPI_D3D9_ENABLE_STEREO_CHALLENGE_SIZE]; //!< random challenge from driver (OUT) } NVAPI_D3D9_ENABLE_STEREO_CHALLENGE_PARAMS; // //! Parameter data structure for the NVAPI_D3D9_ENABLE_STEREO_CMD_RESPONSE command //! //! The application must possess the following information in order to calculate a valid response: //! - vendorGUID: a unique ID assigned to the application vendor by NVIDIA; //! - vendorKEY: a secret key issued to the application vendor by NVIDIA; //! //! The response is calculated as HMAC(vendorKEY, (vendorGUID || challenge)) //! where HMAC is the Keyed-Hash Message Authentication Code using SHA-1 as the //! underlying hash function. See FIPS Publication 198 for details of the algorithm. typedef struct _NVAPI_D3D9_ENABLE_STEREO_RESPONSE_PARAMS { NvGUID vendorGUID; //!< vendor GUID from app (IN) NvU8 response[NVAPI_D3D9_ENABLE_STEREO_RESPONSE_SIZE]; //!< response from the app (IN) } NVAPI_D3D9_ENABLE_STEREO_RESPONSE_PARAMS; typedef struct _NVAPI_D3D9_ENABLE_STEREO_PARAMS { NvU32 version; //!< structure version (IN) NvU32 dwCommand; //!< command (IN) union { NVAPI_D3D9_ENABLE_STEREO_CHALLENGE_PARAMS ChallengeParams; NVAPI_D3D9_ENABLE_STEREO_RESPONSE_PARAMS ResponseParams; }; } NVAPI_D3D9_ENABLE_STEREO_PARAMS_V1; typedef NVAPI_D3D9_ENABLE_STEREO_PARAMS_V1 NVAPI_D3D9_ENABLE_STEREO_PARAMS; #define NVAPI_D3D9_ENABLE_STEREO_PARAMS_VER1 MAKE_NVAPI_VERSION(NVAPI_D3D9_ENABLE_STEREO_PARAMS_V1, 1) #define NVAPI_D3D9_ENABLE_STEREO_PARAMS_VER NVAPI_D3D9_ENABLE_STEREO_PARAMS_VER1 NVAPI_INTERFACE NvAPI_D3D9_EnableStereo(IDirect3DDevice9 *pDev, NVAPI_D3D9_ENABLE_STEREO_PARAMS *pEnableStereoParams); //! @} #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_StretchRect // //! DESCRIPTION: This API copies the contents of the source rectangle to the //! destination rectangle. This function can convert //! between a wider range of surfaces than //! IDirect3DDevice9::StretchRect. For example, it can copy //! from a depth/stencil surface to a texture. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \param [in] pDev The D3D device that owns the objects. //! \param [in] hSrcObj Handle to the source object. //! \param [in] pSrcRect Defines the rectangle on the source to copy from. If NULL, copy from the entire object. //! \param [in] hDstObj Handle to the destination object. //! \param [in] pDstRect Defines the rectangle on the destination to copy to. If NULL, copy to the entire object. //! \param [in] Filter Choose a filtering method: D3DTEXF_NONE, D3DTEXF_POINT, D3DTEXF_LINEAR. //! //! \return ::NVAPI_OK, //! ::NVAPI_INVALID_POINTER, //! ::NVAPI_INVALID_ARGUMENT, //! ::NVAPI_ERROR //! //! \ingroup dxvidcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_StretchRect(IDirect3DDevice9 *pDev, NVDX_ObjectHandle hSrcObj, CONST RECT * pSourceRect, NVDX_ObjectHandle hDstObj, CONST RECT * pDestRect, D3DTEXTUREFILTERTYPE Filter); #endif //defined(_D3D9_H_) && defined(__cplusplus) #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_CreateRenderTarget // //! DESCRIPTION: This API is deprecated. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 190 //! //! \retval ::NVAPI_NOT_SUPPORTED deprecated // //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_CreateRenderTarget(IDirect3DDevice9 *pDev, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, NVDX_ObjectHandle *pHandle = NULL); #endif //defined(_D3D9_H_) && defined(__cplusplus) //----------------------------------------------------------------------------- // DirectX + BDVMA private API //----------------------------------------------------------------------------- #if defined(_D3D9_H_) && defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_GPUBasedCPUSleep // //! \fn NvAPI_D3D9_GPUBasedCPUSleep(IDirect3DDevice9 *pDev, NvU64 qwMicroSeconds) //! DESCRIPTION: This API provides sub-quantum (usually 16 ms) sleep that does not burn CPU cycles. //! //! \param [in] pDev The device for which to get the primary surface //! \param [in] qwMicroSeconds The number of micro-seconds to block the CPU thread //! //! \return ::NVAPI_OK if the call succeeded // /////////////////////////////////////////////////////////////////////////////// //! SUPPORTED OS: Windows 7 and higher //! //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D9_GPUBasedCPUSleep(IDirect3DDevice9 *pDev, NvU64 qwMicroSeconds); #endif //defined(_D3D9_H_) && defined(__cplusplus) //----------------------------------------------------------------------------- // Direct3D10 APIs //----------------------------------------------------------------------------- #if defined(__cplusplus) && defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_AliasPrimaryAsTexture // //! DESCRIPTION: This function creates a texture that is an alias of the current device's //! primary surface //! //! \note The texture returned is created without any CPU access flags. Locking //! to read from the texture should be done by creating a second //! application. Otherwise, this texture can be used as any normal //! Direct3D texture (it can be blitted from, used as a texture in a //! pixel shader, etc.) //! //! This texture is not a render target and cannot be rendered to. //! //! Before this texture is used, the application must call //! NvAPI_D3D10_ProcessFlipChainCallbacks() to properly update any internal //! driver state. //! //! \deprecated Do not use this function - it is deprecated in release 455. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 173 //! //! \param [in] pDev The device to get the primary surface from //! \param [in] dwHeadIndex The index to the head to alias //! \param [out] ppTexture Filled with the texture created //! //! \return NVAPI_NOT_SUPPORTED //! //! \ingroup dx ///////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 455.") NVAPI_INTERFACE NvAPI_D3D10_AliasPrimaryAsTexture(ID3D10Device *pDev, NvU32 headIndex, ID3D10Texture2D **ppTexture); #endif //defined(__cplusplus) && defined(__d3d10_h__) #if defined(__cplusplus) && defined(__d3d10_h__) //! \ingroup dx typedef void (*NVAPI_PRIMARY_FLIP_CHAIN_CALLBACK)(NvU32); //! \ingroup dx //! Used by NVAPI_PRIMARY_FLIP_CHAIN_CALLBACK. typedef struct { NvU32 version; //!< structure version (IN) NVAPI_PRIMARY_FLIP_CHAIN_CALLBACK pPrimaryFlipped; //!< A callback function to be notified //! when the primary flip occurred. NVAPI_PRIMARY_FLIP_CHAIN_CALLBACK pPrimaryFlipChainModified; //!< A callback function to be notified //! when the primary flip chain has //! been modified, either due to a new //! surface being added, an existing //! surface being removed, or the resolution //! being changed. In response to this //! an application MUST recreate any //! aliased primary surfaces with //! NvAPI_D3D10_AliasPrimaryAsTexture() //! as the existing texture will be invalid. NVAPI_PRIMARY_FLIP_CHAIN_CALLBACK pPrimaryAliasInvalid; //!< An error occured while using a texture //! created with NvAPI_D3D10_AliasPrimaryAsTexture(). //! The texture needs to be re-created. NVAPI_PRIMARY_FLIP_CHAIN_CALLBACK pPrimaryAliasOperationDropped; //!< An operation using the primary alias //! was not completed because a flip //! happened while the operation //! was in progress. The last operation //! may have operated on an incomplete //! primary, and should be retried. NVAPI_PRIMARY_FLIP_CHAIN_CALLBACK pCursorVisibleUpdated; //!< A callback function to be notified //! when the cursor visibility has been toggled NVAPI_PRIMARY_FLIP_CHAIN_CALLBACK pCursorShapeUpdated; //!< A callback function to be notified //! when the cursor shape has been updated } NVAPI_FLIP_CHAIN_CALLBACK_PARAMS; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_SetPrimaryFlipChainCallbacks // //! DESCRIPTION: Defines callback functions to receive notification about //! certain events relating to the primary flip chain. //! //! \note The events will only be registered at this time. To receive the events //! an application must call NvAPI_D3D10_ProcessFlipChainCallbacks(). //! //! An application may change it's callback functions at any time, and may //! unregister from any function by passing NULL in as a function pointer. //! //! \deprecated Do not use this function - it is deprecated in release 455. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 173 //! //! \param [in] pDev The device to receive events on //! \param [in] pCallbackParams A structure containing function //! pointers that will receive the events. //! A pointer may be set to NULL if //! an application does not wish to receive //! the notification. //! //! \return NVAPI_NOT_SUPPORTED //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 455.") NVAPI_INTERFACE NvAPI_D3D10_SetPrimaryFlipChainCallbacks(ID3D10Device *pDev, const NVAPI_FLIP_CHAIN_CALLBACK_PARAMS* pCallbackParams); #endif //defined(__cplusplus) && defined(__d3d10_h__) #if defined(__cplusplus) && defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_ProcessCallbacks // //! DESCRIPTION: This function processes pending events. //! //! \note All callback functions are passed the head index for the event. //! //! This will call the registered callbacks for any events pending. With //! the exeception of the primary flipped callback, an application cannot //! "miss" an event if the event were to be notified while the //! application was not calling ProcessCallbacks. The application //! will receive this event the first time it calls ProcessCallbacks //! after the event happened. //! //! The flipped event is an exception to this rule. This callback will //! only be fired for flips that occur after the application calls //! ProcessCallbacks. //! //! \deprecated Do not use this function - it is deprecated in release 455. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 173 //! //! \param [in] pDev The device to process events on //! \param [in] dwMilliseconds The number of milliseconds to sleep while //! waiting for events before returning. This //! can be zero to only process any outstanding //! events, or INFINITE if the application //! wishes to wait forever. //! //! \return NVAPI_NOT_SUPPORTED //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 455.") NVAPI_INTERFACE NvAPI_D3D10_ProcessCallbacks(ID3D10Device *pDev, NvU32 dwMilliseconds); #endif //defined(__cplusplus) && defined(__d3d10_h__) #if defined(__cplusplus) && defined(__d3d10_h__) //! \ingroup dx //! Used in typedef enum { NV_HW_CURSOR_COLOR_FORMAT_MONOCHROME = 0, NV_HW_CURSOR_COLOR_FORMAT_COLOR = 1, NV_HW_CURSOR_COLOR_FORMAT_MASKED_COLOR = 2 } NV_HW_CURSOR_COLOR_FORMAT_FLAGS; //! \ingroup dx //! Used in NvAPI_D3D10_GetRenderedCursorAsBitmap(). typedef struct _NVAPI_RENDERED_CURSOR_BITMAP_DATA { NvU32 version; //!< (in) version info NvU32 headIndex; //!< (in) head index to get cursor on NvU32 bufferSize; //!< (in) size of raw bitmap data buffer PBITMAP pBitmap; //!< (in/out) bitmap data for rendered cursor NvU32 xHot; //!< (out) x value for Hotspot NvU32 yHot; //!< (out) y value for Hotspot NV_HW_CURSOR_COLOR_FORMAT_FLAGS formatFlag; //!, (out) cursor color format NvU32 bVisible; //!< (out) cursor visibility (0 = not visible, 1 = visible) } NVAPI_RENDERED_CURSOR_BITMAP_DATA; //! \ingroup dx //! Macro for constructing theversion field of _NVAPI_RENDERED_CURSOR_BITMAP_DATA #define NVAPI_RENDERED_CURSOR_BITMAP_DATA_VER MAKE_NVAPI_VERSION(NVAPI_RENDERED_CURSOR_BITMAP_DATA,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_GetRenderedCursorAsBitmap // //! DESCRIPTION: This function provides a bitmap of the hardware cursor and the visible //! state of the cursor at the time the bitmap is captured. //! //! \deprecated Do not use this function - it is deprecated in release 455. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 173 //! //! \param [in] pDev The device from which to get the rendered cursor //! \param [in,out] pRenderedCursorBitmapData Structure for input/output with fields as follows: //! - headIndex: [input] The display head from which to get the cursor //! - bufferSize: [input] The size of the buffer for storing raw bitmap data //! - pBitmap: [output] Bitmap data for the rendered cursor. //! Note that this result data is undefined in the //! case where NVAPI_OK is not the return status //! - xHot: [output] Location of the X hot spot in the bitmap //! - yHot: [output] Location of the Y hot spot in the bitmap //! - formatFlag: [output] Cursor format (monochrome, color, or masked color) //! For monochrome or masked color formats, the corresponding bitmap //! format is ROP1R5G5B5. For color format, the bitmap format is A8R8G8B8. //! //! - pVisible: [output] Boolean: zero=not visible, one=visible //! //! \return NVAPI_NOT_SUPPORTED //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 455.") NVAPI_INTERFACE NvAPI_D3D10_GetRenderedCursorAsBitmap(ID3D10Device *pDev, NVAPI_RENDERED_CURSOR_BITMAP_DATA *pRenderedCursorBitmapData); #endif //defined(__cplusplus) && defined(__d3d10_h__) #if defined(__cplusplus) && defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_BeginShareResource // //! DESCRIPTION: This API recreates the resource as a shared resource. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pResource The resource to recreate as shared //! \param [out] pHandle The shared resource handle //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D10_BeginShareResource(ID3D10Resource *pResource, HANDLE *pHandle); #endif //defined(__cplusplus) && defined(__d3d10_h__) #if defined(__cplusplus) && defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_BeginShareResourceEx // //! DESCRIPTION: This API is similar to NvAPI_D3D10_BeginShareResource(), except it takes an additional flag parameter. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pResource The resource to recreate as shared //! \param [in] flags Should be one of NVAPI_SHARE_RESOURCE_FLAGS //! \param [out] pHandle The shared resource handle //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D10_BeginShareResourceEx(ID3D10Resource *pResource, UINT32 flags, HANDLE *pHandle); #endif //defined(__cplusplus) && defined(__d3d10_h__) #if defined(__cplusplus) && defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_EndShareResource // //! DESCRIPTION: This API restores the original resource. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pResource The resource that was shared using NvAPI_D3D10_BeginShareResource //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D10_EndShareResource(ID3D10Resource *pResource); #endif //defined(__cplusplus) && defined(__d3d10_h__) #if defined(__cplusplus) && defined(__d3d10_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_SetDepthBoundsTest // //! DESCRIPTION: This function enables/disables the depth bounds test. //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDev The device to set the depth bounds test //! \param [in] bEnable Enable(non-zero)/disable(zero) the depth bounds test //! \param [in] fMinDepth The minimum depth for the depth bounds test //! \param [in] fMaxDepth The maximum depth for the depth bounds test \n //! The valid values for fMinDepth and fMaxDepth //! are such that 0 <= fMinDepth <= fMaxDepth <= 1 //! //! \return NVAPI_OK if the depth bounds test was correctly enabled or disabled //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D10_SetDepthBoundsTest(ID3D10Device *pDev, NvU32 bEnable, float fMinDepth, float fMaxDepth); #endif //defined(__cplusplus) && defined(__d3d10_h__) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) ////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_GetIDXGIAdapter // //! DESCRIPTION: This function returns the IDXGIAdapter* of the input GPU handle. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 340 //! //! \param [in] hPhysicalGpu //! \param [out] ppAdapter //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx ////////////////////////////////////////////////////////////////////////// //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D_GetIDXGIAdapter(__in NvPhysicalGpuHandle hPhysicalGpu, __out IDXGIAdapter** ppAdapter); #endif // defined(__d3d10_h__) #if defined(__cplusplus) && defined(__d3d10_h__) ////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_CreateDevice // //! DESCRIPTION: This function creates a d3d10 device. The function call is the //! same as D3D10CreateDevice1(), but with an extra argument //! (#D3D10_FEATURE_LEVEL supported by the device) that the function fills in. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \param [in] pAdapter //! \param [in] DriverType //! \param [in] Software //! \param [in] Flags //! \param [in] HardwareLevel //! \param [in] SDKVersion //! \param [in] ppDevice //! \param [in] *pLevel D3D10_FEATURE_LEVEL supported - see #NVAPI_DEVICE_FEATURE_LEVEL //! //! \return NVAPI_OK if the createDevice call succeeded. // ////////////////////////////////////////////////////////////////////////// //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D10_CreateDevice(IDXGIAdapter* pAdapter, D3D10_DRIVER_TYPE DriverType, HMODULE Software, UINT32 Flags, D3D10_FEATURE_LEVEL1 HardwareLevel, UINT SDKVersion, ID3D10Device1** ppDevice, NVAPI_DEVICE_FEATURE_LEVEL *pLevel); #endif //defined(__cplusplus) && defined(__d3d10_h__) #if defined(__cplusplus) && defined(__d3d10_h__) //////////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D10_CreateDeviceAndSwapChain // //! DESCRIPTION: This function creates a d3d10 device and swap chain. The function call is the //! same as D3D10CreateDeviceAndSwapChain1(), but with an extra argument //! (D3D10_FEATURE_LEVEL supported by the device) that the function fills in . //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \param [in] pAdapter //! \param [in] DriverType //! \param [in] Software //! \param [in] Flags //! \param [in] HardwareLevel //! \param [in] SDKVersion //! \param [in] pSwapChainDesc //! \param [out] ppSwapChain //! \param [out] ppDevice //! \param [in] pLevel D3D10_FEATURE_LEVEL supported - see see #NVAPI_DEVICE_FEATURE_LEVEL //! //! \return NVAPI_OK if the createDevice with swap chain call succeeded. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D10_CreateDeviceAndSwapChain(IDXGIAdapter* pAdapter, D3D10_DRIVER_TYPE DriverType, HMODULE Software, UINT32 Flags, D3D10_FEATURE_LEVEL1 HardwareLevel, UINT SDKVersion, DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, IDXGISwapChain** ppSwapChain, ID3D10Device1** ppDevice, NVAPI_DEVICE_FEATURE_LEVEL *pLevel); #endif //defined(__cplusplus) && defined(__d3d10_h__) //----------------------------------------------------------------------------- // Private Direct3D10 APIs //----------------------------------------------------------------------------- #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__) //! SUPPORTED OS: Windows 7 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 378 // // FUNCTION NAME: NvAPI_D3D11_CreateComputeOnlyDevice // //! DESCRIPTION: This function creates a restricted type of a D3D11 device for compute-only work. //! It is a companion device for the main fully-capable 3D device. It has its own //! pipe-line state and can run asynchronously w.r.t. the main device. //! Therefore compute work, submitted to the compute-only device, can run in parallel //! with graphics/compute work of the main device. The compute-only device is fully //! free-threaded w.r.t the main device. //! //! Restrictions: //! 1. The compute-only device holds a reference to the main device, so the two share lifetime. //! In case of device lost of either device, the recovery sequence is to release the compute-only //! device first, then recover the main device, and then use this call to create a new //! compute-only device. //! 2. All graphics related "set" functions are silently ignored on this device. All draw calls //! cause device lost. //! 3. Only non-stretching, non-format converting blits are supported on this device. More copy restrictions //! may apply. //! 4. No DXGI services (like present calls) are supported on this device. //! 5. Predicated rendering is not supported on this device. //! 6. While calling this create function, no other calls can be made on the main device on any other thread. //! //! Creation call takes a pointer to the main device and few of the parameters of the standard device creation call. //! The remaining parameters have to match those of the main device and are derived from the main device pointer. //! //! //! \param [in] *pBase3DDevice - a pointer the main device //! \param [in] Flags - creation flags (see documentaion for the D3D11CreateDevice() call) //! \param [in] SDKVersion - SDK version used by the caller (see documentaion for the D3D11CreateDevice() call) //! \param [out] **ppDevice - a pointer to return created device //! \param [out] *pFeatureLevel - a pointer to return the feature level of the device //! \param [out] **ppImmediateContext - a pointer to return an immediate context of this device //! //! \return NVAPI_OK if the create compute-only device call succeeded. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateComputeOnlyDevice(__in ID3D11Device *pBase3DDevice, __in UINT Flags, __in UINT SDKVersion, __out ID3D11Device **ppDevice, __out D3D_FEATURE_LEVEL *pFeatureLevel, __out ID3D11DeviceContext **ppImmediateContext); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 7 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 378 // // FUNCTION NAME: NvAPI_D3D11_SetAsyncComputeControlData // //! DESCRIPTION: This function sets the hardware tuning control parameters for use by the Async Compute. Works from GP10x. //! //! //! \param [in] *pNvAPIComputeOnlyDeviceContext - a pointer to the NVAPI compute only device context //! \param [in] maxSMCount - Max SM count for usage by Async Compute. //! \param [in] minSMCount - Min SM count for usage by Async Compute. //! \param [in] bUseAllSMsInAllComputeMode - Switch to enable all SMs to be used in async compute mode. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_SetAsyncComputeControlData(__in ID3D11DeviceContext *pNvAPIComputeOnlyDeviceContext, __in UINT maxSMCount, __in UINT minSMCount, __in bool bUseAllSMsInAllComputeMode); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_SetAsyncComputeControlData // //! DESCRIPTION: This function sets the hardware tuning control parameters for use by the Async Compute. Works from GP10x. //! //! //! \param [in] *pCommandQueue - a pointer to command queue to set these controls. //! \param [in] maxSMCount - Max SM count for usage by Async Compute. //! \param [in] minSMCount - Min SM count for usage by Async Compute. //! \param [in] bUseAllSMsInAllComputeMode - Switch to enable all SMs to be used in async compute mode. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_SetAsyncComputeControlData(__in ID3D12CommandQueue *pCommandQueue, __in UINT maxSMCount, __in UINT minSMCount, __in bool bUseAllSMsInAllComputeMode); #endif //defined(__cplusplus) && defined(__d3d12_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 396 // // FUNCTION NAME: NvAPI_D3D11_CreateSharedSynchronizationObject // //! DESCRIPTION: This function creates a shared synchronization object which can be used to synchronize betwenn two processes. //! Creating/destroying shared synchronization objects are is done through this NVAPI. Signal/wait operations are available. //! Handle returned from this call can be used by the calling process for synchronization with another process. //! //! Supported on WDDM V2+ //! //! \param [in] *pDevice - pointer to DX device. This API increase pDevice ref count. //! \param [in] fenceValue - initial fence value //! \param [out] *phSharedHandle - pointer to created fence shared NT handle. //! \param [out] *phFence - pointer to created fence handle //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateSharedSynchronizationObject(__in ID3D11Device* pDevice, __in NvU64 fenceValue, __out NvU64* phSharedHandle, __out HANDLE* phFence); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 396 // // FUNCTION NAME: NvAPI_D3D11_OpenSharedSynchronizationObject // //! DESCRIPTION: This function creates a shared synchronization object which can be used to synchronize betwenn two processes. //! Creating/destroying shared synchronization objects are is done through this NVAPI. Signal/wait operations are available. //! Handle returned from this call can be used by the calling process for synchronization with another process. //! //! Supported on WDDM V2+ //! //! \param [in] *pDevice - pointer to DX device. This API increase pDevice ref count. //! \param [in] hSharedHandle - fence shared NT handle created in another device/process //! \param [out] *phFence - pointer to opened shared fence handle. //! \param [out] *pFenceValue - pointer opened shared fence current value. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_OpenSharedSynchronizationObject(__in ID3D11Device* pDevice, __in NvU64 hSharedHandle, __out HANDLE *phFence, __out NvU64* pFenceValue); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 396 // // FUNCTION NAME: NvAPI_D3D11_DestroySharedSynchronizationObject // //! DESCRIPTION: This function destroy a shared synchronization object //! This call is not free-threaded. //! //! Supported on WDDM V2+ //! //! \param [in] hFence - opened/create shared fence handle. //! This API decrease device ref count for device used to create/open this fence //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_DestroySharedSynchronizationObject(__in HANDLE hFence); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_SignalSharedSynchronizationObject // //! \since Release: 396 // //! DESCRIPTION: This function queues a signal in gpu timeline. //! //! Supported on WDDM V2+ //! //! \param[_in] pDeviceContext - context on which fence is signaled //! \param [in] hFence - shared fence handle received via NvAPI_D3D11_CreateSharedSynchronizationObject //! or NvAPI_D3D11_OpenSharedSynchronizationObject //! \param [in] valueToSignal - value to signal. //! \param [in] gpuIndex - GPU index(0, 1 ...) that fence should be signaled on. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_SignalSharedSynchronizationObject(__in ID3D11DeviceContext *pDeviceContext, __in HANDLE hFence, __in UINT64 valueToSignal, __in NvU32 gpuIndex = 0); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 396 // // FUNCTION NAME: NvAPI_D3D11_WaitSharedSynchronizationObject // //! DESCRIPTION: This function waits on a shared synchronization object which can be used to synchronize between two processes. //! //! Supported on WDDM V2+ //! //! \param[_in] pDeviceContext - context on which fence is waited //! \param [in] hFence - shared fence handle received via NvAPI_D3D11_CreateSharedSynchronizationObject //! or NvAPI_D3D11_OpenSharedSynchronizationObject //! \param [in] valueToWait - value to wait. //! \param [in] gpuIndex - GPU index(0, 1 ...) that fence should be waited on. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_WaitSharedSynchronizationObject(__in ID3D11DeviceContext *pDeviceContext, __in HANDLE hFence, __in UINT64 valueToWait, __in NvU32 gpuIndex = 0); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 378 // // FUNCTION NAME: NvAPI_D3D11_CreateSynchronizationObject // //! DESCRIPTION: This function creates a synchronization object which can be used to synchronize compute only device and graphics device. //! Creating/destroying synchronization objects are only supported on compute only device. Signal/wait operations are available on both. //! Handle returned from this call can be used by base graphics device or compute only device for synchronization. //! //! //! \param [in] *pNvAPIComputeOnlyDevice - pointer to the NVAPI Compute Only device //! \param [out] *pHandle - handle to the created synchronization object. //! \param [out] *pInitialValue - pointer to the initial value of the synchronization object. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateSynchronizationObject(__in ID3D11Device *pNvAPIComputeOnlyDevice, __out NVDX_ObjectHandle *pHandle, __out UINT64 *pInitialValue); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 378 // // FUNCTION NAME: NvAPI_D3D11_DestroySynchronizationObject // //! DESCRIPTION: This function destroys synchronization object. //! //! //! \param [in] *pNvAPIComputeOnlyDevice - a pointer to the NVAPI compute only device //! \param [in] *pHandle - handle to the synch object that was previously returned by calling NvAPI_CreateSynchronizationObject. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_DestroySynchronizationObject(__in ID3D11Device *pNvAPIComputeOnlyDevice, __in NVDX_ObjectHandle pHandle); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_SignalSynchronizationObjectGpu // //! \since Release: 378 // //! DESCRIPTION: This function queues a signal in gpu timeline. //! //! //! \param [in] *pDeviceContext - a pointer to the device context. Could be compute device or graphics device. //! \param [in] *pHandle - handle to the synch object that was previously returned by calling NvAPI_CreateSynchronizationObject. //! \param [in] valueToSignal - value to signal. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_SignalSynchronizationObjectGpu(__in ID3D11DeviceContext *pDeviceContext, __in NVDX_ObjectHandle pHandle, __in UINT64 valueToSignal); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 378 // // FUNCTION NAME: NvAPI_D3D11_WaitForSynchronizationObjectGpu // //! DESCRIPTION: This function queues a wait packet in gpu timeline. //! //! //! \param [in] *pDeviceContext - a pointer to the device context. Could be compute device or graphics device. //! \param [in] *pHandle - handle to the synch object that was previously returned by calling NvAPI_CreateSynchronizationObject. //! \param [in] valueToWait - value to wait. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_WaitForSynchronizationObjectGpu(__in ID3D11DeviceContext *pDeviceContext, __in NVDX_ObjectHandle pHandle, __in UINT64 valueToWait); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // //! \since Release: 378 // // FUNCTION NAME: NvAPI_D3D11_OpenResourceOnComputeDevice // //! DESCRIPTION: This function opens a resource that is created on graphics device previously to use on a compute device. //! //! //! \param [in] *pComputeDevice - a pointer to the compute only device. //! \param [in] *pSrcResource - source resource that is created on graphics device //! \param [out] **ppResource - address of a pointer to the resource we are gaining access to on compute device. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_OpenResourceOnComputeDevice(__in ID3D11Device *pComputeDevice, __in ID3D11Resource *pSrcResource, __out void** ppResource); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_QueryAsyncComputeHint // //! DESCRIPTION: This function returns whether the driver recommends enabling app async compute paths //! //! \param [in] *pDevice - a pointer to the device //! \param [out] pIsRecommended - Recommends that the flex layer use/not use async compute paths (0=NotRecommended, 1=Recommended) //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \since Release: 381 //! //! \return ::NVAPI_OK if the call succeeds. //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_QueryAsyncComputeHint(__in ID3D11Device *pDevice, __out NvU32 *pIsRecommended); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_BeginShareResource // //! DESCRIPTION: This API recreates the resource as a shared resource. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pResource The resource to recreate as shared //! \param [in] flags Should be one of NVAPI_SHARE_RESOURCE_FLAGS //! \param [out] pHandle The shared resource handle //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_BeginShareResource(ID3D11Resource *pResource, UINT32 flags, HANDLE *pHandle); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_EndShareResource // //! DESCRIPTION: This API restores the original resource. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pResource The resource that was shared using NvAPI_D3D11_BeginShareResource //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (None) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_EndShareResource(ID3D11Resource *pResource); #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__) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_IsNvShaderExtnOpCodeSupported // //! DESCRIPTION: This function checks if a nv HLSL shader extension opcode is //! supported on current hardware. List of opcodes is in nvShaderExtnEnums.h //! To use Nvidia HLSL extensions the application must include nvHLSLExtns.h //! in the hlsl shader code. See nvHLSLExtns.h for more details on supported opcodes. //! //! This function can be called from a different thread than the one calling immediate device setstate functions. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDev The device on which to query for support, //! should be a ID3D11Device+ device //! \param [in] opCode the opcode to check //! \param [out] pSupported true if supported, false otherwise //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval :: NVAPI_OK if the call succeeded //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_IsNvShaderExtnOpCodeSupported(__in IUnknown *pDev, __in NvU32 opCode, __out bool *pSupported); #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_SetNvShaderExtnSlot // //! DESCRIPTION: This function sets the fake UAV slot that is used by Nvidia HLSL //! shader extensions globally. All createShader calls made to the driver after //! setting this slot would treat writes/reads to this UAV in a //! different way. Applications are expected to bind null UAV to this slot. //! The same slot is used for all shader stages. //! To disable shader extensions the app need to set this uav slot to 0xFFFFFFFF. //! To use Nvidia HLSL extensions the application must include nvHLSLExtns.h //! in the hlsl shader code. See nvHLSLExtns.h for more details. //! //! This function can be called from a different thread than the one calling immediate device setstate functions. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDev The device for which to set the extension slot //! should be a ID3D11Device+ device //! \param [in] uavSlot the uav slot to use //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval :: NVAPI_OK : success, the uavSlot was set sucessfully //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_SetNvShaderExtnSlot(__in IUnknown *pDev, __in NvU32 uavSlot); #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) #if defined (__cplusplus) && defined (__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_SetNvShaderExtnSlotSpace // //! DESCRIPTION: This function is specifically created for ray tracing since we do not //! currently support PSOs with DXR. //! This function sets the device's fake UAV slot and space that is used by Nvidia HLSL //! shader extensions globally. All state objects created by the driver after //! setting this slot would treat writes/reads to this UAV in a //! different way. Applications are expected to bind null UAV to this slot. //! The same slot is used for all shader stages. //! To disable shader extensions the app need to set this uav slot to 0xFFFFFFFF. //! To use Nvidia HLSL extensions the application must include nvHLSLExtns.h //! in the hlsl shader code. See nvHLSLExtns.h for more details. //! //! This function can be called from a different thread than the one calling immediate device setstate functions. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDev The device for which to set the extension slot //! should be a ID3D12Device+ device //! \param [in] uavSlot The uav slot to use //! \param [in] uavSpace The uav space to use //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval :: NVAPI_OK : success, the uavSlot and uavSpace were set sucessfully //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_SetNvShaderExtnSlotSpace(__in IUnknown *pDev, __in NvU32 uavSlot, __in NvU32 uavSpace); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_SetNvShaderExtnSlotSpaceLocalThread // //! DESCRIPTION: This function is specifically created for ray tracing shaders since we do not //! currently support PSOs with DXR. //! This function sets the device's fake UAV slot that is used by Nvidia HLSL //! shader extensions on local thread. All state objects created by the driver //! on the same thread that call this function after setting this slot would treat writes/reads //! to this UAV in a different way. //! Applications are expected to bind null UAV to this slot. //! The same slot is used for all shader stages for the device. //! To disable shader extensions the app may set this uav slot to 0xFFFFFFFF. //! To use Nvidia HLSL extensions the application must include nvHLSLExtns.h //! in the hlsl shader code. See nvHLSLExtns.h for more details. //! //! This function can be called from a different thread than the one calling immediate device setstate functions. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! //! \since Release: 387 //! //! \param [in] pDev The device for which to set the extension slot //! should be a ID3D12Device+ device //! \param [in] uavSlot the uav slot to use //! \param [in] uavSpace the uav space to use //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval :: NVAPI_OK : success, the uavSlot and uavSpace were set sucessfully //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_SetNvShaderExtnSlotSpaceLocalThread(__in IUnknown *pDev, __in NvU32 uavSlot, __in NvU32 uavSpace); #endif //defined (__cplusplus) && defined (__d3d12_h__) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_SetNvShaderExtnSlotLocalThread // //! DESCRIPTION: This function sets the fake UAV slot that is used by Nvidia HLSL //! shader extensions on local thread. All createShader calls on the same thread //! that calls this function after setting this slot would treat writes/reads //! to this UAV in a different way. //! Applications are expected to bind null UAV to this slot. //! The same slot is used for all shader stages. //! To disable shader extensions the app may set this uav slot to 0xFFFFFFFF. //! To use Nvidia HLSL extensions the application must include nvHLSLExtns.h //! in the hlsl shader code. See nvHLSLExtns.h for more details. //! //! This function can be called from a different thread than the one calling immediate device setstate functions. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 387 //! //! \param [in] pDev The device for which to set the extension slot //! should be a ID3D11Device+ device //! \param [in] uavSlot the uav slot to use //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval :: NVAPI_OK : success, the uavSlot was set sucessfully //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_SetNvShaderExtnSlotLocalThread(__in IUnknown *pDev, __in NvU32 uavSlot); #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_BeginUAVOverlapEx // //! DESCRIPTION: Causes the driver to skip synchronization that is normally needed when accessing UAVs. //! Applications must use this with caution otherwise this might cause data hazards when //! multiple draw calls/compute shader launches are accessing same memory locations //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] *pDeviceOrContext pointer to D3D11 device, or D3D11 device context //! \param [in] insertWFIFlags bit fields to indicate which WFI would be inserted (gfx / compute / both). //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// typedef enum _NVAPI_D3D11_INSERTWFI_FLAG { NVAPI_D3D_BEGIN_UAV_OVERLAP_NO_WFI = 0x00000000, //!< no WFI NVAPI_D3D_BEGIN_UAV_OVERLAP_GFX_WFI = 0x00000001, //!< (bit 0) force graphics WFI NVAPI_D3D_BEGIN_UAV_OVERLAP_COMP_WFI = 0x00000002, //!< (bit 1) force compute WFI } NVAPI_D3D11_INSERTWFI_FLAG; NVAPI_INTERFACE NvAPI_D3D11_BeginUAVOverlapEx(__in IUnknown *pDeviceOrContext, __in NvU32 insertWFIFlags); #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_BeginUAVOverlap // //! DESCRIPTION: Causes the driver to skip synchronization that is normally needed when accessing UAVs. //! Applications must use this with caution otherwise this might cause data hazards when //! multiple draw calls/compute shader launches are accessing same memory locations //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] *pDeviceOrContext pointer to D3D11 device, or D3D11 device context //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_BeginUAVOverlap(__in IUnknown *pDeviceOrContext); #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_EndUAVOverlap // //! DESCRIPTION: Re-enables driver synchronization between calls that access same UAVs //! See NvAPI_D3D_BeginUAVOverlap for more details. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] *pDeviceOrContext pointer to D3D11 device, or D3D11 device context //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_EndUAVOverlap(__in IUnknown *pDeviceOrContext); #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreatePixelShaderEx // //! DESCRIPTION: Extension of ID3D11Device::CreatePixelShader method with additional flags to allow shader attribute evaluation at //! correct sampling locations for 1X AA case - which can be used with Maxwell programmable sample positions. //! //! This function is free-threaded create compatible i.e. it can be called from a different thread //! than the one calling immediate device setstate functions. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] *pDevice pointer to D3D11 device //! \param [in] *pShaderBytecode pointer to the compiled shader //! \param [in] BytecodeLength Size of the compiled pixel shader //! \param [in] *pClassLinkage A pointer to a class linkage interface; the value can be NULL. //! \param [in] flags Extra flags to support additional functionality. //! \param [out] *ppPixelShader Address of a pointer to a ID3D11PixelShader interface. //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// typedef enum { NVAPI_SHADER_ATTRIB_EVAL_AT_SAMPLE_LOCATION = 0x00000001, //!< Change shader attribute evaluation locations to match rasterizer sample positions. //!< Applicable only when shader is used without MSAA. Has no effect if shader is used with MSAA. } NVAPI_CREATE_PIXEL_SHADER_FLAGS; NVAPI_INTERFACE NvAPI_D3D11_CreatePixelShaderEx(__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in ID3D11ClassLinkage *pClassLinkage, __in NVAPI_CREATE_PIXEL_SHADER_FLAGS flags, __out ID3D11PixelShader **ppPixelShader); #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) #if defined(__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_GetResourceHandle // //! \code //! DESCRIPTION: This function retrieves a driver handle to a DX10 resource //! //! INPUT: pDev The device on which the resource was created //! pResource The resource for which we want to retrieve a //! driver handle. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! OUTPUT: phObject Pointer to an NvAPI handle to be populated //! on success //! //! RETURN STATUS: NVAPI_OK if and only if phObject was populated with a valid //! driver handle //! \endcode //! \ingroup nsightapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_GetResourceHandle(ID3D11Device *pDev, ID3D11Resource* pResource, NVDX_ObjectHandle* phObject); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_SetFPSIndicatorState // //! DESCRIPTION: Display an overlay that tracks the number of times the app presents per second, or, //! the number of frames-per-second (FPS) //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] bool Whether or not to enable the fps indicator. //! //! \return ::NVAPI_OK, //! ::NVAPI_ERROR //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_SetFPSIndicatorState(IUnknown *pDev, NvU8 doEnable); #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_TagFrameWithAnimationTime // //! DESCRIPTION: Sends the animation time from an application down into the driver for a particular frame. //! This api has been deprecated //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 367 //! //! \param [in] pDev The ID3D11Device or ID3D10Device or to use. //! \param [in] animationTimeUs The animation time in microseconds. //! //! \return :: NVAPI_NOT_SUPPORTED //! //! \ingroup dx //! \deprecated Do not use this function - it is deprecated in release 450. Instead, use NvAPI_D3D_TagFrameWithAnimationTime. /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 450. Instead, use NvAPI_D3D_TagFrameWithAnimationTime.") NVAPI_INTERFACE NvAPI_D3D_TagFrameWithAnimationTime(__in IUnknown *pDev, __in NvU32 animationTimeUs); #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_GetSmoothAnimationTime // //! DESCRIPTION: Get the time step to use for smooth animation of next frame. //! This api has been deprecated //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 367 //! //! \param [in] pDev The ID3D11Device or ID3D10Device or to use. //! \param [out] pAnimationTimeUs Pointer to an unsigned integer where the animation //! time step in microseconds is to be stored. //! //! \return :: NVAPI_NOT_SUPPORTED //! //! \ingroup dx //! \deprecated Do not use this function - it is deprecated in release 450. Instead, use NvAPI_D3D_GetSmoothAnimationTime. /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 450. Instead, use NvAPI_D3D_GetSmoothAnimationTime.") NVAPI_INTERFACE NvAPI_D3D_GetSmoothAnimationTime(__in IUnknown *pDev, __out NvU32 *pAnimationTimeUs); #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_EnableSilk // //! DESCRIPTION: Enable Silk - a driver feature that uses latency between app side present and flips to smooth out stutters // This api has been deprecated //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 367 //! //! \param [in] pDev The ID3D11Device or ID3D10Device or to use. //! //! \return :: NVAPI_NOT_SUPPORTED //! //! \ingroup dx //! \deprecated Do not use this function - it is deprecated in release 450. Instead, use NvAPI_D3D_EnableSilk. /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 450. Instead, use NvAPI_D3D_EnableSilk.") NVAPI_INTERFACE NvAPI_D3D_EnableSilk(__in IUnknown *pDev); #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DisableSilk // //! DESCRIPTION: Disable Silk - Note that the driver will return 0 from //! This api has been deprecated //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 367 //! //! \param [in] pDev The ID3D11Device or ID3D10Device or to use. //! //! \return :: NVAPI_NOT_SUPPORTED //! //! \ingroup dx //! \deprecated Do not use this function - it is deprecated in release 450. Instead, use NvAPI_D3D_DisableSilk. /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 450. Instead, use NvAPI_D3D_DisableSilk.") NVAPI_INTERFACE NvAPI_D3D_DisableSilk(__in IUnknown *pDev); #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_Present // //! DESCRIPTION: This API presents the contents of the next buffer in the sequence of back buffers //! owned by a IDirect3DDevice9 device. //! This Present operation supports using a SwapGroup and SwapBarrier on the SwapChain //! that owns the back buffer to be presented. //! //! NOTE: NvAPI_D3D9_Present is a wrapper of the method IDirect3DDevice9::Present which //! additionally notifies the D3D driver of the SwapChain used by the runtime for //! presentation, thus allowing the D3D driver to apply SwapGroup and SwapBarrier //! functionality to that SwapChain. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDevice The IDirect3DDevice9 interface that is used to issue the Present, //! using the following IDirect3DDevice9::Present input parameters //! \param [in] pSwapChain Optional pointer to a IDirect3DSwapChain9 interface. If provided, the presentation is executed //! using this interface (i.e. pSwapChain->Present()) for the given swapchain only. //! If NULL, the presentation is executed on the device for all swapchains as in pDevice->Present() //! \param [in] pSourceRect A pointer to a RECT structure containing the source rectangle. //! If NULL, the entire source surface is presented. //! \param [in] pDestRect A pointer to a RECT structure containing the destination rectangle, in window client coordinates. //! If NULL, the entire client area is filled. //! \param [in] hDestWindowOverride A pointer to a destination window whose client area is taken as the target for this presentation. //! If this value is NULL, then the hWndDeviceWindow member of D3DPRESENT_PARAMTERS is taken. //! \param [in] pDirtyRegion (IN) A pointer to a region to be presented. It must be NULL unless the swap chain was reated with //! D3DSWAPEFFECT_COPY. If this value is non-NULL, the contained region is expressed in back buffer coordinates. //! //! \retval ::NVAPI_OK the Present operation was successfully executed //! \retval ::NVAPI_D3D_DEVICE_LOST D3D device status is D3DERR_DEVICELOST or D3DERR_DEVICENOTRESET, the caller has to reset device //! \retval ::NVAPI_DEVICE_BUSY the Present operation failed with an error other than D3DERR_DEVICELOST or D3DERR_DEVICENOTRESET //! \retval ::NVAPI_ERROR the communication with the D3D driver failed, SwapGroup/SwapBarrier may not be possible. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //!\ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_Present(IDirect3DDevice9 *pDevice, IDirect3DSwapChain9 *pSwapChain, const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride, const RGNDATA *pDirtyRegion); #endif //if defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_QueryFrameCount // //! DESCRIPTION: This API queries the universal framecounter of the Quadro-Sync master device. //! //! \param [in] pDevice The caller provides the DX9 device that has access to the Quadro-Sync device //! \param [out] pFrameCount The caller provides the storage space where the framecount is stored. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK *pFrameCount populated with framecount value. //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_QueryFrameCount(IDirect3DDevice9 *pDevice, NvU32 *pFrameCount); #endif //if defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_ResetFrameCount // //! DESCRIPTION: This API resets the universal framecounter on the Quadro-Sync master device. //! //! \param [in] pDevice The caller provides the DX9 device that has access to the Quadro-Sync device //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK framecounter has been reset //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_ResetFrameCount(IDirect3DDevice9 *pDevice); #endif //if defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_QueryMaxSwapGroup // //! DESCRIPTION: This API queries the number of supported SwapGroups and SwapBarriers in the graphics system. //! //! \param [in] pDevice The caller provides the DirectX 9 device that is used as a swapgroup client //! \param [out] pMaxGroups The caller provides the storage space where the number of available SwapGroups is stored. //! \param [out] pMaxBarriers The caller provides the storage space where the number of available SwapBarriers is stored. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK the number of SwapGroups and SwapBarriers has been stored //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_QueryMaxSwapGroup(IDirect3DDevice9 *pDevice, NvU32 *pMaxGroups, NvU32 *pMaxBarriers); #endif //if defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_QuerySwapGroup // //! DESCRIPTION: This API queries the current SwapGroup and SwapBarrier that a SwapChain of a specific client device is bound to. //! //! \param [in] pDevice The caller provides the DirectX 9 device that is used as a swapgroup client //! \param [in] pSwapChain The caller provides the IDirect3DSwapChain9 interface as a handle to the SwapChain //! that belongs to the swapgroup client device //! \param [out] pSwapGroup The caller provides the storage space where the current SwapGroup is stored. //! \param [out] pSwapBarrier The caller provides the storage space where the current SwapBarrier is stored. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK the current SwapGroup and SwapBarrier has been stored //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_QuerySwapGroup(IDirect3DDevice9 *pDevice, IDirect3DSwapChain9 *pSwapChain, NvU32 *pSwapGroup, NvU32 *pSwapBarrier); #endif //if defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_JoinSwapGroup // //! DESCRIPTION: This API causes the SwapChain of a SwapGroup client to join or leave the specified SwapGroup. //! //! \param [in] pDevice The caller provides the DirectX 9 device that is used as a swapgroup client //! \param [in] pSwapChain The caller provides the IDirect3DSwapChain9 interface as a handle to the SwapChain //! that belongs to the swapgroup client device //! \param [in] group The caller specifies the SwapGroup which the SwapChain should join. //! - If the value of group is zero, the SwapChain leaves the SwapGroup. //! - The SwapChain joins a SwapGroup if the SwapGroup number is a positive integer less than or //! equal to the maximum number of SwapGroups queried by NvAPI_SwapGroup_QueryMaxSwapGroup. //! \param [in] blocking The caller specifies that a presentation of this SwapChain should return immediately or block //! until all members of the SwapGroup are ready and the presentation was actually executed. //! A boolean value of false means the Present operation returns immediately and a value of true //! means the Present operation is blocking. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK the SwapChain joined/left the SwapGroup accordingly //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_JoinSwapGroup(IDirect3DDevice9 *pDevice, IDirect3DSwapChain9 *pSwapChain, NvU32 group, BOOL blocking); #endif //if defined(_D3D9_H_) #if defined(_D3D9_H_) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_BindSwapBarrier // //! DESCRIPTION: This API causes a SwapGroup to be bound to or released from the specified SwapBarrier. //! //! \param [in] pDevice The caller provides the DirectX 9 device that is used as a swapgroup client //! \param [in] group The caller specifies the SwapGroup to be bound to the SwapBarrier. //! \param [in] barrier The caller specifies the SwapBarrier that the SwapGroup should be bound to. //! - If the value of barrier is zero, the SwapGroup will be released from the SwapBarrier. //! - The SwapGroup will be bound to the SwapBarrier if the value of barrier is a positive //! integer less than or equal to the maximum number of SwapBarriers queried by NvAPI_SwapGroup_QueryMaxSwapGroup. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK the SwapGroup is bound to or released from the specified SwapBarrier //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_BindSwapBarrier(IDirect3DDevice9 *pDevice, NvU32 group, NvU32 barrier); #endif //if defined(_D3D9_H_) //! \ingroup dx typedef enum { NVAPI_VSYNC_DEFAULT, //!< Fall back to the default settings NVAPI_VSYNC_OFF, //!< Force vertical sync off when performance is more important than image quality and for benchmarking" NVAPI_VSYNC_ON, //!< Force vertical sync on when image quality is more important than performance NVAPI_VSYNC_ADAPTIVE, //!< Select adaptive to turn vertical sync on or off based on the frame rate. //! Vertical sync will only be on for frame rates above the monitor refresh rate. NVAPI_VSYNC_ADAPTIVE_HALF_REFRESH_RATE //!< } NVAPI_VSYNC_MODE; #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_SetVerticalSyncMode // //! DESCRIPTION: This API set the vertical sync mode for the given device context. //! //! \param [in] pDevice The caller provides the device and can be either IDirect3DDevice9 or ID3D10Device or ID3D10Device1 or ID3D11Device. //! \param [in] vsyncMode The caller specifies the NVAPI_VSYNC_MODE to be set. //! //! SUPPORTED OS: Windows Vista //! //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_SetVerticalSyncMode(__in IUnknown *pDevice, __in NVAPI_VSYNC_MODE vsyncMode); #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_Present // //! DESCRIPTION: Presents the contents of the next buffer in the sequence of back buffers //! owned by a D3D device. //! This Present operation supports using a SwapGroup and SwapBarrier on the SwapChain //! that owns the back buffer to be presented. //! //! NOTE: NvAPI_D3D1x_Present is a wrapper of the method IDXGISwapChain::Present which //! additionally notifies the D3D driver of the SwapChain used by the runtime for //! presentation, thus allowing the D3D driver to apply SwapGroup and SwapBarrier //! functionality to that SwapChain. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDevice The D3D device interface that is used to issue the Present operation, //! using the following IDirect3DDevice9::Present input parameters. //! pDevice can be either ID3D10Device or ID3D10Device1 or ID3D11Device or ID3D12Device. //! \param [in] pSwapChain The IDXGISwapChain interface that is intended to present //! \param [in] SyncInterval An integer that specifies the how to synchronize presentation of a frame with the vertical blank. //! Values are: //! - 0: The presentation occurs immediately, there is no synchronization. //! - 1,2,3,4 : Synchronize presentation after the n'th vertical blank. //! \param [in] Flags An integer value that contains swap-chain presentation options as defined in DXGI_PRESENT. //! //! \retval ::NVAPI_OK the Present operation was successfully executed //! \retval ::NVAPI_DEVICE_BUSY the Present operation failed with an error DXGI_ERROR_DEVICE_RESET or DXGI_ERROR_DEVICE_REMOVED, // DXGI_STATUS_OCCLUDED, or D3DDDIERR_DEVICEREMOVED. //! \retval ::NVAPI_ERROR the communication with the D3D driver failed, SwapGroup/SwapBarrier may not be possible. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_Present(IUnknown *pDevice, IDXGISwapChain *pSwapChain, UINT SyncInterval, UINT Flags); #endif // defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_QueryFrameCount // //! DESCRIPTION: This API queries the universal framecounter of the Quadro-Sync master device. //! //! \param [in] pDevice The caller provides the D3D device that has access to the Quadro-Sync device, //! pDevice can be either ID3D10Device or ID3D10Device1 or ID3D11Device or ID3D12Device. //! \param [out] pFrameCount The caller provides the storage space where the framecount is stored. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK *pFrameCount populated with framecount value. //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_QueryFrameCount(IUnknown *pDevice, NvU32 *pFrameCount); #endif // defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_ResetFrameCount // //! DESCRIPTION: This API resets the universal framecounter on the Quadro-Sync master device. //! //! \param [in] pDevice The caller provides the D3D device that has access to the Quadro-Sync device, //! pDevice can be either ID3D10Device or ID3D10Device1 or ID3D11Device or ID3D12Device. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK framecounter has been reset //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT pDevice arg passed in is invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_ResetFrameCount(IUnknown *pDevice); #endif // defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_QueryMaxSwapGroup // //! DESCRIPTION: This API queries the number of supported SwapGroups and SwapBarriers in the graphics system. //! //! \param [in] pDevice The caller provides the D3D device that is intended to use SwapGroup functionality. //! pDevice can be either ID3D10Device or ID3D10Device1 or ID3D11Device or ID3D12Device. //! \param [out] pMaxGroups The caller provides the storage space where the number of available SwapGroups is stored. //! \param [out] pMaxBarriers The caller provides the storage space where the number of available SwapBarriers is stored. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK the number of SwapGroups and SwapBarriers has been stored //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_QueryMaxSwapGroup(IUnknown *pDevice, NvU32 *pMaxGroups, NvU32 *pMaxBarriers); #endif // defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_QuerySwapGroup // //! DESCRIPTION: This API queries the current SwapGroup and SwapBarrier that a SwapChain of a specific client device is bound to. //! //! \param [in] pDevice The caller provides the D3D device that owns the SwapChain used as a SwapGroup client. //! pDevice can be either ID3D10Device or ID3D10Device1 or ID3D11Device or ID3D12Device. //! \param [in] pSwapChain The IDXGISwapChain interface that is used as the SwapGroup client. //! //! \param [out] pSwapGroup The caller provides the storage space where the current SwapGroup is stored. //! \param [out] pSwapBarrier The caller provides the storage space where the current SwapBarrier is stored. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK the current SwapGroup and SwapBarrier has been stored //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_QuerySwapGroup(IUnknown *pDevice, IDXGISwapChain *pSwapChain, NvU32 *pSwapGroup, NvU32 *pSwapBarrier); #endif // defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_JoinSwapGroup // //! DESCRIPTION: This API causes the SwapChain of a SwapGroup client to join or leave the specified SwapGroup. //! //! \param [in] pDevice The caller provides the D3D device that owns the SwapChain used as a SwapGroup client. //! pDevice can be either ID3D10Device or ID3D10Device1 or ID3D11Device or ID3D12Device. //! \param [in] pSwapChain The IDXGISwapChain interface that is used as the SwapGroup client. //! \param [in] group The caller specifies the SwapGroup which the SwapChain should join. //! - If the value of group is zero, the SwapChain leaves the SwapGroup. //! - The SwapChain joins a SwapGroup if the SwapGroup number is a positive integer less than or //! equal to the maximum number of SwapGroups queried by NvAPI_SwapGroup_QueryMaxSwapGroup. //! \param [in] blocking The caller specifies that a presentation of this SwapChain should return immediately or block //! until all members of the SwapGroup are ready and the presentation was actually executed. //! A boolean value of false means the Present operation returns immediately and a value of true //! means the Present operation is blocking. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK the SwapChain joined/left the SwapGroup accordingly //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_JoinSwapGroup(IUnknown *pDevice, IDXGISwapChain *pSwapChain, NvU32 group, BOOL blocking); #endif // defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_BindSwapBarrier // //! DESCRIPTION: This API causes a SwapGroup to be bound to or released from the specified SwapBarrier. //! //! \param [in] pDevice The caller provides the D3D device that owns the SwapChain used as a SwapGroup client. //! pDevice can be either ID3D10Device or ID3D10Device1 or ID3D11Device or ID3D12Device. //! \param [in] group The caller specifies the SwapGroup to be bound to the SwapBarrier. //! \param [in] barrier The caller specifies the SwapBarrier that the SwapGroup should be bound to. //! - If the value of barrier is zero, the SwapGroup releases the SwapBarrier. //! - The SwapGroup will be bound to the SwapBarrier if the value of barrier is a positive //! integer less than or equal to the maximum number of SwapBarriers queried by NvAPI_D3D1x_QueryMaxSwapGroup. //! SUPPORTED OS: Windows 7 and higher //! //! //! \retval ::NVAPI_OK the SwapGroup is bound to the specified SwapBarrier //! \retval ::NVAPI_ERROR The operation failed. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI was not yet initialized. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_BindSwapBarrier(IUnknown *pDevice, NvU32 group, NvU32 barrier); #endif // defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_QueryPresentBarrierSupport // //! DESCRIPTION: This API returns if presentBarrier feature is supported on the specified device. //! //! \since Release: 470 //! //! \param [in] pDevice The ID3D12Device device which owns the SwapChain as a PresentBarrier client. //! \param [out] pSupported Pointer to a boolean returning true if supported, false otherwise. //! //! \return ::NVAPI_OK the call succeeded //! \return ::NVAPI_ERROR the call failed //! \return ::NVAPI_NO_IMPLEMENTATION the API is not implemented //! \return ::NVAPI_INVALID_POINTER an invalid pointer was passed as an argument //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_QueryPresentBarrierSupport(__in ID3D12Device *pDevice, __out bool *pSupported); #endif // defined(__cplusplus) && defined(__d3d12_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_CreatePresentBarrierClient // //! DESCRIPTION: This API returns an NvPresentBarrierClientHandle handle, which //! owns the swapchain to be synchronized through PresentBarrier. //! This handle is used in other PresentBarrier functions. //! //! \since Release: 470 //! //! \param [in] pDevice The ID3D12Device device which owns the SwapChain as a PresentBarrier client. //! \param [in] pSwapChain The IDXGISwapChain interface that presentBarrier is operated on. //! \param [OUT] pPresentBarrierClient Pointer to an NvPresentBarrierClientHandle handle created by the driver //! on success. //! //! \return ::NVAPI_OK the call succeeded //! \return ::NVAPI_ERROR the call failed //! \return ::NVAPI_INVALID_POINTER an invalid pointer was passed as an argument //! \return ::NVAPI_NO_IMPLEMENTATION the API is not implemented //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_CreatePresentBarrierClient(__in ID3D12Device *pDevice, __in IDXGISwapChain *pSwapChain, __out NvPresentBarrierClientHandle *pPresentBarrierClient); #endif // defined(__cplusplus) && defined(__d3d12_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_RegisterPresentBarrierResources // //! DESCRIPTION: This API registers scanout resources of a presentBarrier client //! to the presentBarrier, and a fence object which is used for //! presentBarrier synchronization. Once the registration has completed //! successfully, it is not allowed to add additional resources, i.e. the //! number of back buffers and fence object are not allowed to be //! changed. However, application must call this function whenever the //! back buffers are changed, e.g. ResizeBuffers() is called. //! //! \since Release: 470 //! //! \param [in] presentBarrierClient The NvPresentBarrierClientHandle client handle that owns the resources. //! \param [in] pFence An ID3D12Fence object created by the application and used for present //! synchronization through presentBarrier. Application must wait on this //! fence to ensure the scanout resources are ready for use in the next //! rendering loop. The fence is only signaled by the driver and must not //! be signaled through any other queue command. The fence value must be //! monotonically increasing on every present call, and tracked by the //! application. //! \param [in] ppResources An array of ID3D12Resource to be synchronized through presentBarrier, and //! the size is specified by numResources. //! \param [in] numResources The number of ID3D12Resource elements in ppResources. //! //! \return ::NVAPI_OK the call succeeded //! \return ::NVAPI_ERROR the call failed //! \return ::NVAPI_NO_IMPLEMENTATION the API is not implemented //! \return ::NVAPI_INVALID_POINTER an invalid pointer was passed as an argument //! \return ::NVAPI_INVALID_HANDLE an invalid NvPresentBarrierClientHandle was passed as an argument //! \return ::NVAPI_INVALID_ARGUMENT an invalid number of resources was passed as an argument //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_RegisterPresentBarrierResources(__in NvPresentBarrierClientHandle presentBarrierClient, __in ID3D12Fence *pFence, __in ID3D12Resource **ppResources, __in NvU32 numResources); #endif // defined(__cplusplus) && defined(__d3d12_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DestroyPresentBarrierClient // //! DESCRIPTION: This API destroys a presentBarrier client, and must be called //! after client leaves presentBarrier to avoid memory leak. //! //! \since Release: 470 //! //! \param [in] presentBarrierClient An NvPresentBarrierClientHandle handle created by NvAPI_xxxx_CreatedPresentBarrierClient //! //! \return ::NVAPI_OK the call succeeded //! \return ::NVAPI_INVALID_HANDLE an invalid NvPresentBarrierClientHandle was passed as an argument //! \return ::NVAPI_NO_IMPLEMENTATION the API is not implemented //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DestroyPresentBarrierClient(__in NvPresentBarrierClientHandle presentBarrierClient); #endif // defined(__cplusplus) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) typedef struct _NV_JOIN_PRESENT_BARRIER_PARAMS { NvU32 dwVersion; //!< Must be NV_JOIN_PRESENT_BARRIER_PARAMS_VER1 } NV_JOIN_PRESENT_BARRIER_PARAMS; //! Macro for constructing the version field of ::NV_JOIN_PRESENT_BARRIER_PARAMS #define NV_JOIN_PRESENT_BARRIER_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_JOIN_PRESENT_BARRIER_PARAMS, 1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_JoinPresentBarrier // //! DESCRIPTION: This API adds a registered PresentBarrier client to the presentBarrier. //! If the call suceeds, image present of the registered scanout resources //! from this client is under the synchronization of presentBarrier. //! //! \since Release: 470 //! //! \param [in] presentBarrierClient An NvPresentBarrierClientHandle handle created by NvAPI_xxxx_CreatedPresentBarrierClient //! \param [in] pParams Parameters to joining presentBarrier. //! //! \retval ::NVAPI_OK the call succeeded //! \retval ::NVAPI_ERROR the call failed //! \retval ::NVAPI_NO_IMPLEMENTATION the interface is not implemented //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION the version of data structure is not correct //! \retval ::NVAPI_INVALID_HANDLE an invalid NvPresentBarrierClientHandle was passed as an argument //! \retval ::NVAPI_INVALID_POINTER an invalid pointer was passed as an argument (probably NULL) //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_JoinPresentBarrier(__in NvPresentBarrierClientHandle presentBarrierClient, __in NV_JOIN_PRESENT_BARRIER_PARAMS *pParams); #endif // defined(__cplusplus) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_LeavePresentBarrier // //! DESCRIPTION: This API removes a registered client from presentBarrier. If this //! client does not join presentBarrier, this function does nothing. //! //! \since Release: 470 //! //! \param [in] presentBarrierClient An NvPresentBarrierClientHandle handle created by NvAPI_xxxxx_CreatePresentBarrierClient. //! //! \retval ::NVAPI_OK the call succeeded //! \retval ::NVAPI_ERROR the call failed //! \retval ::NVAPI_NO_IMPLEMENTATION the interface is not implemented //! \retval ::NVAPI_INVALID_HANDLE an invalid NvPresentBarrierClientHandle was passed as an argument //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_LeavePresentBarrier(__in NvPresentBarrierClientHandle presentBarrierClient); #endif // defined(__cplusplus) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) #define NV_PRESENT_BARRIER_FRAME_STATICS_VER1 MAKE_NVAPI_VERSION(NV_PRESENT_BARRIER_FRAME_STATISTICS,1) typedef enum _NV_PRESENT_BARRIER_SYNC_MODE { PRESENT_BARRIER_NOT_JOINED = 0x00000000, //!< The client hasn't joined presentBarrier PRESENT_BARRIER_SYNC_CLIENT = 0x00000001, //!< The client joined the presentBarrier, but is not synchronized with //! any other presentBarrier clients. This happens if the back buffers //! of this client are composited instead of being flipped out to screen PRESENT_BARRIER_SYNC_SYSTEM = 0x00000002, //!< The client joined the presentBarrier, and is synchronized with other //! presentBarrier clients within the system PRESENT_BARRIER_SYNC_CLUSTER = 0x00000003, //!< The client joined the presentBarrier, and is synchronized with other //! clients within the system and across systems through QSync devices } NV_PRESENT_BARRIER_SYNC_MODE; typedef struct _NV_PRESENT_BARRIER_FRAME_STATISTICS { NvU32 dwVersion; //!< Must be NV_PRESENT_BARRIER_FRAME_STATICS_VER1 NV_PRESENT_BARRIER_SYNC_MODE SyncMode; //!< The presentBarrier mode of this client from last present call NvU32 PresentCount; //!< The total count of times that a frame has been presented from this //! client after it joined presentBarrier successfully. NvU32 PresentInSyncCount; //!< The total count of times that a frame has been presented from this //! client and that has happened since the returned SyncMode is //! PRESENT_BARRIER_SYNC_SYSTEM or PRESENT_BARRIER_SYNC_CLUSTER. //! If the returned SyncMode is any other mode, this value is 0. //! This count is set back to 0 in case the SyncMode switches away from //! PRESENT_BARRIER_SYNC_SYSTEM or PRESENT_BARRIER_SYNC_CLUSTER. NvU32 FlipInSyncCount; //!< The total count of flips from this client since the returned SyncMode //! is PRESENT_BARRIER_SYNC_SYSTEM or PRESENT_BARRIER_SYNC_CLUSTER. //! If the returned SyncMode is any other mode, this value is 0. //! This count is set back to 0 in case the SyncMode switches away from //! PRESENT_BARRIER_SYNC_SYSTEM or PRESENT_BARRIER_SYNC_CLUSTER. NvU32 RefreshCount; //!< The total count of v-blanks since the returned SyncMode of this client //! is PRESENT_BARRIER_SYNC_SYSTEM or PRESENT_BARRIER_SYNC_CLUSTER. //! If the returned SyncMode is any other mode, this value is 0. //! This count is set back to 0 in case the SyncMode switches away from //! PRESENT_BARRIER_SYNC_SYSTEM or PRESENT_BARRIER_SYNC_CLUSTER. } NV_PRESENT_BARRIER_FRAME_STATISTICS; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_QueryPresentBarrierFrameStatistics // //! DESCRIPTION: This API returns the presentBarrier frame statistics of last //! present call from this client. If the client did not join //! presentBarrier, the SyncMode is returned as PRESENT_BARRIER_NOT_JOINED, //! and all other fields are reset. Driver does not retain any //! presentBarrier info of the client once it leaves presentBarrier. //! //! \since Release: 470 //! //! \param [in] presentBarrierClient An NvPresentBarrierClientHandle handle created by NvAPI_xxxxx_CreatePresentBarrierClient. //! \param [out] pFrameStats Pointer to NV_PRESENT_BARRIER_FRAME_STATISTICS structure about presentBarrier statistics. //! //! \retval ::NVAPI_OK the call succeeded //! \retval ::NVAPI_ERROR the call failed //! \retval ::NVAPI_NO_IMPLEMENTATION the interface is not implemented //! \retval ::NVAPI_INVALID_HANDLE an invalid NvPresentBarrierClientHandle was passed as an argument //! \retval ::NVAPI_INVALID_POINTER an invalid pointer was passed as an argument (probably NULL) //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION invalid version of frameStatistics params //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_QueryPresentBarrierFrameStatistics(__in NvPresentBarrierClientHandle presentBarrierClient, __out NV_PRESENT_BARRIER_FRAME_STATISTICS *pFrameStats); #endif // defined(__cplusplus) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_CreateDDisplayPresentBarrierClient // //! DESCRIPTION: This API returns an NvPresentBarrierClientHandle handle. //! //! \since Release: 510 //! //! \param [in] pDevice The ID3D12Device device which executes the rendering commands of this PresentBarrier //! client. It must be created on the same adapter as DisplayDevice. //! \param [in] sourceId The adapter-relative identifier for the DisplaySource obtained from DisplaySource.SourceId(). //! \param [OUT] pPresentBarrierClient Pointer to an NvPresentBarrierClientHandle handle created by the driver on success. //! //! \return ::NVAPI_OK the call succeeded //! \return ::NVAPI_ERROR the call failed //! \return ::NVAPI_INVALID_POINTER an invalid pointer was passed as an argument //! \return ::NVAPI_INVALID_HANDLE the input displaySource handle is not owned by the process //! \return ::NVAPI_NOT_SUPPORTED PresentBarrier featue is not supported on this configuration //! \return ::NVAPI_NO_IMPLEMENTATION the API is not implemented //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_CreateDDisplayPresentBarrierClient(__in ID3D12Device *pDevice, __in NvU32 sourceId, __out NvPresentBarrierClientHandle *pPresentBarrierClient); #endif // defined(__cplusplus) && defined(__d3d12_h__) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__) || defined(__d3d12_h__)) enum NVAPI_QUAD_FILLMODE { NVAPI_QUAD_FILLMODE_DISABLED = 0, NVAPI_QUAD_FILLMODE_BBOX = 1, NVAPI_QUAD_FILLMODE_FULL_VIEWPORT = 2, }; #endif //defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__) || defined(__d3d12_h__)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) typedef struct NvAPI_D3D11_RASTERIZER_DESC_EX { // D3D11_RASTERIZER_DESC member variables D3D11_FILL_MODE FillMode; D3D11_CULL_MODE CullMode; BOOL FrontCounterClockwise; INT DepthBias; FLOAT DepthBiasClamp; FLOAT SlopeScaledDepthBias; BOOL DepthClipEnable; BOOL ScissorEnable; BOOL MultisampleEnable; BOOL AntialiasedLineEnable; // NvAPI_D3D11_RASTERIZER_DESC_EX specific member variables NvU32 ForcedSampleCount; //1 it needs to match N, in non-TIR it needs to match RT sample count. Ignored if ForcePerSampleInterlock is set NvU8 SamplePositionsX[16]; // 1 && (pDesc->MiscFlags&D3D11_RESOURCE_MISC_TILED) //! \param [in] pInitialData A pointer to an array of D3D11_SUBRESOURCE_DATA structures that describe subresources for the 2D texture resource. //! \param [out] ppTexture2D A pointer to a buffer that receives a pointer to a ID3D11Texture2D interface for the created texture. //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateTiledTexture2DArray(__in ID3D11Device *pDevice, __in const D3D11_TEXTURE2D_DESC *pDesc, __in const D3D11_SUBRESOURCE_DATA *pInitialData, __out ID3D11Texture2D **ppTexture2D); #endif //defined(__cplusplus) && defined(__d3d11_2_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) typedef enum _NV_D3D11_FEATURE { NV_D3D11_FEATURE_RASTERIZER, } NV_D3D11_FEATURE; typedef struct _NV_D3D11_FEATURE_DATA_RASTERIZER_SUPPORT { BOOL TargetIndependentRasterWithDepth; BOOL ProgrammableSamplePositions; BOOL InterleavedSampling; BOOL ConservativeRaster; BOOL PostZCoverage; BOOL CoverageToColor; } NV_D3D11_FEATURE_DATA_RASTERIZER_SUPPORT; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CheckFeatureSupport // //! DESCRIPTION: This function gets information about the features that are supported by the current graphics driver. //! //! //! //! \param [in] pDevice The device on which to query for support. //! \param [in] Feature A member of the NvAPI_D3D11_FEATURE enumerated type that describes which feature to query for suppor. //! \param [in] pFeatureSupportData Upon completion of the method, the passed structure is filled with data that describes the feature support. //! \param [out] FeatureSupportDataSize The size of the structure passed to the pFeatureSupportData parameter. //! //! \since Release: 410 //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! \retval :: Returns NVAPI_OK if successful; returns NVAPI_INVALID_ARGUMENT if an unsupported data type is passed to the pFeatureSupportData parameter //! or a size mismatch is detected for the FeatureSupportDataSize parameter; //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CheckFeatureSupport(__in ID3D11Device *pDevice, __in NV_D3D11_FEATURE Feature, __out void *pFeatureSupportData, __in UINT FeatureSupportDataSize); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreateImplicitMSAATexture2D // //! \since Release: 410 // //! \code //! DESCRIPTION: NvAPI_D3D11_CreateImplicitMSAATexture2D is a simple wrapper of ID3D11Device::CreateTexture2D //! which allows to create multisampled 2D texture that is exposed to DX runtime as non-multisampled texture. //! //! \param [in] pDevice Current d3d device //! \param [in] pDesc A pointer to a D3D11_TEXTURE2D_DESC structure that describes a 2D texture resource. //! To create a typeless resource that can be interpreted at runtime into different, //! compatible formats, specify a typeless format in the texture description. //! To generatemipmap levels automatically, set the number of mipmap levels to 0. //! SampleDesc.SampleCount specifies actual resource sample count, while D3D runtime object //! sees resource as non-multisampled. //! //! \param [out] ppTexture2D A pointer to a buffer that receives a pointer to a ID3D11Texture2D interface for the //! created texture. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. See MSDN for the API specific error codes. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateImplicitMSAATexture2D(__in ID3D11Device *pDevice, __in const D3D11_TEXTURE2D_DESC *pDesc, __out ID3D11Texture2D **ppTexture2D); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_CreateImplicitMSAATexture2D // //! \since Release: 410 // //! \code //! DESCRIPTION: NvAPI_D3D12_CreateCommittedImplicitMSAATexture2D is a simple wrapper of ID3D12Device::CreateCommittedResource //! which allows to create multisampled 2D texture that is exposed to DX runtime as non-multisampled texture. //! //! \param [in] pDevice Current d3d device //! \param [in] pDesc A pointer to a D3D12_RESOURCE_DESC structure that describes a 2D texture resource. //! To create a typeless resource that can be interpreted at runtime into different, //! compatible formats, specify a typeless format in the texture description. //! To generatemipmap levels automatically, set the number of mipmap levels to 0. //! SampleDesc.SampleCount specifies actual resource sample count, while D3D runtime object //! sees resource as non-multisampled. //! \param [in] pHeapProperties, HeapFlags, InitialResourceState, pOptimizedClearValue, riidResource See D3D12 docs //! //! \param [out] ppResource Same ID3D12Device::CreateCommittedResource //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. See MSDN for the API specific error codes. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_CreateCommittedImplicitMSAATexture2D( __in ID3D12Device* pDevice, __in const D3D12_HEAP_PROPERTIES *pHeapProperties, D3D12_HEAP_FLAGS HeapFlags, __in const D3D12_RESOURCE_DESC *pDesc, D3D12_RESOURCE_STATES InitialResourceState, __in_opt const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, __out void **ppvResource); #endif //defined(__cplusplus) && defined(__d3d12_h__) //! SUPPORTED OS: Windows 10 and higher //! //! \ingroup dx //! Valid modes for NvAPI_D3D11_ResolveSubresourceRegion() and NvAPI_D3D12_ResolveSubresourceRegion typedef enum _NV_RESOLVE_MODE { NV_RESOLVE_MODE_SAMPLE_0, } NV_RESOLVE_MODE; #if defined (__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_ResolveSubresourceRegion // //! \since Release: 410 // //! \code //! DESCRIPTION: NvAPI_D3D11_ResolveSubresourceRegion is D3D11 an analog of D3D12 ResolveSubresourceRegion. //! //! \param [in] pDstResource Destination resource. Must be a created with the D3D11_USAGE_DEFAULT flag and be single-sampled. //! \param [in] DstSubresource A zero-based index, that identifies the destination subresource. Use D3D11CalcSubresource to calculate the index. //! \param [in] DstX The X coordinate of the left-most edge of the destination region. //! The width of the destination region is the same as the width of the source rect. //! //! \param [in] DstY The Y coordinate of the top-most edge of the destination region. //! The height of the destination region is the same as the height of the source rect. //! //! \param [in] pSrcResource Source resource. Must be multisampled. //! \param [in] SrcSubresource The source subresource of the source resource. //! \param [in] pSrcRect Specifies the rectangular region of the source resource to be resolved. //! Passing NULL for pSrcRect specifies that the entire subresource is to be resolved. //! //! \param [in] Format A DXGI_FORMAT that indicates how the multisampled resource will be resolved to a single-sampled resource. //! \param [in] ResolveMode Specifies the operation used to resolve the source samples. NV_RESOLVE_MODE_SAMPLE_0 is the only supported mode. //! NV_RESOLVE_MODE_SAMPLE_0 outputs sample 0 and discards all other samples. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. See MSDN for the API specific error codes. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_ResolveSubresourceRegion( __in ID3D11Device *pDevice, __in ID3D11Texture2D *pDstResource, __in UINT DstSubresource, __in UINT DstX, __in UINT DstY, __in ID3D11Texture2D *pSrcResource, __in UINT SrcSubresource, __in_opt const RECT *pSrcRect, __in DXGI_FORMAT Format, __in NV_RESOLVE_MODE ResolveMode); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_ResolveSubresourceRegion // //! \since Release: 410 // //! \code //! DESCRIPTION: NvAPI_D3D12_ResolveSubresourceRegion is D3D11 an analog of D3D12 ResolveSubresourceRegion. //! //! \param [in] pDstResource Destination resource. Must be a created with the D3D11_USAGE_DEFAULT flag and be single-sampled. //! \param [in] DstSubresource A zero-based index, that identifies the destination subresource. Use D3D11CalcSubresource to calculate the index. //! \param [in] DstX The X coordinate of the left-most edge of the destination region. //! The width of the destination region is the same as the width of the source rect. //! //! \param [in] DstY The Y coordinate of the top-most edge of the destination region. //! The height of the destination region is the same as the height of the source rect. //! //! \param [in] pSrcResource Source resource. Must be multisampled. //! \param [in] SrcSubresource The source subresource of the source resource. //! \param [in] pSrcRect Specifies the rectangular region of the source resource to be resolved. //! Passing NULL for pSrcRect specifies that the entire subresource is to be resolved. //! //! \param [in] Format A DXGI_FORMAT that indicates how the multisampled resource will be resolved to a single-sampled resource. //! \param [in] ResolveMode Specifies the operation used to resolve the source samples. NV_RESOLVE_MODE_SAMPLE_0 is the only supported mode. //! NV_RESOLVE_MODE_SAMPLE_0 outputs sample 0 and discards all other samples. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. See MSDN for the API specific error codes. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_ResolveSubresourceRegion( __in ID3D12GraphicsCommandList1*pCommandList, __in ID3D12Resource *pDstResource, __in UINT DstSubresource, __in UINT DstX, __in UINT DstY, __in ID3D12Resource *pSrcResource, __in UINT SrcSubresource, __in_opt RECT *pSrcRect, __in DXGI_FORMAT Format, __in NV_RESOLVE_MODE ResolveMode); #endif //defined(__cplusplus) && defined(__d3d12_h__) //! SUPPORTED OS: Windows 8 and higher //! #if defined (__cplusplus) && defined(__d3d11_2_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_TiledTexture2DArrayGetDesc // //! \since Release: 375 // //! \code //! DESCRIPTION: NvAPI_D3D11_TiledTexture2DArrayGetDesc is an simple wrapper of ID3D11Texture2D::GetDesc //! when pTiledTexture2DArray is created with NvAPI_D3D11_CreateTiledTexture2DArray. //! Runtime doesn't know the created resource is actually a tiled resource. //! So calling ID3D11Texture2D::GetDesc will get a desc without D3D11_RESOURCE_MISC_TILED in MiscFlags. //! This wrapper API just adds D3D11_RESOURCE_MISC_TILED back. //! //! \param [in] pTiledTexture2DArray Pointer of tiled texture2D array to get resource desc from. //! \param [out] pDesc Pointer to a resource description. //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_TiledTexture2DArrayGetDesc(__in ID3D11Texture2D *pTiledTexture2DArray, __out D3D11_TEXTURE2D_DESC *pDesc); #endif //defined(__cplusplus) && defined(__d3d11_2_h__) //! SUPPORTED OS: Windows 8 and higher //! #if defined (__cplusplus) && defined(__d3d11_2_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_UpdateTileMappings // //! \since Release: 375 // //! \code //! DESCRIPTION: NvAPI_D3D11_UpdateTileMappings is an extension of ID3D11DeviceContext2::UpdateTileMappings. //! It allows pTiledResource to be a resource created with NvAPI_D3D11_CreateTiledTexture2DArray, and should be used only in such case. //! //! \param [in] pDeviceContext Must be Immediate DeviceContext. //! \param [in] pTiledResource A pointer to the tiled texture 2D array resource created by NvAPI_D3D11_CreateTiledTexture2DArray. //! \param [in] NumTiledResourceRegions The number of tiled resource regions. //! \param [in] pTiledResourceRegionStartCoordinates An array of D3D11_TILED_RESOURCE_COORDINATE structures that describe the starting coordinates of the tiled resource regions. Cannot be NULL. //! \param [in] pTiledResourceRegionSizes An array of D3D11_TILE_REGION_SIZE structures that describe the sizes of the tiled resource regions. Cannot be NULL. //! \param [in] pTilePool A pointer to the tile pool. This resource should be created by standard API. //! \param [in] NumRanges The number of tile-pool ranges. //! \param [in] pRangeFlags An array of D3D11_TILE_RANGE_FLAG values that describe each tile-pool range. //! \param [in] pTilePoolStartOffsets An array of offsets into the tile pool. These are 0-based tile offsets, counting in tiles (not bytes). //! \param [in] pRangeTileCounts An array of values that specify the number of tiles in each tile-pool range. //! \param [in] Flags A combination of D3D11_TILE_MAPPING_FLAGS values that are combined by using a bitwise OR operation. //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_UpdateTileMappings( __in ID3D11DeviceContext2 *pDeviceContext, __in ID3D11Resource *pTiledResource, __in UINT NumTiledResourceRegions, __in const D3D11_TILED_RESOURCE_COORDINATE *pTiledResourceRegionStartCoordinates, __in const D3D11_TILE_REGION_SIZE *pTiledResourceRegionSizes, __in ID3D11Buffer *pTilePool, __in UINT NumRanges, __in const UINT *pRangeFlags, __in const UINT *pTilePoolStartOffsets, __in const UINT *pRangeTileCounts, __in UINT Flags); #endif //defined(__cplusplus) && defined(__d3d11_2_h__) //! SUPPORTED OS: Windows 8 and higher //! #if defined (__cplusplus) && defined(__d3d11_2_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CopyTileMappings // //! \since Release: 375 // //! \code //! DESCRIPTION: NvAPI_D3D11_CopyTileMappings is an extension of ID3D11DeviceContext2::CopyTileMappings //! It allows pDestTiledResource or pSourceTiledResource or both to be created with NvAPI_D3D11_CreateTiledTexture2DArray. //! It should be used only in such case. //! //! \param [in] pDeviceContext Must be Immediate DeviceContext. //! \param [in] pDestTiledResource Tiled resource created by NvAPI_D3D11_CreateTiledTexture2DArray to copy tile mappings into. //! \param [in] pDestRegionStartCoordinate A pointer to a D3D11_TILED_RESOURCE_COORDINATE structure that describes the starting coordinates of the destination tiled resource. //! \param [in] pSourceTiledResource Tiled resource created by NvAPI_D3D11_CreateTiledTexture2DArray to copy tile mappings from. //! \param [in] pSourceRegionStartCoordinate A pointer to a D3D11_TILED_RESOURCE_COORDINATE structure that describes the starting coordinates of the source tiled resource. //! \param [in] pTileRegionSize A pointer to a D3D11_TILE_REGION_SIZE structure that describes the size of the tiled region. //! \param [in] Flags A combination of D3D11_TILE_MAPPING_FLAGS values that are combined by using a bitwise OR operation. //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CopyTileMappings( __in ID3D11DeviceContext *pDeviceContext, __in ID3D11Resource *pDestTiledResource, __in const D3D11_TILED_RESOURCE_COORDINATE *pDestRegionStartCoordinate, __in ID3D11Resource *pSourceTiledResource, __in const D3D11_TILED_RESOURCE_COORDINATE *pSourceRegionStartCoordinate, __in const D3D11_TILE_REGION_SIZE *pTileRegionSize, __in UINT Flags); #endif //defined(__cplusplus) && defined(__d3d11_2_h__) //! SUPPORTED OS: Windows 8 and higher //! #if defined (__cplusplus) && defined(__d3d11_2_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_TiledResourceBarrier // //! \since Release: 375 // //! \code //! DESCRIPTION: NvAPI_D3D11_TiledResourceBarrier is an extension of ID3D11DeviceContext2::TiledResourceBarrier, but only works on ID3D11Resource(no support for ID3D11View). //! If pTiledResourceAccessBeforeBarrier or pTiledResourceAccessAfterBarrier or both are created by NvAPI_D3D11_CreateTiledTexture2DArray, //! NvAPI_D3D11_TiledResourceBarrier must be used instead of ID3D11DeviceContext2::TiledResourceBarrier. //! //! \param [in] pDeviceContext Must be Immediate DeviceContext. //! \param [in] pTiledResourceAccessBeforeBarrier Access operations on this resource must complete before the access operations on the object that pTiledResourceAccessAfterBarrier specifies. //! \param [in] pTiledResourceAccessAfterBarrier Access operations on this resource must begin after the access operations on the object that pTiledResourceAccessBeforeBarrier specifies. //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_TiledResourceBarrier( __in ID3D11DeviceContext *pDeviceContext, __in ID3D11Resource *pTiledResourceAccessBeforeBarrier, __in ID3D11Resource *pTiledResourceAccessAfterBarrier); #endif //defined(__cplusplus) && defined(__d3d11_2_h__) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_AliasMSAATexture2DAsNonMSAA // //! \code //! DESCRIPTION: This function allows creating (aliasing) a non-MSAA Texture2D object using the same memory as the given multi-sampled //! texture (pInputTex). The surface created would be bloated in width and height but it will have SampleCount = 1 //! For 2X MSAA: OutTex.Width = InputTex.Width * 2, outTex.Height = InputTex.Height //! For 4X MSAA: OutTex.Width = InputTex.Width * 2, outTex.Height = InputTex.Height * 2 //! For 8X MSAA: OutTex.Width = InputTex.Width * 4, outTex.Height = InputTex.Height * 2 //! Only textures SampleQuality = 0 can be aliased as Non MSAA //! The app should ensure that original texture is released only after the aliased copy is released. //! //! This function is free-threaded create compatible i.e. it can be called from a different thread //! than the one calling immediate device setstate functions. //! //! \param [in] pDevice current d3d device //! \param [in] pInputTex The MultiSampled Texture2D resource that is being aliased //! \param [out] ppOutTex The aliased non AA copy MultiSampled Texture2D resource //! //! //! \return :: NVAPI_OK if the call succeeds. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_AliasMSAATexture2DAsNonMSAA(__in ID3D11Device *pDevice, __in ID3D11Texture2D *pInputTex, __out ID3D11Texture2D **ppOutTex); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) && (!defined(CINTERFACE)) typedef UINT NvAPI_D3D11_SWIZZLE_MODE; typedef enum _NV_SWIZZLE_MODE { NV_SWIZZLE_POS_X = 0, NV_SWIZZLE_NEG_X = 1, NV_SWIZZLE_POS_Y = 2, NV_SWIZZLE_NEG_Y = 3, NV_SWIZZLE_POS_Z = 4, NV_SWIZZLE_NEG_Z = 5, NV_SWIZZLE_POS_W = 6, NV_SWIZZLE_NEG_W = 7 }NV_SWIZZLE_MODE; typedef enum _NV_SWIZZLE_OFFSET { NV_SWIZZLE_OFFSET_X = 0, NV_SWIZZLE_OFFSET_Y = 4, NV_SWIZZLE_OFFSET_Z = 8, NV_SWIZZLE_OFFSET_W = 12 }NV_SWIZZLE_OFFSET; #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) && (!defined(CINTERFACE)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) && (!defined(CINTERFACE)) #define NV_CUSTOM_SEMANTIC_MAX_LIMIT 32 typedef enum NV_CUSTOM_SEMANTIC_TYPE { NV_NONE_SEMANTIC = 0, NV_X_RIGHT_SEMANTIC = 1, NV_VIEWPORT_MASK_SEMANTIC = 2, NV_XYZW_RIGHT_SEMANTIC = 3, NV_VIEWPORT_MASK_2_SEMANTIC = 4, NV_POSITION_SEMANTIC = 5, NV_CLIP_DISTANCE_0_SEMANTIC = 6, // MultiView can accept upto two vec4 values. So the application should not use NV_CLIP_DISTANCE_1_SEMANTIC = 7, // more than 2 of the below Clip / Cull semantics in a single shader. NV_CULL_DISTANCE_0_SEMANTIC = 8, NV_CULL_DISTANCE_1_SEMANTIC = 9, NV_GENERIC_ATTRIBUTE_SEMANTIC = 10, NV_PACKED_EYE_INDEX_SEMANTIC = 17, NV_CUSTOM_SEMANTIC_MAX = NV_CUSTOM_SEMANTIC_MAX_LIMIT, } NV_CUSTOM_SEMANTIC_TYPE; typedef struct _NV_CUSTOM_SEMANTIC { UINT version; // NV_CUSTOM_SEMANTIC_VERSION NV_CUSTOM_SEMANTIC_TYPE NVCustomSemanticType; // type of custom semantic (NV_CUSTOM_SEMANTIC_TYPE) NvAPI_LongString NVCustomSemanticNameString; // name of custom semantic e.g. "NV_X_RIGHT", "NV_VIEWPORT_MASK" BOOL RegisterSpecified; // (optional) set to TRUE to explicitly provide register number and mask as below NvU32 RegisterNum; // (optional) output register which has the custom semantic. NvU32 RegisterMask; // (optional) output register component mask which has the custom semantic (X:1, Y:2, Z:4) NvU32 Reserved; // reserved } NV_CUSTOM_SEMANTIC; #define NV_CUSTOM_SEMANTIC_VERSION MAKE_NVAPI_VERSION(NV_CUSTOM_SEMANTIC, 1) #endif //defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) && (!defined(CINTERFACE)) #if defined (__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE)) typedef struct NvAPI_D3D11_CREATE_GEOMETRY_SHADER_EX_V5 { UINT version; BOOL UseViewportMask; BOOL OffsetRtIndexByVpIndex; BOOL ForceFastGS; BOOL DontUseViewportOrder; BOOL UseAttributeSkipMask; BOOL UseCoordinateSwizzle; NvAPI_D3D11_SWIZZLE_MODE *pCoordinateSwizzling; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC BOOL ConvertToFastGS; // reserved BOOL UseSpecificShaderExt; // TRUE if creating minimal specific shaders with nvapi shader extensions } NvAPI_D3D11_CREATE_GEOMETRY_SHADER_EX_V5; typedef NvAPI_D3D11_CREATE_GEOMETRY_SHADER_EX_V5 NvAPI_D3D11_CREATE_GEOMETRY_SHADER_EX; #define NVAPI_D3D11_CREATEGEOMETRYSHADEREX_2_VER_5 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_GEOMETRY_SHADER_EX_V5, 5) #define NVAPI_D3D11_CREATEGEOMETRYSHADEREX_2_VERSION NVAPI_D3D11_CREATEGEOMETRYSHADEREX_2_VER_5 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreateGeometryShaderEx // //! \fn NvAPI_D3D11_CreateGeometryShaderEx //! //! DESCRIPTION: This function allows us to extend the creation of geometry shaders with extra bits //! of functionality. //! //! The first parameters are identical to ID3D11Device::CreateGeometryShader() //! so please refer to its documentation for their usage. //! //! The new parameter is UseViewportMask which is to tell the driver to create a shader //! that outputs a viewport mask instead when a viewport index is indicated. //! Outputting a viewport mask allows a single primitive to land on many different viewports //! as specified by the bits set in the mask, rather than to rely on a single number that tells it //! which unique viewport it would be drawn on. //! This can be used for example in conjunction with the setting of coordinates swizzling (see XXX_NVAPI function) //! to generates multiple adjacent views of the same primitive in a more efficient fashion //! (outputting the primitive only once). //! //! This function is free-threaded create compatible i.e. it can be called from a different //! thread than the one calling immediate device setstate functions. //! //! \since Release: //! //! \param [in] pDevice The device pointer //! \param [in] pShaderBytecode A pointer to the compiled shader. //! \param [in] BytecodeLength Size of the compiled geometry shader. //! \param [in] pClassLinkage A pointer to a class linkage interface. Can be NULL. //! \param [in] UseViewportMask Set to FALSE for custom semantic shaders. Tell the driver to create a shader that outputs the viewport mask in lieu of the viewport index. See above description. //! \param [in] OffsetRtIndexByVpIndex Set to FALSE for custom semantic shaders. The Rendertarget index is offset by the viewport index //! \param [in] ForceFastGS If TRUE, GS must be written with maxvertexcount(1) and must pass-through input vertex 0 to the output without modification //! \param [in] DontUseViewportOrder Default FALSE for Primitives batched per viewport to improve performance. Set TRUE for API order (slow). //! \param [in] UseAttributeSkipMask reserved //! \param [in] UseCoordinateSwizzle reserved //! \param [in] pCoordinateSwizzling reserved //! \param [in] NumCustomSemantics Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics //! \param [in] pCustomSemantics pointer to array of NV_CUSTOM_SEMANTIC //! \param [in] ConvertToFastGS reserved //! \param [in] UseSpecificShaderExt TRUE if creating minimal specific shaders with nvapi shader extensions //! \param [out] ppGeometryShader Address of a pointer to a ID3D11GeometryShader interface. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateGeometryShaderEx_2(__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __in const NvAPI_D3D11_CREATE_GEOMETRY_SHADER_EX *pCreateGeometryShaderExArgs, __out ID3D11GeometryShader **ppGeometryShader); #endif //defined(__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE) ) typedef struct NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V1 { UINT version; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC } NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V1; typedef struct NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V2 { UINT version; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC BOOL UseWithFastGS; // reserved } NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V2; typedef struct NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V3 { UINT version; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC BOOL UseWithFastGS; // reserved BOOL UseSpecificShaderExt; // TRUE if creating minimal specific shaders with nvapi shader extensions } NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V3; typedef NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V3 NvAPI_D3D11_CREATE_VERTEX_SHADER_EX; #define NVAPI_D3D11_CREATEVERTEXSHADEREX_VER_1 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V1, 1) #define NVAPI_D3D11_CREATEVERTEXSHADEREX_VER_2 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V2, 2) #define NVAPI_D3D11_CREATEVERTEXSHADEREX_VER_3 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_VERTEX_SHADER_EX_V2, 3) #define NVAPI_D3D11_CREATEVERTEXSHADEREX_VERSION NVAPI_D3D11_CREATEVERTEXSHADEREX_VER_3 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreateVertexShaderEx // //! \fn NvAPI_D3D11_CreateVertexShaderEx //! //! DESCRIPTION: This function allows us to extend the creation of vertex shaders with extra bits //! of functionality. //! //! The first parameters are identical to ID3D11Device::CreateVertexShader() //! so please refer to its documentation for their usage. //! //! The new parameter are custom semantics which allow setting of custom semantic variables //! in the shader //! //! This function is free-threaded create compatible i.e. it can be called from a different thread //! than the one calling immediate device setstate functions. //! //! \since Release: //! //! \param [in] pDevice The device pointer //! \param [in] pShaderBytecode A pointer to the compiled shader. //! \param [in] BytecodeLength Size of the compiled vertex shader. //! \param [in] pClassLinkage A pointer to a class linkage interface. Can be NULL. //! \param [in] NumCustomSemantics Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics //! \param [in] pCustomSemantics pointer to array of NV_CUSTOM_SEMANTIC //! \param [in] UseWithFastGS reserved //! \param [in] UseSpecificShaderExt TRUE if creating minimal specific shaders with nvapi shader extensions //! \param [out] ppVertexShader Address of a pointer to a ID3D11VertexShader interface. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateVertexShaderEx(__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __in const NvAPI_D3D11_CREATE_VERTEX_SHADER_EX *pCreateVertexShaderExArgs, __out ID3D11VertexShader **ppVertexShader); #endif //defined(__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE) ) typedef struct NvAPI_D3D11_CREATE_HULL_SHADER_EX_V1 { UINT version; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC BOOL UseWithFastGS; // reserved } NvAPI_D3D11_CREATE_HULL_SHADER_EX_V1; typedef struct NvAPI_D3D11_CREATE_HULL_SHADER_EX_V2 { UINT version; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC BOOL UseWithFastGS; // reserved BOOL UseSpecificShaderExt; // TRUE if creating minimal specific shaders with nvapi shader extensions } NvAPI_D3D11_CREATE_HULL_SHADER_EX_V2; typedef NvAPI_D3D11_CREATE_HULL_SHADER_EX_V2 NvAPI_D3D11_CREATE_HULL_SHADER_EX; #define NVAPI_D3D11_CREATEHULLSHADEREX_VER_1 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_HULL_SHADER_EX_V1, 1) #define NVAPI_D3D11_CREATEHULLSHADEREX_VER_2 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_HULL_SHADER_EX_V1, 2) #define NVAPI_D3D11_CREATEHULLSHADEREX_VERSION NVAPI_D3D11_CREATEHULLSHADEREX_VER_2 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreateHullShaderEx // //! \fn NvAPI_D3D11_CreateHullShaderEx //! //! DESCRIPTION: This function allows us to extend the creation of hull shaders with extra bits //! of functionality. //! //! The first parameters are identical to ID3D11Device::CreateHullShader() //! so please refer to its documentation for their usage. //! //! The new parameter are custom semantics which allow setting of custom semantic variables //! in the shader //! //! This function is free-threaded create compatible i.e. it can be called from a different thread //! than the one calling immediate device setstate functions. //! //! \since Release: //! //! \param [in] pDevice The device pointer //! \param [in] pShaderBytecode A pointer to the compiled shader. //! \param [in] BytecodeLength Size of the compiled hull shader. //! \param [in] pClassLinkage A pointer to a class linkage interface. Can be NULL. //! \param [in] NumCustomSemantics Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics //! \param [in] pCustomSemantics pointer to array of NV_CUSTOM_SEMANTIC //! \param [in] UseWithFastGS reserved //! \param [in] UseSpecificShaderExt TRUE if creating minimal specific shaders with nvapi shader extensions //! \param [out] ppHullShader Address of a pointer to a ID3D11HullShader interface. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateHullShaderEx(__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __in const NvAPI_D3D11_CREATE_HULL_SHADER_EX *pCreateHullShaderExArgs, __out ID3D11HullShader **ppHullShader); #endif //defined(__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE) ) typedef struct NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V1 { UINT version; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC } NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V1; typedef struct NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V2 { UINT version; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC BOOL UseWithFastGS; // reserved } NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V2; typedef struct NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V3 { UINT version; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC BOOL UseWithFastGS; // reserved BOOL UseSpecificShaderExt; // TRUE if creating minimal specific shaders with nvapi shader extensions } NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V3; typedef NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V3 NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX; #define NVAPI_D3D11_CREATEDOMAINSHADEREX_VER_1 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V1, 1) #define NVAPI_D3D11_CREATEDOMAINSHADEREX_VER_2 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V2, 2) #define NVAPI_D3D11_CREATEDOMAINSHADEREX_VER_3 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX_V3, 3) #define NVAPI_D3D11_CREATEDOMAINSHADEREX_VERSION NVAPI_D3D11_CREATEDOMAINSHADEREX_VER_3 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreateDomainShaderEx // //! \fn NvAPI_D3D11_CreateDomainShaderEx //! //! DESCRIPTION: This function allows us to extend the creation of domain shaders with extra bits //! of functionality. //! //! The first parameters are identical to ID3D11Device::CreateDomainShader() //! so please refer to its documentation for their usage. //! //! The new parameter are custom semantics which allow setting of custom semantic variables //! in the shader //! //! This function is free-threaded create compatible i.e. it can be called from a different thread //! than the one calling immediate device setstate functions. //! //! \since Release: //! //! \param [in] pDevice The device pointer //! \param [in] pShaderBytecode A pointer to the compiled shader. //! \param [in] BytecodeLength Size of the compiled domain shader. //! \param [in] pClassLinkage A pointer to a class linkage interface. Can be NULL. //! \param [in] NumCustomSemantics Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics //! \param [in] pCustomSemantics pointer to array of NV_CUSTOM_SEMANTIC //! \param [in] UseWithFastGS reserved //! \param [in] UseSpecificShaderExt TRUE if creating minimal specific shaders with nvapi shader extensions //! \param [out] ppDomainShader Address of a pointer to a ID3D11DomainShader interface. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateDomainShaderEx(__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __in const NvAPI_D3D11_CREATE_DOMAIN_SHADER_EX *pCreateDomainShaderExArgs, __out ID3D11DomainShader **ppDomainShader); #endif //defined(__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE) ) typedef struct NvAPI_D3D11_CREATE_PIXEL_SHADER_EX_V1 { UINT version; NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC } NvAPI_D3D11_CREATE_PIXEL_SHADER_EX_V1; #define NVAPI_D3D11_CREATEPIXELSHADEREX_VER_1 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_PIXEL_SHADER_EX_V1, 1) typedef struct NvAPI_D3D11_CREATE_PIXEL_SHADER_EX_V2 { UINT version; // Always use NVAPI_D3D11_CREATEPIXELSHADEREX_VERSION NvU32 NumCustomSemantics; // Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics NV_CUSTOM_SEMANTIC *pCustomSemantics; // pointer to array of NV_CUSTOM_SEMANTIC NvU32 bEnableSuperSamplingPredicationForVRS : 1; // This enables sampling within a pixel for SuperSampling mode of Variable Rate Shading for relevant attributes tagged with "sample" modifier NvU32 bEnableSuperSamplingPredicationForVRSAllAttributes : 1; // This enables sampling within a pixel for SuperSampling mode of Variable Rate Shading for all relevant attributes NvU32 reserved : 30; // Reserved for further use } NvAPI_D3D11_CREATE_PIXEL_SHADER_EX_V2; typedef NvAPI_D3D11_CREATE_PIXEL_SHADER_EX_V2 NvAPI_D3D11_CREATE_PIXEL_SHADER_EX; #define NVAPI_D3D11_CREATEPIXELSHADEREX_VER_2 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_PIXEL_SHADER_EX_V2, 2) #define NVAPI_D3D11_CREATEPIXELSHADEREX_VERSION NVAPI_D3D11_CREATEPIXELSHADEREX_VER_2 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreatePixelShaderEx_2 // //! \fn NvAPI_D3D11_CreatePixelShaderEx_2 //! //! DESCRIPTION: This function allows us to extend the creation of pixel shaders with extra bits //! of functionality. //! //! The first parameters are identical to ID3D11Device::CreatePixelShader() //! so please refer to its documentation for their usage. //! //! The new parameter are custom semantics which allow setting of custom semantic variables //! in the shader //! //! This function is free-threaded create compatible i.e. it can be called from a different thread //! than the one calling immediate device setstate functions. //! //! \since Release: 410 //! //! \param [in] pDevice The device pointer //! \param [in] pShaderBytecode A pointer to the compiled shader. //! \param [in] BytecodeLength Size of the compiled domain shader. //! \param [in] pClassLinkage A pointer to a class linkage interface. Can be NULL. //! \param [in] NumCustomSemantics Number of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics //! \param [in] pCustomSemantics pointer to array of NV_CUSTOM_SEMANTIC //! \param [out] ppPixelShader Address of a pointer to a ID3D11PixelShader interface. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreatePixelShaderEx_2(__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __in const NvAPI_D3D11_CREATE_PIXEL_SHADER_EX *pCreatePixelShaderExArgs, __out ID3D11PixelShader **ppPixelShader); #endif //defined(__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) && (!defined(CINTERFACE)) typedef enum _NV_FASTGS_FLAGS { NV_FASTGS_USE_VIEWPORT_MASK = 0x01, // Causes SV_ViewportArrayIndex value to be interpreted as a bitmask of viewports to broadcast to. NV_FASTGS_OFFSET_RT_INDEX_BY_VP_INDEX = 0x02, // Causes SV_RenderTargetArrayIndex value to be offset by the viewport index when broadcasting. NV_FASTGS_STRICT_API_ORDER = 0x04, // Causes broadcast primitives to be rendered strictly in API order (slow). // By default, primitives may be batched per viewport to improve performance. } NV_FASTGS_FLAGS; #endif //defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) && (!defined(CINTERFACE)) #if defined (__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE)) struct NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC_V1 { NvU32 version; // ALWAYS == NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER NvU32 flags; // A combination of flags from NV_FASTGS_FLAGS NvAPI_D3D11_SWIZZLE_MODE *pCoordinateSwizzling; // [optional] Array of 16 coordinate swizzle modes, one per viewport. NULL if not used. // The output x, y, z, and w coordinates of all vertices can be set to any of the coordinates or their // negated versions i.e. {x, y, z, w, -x, -y, -z, -w}. Coordinates are swizzled before any viewport // operation occurs i.e. before frustum clipping, scaling, and viewport clipping. And after // last of vertex/tesselation/geometry shader stage, stream-out and viewport broadcast expansion (see NV_FASTGS_USE_VIEWPORT_MASK) // pCoordinateSwizzling[i] sets the swizzle-mode of each component for viewport i. // See NV_SWIZZLE_MODE for values of allowed swizzle modes. // See NV_SWIZZLE_OFFSET for bit offset from where NV_SWIZZLE_MODE to be set for each component. // For example : // 1. To set swizzle for viewport 0 such that - w and z are unchanged and values of x and y are swapped : // pCoordinateSwizzling[0] = (NV_SWIZZLE_POS_W << NV_SWIZZLE_OFFSET_W) | // (NV_SWIZZLE_POS_Z << NV_SWIZZLE_OFFSET_Z) | // (NV_SWIZZLE_POS_X << NV_SWIZZLE_OFFSET_Y) | // (NV_SWIZZLE_POS_Y << NV_SWIZZLE_OFFSET_X); // 2. To set swizzle for viewport 0 such that - w, z and y are unchanged and value of x is negated : // pCoordinateSwizzling[0] = (NV_SWIZZLE_POS_W << NV_SWIZZLE_OFFSET_W) | // (NV_SWIZZLE_POS_Z << NV_SWIZZLE_OFFSET_Z) | // (NV_SWIZZLE_POS_Y << NV_SWIZZLE_OFFSET_Y) | // (NV_SWIZZLE_NEG_X << NV_SWIZZLE_OFFSET_X); // Need to set some valid combination of swizzle-modes for all viewports, irrespective of whether that viewport is set. // Invalid swizzle-mode for any viewport (even if that viewport is not set) may result in removal of device. }; #define NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER1 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC_V1, 1) #define NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER1 typedef NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC_V1 NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC; //////////////////////////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreateFastGeometryShaderExplicit // //! \fn NvAPI_D3D11_CreateFastGeometryShaderExplicit //! //! DESCRIPTION: This function will create a fast geometry shader written using an "explicit" //! coding style, rather than converting a standard GS. For the explicit coding //! style, the GS must be written with maxvertexcount(1), and must pass-through //! input vertex 0 to the output without modification. //! //! Additional per-primitive outputs may also be computed and written to the single //! output vertex. If these outputs are read by the pixel shader, they must be //! declared with the "nointerpolation" attribute in the PS input signature; //! otherwise, visual corruption may occur. Also, unlike D3D API, there is no guarantee //! that pixel shader will get the default value of an attribute if that attribute is not written //! by the earlier shader stage in the pipeline. //! //! The first four parameters are identical to ID3D11Device::CreateGeometryShader(), //! so please refer to its documentation for their usage. //! //! This function is free-threaded create compatible i.e. it can be called from a different thread //! than the one calling immediate device setstate functions. //! //! \since Release: //! //! \param [in] pDevice The device pointer //! \param [in] pShaderBytecode A pointer to the compiled shader. //! \param [in] BytecodeLength Size of the compiled geometry shader. //! \param [in] pClassLinkage A pointer to a class linkage interface. Can be NULL. //! \param [in] pCreateFastGSArgs A pointer to a NvAPI_D3D11_CREATE_FASTGS_EXPLICIT struct. //! \param [out] ppGeometryShader Address of a pointer to a ID3D11GeometryShader interface. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. // //////////////////////////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateFastGeometryShaderExplicit(__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __in const NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC *pCreateFastGSArgs, __out ID3D11GeometryShader **ppGeometryShader); #endif //defined(__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE) ) //////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreateFastGeometryShader // //! \fn NvAPI_D3D11_CreateFastGeometryShader //! //! DESCRIPTION: This function will convert a regular geometry shader into a fast GS variant if possible. //! It will not do any validation regarding the compatibility of the resulting fast GS with any //! Pixel shader. The validation has to be done by the application manually. //! //! The parameters are identical to ID3D11Device::CreateGeometryShader() //! so please refer to its documentation for their usage. //! //! If the shader is too complex or is not in adequate form to be converted to fast GS //! this function will simply fail. You should then call ID3D11Device::CreateGeometryShader() //! to create the regular geometry shader. //! //! This function is free-threaded create compatible i.e. it can be called from a different thread //! than the one calling immediate device setstate functions. //! //! \since Release: //! //! \param [in] pDevice The device pointer //! \param [in] pShaderBytecode A pointer to the compiled shader. //! \param [in] BytecodeLength Size of the compiled geometry shader. //! \param [in] pClassLinkage A pointer to a class linkage interface. Can be NULL. //! \param [out] ppGeometryShader Address of a pointer to a ID3D11GeometryShader interface. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateFastGeometryShader(__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __out ID3D11GeometryShader **ppGeometryShader); #endif //defined(__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) typedef struct NvAPI_D3D11_VIEWPORT_EX { // D3D11_VIEWPORT member variables FLOAT TopLeftX; FLOAT TopLeftY; FLOAT Width; FLOAT Height; FLOAT MinDepth; FLOAT MaxDepth; // NvAPI_D3D11_VIEWPORT_EX specific member variables bool bUseSubpixelBits; // Define the number of bits used for sub-pixel snap. 8 is standard. // The rest is integer pixel coordinate. Leaving fewer bits than necessary to represent // entire range of int(width) or int(height) produces in undefined results. UINT NumSubpixelBits; }NvAPI_D3D11_VIEWPORT_PER_VIEWPORT_EX; typedef struct NvAPI_D3D11_VIEWPORTS_EX_V1 { UINT version; // ALWAYS == NVAPI_D3D11_RSSETVIEWPORTS_EX_VERSION UINT NumViewports; const NvAPI_D3D11_VIEWPORT_EX *pViewports; }NvAPI_D3D11_VIEWPORTS_EX_V1; typedef NvAPI_D3D11_VIEWPORTS_EX_V1 NvAPI_D3D11_VIEWPORTS_EX; #define NVAPI_D3D11_RSSETVIEWPORTS_EX_VERSION MAKE_NVAPI_VERSION(NvAPI_D3D11_VIEWPORTS_EX, 1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_RSSetViewports // //! \since Release: 375 //! //! \code //! DESCRIPTION: This function is an extension of ID3D11DeviceContext::RSSetViewports with additional per viewport properties //! //! \param [in] pDeviceOrContext The device or device context to set the viewport //! \param [in] NumViewports Number of viewports to bind //! \param [in] pViewports Viewport declaration of type NVAPI_D3D11_VIEWPORT_EX //! //! //! \return ::NVAPI_OK if the call succeeds. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_RSSetViewportsEx(__in IUnknown *pDevice, __in const NvAPI_D3D11_VIEWPORTS_EX *pViewportsExArgs); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_DecompressView // //! \code //! DESCRIPTION: This function is used to decompress a surface using the currently bound programmable sample positions. //! //! This is needed: //! - When writing to a surface in a region previously rendered by different sample positions and no clear was done. //! - When reading a surface in a shader that was rendered using non-standard sample positions. //! - When copying from a surface that was rendered using non-standard sample positions. //! //! \param [in] pDevice Current d3d11 device //! \param [in] pDeviceContext Current d3d11 device context //! \param [in] pView Current view to decompress //! //! //! \return ::NVAPI_OK if the call succeeds. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_DecompressView(__in ID3D11Device* pDevice, __in ID3D11DeviceContext *pDeviceContext, __in ID3D11View* pView); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined (__cplusplus) && defined(__d3d12_h__) //! Enum for CreatePSO extensions. //! \ingroup dx //! constant 5 is assigned to two members of this enum becuase the first member name contains a typo: EXTNENSION. Please use the correctly-spelled enumerator. typedef enum _NV_PSO_EXTENSION { NV_PSO_RASTER_EXTENSION = 0, NV_PSO_REQUEST_FASTGS_EXTENSION = 1, NV_PSO_GEOMETRY_SHADER_EXTENSION = 2, NV_PSO_ENABLE_DEPTH_BOUND_TEST_EXTENSION = 3, NV_PSO_EXPLICIT_FASTGS_EXTENSION = 4, NV_PSO_SET_SHADER_EXTNENSION_SLOT_AND_SPACE = 5, NV_PSO_SET_SHADER_EXTENSION_SLOT_AND_SPACE = 5, NV_PSO_VERTEX_SHADER_EXTENSION = 6, NV_PSO_DOMAIN_SHADER_EXTENSION = 7, NV_PSO_HULL_SHADER_EXTENSION = 9, NV_PSO_MESH_TASK_SHADER_EXTENSION = 10, NV_PSO_MESH_SHADER_EXTENSION = 11, NV_PSO_REPRESENTATIVE_PIXEL_TEST_EXTENSION = 13, }NV_PSO_EXTENSION; struct NVAPI_D3D12_PSO_EXTENSION_DESC_V1 { NvU32 baseVersion; //1 it needs to match N, in non-TIR it needs to match RT sample count. Ignored if ForcePerSampleInterlock is set NvU8 SamplePositionsX[16]; // 1). // //! \since Release: 470 // /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_SetCWDRefcount // //! \since Release: 470 // //! \code //! DESCRIPTION: Set CWD refcount value. These Refcount values can be used to control how //! and when CTAs of a task is launched (See NvAPI_D3D12_CreateHLSLTask) //! //! \param [in] pCommandList pointer to command list //! \param [in] index index of the refcount to set //! \param [in] value value to set //! //! SUPPORTED OS: Windows 10 //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_SetCWDRefcount(__in ID3D12GraphicsCommandList* pCommandList, __in NvU16 index, __in NvU16 value); #pragma pack(push, 4) struct NVAPI_D3D12_TASK_DESC { bool UseRefcount; // whether the task uses refcounts NvU16 RefcountIndex; // The index of the refcount to use NvU16 RefcountDebitAmount; // How much to decrement the refcount on every CTA launch NvU32 InstanceCountPerCta; // How many entries (DispatchTasks 'Instances') to accumulate before launching a CTA of the task. Must be a power of 2 // Default parameters NVAPI_D3D12_TASK_DESC() : UseRefcount(false), RefcountIndex(0), RefcountDebitAmount(0), InstanceCountPerCta(1) { } }; #pragma pack(pop) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_CreateHLSLTask // //! \since Release: 470 // //! \code //! DESCRIPTION: Creates a task object from the given compute shader bytecode using the given local root signature //! //! //! \param [in] pDevice pointer to ID3D12Device object //! \param [in] pRootSignature root signature to use for the compue shader //! \param [in] nodeMask GPU mask for which the task is to be created //! \param [in] pShaderByteCode A pointer to bytecode of the compute shader //! \param [in] numExtensions Number of extensions //! \param [in] ppExtensions Array of NV extensions to be applied when creating the compute shader //! \param [in] pTaskDesc pointer to structure containing task paramaters //! \param [out] phTask A pointer to memory that receives the handle to the created task //! \param [out] phTaskGpuHandle A pointer to memory that receives the GPU handle to the created task (used in shader extensions) //! //! SUPPORTED OS: Windows 10 //! //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_CreateHLSLTask(__in ID3D12Device* pDevice, __in ID3D12RootSignature* pRootSignature, __in NvU32 nodeMask, __in D3D12_SHADER_BYTECODE* pShaderByteCode, __in NvU32 numExtensions, __in const NVAPI_D3D12_PSO_EXTENSION_DESC** ppExtensions, __in const NVAPI_D3D12_TASK_DESC* pTaskDesc, __out NVDX_ObjectHandle* phTask, __out NVDX_ObjectHandle* phTaskGpuHandle); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_BindRootArgsToTask // //! \since Release: 470 // //! \code //! DESCRIPTION: Binds the given root table to the task. The layout of root table corrosponds to the root signature //! used when creating the task, and the application is expected to fill it similar to ray tracing pipeline's shader record table. //! Note that calling this function is mandatory for all the tasks before launching them, even if they don't require any local root table bindings. //! //! \param [in] pCommandList pointer to command list //! \param [in] hTask handle of the task //! \param [in] rootTableVA VA of the root table in GPU memory //! //! SUPPORTED OS: Windows 10 //! //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_BindRootArgsToTask(__in ID3D12GraphicsCommandList* pCommandList, __in NVDX_ObjectHandle hTask, __in D3D12_GPU_VIRTUAL_ADDRESS rootTableVA); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_DispatchHLSLTasks // //! \since Release: 470 // //! \code //! DESCRIPTION: Launches a graph of tasks //! hTask is the first task (first producer) in the graph //! //! \param [in] pCommandList pointer to command list where the initialization is done //! \param [in] hTask the first task (first producer) in the graph //! \param [in] numInstances no. of CTAs of hTask to launch //! //! SUPPORTED OS: Windows 10 //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_DispatchHLSLTasks(__in ID3D12GraphicsCommandList* pCommandList, __in NVDX_ObjectHandle hTask, __in NvU32 numInstances); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_DestroyHLSLTask // //! \since Release: 470 // //! \code //! DESCRIPTION: destroy task created using NvAPI_D3D12_CreateHLSLTask //! //! \param [in] pDevice pointer to ID3D12Device //! \param [in] hTask the task to destroy //! //! SUPPORTED OS: Windows 10 //! //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_DestroyHLSLTask(__in ID3D12Device* pDevice, __in NVDX_ObjectHandle hTask); #endif //defined(__cplusplus) && defined(__d3d12_h__) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // MetaCommands common defines // //! \since Release: 400 // /////////////////////////////////////////////////////////////////////////////// #pragma pack(push, 4) enum NV_D3D_GRAPHICS_STATES { NV_D3D_GRAPHICS_STATE_NONE = 0 , NV_D3D_GRAPHICS_STATE_IA_VERTEX_BUFFERS = (1 << 0), NV_D3D_GRAPHICS_STATE_IA_INDEX_BUFFER = (1 << 1), NV_D3D_GRAPHICS_STATE_IA_PRIMITIVE_TOPOLOGY = (1 << 2), NV_D3D_GRAPHICS_STATE_DESCRIPTOR_HEAP = (1 << 3), NV_D3D_GRAPHICS_STATE_GRAPHICS_ROOT_SIGNATURE = (1 << 4), NV_D3D_GRAPHICS_STATE_COMPUTE_ROOT_SIGNATURE = (1 << 5), NV_D3D_GRAPHICS_STATE_RS_VIEWPORTS = (1 << 6), NV_D3D_GRAPHICS_STATE_RS_SCISSOR_RECTS = (1 << 7), NV_D3D_GRAPHICS_STATE_PREDICATION = (1 << 8), NV_D3D_GRAPHICS_STATE_OM_RENDER_TARGETS = (1 << 9), NV_D3D_GRAPHICS_STATE_OM_STENCIL_REF = (1 << 10), NV_D3D_GRAPHICS_STATE_OM_BLEND_FACTOR = (1 << 11), NV_D3D_GRAPHICS_STATE_PIPELINE_STATE = (1 << 12), NV_D3D_GRAPHICS_STATE_SO_TARGETS = (1 << 13), NV_D3D_GRAPHICS_STATE_OM_DEPTH_BOUNDS = (1 << 14), NV_D3D_GRAPHICS_STATE_SAMPLE_POSITIONS = (1 << 15), NV_D3D_GRAPHICS_STATE_VIEW_INSTANCE_MASK = (1 << 16), }; struct NVAPI_META_COMMAND_DESC { GUID Id; LPCWSTR Name; // states that the initialization and execution of the metacommand will dirty NV_D3D_GRAPHICS_STATES InitializationDirtyState; NV_D3D_GRAPHICS_STATES ExecutionDirtyState; }; typedef NvU64 NV_META_COMMAND_BOOL; #define NV_META_COMMAND_MAX_TENSOR_DIM 5 // dimensions (Size and Stride) are always indexed this way, irrespective of NV_META_COMMAND_LAYOUT // For DimensionCount = 5: N, C, D, H, W // For DimensionCount = 4: N, C, H, W #define NV_META_COMMAND_ACTIVATION_MAX_PARAMS 2 #if __cplusplus >= 201103L #define compile_time_assert(b) static_assert((b), "Compile time assertion failed: "#b) enum NV_META_COMMAND_TENSOR_DATA_TYPE : NvU64 { NV_META_COMMAND_TENSOR_DATA_TYPE_FLOAT32, NV_META_COMMAND_TENSOR_DATA_TYPE_FLOAT16, NV_META_COMMAND_TENSOR_DATA_TYPE_UINT32, NV_META_COMMAND_TENSOR_DATA_TYPE_COUNT, }; enum NV_META_COMMAND_TENSOR_LAYOUT : NvU64 { NV_META_COMMAND_TENSOR_LAYOUT_UNKNOWN, // opaque HW-native layout NV_META_COMMAND_TENSOR_LAYOUT_STANDARD, // NCDHW - planar / row major layout (width is inner-most dimension, batch-size N is the outermost) NV_META_COMMAND_TENSOR_LAYOUT_COUNT, }; enum NV_META_COMMAND_TENSOR_FLAGS : NvU64 { NV_META_COMMAND_TENSOR_FLAG_NONE = 0, NV_META_COMMAND_TENSOR_FLAG_DATA_STATIC = 0x1, // data pointed by the tensor is static (i.e, won't be modified after command list recording) }; enum NV_META_COMMAND_PRECISION : NvU64 { NV_META_COMMAND_PRECISION_FLOAT32, NV_META_COMMAND_PRECISION_FLOAT16, NV_META_COMMAND_PRECISION_MUL_FLOAT16_ADD_FLOAT32, NV_META_COMMAND_PRECISION_COUNT, }; struct NV_META_COMMAND_TENSOR_DESC { NV_META_COMMAND_TENSOR_DATA_TYPE DataType; NV_META_COMMAND_TENSOR_LAYOUT Layout; NV_META_COMMAND_TENSOR_FLAGS Flags; NvU64 DimensionCount; // 4 or 5 NvU64 Size[NV_META_COMMAND_MAX_TENSOR_DIM]; NvU64 Stride[NV_META_COMMAND_MAX_TENSOR_DIM]; // only used with NV_META_COMMAND_TENSOR_LAYOUT_STANDARD }; enum NV_META_COMMAND_ACTIVATION_FUNCTION : NvU64 { NV_META_COMMAND_ACTIVATION_FUNCTION_ELU, NV_META_COMMAND_ACTIVATION_FUNCTION_HARDMAX, NV_META_COMMAND_ACTIVATION_FUNCTION_HARD_SIGMOID, NV_META_COMMAND_ACTIVATION_FUNCTION_IDENTITY, NV_META_COMMAND_ACTIVATION_FUNCTION_LEAKY_RELU, NV_META_COMMAND_ACTIVATION_FUNCTION_LINEAR, NV_META_COMMAND_ACTIVATION_FUNCTION_LOG_SOFTMAX, NV_META_COMMAND_ACTIVATION_FUNCTION_PARAMETERIZED_RELU, NV_META_COMMAND_ACTIVATION_FUNCTION_PARAMETRIC_SOFTPLUS, NV_META_COMMAND_ACTIVATION_FUNCTION_RELU, NV_META_COMMAND_ACTIVATION_FUNCTION_SCALED_ELU, NV_META_COMMAND_ACTIVATION_FUNCTION_SCALED_TANH, NV_META_COMMAND_ACTIVATION_FUNCTION_SIGMOID, NV_META_COMMAND_ACTIVATION_FUNCTION_SOFTMAX, NV_META_COMMAND_ACTIVATION_FUNCTION_SOFTPLUS, NV_META_COMMAND_ACTIVATION_FUNCTION_SOFTSIGN, NV_META_COMMAND_ACTIVATION_FUNCTION_TANH, NV_META_COMMAND_ACTIVATION_FUNCTION_THRESHOLDED_RELU, NV_META_COMMAND_ACTIVATION_FUNCTION_COUNT, }; struct NV_META_COMMAND_ACTIVATION_DESC { NV_META_COMMAND_ACTIVATION_FUNCTION Function; float Params[NV_META_COMMAND_ACTIVATION_MAX_PARAMS]; }; #else #define compile_time_assert(b) typedef char compile_time_assertion_failed_in_line_##__LINE__[(b)?1:-1] enum NV_META_COMMAND_TENSOR_DATA_TYPE { NV_META_COMMAND_TENSOR_DATA_TYPE_FLOAT32, NV_META_COMMAND_TENSOR_DATA_TYPE_FLOAT16, NV_META_COMMAND_TENSOR_DATA_TYPE_UINT32, NV_META_COMMAND_TENSOR_DATA_TYPE_COUNT, }; enum NV_META_COMMAND_TENSOR_LAYOUT { NV_META_COMMAND_TENSOR_LAYOUT_UNKNOWN, // opaque HW-native layout NV_META_COMMAND_TENSOR_LAYOUT_STANDARD, // NCDHW - planar / row major layout (width is inner-most dimension, batch-size N is the outermost) NV_META_COMMAND_TENSOR_LAYOUT_COUNT, }; enum NV_META_COMMAND_TENSOR_FLAGS { NV_META_COMMAND_TENSOR_FLAG_NONE = 0, NV_META_COMMAND_TENSOR_FLAG_DATA_STATIC = 0x1, // data pointed by the tensor is static (i.e, won't be modified after command list recording) }; enum NV_META_COMMAND_PRECISION { NV_META_COMMAND_PRECISION_FLOAT32, NV_META_COMMAND_PRECISION_FLOAT16, NV_META_COMMAND_PRECISION_MUL_FLOAT16_ADD_FLOAT32, NV_META_COMMAND_PRECISION_COUNT, }; struct NV_META_COMMAND_TENSOR_DESC { NvU64 DataType; // NV_META_COMMAND_TENSOR_DATA_TYPE NvU64 Layout; // NV_META_COMMAND_TENSOR_LAYOUT NvU64 Flags; // NV_META_COMMAND_TENSOR_FLAGS NvU64 DimensionCount; // 4 or 5 NvU64 Size[NV_META_COMMAND_MAX_TENSOR_DIM]; NvU64 Stride[NV_META_COMMAND_MAX_TENSOR_DIM]; // only used with NV_META_COMMAND_TENSOR_LAYOUT_STANDARD }; enum NV_META_COMMAND_ACTIVATION_FUNCTION { NV_META_COMMAND_ACTIVATION_FUNCTION_ELU, NV_META_COMMAND_ACTIVATION_FUNCTION_HARDMAX, NV_META_COMMAND_ACTIVATION_FUNCTION_HARD_SIGMOID, NV_META_COMMAND_ACTIVATION_FUNCTION_IDENTITY, NV_META_COMMAND_ACTIVATION_FUNCTION_LEAKY_RELU, NV_META_COMMAND_ACTIVATION_FUNCTION_LINEAR, NV_META_COMMAND_ACTIVATION_FUNCTION_LOG_SOFTMAX, NV_META_COMMAND_ACTIVATION_FUNCTION_PARAMETERIZED_RELU, NV_META_COMMAND_ACTIVATION_FUNCTION_PARAMETRIC_SOFTPLUS, NV_META_COMMAND_ACTIVATION_FUNCTION_RELU, NV_META_COMMAND_ACTIVATION_FUNCTION_SCALED_ELU, NV_META_COMMAND_ACTIVATION_FUNCTION_SCALED_TANH, NV_META_COMMAND_ACTIVATION_FUNCTION_SIGMOID, NV_META_COMMAND_ACTIVATION_FUNCTION_SOFTMAX, NV_META_COMMAND_ACTIVATION_FUNCTION_SOFTPLUS, NV_META_COMMAND_ACTIVATION_FUNCTION_SOFTSIGN, NV_META_COMMAND_ACTIVATION_FUNCTION_TANH, NV_META_COMMAND_ACTIVATION_FUNCTION_THRESHOLDED_RELU, NV_META_COMMAND_ACTIVATION_FUNCTION_COUNT, }; struct NV_META_COMMAND_ACTIVATION_DESC { NvU64 Function; // NV_META_COMMAND_ACTIVATION_FUNCTION float Params[NV_META_COMMAND_ACTIVATION_MAX_PARAMS]; }; #endif struct NV_META_COMMAND_OPTIONAL_TENSOR_DESC : NV_META_COMMAND_TENSOR_DESC { // true when the tensor isn't needed (e.g, bias is optional) NV_META_COMMAND_BOOL IsNull; }; struct NV_META_COMMAND_OPTIONAL_ACTIVATION_DESC : NV_META_COMMAND_ACTIVATION_DESC { // true when activation isn't needed NV_META_COMMAND_BOOL IsNull; }; enum NV_META_COMMAND_PADDING_MODE { NV_META_COMMAND_PADDING_ZEROS, NV_META_COMMAND_PADDING_MIRROR, NV_META_COMMAND_PADDING_CLAMP, NV_META_COMMAND_PADDING_CONSTANT, NV_META_COMMAND_PADDING_COUNT, }; struct NV_META_COMMAND_PADDING_DESC { NV_META_COMMAND_PADDING_MODE Mode; // used with NV_META_COMMAND_PADDING_CONSTANT float ConstantPadVal; }; // use this enum to query resource sizes using GetRequiredParameterResourceSize() call enum NV_META_COMMAND_RESOURCE_TYPE { NV_META_COMMAND_RESOURCE_TYPE_INPUT = 0, NV_META_COMMAND_RESOURCE_TYPE_OUTPUT = 1, NV_META_COMMAND_RESOURCE_TYPE_FILTER = 2, NV_META_COMMAND_RESOURCE_TYPE_WEIGHT = 2, NV_META_COMMAND_RESOURCE_TYPE_BIAS = 3, NV_META_COMMAND_RESOURCE_TYPE_MATRIX_A = 0, NV_META_COMMAND_RESOURCE_TYPE_MATRIX_B = 2, NV_META_COMMAND_RESOURCE_TYPE_MATRIX_C = 3, NV_META_COMMAND_RESOURCE_TYPE_PERSISTENT = 4, NV_META_COMMAND_RESOURCE_TYPE_TEMPORARY = 5, }; // Extended version of convolution operation that performs: // // y = act ( alpha1 * conv(x) + alpha2 * z + bias ) // // alpha1 and alpha2 are either scalars or if PerChannelScaling is TRUE, they are vectors of // same dimension as the bias tensor (vector of size equal to number of output channels) // // z (SkipConnectionResource) has same dimension as output tensor y (OutputResource). static const GUID MetaCommand_ConvolutionEx = { 0xa7666f1e, 0x9c55, 0x47ee, { 0x9e, 0xb3, 0xe1, 0x62, 0x0, 0x92, 0xd1, 0xe9 } }; #define NV_META_COMMAND_NUM_SPATIAL_DIM 3 // D, H, W when DimensionCount is 3 // H, W when DimensionCount is 2 #if __cplusplus >= 201103L enum NV_META_COMMAND_CONVOLUTION_DIRECTION : NvU64 { NV_META_COMMAND_CONVOLUTION_DIRECTION_FORWARD, // Corresponds to regular Convolution NV_META_COMMAND_CONVOLUTION_DIRECTION_BACKWARD, // Corresponds to ConvolutionTranspose NV_META_COMMAND_CONVOLUTION_DIRECTION_COUNT, }; enum NV_META_COMMAND_CONVOLUTION_MODE : NvU64 { NV_META_COMMAND_CONVOLUTION_MODE_CONVOLUTION, NV_META_COMMAND_CONVOLUTION_MODE_CROSS_CORRELATION, NV_META_COMMAND_CONVOLUTION_MODE_COUNT, }; struct NV_META_COMMAND_CREATE_CONVOLUTION_EX_DESC { // Descriptor of the input tensor NV_META_COMMAND_TENSOR_DESC DescIn; // Descriptor of the tensor acting as the filter kernel NV_META_COMMAND_TENSOR_DESC DescFilter; // Descriptor of the optional bias tensor NV_META_COMMAND_OPTIONAL_TENSOR_DESC DescBias; // Descriptor of the output tensor NV_META_COMMAND_TENSOR_DESC DescOut; // Convolution mode (CROSS_CORRELATION or CONVOLUTION) NV_META_COMMAND_CONVOLUTION_MODE Mode; // Convolution direction (FORWARD or BACKWARD) NV_META_COMMAND_CONVOLUTION_DIRECTION Direction; // Precision at which convolution is done NV_META_COMMAND_PRECISION Precision; // Optional activation function NV_META_COMMAND_OPTIONAL_ACTIVATION_DESC Activation; // Padding mode (only used when output tensor dimensions are different from input tensor dimensions) NV_META_COMMAND_PADDING_DESC Padding; // enables per channel scaling i.e, use Alpha1Resource and Alpha2Resource // instead of Alpha1 and Alpha2 below NV_META_COMMAND_BOOL PerChannelScaling; // scaling factors used when PerChannelScaling is FALSE // set Alpha1 = 1.0f, Alpha2 = 0.0f for simple convolutions // that don't need scaling or skip connection float Alpha1; float Alpha2; // Strides for the filter kernel position NvU64 Stride[NV_META_COMMAND_NUM_SPATIAL_DIM]; // The distance per dimension between elements that are multiplied NvU64 Dilation[NV_META_COMMAND_NUM_SPATIAL_DIM]; // Padding at the start of each dimension NvU64 StartPadding[NV_META_COMMAND_NUM_SPATIAL_DIM]; // Padding at the end of each dimension NvU64 EndPadding[NV_META_COMMAND_NUM_SPATIAL_DIM]; // Number of dimensions to which convolution occurs (2 or 3) NvU64 DimensionCount; // Number of channel groups convolved independently NvU64 GroupCount; }; #else enum NV_META_COMMAND_CONVOLUTION_DIRECTION { NV_META_COMMAND_CONVOLUTION_DIRECTION_FORWARD, // Corresponds to regular Convolution NV_META_COMMAND_CONVOLUTION_DIRECTION_BACKWARD, // Corresponds to ConvolutionTranspose NV_META_COMMAND_CONVOLUTION_DIRECTION_COUNT, }; enum NV_META_COMMAND_CONVOLUTION_MODE { NV_META_COMMAND_CONVOLUTION_MODE_CONVOLUTION, NV_META_COMMAND_CONVOLUTION_MODE_CROSS_CORRELATION, NV_META_COMMAND_CONVOLUTION_MODE_COUNT, }; struct NV_META_COMMAND_CREATE_CONVOLUTION_EX_DESC { // Descriptor of the input tensor NV_META_COMMAND_TENSOR_DESC DescIn; // Descriptor of the tensor acting as the filter kernel NV_META_COMMAND_TENSOR_DESC DescFilter; // Descriptor of the optional bias tensor NV_META_COMMAND_OPTIONAL_TENSOR_DESC DescBias; // Descriptor of the output tensor NV_META_COMMAND_TENSOR_DESC DescOut; // Convolution mode (CROSS_CORRELATION or CONVOLUTION) NvU64 Mode; // NV_META_COMMAND_CONVOLUTION_MODE // Convolution direction (FORWARD or BACKWARD) NvU64 Direction; // NV_META_COMMAND_CONVOLUTION_DIRECTION // Precision at which convolution is done NvU64 Precision; // NV_META_COMMAND_PRECISION // Optional activation function NV_META_COMMAND_OPTIONAL_ACTIVATION_DESC Activation; // Padding mode (only used when output tensor dimensions are different from input tensor dimensions) NV_META_COMMAND_PADDING_DESC Padding; // enables per channel scaling i.e, use Alpha1Resource and Alpha2Resource // instead of Alpha1 and Alpha2 below NV_META_COMMAND_BOOL PerChannelScaling; // scaling factors used when PerChannelScaling is FALSE // set Alpha1 = 1.0f, Alpha2 = 0.0f for simple convolutions // that don't need scaling or skip connection float Alpha1; float Alpha2; // Strides for the filter kernel position NvU64 Stride[NV_META_COMMAND_NUM_SPATIAL_DIM]; // The distance per dimension between elements that are multiplied NvU64 Dilation[NV_META_COMMAND_NUM_SPATIAL_DIM]; // Padding at the start of each dimension NvU64 StartPadding[NV_META_COMMAND_NUM_SPATIAL_DIM]; // Padding at the end of each dimension NvU64 EndPadding[NV_META_COMMAND_NUM_SPATIAL_DIM]; // Number of dimensions to which convolution occurs (2 or 3) NvU64 DimensionCount; // Number of channel groups convolved independently NvU64 GroupCount; }; #endif // Fused Convolution variants // supported combinations right now are: // - Convolution + Max Pooling (also optionally outputs pre-pool data) // - 2x2 upsample + (optional) residual add + Convolution // // other combinations may be exposed in future static const GUID MetaCommand_ConvolutionExFused = { 0xe1b112eb, 0xdecd, 0x4ff6,{ 0x85, 0xbb, 0x1f, 0xe, 0x3a, 0xb0, 0x4, 0x14 } }; enum NV_META_COMMAND_CONVOLUTION_POOL_MODE { NV_META_COMMAND_CONVOLUTION_POOL_MODE_NONE, NV_META_COMMAND_CONVOLUTION_POOL_MODE_REDUCTION_MAX, NV_META_COMMAND_CONVOLUTION_POOL_MODE_REDUCTION_AVG, NV_META_COMMAND_CONVOLUTION_POOL_MODE_REDUCTION_MIN, NV_META_COMMAND_CONVOLUTION_POOL_MODE_COUNT, }; enum NV_META_COMMAND_CONVOLUTION_UPSAMPLE_MODE { NV_META_COMMAND_CONVOLUTION_UPSAMPLE_MODE_NONE, NV_META_COMMAND_CONVOLUTION_UPSAMPLE_MODE_REPLICATE, NV_META_COMMAND_CONVOLUTION_UPSAMPLE_MODE_BILINEAR, NV_META_COMMAND_CONVOLUTION_UPSAMPLE_MODE_COUNT, }; enum NV_META_COMMAND_CONVOLUTION_SKIP_MODE { NV_META_COMMAND_CONVOLUTION_SKIP_MODE_NONE, NV_META_COMMAND_CONVOLUTION_SKIP_MODE_ADD, NV_META_COMMAND_CONVOLUTION_SKIP_MODE_CONCAT, NV_META_COMMAND_CONVOLUTION_SKIP_MODE_COUNT, }; struct NV_META_COMMAND_CONVOLUTION_FUSE_DESC { NV_META_COMMAND_CONVOLUTION_POOL_MODE PoolMode; NV_META_COMMAND_CONVOLUTION_UPSAMPLE_MODE UpsampleMode; NV_META_COMMAND_CONVOLUTION_SKIP_MODE SkipMode; NV_META_COMMAND_BOOL OutputPrepool; // used with NV_META_COMMAND_CONVOLUTION_POOL_MODE }; // uses same structures for init and execute descriptors // SkipConnectionResource is used to specify the resource for pre-pool data or residual add struct NV_META_COMMAND_CREATE_CONVOLUTION_EX_FUSED_DESC : NV_META_COMMAND_CREATE_CONVOLUTION_EX_DESC { NV_META_COMMAND_CONVOLUTION_FUSE_DESC FuseDesc; }; // make sure structure sizes match what the driver assumes compile_time_assert(sizeof(NV_META_COMMAND_TENSOR_DESC) == 112); compile_time_assert(sizeof(NV_META_COMMAND_CREATE_CONVOLUTION_EX_DESC) == 640); compile_time_assert(sizeof(NV_META_COMMAND_CONVOLUTION_FUSE_DESC) == 20); compile_time_assert(sizeof(NV_META_COMMAND_CREATE_CONVOLUTION_EX_FUSED_DESC) == 660); // GEMM (General matrix multiply) // // Y = alpha * t(A) * t(B) + beta * C, // // where t is a matrix transform option // // If C is null, and beta is non-zero, the output // matrix is used as C matrix. i.e, the operation performed is: // Y = alpha * t(A) * t(B) + beta * Y // static const GUID MetaCommand_Gemm = { 0x8f9ff059, 0xfe72, 0x488e, { 0xa0, 0x66, 0xb1, 0x4e, 0x79, 0x48, 0xec, 0x8 } }; #if __cplusplus >= 201103L enum NV_META_COMMAND_MATRIX_TRANSFORM : NvU64 { NV_META_COMMAND_MATRIX_TRANSFORM_NONE, NV_META_COMMAND_MATRIX_TRANSFORM_TRANSPOSE, NV_META_COMMAND_MATRIX_TRANSFORM_COUNT, }; struct NV_META_COMMAND_CREATE_GEMM_DESC { NV_META_COMMAND_TENSOR_DESC DescA; NV_META_COMMAND_TENSOR_DESC DescB; NV_META_COMMAND_OPTIONAL_TENSOR_DESC DescC; NV_META_COMMAND_TENSOR_DESC DescOut; NV_META_COMMAND_PRECISION Precision; NV_META_COMMAND_MATRIX_TRANSFORM TransA; NV_META_COMMAND_MATRIX_TRANSFORM TransB; float Alpha; float Beta; NV_META_COMMAND_OPTIONAL_ACTIVATION_DESC Activation; }; #else enum NV_META_COMMAND_MATRIX_TRANSFORM { NV_META_COMMAND_MATRIX_TRANSFORM_NONE, NV_META_COMMAND_MATRIX_TRANSFORM_TRANSPOSE, NV_META_COMMAND_MATRIX_TRANSFORM_COUNT, }; struct NV_META_COMMAND_CREATE_GEMM_DESC { NV_META_COMMAND_TENSOR_DESC DescA; NV_META_COMMAND_TENSOR_DESC DescB; NV_META_COMMAND_OPTIONAL_TENSOR_DESC DescC; NV_META_COMMAND_TENSOR_DESC DescOut; NvU64 Precision; // NV_META_COMMAND_PRECISION NvU64 TransA; // NV_META_COMMAND_MATRIX_TRANSFORM NvU64 TransB; // NV_META_COMMAND_MATRIX_TRANSFORM float Alpha; float Beta; NV_META_COMMAND_OPTIONAL_ACTIVATION_DESC Activation; }; #endif #pragma pack(pop) #endif // #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined (__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_EnumerateMetaCommands // //! \since Release: 400 // //! \code //! DESCRIPTION: Enumerates MetaCommands supported on the system //! //! \param [in] pDevice A pointer to D3D11 device. //! \param [in/out] pNumMetaCommands Should be non-null. When the value pointed by pNumMetaCommands is 0 (or when pDescs is NULL), the function returns number of metacommands supported. //! When the value pointed is non-zero, the value indicates number of Metacommand descriptions to be populated in pDescs array. //! \param [out] pDescs Pointer to array where Metacommand descriptions will be returned. Can be null to indicate that the app is querying the number of supported metacommands. //! Otherwise should have enough space to hold *pNumMetaCommands descriptors //! SUPPORTED OS: Windows 10 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_EnumerateMetaCommands(__in ID3D11Device *pDevice, __inout NvU32 *pNumMetaCommands, __out_ecount_opt(*pNumMetaCommands) NVAPI_META_COMMAND_DESC *pDescs); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined (__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreateMetaCommand // //! \since Release: 400 // //! \code //! DESCRIPTION: Creates a MetaCommand object which can be used to execute optimized operations exposed by driver like convolutions. //! //! \param [in] pDevice A pointer to D3D11 device. //! \param [in] CommandId GUID of the operations to perform //! \param [in] pCreationParametersData structure containing all creation parameters for the requested Metacommand //! \param [in] CreationParametersDataSize size of parameter data structure //! \param [out] ppMetaCommand A pointer to memory that receives the pointer to the created MetaCommand object. //! SUPPORTED OS: Windows 10 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! DXGI_ERROR_NOT_SUPPORTED - The requested Metacommand is not supported. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// #pragma pack(push, 4) struct NV_D3D11_META_COMMAND_RESOURCE { union { NVDX_ObjectHandle ResourceHandle; // NVAPI handle of a buffer resource (use NvAPI_D3D11_GetResourceHandle to get this handle) NvU64 unused; // to get correct sturcutre size on 32 bit builds }; NvU64 Offset; // offset within the resource in bytes }; struct NV_D3D11_META_COMMAND_INITIALIZE_CONVOLUTION_EX_DESC { // Persistent resource used as scratch space by driver // it's written at time of init, and read at time of execute // use GetRequiredParameterResourceSize to query its size NV_D3D11_META_COMMAND_RESOURCE PersistentResource; }; struct NV_D3D11_META_COMMAND_EXECUTE_CONVOLUTION_EX_DESC { NV_D3D11_META_COMMAND_RESOURCE InputResource; NV_D3D11_META_COMMAND_RESOURCE FilterResource; NV_D3D11_META_COMMAND_RESOURCE BiasResource; // optional NV_D3D11_META_COMMAND_RESOURCE OutputResource; // Alpha1Resource and Alpha2Resource are used only when // PerChannelScaling is set. Otherwise the scalars Alpha1/Alpha2 are used // should have same dimension as bias NV_D3D11_META_COMMAND_RESOURCE Alpha1Resource; NV_D3D11_META_COMMAND_RESOURCE Alpha2Resource; // optional, same dimension/descriptor as output NV_D3D11_META_COMMAND_RESOURCE SkipConnectionResource; // should point to same memory that was specified at time of init NV_D3D11_META_COMMAND_RESOURCE PersistentResource; // temporary resource used as scratch space by driver // used for both read and write at the time of execute // use GetRequiredParameterResourceSize to query its size NV_D3D11_META_COMMAND_RESOURCE TemporaryResource; }; // make sure structure sizes match what the driver assumes compile_time_assert(sizeof(NV_D3D11_META_COMMAND_INITIALIZE_CONVOLUTION_EX_DESC) == 16); compile_time_assert(sizeof(NV_D3D11_META_COMMAND_EXECUTE_CONVOLUTION_EX_DESC) == 144); struct NV_D3D11_META_COMMAND_INITIALIZE_GEMM_DESC { NV_D3D11_META_COMMAND_RESOURCE PersistentResource; }; struct NV_D3D11_META_COMMAND_EXECUTE_GEMM_DESC { NV_D3D11_META_COMMAND_RESOURCE AResource; NV_D3D11_META_COMMAND_RESOURCE BResource; NV_D3D11_META_COMMAND_RESOURCE CResource; NV_D3D11_META_COMMAND_RESOURCE OutputResource; NV_D3D11_META_COMMAND_RESOURCE PersistentResource; NV_D3D11_META_COMMAND_RESOURCE TemporaryResource; }; // make sure structure sizes match what the driver assumes compile_time_assert(sizeof(NV_D3D11_META_COMMAND_INITIALIZE_GEMM_DESC) == 16); compile_time_assert(sizeof(NV_D3D11_META_COMMAND_EXECUTE_GEMM_DESC) == 96); #pragma pack(pop) DECLARE_INTERFACE_(__declspec(uuid("00BF193A-117B-42BC-BBCD-E964A0EA4F2B"))ID3D11NvMetaCommand_V1, IUnknown) { BEGIN_INTERFACE // *** IUnknown methods *** STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // ** ID3D11NvMetaCommand methods *** // Return size of parameter STDMETHOD(GetRequiredParameterResourceSize)(THIS_ NV_META_COMMAND_RESOURCE_TYPE ResourceType, NvU64 *SizeInBytes) const PURE; END_INTERFACE }; typedef ID3D11NvMetaCommand_V1 ID3D11NvMetaCommand; #define ID3D11NvMetaCommand_VER1 MAKE_NVAPI_VERSION(IID3D11NvMetaCommand_V1, 1) #define ID3D11NvMetaCommand_VER ID3D11NvMetaCommand_VER1 NVAPI_INTERFACE NvAPI_D3D11_CreateMetaCommand(__in ID3D11Device *pDevice, __in REFGUID CommandId, __in_bcount(CreationParametersDataSize) const void *pCreationParametersData, __in NvU32 CreationParametersDataSize, __out ID3D11NvMetaCommand **ppMetaCommand); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined (__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_InitializeMetaCommand // //! \since Release: 400 // //! \code //! DESCRIPTION: Initializes the given MetaCommand with the parameters passed in //! //! \param [in] pDeviceContext A pointer to the d3d11 device context //! \param [in] pMetaCommand the MetaCommand to initialize //! \param [in] pInitializationParametersData Structure containing parameters //! \param [in] InitializationParametersDataSize Size of the parameter structure in bytes //! SUPPORTED OS: Windows 10 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_InitializeMetaCommand(__in ID3D11DeviceContext *pDeviceContext, __in ID3D11NvMetaCommand *pMetaCommand, __in_bcount(InitializationParametersDataSize) const void *pInitializationParametersData, __in NvU32 InitializationParametersDataSize); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined (__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_ExecuteMetaCommand // //! \since Release: 400 // //! \code //! DESCRIPTION: Executes the given MetaCommand with the parameters passed in //! //! \param [in] pDeviceContext A pointer to the d3d11 device context //! \param [in] pMetaCommand the MetaCommand to execute //! \param [in] pExecutionParametersData Structure containing parameters //! \param [in] ExecutionParametersDataSize Size of the parameter structure in bytes //! SUPPORTED OS: Windows 10 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_ExecuteMetaCommand(__in ID3D11DeviceContext *pDeviceContext, __in ID3D11NvMetaCommand *pMetaCommand, __in_bcount(ExecutionParametersDataSize) const void *pExecutionParametersData, __in NvU32 ExecutionParametersDataSize); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_EnumerateMetaCommands // //! \since Release: 400 // //! \code //! DESCRIPTION: Enumerates MetaCommands supported on the system //! //! \param [in] pDevice A pointer to D3D12 device. //! \param [in/out] pNumMetaCommands Should be non-null. When the value pointed by pNumMetaCommands is 0 or when pDescs is NULL, the function returns number of metacommands supported. //! When the value pointed is non-zero, the value indicates number of Metacommand descriptions to be populated in pDescs array. //! \param [out] pDescs Pointer to array where Metacommand descriptions will be returned. Can be null to indicate that the app is querying the number of supported metacommands. //! Otherwise should have enough space to hold *pNumMetaCommands descriptors //! SUPPORTED OS: Windows 10 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_EnumerateMetaCommands(__in ID3D12Device *pDevice, __inout NvU32 *pNumMetaCommands, __out_ecount_opt(*pNumMetaCommands) NVAPI_META_COMMAND_DESC *pDescs); #endif //defined(__cplusplus) && defined(__d3d12_h__) #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_CreateMetaCommand // //! \since Release: 400 // //! \code //! DESCRIPTION: Creates a MetaCommand object which can be used to execute optimized operations exposed by driver like convolutions. //! //! \param [in] pDevice A pointer to D3D12 device. //! \param [in] CommandId GUID of the operations to perform //! \param [in] NodeMask GPU mask for which metacommand is to be created. Set it to 0 for single GPU systems //! \param [in] pCreationParametersData structure containing all creation parameters for the requested Metacommand //! \param [in] CreationParametersDataSize size of parameter data structure //! \param [out] ppMetaCommand A pointer to memory that receives the pointer to the created MetaCommand object. //! SUPPORTED OS: Windows 10 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! DXGI_ERROR_NOT_SUPPORTED - The requested Metacommand is not supported. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// #pragma pack(push, 4) struct NV_D3D12_META_COMMAND_INITIALIZE_CONVOLUTION_EX_DESC { // Persistent resource used as scratch space by driver // it's written at time of init, and read at time of execute // use GetRequiredParameterResourceSize to query its size D3D12_GPU_VIRTUAL_ADDRESS PersistentResource; }; struct NV_D3D12_META_COMMAND_EXECUTE_CONVOLUTION_EX_DESC { D3D12_GPU_VIRTUAL_ADDRESS InputResource; D3D12_GPU_VIRTUAL_ADDRESS FilterResource; D3D12_GPU_VIRTUAL_ADDRESS BiasResource; // optional D3D12_GPU_VIRTUAL_ADDRESS OutputResource; // Alpha1Resource and Alpha2Resource are used only when // PerChannelScaling is set. Otherwise the scalars Alpha1/Alpha2 are used // should have same dimension as bias D3D12_GPU_VIRTUAL_ADDRESS Alpha1Resource; D3D12_GPU_VIRTUAL_ADDRESS Alpha2Resource; // optional, same dimension/descriptor as output D3D12_GPU_VIRTUAL_ADDRESS SkipConnectionResource; // should point to same memory that was specified at time of init D3D12_GPU_VIRTUAL_ADDRESS PersistentResource; // temporary resource used as scratch space by driver // both written and read at time of execute // use GetRequiredParameterResourceSize to query its size D3D12_GPU_VIRTUAL_ADDRESS TemporaryResource; }; // make sure structure sizes match what the driver assumes compile_time_assert(sizeof(NV_D3D12_META_COMMAND_INITIALIZE_CONVOLUTION_EX_DESC) == 8); compile_time_assert(sizeof(NV_D3D12_META_COMMAND_EXECUTE_CONVOLUTION_EX_DESC) == 72); struct NV_D3D12_META_COMMAND_INITIALIZE_GEMM_DESC { NvU64 PersistentResource; }; struct NV_D3D12_META_COMMAND_EXECUTE_GEMM_DESC { NvU64 AResource; NvU64 BResource; NvU64 CResource; NvU64 OutputResource; NvU64 PersistentResource; NvU64 TemporaryResource; }; // make sure structure sizes match what the driver assumes compile_time_assert(sizeof(NV_D3D12_META_COMMAND_INITIALIZE_GEMM_DESC) == 8); compile_time_assert(sizeof(NV_D3D12_META_COMMAND_EXECUTE_GEMM_DESC) == 48); #pragma pack(pop) DECLARE_INTERFACE_(__declspec(uuid("00BF193A-117B-42BC-BBCD-E964A0EA4F2B"))ID3D12NvMetaCommand_V1, IUnknown) { BEGIN_INTERFACE // *** IUnknown methods *** STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // ** ID3D12NvMetaCommand methods *** // Return size of parameter STDMETHOD(GetRequiredParameterResourceSize)(THIS_ NV_META_COMMAND_RESOURCE_TYPE ResourceType, NvU64 *SizeInBytes) const PURE; END_INTERFACE }; typedef ID3D12NvMetaCommand_V1 ID3D12NvMetaCommand; #define ID3D12NvMetaCommand_VER1 MAKE_NVAPI_VERSION(IID3D12NvMetaCommand_V1, 1) #define ID3D12NvMetaCommand_VER ID3D12NvMetaCommand_VER1 NVAPI_INTERFACE NvAPI_D3D12_CreateMetaCommand(__in ID3D12Device *pDevice, __in REFGUID CommandId, __in NvU32 NodeMask, __in_bcount(CreationParametersDataSize) const void *pCreationParametersData, __in NvU32 CreationParametersDataSize, __out ID3D12NvMetaCommand **ppMetaCommand); #endif //defined(__cplusplus) && defined(__d3d12_h__) #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_InitializeMetaCommand // //! \since Release: 400 // //! \code //! DESCRIPTION: Initializes the given MetaCommand with the parameters passed in //! //! \param [in] pCommandList A pointer to D3D12 command list. //! \param [in] pMetaCommand the MetaCommand to initialize //! \param [in] pInitializationParametersData Structure containing parameters //! \param [in] InitializationParametersDataSize Size of the parameter structure in bytes //! SUPPORTED OS: Windows 10 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_InitializeMetaCommand(__in ID3D12GraphicsCommandList *pCommandlist, __in ID3D12NvMetaCommand *pMetaCommand, __in_bcount(InitializationParametersDataSize) const void *pInitializationParametersData, __in NvU32 InitializationParametersDataSize); #endif //defined(__cplusplus) && defined(__d3d12_h__) #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_ExecuteMetaCommand // //! \since Release: 400 // //! \code //! DESCRIPTION: Executes the given MetaCommand with the parameters passed in //! //! \param [in] pCommandList A pointer to D3D12 command list. //! \param [in] pMetaCommand the MetaCommand to execute //! \param [in] pExecutionParametersData Structure containing parameters //! \param [in] ExecutionParametersDataSize Size of the parameter structure in bytes //! SUPPORTED OS: Windows 10 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_ExecuteMetaCommand(__in ID3D12GraphicsCommandList *pCommandlist, __in ID3D12NvMetaCommand *pMetaCommand, __in_bcount(ExecutionParametersDataSize) const void *pExecutionParametersData, __in NvU32 ExecutionParametersDataSize); #endif //defined(__cplusplus) && defined(__d3d12_h__) #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_CreateCommittedResource // //! \since Release: 384 // //! \code //! DESCRIPTION: Wrapper around ID3D12Device::CreateCommittedResource to allow creation of resources according to params provided. //! HTEX resource is created when NV_D3D12_RESOURCE_FLAG_HTEX is set in the nvResourceFlags parameter. //! NV_D3D12_RESOURCE_FLAG_CPUVISIBLE_VIDMEM gives driver hint to create the resource on cpu visible vidmem //! only upload resources use this flag currently, others behave exactly as ID3D12Device::CreateCommittedResource //! Otherwise the function behaves exactly same as regular ID3D12Device::CreateCommittedResource. //! When NV_D3D12_RESOURCE_FLAG_HTEX is set, the texels are centered on integer coordinates and filtering //! and LOD are calculated based on the size minus one, which then allows the edges to filter to the exact texels on the edge, //! eliminating the border/edge filtering issue. Dimension of next mip level is CEIL(currentMipDimension/2), and size of smallest mip is 2x2. //! Note that NV_D3D12_RESOURCE_FLAG_HTEX can't be used for shared resources. //! Best practice: Query available space in cpu visible vidmem using NvAPI_D3D12_QueryCpuVisibleVidmem //! before using NV_D3D12_RESOURCE_FLAG_CPUVISIBLE_VIDMEM //! //! \param [in] pDevice A pointer to D3D12 device. //! \param [in] pHeapProperties A pointer to a D3D12_HEAP_PROPERTIES structure that provides properties for the resource's heap. //! \param [in] HeapFlags Heap options, as a bitwise-OR'd combination of D3D12_HEAP_FLAGS enumeration constants. //! \param [in] pDesc A pointer to a D3D12_RESOURCE_DESC structure that describes the resource. //! \param [in] InitialState The initial state of the resource, as a bitwise-OR'd combination of D3D12_RESOURCE_STATES enumeration constants. //! \param [in] pOptimizedClearValue Specifies a D3D12_CLEAR_VALUE that describes the default value for a clear color. //! \param [in] pNVResourceParams A pointer to a structure containing additional NV specific resource creation information (see NV_D3D12_RESOURCE_FLAGS below for more info on flags) //! \param [in] riid The globally unique identifier (GUID) for the resource interface. //! \param [out] ppvResource A pointer to memory that receives the requested interface pointer to the created resource object. //! ppvResource can be NULL, to enable capability testing. When ppvResource is NULL, no object will be created and pSupported //! will be set to true when pResourceDesc is valid. //! \param [out] pSupported optional, needed only for capability testing when ppvResource is NULL //! SUPPORTED OS: Windows 10 //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// typedef enum { NV_D3D12_RESOURCE_FLAG_NONE = 0, NV_D3D12_RESOURCE_FLAG_HTEX = 1, //!< Create HTEX texture NV_D3D12_RESOURCE_FLAG_CPUVISIBLE_VIDMEM= 2, //!< Hint to create resource in cpuvisible vidmem } NV_D3D12_RESOURCE_FLAGS; typedef struct _NV_RESOURCE_PARAMS_V1 { NvU32 version; //!SetFence(dstGpu, hFence, Value); \ pMultiGPUDevice->WaitForFence(1 << (srcGpu), hFence, Value); \ Value++; #define FENCE_SYNCHRONIZATION_END(pMultiGPUDevice, hFence, Value, srcGpu, dstGpu) \ pMultiGPUDevice->SetFence(srcGpu, hFence, Value); \ pMultiGPUDevice->WaitForFence(1 << (dstGpu), hFence, Value); \ Value++; //! PresentCompositingConfig method flags. #define NVAPI_PRESENT_COMPOSITING_CONFIG_FLAG_USE_VIDEO_BRIDGE 0x01 #define NVAPI_PRESENT_COMPOSITING_CONFIG_FLAG_CLEAR_OUTBANDS 0x02 #define NVAPI_PRESENT_COMPOSITING_CONFIG_FLAG_GET_VIDEO_BRIDGE_STATUS 0x80000000 #define NVAPI_VIDEO_BRIDGE_STATUS_AVAILABLE 0 #define NVAPI_VIDEO_BRIDGE_STATUS_NOT_AVAILABLE 1 #define NVAPI_VIDEO_BRIDGE_STATUS_FAILED_ACCESS 2 #define NVAPI_VIDEO_BRIDGE_STATUS_UNKNOWN 3 #define NVAPI_ALL_GPUS 0 typedef ID3D11MultiGPUDevice_V1 ID3D11MultiGPUDevice; #define ID3D11MultiGPUDevice_VER1 MAKE_NVAPI_VERSION(ID3D11MultiGPUDevice_V1, 1) #define ID3D11MultiGPUDevice_VER2 MAKE_NVAPI_VERSION(ID3D11MultiGPUDevice_V1, 2) #define ID3D11MultiGPUDevice_VER3 MAKE_NVAPI_VERSION(ID3D11MultiGPUDevice_V1, 3) #define ID3D11MultiGPUDevice_VER ID3D11MultiGPUDevice_VER3 #define ALL_GPUS 0 //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D11_CreateMultiGPUDevice(__in ID3D11Device *pDevice, __in ULONG version, __out ULONG *currentVersion, __out ID3D11MultiGPUDevice **ppD3D11MultiGPUDevice, __in UINT maxGpus=ALL_GPUS); #endif //defined(__cplusplus) && defined(__d3d11_h__) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) typedef NvU32 NV_DIRECT_MODE_SURFACE_HANDLE; typedef enum _NV_DIRECT_MODE_DSC_MODE { NV_DIRECT_MODE_DSC_MODE_DRIVER_CONTROLLED = 0, // As per driver policy, DSC will be enabled with pre-defined configuration when required NV_DIRECT_MODE_DSC_MODE_FORCE_ENABLED = 1, NV_DIRECT_MODE_DSC_MODE_FORCE_DISABLED = 2, } NV_DIRECT_MODE_DSC_MODE; typedef enum _NV_DIRECT_MODE_DSC_VERSION { NV_DIRECT_MODE_DSC_VERSION_INVALID = 0, NV_DIRECT_MODE_DSC_VERSION_V11 = 0x11, NV_DIRECT_MODE_DSC_VERSION_V12 = 0x12, } NV_DIRECT_MODE_DSC_VERSION; typedef enum _NV_DIRECT_MODE_DSC_SLICE_COUNT { NV_DIRECT_MODE_DSC_SLICE_COUNT_INVALID = 0, NV_DIRECT_MODE_DSC_SLICE_COUNT_1 = 1, NV_DIRECT_MODE_DSC_SLICE_COUNT_2 = 2, NV_DIRECT_MODE_DSC_SLICE_COUNT_4 = 4, NV_DIRECT_MODE_DSC_SLICE_COUNT_8 = 8, } NV_DIRECT_MODE_DSC_SLICE_COUNT; typedef struct _NV_DIRECT_MODE_DSC_PARAMS_V1 { NV_DIRECT_MODE_DSC_MODE dscMode; NV_DIRECT_MODE_DSC_VERSION dscVersion; NV_DIRECT_MODE_DSC_SLICE_COUNT sliceCount; NvU32 outputBPPx16; //!< Output BPP supports fractional values as well. The value is BPP multiplied by 16. } NV_DIRECT_MODE_DSC_PARAMS_V1; typedef struct _NV_DIRECT_MODE_INFO_V1 { NvU32 version; //!< The version of the structure NvU32 width; NvU32 height; NV_DISPLAY_REFRESH_RATE refresh; NV_FORMAT format; NvU32 ScanlineOrdering; //!< 0 - Unspecified; 1 - Progressive; 2 - Interlaced NV_SCALING scaling; } NV_DIRECT_MODE_INFO_V1; typedef struct _NV_DIRECT_MODE_INFO_V2 { NvU32 version; //!< The version of the structure NvU32 width; NvU32 height; NV_DISPLAY_REFRESH_RATE refresh; NV_FORMAT format; NvU32 ScanlineOrdering; //!< 0 - Unspecified; 1 - Progressive; 2 - Interlaced NV_SCALING scaling; NV_DIRECT_MODE_DSC_PARAMS_V1 dscParams; } NV_DIRECT_MODE_INFO_V2; #define NV_DIRECT_MODE_INFO_VER1 MAKE_NVAPI_VERSION(NV_DIRECT_MODE_INFO_V1, 1) #define NV_DIRECT_MODE_INFO_VER2 MAKE_NVAPI_VERSION(NV_DIRECT_MODE_INFO_V2, 2) #define NV_DIRECT_MODE_INFO_VER NV_DIRECT_MODE_INFO_VER2 typedef NV_DIRECT_MODE_INFO_V2 NV_DIRECT_MODE_INFO; #endif // defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined (__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) ) typedef enum { NVAPI_VR_PROCESS_NONE = 0x00000000, //!< Process is not in VR mode NVAPI_VR_PROCESS_APPLICATION = 0x00000001, //!< Process is a VR application NVAPI_VR_PROCESS_COMPOSITOR = 0x00000002, //!< Process is a VR compositor NVAPI_VR_PROCESS_APPLICATION_COMPOSITOR = NVAPI_VR_PROCESS_APPLICATION | NVAPI_VR_PROCESS_COMPOSITOR, //!< Process is both a VR application and compositor } NVAPI_VR_PROCESS_TYPE; #endif //defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) ) #if defined (__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) ) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_DeclareVRProcessType // //! DESCRIPTION: Declare the process type as VR related //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 375 //! //! \param [in] NVAPI_VR_PROCESS_TYPE Refer the enum declaration for the values defined //! //! //! \return This API return NVAPI_OK if notification succeeded and NVAPI_ERROR if it failed. //! //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D1x_DeclareVRProcessType(__in NVAPI_VR_PROCESS_TYPE ProcessType); #endif //defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) ) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_D3D_AcquireDirectModeDisplay // //! DESCRIPTION: This API acquires exclusive access to the specified Direct Mode display //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] vendorId Vendor Id of the target VR solution //! \param [in] pDevice D3D device used in subsequent rendering //! \param [in,out] phDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_INVALID_CONFIGURATION The requested action cannot be performed in the current state. //! NVAPI_HDCP_ENCRYPTION_FAILED HDCP Encryption Failed for the device. Would be applicable when the device is HDCP Capable. //! NVAPI_INVALID_DISPLAY_ID The input display id is not valid or the monitor associated to it does not support the current operation. //! NVAPI_HDCP_DISABLED Non-HDCP Capable HMD is detected and hence driver will disable HDCP across the GPU. //! NVAPI_UNSUPPORTED_CONFIG_NON_HDCP_HMD Detected non-HDCP compliant HMD with notebook or with non-Nvidia GPU in desktop. //! NVAPI_DISPLAY_IN_USE HMD is already in use by other process. HMD can be acquired by only one process. //! NVAPI_MAX_DISPLAY_LIMIT_REACHED GPU has reached max display limit. To connect a new display, disconnect any existing display. //! NVAPI_INVALID_DIRECT_MODE_DISPLAY Directmode is not enabled for this display. //! NVAPI_WAIT_FOR_HW_RESOURCE Wait for allocation of HW resources //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_AcquireDirectModeDisplay(__in NvU32 vendorId, __in IUnknown *pDevice, __inout NV_DIRECT_MODE_DISPLAY_HANDLE *phDisplay); #endif // defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_D3D_ReleaseDirectModeDisplay // //! DESCRIPTION: This API releases the exclusive access to the specified Direct mode display //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] vendorId Vendor Id of the target VR solution //! \param [in/out] phDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_INVALID_CONFIGURATION The requested action cannot be performed in the current state. //! NVAPI_HDCP_ENCRYPTION_FAILED HDCP Encryption Failed for the device. Would be applicable when the device is HDCP Capable. //! NVAPI_INVALID_DISPLAY_ID The input display id is not valid or the monitor associated to it does not support the current operation. //! NVAPI_DISPLAY_IN_USE The HMD is in use by other process, HMD can only be released by the process that acquired it. //! NVAPI_RESOURCE_NOT_ACQUIRED The HMD is not yet acquired by the process. //! NVAPI_INVALID_DIRECT_MODE_DISPLAY Directmode is not enabled for this display. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_ReleaseDirectModeDisplay(__in NvU32 vendorId, __inout NV_DIRECT_MODE_DISPLAY_HANDLE *phDisplay); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DirectModeCreateSurface // //! DESCRIPTION: Request to allocate a presentable render target on specified display out. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in/out] hDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! \param [in] pModeInfo Mode info that surface needs to match. //! \param [out] phSurface A pointer to NV_DIRECT_MODE_SURFACE_HANDLE. //! \param [out] phSharedHandle A pointer to returned DX surface //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DirectModeCreateSurface(__inout NV_DIRECT_MODE_DISPLAY_HANDLE* phDisplay, __in NV_DIRECT_MODE_INFO *pModeInfo, __out NV_DIRECT_MODE_SURFACE_HANDLE *phSurface, __out HANDLE *phSharedHandle); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DirectModeDestroySurface // //! DESCRIPTION: Request to destroy the presentable render target earlier created using NvAPI_D3D_DirectModeCreateSurface. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in/out] hDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! \param [in] hSurface A NV_DIRECT_MODE_SURFACE_HANDLE that was previously obtained using NvAPI_D3D_DirectModeCreateSurface //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DirectModeDestroySurface(__inout NV_DIRECT_MODE_DISPLAY_HANDLE* phDisplay, __in NV_DIRECT_MODE_SURFACE_HANDLE hSurface); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DirectModeRenderWait // //! DESCRIPTION: Specifies that rendering should only start until presentation has finished. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 364 //! //! \param [in] hDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! \param [in] pRenderDevice The D3D device that is used for rendering to the surface. Used for queued presents. //! \param [in] bEnable Specific behavior setting to apply for Presents. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DirectModeRenderWait(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phDisplay, __in IUnknown* pRenderDevice, __in bool bEnable); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! \ingroup dx //! See NvAPI_D3D_DirectModePresent typedef enum _NVAPI_DIRECTMODE_PRESENT_FLAG { NV_DIRECTMODE_PRESENT_FLAG_NONE = 0, NV_DIRECTMODE_PRESENT_FLAG_VSYNC, //!< Immediate Present request, flip on next vsync NV_DIRECTMODE_PRESENT_FLAG_QUEUED_VSYNC, //!< Scheduled Present request, flip on next vsync } NVAPI_DIRECTMODE_PRESENT_FLAG; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DirectModePresent // //! DESCRIPTION: Request to present a DirectMode surface. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! \param [in] hSurface A NV_DIRECT_MODE_SURFACE_HANDLE that was previously obtained using NvAPI_D3D_DirectModeCreateSurface //! \param [in] flag Option for controlling presentation //! \param [in,opt]pRenderDevice The D3D device that is used for rendering to the surface. Used for queued presents. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_INSUFFICIENT_BUFFER Input buffer is insufficient to hold the contents. //! NVAPI_RESOURCE_NOT_ACQUIRED Display is not acquired by the application //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DirectModePresent(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phDisplay, __in NV_DIRECT_MODE_SURFACE_HANDLE hSurface, __in NVAPI_DIRECTMODE_PRESENT_FLAG flag, __in IUnknown* pRenderDevice); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! SUPPORTED OS: Windows 7 and higher //! #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DirectModePresent12 // //! DESCRIPTION: Request to present a DirectMode surface. //! //! //! \param [in] hDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! \param [in] hSurface A NV_DIRECT_MODE_SURFACE_HANDLE that was previously obtained using NvAPI_D3D_DirectModeCreateSurface //! \param [in] flag Option for controlling presentation //! \param [in] pCommandQueue The command queue that is used for rendering to the surface. Used for queued presents and syncronization. //! \param [in] pCommandList The command list that is used for rendering to the surface. Used for queued presents. //! Command list has to be reset before call. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_INSUFFICIENT_BUFFER Input buffer is insufficient to hold the contents. //! NVAPI_RESOURCE_NOT_ACQUIRED Display is not acquired by the application //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// #if defined(__d3d12_h__) #define ICommandQueue ID3D12CommandQueue #define IGraphicsCommandList ID3D12GraphicsCommandList #else #define ICommandQueue void #define IGraphicsCommandList void #endif NVAPI_INTERFACE NvAPI_D3D_DirectModePresent12(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phDisplay, __in NV_DIRECT_MODE_SURFACE_HANDLE hSurface, __in NVAPI_DIRECTMODE_PRESENT_FLAG flag, __in ICommandQueue* pCommandQueue, __in IGraphicsCommandList* pCommandList ); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! SUPPORTED OS: Windows 7 and higher //! #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DirectModeGetDeviceAndSurface // //! DESCRIPTION: Retrieves DX device and surface from directmode display handle and surface handle. //! This API does not increase ref count for returned *ppDXGIDevice&*ppDxSurface interfaces. //! //! //! \param [in] hDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! \param [in] hSurface A NV_DIRECT_MODE_SURFACE_HANDLE that was previously obtained using NvAPI_D3D_DirectModeCreateSurface //! \param [inout] ppDXGIDevice Pointer to retrieved DXGI device interface. //! \param [inout] ppDxSurface Pointer to retrieved DX surface interface. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_INVALID_HANDLE hDisplay or hSurface are NULL, not initialized or incorrect. //! NVAPI_INVALID_POINTER ppDXGIDevice or ppDxSurface are NULL. //! //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D_DirectModeGetDeviceAndSurface(__in NV_DIRECT_MODE_DISPLAY_HANDLE *phDisplay, __in NV_DIRECT_MODE_SURFACE_HANDLE hSurface, __inout IUnknown **ppDXGIDevice, __inout IUnknown **ppDxSurface); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) typedef struct _NV_DIRECT_MODE_PRESENT_STATS_V1 { NvU32 version; //!< The version of the structure NV_DISPLAY_REFRESH_RATE refresh; //!< Current refresh rate NvU32 frameIndex; //!< A monotonically incrementing frame index (incremented on vsync) NvU64 timeOfLastVSync; //!< QPC time of last vsync }NV_DIRECT_MODE_PRESENT_STATS_V1; typedef struct _NV_DIRECT_MODE_PRESENT_STATS_V2 { NvU32 version; //!< The version of the structure NV_DISPLAY_REFRESH_RATE refresh; //!< Current refresh rate NvU32 frameIndex; //!< A monotonically incrementing frame index (incremented on vsync) NvU64 timeOfLastVSync; //!< QPC time of last vsync NvU64 gpuTimeOfLastVSync; //!< GPU time of last vsync }NV_DIRECT_MODE_PRESENT_STATS_V2; #define NV_DIRECT_MODE_PRESENT_STATS_VER1 MAKE_NVAPI_VERSION(NV_DIRECT_MODE_PRESENT_STATS_V1, 1) #define NV_DIRECT_MODE_PRESENT_STATS_VER2 MAKE_NVAPI_VERSION(NV_DIRECT_MODE_PRESENT_STATS_V1, 2) #define NV_DIRECT_MODE_PRESENT_STATS_VER NV_DIRECT_MODE_PRESENT_STATS_VER2 typedef NV_DIRECT_MODE_PRESENT_STATS_V2 NV_DIRECT_MODE_PRESENT_STATS; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_D3D_GetDirectModePresentStats // //! DESCRIPTION: This API gets Present statistics //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! \param [IN,out] pStatsInfo Pointer to a NV_DIRECT_MODE_PRESENT_STATS structure which will be filled in by the API. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_GetDirectModePresentStats(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phDisplay, __inout NV_DIRECT_MODE_PRESENT_STATS* pStatsInfo); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_D3D_DirectModeSetDisplayMode // //! DESCRIPTION: This API sets the source mode for the specified direct mode display. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! \param [in] pModeInfo The mode info that needs to be applied //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_RESOURCE_NOT_ACQUIRED Head or SourceId was not reserved for the VR Display before doing the Modeset. //! NVAPI_TIMING_NOT_SUPPORTED Provided timing is not supported or there are multiple monitors active leaving no bandwidth for the VR Display. //! NVAPI_HDCP_ENCRYPTION_FAILED HDCP Encryption Failed for the device. Would be applicable when the device is HDCP Capable. //! NVAPI_INSUFFICIENT_BUFFER Input buffer is insufficient to hold the contents. //! NVAPI_INVALID_CONFIGURATION The requested action cannot be performed in the current state. //! NVAPI_INVALID_DISPLAY_ID The input display id is not valid or the monitor associated to it does not support the current operation. //! NVAPI_PCLK_LIMITATION_FAILED Provided mode is over sink device pclk limitation. //! NVAPI_HDCP_DISABLED Tried Enabling HDCP Multiple Times on the HMD, but failed. Hence Disabling HDCP on the GPU. //! NVAPI_INVALID_DIRECT_MODE_DISPLAY Directmode is not enabled for this display. //! NVAPI_DISPLAY_IN_USE VR Display is in use by some other process. Only the process that acquired the display can perform a modeset on the display. //! NVAPI_INVALID_DSC_VERSION With DSC Mode = Force_Enabled, DSC_Version can be 0x11 or 0x12 //! With DSC Mode = Driver_Controlled, DSC version should be NV_DIRECT_MODE_DSC_VERSION_INVALID //! NVAPI_INVALID_DSC_SLICECOUNT With DSC Mode = Force_Enabled, DSC slice count can be 1, 2, 4 or 8. //! With DSC Mode = Driver_Controlled, DSC slice count should be NV_DIRECT_MODE_DSC_SLICE_COUNT_INVALID //! NVAPI_INVALID_DSC_OUTPUT_BPP With DSC Mode = Force_Enabled, DSC output BPP should be between 128 and 383. //! With DSC Mode = Driver_Controlled, DSC slice count should be 0 //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DirectModeSetDisplayMode(__in NV_DIRECT_MODE_DISPLAY_HANDLE* phDisplay, __in NV_DIRECT_MODE_INFO* pModeInfo); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) typedef enum _NV_DIRECTMODE_GETMODES_FLAG { NV_DIRECTMODE_GETMODES_FLAG_SUPPORTED = 0, //!< Used to fetch all the supported modes NV_DIRECTMODE_GETMODES_FLAG_CURRENT //!< Used to fetch the currently applied mode }NV_DIRECTMODE_GETMODES_FLAG; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_D3D_DirectModeGetDisplayModes // //! DESCRIPTION: This API gets all the supported source modes or the currently applied mode //! for the direct mode display. //! To get a count of the supported modes, the user can call with pModeInfo set to NULL. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] phDisplay A pointer to NV_DIRECT_MODE_DISPLAY_HANDLE structure. //! \param [in/out] modeCount When flag is NV_GET_DIRECTMODE_FLAG_CURRENT, //! - *modeCount should be set to 1 and a single NV_DIRECT_MODE_INFO should be allocated for pModeInfo. //! When flag is NV_GET_DIRECTMODE_FLAG_SUPPORTED, //! - during input, *modeCount is the number of entries allocated in pModeInfo. //! - during output, *modeCount is the number of actual supported modes. //! \param [out] pModeInfo Pointer to a NV_DIRECT_MODE_INFO structure which will be filled in by the API. //! \param [in] flag A NV_GET_DIRECTMODE_FLAG type to control which modes to be returned. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_INSUFFICIENT_BUFFER When the input buffer(pModeInfo)'s size(*modeCount) is less than the supported modes. //! The *modeCount will return the actual supported modeInfo count. //! NVAPI_INVALID_ARGUMENT When NV_GET_MODE_CURRENT is passed in flag and *modeCount != 1, then this error is returned. //! NVAPI_INVALID_CONFIGURATION The requested action cannot be performed in the current state. //! NVAPI_RESOURCE_NOT_ACQUIRED The display needs to be active to query for the current mode. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DirectModeGetDisplayModes( __in NV_DIRECT_MODE_DISPLAY_HANDLE* phDisplay, __inout NvU32 *modeCount, __inout_opt NV_DIRECT_MODE_INFO* pModeInfo, __in NV_DIRECTMODE_GETMODES_FLAG flag); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DirectModeImplicitSLIControl // //! DESCRIPTION: Request to enable/disable implicit SLI in direct mode. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDev The device pointer //! \param [in] disable Disable or Undisable (set to default behavior handled by the driver) implicit SLI. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DirectModeImplicitSLIControl(__in IUnknown *pDev, __in bool disable); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! SUPPORTED OS: Windows 7 and higher //! #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) typedef enum _NV_VR_POWER_MODE { NV_VR_POWER_MODE_DEFAULT = 0, //!< Used to Disable Max Perf Mode NV_VR_POWER_MODE_MAX_PERFORMANCE //!< Used to Enable Max Perf Mode } NV_VR_POWER_MODE; /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_D3D_VRSetPowerMode // //! DESCRIPTION: This API will set the Power Mode request by the user for all the GPUs in the system, but onlw when VR is active. //! The API has to be called before doing the modeset on the VR Display. //! To reset the Max Perf, the API should be called by the same process. //! //! \since Release: 364 //! //! \param [in] mode To Enable/Disable Max Perf Mode //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_ACCESS_DENIED Call was made by other Process whihc is not allowed //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_VRSetPowerMode(__in NV_VR_POWER_MODE mode); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) || defined(__d3d12_h__)) //! \ingroup dx //! See NvAPI_D3D_QueryPeriodicFrameNotificationSupport typedef struct _NV_QUERY_PERIODIC_FRAME_NOTIFICATION_SUPPORT_PARAMS_V1 { NvU32 version; //!< (IN) Parameter structure version NvU32 displayId; //!< (IN) DisplayID NvU32 bSupported; //!< (OUT) PeriodicFrameNotification supported } NV_QUERY_PERIODIC_FRAME_NOTIFICATION_SUPPORT_PARAMS_V1; typedef NV_QUERY_PERIODIC_FRAME_NOTIFICATION_SUPPORT_PARAMS_V1 NV_QUERY_PERIODIC_FRAME_NOTIFICATION_SUPPORT_PARAMS; #define NV_QUERY_PERIODIC_FRAME_NOTIFICATION_SUPPORT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_QUERY_PERIODIC_FRAME_NOTIFICATION_SUPPORT_PARAMS_V1, 1) #define NV_QUERY_PERIODIC_FRAME_NOTIFICATION_SUPPORT_PARAMS_VER NV_QUERY_PERIODIC_FRAME_NOTIFICATION_SUPPORT_PARAMS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_QueryPeriodicFrameNotificationSupport // //! DESCRIPTION: Queries the support of Periodic Frame Notification feature on current setup. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 384 //! //! \param [inout] pQueryPeriodicFrameNotificationSupportParams Stores value of whether Periodic Frame Notification is supported on current setup or not. //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_QueryPeriodicFrameNotificationSupport(__inout NV_QUERY_PERIODIC_FRAME_NOTIFICATION_SUPPORT_PARAMS *pQueryPeriodicFrameNotificationSupportParams); #endif // defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) typedef enum _PERIODIC_FRAME_NOTIFICATION_TYPE { PERIODIC_FRAME_NOTIFICATION_TYPE_EVENT_WAIT = 0, // Application waits for event to be signaled } PERIODIC_FRAME_NOTIFICATION_TYPE; //! \ingroup dx //! See NvAPI_D3D_CreatePeriodicFrameNotification typedef struct _NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1 { NvU32 version; //!< (IN) parameter struct version NvU32 displayId; //!< (IN) DisplayId of the VR Headset NvU64 time; //!< (IN) time relative to Vsync in multiples of 100ns. e.g. 10000 == 1ms before Vsync NvU32 notificationID; //!< (IN) non-zero, unique id. HANDLE hNotificationEvent; //!< (OUT) Event to wait upon using WaitForSingleObject() HANDLE hNotification; //!< (OUT) Handle for further use in Update()/Destroy() functions } NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1; typedef struct _NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V2 { NvU32 version; //!< (IN) parameter struct version NvU32 displayId; //!< (IN) DisplayId of the VR Headset NvU64 time; //!< (IN) time relative to Vsync in multiples of 100ns. e.g. 10000 == 1ms before Vsync NvU32 notificationID; //!< (IN) non-zero, unique id. HANDLE hNotificationEvent; //!< (OUT) Event to wait upon using WaitForSingleObject() HANDLE hNotification; //!< (OUT) Handle for further use in Update()/Destroy() functions PERIODIC_FRAME_NOTIFICATION_TYPE waitType; //!< (IN) type of wait. IUnknown *pRenderDevice; //!< (IN) Currently unused } NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V2; typedef NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V2 NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS; #define NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1, 1) #define NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER2 MAKE_NVAPI_VERSION(NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V2, 2) #define NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_CreatePeriodicFrameNotification // //! DESCRIPTION: //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 384 //! \param [in] pCreateNotification Pointer to input params struct //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_CreatePeriodicFrameNotification(__inout NV_CREATE_PERIODIC_FRAME_NOTIFICATION_PARAMS * pCreateNotification); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! \ingroup dx //! See NvAPI_D3D_UpdatePeriodicFrameNotification typedef struct _NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1 { NvU32 version; //!< (IN) parameter struct version HANDLE hNotification; //!< (IN) Handle obtained from NvAPI_D3D_CreatePeriodicFrameNotification call NvU64 time; //!< (IN) Updated time relative to Vsync in multiples of 100ns. e.g. 10000 == 1ms before Vsync } NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1; #define NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_FLAGS_DEFAULT 0x00000000 // If event for current VSync interval is already signaled, updated value will take effect in the next VSync interval // If event for current VSync interval is not already signaled, updated value will take effect in the current VSync interval. // However, due to processing delays, it is still possible that the updated value will take effect from the next VSync interval. typedef struct _NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V2 { NvU32 version; //!< (IN) parameter struct version HANDLE hNotification; //!< (IN) Handle obtained from NvAPI_D3D_CreatePeriodicFrameNotification call NvU64 time; //!< (IN) Updated time relative to Vsync in multiples of 100ns. e.g. 10000 == 1ms before Vsync NvU32 flags; //!< (IN) Additional flags if any } NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V2; typedef NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V2 NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS; #define NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1, 1) #define NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER2 MAKE_NVAPI_VERSION(NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_V2, 2) #define NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_UpdatePeriodicFrameNotification // //! DESCRIPTION: //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 384 //! \param [in] pUpdateNotification Pointer to input params struct //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_UpdatePeriodicFrameNotification(__in NV_UPDATE_PERIODIC_FRAME_NOTIFICATION_PARAMS *pUpdateNotification); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! \ingroup dx //! See NvAPI_D3D_DestroyPeriodicFrameNotification typedef struct _NV_DESTROY_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1 { NvU32 version; //!< (IN) parameter struct version HANDLE hNotification; //!< (IN) Handle obtained from NvAPI_D3D_CreatePeriodicFrameNotification call } NV_DESTROY_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1; typedef NV_DESTROY_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1 NV_DESTROY_PERIODIC_FRAME_NOTIFICATION_PARAMS; #define NV_DESTROY_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_DESTROY_PERIODIC_FRAME_NOTIFICATION_PARAMS_V1, 1) #define NV_DESTROY_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER NV_DESTROY_PERIODIC_FRAME_NOTIFICATION_PARAMS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DestroyPeriodicFrameNotification // //! DESCRIPTION: //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 384 //! \param [in] pDestroyNotification Pointer to input params struct //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DestroyPeriodicFrameNotification(__in NV_DESTROY_PERIODIC_FRAME_NOTIFICATION_PARAMS *pDestroyNotification); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) typedef struct _NV_PERIODIC_FRAME_NOTIFICATION_STATS_V1 { NvU32 version; //!< The version of the structure NvU64 notificationCount; //!< A monotonically incrementing notification count (incremented on notification event) NvU64 timeOfLastNotification; //!< QPC time of last notification NvU64 gpuTimeOfLastNotification; //!< GPU time of last notification }NV_PERIODIC_FRAME_NOTIFICATION_STATS_V1; #define NV_PERIODIC_FRAME_NOTIFICATION_STATS_VER1 MAKE_NVAPI_VERSION(NV_PERIODIC_FRAME_NOTIFICATION_STATS_V1, 1) #define NV_PERIODIC_FRAME_NOTIFICATION_STATS_VER NV_PERIODIC_FRAME_NOTIFICATION_STATS_VER1 typedef NV_PERIODIC_FRAME_NOTIFICATION_STATS_V1 NV_PERIODIC_FRAME_NOTIFICATION_STATS; typedef struct _NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS_V1 { NvU32 version; //!< (IN) parameter struct version HANDLE hNotification; //!< (IN) Handle obtained from NvAPI_D3D_CreatePeriodicFrameNotification call } NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS_V1; typedef NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS_V1 NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS; #define NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS_V1, 1) #define NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS_VER NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS_VER1 /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_D3D_GetPeriodicFrameNotificationStats // //! DESCRIPTION: This API gets Present statistics //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 384 //! \param [in] pGetStatsParams A pointer to NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS structure. //! \param [IN,out] pStatsInfo Pointer to a NV_PERIODIC_FRAME_NOTIFICATION_STATS structure which will be filled in by the API. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_GetPeriodicFrameNotificationStats(__in NV_GET_PERIODIC_FRAME_NOTIFICATION_STATS_PARAMS* pGetStatsParams, __inout NV_PERIODIC_FRAME_NOTIFICATION_STATS* pStatsInfo); #endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! SUPPORTED OS: Windows 7 and higher //! //! Used to query the support of Single Pass Stereo HW feature //! \ingroup dx typedef struct _NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V1 { NvU32 version; // parameter struct version NvU32 bSinglePassStereoSupported; // Single Pass Stereo supported } NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V1; typedef struct _NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V2 { NvU32 version; // _IN_ parameter struct version NvU32 bSinglePassStereoSupported : 1; // _OUT_ Single Pass Stereo supported NvU32 bSinglePassStereoXYZWSupported : 1; // _OUT_ Single Pass Stereo XYZW supported NvU32 reserved : 30; // _INOUT_ bits reserved for future use } NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V2; typedef NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V2 NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS; #define NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V1, 1) #define NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_VER2 MAKE_NVAPI_VERSION(NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V2, 2) #define NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_VER NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_VER2 #ifndef NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_VER typedef NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V1 NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS; #define NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V1, 1) #define NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_VER NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_VER1 #endif #if defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_QuerySinglePassStereoSupport // //! DESCRIPTION: Queries the support of Single Pass Stereo feature on current setup and returns appropriate boolean value. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDevice The ID3D11Device to use. //! \param [inout] pSinglePassStereoSupportedParams Stores value of whether Single Pass Stereo is supported on current setup or not. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_QuerySinglePassStereoSupport(__in IUnknown *pDevice, __inout NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS *pQuerySinglePassStereoSupportedParams); #endif //defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) #if defined(__cplusplus) && defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_SetSinglePassStereoMode // //! DESCRIPTION: Set the Single Pass Stereo state //! //! \note Note that this is an asynchronous function and returns NVAPI_OK if all arguments are valid. //! Returned value NVAPI_OK does not reflect that Single Pass Stereo is supported or is set in hardware. //! One must call NvAPI_D3D_QuerySinglePassStereoSupport() to confirm that the current setup //! supports Single Pass Stereo before calling this set-function. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDevOrContext The ID3D11Device or ID3D11DeviceContext to use. //! \param [in] numViews Number of views to render. //! \param [in] renderTargetIndexOffset Offset between render targets of the different views. //! \param [in] independentViewportMaskEnable Is the independent viewport mask enabled. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_SetSinglePassStereoMode(__in IUnknown *pDevOrContext, __in NvU32 numViews, __in NvU32 renderTargetIndexOffset, __in NvU8 independentViewportMaskEnable); #endif //defined(__cplusplus) && defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) #if defined(__cplusplus) && ( defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_QuerySinglePassStereoSupport // //! DESCRIPTION: Queries the support of Single Pass Stereo feature on current setup and returns appropriate boolean value. //! //! SUPPORTED OS: Windows 10 //! //! //! \param [in] pDevice The IDirect3DDevice12 to use. //! \param [inout] pQuerySinglePassStereoSupportedParams Stores value of whether Single Pass Stereo is supported on current setup or not. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_QuerySinglePassStereoSupport(__in ID3D12Device *pDevice, __inout NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS *pQuerySinglePassStereoSupportedParams); #endif // defined(__cplusplus) && ( defined(__d3d12_h__)) #if defined(__cplusplus) && ( defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_SetSinglePassStereoMode // //! DESCRIPTION: Set the Single Pass Stereo state. //! //! \note Note that Single Pass Stereo state persists on a particular CommandList till it is closed. //! The state is reset to default (disabled) for every newly created CommandList. //! One must call NvAPI_D3D12_QuerySinglePassStereoSupport() to confirm that the current setup //! supports Single Pass Stereo before calling this set-function. //! //! SUPPORTED OS: Windows 10 //! //! //! \param [in] pCommandList The command list in which we will add push buffer commmands for enabling Single Pass Stereo feature //! Note: Command list of type D3D12_COMMAND_LIST_TYPE_BUNDLE is not allowed for setting the state of this feature. //! \param [in] numViews Number of views to render. //! \param [in] RenderTargetIndexOffset Offset between render targets of the different views. //! \param [in] IndependentViewportMaskEnable Is the independent viewport mask enabled. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_SetSinglePassStereoMode(__in ID3D12GraphicsCommandList* pCommandList, __in NvU32 numViews, __in NvU32 renderTargetIndexOffset, __in NvU8 independentViewportMaskEnable); #endif // defined(__cplusplus) && ( defined(__d3d12_h__)) //! SUPPORTED OS: Windows 7 and higher //! //! Used to query the support of MultiView HW feature //! \ingroup dx typedef struct _NV_QUERY_MULTIVIEW_SUPPORT_PARAMS_V1 { NvU32 version; // _IN_ parameter struct version NvU32 bMultiViewSupported : 1; // _OUT_ MultiView supported (Render 4 views in a single pass) NvU32 bSinglePassStereoSupported : 1; // _OUT_ StereoX supported (Render 2 views in a single pass) NvU32 bSinglePassStereoXYZWSupported : 1; // _OUT_ StereoXYZW supported (Render 2 views in a single pass) NvU32 reserved : 29; // _INOUT_ bits reserved for future use } NV_QUERY_MULTIVIEW_SUPPORT_PARAMS_V1; typedef NV_QUERY_MULTIVIEW_SUPPORT_PARAMS_V1 NV_QUERY_MULTIVIEW_SUPPORT_PARAMS; #define NV_QUERY_MULTIVIEW_SUPPORT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_QUERY_MULTIVIEW_SUPPORT_PARAMS_V1, 1) #define NV_QUERY_MULTIVIEW_SUPPORT_PARAMS_VER NV_QUERY_MULTIVIEW_SUPPORT_PARAMS_VER1 #define NV_MULTIVIEW_MAX_SUPPORTED_VIEWS 4 #if defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_QueryMultiViewSupport // //! DESCRIPTION: Queries the support of MultiView feature on current setup and returns appropriate boolean value. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 410 //! //! \param [in] pDevice The ID3D11Device to use. //! \param [inout] pMultiViewSupportedParams Stores value of whether MultiView is supported on current setup or not. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_QueryMultiViewSupport(__in IUnknown *pDevice, __inout NV_QUERY_MULTIVIEW_SUPPORT_PARAMS *pQueryMultiViewSupportedParams); #endif //defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) //! SUPPORTED OS: Windows 7 and higher //! //! Used for setting the Mode for MultiView HW Feature. //! \ingroup dx typedef struct _NV_MULTIVIEW_PARAMS_V1 { NvU32 version; // _IN_ parameter struct version NvU32 numViews; // _IN_ Number of views to render. NvU32 renderTargetIndexOffset[NV_MULTIVIEW_MAX_SUPPORTED_VIEWS]; // _IN_ Offset between render targets for each of the per views. NvU8 independentViewportMaskEnable; // _IN_ Is the independent viewport mask enabled. } NV_MULTIVIEW_PARAMS_V1; typedef NV_MULTIVIEW_PARAMS_V1 NV_MULTIVIEW_PARAMS; #define NV_MULTIVIEW_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_MULTIVIEW_PARAMS_V1, 1) #define NV_MULTIVIEW_PARAMS_VER NV_MULTIVIEW_PARAMS_VER1 #if defined(__cplusplus) && defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_SetMultiViewMode // //! DESCRIPTION: Set the MultiView state //! //! \note Note that this is an asynchronous function and returns NVAPI_OK if all arguments are valid. //! Returned value NVAPI_OK does not reflect that MultiView is supported or is set in hardware. //! One must call NvAPI_D3D_QueryMultiViewSupport() to confirm that the current setup //! supports MultiView before calling this set-function. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 410 //! //! \param [in] pDevOrContext The ID3D11Device or ID3D11DeviceContext to use. //! \param [in] pMultiViewParams MultiView Params //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_SetMultiViewMode(__in IUnknown *pDevOrContext, __in NV_MULTIVIEW_PARAMS *pMultiViewParams); #endif //defined(__cplusplus) && defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) //! SUPPORTED OS: Windows 7 and higher //! //! Used to query the support of Lens Matched Shading HW feature //! \ingroup dx typedef struct _NV_QUERY_MODIFIED_W_SUPPORT_PARAMS { NvU32 version; // parameter struct version NvU32 bModifiedWSupported; // Modified W supported } NV_QUERY_MODIFIED_W_SUPPORT_PARAMS_V1; typedef NV_QUERY_MODIFIED_W_SUPPORT_PARAMS_V1 NV_QUERY_MODIFIED_W_SUPPORT_PARAMS; #define NV_QUERY_MODIFIED_W_SUPPORT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_QUERY_MODIFIED_W_SUPPORT_PARAMS_V1, 1) #define NV_QUERY_MODIFIED_W_SUPPORT_PARAMS_VER NV_QUERY_MODIFIED_W_SUPPORT_PARAMS_VER1 #if defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_QueryModifiedWSupport // //! DESCRIPTION: Queries the support of Modified W feature on current setup and returns appropriate boolean value. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDevice The ID3D11Device to use. //! \param [inout] pQueryModifiedWSupportedParams Stores value of whether Modified W is supported on current setup or not. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_QueryModifiedWSupport(__in IUnknown *pDev, __inout NV_QUERY_MODIFIED_W_SUPPORT_PARAMS *pQueryModifiedWSupportedParams); #endif //defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) //! SUPPORTED OS: Windows 7 and higher //! #define NV_MODIFIED_W_MAX_VIEWPORTS 16 typedef struct _NV_MODIFIED_W_COEFFICIENTS { float fA; // A coefficient in w' = w + Ax + By float fB; // B coefficient in w' = w + Ax + By float fAReserved; // reserved float fBReserved; // reserved float fReserved[2]; // reserved } NV_MODIFIED_W_COEFFICIENTS; typedef struct _NV_MODIFIED_W_PARAMS { NvU32 version; // parameter struct version NvU32 numEntries; // number of valid NV_MODIFIED_W_COEFFICIENTS structs in array NV_MODIFIED_W_COEFFICIENTS modifiedWCoefficients[NV_MODIFIED_W_MAX_VIEWPORTS]; // coefficients NvU32 id; // reserved NvU32 reserved[NV_MODIFIED_W_MAX_VIEWPORTS]; // reserved } NV_MODIFIED_W_PARAMS_V1; typedef NV_MODIFIED_W_PARAMS_V1 NV_MODIFIED_W_PARAMS; #define NV_MODIFIED_W_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_MODIFIED_W_PARAMS_V1, 1) #define NV_MODIFIED_W_PARAMS_VER NV_MODIFIED_W_PARAMS_VER1 #if defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_SetModifiedWMode // //! DESCRIPTION: Set the Modified W state and A,B coefficients for HW support //! //! \note Note that this is an asynchronous function and returns NVAPI_OK if all arguments are valid. //! Returned value NVAPI_OK does not reflect that Modified-W is supported or is set in hardware. //! One must call NvAPI_D3D_QueryModifiedWSupport() to confirm that the current setup //! supports Modified-W before calling this set-function. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDevOrContext The ID3D11Device or ID3D11DeviceContext to use. //! \param [in] psModifiedWParams Modified W parameters. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_SetModifiedWMode(__in IUnknown *pDevOrContext, __in NV_MODIFIED_W_PARAMS *psModifiedWParams); #endif //defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) #if defined(__cplusplus) && ( defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_QueryModifiedWSupport // //! DESCRIPTION: Queries the support of Modified-W feature on current setup and returns appropriate boolean value. //! //! SUPPORTED OS: Windows 10 //! //! //! \param [in] pDevice The ID3D12Device Device created by application //! \param [inout] pQueryModifiedWSupportedParams Stores value of whether Modified-W is supported on current setup or not. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_QueryModifiedWSupport(__in ID3D12Device *pDevice, __inout NV_QUERY_MODIFIED_W_SUPPORT_PARAMS *pQueryModifiedWSupportedParams); #endif // defined(__cplusplus) && ( defined(__d3d12_h__)) #if defined(__cplusplus) && ( defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_SetModifiedWMode // //! DESCRIPTION: Set the Modified-W state and A, B coefficients for HW support //! //! \note Note that Modified-W state persists on a particular CommandList till it is closed. //! The state is reset to default (disabled) for every newly created CommandList. //! One must call NvAPI_D3D12_QueryModifiedWSupport() to confirm that the current setup //! supports Modified-W before calling this set-function. //! //! SUPPORTED OS: Windows 10 //! //! //! \param [in] pCommandList The command list in which we will add push buffer commmands for enabling Modified-W feature //! Note: Command list of type D3D12_COMMAND_LIST_TYPE_BUNDLE is not allowed for setting the state of this feature. //! \param [in] pModifiedWParams Modified-W parameters. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_SetModifiedWMode(__in ID3D12GraphicsCommandList* pCommandList, __in NV_MODIFIED_W_PARAMS *pModifiedWParams); #endif // defined(__cplusplus) && ( defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__)) //! \ingroup dx //! See NvAPI_D3D_CreateLateLatchObject DECLARE_INTERFACE(ID3DLateLatchObject_V1) { STDMETHOD_(UINT,Release) (THIS) PURE; //! Release the created LateLatch object and associated buffers. STDMETHOD_(NvAPI_Status,Latch) (THIS_ __in IUnknown* pContext = NULL) PURE; //! Request to queue the latch operation to the GPU. STDMETHOD_(ID3D11Buffer*,GetD3D11Buffer) (THIS_ __in UINT index = 0) PURE; //! Get ID3D11Buffer* available at the given 'index' STDMETHOD_(UINT,GetBufferCount) (THIS) PURE; //! Returns the number of late latch buffers created for this LateLatchObject. STDMETHOD_(NvAPI_Status,UpdateData) (THIS_ __in void **ppData) PURE; //! Fully update all LateLatch buffers with new data. STDMETHOD_(NvAPI_Status,UpdateData) (THIS_ __in void *pData, __in size_t offset, __in size_t size, __in UINT index = 0) PURE; //! Partially update one of the LateLatch buffers with new data. }; //! \ingroup dx //! See NvAPI_D3D_CreateLateLatchObject typedef ID3DLateLatchObject_V1 ID3DLateLatchObject; #define ID3DLateLatchObject_VER1 MAKE_NVAPI_VERSION(ID3DLateLatchObject_V1, 1) #define ID3DLateLatchObject_VER ID3DLateLatchObject_VER1 typedef struct _NV_D3D_LATELATCH_OBJECT_DESC_V1 { NvU32 version; NvU32 numBuffers; // _IN_ Number of LateLatch buffers that the app wants to create. D3D11_BUFFER_DESC **ppBufferDesc; // _IN_ Description of buffers ID3DLateLatchObject **ppD3DLateLatchObject; // _Out_ Pointer to created interface } NV_D3D_LATELATCH_OBJECT_DESC_V1; typedef NV_D3D_LATELATCH_OBJECT_DESC_V1 NV_D3D_LATELATCH_OBJECT_DESC; #define NV_D3D_LATELATCH_OBJECT_DESC_VER1 MAKE_NVAPI_VERSION(NV_D3D_LATELATCH_OBJECT_DESC_V1, 1) #define NV_D3D_LATELATCH_OBJECT_DESC_VER NV_D3D_LATELATCH_OBJECT_DESC_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_CreateLateLatchObject // //! DESCRIPTION: Creates a Late Latch Object interface //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 384 //! //! \param [in] pDevice Current ID3D11Device. //! \param [inout] pLateLatchObjectDesc Pointer to in/out structure for late latch object creation //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_CreateLateLatchObject(__in IUnknown *pDevice, __inout NV_D3D_LATELATCH_OBJECT_DESC* pLateLatchObjectDesc); #endif // defined(__cplusplus) && (defined(__d3d11_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) //! \ingroup dx //! See NvAPI_D3D_QueryLateLatchSupport typedef struct _NV_QUERY_LATELATCH_SUPPORT_PARAMS { NvU32 version; //!< (IN) Parameter structure version NvU32 bLateLatchSupported; //!< (OUT) LateLatch supported } NV_QUERY_LATELATCH_SUPPORT_PARAMS_V1; typedef NV_QUERY_LATELATCH_SUPPORT_PARAMS_V1 NV_QUERY_LATELATCH_SUPPORT_PARAMS; #define NV_QUERY_LATELATCH_SUPPORT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_QUERY_LATELATCH_SUPPORT_PARAMS_V1, 1) #define NV_QUERY_LATELATCH_SUPPORT_PARAMS_VER NV_QUERY_LATELATCH_SUPPORT_PARAMS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_QueryLateLatchSupport // //! DESCRIPTION: Queries the support of DX11 Late Latch feature on current setup. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 384 //! //! \param [in] pDevice Current ID3D11Device. //! \param [inout] pQueryLateLatchSupportParams Stores value of whether Late Latch is supported on current setup or not. //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_QueryLateLatchSupport(__in IUnknown *pDevice, __inout NV_QUERY_LATELATCH_SUPPORT_PARAMS *pQueryLateLatchSupportParams); #endif // defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined (__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_RegisterDevice // //! DESCRIPTION: Tells NvAPI about a D3D device. This must be called prior to using any DX1x //! deferred-context calls. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] pDev The ID3D10Device or ID3D11Device to use. //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_RegisterDevice(__in IUnknown *pDev); #endif //if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_MultiDrawInstancedIndirect // //! DESCRIPTION: Extension of DrawInstancedIndirect that takes a draw count in. The effect of this function is to loop over //! that draw count and perform the DrawInstancedIndirect operation each time, incrementing the buffer offset //! by the supplied stride each time. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] *pDevContext11 Pointer to D3D11 device context (IC or DC) //! \param [in] drawCount Do DrawInstancedIndirect operation this many times //! \param [in] *pBuffer ID3D11Buffer that contains the command parameters //! \param [in] alignedByteOffsetForArgs Start in pBuffer of the command parameters //! \param [in] alignedByteStrideForArgs Stride of the command parameters - must be >= 4 * sizeof(NvU32) //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_D3D_DEVICE_NOT_REGISTERED When MultiDraw is called on a deferred context, and the device has not yet //! been registered (NvAPI_D3D_RegisterDevice), this error is returned. //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_MultiDrawInstancedIndirect(__in ID3D11DeviceContext *pDevContext11, __in NvU32 drawCount, __in ID3D11Buffer *pBuffer, __in NvU32 alignedByteOffsetForArgs, __in NvU32 alignedByteStrideForArgs); #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_MultiDrawIndexedInstancedIndirect // //! DESCRIPTION: Extension of DrawIndexedInstancedIndirect that takes a draw count in. The effect of this function is to loop over //! that draw count and perform the DrawIndexedInstancedIndirect operation each time, incrementing the buffer offset //! by the supplied stride each time. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] *pDevContext11 Pointer to D3D11 device context (IC or DC) //! \param [in] drawCount Do DrawIndexedInstancedIndirect operation this many times //! \param [in] *pBuffer ID3D11Buffer that contains the command parameters //! \param [in] alignedByteOffsetForArgs Start in pBuffer of the command parameters //! \param [in] alignedByteStrideForArgs Stride of the command parameters - must be >= 5 * sizeof(NvU32) //! //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \retval NVAPI_D3D_DEVICE_NOT_REGISTERED When MultiDraw is called on a deferred context, and the device has not yet //! been registered (NvAPI_D3D_RegisterDevice), this error is returned. //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_MultiDrawIndexedInstancedIndirect(__in ID3D11DeviceContext *pDevContext11, __in NvU32 drawCount, __in ID3D11Buffer *pBuffer, __in NvU32 alignedByteOffsetForArgs, __in NvU32 alignedByteStrideForArgs); #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && ( defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) ) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_ImplicitSLIControl // //! This function enables/disables the SLI rendering mode. It has to be called prior to D3D device creation. Once this function is called with DISABLE_IMPLICIT_SLI //! parameter all subsequently created devices will be forced to run in a single gpu mode until the same function is called with ENABLE_IMPLICIT_SLI parameter. The enable //! call will force all subsequently created devices to run in default implicit SLI mode being determined by an application profile or a global control panel SLI setting. //! This NvAPI call is supported in all DX10+ versions of the driver. It is supported on all Windows versions. //! //! \retval NVAPI_OK Completed request //! \retval NVAPI_ERROR Error occurred //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// //! \ingroup dx typedef enum _IMPLICIT_SLI_CONTROL { DISABLE_IMPLICIT_SLI = 0, ENABLE_IMPLICIT_SLI = 1, } IMPLICIT_SLI_CONTROL; //! \ingroup dx NVAPI_INTERFACE NvAPI_D3D_ImplicitSLIControl(__in IMPLICIT_SLI_CONTROL implicitSLIControl); #endif //defined (__cplusplus) && ( defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) ) //! SUPPORTED OS: Windows 7 and higher //! #if defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) ) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_GetLowLatencySupport // //! DESCRIPTION: Query support for low latency nodes //! \deprecated Do not use this function - it is deprecated in release 370. Instead, use NvAPI_D3D1x_QueryLowLatencySupport. //! //! //! \param [in] adapterId The adapter ID that specifies the GPU to query. //! \param [out] pIsLowLatencySupported Returns true if and only if low latency nodes are supported. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! \retval NVAPI_INVALID_POINTER A NULL pointer was passed //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 370. Instead, use NvAPI_D3D1x_QueryLowLatencySupport.") NVAPI_INTERFACE NvAPI_D3D1x_GetLowLatencySupport(__in LUID pAdapterId, __out BOOL *pIsLowLatencySupported); #endif //defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) ) //! SUPPORTED OS: Windows 7 and higher //! #if defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) ) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_QueryLowLatencySupport // //! DESCRIPTION: Query support for low latency nodes //! //! \since Release: 370 //! //! \param [in] adapterId The adapter ID that specifies the GPU to query. //! \param [out] pIsLowLatencySupported Returns true if and only if low latency nodes are supported. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_QueryLowLatencySupport(__in LUID pAdapterId, __out BOOL *pIsLowLatencySupported); #endif //defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) ) #if defined (__cplusplus) && defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_GetNeedsAppFPBlendClamping // //! \code //! DESCRIPTION: This function returns whether the application needs to do FP blend clamping itself //! //! \param [in] pDev Current d3d device //! \param [out] pAppClampNeeded If true, app needs to clamp. If false, HW does the clamping //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \since Release: 375 //! //! SUPPORTED OS: Windows 7 and higher //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_GetNeedsAppFPBlendClamping(__in IUnknown *pDev, __out bool *pAppClampNeeded); #endif //defined (__cplusplus) && defined(__d3d11_h__) #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_GetNeedsAppFPBlendClamping // //! \code //! DESCRIPTION: This function returns whether the application needs to do FP blend clamping itself //! //! \param [in] pDevice Current d3d device //! \param [out] pAppClampNeeded If true, app needs to clamp. If false, HW does the clamping //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \since Release: 375 //! //! SUPPORTED OS: Windows 10 //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_GetNeedsAppFPBlendClamping(__in ID3D12Device *pDevice, __out bool *pAppClampNeeded); #endif //defined(__cplusplus) && defined(__d3d12_h__) //! SUPPORTED OS: Windows 10 //! #if defined (__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_UseDriverHeapPriorities // //! \code //! DESCRIPTION: Sets the driver to override Microsoft's heap allocation priority values with Nvidia driver priority values. Use this once per process before allocating resources. //! //! \param [in] pDevice The IDirect3DDevice12 to use. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \since Release: 381 //! //! \endcode //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_UseDriverHeapPriorities(__in ID3D12Device *pDevice); #endif // defined (__cplusplus) && defined(__d3d12_h__) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && ( defined(__d3d12_h__)) typedef struct _NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS { __in NvU32 version; //!< Structure version __in ID3D12Device *pDevice; //!< The ID3D12Device created by application. __in ID3D12Resource *pSwapChainBuffer; //!< The ID3D12Resource part of the application swap chain that has companion allocations. __in NvU32 companionBufferCount; //!< The number of ID3D12Resource pointers requested to be returned in the ppComanionResources array, which should match ID3D12Device::GetNodeCount for the complete set of companion allocations. __inout ID3D12Resource **ppCompanionResources; //!< An array of ID3D12Resource pointers sized to match companionBufferCount, which will receive the companion allocations. } NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS_V1; typedef NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS_V1 NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS; #define NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS_VER1 MAKE_NVAPI_VERSION(NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS_V1, 1) #define NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS_VER NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_Mosaic_GetCompanionAllocations // //! DESCRIPTION: Queries the driver for internally created allocations that accompany a swap chain buffer for present-related operations. //! Surfaces returned by this interface must be destroied at the same time that the original swap chain buffer is destroyed. //! In general this occurs prior to a ResizeBuffers call, or when the swap chain is released. //! Note that this function only works in Landscape orientation due to Windows behavior, and attempts to utilize it with any type of display //! rotation will result in failure. //! //! \param [inout] companionBufferCount The parameters for this function. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! \retval NVAPI_INVALID_CALL System configuration does not support this interface (eg, display is rotated, mosaic not enabled, etc) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_Mosaic_GetCompanionAllocations(__inout NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS *params); #endif // defined(__cplusplus) && ( defined(__d3d12_h__)) //! SUPPORTED OS: Windows 10 and higher //! #if defined(__cplusplus) && ( defined(__d3d12_h__)) typedef struct _NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS { __in NvU32 version; //!< Structure version __in ID3D12Device *pDevice; //!< The ID3D12Device created by application. __in ID3D12Resource *pSwapChainBuffer; //!< The ID3D12Resource part of the application swap chain. __inout NvU32 *pPartitionCount; //!< A variable to receive the number of NV_MGPU_MOSAIC_DISPLAY_SURFACE_PARTITION elements returned or that holds the size of pPartitions when it is non-NULL. __inout RECT *pViewport; //!< An optional array to hold the viewport information per partition. When this is valid pNodeMask must also be valid. __inout NvU32 *pNodeMask; //!< An optional array to hold the GPU mask where this viewport must be valid per partition. When this is valid pViewport must also be valid. } NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS_V1; typedef NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS_V1 NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS; #define NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS_VER1 MAKE_NVAPI_VERSION(NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS_V1, 1) #define NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS_VER NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_Mosaic_GetViewportAndGpuPartitions // //! DESCRIPTION: Queries the driver for how a swap chain display surface is subdivided across devices in relation to display connectivity. //! Call this interface with NULL pPartitions in order to know how many subdivisions exist and allocate the proper size to hold all data. //! Call it a second time with a properly sized partitions array to receive all subdivisions along with GPU node masks of each rectangle. //! Note that this function only works in Landscape orientation due to Windows behavior, and attempts to utilize it with any type of display //! rotation will result in failure. //! //! \param [inout] params The parameters for this function. //! //! \retval NVAPI_OK Call succeeded. //! \retval NVAPI_ERROR Call failed. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid. //! \retval NVAPI_INVALID_CALL System configuration does not support this interface (eg, display is rotated, mosaic not enabled, etc) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_Mosaic_GetViewportAndGpuPartitions(__inout NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS *params); #endif // defined(__cplusplus) && ( defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__)) //! \ingroup dx //! See NvAPI_D3D1x_GetGraphicsCapabilities typedef struct _NV_D3D1x_GRAPHICS_CAPS_V1 { NvU32 bExclusiveScissorRectsSupported : 1; //!< (OUT) Outputs whether Exclusive Scissor Rects are supported or not NvU32 bVariablePixelRateShadingSupported : 1; //!< (OUT) Outputs whether Variable Pixel Shading Rates are supported or not NvU32 reservedBits : 30; // Reserved bits for future expansion NvU32 reserved[7]; // Reserved for future expansion } NV_D3D1x_GRAPHICS_CAPS_V1; #define NV_D3D1x_GRAPHICS_CAPS_VER1 MAKE_NVAPI_VERSION(NV_D3D1x_GRAPHICS_CAPS_V1, 1) typedef struct _NV_D3D1x_GRAPHICS_CAPS_V2 { NvU32 bExclusiveScissorRectsSupported : 1; //!< (OUT) Outputs whether Exclusive Scissor Rects are supported or not NvU32 bVariablePixelRateShadingSupported : 1; //!< (OUT) Outputs whether Variable Pixel Shading Rates are supported or not NvU32 bFastUAVClearSupported : 1; //!< (OUT) Outputs whether UAVClear is implemented using ZBC rather than compute shader NvU32 reservedBits : 29; // Reserved bits for future expansion NvU16 majorSMVersion; //!< (OUT) Major SM version of the device NvU16 minorSMVersion; //!< (OUT) Minor SM version of the device NvU32 reserved[14]; // Reserved for future expansion } NV_D3D1x_GRAPHICS_CAPS_V2; typedef NV_D3D1x_GRAPHICS_CAPS_V2 NV_D3D1x_GRAPHICS_CAPS; #define NV_D3D1x_GRAPHICS_CAPS_VER2 MAKE_NVAPI_VERSION(NV_D3D1x_GRAPHICS_CAPS_V2, 2) #define NV_D3D1x_GRAPHICS_CAPS_VER NV_D3D1x_GRAPHICS_CAPS_VER2 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_GetGraphicsCapabilities // //! DESCRIPTION: Get the graphics capabilities for current hardware/software setup //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 410 //! //! \param [in] pDevice The ID3D11Device device to be used for getting the graphics capabilities. //! \param [in] structVersion Version of the caps struct. Should be set to NV_D3D1x_GRAPHICS_CAPS_VER. //! \param [inout] pGraphicsCaps Pointer to a NV_D3D1x_GRAPHICS_CAPS_CAPS struct created by app. //! Graphics capabilities will be filled in this struct by the driver. //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_GetGraphicsCapabilities(__in IUnknown *pDevice, __in NvU32 structVersion, __inout NV_D3D1x_GRAPHICS_CAPS *pGraphicsCaps); #endif // defined(__cplusplus) && (defined(__d3d11_h__)) #if defined(__cplusplus) && (defined(__d3d12_h__)) //! \ingroup dx //! See NvAPI_D3D12_GetGraphicsCapabilities typedef struct _NV_D3D12_GRAPHICS_CAPS_V1 { NvU32 bExclusiveScissorRectsSupported : 1; //!< (OUT) Outputs whether Exclusive Scissor Rects are supported or not NvU32 bVariablePixelRateShadingSupported : 1; //!< (OUT) Outputs whether Variable Pixel Shading Rates are supported or not NvU32 bFastUAVClearSupported : 1; //!< (OUT) Outputs whether UAVClear is implemented using ZBC rather than compute shader NvU32 reservedBits : 29; // Reserved bits for future expansion NvU16 majorSMVersion; //!< (OUT) Major SM version of the device NvU16 minorSMVersion; //!< (OUT) Minor SM version of the device NvU32 reserved[6]; // Reserved for future expansion } NV_D3D12_GRAPHICS_CAPS_V1; typedef NV_D3D12_GRAPHICS_CAPS_V1 NV_D3D12_GRAPHICS_CAPS; #define NV_D3D12_GRAPHICS_CAPS_VER1 MAKE_NVAPI_VERSION(NV_D3D12_GRAPHICS_CAPS_V1, 1) #define NV_D3D12_GRAPHICS_CAPS_VER NV_D3D12_GRAPHICS_CAPS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D12_GetGraphicsCapabilities // //! DESCRIPTION: Get the graphics capabilities for current hardware/software setup //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release: 410 //! //! \param [in] pDevice The ID3D12Device device to be used for getting the graphics capabilities. //! \param [in] structVersion Version of the caps struct. Should be set to NV_D3D12_GRAPHICS_CAPS_VER. //! \param [inout] pGraphicsCaps Pointer to a NV_D3D12_GRAPHICS_CAPS_CAPS struct created by app. //! Graphics capabilities will be filled in this struct by the driver. //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D12_GetGraphicsCapabilities(__in IUnknown *pDevice, __in NvU32 structVersion, __inout NV_D3D12_GRAPHICS_CAPS *pGraphicsCaps); #endif // defined(__cplusplus) && (defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) #define NV_MAX_NUM_EXCLUSIVE_SCISSOR_RECTS 16 #endif // defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__)) //! \ingroup dx //! See NvAPI_D3D11_RSSetExclusiveScissorRects typedef struct _NV_D3D11_EXCLUSIVE_SCISSOR_RECT_DESC_V1 { bool enableExclusiveScissorRect; //!< (IN) Control of enabling Exclusive ScissorRect per rect D3D11_RECT scissorRect; //!< (IN) Single rect dimensions } NV_D3D11_EXCLUSIVE_SCISSOR_RECT_DESC_V1; typedef struct _NV_D3D11_EXCLUSIVE_SCISSOR_RECTS_DESC_V1 { NvU32 version; //!< (IN) Parameter struct version NvU32 numRects; //!< (IN) Number of Exclusive Scissor Rects to be set. // \note Passing zero will globally disable Exclusive Scissor Rects // \note Max value can be equal to NV_MAX_NUM_EXCLUSIVE_SCISSOR_RECTS NV_D3D11_EXCLUSIVE_SCISSOR_RECT_DESC_V1 *pRects; //!< (IN) Array of NV_D3D11_EXCLUSIVE_SCISSOR_RECT_DESC with number of elements equal to Exclusive Scissor Rects } NV_D3D11_EXCLUSIVE_SCISSOR_RECTS_DESC_V1; typedef NV_D3D11_EXCLUSIVE_SCISSOR_RECTS_DESC_V1 NV_D3D11_EXCLUSIVE_SCISSOR_RECTS_DESC; typedef NV_D3D11_EXCLUSIVE_SCISSOR_RECT_DESC_V1 NV_D3D11_EXCLUSIVE_SCISSOR_RECT_DESC; #define NV_D3D11_EXCLUSIVE_SCISSOR_RECTS_DESC_VER1 MAKE_NVAPI_VERSION(NV_D3D11_EXCLUSIVE_SCISSOR_RECTS_DESC_V1, 1) #define NV_D3D11_EXCLUSIVE_SCISSOR_RECTS_DESC_VER NV_D3D11_EXCLUSIVE_SCISSOR_RECTS_DESC_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_RSSetExclusiveScissorRects // //! DESCRIPTION: Sets Exclusive Scissor Rects. The content bounded within the Scissor Rects //! will be excluded from rendering unlike regular Scissor Rects. These are //! orthogonal with Regular Scissor Rects. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 410 //! //! \param [in] pContext The device context (ID3D11DeviceContext) to be used for setting the Exclusive Scissor Rects. //! \param [in] pExclusiveScissorRectsDesc Description of the Exclusive Scissor Rects duly filled with their dimensions //! and control over enablement of individual ScissorRect //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_RSSetExclusiveScissorRects(__in IUnknown *pContext, __in NV_D3D11_EXCLUSIVE_SCISSOR_RECTS_DESC *pExclusiveScissorRectsDesc); #endif // defined(__cplusplus) && (defined(__d3d11_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) //! \ingroup dx //! See NvAPI_D3D11_RSSetViewportsPixelShadingRates #define NV_MAX_PIXEL_SHADING_RATES 16 // Currently only 12 Shading Rates are available #define NV_MAX_NUM_VIEWPORTS 16 // Every element in Shading Rate Resource represents the shading rate for all pixels in the corresponding tile // The Shading Rate Resource dimensions must be the bound render target size divided by the tile dimensions (width/height) #define NV_VARIABLE_PIXEL_SHADING_TILE_WIDTH 16 // Width of the tile, in pixels #define NV_VARIABLE_PIXEL_SHADING_TILE_HEIGHT 16 // Height of the tile, in pixels typedef enum { NV_PIXEL_X0_CULL_RASTER_PIXELS, // No shading, tiles are culled NV_PIXEL_X16_PER_RASTER_PIXEL, // 16 shading passes per 1 raster pixel NV_PIXEL_X8_PER_RASTER_PIXEL, // 8 shading passes per 1 raster pixel NV_PIXEL_X4_PER_RASTER_PIXEL, // 4 shading passes per 1 raster pixel NV_PIXEL_X2_PER_RASTER_PIXEL, // 2 shading passes per 1 raster pixel NV_PIXEL_X1_PER_RASTER_PIXEL, // Per-pixel shading NV_PIXEL_X1_PER_2X1_RASTER_PIXELS, // 1 shading pass per 2 raster pixels NV_PIXEL_X1_PER_1X2_RASTER_PIXELS, // 1 shading pass per 2 raster pixels NV_PIXEL_X1_PER_2X2_RASTER_PIXELS, // 1 shading pass per 4 raster pixels NV_PIXEL_X1_PER_4X2_RASTER_PIXELS, // 1 shading pass per 8 raster pixels NV_PIXEL_X1_PER_2X4_RASTER_PIXELS, // 1 shading pass per 8 raster pixels NV_PIXEL_X1_PER_4X4_RASTER_PIXELS // 1 shading pass per 16 raster pixels } NV_PIXEL_SHADING_RATE; #endif // defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__)) typedef struct _NV_D3D11_VIEWPORT_SHADING_RATE_DESC_V1 { bool enableVariablePixelShadingRate; //!< (IN) Control of enabling Variable Pixel Shading Rate per viewport NV_PIXEL_SHADING_RATE shadingRateTable[NV_MAX_PIXEL_SHADING_RATES]; //!< (IN) Lookup table of converting Shading Rate Index to NV_PIXEL_SHADING_RATE // \note Shading Rate Resource View would be populated by application with indices of this table } NV_D3D11_VIEWPORT_SHADING_RATE_DESC_V1; typedef struct _NV_D3D11_VIEWPORTS_SHADING_RATE_DESC_V1 { NvU32 version; //!< (IN) Struct version NvU32 numViewports; //!< (IN) Number of viewports with shading rate set. // \note Passing zero will globally disable Variable Pixel Rate Shading for all viewports immaterial of values in pViewports // \note Max value can be equal to NV_MAX_NUM_VIEWPORTS NV_D3D11_VIEWPORT_SHADING_RATE_DESC_V1 *pViewports; //!< (IN) Array of NV_D3D11_VIEWPORT_SHADING_RATE_DESC with number of elements equal to NumViewports } NV_D3D11_VIEWPORTS_SHADING_RATE_DESC_V1; typedef NV_D3D11_VIEWPORTS_SHADING_RATE_DESC_V1 NV_D3D11_VIEWPORTS_SHADING_RATE_DESC; typedef NV_D3D11_VIEWPORT_SHADING_RATE_DESC_V1 NV_D3D11_VIEWPORT_SHADING_RATE_DESC; #define NV_D3D11_VIEWPORTS_SHADING_RATE_DESC_VER1 MAKE_NVAPI_VERSION(NV_D3D11_VIEWPORTS_SHADING_RATE_DESC_V1, 1) #define NV_D3D11_VIEWPORTS_SHADING_RATE_DESC_VER NV_D3D11_VIEWPORTS_SHADING_RATE_DESC_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_RSSetViewportsPixelShadingRates // //! DESCRIPTION: Sets Pixel Shading Rates and Enables/Disables per-viewport Variable Pixel Shading Rate feature //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 410 //! //! \param [in] pContext The device context (ID3D11DeviceContext) to be used for setting the Viewports Shading Rates //! \param [in] pShadingRateDesc Shading rate descriptor //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_RSSetViewportsPixelShadingRates(__in IUnknown *pContext, __in NV_D3D11_VIEWPORTS_SHADING_RATE_DESC *pShadingRateDesc); #endif // defined(__cplusplus) && (defined(__d3d11_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) typedef enum _NV_SRRV_DIMENSION { NV_SRRV_DIMENSION_TEXTURE2D = 4, NV_SRRV_DIMENSION_TEXTURE2DARRAY = 5, } NV_SRRV_DIMENSION; typedef struct _NV_TEX2D_SRRV { UINT MipSlice; } NV_TEX2D_SRRV; typedef struct _NV_TEX2D_ARRAY_SRRV { UINT MipSlice; UINT FirstArraySlice; UINT ArraySize; } NV_TEX2D_ARRAY_SRRV; #endif // defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__)) typedef struct _NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC_V1 { NvU32 version; //!< (IN) Parameter struct version DXGI_FORMAT Format; //!< (IN) Format of the resource used as Shading Rate Surface. Should be either DXGI_FORMAT_R8_UINT or DXGI_FORMAT_R8_TYPELESS NV_SRRV_DIMENSION ViewDimension; //!< (IN) This declares whether the Shading Rate Surface is a simple 2D Texture or Array of 2D Textures union { NV_TEX2D_SRRV Texture2D; NV_TEX2D_ARRAY_SRRV Texture2DArray; }; } NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC_V1; typedef NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC_V1 NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC; #define NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC_VER1 MAKE_NVAPI_VERSION(NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC_V1, 1) #define NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC_VER NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC_VER1 DECLARE_INTERFACE_(__declspec(uuid("E14BE7F6-8FF5-4F5E-B63A-AD016EB8FBE5"))ID3D11NvShadingRateResourceView_V1, ID3D11View) { BEGIN_INTERFACE // *** IUnknown methods *** STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // **** ID3D11View method **/ // Get Shading Rate Resource used while creating the Shading Rate Resource View STDMETHOD_(void,GetResource)(THIS_ _Outptr_ ID3D11Resource **ppResource) PURE; // ** ID3D11NvShadingRateResourceView methods *** // The descriptor used while creating the Shading Rate Resource View STDMETHOD(GetDesc)(THIS_ NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC* pDesc) PURE; END_INTERFACE }; typedef ID3D11NvShadingRateResourceView_V1 ID3D11NvShadingRateResourceView; #define ID3D11NvShadingRateResourceView_VER1 MAKE_NVAPI_VERSION(ID3D11NvShadingRateResourceView_V1, 1) #define ID3D11NvShadingRateResourceView_VER ID3D11NvShadingRateResourceView_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_CreateShadingRateResourceView // //! DESCRIPTION: Creates Shading Rate Resource View by taking ID3D11Resource as an input Shading Rate Surface. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 410 //! //! \param [in] pDevice The device to be used for creating the Shading Rate Resource View //! \param [in] pShadingRateResource Shading Rate Resource on which the view is to be created. //! \note This should be of format DXGI_FORMAT_R8_UINT or DXGI_FORMAT_R8_TYPELESS //! \note This should be confined to size calculated using render target dimensions, //! NV_VARIABLE_PIXEL_SHADING_TILE_WIDTH and NV_VARIABLE_PIXEL_SHADING_TILE_HEIGHT //! \param [in] pShadingRateDesc Shading Rate Resource View descriptor //! \param [out] ppShadingRateResourceView Address of a pointer to ID3D11NvShadingRateResourceView for returning the newly created Shading Rate Resource View //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_CreateShadingRateResourceView(__in ID3D11Device *pDevice, __in ID3D11Resource *pShadingRateResource, __in NV_D3D11_SHADING_RATE_RESOURCE_VIEW_DESC *pShadingRateResourceViewDesc, __out ID3D11NvShadingRateResourceView **ppShadingRateResourceView); #endif // defined(__cplusplus) && (defined(__d3d11_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_RSSetShadingRateResourceView // //! DESCRIPTION: Sets Shading Rate Resource View //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 410 //! //! \param [in] pContext The device context (ID3D11DeviceContext) used for setting the Shading Rate Resource View //! \param [out] pShadingRateResourceView Shading Rate Resource View to be set //! \note See NvAPI_D3D11_CreateShadingRateResourceView //! \note Passing this as null will reset Shading Rate Resource View to defaults //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_RSSetShadingRateResourceView(__in IUnknown *pContext, __in ID3D11NvShadingRateResourceView *pShadingRateResourceView); #endif // defined(__cplusplus) && (defined(__d3d11_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) //! \ingroup dx //! See NvAPI_D3D11_RSGetPixelShadingRateSampleOrder //! See NvAPI_D3D11_RSSetPixelShadingRateSampleOrder // X, Y = sample position. S = sample number. // The inner-most dimension is the sample number, followed by X and Y. typedef struct _NV_PIXEL_SRSO_1x2 { struct NV_PIXEL_SRSO_1x2_X1 { NvU8 Y[2]; } X1; struct NV_PIXEL_SRSO_1x2_X2 { NvU8 YS[2][2]; } X2; struct NV_PIXEL_SRSO_1x2_X4 { NvU8 YS[2][4]; } X4; struct NV_PIXEL_SRSO_1x2_X8 { NvU8 YS[2][8]; } X8; } NV_PIXEL_SRSO_1x2; typedef struct _NV_PIXEL_SRSO_2x1 { struct NV_PIXEL_SRSO_2x1_X1 { NvU8 X[2]; } X1; struct NV_PIXEL_SRSO_2x1_X2 { NvU8 XS[2][2]; } X2; struct NV_PIXEL_SRSO_2x1_X4 { NvU8 XS[2][4]; } X4; } NV_PIXEL_SRSO_2x1; typedef struct _NV_PIXEL_SRSO_2x2 { struct NV_PIXEL_SRSO_2x2_X1 { NvU8 YX[2][2]; } X1; struct NV_PIXEL_SRSO_2x2_X2 { NvU8 YXS[2][2][2]; } X2; struct NV_PIXEL_SRSO_2x2_X4 { NvU8 YXS[2][2][4]; } X4; } NV_PIXEL_SRSO_2x2; typedef struct _NV_PIXEL_SRSO_2x4 { struct NV_PIXEL_SRSO_2x4_X1 { NvU8 YX[4][2]; } X1; struct NV_PIXEL_SRSO_2x4_X2 { NvU8 YXS[4][2][2]; } X2; } NV_PIXEL_SRSO_2x4; typedef struct _NV_PIXEL_SRSO_4x2 { struct NV_PIXEL_SRSO_4x2_X1 { NvU8 YX[2][4]; } X1; } NV_PIXEL_SRSO_4x2; typedef struct _NV_PIXEL_SRSO_4x4 { struct NV_PIXEL_SRSO_4x4_X1 { NvU8 YX[4][4]; } X1; } NV_PIXEL_SRSO_4x4; typedef struct _NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE_V1 { NvU32 version; NV_PIXEL_SRSO_1x2 Pixel_1x2; NV_PIXEL_SRSO_2x1 Pixel_2x1; NV_PIXEL_SRSO_2x2 Pixel_2x2; NV_PIXEL_SRSO_2x4 Pixel_2x4; NV_PIXEL_SRSO_4x2 Pixel_4x2; NV_PIXEL_SRSO_4x4 Pixel_4x4; } NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE_V1; typedef NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE_V1 NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE; #define NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE_VER1 MAKE_NVAPI_VERSION(NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE_V1, 1) #define NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE_VER NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE_VER1 #endif // defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_RSGetPixelShadingRateSampleOrder // //! DESCRIPTION: Get the Sample Order for Variable Shading Rate //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 410 //! //! \param [in] pContext The device context (ID3D11DeviceContext) used for getting the Shading Rate Sample Order //! \param [out] pSampleOrderTable A pointer to NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE where the current Sample Order for Variable Pixel Rate Shading that is returned //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_RSGetPixelShadingRateSampleOrder(__in IUnknown *pContext, __out NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE* pSampleOrderTable); #endif // defined(__cplusplus) && (defined(__d3d11_h__)) #if defined(__cplusplus) && (defined(__d3d11_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D11_RSSetPixelShadingRateSampleOrder // //! DESCRIPTION: Set the Sample Order for Variable Shading Rate //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 410 //! //! \param [in] pContext The device context (ID3D11DeviceContext) used for setting the Shading Rate Sample Order //! \param [out] pSampleOrderTable Sample Order for Variable Shading Rate to be set //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D11_RSSetPixelShadingRateSampleOrder(__in IUnknown *pContext, __in NV_PIXEL_SHADING_RATE_SAMPLE_ORDER_TABLE* pSampleOrderTable); #endif // defined(__cplusplus) && (defined(__d3d11_h__)) //! SUPPORTED OS: Windows 7 and higher //! #if defined(__cplusplus) && (defined(__d3d11_h__)) typedef struct _NV_VRS_HELPER_LATCH_GAZE_PARAMS_V1 { NvU32 version; //!< (IN) Struct version NvU32 flags; //!< (IN) Reserved for future use } NV_VRS_HELPER_LATCH_GAZE_PARAMS_V1; typedef NV_VRS_HELPER_LATCH_GAZE_PARAMS_V1 NV_VRS_HELPER_LATCH_GAZE_PARAMS; #define NV_VRS_HELPER_LATCH_GAZE_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_VRS_HELPER_LATCH_GAZE_PARAMS_V1, 1) #define NV_VRS_HELPER_LATCH_GAZE_PARAMS_VER NV_VRS_HELPER_LATCH_GAZE_PARAMS_VER1 typedef enum _NV_VRS_CONTENT_TYPE { NV_VRS_CONTENT_TYPE_INVALID = 0x0, NV_VRS_CONTENT_TYPE_FOVEATED_RENDERING = 0x1, NV_VRS_CONTENT_TYPE_MAX = NV_VRS_CONTENT_TYPE_FOVEATED_RENDERING } NV_VRS_CONTENT_TYPE; typedef enum _NV_FOVEATED_RENDERING_SHADING_RATE_PRESET { NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_INVALID = 0, NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_HIGHEST_PERFORMANCE = 1, NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_HIGH_PERFORMANCE = 2, NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_BALANCED = 3, NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_HIGH_QUALITY = 4, NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_HIGHEST_QUALITY = 5, NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_CUSTOM = 6, NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_MAX = NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_CUSTOM } NV_FOVEATED_RENDERING_SHADING_RATE_PRESET; typedef struct _NV_FOVEATED_RENDERING_CUSTOM_SHADING_RATE_PRESET_DESC_V1 { NvU32 version; NV_PIXEL_SHADING_RATE InnerMostRegionShadingRate; //!< (IN) Shading Rate for the inner-most region of the foveated rendering pattern NV_PIXEL_SHADING_RATE MiddleRegionShadingRate; //!< (IN) Shading Rate for the middle region of the foveated rendering pattern NV_PIXEL_SHADING_RATE PeripheralRegionShadingRate; //!< (IN) Shading Rate for the peripheral region of the foveated rendering pattern } NV_FOVEATED_RENDERING_CUSTOM_SHADING_RATE_PRESET_DESC_V1; typedef NV_FOVEATED_RENDERING_CUSTOM_SHADING_RATE_PRESET_DESC_V1 NV_FOVEATED_RENDERING_CUSTOM_SHADING_RATE_PRESET_DESC; #define NV_FOVEATED_RENDERING_CUSTOM_SHADING_RATE_PRESET_DESC_VER1 MAKE_NVAPI_VERSION(NV_FOVEATED_RENDERING_CUSTOM_SHADING_RATE_PRESET_DESC_V1, 1) #define NV_FOVEATED_RENDERING_CUSTOM_SHADING_RATE_PRESET_DESC_VER NV_FOVEATED_RENDERING_CUSTOM_SHADING_RATE_PRESET_DESC_VER1 typedef enum _NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET { NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET_INVALID = 0, NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET_WIDE = 1, NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET_BALANCED = 2, NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET_NARROW = 3, NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET_CUSTOM = 4, NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET_MAX = NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET_CUSTOM } NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET; typedef struct _NV_FOVEATED_RENDERING_CUSTOM_FOVEATION_PATTERN_PRESET_DESC_V1 { NvU32 version; float fInnermostRadii[2]; //!< (IN) Horizontal and vertical radius for the inner-most region of the foveated rendering pattern float fMiddleRadii[2]; //!< (IN) Horizontal and vertical radius for the middle region of the foveated rendering pattern float fPeripheralRadii[2]; //!< (IN) Horizontal and vertical radius for the peripheral region of the foveated rendering pattern } NV_FOVEATED_RENDERING_CUSTOM_FOVEATION_PATTERN_PRESET_DESC_V1; typedef NV_FOVEATED_RENDERING_CUSTOM_FOVEATION_PATTERN_PRESET_DESC_V1 NV_FOVEATED_RENDERING_CUSTOM_FOVEATION_PATTERN_PRESET_DESC; #define NV_FOVEATED_RENDERING_CUSTOM_FOVEATION_PATTERN_PRESET_DESC_VER1 MAKE_NVAPI_VERSION(NV_FOVEATED_RENDERING_CUSTOM_FOVEATION_PATTERN_PRESET_DESC_V1, 1) #define NV_FOVEATED_RENDERING_CUSTOM_FOVEATION_PATTERN_PRESET_DESC_VER NV_FOVEATED_RENDERING_CUSTOM_FOVEATION_PATTERN_PRESET_DESC_VER1 typedef struct _NV_FOVEATED_RENDERING_DESC_V1 { NvU32 version; //!< (IN) Struct version NvU32 flags; //!< (IN) Reserved for future use NV_FOVEATED_RENDERING_SHADING_RATE_PRESET ShadingRatePreset; //!< (IN) Preset of the shading rate NV_FOVEATED_RENDERING_CUSTOM_SHADING_RATE_PRESET_DESC_V1 ShadingRateCustomPresetDesc; //!< (IN) To be provided only if ShadingRatePreset is NV_FOVEATED_RENDERING_SHADING_RATE_PRESET_CUSTOM NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET FoveationPatternPreset; //!< (IN) Preset of the foveation pattern NV_FOVEATED_RENDERING_CUSTOM_FOVEATION_PATTERN_PRESET_DESC_V1 FoveationPatternCustomPresetDesc; //!< (IN) To be provided only if FoveationPatternPreset is NV_FOVEATED_RENDERING_FOVEATION_PATTERN_PRESET_CUSTOM NvU32 GazeDataDeviceId; //!< (IN) ID of the gaze data provider. Needed only for supporting more than one device with eye tracking. // Should be 0 if gaze data is provided only from a single device. Should be less than (MAX_NUMBER_OF_GAZE_DATA_PROVIDERS - 1) } NV_FOVEATED_RENDERING_DESC_V1; typedef NV_FOVEATED_RENDERING_DESC_V1 NV_FOVEATED_RENDERING_DESC; #define NV_FOVEATED_RENDERING_DESC_VER1 MAKE_NVAPI_VERSION(NV_FOVEATED_RENDERING_DESC_V1, 1) #define NV_FOVEATED_RENDERING_DESC_VER NV_FOVEATED_RENDERING_DESC_VER1 typedef enum _NV_VRS_RENDER_MODE { NV_VRS_RENDER_MODE_INVALID = 0, NV_VRS_RENDER_MODE_MONO = 1, // States mono rendering on the entire render target NV_VRS_RENDER_MODE_LEFT_EYE = 2, // States Left eye rendering of a stereo pair on the entire render target NV_VRS_RENDER_MODE_RIGHT_EYE = 3, // States Right eye rendering of a stereo pair on the entire render target NV_VRS_RENDER_MODE_STEREO = 4, // States side-by-side stereo rendering on the render target NV_VRS_RENDER_MODE_MAX = NV_VRS_RENDER_MODE_STEREO } NV_VRS_RENDER_MODE; #define MAX_NUMBER_OF_GAZE_DATA_PROVIDERS 8 // Maximum number of gaze data providers / devices. typedef struct _NV_VRS_HELPER_ENABLE_PARAMS_V1 { NvU32 version; //!< (IN) Struct version NvU32 flags; //!< (IN) Reserved for future use NV_VRS_RENDER_MODE RenderMode; //!< (IN) This defines whether subsequent render calls are for mono/stereo NV_VRS_CONTENT_TYPE ContentType; //!< (IN) This defines the type of content with which the VRS pattern will be generated NV_FOVEATED_RENDERING_DESC_V1 sFoveatedRenderingDesc; //!< (IN) Provide this if ContentType has NV_VRS_CONTENT_TYPE_FOVEATED_RENDERING flag } NV_VRS_HELPER_ENABLE_PARAMS_V1; typedef NV_VRS_HELPER_ENABLE_PARAMS_V1 NV_VRS_HELPER_ENABLE_PARAMS; #define NV_VRS_HELPER_ENABLE_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_VRS_HELPER_ENABLE_PARAMS_V1, 1) #define NV_VRS_HELPER_ENABLE_PARAMS_VER NV_VRS_HELPER_ENABLE_PARAMS_VER1 typedef struct _NV_VRS_HELPER_DISABLE_PARAMS_V1 { NvU32 version; //!< (IN) Struct version NvU32 reserved; //!< (IN) Reserved for future use } NV_VRS_HELPER_DISABLE_PARAMS_V1; typedef NV_VRS_HELPER_DISABLE_PARAMS_V1 NV_VRS_HELPER_DISABLE_PARAMS; #define NV_VRS_HELPER_DISABLE_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_VRS_HELPER_DISABLE_PARAMS_V1, 1) #define NV_VRS_HELPER_DISABLE_PARAMS_VER NV_VRS_HELPER_DISABLE_PARAMS_VER1 typedef struct _NV_VRS_HELPER_GET_SHADING_RATE_RESOURCE_PARAMS_V1 { NvU32 version; //!< (IN) Struct version IUnknown **ppShadingRateResource; //!< (OUT) Pointer to 2D Texture resource with currently applied shading rate pattern NV_PIXEL_SHADING_RATE shadingRateTable[NV_MAX_PIXEL_SHADING_RATES]; //!< (OUT) Shading Rate Table filled by the driver } NV_VRS_HELPER_GET_SHADING_RATE_RESOURCE_PARAMS_V1; typedef NV_VRS_HELPER_GET_SHADING_RATE_RESOURCE_PARAMS_V1 NV_VRS_HELPER_GET_SHADING_RATE_RESOURCE_PARAMS; #define NV_VRS_HELPER_GET_SHADING_RATE_RESOURCE_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_VRS_HELPER_GET_SHADING_RATE_RESOURCE_PARAMS_V1, 1) #define NV_VRS_HELPER_GET_SHADING_RATE_RESOURCE_PARAMS_VER NV_VRS_HELPER_GET_SHADING_RATE_RESOURCE_PARAMS_VER1 typedef struct _NV_VRS_HELPER_PURGE_INTERNAL_RESOURCES_PARAMS_V1 { NvU32 version; //!< (IN) Struct version NvU32 reserved; //!< (IN) Reserved for future use } NV_VRS_HELPER_PURGE_INTERNAL_RESOURCES_PARAMS_V1; typedef NV_VRS_HELPER_PURGE_INTERNAL_RESOURCES_PARAMS_V1 NV_VRS_HELPER_PURGE_INTERNAL_RESOURCES_PARAMS; #define NV_VRS_HELPER_PURGE_INTERNAL_RESOURCES_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_VRS_HELPER_PURGE_INTERNAL_RESOURCES_PARAMS_V1, 1) #define NV_VRS_HELPER_PURGE_INTERNAL_RESOURCES_PARAMS_VER NV_VRS_HELPER_PURGE_INTERNAL_RESOURCES_PARAMS_VER1 DECLARE_INTERFACE(ID3DNvVRSHelper_V1) { BEGIN_INTERFACE STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // Latches the latest gaze which will be used for subsequent foveated rendering. Recommended to be called once per frame before scene drawing begins. STDMETHOD_(NvAPI_Status,LatchGaze)(THIS_ IUnknown* pContext, NV_VRS_HELPER_LATCH_GAZE_PARAMS* pLatchGazeParams) PURE; // Enables VRS with sepcified content type and preset. This can be called per draw call. STDMETHOD_(NvAPI_Status,Enable)(THIS_ IUnknown* pContext, NV_VRS_HELPER_ENABLE_PARAMS* pEnableParams) PURE; // Disables VRS till re-enabled. STDMETHOD_(NvAPI_Status,Disable)(THIS_ IUnknown* pContext, NV_VRS_HELPER_DISABLE_PARAMS* pDisableParams) PURE; // Creates a 2D texture, copies the current shading rate pattern on it and returns the pointer to this texture. // It also returns an array that conveys which value in the shading rate resource corresponds to which exact pixel shading rate. STDMETHOD_(NvAPI_Status,GetShadingRateResource)(THIS_ IUnknown* pContext, NV_VRS_HELPER_GET_SHADING_RATE_RESOURCE_PARAMS *pGetShadingRateResourceParams) PURE; // Destroys all internally created shading rate resources and views. STDMETHOD_(NvAPI_Status,PurgeInternalShadingRateResources)(THIS_ IUnknown* pContext, NV_VRS_HELPER_PURGE_INTERNAL_RESOURCES_PARAMS* pPurgeParams) PURE; END_INTERFACE }; typedef ID3DNvVRSHelper_V1 ID3DNvVRSHelper; #define ID3DNvVRSHelper_VER1 MAKE_NVAPI_VERSION(ID3DNvVRSHelper_V1, 1) #define ID3DNvVRSHelper_VER ID3DNvVRSHelper_VER1 typedef struct _NV_VRS_HELPER_INIT_PARAMS_V1 { NvU32 version; //!< (IN) Struct version NvU32 flags; //!< (IN) Reserved for future use ID3DNvVRSHelper_V1 **ppVRSHelper; //!< (OUT) Interface for Shading Rate Pattern Tracker } NV_VRS_HELPER_INIT_PARAMS_V1; typedef NV_VRS_HELPER_INIT_PARAMS_V1 NV_VRS_HELPER_INIT_PARAMS; #define NV_VRS_HELPER_INIT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_VRS_HELPER_INIT_PARAMS_V1, 1) #define NV_VRS_HELPER_INIT_PARAMS_VER NV_VRS_HELPER_INIT_PARAMS_VER1 //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_InitializeVRSHelper // //! DESCRIPTION: Creates an interface for updating, enabling and disabling internally tracked shading rate pattern for Variable Rate Shading //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 430 //! //! \param [in] pDevice The device to be used for creating the VRS Handler interface //! \note This should be same the device used for Gaze Handler. See also: NvAPI_D3D_InitializeNvGazeHandler. //! \param [in] pInitializeVRSHelperParams Descriptor for VRS Helper initialization //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_InitializeVRSHelper(__in IUnknown *pDevice, __inout NV_VRS_HELPER_INIT_PARAMS *pInitializeVRSHelperParams); typedef enum _NV_GAZE_DATA_VALIDITY_FLAGS { NV_GAZE_ORIGIN_VALID = 0x1, NV_GAZE_DIRECTION_VALID = 0x2, NV_GAZE_LOCATION_VALID = 0x4, NV_GAZE_VELOCITY_VALID = 0x8, NV_GAZE_PUPIL_DIAMETER_VALID = 0x10, NV_GAZE_EYE_OPENNESS_VALID = 0x20, NV_GAZE_EYE_SACCADE_DATA_VALID = 0x40 } NV_GAZE_DATA_VALIDITY_FLAGS; typedef struct _NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE { NvU32 version; //!< (IN) Version of the structure NvU32 GazeDataValidityFlags; //!< (IN) To be populated with OR'ing flags from NV_GAZE_DATA_VALIDITY_FLAGS float fGazeOrigin_mm[3]; //!< (IN) Use flag NV_GAZE_ORIGIN_VALID. Origin of the eye in millimeters. Used mainly to detect whether Left Eye or Right Eye. float fGazeDirection[3]; //!< (IN) Use flag NV_GAZE_DIRECTION_VALID. Normalized direction of the gaze of the eye. Used for calculating the gaze location using the FOV. float fGazeNormalizedLocation[2]; //!< (IN) Use flag NV_GAZE_LOCATION_VALID. Precalculated normalized gaze location in limits (-1 to +1) for X and Y. Center of the screen denotes (0, 0). If this is valid, this will be given higher priority than direction. float fGazeVelocity[2]; //!< (IN) Use flag NV_GAZE_VELOCITY_VALID. Optional: Velocity of the eye on the normalized space in each direction. Central foveated region would be skewed in the direction of the velocity. float fPupilDiameter_mm; //!< (IN) Use flag NV_GAZE_PUPIL_DIAMETER_VALID. Unused at the moment. float fEyeOpenness; //!< (IN) Use flag NV_GAZE_EYE_OPENNESS_VALID. Unused at the moment. BOOL bInSaccade; //!< (IN) Use flag NV_GAZE_EYE_SACCADE_DATA_VALID. Denotes whether eye is currently in saccade movement or not. } NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE_V1; typedef NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE_V1 NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE; #define NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE_VER1 MAKE_NVAPI_VERSION(NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE_V1, 1) #define NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE_VER NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE_VER1 typedef struct _NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS { NvU32 version; //!< (IN) Struct version NvU32 flags; //!< (IN) Reserved for future use NvU64 Timestamp; //!< (IN) Timestamp at which the gaze data has been captured. Should be larger than timestamp provided at previous update. union { NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE_V1 sMonoData; //!< (IN) Gaze data for Mono rendering mode struct { NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE_V1 sLeftEye; //!< (IN) Gaze data for Left Eye of Stereo rendering mode NV_FOVEATED_RENDERING_GAZE_DATA_PER_EYE_V1 sRightEye; //!< (IN) Gaze data for Right Eye of Stereo rendering mode } sStereoData; }; } NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS_V1; typedef NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS_V1 NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS; #define NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS_V1, 1) #define NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS_VER NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS_VER1 #define NV_GAZE_PROVIDER_KEY_LENGTH 16 typedef struct _NV_INITIALIZE_GAZE_PROVIDER_PARAMS { NvU32 version; //!< (IN) Struct version NvU8 sessionID[NV_GAZE_PROVIDER_KEY_LENGTH]; //!< [IN/OUT] Unique session ID } NV_INITIALIZE_GAZE_PROVIDER_PARAMS_V1; #define NV_INITIALIZE_GAZE_PROVIDER_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_INITIALIZE_GAZE_PROVIDER_PARAMS_V1, 1) typedef NV_INITIALIZE_GAZE_PROVIDER_PARAMS_V1 NV_INITIALIZE_GAZE_PROVIDER_PARAMS; #define NV_INITIALIZE_GAZE_PROVIDER_PARAMS_VER NV_INITIALIZE_GAZE_PROVIDER_PARAMS_VER1 typedef struct _NV_REGISTER_GAZE_PROVIDER_PARAMS { NvU32 version; //!< (IN) Struct version NvU32 flags; //!< (IN) Reserved for future use NvU8 providerID[NV_GAZE_PROVIDER_KEY_LENGTH]; //!< [IN] Encrypted unique ID from the vendor NvU32 vendorID; //!< [IN] HMD vendor ID NvU32 productID; //!< [IN] HMD product ID } NV_REGISTER_GAZE_PROVIDER_PARAMS_V1; #define NV_REGISTER_GAZE_PROVIDER_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_REGISTER_GAZE_PROVIDER_PARAMS_V1, 1) typedef NV_REGISTER_GAZE_PROVIDER_PARAMS_V1 NV_REGISTER_GAZE_PROVIDER_PARAMS; #define NV_REGISTER_GAZE_PROVIDER_PARAMS_VER NV_REGISTER_GAZE_PROVIDER_PARAMS_VER1 typedef struct _NV_GAZE_CONSUMPTION_INFO_PARAMS { NvU32 version; //!< (IN) Struct version NvU32 reservedFlags; //!< (IN) Reserved for future use NvU32 consumerCount; //!< (OUT) Active Gaze consumer apps count NvU64 prevFrameIndex; //!< (OUT) Previous frame Index NvU64 prevFrameGazeTimestamp; //!< (OUT) Previous frame's gaze timestamp used NvU64 prevFrameGazeConsumedTimestamp; //!< (OUT) Previous frame's gaze consumed timestamp on CPU floor } NV_GAZE_CONSUMPTION_INFO_PARAMS_V1; #define NV_GAZE_CONSUMPTION_INFO_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_GAZE_CONSUMPTION_INFO_PARAMS_V1, 1) typedef NV_GAZE_CONSUMPTION_INFO_PARAMS_V1 NV_GAZE_CONSUMPTION_INFO_PARAMS; #define NV_GAZE_CONSUMPTION_INFO_PARAMS_VER NV_GAZE_CONSUMPTION_INFO_PARAMS_VER1 DECLARE_INTERFACE(ID3DNvGazeHandler_V2) { BEGIN_INTERFACE STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // Updates the gaze data for foveated rendering STDMETHOD_(NvAPI_Status,UpdateGazeData)(THIS_ IUnknown* pContext, NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS* pUpdateGazeDataParams) PURE; // FUNCTION NAME: ID3DNvGazeHandler::InitializeGazeProvider // //! DESCRIPTION: Initializes a Gaze provider service //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 465 //! //! \param [in] pContext The device used for creating the Gaze Handler interface //! \note This should be same as the device used with VRS Handler. See also: NvAPI_D3D_InitializeVRSHelper. //! \param [out] pInitializationParams Params holding the Unique session ID //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! STDMETHOD_(NvAPI_Status,InitializeGazeProvider)(THIS_ IUnknown* pContext, NV_INITIALIZE_GAZE_PROVIDER_PARAMS* pInitializationParams) PURE; // FUNCTION NAME: ID3DNvGazeHandler::RegisterGazeProvider // //! DESCRIPTION: Registering a Gaze provider service //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 465 //! //! \param [in] pContext The device used for creating the Gaze Handler interface //! \note This should be same as the device used with VRS Handler. See also: NvAPI_D3D_InitializeVRSHelper. //! \param [inout] pRegisterGazeProviderparams Params for registering the gaze provider service //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! NVAPI_INVALID_USER_PRIVILEGE The application will require Administrator privileges to access this API. //! NVAPI_ACCESS_DENIED Incorrect credentials provided //! STDMETHOD_(NvAPI_Status,RegisterGazeProvider)(THIS_ IUnknown* pContext, NV_REGISTER_GAZE_PROVIDER_PARAMS* pRegisterGazeProviderparams) PURE; // FUNCTION NAME: ID3DNvGazeHandler::GetGazeConsumptionInfo // //! DESCRIPTION: Get Gaze consumption information //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 465 //! //! \param [in] pContext The device used for creating the Gaze Handler interface //! \note This should be same as the device used with VRS Handler. See also: NvAPI_D3D_InitializeVRSHelper. //! \param [out] pConsumptionInfoParams Params for holding the consumption stats //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! STDMETHOD_(NvAPI_Status,GetGazeConsumptionInfo)(THIS_ IUnknown* pContext, NV_GAZE_CONSUMPTION_INFO_PARAMS* pConsumptionInfoParams) PURE; // FUNCTION NAME: ID3DNvGazeHandler::GetWaitableObjectForConsumerAvailability // //! DESCRIPTION: Get Event handle to wait upon for gaze consumer availability //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 465 //! //! \param [in] pContext The device used for creating the Gaze Handler interface //! \note This should be same as the device used with VRS Handler. See also: NvAPI_D3D_InitializeVRSHelper. //! \param [out] hEvent Event handle //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! STDMETHOD_(NvAPI_Status,GetWaitableObjectForConsumerAvailability)(THIS_ IUnknown* pContext, HANDLE* hEvent) PURE; // FUNCTION NAME: ID3DNvGazeHandler::DeRegisterGazeProvider // //! DESCRIPTION: DeRegisters the Gaze provider service //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 465 //! //! \param [in] pContext The device used for creating the Gaze Handler interface //! \note This should be same as the device used with VRS Handler. See also: NvAPI_D3D_InitializeVRSHelper. //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! STDMETHOD_(NvAPI_Status,DeRegisterGazeProvider)(THIS_ IUnknown* pContext) PURE; END_INTERFACE }; typedef ID3DNvGazeHandler_V2 ID3DNvGazeHandler; #define ID3DNvGazeHandler_VER2 MAKE_NVAPI_VERSION(ID3DNvGazeHandler_V2, 2) #define ID3DNvGazeHandler_VER ID3DNvGazeHandler_VER2 DECLARE_INTERFACE(ID3DNvGazeHandler_V1) { BEGIN_INTERFACE STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // Updates the gaze data for foveated rendering STDMETHOD_(NvAPI_Status,UpdateGazeData)(THIS_ IUnknown* pContext, NV_FOVEATED_RENDERING_UPDATE_GAZE_DATA_PARAMS* pUpdateGazeDataParams) PURE; END_INTERFACE }; #define ID3DNvGazeHandler_VER1 MAKE_NVAPI_VERSION(ID3DNvGazeHandler_V1, 1) #ifndef ID3DNvGazeHandler_VER typedef ID3DNvGazeHandler_V1 ID3DNvGazeHandler; #define ID3DNvGazeHandler_VER ID3DNvGazeHandler_VER1 #endif typedef enum _NV_GAZE_DATA_TYPE { NV_GAZE_DATA_INVALID = 0, NV_GAZE_DATA_MONO = 1, NV_GAZE_DATA_STEREO = 2, NV_GAZE_DATA_MAX = NV_GAZE_DATA_STEREO } NV_GAZE_DATA_TYPE; typedef struct _NV_GAZE_HANDLER_INIT_PARAMS_V2 { NvU32 version; //!< (IN) Struct version NvU32 GazeDataDeviceId; //!< (IN) ID of the gaze data provider. Needed only for supporting more than one device with eye tracking. // Should be 0 if gaze data is provided only from a single device. Should be less than (MAX_NUMBER_OF_GAZE_DATA_PROVIDERS - 1) NV_GAZE_DATA_TYPE GazeDataType; //!< (IN) Describes whether gaze is Mono or Stereo NvU32 flags; //!< (IN) Reserved for future use float fHorizontalFOV; //!< (IN) Horizontal Field of View float fVericalFOV; //!< (IN) Vertical Field of View ID3DNvGazeHandler_V2 **ppNvGazeHandler; //!< (OUT) Interface for Gaze Data Handler } NV_GAZE_HANDLER_INIT_PARAMS_V2; typedef NV_GAZE_HANDLER_INIT_PARAMS_V2 NV_GAZE_HANDLER_INIT_PARAMS; #define NV_GAZE_HANDLER_INIT_PARAMS_VER2 MAKE_NVAPI_VERSION(NV_GAZE_HANDLER_INIT_PARAMS_V2, 2) #define NV_GAZE_HANDLER_INIT_PARAMS_VER NV_GAZE_HANDLER_INIT_PARAMS_VER2 typedef struct _NV_GAZE_HANDLER_INIT_PARAMS_V1 { NvU32 version; //!< (IN) Struct version NvU32 GazeDataDeviceId; //!< (IN) ID of the gaze data provider. Needed only for supporting more than one device with eye tracking. // Should be 0 if gaze data is provided only from a single device. Should be less than (MAX_NUMBER_OF_GAZE_DATA_PROVIDERS - 1) NV_GAZE_DATA_TYPE GazeDataType; //!< (IN) Describes whether gaze is Mono or Stereo NvU32 flags; //!< (IN) Reserved for future use float fHorizontalFOV; //!< (IN) Horizontal Field of View float fVericalFOV; //!< (IN) Vertical Field of View ID3DNvGazeHandler_V1 **ppNvGazeHandler; //!< (OUT) Interface for Gaze Data Handler } NV_GAZE_HANDLER_INIT_PARAMS_V1; #define NV_GAZE_HANDLER_INIT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_GAZE_HANDLER_INIT_PARAMS_V1, 1) #ifndef NV_GAZE_HANDLER_INIT_PARAMS_VER typedef NV_GAZE_HANDLER_INIT_PARAMS_V1 NV_GAZE_HANDLER_INIT_PARAMS; #define NV_GAZE_HANDLER_INIT_PARAMS_VER NV_GAZE_HANDLER_INIT_PARAMS_VER1 #endif #endif // defined(__cplusplus) && (defined(__d3d11_h__)) //! SUPPORTED OS: Windows 7 and higher //! #if defined(__cplusplus) && (defined(__d3d11_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_InitializeNvGazeHandler // //! DESCRIPTION: Creates an interface for updating and managing gaze data //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 430 //! //! \param [in] pDevice The device to be used for creating the Gaze Handler interface //! \note This should be same as the device used with VRS Handler. See also: NvAPI_D3D_InitializeVRSHelper. //! \param [in] pInitializeNvGazeHandlerParams Descriptor for Gaze Data Handler initialization //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! (none) //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_InitializeNvGazeHandler(__in IUnknown *pDevice, __inout NV_GAZE_HANDLER_INIT_PARAMS *pInitializeNvGazeHandlerParams); #endif // defined(__cplusplus) && (defined(__d3d11_h__)) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) //! \ingroup dx typedef enum NV_SMP_ASSIST_TYPE { NV_SMP_ASSIST_NONE = 0, NV_SMP_ASSIST_MRS = 1, // SMP Assist required for Multi-Res Shading NV_SMP_ASSIST_LMS = 2, // SMP Assist required for Lens Matched Shading NV_SMP_ASSIST_NUM_TYPES } NV_SMP_ASSIST_TYPE; typedef enum NV_SMP_ASSIST_LEVEL { NV_SMP_ASSIST_LEVEL_FULL = 0, // Full assistance. App selects a pre-baked MRS/LMS config, driver handles correct setting of viewport, scissors and FastGS NV_SMP_ASSIST_LEVEL_PARTIAL = 1, // Partial assistance. App provides a custom MRS/LMS config, driver handles correct setting of viewport, scissors and FastGS NV_SMP_ASSIST_LEVEL_MINIMAL = 2, // Minimal assistance. App provides viewports and scissors. App sets FastGS as required. App sets LMS params as required (NvAPI_D3D_SetModifiedWMode). App provides SMPType as NONE. Driver handles correct setting of viewports and scissors. NV_SMP_ASSIST_NUM_LEVELS } NV_SMP_ASSIST_LEVEL; typedef enum NV_MRS_CONFIG { NV_MRS_CONFIG_BALANCED = 0, NV_MRS_CONFIG_AGGRESSIVE = 1, NV_MRS_CONFIG_OCULUSRIFT_CV1_CONSERVATIVE = 2, NV_MRS_CONFIG_OCULUSRIFT_CV1_BALANCED = 3, NV_MRS_CONFIG_OCULUSRIFT_CV1_AGGRESSIVE = 4, NV_MRS_CONFIG_HTC_VIVE_CONSERVATIVE = 5, NV_MRS_CONFIG_HTC_VIVE_BALANCED = 6, NV_MRS_CONFIG_HTC_VIVE_AGGRESSIVE = 7, NV_MRS_NUM_CONFIGS } NV_MRS_CONFIG; typedef enum NV_LMS_CONFIG { NV_LMS_CONFIG_OCULUSRIFT_CV1_CONSERVATIVE = 0, NV_LMS_CONFIG_OCULUSRIFT_CV1_BALANCED = 1, NV_LMS_CONFIG_OCULUSRIFT_CV1_AGGRESSIVE = 2, NV_LMS_CONFIG_HTC_VIVE_CONSERVATIVE = 3, NV_LMS_CONFIG_HTC_VIVE_BALANCED = 4, NV_LMS_CONFIG_HTC_VIVE_AGGRESSIVE = 5, NV_LMS_NUM_CONFIGS } NV_LMS_CONFIG; #define NV_SMP_ASSIST_FLAGS_DEFAULT 0x00000000 #define NV_SMP_ASSIST_MAX_VIEWPORTS 16 typedef struct _NV_MRS_CUSTOM_CONFIG_V1 { float centerWidth; //!< (IN) Size of the central viewport, ranging (0,1], where 1 is full original viewport size float centerHeight; float centerX; //!< (IN) Location of the central viewport, ranging 0..1, where 0.5 is the center of the screen float centerY; float densityScaleX[3]; //!< (IN) Pixel density scale factors: how much the linear pixel density is scaled within each row and column (1.0 = full density) float densityScaleY[3]; } NV_MRS_CUSTOM_CONFIG_V1; typedef NV_MRS_CUSTOM_CONFIG_V1 NV_MRS_CUSTOM_CONFIG; typedef struct _NV_MRS_INSTANCED_STEREO_CONFIG_V1 { //!< (OUT) MRS Instanced stereo config returned by the SMP Assist GetConstants API float centerWidth[2]; //!< (OUT) Size of the central viewport, ranging (0,1], where 1 is full original viewport size float centerHeight; float centerX[2]; //!< (OUT) Location of the central viewport, ranging 0..1, where 0.5 is the center of the screen float centerY; float densityScaleX[5]; //!< (OUT) Pixel density scale factors: how much the linear pixel density is scaled within each row and column (1.0 = full density) float densityScaleY[3]; } NV_MRS_INSTANCED_STEREO_CONFIG_V1; typedef NV_MRS_INSTANCED_STEREO_CONFIG_V1 NV_MRS_INSTANCED_STEREO_CONFIG; typedef struct _NV_LMS_CUSTOM_CONFIG_V1 { float warpLeft; //!< (IN) LMS params to control warping of the 2 left quadrants float warpRight; //!< (IN) LMS params to control warping of the 2 right quadrants float warpUp; //!< (IN) LMS params to control warping of the 2 upper quadrants float warpDown; //!< (IN) LMS params to control warping of the 2 lower quadrants float relativeSizeLeft; //!< (IN) LMS params to control the width of the 2 left quandrants relative to the bounding box width float relativeSizeRight; //!< (IN) LMS params to control the width of the 2 right quandrants relative to the bounding box width float relativeSizeUp; //!< (IN) LMS params to control the height of the 2 upper quandrants relative to the bounding box height float relativeSizeDown; //!< (IN) LMS params to control the height of the 2 lower quandrants relative to the bounding box height } NV_LMS_CUSTOM_CONFIG_V1; typedef NV_LMS_CUSTOM_CONFIG_V1 NV_LMS_CUSTOM_CONFIG; typedef struct _NV_LMS_INSTANCED_STEREO_CONFIG_V1 { //!< (OUT) LMS Instanced stereo config returned by the SMP Assist GetConstants API NV_LMS_CUSTOM_CONFIG_V1 sLeftConfig; //!< (OUT) LMS config for the Left eye view NV_LMS_CUSTOM_CONFIG_V1 sRightConfig; //!< (OUT) LMS config for the Right eye view } NV_LMS_INSTANCED_STEREO_CONFIG_V1; typedef NV_LMS_INSTANCED_STEREO_CONFIG_V1 NV_LMS_INSTANCED_STEREO_CONFIG; typedef enum _NV_SMP_ASSIST_EYE_INDEX { NV_SMP_ASSIST_EYE_INDEX_MONO = 0, // Non-stereo rendering NV_SMP_ASSIST_EYE_INDEX_LEFT_EYE = 1, // Stereo - Rendering left eye NV_SMP_ASSIST_EYE_INDEX_RIGHT_EYE = 2, // Stereo - Rendering right eye NV_SMP_ASSIST_EYE_INDEX_INSTANCED_STEREO = 3, // Stereo - Rendering both eyes } NV_SMP_ASSIST_EYE_INDEX; #define NV_SMP_ASSIST_MINIMAL_LEVEL_NUM_EYE_INDICES 4 typedef struct _NV_CUSTOM_RECTS_V1 { NvU32 numViewports[NV_SMP_ASSIST_MINIMAL_LEVEL_NUM_EYE_INDICES]; D3D11_VIEWPORT *pViewports[NV_SMP_ASSIST_MINIMAL_LEVEL_NUM_EYE_INDICES]; //!< (IN) Viewports, for each eye index, that should be set when app calls Enable(eyeIndex) D3D11_RECT *pScissors[NV_SMP_ASSIST_MINIMAL_LEVEL_NUM_EYE_INDICES]; //!< (IN) Scissors, for each eye index, that should be set when app calls Enable(eyeIndex) } NV_CUSTOM_RECTS_V1; typedef NV_CUSTOM_RECTS_V1 NV_CUSTOM_RECTS; typedef struct _NV_SMP_ASSIST_ENABLE_PARAMS_V1 { NvU32 version; //!< (IN) Structure version NV_SMP_ASSIST_EYE_INDEX eEyeIndex; //!< (IN) Rendering mode for upcoming draw calls (Mono/Stereo-Left/Stereo-Right/Instanced Stereo) } NV_SMP_ASSIST_ENABLE_PARAMS_V1; typedef NV_SMP_ASSIST_ENABLE_PARAMS_V1 NV_SMP_ASSIST_ENABLE_PARAMS; #define NV_SMP_ASSIST_ENABLE_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_SMP_ASSIST_ENABLE_PARAMS_V1, 1) #define NV_SMP_ASSIST_ENABLE_PARAMS_VER NV_SMP_ASSIST_ENABLE_PARAMS_VER1 typedef struct _NV_SMP_ASSIST_DISABLE_PARAMS_V1 { NvU32 version; //!< (IN) Structure version NvU32 Reserved; //!< (IN) Unused. } NV_SMP_ASSIST_DISABLE_PARAMS_V1; typedef NV_SMP_ASSIST_DISABLE_PARAMS_V1 NV_SMP_ASSIST_DISABLE_PARAMS; #define NV_SMP_ASSIST_DISABLE_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_SMP_ASSIST_DISABLE_PARAMS_V1, 1) #define NV_SMP_ASSIST_DISABLE_PARAMS_VER NV_SMP_ASSIST_DISABLE_PARAMS_VER1 // FastGS constant buffer data returned by the GetConstants API. // Refer VRWorks SDK's multiprojection_dx app (struct FastGSCBData) typedef struct _NV_SMP_ASSIST_FASTGSCBDATA_V1 { float NDCSplitsX[2]; //!< (OUT) FastGS constant buffer data for Multi-Res Shading/ Lens Matched Shading float NDCSplitsY[2]; } NV_SMP_ASSIST_FASTGSCBDATA_V1; typedef NV_SMP_ASSIST_FASTGSCBDATA_V1 NV_SMP_ASSIST_FASTGSCBDATA; typedef struct _NV_SMP_ASSIST_FASTGSCBDATA_MRS_INSTANCED_STEREO_V1 { float NDCSplitsX[4]; //!< (OUT) FastGS constant buffer data for Multi-Res Shading (Instanced stereo). 2 splits for left eye followed by 2 splits for right eye float NDCSplitsY[2]; } NV_SMP_ASSIST_FASTGSCBDATA_MRS_INSTANCED_STEREO_V1; typedef NV_SMP_ASSIST_FASTGSCBDATA_MRS_INSTANCED_STEREO_V1 NV_SMP_ASSIST_FASTGSCBDATA_MRS_INSTANCED_STEREO; // Constant buffer data to supply the UV-remapping helper functions // Refer VRWorks SDK's multiprojection_dx app (struct RemapCBData) typedef struct _NV_SMP_ASSIST_REMAPCBDATA_V1 { //!< (OUT) Constant buffer data to supply the UV-remapping helper functions float ClipToWindowSplitsX[2]; float ClipToWindowSplitsY[2]; float ClipToWindowX[3][2]; // ClipToWindowX[i][0] is Scale and ClipToWindowX[i][1] is Bias float ClipToWindowY[3][2]; // ClipToWindowY[i][0] is Scale and ClipToWindowY[i][1] is Bias float ClipToWindowZ[2]; // ClipToWindowZ[0] is Scale and ClipToWindowZ[1] is Bias float WindowToClipSplitsX[2]; float WindowToClipSplitsY[2]; float WindowToClipX[3][2]; // WindowToClipX[i][0] is Scale and WindowToClipX[i][1] is Bias float WindowToClipY[3][2]; // WindowToClipY[i][0] is Scale and WindowToClipY[i][1] is Bias float WindowToClipZ[2]; // WindowToClipZ[0] is Scale and WindowToClipZ[1] is Bias float BoundingRectOriginX; float BoundingRectOriginY; float BoundingRectSizeWidth; float BoundingRectSizeHeight; float BoundingRectSizeInvWidth; float BoundingRectSizeInvHeight; float Padding[2]; }NV_SMP_ASSIST_REMAPCBDATA_V1; typedef NV_SMP_ASSIST_REMAPCBDATA_V1 NV_SMP_ASSIST_REMAPCBDATA; //! SUPPORTED OS: Windows 7 and higher //! typedef struct _NV_SMP_ASSIST_GET_CONSTANTS_V3 { NvU32 version; //!< (IN) Structure version NV_SMP_ASSIST_EYE_INDEX eEyeIndex; //!< (IN) Viewports/scissors/constant buffer data corresponding to the input eEyeIndex will be returned NvU32 numViewports; //!< (OUT) Number of valid viewport entries D3D11_VIEWPORT *pViewports; //!< (OUT) If not NULL, this will contain the viewports computed by driver based on init params D3D11_RECT *pScissors; //!< (OUT) If not NULL, this will contain the scissors computed by the driver based on init params NV_SMP_ASSIST_TYPE eSMPAssistType; //!< (OUT) SMP type provided in Init call NV_SMP_ASSIST_LEVEL eSMPAssistLevel; //!< (OUT) SMP Assist level provided in Init call union { NV_MRS_CUSTOM_CONFIG_V1 sMRSConfig; //!< (OUT) If eSMPAssistType is MRS, then MRS config will be populated NV_LMS_CUSTOM_CONFIG_V1 sLMSConfig; //!< (OUT) If eSMPAssistType is LMS, then LMS config will be populated }; float projectionSizeWidth; //!< (OUT) MRS/LMS projection size float projectionSizeHeight; //!< (OUT) NV_SMP_ASSIST_FASTGSCBDATA_V1 *pFastGSCBData; //!< (OUT) If not NULL, this will contain constant buffer data to supply the FastGS for culling primitives per-viewport NV_SMP_ASSIST_REMAPCBDATA_V1 *pRemapCBData; //!< (OUT) If not NULL, this will contain constant buffer data to supply the UV-remapping helper functions D3D11_VIEWPORT boundingViewport; //!< (OUT) If eSMPType is MRS or LMS then this will be a union of the individual viewports populated in pViewports D3D11_RECT boundingScissor; //!< (OUT) If eSMPType is MRS or LMS then this will be a union of the individual scissor rects populated in pScissors union { NV_MRS_INSTANCED_STEREO_CONFIG_V1 sMRS_ISConfig; //!< (OUT) If eSMPAssistType is MRS and eEyeIndex is NV_SMP_ASSIST_EYE_INDEX_INSTANCED_STEREO then MRS Instanced stereo config will be populated NV_LMS_INSTANCED_STEREO_CONFIG_V1 sLMS_ISConfig; //!< (OUT) If eSMPAssistType is LMS and eEyeIndex is NV_SMP_ASSIST_EYE_INDEX_INSTANCED_STEREO then LMS Instanced stereo config will be populated }; NV_SMP_ASSIST_FASTGSCBDATA_MRS_INSTANCED_STEREO_V1 *pFastGSCBDataMRS_IS; //!< (OUT) If non-NULL and eSMPAssistType is MRS and eEyeIndex is NV_SMP_ASSIST_EYE_INDEX_INSTANCED_STEREO then MRS Instanced stereo FastGS constant buffer data will be populated } NV_SMP_ASSIST_GET_CONSTANTS_V3; #define NV_SMP_ASSIST_GET_CONSTANTS_VER3 MAKE_NVAPI_VERSION(NV_SMP_ASSIST_GET_CONSTANTS_V3, 3) typedef NV_SMP_ASSIST_GET_CONSTANTS_V3 NV_SMP_ASSIST_GET_CONSTANTS; #define NV_SMP_ASSIST_GET_CONSTANTS_VER NV_SMP_ASSIST_GET_CONSTANTS_VER3 //! SUPPORTED OS: Windows 7 and higher //! typedef struct _NV_SMP_ASSIST_SETUP_PARAMS_V1 { NvU32 version; //!< (IN) Structure version union { NV_MRS_CONFIG eMRSConfig; //!< (IN) If eSMPAssistType is MRS and SMP Assist Level is Full then provide MRS config enum NV_LMS_CONFIG eLMSConfig; //!< (IN) If eSMPAssistType is LMS and SMP Assist Level is Full then provide LMS config enum NV_MRS_CUSTOM_CONFIG_V1 sMRSCustomConfig; //!< (IN) If eSMPAssistType is MRS and SMP Assist Level is Partial, then provide MRS config NV_LMS_CUSTOM_CONFIG_V1 sLMSCustomConfig; //!< (IN) If eSMPAssistType is LMS and SMP Assist Level is Partial, then provide LMS config NV_CUSTOM_RECTS_V1 sCustomRects; //!< (IN) If SMP Assist Level is Minimal, provide custom viewports and scissor rects for each eye index. }; float resolutionScale; //!< (IN) A resolution multiplier in the range [0.1, 3.0] if app wants to render at higher resolution D3D11_VIEWPORT boundingBox; //!< (IN) Rect on the rendertarget, to place the projection float vpOffsets[2]; //!< (IN) Default set to 0. If non-zero, MRS/LMS viewports' TopLeftX and TopLeftY will be //!< offset by vpOffsets[0] and vpOffsets[1] respectively. } NV_SMP_ASSIST_SETUP_PARAMS_V1; typedef NV_SMP_ASSIST_SETUP_PARAMS_V1 NV_SMP_ASSIST_SETUP_PARAMS; #define NV_SMP_ASSIST_SETUP_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_SMP_ASSIST_SETUP_PARAMS_V1, 1) #define NV_SMP_ASSIST_SETUP_PARAMS_VER NV_SMP_ASSIST_SETUP_PARAMS_VER1 typedef struct _NV_SMP_ASSIST_UPDATE_INSTANCEDSTEREO_DATA_PARAMS_V1 { NvU32 version; //!< (IN) Structure version NV_SMP_ASSIST_TYPE eSMPAssistType; // Patch instanced stereo shaders (created with packed eye index) with this SMPAssistType (NV_SMP_ASSIST_LMS only) float leftCoeffs[4]; // Left eye: outpos.x = dotproduct(outputpos, leftCoeffs) + leftConst float leftConst; float rightCoeffs[4]; // Right eye: outpos.x = dotproduct(outputpos, rightCoeffs) + rightConst float rightConst; } NV_SMP_ASSIST_UPDATE_INSTANCEDSTEREO_DATA_PARAMS_V1; typedef NV_SMP_ASSIST_UPDATE_INSTANCEDSTEREO_DATA_PARAMS_V1 NV_SMP_ASSIST_UPDATE_INSTANCEDSTEREO_DATA_PARAMS; #define NV_SMP_ASSIST_UPDATE_INSTANCEDSTEREO_DATA_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_SMP_ASSIST_UPDATE_INSTANCEDSTEREO_DATA_PARAMS_V1, 1) #define NV_SMP_ASSIST_UPDATE_INSTANCEDSTEREO_DATA_PARAMS_VER NV_SMP_ASSIST_UPDATE_INSTANCEDSTEREO_DATA_PARAMS_VER1 //! SUPPORTED OS: Windows 7 and higher //! DECLARE_INTERFACE(ID3DNvSMPAssist_V1) { ////////////////////////////// VER1 methods ////////////////////////////////////////// // Disable SMP Assist for further Draw calls STDMETHOD_(NvAPI_Status,Disable)(THIS_ __in IUnknown *pDevContext, __in const NV_SMP_ASSIST_DISABLE_PARAMS *psSMPAssistDisableParams) PURE; // Enable SMP Assist for further Draw calls. App has to provide the type of rendering done in upcoming Draw calls - Mono/Left eye/Right eye/Instanced Stereo STDMETHOD_(NvAPI_Status,Enable)(THIS_ __in IUnknown *pDevContext, __in const NV_SMP_ASSIST_ENABLE_PARAMS *psSMPAssistEnableParams) PURE; // Get the constants used by the drivers STDMETHOD_(NvAPI_Status,GetConstants)(THIS_ __inout NV_SMP_ASSIST_GET_CONSTANTS *psSMPAssistGetConstants) PURE; // Setup the projections (rects, constant buffer data etc.) STDMETHOD_(NvAPI_Status,SetupProjections)(THIS_ __in IUnknown *pDevice, __in const NV_SMP_ASSIST_SETUP_PARAMS *psSMPAssistSetupParams) PURE; // Update instanced stereo specific data STDMETHOD_(NvAPI_Status,UpdateInstancedStereoData)(THIS_ __in IUnknown *pDevice, __in const NV_SMP_ASSIST_UPDATE_INSTANCEDSTEREO_DATA_PARAMS *psSMPAssistInstancedStereoParams) PURE; ////////////////////////////// end of VER1 methods ////////////////////////////////////////// }; typedef ID3DNvSMPAssist_V1 ID3DNvSMPAssist; #define ID3DNVSMPASSIST_VER1 MAKE_NVAPI_VERSION(ID3DNvSMPAssist_V1, 1) #define ID3DNVSMPASSIST_VER ID3DNVSMPASSIST_VER1 //! SUPPORTED OS: Windows 7 and higher //! typedef struct _NV_SMP_ASSIST_INITIALIZE_PARAMS_V1 { NvU32 version; //!< (IN) Structure version NV_SMP_ASSIST_TYPE eSMPAssistType; //!< (IN) None/MRS/LMS NV_SMP_ASSIST_LEVEL eSMPAssistLevel; //!< (IN) Full/Partial/Minimal NvU32 flags; //!< (IN) Flags, if any ID3DNvSMPAssist **ppD3DNvSMPAssist; //!< (OUT) Interface pointer returned by the Init call. Use for future Enable/Disable etc. calls } NV_SMP_ASSIST_INITIALIZE_PARAMS_V1; #define NV_SMP_ASSIST_INITIALIZE_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_SMP_ASSIST_INITIALIZE_PARAMS_V1, 1) #ifndef NV_SMP_ASSIST_INITIALIZE_PARAMS_VER typedef NV_SMP_ASSIST_INITIALIZE_PARAMS_V1 NV_SMP_ASSIST_INITIALIZE_PARAMS; #define NV_SMP_ASSIST_INITIALIZE_PARAMS_VER NV_SMP_ASSIST_INITIALIZE_PARAMS_VER1 #endif /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_InitializeSMPAssist // //! DESCRIPTION: Initialize SMP Assist extension. Take the SMPAssist(MRS/LMS) params from the application. //! Provide the application with a interface pointer for future use. //! //! \since Release: 396 //! \param [in] pDevice Pointer to IUnknown (Currently supports ID3D11Device) //! \param [inout] pSMPAssistInitParams SMP Assist initialization params //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval ::NVAPI_OK Call succeeded. //! \retval ::NVAPI_ERROR Call failed. //! \retval ::NVAPI_INVALID_ARGUMENT One of the required input arguments was NULL //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_InitializeSMPAssist(__in IUnknown *pDevice, __inout NV_SMP_ASSIST_INITIALIZE_PARAMS *pSMPAssistInitParams); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 7 and higher //! #if defined (__cplusplus) && defined(__d3d11_h__) //! \ingroup dx typedef struct _NV_QUERY_SMP_ASSIST_SUPPORT_PARAMS_V1 { NvU32 version; //!< (IN) Structure version NV_SMP_ASSIST_TYPE eSMPAssistType; //!< (IN) None/MRS/LMS NV_SMP_ASSIST_LEVEL eSMPAssistLevel; //!< (IN) Full/Partial/Minimal NvBool bSMPAssistSupported; //!< (OUT) SMP Assist supported or not } NV_QUERY_SMP_ASSIST_SUPPORT_PARAMS_V1; typedef NV_QUERY_SMP_ASSIST_SUPPORT_PARAMS_V1 NV_QUERY_SMP_ASSIST_SUPPORT_PARAMS; #define NV_QUERY_SMP_ASSIST_SUPPORT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_QUERY_SMP_ASSIST_SUPPORT_PARAMS_V1, 1) #define NV_QUERY_SMP_ASSIST_SUPPORT_PARAMS_VER NV_QUERY_SMP_ASSIST_SUPPORT_PARAMS_VER1 //! SUPPORTED OS: Windows 7 and higher //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_QuerySMPAssistSupport // //! DESCRIPTION: Query SMP assist extension support. //! //! \since Release: 396 //! \param [in] pDev Pointer to IUnknown (Currently supports ID3D11Device) //! \param [out] pQuerySMPAssistSupportParams Pointer to a structure returning requested SMP assist support //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! \retval ::NVAPI_NOT_SUPPORTED Requested SMP assist is not supported. //! \retval ::NVAPI_OK Call succeeded. Check value of pQuerySMPAssistSupportParams->bSMPAssistSupported //! \retval ::NVAPI_INVALID_POINTER pDev or pQuerySMPAssistSupportParams was a NULL pointer //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_QuerySMPAssistSupport(__in IUnknown *pDev, __inout NV_QUERY_SMP_ASSIST_SUPPORT_PARAMS *pQuerySMPAssistSupportParams); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! SUPPORTED OS: Windows 7 and higher //! //! Used to get sleep status //! \ingroup dx typedef struct _NV_GET_SLEEP_STATUS_PARAMS { NvU32 version; //!< (IN) Structure version NvBool bLowLatencyMode; //!< (OUT) Is low latency mode enabled? NvU8 rsvd[128]; //!< (IN) Reserved. Must be set to 0s. } NV_GET_SLEEP_STATUS_PARAMS_V1; typedef NV_GET_SLEEP_STATUS_PARAMS_V1 NV_GET_SLEEP_STATUS_PARAMS; #define NV_GET_SLEEP_STATUS_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_GET_SLEEP_STATUS_PARAMS_V1, 1) #define NV_GET_SLEEP_STATUS_PARAMS_VER NV_GET_SLEEP_STATUS_PARAMS_VER1 #if defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_GetSleepStatus // //! DESCRIPTION: This function can be used to get the latest sleep status. //! bLowLatencyMode indicates whether low latency mode is currently //! enabled in the driver. //! Note that it may not always reflect the previously requested sleep mode, //! as the feature may not be available on the platform, or the setting has //! been overridden by the control panel, for example. //! //! \since Release: 455 //! \param [in] pDev The target device. //! \param [in] pGetSleepStatusParams Sleep status params. //! SUPPORTED OS: Windows 7 and higher //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_GetSleepStatus(__in IUnknown *pDev, __in NV_GET_SLEEP_STATUS_PARAMS *pGetSleepStatusParams); #endif //defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! SUPPORTED OS: Windows 7 and higher //! //! Used to set sleep mode //! \ingroup dx typedef struct _NV_SET_SLEEP_MODE_PARAMS { NvU32 version; //!< (IN) Structure version NvBool bLowLatencyMode; //!< (IN) Low latency mode enable/disable. NvBool bLowLatencyBoost; //!< (IN) Request maximum GPU clock frequency regardless of workload. NvU32 minimumIntervalUs; //!< (IN) Minimum frame interval in microseconds. 0 = no frame rate limit. NvBool bUseMarkersToOptimize; //!< (IN) Allow latency markers to be used for runtime optimizations. NvU8 rsvd[31]; //!< (IN) Reserved. Must be set to 0s. } NV_SET_SLEEP_MODE_PARAMS_V1; typedef NV_SET_SLEEP_MODE_PARAMS_V1 NV_SET_SLEEP_MODE_PARAMS; #define NV_SET_SLEEP_MODE_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_SET_SLEEP_MODE_PARAMS_V1, 1) #define NV_SET_SLEEP_MODE_PARAMS_VER NV_SET_SLEEP_MODE_PARAMS_VER1 #if defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_SetSleepMode // //! DESCRIPTION: This function can be used to update sleep mode dynamically. //! The settings are not dependent to each other, meaning low latency mode //! can be enabled/disabled regardless of whether minimum interval is set or //! not. The former is to intelligently lower latency without impacting frame //! rate. The later is to limit frame rate (e.g. minimumIntervalUs = 10000 //! limits frame rate to 100 FPS). They work well separately and/or together. //! Note that minimumIntervalUs usage is not limited to lowering latency, so //! feel free to use it to limit frame rate for menu, cut scenes, etc. //! Note that low latency mode can be enabled, and/or minimum interval can //! be set, even without using NvAPI_D3D_Sleep(). However, without it, the //! sleep to achieve these features would happen at a less optimal point, //! resulting in higher overall latency. //! The bLowLatencyBoost will request the GPU run at max clocks even in //! scenarios where it is idle most of the frame and would normally try //! to save power. This can decrease latency in CPU-limited scenarios. //! While this function can be called as often as needed, it is not //! necessary nor recommended to call this too frequently (e.g. every frame), //! as the settings persist for the target device. //! //! \since Release: 455 //! \param [in] pDev The target device. //! \param [in] pSetSleepModeParams Sleep mode params. //! SUPPORTED OS: Windows 7 and higher //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_SetSleepMode(__in IUnknown *pDev, __in NV_SET_SLEEP_MODE_PARAMS *pSetSleepModeParams); #endif //defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_Sleep // //! DESCRIPTION: It is recommended to call this function at the very start of //! each frame (e.g. before input sampling). If there is a need to sleep, //! due to frame rate limit and/or low latency features, for example, //! this call provides an entry point for the driver to sleep at the most //! optimal spot to achieve the lowest latency. //! It is recommended to call this function even when low latency mode is //! disabled and minimum interval is 0. Other features, such as Maximum Frame //! Rate setting, could be enabled in the control panel to benefit from this. //! It is OK to start (or stop) using this function at any time. However, //! when using this function, it must be called exactly once on each frame. //! If this function is not called, after several frames, the driver would //! fallback to sleep at its less optimal spot. //! //! \since Release: 455 //! \param [in] pDev The target device. //! SUPPORTED OS: Windows 7 and higher //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_Sleep(__in IUnknown *pDev); #endif //defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! SUPPORTED OS: Windows 7 and higher //! //! Used to get latency report. //! \ingroup dx typedef struct _NV_LATENCY_RESULT_PARAMS { NvU32 version; //!< (IN) Structure version struct FrameReport { NvU64 frameID; NvU64 inputSampleTime; NvU64 simStartTime; NvU64 simEndTime; NvU64 renderSubmitStartTime; NvU64 renderSubmitEndTime; NvU64 presentStartTime; NvU64 presentEndTime; NvU64 driverStartTime; NvU64 driverEndTime; NvU64 osRenderQueueStartTime; NvU64 osRenderQueueEndTime; NvU64 gpuRenderStartTime; NvU64 gpuRenderEndTime; NvU32 gpuActiveRenderTimeUs; //!< (OUT) Difference between gpuRenderStartTime and gpuRenderEndTime, excluding the idles in between, in microseconds. NvU32 gpuFrameTimeUs; //!< (OUT) Difference between previous and current frame's gpuRenderEndTime, in microseconds. NvU8 rsvd[120]; } frameReport[64]; NvU8 rsvd[32]; } NV_LATENCY_RESULT_PARAMS_V1; typedef NV_LATENCY_RESULT_PARAMS_V1 NV_LATENCY_RESULT_PARAMS; #define NV_LATENCY_RESULT_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_LATENCY_RESULT_PARAMS_V1, 1) #define NV_LATENCY_RESULT_PARAMS_VER NV_LATENCY_RESULT_PARAMS_VER1 #if defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_GetLatency // //! DESCRIPTION: Get a latency report including the timestamps of the //! application latency markers set with NvAPI_D3D_SetLatencyMarker as well //! as driver, OS queue and graphics hardware times. Requires calling //! NvAPI_D3D_SetLatencyMarker with incrementing frameID for valid results. //! Rendering for at least 90 frames is recommended to properly fill out the //! structure. The newest completed frame is at the end (element 63) and //! is preceeded by older frames. If not enough frames are valid then all //! frames are returned with all zeroes. //! //! \since Release: 455 //! \param [in] pDev The target device //! \param [in] pGetLatencyParams The latency result structure. //! SUPPORTED OS: Windows 7 and higher //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_GetLatency(__in IUnknown *pDev, __out NV_LATENCY_RESULT_PARAMS *pGetLatencyParams); #endif //defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) //! SUPPORTED OS: Windows 7 and higher //! //! Used define latency marker type //! \ingroup dx typedef enum { SIMULATION_START = 0, SIMULATION_END = 1, RENDERSUBMIT_START = 2, RENDERSUBMIT_END = 3, PRESENT_START = 4, PRESENT_END = 5, INPUT_SAMPLE = 6, TRIGGER_FLASH = 7, } NV_LATENCY_MARKER_TYPE; //! SUPPORTED OS: Windows 7 and higher //! //! Used set latency markers //! \ingroup dx typedef struct _NV_LATENCY_MARKER_PARAMS { NvU32 version; //!< (IN) Structure version NvU64 frameID; NV_LATENCY_MARKER_TYPE markerType; NvU8 rsvd[64]; } NV_LATENCY_MARKER_PARAMS_V1; typedef NV_LATENCY_MARKER_PARAMS_V1 NV_LATENCY_MARKER_PARAMS; #define NV_LATENCY_MARKER_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_LATENCY_MARKER_PARAMS_V1, 1) #define NV_LATENCY_MARKER_PARAMS_VER NV_LATENCY_MARKER_PARAMS_VER1 #if defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_SetLatencyMarker // //! DESCRIPTION: Set a latency marker to be tracked by the //! NvAPI_D3D_GetLatency function. SIMULATION_START must be the first marker //! sent in a frame, after the previous frame's Sleep call (if used). //! INPUT_SAMPLE may be sent to record the moment user input was sampled and //! should come between SIMULATION_START and SIMULATION_END. //! RENDERSUBMIT_START should come before any Direct3D calls are made for //! the given frame and RENDERSUBMIT_END should come before calling Present. //! PRESENT_START and END should wrap the Present call to inform the driver //! of a present block done by the OS before the driver receives the Present. //! TRIGGER_FLASH tells the driver to render its flash indicator for latency //! testing, typically driven by a mouse click. //! The frameID can start at an abitrary moment in the application lifetime //! but must strictly increment from that point forward for consistent results. //! //! \since Release: 455 //! \param [in] pDev The target device //! \param [in] pSetLatencyMarkerParams The latency marker structure //! SUPPORTED OS: Windows 7 and higher //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_SetLatencyMarker(__in IUnknown *pDev, __in NV_LATENCY_MARKER_PARAMS* pSetLatencyMarkerParams); #endif //defined(__cplusplus) && (defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) || defined(__d3d12_h__)) #if defined(__cplusplus) && defined(__d3d12_h__) /////////////////////////////////////////////////////////////////////////////// // // CLASS NAME: D3D12NvStreamFile // //! DESCRIPTION: This object represents a file to be streamed. This object can only //! be created by the D3D12NvStreamProcessor object. This object is //! created and referenced when D3D12NvStreamProcessor::CreateFile //! is called. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// DECLARE_INTERFACE_(__declspec(uuid("5A88DBEE-E67F-4CD8-9D7D-00124B7D1677"))ID3D12NvStreamFile_V1, IUnknown) { BEGIN_INTERFACE // *** IUnknown methods *** STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // ** ID3D12NvStreamFile methods *** STDMETHOD_(bool,UsingFilesystemBypass)(THIS) PURE; END_INTERFACE }; typedef ID3D12NvStreamFile_V1 ID3D12NvStreamFile; #define ID3D12NvStreamFile_VER1 MAKE_NVAPI_VERSION(IID3D12NvStreamFile_V1, 1) #define ID3D12NvStreamFile_VER ID3D12NvStreamFile_VER1 /////////////////////////////////////////////////////////////////////////////// // // CLASS NAME: D3D12NvStreamSource // //! DESCRIPTION: This object represents an source to be streamed. A source //! can be either a file or a resource. This object can only //! be created by the D3D12NvStreamProcessor object. This object is //! created and referenced when D3D12NvStreamProcessor::CreateSource is called. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// DECLARE_INTERFACE_(__declspec(uuid("1E0D5D26-5D08-432C-BF68-8E51B15A4204"))ID3D12NvStreamSource_V1, IUnknown) { BEGIN_INTERFACE enum Type { TYPE_FILE, TYPE_FILE_COMPRESSED, TYPE_RESOURCE }; // *** IUnknown methods *** STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // ** ID3D12NvStreamSource methods *** STDMETHOD_(Type, GetType)() PURE; END_INTERFACE }; typedef ID3D12NvStreamSource_V1 ID3D12NvStreamSource; #define ID3D12NvStreamSource_VER1 MAKE_NVAPI_VERSION(IID3D12NvStreamSource_V1, 1) #define ID3D12NvStreamSource_VER ID3D12NvStreamSource_VER1 /////////////////////////////////////////////////////////////////////////////// // // CLASS NAME: D3D12NvStreamDest // //! DESCRIPTION: This object represents a destination to receive the stream. //! A destination can only be a resource. This object can only //! be created by the D3D12NvStreamProcessor object. This object is //! created and referenced when D3D12NvStreamProcessor::CreateDest is called. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// DECLARE_INTERFACE_(__declspec(uuid("F97496A7-C87A-410C-B751-38EC3602C263"))ID3D12NvStreamDest_V1, IUnknown) { BEGIN_INTERFACE // *** IUnknown methods *** STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // ** ID3D12NvStreamDest methods *** END_INTERFACE }; typedef ID3D12NvStreamDest_V1 ID3D12NvStreamDest; #define ID3D12NvStreamDest_VER1 MAKE_NVAPI_VERSION(IID3D12NvStreamDest_V1, 1) #define ID3D12NvStreamDest_VER ID3D12NvStreamDest_VER1 /////////////////////////////////////////////////////////////////////////////// enum NVAPI_STREAM_QUEUE_PRIORITY { NVAPI_STREAM_PRIORITY_LOW, NVAPI_STREAM_PRIORITY_NORMAL, NVAPI_STREAM_PRIORITY_HIGH, NVAPI_STREAM_PRIORITY_REALTIME, NVAPI_STREAM_PRIORITY_COUNT }; typedef struct _NVAPI_STREAM_QUEUE_DESC { NvU32 maxRequests; // The maximum number of requests the queue can hold. NVAPI_STREAM_QUEUE_PRIORITY priority; // The priority of the requests in this queue. } NVAPI_STREAM_QUEUE_DESC_V1; typedef NVAPI_STREAM_QUEUE_DESC_V1 NVAPI_STREAM_QUEUE_DESC; #define NVAPI_STREAM_QUEUE_DESC_VER1 MAKE_NVAPI_VERSION(NVAPI_STREAM_QUEUE_DESC_V1, 1) #define NVAPI_STREAM_QUEUE_DESC_VER NVAPI_STREAM_QUEUE_DESC_VER1 // This structure defines the the subresources layout within the source. It assumes the resources is tightly packed (no padding) // Usage of this structure is deprecated // deprecated. Use NVAPI_SOURCE_SUBRESOURCE_DATA instead typedef struct _NVAPI_SOURCE_SUBRESOURCE_FOOTPRINT { NvU64 offset; // Offset within the source where this subresource is. UINT width; // The width of the source sub resource. UINT height; // The height of the source sub resource. Value must be 1 for buffers UINT depth; // The depth of the source sub resource. Value must be 1 for 2D textures. UINT rowPitch; // The pitch of the source sub resource. May be (width*BPP) or a higher value. } NVAPI_SOURCE_SUBRESOURCE_FOOTPRINT_V1; typedef NVAPI_SOURCE_SUBRESOURCE_FOOTPRINT_V1 NVAPI_SOURCE_SUBRESOURCE_FOOTPRINT; #define NVAPI_SOURCE_SUBRESOURCE_FOOTPRINT_VER1 MAKE_NVAPI_VERSION(NVAPI_SOURCE_SUBRESOURCE_FOOTPRINT_V1, 1) #define NVAPI_SOURCE_SUBRESOURCE_FOOTPRINT_VER NVAPI_SOURCE_SUBRESOURCE_FOOTPRINT_VER1 // specifes how the data is arranged in the source. // It allows for Row major layouts(buffers, pitch textures), Tiled layouts(tiled resources) or default/unknown layouts (analogous to textures created with D3D12DDI_TL_UNDEFINED) enum NVAPI_STREAM_SUBRESOURCE_DATALAYOUT { LAYOUT_ROW_MAJOR, // Source data is in pitch-linear , copy operation will use dimensions of destination subresource LAYOUT_TILE_SHAPE // Source data is tiled and needs special swizzling when copied. The copy operation will copy to all the tiles within the dst subresource using dimensions and coordinates derived internally. }; // This structure defines the the subresources layout within the source. It allows for Row major layouts and Tiled layouts // If layout is tiled, make sure the destination subresource being copied is an unpacked mip. Packed mip copies are not allowed for this layout typedef struct _NVAPI_SOURCE_SUBRESOURCE_DATA { NvU64 offset; // Offset within the source where this subresource is. NvU64 rowPitch; // The pitch of the source sub resource. May be (width*BPP) or a higher value. Only needed for sources with LAYOUT_ROW_MAJOR (MUST be specified). Remaining dimensions are derived from the destination subresource NVAPI_STREAM_SUBRESOURCE_DATALAYOUT dataLayout; // The layout of the data, helps determine how the source will be copied } NVAPI_SOURCE_SUBRESOURCE_DATA_V1; typedef NVAPI_SOURCE_SUBRESOURCE_DATA_V1 NVAPI_SOURCE_SUBRESOURCE_DATA; #define NVAPI_SOURCE_SUBRESOURCE_DATA_VER1 MAKE_NVAPI_VERSION(NVAPI_SOURCE_SUBRESOURCE_DATA_V1, 1) #define NVAPI_SOURCE_SUBRESOURCE_DATA_VER NVAPI_SOURCE_SUBRESOURCE_DATA_VER1 /////////////////////////////////////////////////////////////////////////////// // // CLASS NAME: D3D12NvStreamQueue // //! DESCRIPTION: This object manages the requests of a given priority. The requests //! are submitted to the D3D12NvStreamProcessor in the same order they //! were enqueued. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// DECLARE_INTERFACE_(__declspec(uuid("6C607D01-EEC4-4A83-B6BD-688DD9CCEFFD"))ID3D12NvStreamQueue_V1, IUnknown) { BEGIN_INTERFACE // *** IUnknown methods *** STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // ** ID3D12NvStreamQueue methods *** /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: EnqueueRead //! This API has been deprecated. Please use other versions of EnqueueRead //! DESCRIPTION: Adds the given read request to the queue. This read request //! can support all different types of resources. The optionally //! the request ID can be returned. This ID is a unique identifier //! which can be used to cancel the request. Currently only supports full subresource copies //! //! \return This API will return NVAPI_NOT_SUPPORTED //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Deprecated since r470, use other overloaded versions instead") STDMETHOD_(NvAPI_Status, EnqueueRead)( ID3D12NvStreamDest* pDest, // destination to update. ID3D12NvStreamSource* pSource, // The source to upload data from. NvU64 srcOffset, // Specifies an offset in bytes of the source. Subresource offsets are relative to this value. NvU64 srcSize, // This must be non-zero for a compressed source. NvU32 FirstSubresource, // The index of the first subresource in the resource. The range of valid values is 0 to D3D12_REQ_SUBRESOURCES. NvU32 NumSubresources, // The number of subresources in the resource. The range of valid values is 0 to (D3D12_REQ_SUBRESOURCES - FirstSubresource). const NVAPI_SOURCE_SUBRESOURCE_FOOTPRINT* pLayouts, // layout definition of the Source. Should be an array of the NumSubresources void** pRequestID // Optional argument to return the requestID, which can be used to remove the request ) PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: EnqueueRead // //! DESCRIPTION: Adds the given read request to the queue. This read request //! can support all different types of resources. The optionally //! the request ID can be returned. This ID is a unique identifier //! which can be used to cancel the request. Currently only supports full subresource copies //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, EnqueueRead)( ID3D12NvStreamDest* pDest, // destination to update. ID3D12NvStreamSource* pSource, // The source to upload data from. NvU64 srcOffset, // Specifies an offset in bytes of the source. Subresource offsets are relative to this value. NvU64 srcSize, // This must be non-zero for a compressed source. NvU32 FirstSubresource, // The index of the first subresource in the resource. The range of valid values is 0 to D3D12_REQ_SUBRESOURCES. NvU32 NumSubresources, // The number of subresources in the resource. The range of valid values is 0 to (D3D12_REQ_SUBRESOURCES - FirstSubresource). const NVAPI_SOURCE_SUBRESOURCE_DATA* pSubResData, // layout definition of the Source. Should be an array of the NumSubresources void** pRequestID // Optional argument to return the requestID, which can be used to remove the request ) PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: EnqueueRead // This API has been deprecated. Please use other versions of EnqueueRead //! DESCRIPTION: Overloaded / helper function that extracts the sub resource layout //! information from the destination resource and adds the read request to the queue. //! //! \return This API will return NVAPI_NOT_SUPPORTED //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Deprecated since r470, use other overloaded versions instead") STDMETHOD_(NvAPI_Status, EnqueueRead)( ID3D12NvStreamDest* pDest, // destination to update. NvU64 dstOffset, // Specifies an offset in bytes of the destination. ID3D12NvStreamSource* pSource, // The source to upload data from. NvU64 srcOffset, // Specifies an offset in bytes of the source. NvU64 srcSize, // Specifies the size to read from the source. void** pRequestID // Optional argument to return the requestID, which can be used to remove the request ) PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: EnqueueRead // //! DESCRIPTION: Overloaded / helper function to copy a data to a single subresource or within a buffer offset. It extracts the layout information from the destination resource //! and adds the read request to the queue. //! This call doesn't support LAYOUT_TILE_SHAPE source data and assumes ROW_MAJOR layout //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, EnqueueRead)( ID3D12NvStreamDest* pDest, // destination to update. NvU64 dstOffset, // Specifies an offset in bytes of the destination buffer. Shouldn't be specified for textures ID3D12NvStreamSource* pSource, // The source to upload data from. NvU64 srcOffset, // Specifies an offset in bytes of the source. NvU64 srcSize, // This must be non-zero for a compressed source. Not needed for uncompressed data. NvU64 rowPitch, // The row pitch or width of subresource data in bytes. Must be a multiple of D3D12_TEXTURE_DATA_PITCH_ALIGNMENT (256), and must be greater than or equal to the size of the data within a row. // This is ignored for a compressed source void** pRequestID // Optional argument to return the requestID, which can be used to remove the request ) PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: EnqueueSignal // //! DESCRIPTION: Enqueue a signal request. When this request is processed it //! flushes the processor and signals the fence with the given //! fence value. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, EnqueueSignal)( IUnknown* pFence, // Input fence object to signal. This must be a ID3D12Fence object. NvU64 fenceValue, // Fence value to signal void** pRequestID // Optional argument to return the requestID, which can be used to remove the request ) PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: RemoveRequest // //! DESCRIPTION: Removes the request from the given queue. If the request //! has already been submitted for processsing the request can //! still be removed as long as the request has not started //! to be processed. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, RemoveRequest)( void* requestID) PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: Submit // //! DESCRIPTION: Adds all the requests in the queue to processed by the StreamProcessor. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, Submit)() PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: UpdateTileMappings // //! DESCRIPTION: Helper function to update tilemappings on the stream's queue. Behaves similar to D3D api version of ID3D12CommandQueue::UpdateTileMappings //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, UpdateTileMappings)( ID3D12Resource* pDest, // destination to update. UINT NumResourceRegions, const D3D12_TILED_RESOURCE_COORDINATE *pResourceRegionStartCoordinates, const D3D12_TILE_REGION_SIZE *pResourceRegionSizes, ID3D12Heap *pHeap, UINT NumRanges, const D3D12_TILE_RANGE_FLAGS *pRangeFlags, const UINT *pHeapRangeStartOffsets, const UINT *pRangeTileCounts, D3D12_TILE_MAPPING_FLAGS Flags ) PURE; END_INTERFACE }; typedef ID3D12NvStreamQueue_V1 ID3D12NvStreamQueue; #define ID3D12NvStreamQueue_VER1 MAKE_NVAPI_VERSION(IID3D12NvStreamQueue_V1, 1) #define ID3D12NvStreamQueue_VER ID3D12NvStreamQueue_VER1 /////////////////////////////////////////////////////////////////////////////// typedef struct _NVAPI_STREAM_SOURCE_DESC { enum Type { TYPE_FILE, TYPE_FILE_COMPRESSED, TYPE_RESOURCE }; Type type; union { ID3D12NvStreamFile* pFile; ID3D12Resource* pResource; }; } NVAPI_STREAM_SOURCE_DESC_V1; typedef NVAPI_STREAM_SOURCE_DESC_V1 NVAPI_STREAM_SOURCE_DESC; #define NVAPI_STREAM_SOURCE_DESC_VER1 MAKE_NVAPI_VERSION(NVAPI_STREAM_SOURCE_DESC_V1, 1) #define NVAPI_STREAM_SOURCE_DESC_VER NVAPI_STREAM_SOURCE_DESC_VER1 /////////////////////////////////////////////////////////////////////////////// // // CLASS NAME: D3D12NvStreamProcessor // //! DESCRIPTION: This object is the manager of the requests. They take the //! request from the queue and inserts it into the priority //! sorted list of requests to be serviced. A worker thread is //! created and processes all the requests in the order of //! priority and order. Requests can be removed prior to being processed. //! Once processing has begun the requests cannot be canceled. //! This is a singleton and only a single instance per process is supported. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// typedef class _ID3D12NvStreamProcessor_V1 { public: // ** ID3D12NvStreamProcessor methods *** /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: CreateFile // //! DESCRIPTION: Creates a file object given the input file name that will be //! used with this processor. The applicaiton is responsible to //! Release() the returned file object. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, CreateFile)( const char* fileName, ID3D12NvStreamFile** pFile) PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: CreateSource // //! DESCRIPTION: Create a source object given the input descriptor that will be //! used with this processor. The application is responsible to //! Release() the returned source object. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, CreateSource)( const NVAPI_STREAM_SOURCE_DESC* pDesc, ID3D12NvStreamSource** pSource) PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: CreateDest // //! DESCRIPTION: Create a destination object given a resource that will be used //! with this processor. Fails if resource doesn't exist. The //! applicaiton is responsible to Release() the returned destination object. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, CreateDest)( ID3D12Resource* pResource, ID3D12NvStreamDest** pDest) PURE; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: CreateQueue // //! DESCRIPTION: Creates a queue object given the provided descriptor that will //! be used with this processor. The queue is serviced based on the priority. //! The applicaiton is responsible to Release() the returned queue object. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// STDMETHOD_(NvAPI_Status, CreateQueue)( const NVAPI_STREAM_QUEUE_DESC* pDesc, ID3D12NvStreamQueue** pStreamQueue) PURE; } ID3D12NvStreamProcessor_V1; typedef ID3D12NvStreamProcessor_V1 ID3D12NvStreamProcessor; #define ID3D12NvStreamProcessor_VER1 MAKE_NVAPI_VERSION(IID3D12NvStreamProcessor_V1, 1) #define ID3D12NvStreamProcessor_VER ID3D12NvStreamProcessor_VER1 typedef struct _NVAPI_CREATE_STREAM_PROCESSOR_PARAMS { ID3D12NvStreamProcessor** ppNvapiStreamProcessor; // Stream processor object returned to application IUnknown *pDev; // The device that is used to create this stream process NvU64 StagingBufferSize; // Size of staging buffer to be used for copies. If zero, the driver will use it's own size. bool SupportCompression; // If this is set to true the staging buffer size is aligned to 8MB and an addional staging buffer in vidmem. NvU64 WorkerThreadAffinityMask; // The mask to control the worker thread affinity. NvS32 WorkerThreadPriority; // Value that sets the worker thread priority. } NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_V1; #define NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_VER1 MAKE_NVAPI_VERSION(NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_V1, 1) typedef struct { NvU32 version; // Used for versioning ID3D12NvStreamProcessor** ppNvapiStreamProcessor; // Stream processor object returned to application IUnknown *pDev; // The device that is used to create this stream process NvU64 StagingBufferSize; // Size of staging buffer to be used for copies. If zero, the driver will use it's own size. bool SupportCompression; // If this is set to true the staging buffer size is aligned to 8MB and an addional staging buffer in vidmem. NvU64 WorkerThreadAffinityMask; // The mask to control the worker thread affinity. NvS32 WorkerThreadPriority; // Value that sets the worker thread priority. NvU32 NodeMask; // For single GPU op, set it to zero. For mGPU, set a bit to identify the gpu node. } NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_V2; #define NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_VER2 MAKE_NVAPI_VERSION(NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_V2, 2) // Enum for bitfield typedef enum { SUPPORT_COMPRESSION = 1, USE_FILESYSTEM_BYPASS = 2, } NVAPI_CREATE_STREAM_PROCESSOR_FLAGS; typedef struct { NvU32 version; // Used for versioning ID3D12NvStreamProcessor** ppNvapiStreamProcessor; // Stream processor object returned to application IUnknown *pDev; // The device that is used to create this stream process NvU64 StagingBufferSize; // Size of staging buffer to be used for copies. If zero, the driver will use it's own size. NvU64 WorkerThreadAffinityMask; // The mask to control the worker thread affinity. NvS32 WorkerThreadPriority; // Value that sets the worker thread priority. NvU32 NodeMask; // For single GPU op, set it to zero. For mGPU, set a bit to identify the gpu node. NvU32 Flags; // Bitfield of NVAPI_CREATE_STREAM_PROCESSOR_FLAGS } NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_V3; #define NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_VER3 MAKE_NVAPI_VERSION(NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_V3, 3) typedef NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_V3 NVAPI_CREATE_STREAM_PROCESSOR_PARAMS; #define NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_VER NVAPI_CREATE_STREAM_PROCESSOR_PARAMS_VER3 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_CreateStreamProcessor // //! DESCRIPTION: Create Streaming Processor Object for file I/O upload to video memory surface. //! If this is called multiple times without destroying the stream processor //! the pointer to the original stream processor will be returned. The application is //! responsible for calling NvAPI_D3D_DestroyStreamProcessor. //! //! \since Release: ?? //! \param [in] pCreateParams // see struct NVAPI_CREATE_STREAM_PROCESSOR_PARAMS for details //! SUPPORTED OS: Windows 10 and higher //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_CreateStreamProcessor(NVAPI_CREATE_STREAM_PROCESSOR_PARAMS* pCreateParams); #endif //defined(__cplusplus) && defined(__d3d12_h__) #if defined(__cplusplus) && defined(__d3d12_h__) typedef struct _NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS { ID3D12NvStreamProcessor* pNvapiStreamProcessor; //Stream processor to be destroyed } NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS_V1; typedef NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS_V1 NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS; #define NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS_VER1 MAKE_NVAPI_VERSION(NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS_V1, 1) #define NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS_VER NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D_DestroyStreamProcessor // //! DESCRIPTION: Destroy Streaming Processor Object that was previously created //! with NvAPI_D3D_CreateStreamProcessor //! //! \since Release: ?? //! \param [in] pDestroyParams // see struct NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS for details //! SUPPORTED OS: Windows 10 and higher //! //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! \ingroup dx /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D_DestroyStreamProcessor(NVAPI_DESTROY_STREAM_PROCESSOR_PARAMS* pDestroyParams); #endif //defined(__cplusplus) && defined(__d3d12_h__) #if defined (__cplusplus) && defined(__d3d12_h__) // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D12_CreateCubinComputeShader(__in ID3D12Device* pDevice, __in const void* pCubin, __in NvU32 size, __in NvU32 blockX, __in NvU32 blockY, __in NvU32 blockZ, __out NVDX_ObjectHandle* phShader); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D12_CreateCubinComputeShaderEx(__in ID3D12Device* pDevice, __in const void* pCubin, __in NvU32 size, __in NvU32 blockX, __in NvU32 blockY, __in NvU32 blockZ, __in NvU32 dynSharedMemBytes, __in const char* pShaderName, __out NVDX_ObjectHandle* phShader); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D12_CreateCubinComputeShaderWithName(__in ID3D12Device* pDevice, __in const void* pCubin, __in NvU32 size, __in NvU32 blockX, __in NvU32 blockY, __in NvU32 blockZ, __in const char* pShaderName, __out NVDX_ObjectHandle* phShader); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D12_LaunchCubinShader(__in ID3D12GraphicsCommandList* pCommandList, __in NVDX_ObjectHandle hShader, __in NvU32 gridX, __in NvU32 gridY, __in NvU32 gridZ, __in const void* pParams, __in NvU32 paramSize); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D12_DestroyCubinComputeShader(__in ID3D12Device* pDevice, __in NVDX_ObjectHandle hShader); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D12_GetCudaTextureObject(__in ID3D12Device* pDevice, __in D3D12_CPU_DESCRIPTOR_HANDLE texDesc, __in D3D12_CPU_DESCRIPTOR_HANDLE smpDesc, __out NvU32* pTextureHandle); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D12_GetCudaSurfaceObject(__in ID3D12Device* pDevice, __in D3D12_CPU_DESCRIPTOR_HANDLE uavDesc, __out NvU32* pSurfaceHandle); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D12_IsFatbinPTXSupported(__in ID3D12Device *pDevice, __out bool *pSupported); #endif //if defined (__cplusplus) && defined(__d3d12_h__) #if defined (__cplusplus) && defined(__d3d11_h__) // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_CreateCubinComputeShader(__in ID3D11Device* pDevice, __in const void* pCubin, __in NvU32 size, __in NvU32 blockX, __in NvU32 blockY, __in NvU32 blockZ, __out NVDX_ObjectHandle* phShader); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_CreateCubinComputeShaderEx(__in ID3D11Device* pDevice, __in const void* pCubin, __in NvU32 size, __in NvU32 blockX, __in NvU32 blockY, __in NvU32 blockZ, __in NvU32 dynSharedMemBytes, __in const char* pShaderName, __out NVDX_ObjectHandle* phShader); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_CreateCubinComputeShaderWithName(__in ID3D11Device* pDevice, __in const void* pCubin, __in NvU32 size, __in NvU32 blockX, __in NvU32 blockY, __in NvU32 blockZ, __in const char* pShaderName, __out NVDX_ObjectHandle* phShader); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_LaunchCubinShader(__in ID3D11DeviceContext *pDeviceContext, __in NVDX_ObjectHandle hShader, __in NvU32 gridX, __in NvU32 gridY, __in NvU32 gridZ, __in const void* pParams, __in NvU32 paramSize, __in const NVDX_ObjectHandle* pReadResources, __in NvU32 numReadResources, __in const NVDX_ObjectHandle* pWriteResources, __in NvU32 numWriteResources); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_DestroyCubinComputeShader(__in ID3D11Device* pDevice, __in NVDX_ObjectHandle hShader); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_IsFatbinPTXSupported(__in ID3D11Device *pDevice, __out bool *pSupported); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_CreateUnorderedAccessView(__in ID3D11Device* pDevice, __in ID3D11Resource* pResource, __in const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc, __out ID3D11UnorderedAccessView** ppUAV, __out NvU32* pDriverHandle); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_CreateShaderResourceView(__in ID3D11Device* pDevice, __in ID3D11Resource* pResource, __in const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc, __out ID3D11ShaderResourceView** ppSRV, __out NvU32* pDriverHandle); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_CreateSamplerState(__in ID3D11Device* pDevice, __in const D3D11_SAMPLER_DESC* pSamplerDesc, __out ID3D11SamplerState** ppSamplerState, __out NvU32* pDriverHandle); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_GetCudaTextureObject(__in ID3D11Device* pDevice, __in NvU32 srvDriverHandle, __in NvU32 samplerDriverHandle, __out NvU32* pCudaTextureHandle); // Experimental API for internal use. DO NOT USE! //! SUPPORTED OS: Windows 10 and higher //! NVAPI_INTERFACE NvAPI_D3D11_GetResourceGPUVirtualAddress(__in ID3D11Device* pDevice, __in const NVDX_ObjectHandle hResource, __out NvU64* pGpuVA); #endif //defined(__cplusplus) && defined(__d3d11_h__) //! \ingroup vidio //! Unique identifier for VIO owner (process identifier or NVVIOOWNERID_NONE) typedef NvU32 NVVIOOWNERID; //! \addtogroup vidio //! @{ #define NVVIOOWNERID_NONE 0 //!< Unregistered ownerId //! Owner type for device typedef enum _NVVIOOWNERTYPE { NVVIOOWNERTYPE_NONE , //!< No owner for the device NVVIOOWNERTYPE_APPLICATION , //!< Application owns the device NVVIOOWNERTYPE_DESKTOP , //!< Desktop transparent mode owns the device (not applicable for video input) }NVVIOOWNERTYPE; // Access rights for NvAPI_VIO_Open() //! Read access (not applicable for video output) #define NVVIO_O_READ 0x00000000 //! Write exclusive access (not applicable for video input) #define NVVIO_O_WRITE_EXCLUSIVE 0x00010001 //! #define NVVIO_VALID_ACCESSRIGHTS (NVVIO_O_READ | \ NVVIO_O_WRITE_EXCLUSIVE ) //! VIO_DATA.ulOwnerID high-bit is set only if device has been initialized by VIOAPI //! examined at NvAPI_GetCapabilities|NvAPI_VIO_Open to determine if settings need to be applied from registry or POR state read #define NVVIO_OWNERID_INITIALIZED 0x80000000 //! VIO_DATA.ulOwnerID next-bit is set only if device is currently in exclusive write access mode from NvAPI_VIO_Open() #define NVVIO_OWNERID_EXCLUSIVE 0x40000000 //! VIO_DATA.ulOwnerID lower bits are: //! NVGVOOWNERTYPE_xxx enumerations indicating use context #define NVVIO_OWNERID_TYPEMASK 0x0FFFFFFF //!< mask for NVVIOOWNERTYPE_xxx //! @} //--------------------------------------------------------------------- // Enumerations //--------------------------------------------------------------------- //! \addtogroup vidio //! @{ //! Video signal format and resolution typedef enum _NVVIOSIGNALFORMAT { NVVIOSIGNALFORMAT_NONE, //!< Invalid signal format NVVIOSIGNALFORMAT_487I_59_94_SMPTE259_NTSC, //!< 01 487i 59.94Hz (SMPTE259) NTSC NVVIOSIGNALFORMAT_576I_50_00_SMPTE259_PAL, //!< 02 576i 50.00Hz (SMPTE259) PAL NVVIOSIGNALFORMAT_1035I_60_00_SMPTE260, //!< 03 1035i 60.00Hz (SMPTE260) NVVIOSIGNALFORMAT_1035I_59_94_SMPTE260, //!< 04 1035i 59.94Hz (SMPTE260) NVVIOSIGNALFORMAT_1080I_50_00_SMPTE295, //!< 05 1080i 50.00Hz (SMPTE295) NVVIOSIGNALFORMAT_1080I_60_00_SMPTE274, //!< 06 1080i 60.00Hz (SMPTE274) NVVIOSIGNALFORMAT_1080I_59_94_SMPTE274, //!< 07 1080i 59.94Hz (SMPTE274) NVVIOSIGNALFORMAT_1080I_50_00_SMPTE274, //!< 08 1080i 50.00Hz (SMPTE274) NVVIOSIGNALFORMAT_1080P_30_00_SMPTE274, //!< 09 1080p 30.00Hz (SMPTE274) NVVIOSIGNALFORMAT_1080P_29_97_SMPTE274, //!< 10 1080p 29.97Hz (SMPTE274) NVVIOSIGNALFORMAT_1080P_25_00_SMPTE274, //!< 11 1080p 25.00Hz (SMPTE274) NVVIOSIGNALFORMAT_1080P_24_00_SMPTE274, //!< 12 1080p 24.00Hz (SMPTE274) NVVIOSIGNALFORMAT_1080P_23_976_SMPTE274, //!< 13 1080p 23.976Hz (SMPTE274) NVVIOSIGNALFORMAT_720P_60_00_SMPTE296, //!< 14 720p 60.00Hz (SMPTE296) NVVIOSIGNALFORMAT_720P_59_94_SMPTE296, //!< 15 720p 59.94Hz (SMPTE296) NVVIOSIGNALFORMAT_720P_50_00_SMPTE296, //!< 16 720p 50.00Hz (SMPTE296) NVVIOSIGNALFORMAT_1080I_48_00_SMPTE274, //!< 17 1080I 48.00Hz (SMPTE274) NVVIOSIGNALFORMAT_1080I_47_96_SMPTE274, //!< 18 1080I 47.96Hz (SMPTE274) NVVIOSIGNALFORMAT_720P_30_00_SMPTE296, //!< 19 720p 30.00Hz (SMPTE296) NVVIOSIGNALFORMAT_720P_29_97_SMPTE296, //!< 20 720p 29.97Hz (SMPTE296) NVVIOSIGNALFORMAT_720P_25_00_SMPTE296, //!< 21 720p 25.00Hz (SMPTE296) NVVIOSIGNALFORMAT_720P_24_00_SMPTE296, //!< 22 720p 24.00Hz (SMPTE296) NVVIOSIGNALFORMAT_720P_23_98_SMPTE296, //!< 23 720p 23.98Hz (SMPTE296) NVVIOSIGNALFORMAT_2048P_30_00_SMPTE372, //!< 24 2048p 30.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048P_29_97_SMPTE372, //!< 25 2048p 29.97Hz (SMPTE372) NVVIOSIGNALFORMAT_2048I_60_00_SMPTE372, //!< 26 2048i 60.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048I_59_94_SMPTE372, //!< 27 2048i 59.94Hz (SMPTE372) NVVIOSIGNALFORMAT_2048P_25_00_SMPTE372, //!< 28 2048p 25.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048I_50_00_SMPTE372, //!< 29 2048i 50.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048P_24_00_SMPTE372, //!< 30 2048p 24.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048P_23_98_SMPTE372, //!< 31 2048p 23.98Hz (SMPTE372) NVVIOSIGNALFORMAT_2048I_48_00_SMPTE372, //!< 32 2048i 48.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048I_47_96_SMPTE372, //!< 33 2048i 47.96Hz (SMPTE372) NVVIOSIGNALFORMAT_1080PSF_25_00_SMPTE274, //!< 34 1080PsF 25.00Hz (SMPTE274) NVVIOSIGNALFORMAT_1080PSF_29_97_SMPTE274, //!< 35 1080PsF 29.97Hz (SMPTE274) NVVIOSIGNALFORMAT_1080PSF_30_00_SMPTE274, //!< 36 1080PsF 30.00Hz (SMPTE274) NVVIOSIGNALFORMAT_1080PSF_24_00_SMPTE274, //!< 37 1080PsF 24.00Hz (SMPTE274) NVVIOSIGNALFORMAT_1080PSF_23_98_SMPTE274, //!< 38 1080PsF 23.98Hz (SMPTE274) NVVIOSIGNALFORMAT_1080P_50_00_SMPTE274_3G_LEVEL_A, //!< 39 1080P 50.00Hz (SMPTE274) 3G Level A NVVIOSIGNALFORMAT_1080P_59_94_SMPTE274_3G_LEVEL_A, //!< 40 1080P 59.94Hz (SMPTE274) 3G Level A NVVIOSIGNALFORMAT_1080P_60_00_SMPTE274_3G_LEVEL_A, //!< 41 1080P 60.00Hz (SMPTE274) 3G Level A NVVIOSIGNALFORMAT_1080P_60_00_SMPTE274_3G_LEVEL_B, //!< 42 1080p 60.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_1080I_60_00_SMPTE274_3G_LEVEL_B, //!< 43 1080i 60.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048I_60_00_SMPTE372_3G_LEVEL_B, //!< 44 2048i 60.00Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080P_50_00_SMPTE274_3G_LEVEL_B, //!< 45 1080p 50.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_1080I_50_00_SMPTE274_3G_LEVEL_B, //!< 46 1080i 50.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048I_50_00_SMPTE372_3G_LEVEL_B, //!< 47 2048i 50.00Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080P_30_00_SMPTE274_3G_LEVEL_B, //!< 48 1080p 30.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048P_30_00_SMPTE372_3G_LEVEL_B, //!< 49 2048p 30.00Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080P_25_00_SMPTE274_3G_LEVEL_B, //!< 50 1080p 25.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048P_25_00_SMPTE372_3G_LEVEL_B, //!< 51 2048p 25.00Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080P_24_00_SMPTE274_3G_LEVEL_B, //!< 52 1080p 24.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048P_24_00_SMPTE372_3G_LEVEL_B, //!< 53 2048p 24.00Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080I_48_00_SMPTE274_3G_LEVEL_B, //!< 54 1080i 48.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048I_48_00_SMPTE372_3G_LEVEL_B, //!< 55 2048i 48.00Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080P_59_94_SMPTE274_3G_LEVEL_B, //!< 56 1080p 59.94Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_1080I_59_94_SMPTE274_3G_LEVEL_B, //!< 57 1080i 59.94Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048I_59_94_SMPTE372_3G_LEVEL_B, //!< 58 2048i 59.94Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080P_29_97_SMPTE274_3G_LEVEL_B, //!< 59 1080p 29.97Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048P_29_97_SMPTE372_3G_LEVEL_B, //!< 60 2048p 29.97Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080P_23_98_SMPTE274_3G_LEVEL_B, //!< 61 1080p 29.98Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048P_23_98_SMPTE372_3G_LEVEL_B, //!< 62 2048p 29.98Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080I_47_96_SMPTE274_3G_LEVEL_B, //!< 63 1080i 47.96Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048I_47_96_SMPTE372_3G_LEVEL_B, //!< 64 2048i 47.96Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_END //!< 65 To indicate end of signal format list }NVVIOSIGNALFORMAT; //! SMPTE standards format typedef enum _NVVIOVIDEOSTANDARD { NVVIOVIDEOSTANDARD_SMPTE259 , //!< SMPTE259 NVVIOVIDEOSTANDARD_SMPTE260 , //!< SMPTE260 NVVIOVIDEOSTANDARD_SMPTE274 , //!< SMPTE274 NVVIOVIDEOSTANDARD_SMPTE295 , //!< SMPTE295 NVVIOVIDEOSTANDARD_SMPTE296 , //!< SMPTE296 NVVIOVIDEOSTANDARD_SMPTE372 , //!< SMPTE372 }NVVIOVIDEOSTANDARD; //! HD or SD video type typedef enum _NVVIOVIDEOTYPE { NVVIOVIDEOTYPE_SD , //!< Standard-definition (SD) NVVIOVIDEOTYPE_HD , //!< High-definition (HD) }NVVIOVIDEOTYPE; //! Interlace mode typedef enum _NVVIOINTERLACEMODE { NVVIOINTERLACEMODE_PROGRESSIVE , //!< Progressive (p) NVVIOINTERLACEMODE_INTERLACE , //!< Interlace (i) NVVIOINTERLACEMODE_PSF , //!< Progressive Segment Frame (psf) }NVVIOINTERLACEMODE; //! Video data format typedef enum _NVVIODATAFORMAT { NVVIODATAFORMAT_UNKNOWN = -1 , //!< Invalid DataFormat NVVIODATAFORMAT_R8G8B8_TO_YCRCB444 , //!< R8:G8:B8 => YCrCb (4:4:4) NVVIODATAFORMAT_R8G8B8A8_TO_YCRCBA4444 , //!< R8:G8:B8:A8 => YCrCbA (4:4:4:4) NVVIODATAFORMAT_R8G8B8Z10_TO_YCRCBZ4444 , //!< R8:G8:B8:Z10 => YCrCbZ (4:4:4:4) NVVIODATAFORMAT_R8G8B8_TO_YCRCB422 , //!< R8:G8:B8 => YCrCb (4:2:2) NVVIODATAFORMAT_R8G8B8A8_TO_YCRCBA4224 , //!< R8:G8:B8:A8 => YCrCbA (4:2:2:4) NVVIODATAFORMAT_R8G8B8Z10_TO_YCRCBZ4224 , //!< R8:G8:B8:Z10 => YCrCbZ (4:2:2:4) NVVIODATAFORMAT_X8X8X8_444_PASSTHRU , //!< R8:G8:B8 => RGB (4:4:4) NVVIODATAFORMAT_X8X8X8A8_4444_PASSTHRU , //!< R8:G8:B8:A8 => RGBA (4:4:4:4) NVVIODATAFORMAT_X8X8X8Z10_4444_PASSTHRU , //!< R8:G8:B8:Z10 => RGBZ (4:4:4:4) NVVIODATAFORMAT_X10X10X10_444_PASSTHRU , //!< Y10:CR10:CB10 => YCrCb (4:4:4) NVVIODATAFORMAT_X10X8X8_444_PASSTHRU , //!< Y10:CR8:CB8 => YCrCb (4:4:4) NVVIODATAFORMAT_X10X8X8A10_4444_PASSTHRU , //!< Y10:CR8:CB8:A10 => YCrCbA (4:4:4:4) NVVIODATAFORMAT_X10X8X8Z10_4444_PASSTHRU , //!< Y10:CR8:CB8:Z10 => YCrCbZ (4:4:4:4) NVVIODATAFORMAT_DUAL_R8G8B8_TO_DUAL_YCRCB422 , //!< R8:G8:B8 + R8:G8:B8 => YCrCb (4:2:2 + 4:2:2) NVVIODATAFORMAT_DUAL_X8X8X8_TO_DUAL_422_PASSTHRU , //!< Y8:CR8:CB8 + Y8:CR8:CB8 => YCrCb (4:2:2 + 4:2:2) NVVIODATAFORMAT_R10G10B10_TO_YCRCB422 , //!< R10:G10:B10 => YCrCb (4:2:2) NVVIODATAFORMAT_R10G10B10_TO_YCRCB444 , //!< R10:G10:B10 => YCrCb (4:4:4) NVVIODATAFORMAT_X12X12X12_444_PASSTHRU , //!< X12:X12:X12 => XXX (4:4:4) NVVIODATAFORMAT_X12X12X12_422_PASSTHRU , //!< X12:X12:X12 => XXX (4:2:2) NVVIODATAFORMAT_Y10CR10CB10_TO_YCRCB422 , //!< Y10:CR10:CB10 => YCrCb (4:2:2) NVVIODATAFORMAT_Y8CR8CB8_TO_YCRCB422 , //!< Y8:CR8:CB8 => YCrCb (4:2:2) NVVIODATAFORMAT_Y10CR8CB8A10_TO_YCRCBA4224 , //!< Y10:CR8:CB8:A10 => YCrCbA (4:2:2:4) NVVIODATAFORMAT_R10G10B10_TO_RGB444 , //!< R10:G10:B10 => RGB (4:4:4) NVVIODATAFORMAT_R12G12B12_TO_YCRCB444 , //!< R12:G12:B12 => YCrCb (4:4:4) NVVIODATAFORMAT_R12G12B12_TO_YCRCB422 , //!< R12:G12:B12 => YCrCb (4:2:2) }NVVIODATAFORMAT; //! Video output area typedef enum _NVVIOOUTPUTAREA { NVVIOOUTPUTAREA_FULLSIZE , //!< Output to entire video resolution (full size) NVVIOOUTPUTAREA_SAFEACTION , //!< Output to centered 90% of video resolution (safe action) NVVIOOUTPUTAREA_SAFETITLE , //!< Output to centered 80% of video resolution (safe title) }NVVIOOUTPUTAREA; //! Synchronization source typedef enum _NVVIOSYNCSOURCE { NVVIOSYNCSOURCE_SDISYNC , //!< SDI Sync (Digital input) NVVIOSYNCSOURCE_COMPSYNC , //!< COMP Sync (Composite input) }NVVIOSYNCSOURCE; //! Composite synchronization type typedef enum _NVVIOCOMPSYNCTYPE { NVVIOCOMPSYNCTYPE_AUTO , //!< Auto-detect NVVIOCOMPSYNCTYPE_BILEVEL , //!< Bi-level signal NVVIOCOMPSYNCTYPE_TRILEVEL , //!< Tri-level signal }NVVIOCOMPSYNCTYPE; //! Video input output status typedef enum _NVVIOINPUTOUTPUTSTATUS { NVINPUTOUTPUTSTATUS_OFF , //!< Not in use NVINPUTOUTPUTSTATUS_ERROR , //!< Error detected NVINPUTOUTPUTSTATUS_SDI_SD , //!< SDI (standard-definition) NVINPUTOUTPUTSTATUS_SDI_HD , //!< SDI (high-definition) }NVVIOINPUTOUTPUTSTATUS; //! Synchronization input status typedef enum _NVVIOSYNCSTATUS { NVVIOSYNCSTATUS_OFF , //!< Sync not detected NVVIOSYNCSTATUS_ERROR , //!< Error detected NVVIOSYNCSTATUS_SYNCLOSS , //!< Genlock in use, format mismatch with output NVVIOSYNCSTATUS_COMPOSITE , //!< Composite sync NVVIOSYNCSTATUS_SDI_SD , //!< SDI sync (standard-definition) NVVIOSYNCSTATUS_SDI_HD , //!< SDI sync (high-definition) }NVVIOSYNCSTATUS; //! Video Capture Status typedef enum _NVVIOCAPTURESTATUS { NVVIOSTATUS_STOPPED , //!< Sync not detected NVVIOSTATUS_RUNNING , //!< Error detected NVVIOSTATUS_ERROR , //!< Genlock in use, format mismatch with output }NVVIOCAPTURESTATUS; //! Video Capture Status typedef enum _NVVIOSTATUSTYPE { NVVIOSTATUSTYPE_IN , //!< Input Status NVVIOSTATUSTYPE_OUT , //!< Output Status }NVVIOSTATUSTYPE; //! Assumption, maximum 4 SDI input and 4 SDI output cards supported on a system #define NVAPI_MAX_VIO_DEVICES 8 //! 4 physical jacks supported on each SDI input card. #define NVAPI_MAX_VIO_JACKS 4 //! Each physical jack an on SDI input card can have //! two "channels" in the case of "3G" VideoFormats, as specified //! by SMPTE 425; for non-3G VideoFormats, only the first channel within //! a physical jack is valid. #define NVAPI_MAX_VIO_CHANNELS_PER_JACK 2 //! 4 Streams, 1 per physical jack #define NVAPI_MAX_VIO_STREAMS 4 #define NVAPI_MIN_VIO_STREAMS 1 //! SDI input supports a max of 2 links per stream #define NVAPI_MAX_VIO_LINKS_PER_STREAM 2 #define NVAPI_MAX_FRAMELOCK_MAPPING_MODES 20 //! Min number of capture images #define NVAPI_GVI_MIN_RAW_CAPTURE_IMAGES 1 //! Max number of capture images #define NVAPI_GVI_MAX_RAW_CAPTURE_IMAGES 32 //! Default number of capture images #define NVAPI_GVI_DEFAULT_RAW_CAPTURE_IMAGES 5 // Data Signal notification events. These need a event handler in RM. // Register/Unregister and PopEvent NVAPI's are already available. //! Device configuration typedef enum _NVVIOCONFIGTYPE { NVVIOCONFIGTYPE_IN , //!< Input Status NVVIOCONFIGTYPE_OUT , //!< Output Status }NVVIOCONFIGTYPE; typedef enum _NVVIOCOLORSPACE { NVVIOCOLORSPACE_UNKNOWN, NVVIOCOLORSPACE_YCBCR, NVVIOCOLORSPACE_YCBCRA, NVVIOCOLORSPACE_YCBCRD, NVVIOCOLORSPACE_GBR, NVVIOCOLORSPACE_GBRA, NVVIOCOLORSPACE_GBRD, } NVVIOCOLORSPACE; //! Component sampling typedef enum _NVVIOCOMPONENTSAMPLING { NVVIOCOMPONENTSAMPLING_UNKNOWN, NVVIOCOMPONENTSAMPLING_4444, NVVIOCOMPONENTSAMPLING_4224, NVVIOCOMPONENTSAMPLING_444, NVVIOCOMPONENTSAMPLING_422 } NVVIOCOMPONENTSAMPLING; typedef enum _NVVIOBITSPERCOMPONENT { NVVIOBITSPERCOMPONENT_UNKNOWN, NVVIOBITSPERCOMPONENT_8, NVVIOBITSPERCOMPONENT_10, NVVIOBITSPERCOMPONENT_12, } NVVIOBITSPERCOMPONENT; typedef enum _NVVIOLINKID { NVVIOLINKID_UNKNOWN, NVVIOLINKID_A, NVVIOLINKID_B, NVVIOLINKID_C, NVVIOLINKID_D } NVVIOLINKID; typedef enum _NVVIOANCPARITYCOMPUTATION { NVVIOANCPARITYCOMPUTATION_AUTO, NVVIOANCPARITYCOMPUTATION_ON, NVVIOANCPARITYCOMPUTATION_OFF } NVVIOANCPARITYCOMPUTATION; //! @} //--------------------------------------------------------------------- // Structures //--------------------------------------------------------------------- //! \addtogroup vidio //! @{ //! Supports Serial Digital Interface (SDI) output #define NVVIOCAPS_VIDOUT_SDI 0x00000001 //! Supports Internal timing source #define NVVIOCAPS_SYNC_INTERNAL 0x00000100 //! Supports Genlock timing source #define NVVIOCAPS_SYNC_GENLOCK 0x00000200 //! Supports Serial Digital Interface (SDI) synchronization input #define NVVIOCAPS_SYNCSRC_SDI 0x00001000 //! Supports Composite synchronization input #define NVVIOCAPS_SYNCSRC_COMP 0x00002000 //! Supports Desktop transparent mode #define NVVIOCAPS_OUTPUTMODE_DESKTOP 0x00010000 //! Supports OpenGL application mode #define NVVIOCAPS_OUTPUTMODE_OPENGL 0x00020000 //! Supports Serial Digital Interface (SDI) input #define NVVIOCAPS_VIDIN_SDI 0x00100000 //! Supports Packed ANC #define NVVIOCAPS_PACKED_ANC_SUPPORTED 0x00200000 //! Supports ANC audio blanking #define NVVIOCAPS_AUDIO_BLANKING_SUPPORTED 0x00400000 //! SDI-class interface: SDI output with two genlock inputs #define NVVIOCLASS_SDI 0x00000001 //! Device capabilities typedef struct _NVVIOCAPS { NvU32 version; //!< Structure version NvAPI_String adapterName; //!< Graphics adapter name NvU32 adapterClass; //!< Graphics adapter classes (NVVIOCLASS_SDI mask) NvU32 adapterCaps; //!< Graphics adapter capabilities (NVVIOCAPS_* mask) NvU32 dipSwitch; //!< On-board DIP switch settings bits NvU32 dipSwitchReserved; //!< On-board DIP switch settings reserved bits NvU32 boardID; //!< Board ID //! Driver version struct // { NvU32 majorVersion; //!< Major version. For GVI, majorVersion contains MajorVersion(HIWORD) And MinorVersion(LOWORD) NvU32 minorVersion; //!< Minor version. For GVI, minorVersion contains Revison(HIWORD) And Build(LOWORD) } driver; // //! Firmware version struct { NvU32 majorVersion; //!< Major version. In version 2, for both GVI and GVO, majorVersion contains MajorVersion(HIWORD) And MinorVersion(LOWORD) NvU32 minorVersion; //!< Minor version. In version 2, for both GVI and GVO, minorVersion contains Revison(HIWORD) And Build(LOWORD) } firmWare; // NVVIOOWNERID ownerId; //!< Unique identifier for owner of video output (NVVIOOWNERID_INVALID if free running) NVVIOOWNERTYPE ownerType; //!< Owner type (OpenGL application or Desktop mode) } NVVIOCAPS; //! Macro for constructing the version field of NVVIOCAPS #define NVVIOCAPS_VER1 MAKE_NVAPI_VERSION(NVVIOCAPS,1) #define NVVIOCAPS_VER2 MAKE_NVAPI_VERSION(NVVIOCAPS,2) #define NVVIOCAPS_VER NVVIOCAPS_VER2 //! Input channel status typedef struct _NVVIOCHANNELSTATUS { NvU32 smpte352; //!< 4-byte SMPTE 352 video payload identifier NVVIOSIGNALFORMAT signalFormat; //!< Signal format NVVIOBITSPERCOMPONENT bitsPerComponent; //!< Bits per component NVVIOCOMPONENTSAMPLING samplingFormat; //!< Sampling format NVVIOCOLORSPACE colorSpace; //!< Color space NVVIOLINKID linkID; //!< Link ID } NVVIOCHANNELSTATUS; //! Input device status typedef struct _NVVIOINPUTSTATUS { NVVIOCHANNELSTATUS vidIn[NVAPI_MAX_VIO_JACKS][NVAPI_MAX_VIO_CHANNELS_PER_JACK]; //!< Video input status per channel within a jack NVVIOCAPTURESTATUS captureStatus; //!< status of video capture } NVVIOINPUTSTATUS; //! Output device status typedef struct _NVVIOOUTPUTSTATUS { NVVIOINPUTOUTPUTSTATUS vid1Out; //!< Video 1 output status NVVIOINPUTOUTPUTSTATUS vid2Out; //!< Video 2 output status NVVIOSYNCSTATUS sdiSyncIn; //!< SDI sync input status NVVIOSYNCSTATUS compSyncIn; //!< Composite sync input status NvU32 syncEnable; //!< Sync enable (TRUE if using syncSource) NVVIOSYNCSOURCE syncSource; //!< Sync source NVVIOSIGNALFORMAT syncFormat; //!< Sync format NvU32 frameLockEnable; //!< Framelock enable flag NvU32 outputVideoLocked; //!< Output locked status NvU32 dataIntegrityCheckErrorCount; //!< Data integrity check error count NvU32 dataIntegrityCheckEnabled; //!< Data integrity check status enabled NvU32 dataIntegrityCheckFailed; //!< Data integrity check status failed NvU32 uSyncSourceLocked; //!< genlocked to framelocked to ref signal NvU32 uPowerOn; //!< TRUE: indicates there is sufficient power } NVVIOOUTPUTSTATUS; //! Video device status. typedef struct _NVVIOSTATUS { NvU32 version; //!< Structure version NVVIOSTATUSTYPE nvvioStatusType; //!< Input or Output status union { NVVIOINPUTSTATUS inStatus; //!< Input device status NVVIOOUTPUTSTATUS outStatus; //!< Output device status }vioStatus; } NVVIOSTATUS; //! Macro for constructingthe version field of NVVIOSTATUS #define NVVIOSTATUS_VER MAKE_NVAPI_VERSION(NVVIOSTATUS,1) //! Output region typedef struct _NVVIOOUTPUTREGION { NvU32 x; //!< Horizontal origin in pixels NvU32 y; //!< Vertical origin in pixels NvU32 width; //!< Width of region in pixels NvU32 height; //!< Height of region in pixels } NVVIOOUTPUTREGION; //! Gamma ramp (8-bit index) typedef struct _NVVIOGAMMARAMP8 { NvU16 uRed[256]; //!< Red channel gamma ramp (8-bit index, 16-bit values) NvU16 uGreen[256]; //!< Green channel gamma ramp (8-bit index, 16-bit values) NvU16 uBlue[256]; //!< Blue channel gamma ramp (8-bit index, 16-bit values) } NVVIOGAMMARAMP8; //! Gamma ramp (10-bit index) typedef struct _NVVIOGAMMARAMP10 { NvU16 uRed[1024]; //!< Red channel gamma ramp (10-bit index, 16-bit values) NvU16 uGreen[1024]; //!< Green channel gamma ramp (10-bit index, 16-bit values) NvU16 uBlue[1024]; //!< Blue channel gamma ramp (10-bit index, 16-bit values) } NVVIOGAMMARAMP10; //! Sync delay typedef struct _NVVIOSYNCDELAY { NvU32 version; //!< Structure version NvU32 horizontalDelay; //!< Horizontal delay in pixels NvU32 verticalDelay; //!< Vertical delay in lines } NVVIOSYNCDELAY; //! Macro for constructing the version field of NVVIOSYNCDELAY #define NVVIOSYNCDELAY_VER MAKE_NVAPI_VERSION(NVVIOSYNCDELAY,1) //! Video mode information typedef struct _NVVIOVIDEOMODE { NvU32 horizontalPixels; //!< Horizontal resolution (in pixels) NvU32 verticalLines; //!< Vertical resolution for frame (in lines) float fFrameRate; //!< Frame rate NVVIOINTERLACEMODE interlaceMode; //!< Interlace mode NVVIOVIDEOSTANDARD videoStandard; //!< SMPTE standards format NVVIOVIDEOTYPE videoType; //!< HD or SD signal classification } NVVIOVIDEOMODE; //! Signal format details typedef struct _NVVIOSIGNALFORMATDETAIL { NVVIOSIGNALFORMAT signalFormat; //!< Signal format enumerated value NVVIOVIDEOMODE videoMode; //!< Video mode for signal format }NVVIOSIGNALFORMATDETAIL; //! R8:G8:B8 #define NVVIOBUFFERFORMAT_R8G8B8 0x00000001 //! R8:G8:B8:Z24 #define NVVIOBUFFERFORMAT_R8G8B8Z24 0x00000002 //! R8:G8:B8:A8 #define NVVIOBUFFERFORMAT_R8G8B8A8 0x00000004 //! R8:G8:B8:A8:Z24 #define NVVIOBUFFERFORMAT_R8G8B8A8Z24 0x00000008 //! R16FP:G16FP:B16FP #define NVVIOBUFFERFORMAT_R16FPG16FPB16FP 0x00000010 //! R16FP:G16FP:B16FP:Z24 #define NVVIOBUFFERFORMAT_R16FPG16FPB16FPZ24 0x00000020 //! R16FP:G16FP:B16FP:A16FP #define NVVIOBUFFERFORMAT_R16FPG16FPB16FPA16FP 0x00000040 //! R16FP:G16FP:B16FP:A16FP:Z24 #define NVVIOBUFFERFORMAT_R16FPG16FPB16FPA16FPZ24 0x00000080 //! Data format details typedef struct _NVVIODATAFORMATDETAIL { NVVIODATAFORMAT dataFormat; //!< Data format enumerated value NvU32 vioCaps; //!< Data format capabilities (NVVIOCAPS_* mask) }NVVIODATAFORMATDETAIL; //! Colorspace conversion typedef struct _NVVIOCOLORCONVERSION { NvU32 version; //!< Structure version float colorMatrix[3][3]; //!< Output[n] = float colorOffset[3]; //!< Input[0] * colorMatrix[n][0] + float colorScale[3]; //!< Input[1] * colorMatrix[n][1] + //!< Input[2] * colorMatrix[n][2] + //!< OutputRange * colorOffset[n] //!< where OutputRange is the standard magnitude of //!< Output[n][n] and colorMatrix and colorOffset //!< values are within the range -1.0 to +1.0 NvU32 compositeSafe; //!< compositeSafe constrains luminance range when using composite output } NVVIOCOLORCONVERSION; //! macro for constructing the version field of _NVVIOCOLORCONVERSION. #define NVVIOCOLORCONVERSION_VER MAKE_NVAPI_VERSION(NVVIOCOLORCONVERSION,1) //! Gamma correction typedef struct _NVVIOGAMMACORRECTION { NvU32 version; //!< Structure version NvU32 vioGammaCorrectionType; //!< Gamma correction type (8-bit or 10-bit) //! Gamma correction: union { NVVIOGAMMARAMP8 gammaRamp8; //!< Gamma ramp (8-bit index, 16-bit values) NVVIOGAMMARAMP10 gammaRamp10; //!< Gamma ramp (10-bit index, 16-bit values) }gammaRamp; float fGammaValueR; //!< Red Gamma value within gamma ranges. 0.5 - 6.0 float fGammaValueG; //!< Green Gamma value within gamma ranges. 0.5 - 6.0 float fGammaValueB; //!< Blue Gamma value within gamma ranges. 0.5 - 6.0 } NVVIOGAMMACORRECTION; //! Macro for constructing thevesion field of _NVVIOGAMMACORRECTION #define NVVIOGAMMACORRECTION_VER MAKE_NVAPI_VERSION(NVVIOGAMMACORRECTION,1) //! Maximum number of ranges per channel #define MAX_NUM_COMPOSITE_RANGE 2 typedef struct _NVVIOCOMPOSITERANGE { NvU32 uRange; NvU32 uEnabled; NvU32 uMin; NvU32 uMax; } NVVIOCOMPOSITERANGE; // Device configuration (fields masks indicating NVVIOCONFIG fields to use for NvAPI_VIO_GetConfig/NvAPI_VIO_SetConfig() ) // #define NVVIOCONFIG_SIGNALFORMAT 0x00000001 //!< fields: signalFormat #define NVVIOCONFIG_DATAFORMAT 0x00000002 //!< fields: dataFormat #define NVVIOCONFIG_OUTPUTREGION 0x00000004 //!< fields: outputRegion #define NVVIOCONFIG_OUTPUTAREA 0x00000008 //!< fields: outputArea #define NVVIOCONFIG_COLORCONVERSION 0x00000010 //!< fields: colorConversion #define NVVIOCONFIG_GAMMACORRECTION 0x00000020 //!< fields: gammaCorrection #define NVVIOCONFIG_SYNCSOURCEENABLE 0x00000040 //!< fields: syncSource and syncEnable #define NVVIOCONFIG_SYNCDELAY 0x00000080 //!< fields: syncDelay #define NVVIOCONFIG_COMPOSITESYNCTYPE 0x00000100 //!< fields: compositeSyncType #define NVVIOCONFIG_FRAMELOCKENABLE 0x00000200 //!< fields: EnableFramelock #define NVVIOCONFIG_422FILTER 0x00000400 //!< fields: bEnable422Filter #define NVVIOCONFIG_COMPOSITETERMINATE 0x00000800 //!< fields: bCompositeTerminate (Not supported on Quadro FX 4000 SDI) #define NVVIOCONFIG_DATAINTEGRITYCHECK 0x00001000 //!< fields: bEnableDataIntegrityCheck (Not supported on Quadro FX 4000 SDI) #define NVVIOCONFIG_CSCOVERRIDE 0x00002000 //!< fields: colorConversion override #define NVVIOCONFIG_FLIPQUEUELENGTH 0x00004000 //!< fields: flipqueuelength control #define NVVIOCONFIG_ANCTIMECODEGENERATION 0x00008000 //!< fields: bEnableANCTimeCodeGeneration #define NVVIOCONFIG_COMPOSITE 0x00010000 //!< fields: bEnableComposite #define NVVIOCONFIG_ALPHAKEYCOMPOSITE 0x00020000 //!< fields: bEnableAlphaKeyComposite #define NVVIOCONFIG_COMPOSITE_Y 0x00040000 //!< fields: compRange #define NVVIOCONFIG_COMPOSITE_CR 0x00080000 //!< fields: compRange #define NVVIOCONFIG_COMPOSITE_CB 0x00100000 //!< fields: compRange #define NVVIOCONFIG_FULL_COLOR_RANGE 0x00200000 //!< fields: bEnableFullColorRange #define NVVIOCONFIG_RGB_DATA 0x00400000 //!< fields: bEnableRGBData #define NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE 0x00800000 //!< fields: bEnableSDIOutput #define NVVIOCONFIG_STREAMS 0x01000000 //!< fields: streams #define NVVIOCONFIG_ANC_PARITY_COMPUTATION 0x02000000 //!< fields: ancParityComputation #define NVVIOCONFIG_ANC_AUDIO_REPEAT 0x04000000 //!< fields: enableAudioBlanking // Don't forget to update NVVIOCONFIG_VALIDFIELDS in nvapi.spec when NVVIOCONFIG_ALLFIELDS changes. #define NVVIOCONFIG_ALLFIELDS ( NVVIOCONFIG_SIGNALFORMAT | \ NVVIOCONFIG_DATAFORMAT | \ NVVIOCONFIG_OUTPUTREGION | \ NVVIOCONFIG_OUTPUTAREA | \ NVVIOCONFIG_COLORCONVERSION | \ NVVIOCONFIG_GAMMACORRECTION | \ NVVIOCONFIG_SYNCSOURCEENABLE | \ NVVIOCONFIG_SYNCDELAY | \ NVVIOCONFIG_COMPOSITESYNCTYPE | \ NVVIOCONFIG_FRAMELOCKENABLE | \ NVVIOCONFIG_422FILTER | \ NVVIOCONFIG_COMPOSITETERMINATE | \ NVVIOCONFIG_DATAINTEGRITYCHECK | \ NVVIOCONFIG_CSCOVERRIDE | \ NVVIOCONFIG_FLIPQUEUELENGTH | \ NVVIOCONFIG_ANCTIMECODEGENERATION | \ NVVIOCONFIG_COMPOSITE | \ NVVIOCONFIG_ALPHAKEYCOMPOSITE | \ NVVIOCONFIG_COMPOSITE_Y | \ NVVIOCONFIG_COMPOSITE_CR | \ NVVIOCONFIG_COMPOSITE_CB | \ NVVIOCONFIG_FULL_COLOR_RANGE | \ NVVIOCONFIG_RGB_DATA | \ NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE | \ NVVIOCONFIG_STREAMS | \ NVVIOCONFIG_ANC_PARITY_COMPUTATION | \ NVVIOCONFIG_ANC_AUDIO_REPEAT ) #define NVVIOCONFIG_VALIDFIELDS ( NVVIOCONFIG_SIGNALFORMAT | \ NVVIOCONFIG_DATAFORMAT | \ NVVIOCONFIG_OUTPUTREGION | \ NVVIOCONFIG_OUTPUTAREA | \ NVVIOCONFIG_COLORCONVERSION | \ NVVIOCONFIG_GAMMACORRECTION | \ NVVIOCONFIG_SYNCSOURCEENABLE | \ NVVIOCONFIG_SYNCDELAY | \ NVVIOCONFIG_COMPOSITESYNCTYPE | \ NVVIOCONFIG_FRAMELOCKENABLE | \ NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE | \ NVVIOCONFIG_422FILTER | \ NVVIOCONFIG_COMPOSITETERMINATE | \ NVVIOCONFIG_DATAINTEGRITYCHECK | \ NVVIOCONFIG_CSCOVERRIDE | \ NVVIOCONFIG_FLIPQUEUELENGTH | \ NVVIOCONFIG_ANCTIMECODEGENERATION | \ NVVIOCONFIG_COMPOSITE | \ NVVIOCONFIG_ALPHAKEYCOMPOSITE | \ NVVIOCONFIG_COMPOSITE_Y | \ NVVIOCONFIG_COMPOSITE_CR | \ NVVIOCONFIG_COMPOSITE_CB | \ NVVIOCONFIG_FULL_COLOR_RANGE | \ NVVIOCONFIG_RGB_DATA | \ NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE | \ NVVIOCONFIG_STREAMS | \ NVVIOCONFIG_ANC_PARITY_COMPUTATION | \ NVVIOCONFIG_ANC_AUDIO_REPEAT) #define NVVIOCONFIG_DRIVERFIELDS ( NVVIOCONFIG_OUTPUTREGION | \ NVVIOCONFIG_OUTPUTAREA | \ NVVIOCONFIG_COLORCONVERSION | \ NVVIOCONFIG_FLIPQUEUELENGTH) #define NVVIOCONFIG_GAMMAFIELDS ( NVVIOCONFIG_GAMMACORRECTION ) #define NVVIOCONFIG_RMCTRLFIELDS ( NVVIOCONFIG_SIGNALFORMAT | \ NVVIOCONFIG_DATAFORMAT | \ NVVIOCONFIG_SYNCSOURCEENABLE | \ NVVIOCONFIG_COMPOSITESYNCTYPE | \ NVVIOCONFIG_FRAMELOCKENABLE | \ NVVIOCONFIG_422FILTER | \ NVVIOCONFIG_COMPOSITETERMINATE | \ NVVIOCONFIG_DATAINTEGRITYCHECK | \ NVVIOCONFIG_COMPOSITE | \ NVVIOCONFIG_ALPHAKEYCOMPOSITE | \ NVVIOCONFIG_COMPOSITE_Y | \ NVVIOCONFIG_COMPOSITE_CR | \ NVVIOCONFIG_COMPOSITE_CB) #define NVVIOCONFIG_RMSKEWFIELDS ( NVVIOCONFIG_SYNCDELAY ) #define NVVIOCONFIG_ALLOWSDIRUNNING_FIELDS ( NVVIOCONFIG_DATAINTEGRITYCHECK | \ NVVIOCONFIG_SYNCDELAY | \ NVVIOCONFIG_CSCOVERRIDE | \ NVVIOCONFIG_ANCTIMECODEGENERATION | \ NVVIOCONFIG_COMPOSITE | \ NVVIOCONFIG_ALPHAKEYCOMPOSITE | \ NVVIOCONFIG_COMPOSITE_Y | \ NVVIOCONFIG_COMPOSITE_CR | \ NVVIOCONFIG_COMPOSITE_CB | \ NVVIOCONFIG_ANC_PARITY_COMPUTATION) #define NVVIOCONFIG_RMMODESET_FIELDS ( NVVIOCONFIG_SIGNALFORMAT | \ NVVIOCONFIG_DATAFORMAT | \ NVVIOCONFIG_SYNCSOURCEENABLE | \ NVVIOCONFIG_FRAMELOCKENABLE | \ NVVIOCONFIG_COMPOSITESYNCTYPE | \ NVVIOCONFIG_ANC_AUDIO_REPEAT) //! Output device configuration // No members can be deleted from below structure. Only add new members at the // end of the structure. typedef struct _NVVIOOUTPUTCONFIG_V1 { NVVIOSIGNALFORMAT signalFormat; //!< Signal format for video output NVVIODATAFORMAT dataFormat; //!< Data format for video output NVVIOOUTPUTREGION outputRegion; //!< Region for video output (Desktop mode) NVVIOOUTPUTAREA outputArea; //!< Usable resolution for video output (safe area) NVVIOCOLORCONVERSION colorConversion; //!< Color conversion. NVVIOGAMMACORRECTION gammaCorrection; NvU32 syncEnable; //!< Sync enable (TRUE to use syncSource) NVVIOSYNCSOURCE syncSource; //!< Sync source NVVIOSYNCDELAY syncDelay; //!< Sync delay NVVIOCOMPSYNCTYPE compositeSyncType; //!< Composite sync type NvU32 frameLockEnable; //!< Flag indicating whether framelock was on/off NvU32 psfSignalFormat; //!< Indicates whether contained format is PSF Signal format NvU32 enable422Filter; //!< Enables/Disables 4:2:2 filter NvU32 compositeTerminate; //!< Composite termination NvU32 enableDataIntegrityCheck; //!< Enable data integrity check: true - enable, false - disable NvU32 cscOverride; //!< Use provided CSC color matrix to overwrite NvU32 flipQueueLength; //!< Number of buffers used for the internal flipqueue NvU32 enableANCTimeCodeGeneration; //!< Enable SDI ANC time code generation NvU32 enableComposite; //!< Enable composite NvU32 enableAlphaKeyComposite; //!< Enable Alpha key composite NVVIOCOMPOSITERANGE compRange; //!< Composite ranges NvU8 reservedData[256]; //!< Inicates last stored SDI output state TRUE-ON / FALSE-OFF NvU32 enableFullColorRange; //!< Flag indicating Full Color Range NvU32 enableRGBData; //!< Indicates data is in RGB format } NVVIOOUTPUTCONFIG_V1; typedef struct _NVVIOOUTPUTCONFIG_V2 { NVVIOSIGNALFORMAT signalFormat; //!< Signal format for video output NVVIODATAFORMAT dataFormat; //!< Data format for video output NVVIOOUTPUTREGION outputRegion; //!< Region for video output (Desktop mode) NVVIOOUTPUTAREA outputArea; //!< Usable resolution for video output (safe area) NVVIOCOLORCONVERSION colorConversion; //!< Color conversion. NVVIOGAMMACORRECTION gammaCorrection; NvU32 syncEnable; //!< Sync enable (TRUE to use syncSource) NVVIOSYNCSOURCE syncSource; //!< Sync source NVVIOSYNCDELAY syncDelay; //!< Sync delay NVVIOCOMPSYNCTYPE compositeSyncType; //!< Composite sync type NvU32 frameLockEnable; //!< Flag indicating whether framelock was on/off NvU32 psfSignalFormat; //!< Indicates whether contained format is PSF Signal format NvU32 enable422Filter; //!< Enables/Disables 4:2:2 filter NvU32 compositeTerminate; //!< Composite termination NvU32 enableDataIntegrityCheck; //!< Enable data integrity check: true - enable, false - disable NvU32 cscOverride; //!< Use provided CSC color matrix to overwrite NvU32 flipQueueLength; //!< Number of buffers used for the internal flip queue NvU32 enableANCTimeCodeGeneration; //!< Enable SDI ANC time code generation NvU32 enableComposite; //!< Enable composite NvU32 enableAlphaKeyComposite; //!< Enable Alpha key composite NVVIOCOMPOSITERANGE compRange; //!< Composite ranges NvU8 reservedData[256]; //!< Indicates last stored SDI output state TRUE-ON / FALSE-OFF NvU32 enableFullColorRange; //!< Flag indicating Full Color Range NvU32 enableRGBData; //!< Indicates data is in RGB format NVVIOANCPARITYCOMPUTATION ancParityComputation; //!< Enable HW ANC parity bit computation (auto/on/off) } NVVIOOUTPUTCONFIG_V2; typedef struct _NVVIOOUTPUTCONFIG_V3 { NVVIOSIGNALFORMAT signalFormat; //!< Signal format for video output NVVIODATAFORMAT dataFormat; //!< Data format for video output NVVIOOUTPUTREGION outputRegion; //!< Region for video output (Desktop mode) NVVIOOUTPUTAREA outputArea; //!< Usable resolution for video output (safe area) NVVIOCOLORCONVERSION colorConversion; //!< Color conversion. NVVIOGAMMACORRECTION gammaCorrection; NvU32 syncEnable; //!< Sync enable (TRUE to use syncSource) NVVIOSYNCSOURCE syncSource; //!< Sync source NVVIOSYNCDELAY syncDelay; //!< Sync delay NVVIOCOMPSYNCTYPE compositeSyncType; //!< Composite sync type NvU32 frameLockEnable; //!< Flag indicating whether framelock was on/off NvU32 psfSignalFormat; //!< Indicates whether contained format is PSF Signal format NvU32 enable422Filter; //!< Enables/Disables 4:2:2 filter NvU32 compositeTerminate; //!< Composite termination NvU32 enableDataIntegrityCheck; //!< Enable data integrity check: true - enable, false - disable NvU32 cscOverride; //!< Use provided CSC color matrix to overwrite NvU32 flipQueueLength; //!< Number of buffers used for the internal flip queue NvU32 enableANCTimeCodeGeneration; //!< Enable SDI ANC time code generation NvU32 enableComposite; //!< Enable composite NvU32 enableAlphaKeyComposite; //!< Enable Alpha key composite NVVIOCOMPOSITERANGE compRange; //!< Composite ranges NvU8 reservedData[256]; //!< Indicates last stored SDI output state TRUE-ON / FALSE-OFF NvU32 enableFullColorRange; //!< Flag indicating Full Color Range NvU32 enableRGBData; //!< Indicates data is in RGB format NVVIOANCPARITYCOMPUTATION ancParityComputation; //!< Enable HW ANC parity bit computation (auto/on/off) NvU32 enableAudioBlanking; //!< Enable HANC audio blanking on repeat frames } NVVIOOUTPUTCONFIG_V3; //! Stream configuration typedef struct _NVVIOSTREAM { NvU32 bitsPerComponent; //!< Bits per component NVVIOCOMPONENTSAMPLING sampling; //!< Sampling NvU32 expansionEnable; //!< Enable/disable 4:2:2->4:4:4 expansion NvU32 numLinks; //!< Number of active links struct { NvU32 jack; //!< This stream's link[i] will use the specified (0-based) channel within the NvU32 channel; //!< specified (0-based) jack } links[NVAPI_MAX_VIO_LINKS_PER_STREAM]; } NVVIOSTREAM; //! Input device configuration typedef struct _NVVIOINPUTCONFIG { NvU32 numRawCaptureImages; //!< numRawCaptureImages is the number of frames to keep in the capture queue. //!< must be between NVAPI_GVI_MIN_RAW_CAPTURE_IMAGES and NVAPI_GVI_MAX_RAW_CAPTURE_IMAGES, NVVIOSIGNALFORMAT signalFormat; //!< Signal format. //!< Please note that both numRawCaptureImages and signalFormat should be set together. NvU32 numStreams; //!< Number of active streams. NVVIOSTREAM streams[NVAPI_MAX_VIO_STREAMS]; //!< Stream configurations NvU32 bTestMode; //!< This attribute controls the GVI test mode. //!< Possible values 0/1. When testmode enabled, the //!< GVI device will generate fake data as quickly as possible. } NVVIOINPUTCONFIG; typedef struct _NVVIOCONFIG_V1 { NvU32 version; //!< Structure version NvU32 fields; //!< Caller sets to NVVIOCONFIG_* mask for fields to use NVVIOCONFIGTYPE nvvioConfigType; //!< Input or Output configuration union { NVVIOINPUTCONFIG inConfig; //!< Input device configuration NVVIOOUTPUTCONFIG_V1 outConfig; //!< Output device configuration }vioConfig; } NVVIOCONFIG_V1; typedef struct _NVVIOCONFIG_V2 { NvU32 version; //!< Structure version NvU32 fields; //!< Caller sets to NVVIOCONFIG_* mask for fields to use NVVIOCONFIGTYPE nvvioConfigType; //!< Input or Output configuration union { NVVIOINPUTCONFIG inConfig; //!< Input device configuration NVVIOOUTPUTCONFIG_V2 outConfig; //!< Output device configuration }vioConfig; } NVVIOCONFIG_V2; typedef struct _NVVIOCONFIG_V3 { NvU32 version; //!< Structure version NvU32 fields; //!< Caller sets to NVVIOCONFIG_* mask for fields to use NVVIOCONFIGTYPE nvvioConfigType; //!< Input or Output configuration union { NVVIOINPUTCONFIG inConfig; //!< Input device configuration NVVIOOUTPUTCONFIG_V3 outConfig; //!< Output device configuration }vioConfig; } NVVIOCONFIG_V3; typedef NVVIOOUTPUTCONFIG_V3 NVVIOOUTPUTCONFIG; typedef NVVIOCONFIG_V3 NVVIOCONFIG; #define NVVIOCONFIG_VER1 MAKE_NVAPI_VERSION(NVVIOCONFIG_V1,1) #define NVVIOCONFIG_VER2 MAKE_NVAPI_VERSION(NVVIOCONFIG_V2,2) #define NVVIOCONFIG_VER3 MAKE_NVAPI_VERSION(NVVIOCONFIG_V3,3) #define NVVIOCONFIG_VER NVVIOCONFIG_VER3 typedef struct { NvPhysicalGpuHandle hPhysicalGpu; //!< Handle to Physical GPU (This could be NULL for GVI device if its not binded) NvVioHandle hVioHandle; //!Create Stereo Handle->InitActivation->Reset Device //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 302 //! //! \param [in] stereoHandle Stereo handle corresponding to the device interface. //! \param [in] bDelayed Use delayed activation //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized. //! //! \ingroup stereoapi /////////////////////////////////////////////////////////////////////////////// //! \addtogroup stereoapi //! @{ //! InitActivation Flags typedef enum _NVAPI_STEREO_INIT_ACTIVATION_FLAGS { NVAPI_STEREO_INIT_ACTIVATION_IMMEDIATE = 0X00, NVAPI_STEREO_INIT_ACTIVATION_DELAYED = 0x01, } NVAPI_STEREO_INIT_ACTIVATION_FLAGS; NVAPI_INTERFACE NvAPI_Stereo_InitActivation(__in StereoHandle hStereoHandle, __in NVAPI_STEREO_INIT_ACTIVATION_FLAGS flags); //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_Trigger_Activation // //! DESCRIPTION: This API allows an application to trigger creation of a stereo desktop, //! in case the creation was stopped on application launch. //! //! SUPPORTED OS: Windows 7 and higher //! //! \since Release: 302 //! //! \param [in] stereoHandle Stereo handle that corresponds to the device interface. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! \retval ::NVAPI_STEREO_INIT_ACTIVATION_NOT_DONE - Stereo InitActivation not called. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized. //! //! \ingroup stereoapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_Trigger_Activation(__in StereoHandle hStereoHandle); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_CapturePngImage // //! DESCRIPTION: This API captures the current stereo image in PNG stereo format. //! Only the last capture call per flip will be effective. //! //! 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 Image captured. //! \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_CapturePngImage(StereoHandle stereoHandle); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_ReverseStereoBlitControl // //! DESCRIPTION: This API turns on/off reverse stereo blit. //! //! HOW TO USE: Use after the stereo handle for the device interface is created via successfull call to the appropriate //! NvAPI_Stereo_CreateHandleFrom() function. //! After reversed stereo blit control is turned on, blits from the stereo surface will //! produce the right-eye image in the left side of the destination surface and the left-eye //! image in the right side of the destination surface. //! //! In DirectX 9, the destination surface must be created as the render target, and StretchRect must be used. //! Conditions: //! - DstWidth == 2*SrcWidth //! - DstHeight == SrcHeight //! - Src surface is the stereo surface. //! - SrcRect must be {0,0,SrcWidth,SrcHeight} //! - DstRect must be {0,0,DstWidth,DstHeight} //! //! In DirectX 10, ResourceCopyRegion must be used. //! Conditions: //! - DstWidth == 2*SrcWidth //! - DstHeight == SrcHeight //! - dstX == 0, //! - dstY == 0, //! - dstZ == 0, //! - SrcBox: left=top=front==0; right==SrcWidth; bottom==SrcHeight; back==1; //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] stereoHandle Stereo handle corresponding to the device interface. //! \param [in] TurnOn != 0 : Turns on \n //! == 0 : Turns off //! //! //! \retval ::NVAPI_OK Retrieval of frustum adjust mode 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_ReverseStereoBlitControl(StereoHandle hStereoHandle, NvU8 TurnOn); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_SetNotificationMessage // //! DESCRIPTION: This API is a Setup notification message that the stereo driver uses to notify the application //! when the user changes the stereo driver state. //! //! When the user changes the stereo state (Activated or Deactivated, separation or conversion) //! the stereo driver posts a defined message with the following parameters: //! //! lParam is the current conversion. (Actual conversion is *(float*)&lParam ) //! //! wParam == MAKEWPARAM(l, h) where //! - l == 0 if stereo is deactivated //! - l == 1 if stereo is deactivated //! - h is the current separation. (Actual separation is float(h*100.f/0xFFFF) //! //! Call this API with NULL hWnd to prohibit notification. //! //! WHEN TO USE: Use after the stereo handle for device interface is created via successful call to appropriate //! NvAPI_Stereo_CreateHandleFrom() function. //! //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 180 //! //! //! \param [in] stereoHandle Stereo handle corresponding to the device interface. //! \param [in] hWnd Window HWND that will be notified when the user changes the stereo driver state. //! Actual HWND must be cast to an NvU64. //! \param [in] messageID MessageID of the message that will be posted to hWnd //! //! \retval ::NVAPI_OK Notification set. //! \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_SetNotificationMessage(StereoHandle hStereoHandle, NvU64 hWnd,NvU64 messageID); /////////////////////////////////////////////////////////////////////////////// // // 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 /. //! //! 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_AppHandShake // //! \fn NvAPI_Stereo_AppHandShake(StereoHandle hStereoHandle, NVAPI_STEREO_HANDSHAKE_PARAMS* pStereoHandshakeParams) //! DESCRIPTION: This API allows an approved application to enable stereo viewing through //! a handshake with the driver instead of via a hardcoded application exe name. //! //! HOW TO USE: Call this function immediately after device creation, then follow with a reset. \n //! Very generically: //! Create Device->Create Stereo Handle->Do Handshake->Reset Device //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] stereoHandle Stereo handle corresponding to the device interface. //! \param [in] pStereoHandshakeParams pointer to struct NVAPI_STEREO_HANDSHAKE_PARAMS //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized. //! \retval ::NVAPI_INVALID_ARGUMENT - the vendor ID and/or response is invalid //! \retval ::NVAPI_STEREO_HANDSHAKE_NOT_DONE - Stereo handshake failed //! \retval ::NVAPI_ERROR - Something is wrong (generic error). // /////////////////////////////////////////////////////////////////////////////// //! \addtogroup stereoapi //! @{ //! Stereo Handshake Commands typedef enum _NVAPI_STEREO_HANDSHAKE_COMMANDS { NVAPI_STEREO_HANDSHAKE_CMD_CHALLENGE = 0x01, NVAPI_STEREO_HANDSHAKE_CMD_RESPONSE = 0x02, } NVAPI_STEREO_HANDSHAKE_COMMANDS; //! Stereo Handshake Constants #define NVAPI_STEREO_HANDSHAKE_CHALLENGE_SIZE 16 #define NVAPI_STEREO_HANDSHAKE_RESPONSE_SIZE 20 // //! Parameter data structure for the NVAPI_STEREO_HANDSHAKE_CMD_CHALLENGE command: //! This command requests a random challenge from driver. //! It must be invoked before the NVAPI_STEREO_HANDSHAKE_CMD_RESPONSE command. typedef struct _NVAPI_STEREO_HANDSHAKE_CHALLENGE_PARAMS { NvU8 challenge[NVAPI_STEREO_HANDSHAKE_CHALLENGE_SIZE]; //!< random challenge from driver (OUT) } NVAPI_STEREO_HANDSHAKE_CHALLENGE_PARAMS; // //! Parameter data structure for the NVAPI_STEREO_HANDSHAKE_CMD_RESPONSE command //! //! The application must possess the following information in order to calculate a valid response: //! - vendorGUID: a unique ID assigned to the application vendor by NVIDIA; //! - vendorKEY: a secret key issued to the application vendor by NVIDIA; //! //! The response is calculated as HMAC(vendorKEY, (vendorGUID || challenge)) //! where HMAC is the Keyed-Hash Message Authentication Code using SHA-1 as the //! underlying hash function. See FIPS Publication 198 for details of the algorithm. typedef struct _NVAPI_STEREO_HANDSHAKE_RESPONSE_PARAMS { NvGUID vendorGUID; //!< vendor GUID from app (IN) NvU8 response[NVAPI_STEREO_HANDSHAKE_RESPONSE_SIZE]; //!< response from app (IN) NvU32 flags; //!< Flags set by application (IN/OPTIONAL) } NVAPI_STEREO_HANDSHAKE_RESPONSE_PARAMS; typedef struct _NVAPI_STEREO_HANDSHAKE_PARAMS { NvU32 version; //!< structure version (IN) NvU32 dwCommand; //!< command (IN) union { NVAPI_STEREO_HANDSHAKE_CHALLENGE_PARAMS ChallengeParams; NVAPI_STEREO_HANDSHAKE_RESPONSE_PARAMS ResponseParams; }; } NVAPI_STEREO_HANDSHAKE_PARAMS_V1; typedef NVAPI_STEREO_HANDSHAKE_PARAMS_V1 NVAPI_STEREO_HANDSHAKE_PARAMS; #define NVAPI_STEREO_HANDSHAKE_PARAMS_VER1 MAKE_NVAPI_VERSION(NVAPI_STEREO_HANDSHAKE_PARAMS_V1, 1) #define NVAPI_STEREO_HANDSHAKE_PARAMS_VER NVAPI_STEREO_HANDSHAKE_PARAMS_VER1 NVAPI_INTERFACE NvAPI_Stereo_AppHandShake(StereoHandle hStereoHandle, NVAPI_STEREO_HANDSHAKE_PARAMS* pStereoHandshakeParams); //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_HandShake_Trigger_Activation // //! DESCRIPTION: This API allows an approved application (approved through handshake) to //! trigger creation of a stereo desktop, in case the creation was stopped on application //! launch. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] stereoHandle Stereo handle that corresponds to the device interface. //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_STEREO_HANDSHAKE_NOT_DONE - Stereo handshake not done prior to call //! \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_HandShake_Trigger_Activation(StereoHandle hStereoHandle); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_HandShake_Message_Control // //! DESCRIPTION: This API allows an approved application (approved through handshake) to //! turn on/off the stereo message displayed onscreen. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] stereoHandle Stereo handle that corresponds to the device interface. //! \param [in] TurnOn != 0 - turns on, //! == 0 - turns off //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_STEREO_HANDSHAKE_NOT_DONE - Stereo handshake not done prior to call //! \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_HandShake_Message_Control(StereoHandle hStereoHandle, NvU8 TurnOn); /////////////////////////////////////////////////////////////////////////////// // // 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_ForceToScreenDepth // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] bForceToScreenDepth New mode for rendering depth of objects //! #true all objects after this call will be rendered at screen depth; //! #false all objects after this call will be rendered at their intended depth; //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API forces objects to be rendered at screen depth (or at their intended depth). //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull 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_ForceToScreenDepth(__in StereoHandle hStereoHandle, __in NvU8 bForceToScreenDepth); #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_SetVertexShaderConstantF // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] Vector4fCount Number of four float vectors in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API specifies 3 sets of floating constants to be used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_SetVertexShaderConstantF(__in StereoHandle hStereoHandle, __in UINT StartRegister, __in float *pConstantDataMono, __in float *pConstantDataLeft, __in float *pConstantDataRight, __in UINT Vector4fCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_SetVertexShaderConstantB // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] BoolCount Number of boolean values in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API specifies 3 sets of boolean constants to be used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_SetVertexShaderConstantB(__in StereoHandle hStereoHandle, __in UINT StartRegister, __in BOOL *pConstantDataMono, __in BOOL *pConstantDataLeft, __in BOOL *pConstantDataRight, __in UINT BoolCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_SetVertexShaderConstantI // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] Vector4iCount Number of four integer vectors in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API specifies 3 sets of integer constants to be used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_SetVertexShaderConstantI(__in StereoHandle hStereoHandle, __in UINT StartRegister, __in int *pConstantDataMono, __in int *pConstantDataLeft, __in int *pConstantDataRight, __in UINT Vector4iCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_GetVertexShaderConstantF // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in,out] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in,out] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in,out] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] Vector4fCount Number of four float vectors in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API returns 3 sets of floating constants that are used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_GetVertexShaderConstantF(__in StereoHandle hStereoHandle, __in UINT StartRegister, __inout float *pConstantDataMono, __inout float *pConstantDataLeft, __inout float *pConstantDataRight, __in UINT Vector4fCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_GetVertexShaderConstantB // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in,out] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in,out] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in,out] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] BoolCount Number of boolean values in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API returns 3 sets of boolean constants that are used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_GetVertexShaderConstantB(__in StereoHandle hStereoHandle, __in UINT StartRegister, __inout BOOL *pConstantDataMono, __inout BOOL *pConstantDataLeft, __inout BOOL *pConstantDataRight, __in UINT BoolCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_GetVertexShaderConstantI // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in,out] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in,out] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in,out] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] Vector4iCount Number of four integer vectors in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API returns 3 sets of integer constants that are used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_GetVertexShaderConstantI(__in StereoHandle hStereoHandle, __in UINT StartRegister, __inout int *pConstantDataMono, __inout int *pConstantDataLeft, __inout int *pConstantDataRight, __in UINT Vector4iCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_SetPixelShaderConstantF // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] Vector4fCount Number of four float vectors in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API specifies 3 sets of floating constants to be used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_SetPixelShaderConstantF(__in StereoHandle hStereoHandle, __in UINT StartRegister, __in float *pConstantDataMono, __in float *pConstantDataLeft, __in float *pConstantDataRight, __in UINT Vector4fCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_SetPixelShaderConstantB // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] BoolCount Number of boolean values in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API specifies 3 sets of boolean constants to be used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_SetPixelShaderConstantB(__in StereoHandle hStereoHandle, __in UINT StartRegister, __in BOOL *pConstantDataMono, __in BOOL *pConstantDataLeft, __in BOOL *pConstantDataRight, __in UINT BoolCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_SetPixelShaderConstantI // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] Vector4iCount Number of four integer vectors in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API specifies 3 sets of integer constants to be used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_SetPixelShaderConstantI(__in StereoHandle hStereoHandle, __in UINT StartRegister, __in int *pConstantDataMono, __in int *pConstantDataLeft, __in int *pConstantDataRight, __in UINT Vector4iCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_GetPixelShaderConstantF // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in,out] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in,out] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in,out] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] Vector4fCount Number of four float vectors in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API returns 3 sets of floating constants that are used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_GetPixelShaderConstantF(__in StereoHandle hStereoHandle, __in UINT StartRegister, __inout float *pConstantDataMono, __inout float *pConstantDataLeft, __inout float *pConstantDataRight, __in UINT Vector4fCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_GetPixelShaderConstantB // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in,out] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in,out] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in,out] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] BoolCount Number of boolean values in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API returns 3 sets of boolean constants that are used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_GetPixelShaderConstantB(__in StereoHandle hStereoHandle, __in UINT StartRegister, __inout BOOL *pConstantDataMono, __inout BOOL *pConstantDataLeft, __inout BOOL *pConstantDataRight, __in UINT BoolCount); #endif //defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_GetPixelShaderConstantI // //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in] StartRegister Register number that will contain the first constant value. //! \param [in,out] pConstantDataMono Pointer to an array of constants for mono view. //! \param [in,out] pConstantDataLeft Pointer to an array of constants for left eye view. //! \param [in,out] pConstantDataRight Pointer to an array of constants for right eye view. //! \param [in] Vector4iCount Number of four integer vectors in the array of constants. //! \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 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API returns 3 sets of integer constants that are used in mono/left/right rendering paths. //! //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function. //! /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_Stereo_GetPixelShaderConstantI(__in StereoHandle hStereoHandle, __in UINT StartRegister, __inout int *pConstantDataMono, __inout int *pConstantDataLeft, __inout int *pConstantDataRight, __in UINT Vector4iCount); #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // 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); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_Is3DCursorSupported // //! DESCRIPTION: This API checks if stereo cursor is supported on a given stereo device //! //! 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: 302 //! //! \param [in] stereoHandle Stereo handle that corresponds to the device interface. //! \param [out] bSupported(OUT) != 0 - supported, \n //! == 0 - is not supported //! //! \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_Is3DCursorSupported(__in StereoHandle stereoHandle, __out NvU8* bSupported); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_GetCursorSeparation // //! DESCRIPTION: This API gets current cursor 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: 302 //! //! \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_GetCursorSeparation(__in StereoHandle stereoHandle, __out float *pSeparationPercentage); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_Stereo_SetCursorSeparation // //! DESCRIPTION: This API sets cursor 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: 302 //! //! \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_SetCursorSeparation(__in StereoHandle stereoHandle, __in float newSeparationPercentage); //! \ingroup stereoapi #define NVAPI_STEREO_QUADBUFFERED_API_VERSION 0x2 //! \ingroup stereoapi typedef enum _NV_StereoSwapChainMode { NVAPI_STEREO_SWAPCHAIN_DEFAULT = 0, NVAPI_STEREO_SWAPCHAIN_STEREO = 1, NVAPI_STEREO_SWAPCHAIN_MONO = 2, } NV_STEREO_SWAPCHAIN_MODE; #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D1x_CreateSwapChain // //! DESCRIPTION: This API allows the user to create a mono or a stereo swap chain. //! //! NOTE: NvAPI_D3D1x_CreateSwapChain is a wrapper of the method IDXGIFactory::CreateSwapChain which //! additionally notifies the D3D driver of the mode in which stereo mode the swap chain is to be //! created. //! //! \since Release: 285 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! A pointer to the device that will write 2D images to the swap chain. //! \param [in] pDesc A pointer to the swap-chain description (DXGI_SWAP_CHAIN_DESC). This parameter cannot be NULL. //! \param [out] ppSwapChain A pointer to the swap chain created. //! \param [in] mode The stereo mode fot the swap chain. //! NVAPI_STEREO_SWAPCHAIN_DEFAULT //! NVAPI_STEREO_SWAPCHAIN_STEREO //! NVAPI_STEREO_SWAPCHAIN_MONO //! //! \retval ::NVAPI_OK The swap chain was created successfully. //! \retval ::NVAPI_ERROR The operation failed. //! //! \ingroup stereoapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D1x_CreateSwapChain(StereoHandle hStereoHandle, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain, NV_STEREO_SWAPCHAIN_MODE mode); #endif //if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) #if defined(_D3D9_H_) //NvAPI_D3D9_CreateSwapChain /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_D3D9_CreateSwapChain // //! DESCRIPTION: This API allows the user to create a mono or a stereo swap chain. //! //! NOTE: NvAPI_D3D9_CreateSwapChain is a wrapper of the method IDirect3DDevice9::CreateAdditionalSwapChain which //! additionally notifies the D3D driver if the swap chain creation mode must be stereo or mono. //! //! //! \since Release: 285 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. //! \param [in, out] pPresentationParameters A pointer to the swap-chain description (DXGI). This parameter cannot be NULL. //! \param [out] ppSwapChain A pointer to the swap chain created. //! \param [in] mode The stereo mode for the swap chain. //! NVAPI_STEREO_SWAPCHAIN_DEFAULT //! NVAPI_STEREO_SWAPCHAIN_STEREO //! NVAPI_STEREO_SWAPCHAIN_MONO //! //! \retval ::NVAPI_OK The swap chain creation was successful //! \retval ::NVAPI_ERROR The operation failed. //! //!\ingroup stereoapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_D3D9_CreateSwapChain(StereoHandle hStereoHandle, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3DSwapChain9 **ppSwapChain, NV_STEREO_SWAPCHAIN_MODE mode); #endif //if defined(_D3D9_H_) //NvAPI_D3D9_CreateSwapChain /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GPU_SetVidPnInfo // //! DESCRIPTION: This API allows the caller to inform the driver of any display //! change events so that the VidPnSrcId's may be updated. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 173 //! //! \param [in] hPhysicalGpu GPU selection //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! //! \ingroup vidcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_SetVidPnInfo(NvPhysicalGpuHandle hPhysicalGpu); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_GetVideoState // //! \fn NvAPI_GetVideoState(NvDisplayHandle hNvDisplay, NVAPI_GET_VIDEO_STATE_COMPONENT *pGetVidStateComp) //! DESCRIPTION: This function return the video state component for the component ID passed in. It is the responsibility //! of the caller to fill secret application key that enables authentication of the caller. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay NVIDIA Display selection \n //! It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [out] pGetVidStateComp NVAPI_GET_VIDEO_STATE_COMPONENT packet containing //! a valid component ID and a valid application secret key. //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT // /////////////////////////////////////////////////////////////////////////////// #ifndef NV_VIDEO_COMPONENTS_DEFINE #define NV_VIDEO_COMPONENTS_DEFINE /////////////////////////////////////////////////////////////////////////////// // Structs and enums related to Video state /////////////////////////////////////////////////////////////////////////////// //! \ingroup vidcontrol //! Components related to video state \n //! Used in NVAPI_GET_VIDEO_STATE_COMPONENT and NVAPI_SET_VIDEO_STATE_COMPONENT. typedef enum _NVAPI_VIDEO_STATE_COMPONENT_ID { NVAPI_VIDEO_STATE_COMPONENT_ID_NONE = -1, //!< Placeholder for invalid component ID NVAPI_VIDEO_STATE_COMPONENT_BRIGHTNESS , //!< Permits control of video's brightness value NVAPI_VIDEO_STATE_COMPONENT_CONTRAST , //!< Allows control of video's contrast value NVAPI_VIDEO_STATE_COMPONENT_HUE , //!< To control the hue value NVAPI_VIDEO_STATE_COMPONENT_SATURATION , //!< Allows control of video's saturation value NVAPI_VIDEO_STATE_COMPONENT_COLORTEMP , //!< Allows control of the color temperature value NVAPI_VIDEO_STATE_COMPONENT_Y_GAMMA , //!< To set the Y-gamma values NVAPI_VIDEO_STATE_COMPONENT_RGB_GAMMA_R , //!< To set the R value of RGB gamma NVAPI_VIDEO_STATE_COMPONENT_RGB_GAMMA_G , //!< To set the G value of RGB gamma NVAPI_VIDEO_STATE_COMPONENT_RGB_GAMMA_B , //!< To set the B value of RGB gamma NVAPI_VIDEO_STATE_COMPONENT_COLOR_SPACE , //!< Permits choice of various color spaces using VIDEO_COMP_ALGO_COLOR_SPACE_xxx NVAPI_VIDEO_STATE_COMPONENT_COLOR_RANGE , //!< Allows setting between a limited/full color range using VIDEO_COMP_ALGO_COLOR_RANGE_xxx NVAPI_VIDEO_STATE_COMPONENT_PLAYBACK_PROFILE, //!< This feature is deprecated from the driver, so do not use this enum NVAPI_VIDEO_STATE_COMPONENT_DEINTERLACE , //!< To set various types of deinterlacing algorithms NVAPI_VIDEO_STATE_COMPONENT_SCALING , //!< Allows setting video scaling algorithms NVAPI_VIDEO_STATE_COMPONENT_CADENCE , //!< Allows control of the cadence algorithms NVAPI_VIDEO_STATE_COMPONENT_NOISE_REDUCE , //!< Allows setting post-processing noise reduction values NVAPI_VIDEO_STATE_COMPONENT_EDGE_ENHANCE , //!< Permits post-processing edge enhancement value adjustment NVAPI_VIDEO_STATE_COMPONENT_OVERDRIVE , //!< This feature is deprecated from the driver, so do not use this enum NVAPI_VIDEO_STATE_COMPONENT_SPLITSCREEN , //!< This feature is deprecated from the driver, so do not use this enum NVAPI_VIDEO_STATE_COMPONENT_DEBLOCKING , //!< This feature is deprecated from the driver, so do not use this enum NVAPI_VIDEO_STATE_COMPONENT_DYNAMIC_CONTRAST, //!< This feature is deprecated from the driver, so do not use this enum NVAPI_VIDEO_STATE_COMPONENT_GREEN_STRETCH , //!< This feature is deprecated from the driver, so do not use this enum NVAPI_VIDEO_STATE_COMPONENT_BLUE_STRETCH , //!< This feature is deprecated from the driver, so do not use this enum NVAPI_VIDEO_STATE_COMPONENT_SKIN_TONE_CORRECTION, //!< This feature is deprecated from the driver, so do not use this enum NVAPI_VIDEO_STATE_COMPONENT_GAMUT_REMAPPING , //!< Applies gamut remapping on video NVAPI_VIDEO_STATE_COMPONENT_2DTO3D , //!< Converts 2D video to 3D stereo video NVAPI_VIDEO_STATE_COMPONENT_3D_ANALYSIS , //!< Analyzing 3D stereo video NVAPI_VIDEO_STATE_COMPONENT_FRC , //!< Frame Rate Converter NVAPI_VIDEO_STATE_COMPONENT_BEN , //!< Applies deblocking on video NVAPI_VIDEO_STATE_COMPONENT_ID_LAST , //!< All valid components defined before this one } NVAPI_VIDEO_STATE_COMPONENT_ID; //! \ingroup vidcontrol //! Dynamic contrast value. Kept this for backward compatibility. #define NVAPI_VIDEO_STATE_COMPONENT_DYNAMIC_CONSTRAST NVAPI_VIDEO_STATE_COMPONENT_DYNAMIC_CONTRAST //! \ingroup vidcontrol //! Used in #_NVAPI_VIDEO_COMPONENT_ALGORITHM. #define VIDEO_COMP_ALGO_CUSTOM_BASE 64 //! \ingroup vidcontrol //! Algorithms controlling various video components //! Used in NVAPI_GET_VIDEO_STATE_COMPONENT and NVAPI_SET_VIDEO_STATE_COMPONENT. typedef enum _NVAPI_VIDEO_COMPONENT_ALGORITHM { VIDEO_COMP_ALGO_COLOR_SPACE_601 = 0, //!< Use the ITU-R BT.601 standard in color-space conversion for xxx_COLOR_SPACE component VIDEO_COMP_ALGO_COLOR_SPACE_709 = 1, //!< Use the ITU-R BT.709 standard in color-space conversion for xxx_COLOR_SPACE component VIDEO_COMP_ALGO_COLOR_SPACE_CUSTOM_04 = VIDEO_COMP_ALGO_CUSTOM_BASE+4, //!< Use custom color matrix. VIDEO_COMP_ALGO_COLOR_RANGE_STD = 0, //!< Full range of (0-255) for xxx_COLOR_RANGE component, equivalent to Microsoft's DXVADDI_NOMINALRANGE::DXVADDI_NominalRange_0_255 VIDEO_COMP_ALGO_COLOR_RANGE_EXT = 1, //!< Limited range of (16-235) for xxx_COLOR_RANGE component, equivalent to Microsoft's DXVADDI_NOMINALRANGE::DXVADDI_NominalRange_16_235 VIDEO_COMP_ALGO_PLAYBACK_PROFILE_NONE = 0, //!< deprecated VIDEO_COMP_ALGO_PLAYBACK_PROFILE_ADOBE_FLASH_9 = 1, //!< deprecated VIDEO_COMP_ALGO_DEINTERLACE_BOB = 0, //!< Perform Bob deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_WEAVE = 1, //!< Use weave deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_SIMPLE_ADAPTIVE = 2, //!< Perform a simple motion adaptive deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_GRADIENT_SIMPLE = 3, //!< Use a simple gradient deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_GRADIENT_FULL = 4, //!< Use advanced gradient deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_ADAPTIVE_FOUR_FIELD = 5, //!< Perform four field motion adaptive deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_DIR_SPATIAL = 6, //!< User directional spatial deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_ADVANCED = 7, //!< Perform proprietary advanced deinterlacing VIDEO_COMP_ALGO_DEINTERLACE_GPU_CAPABLE = 8, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_DEINTERLACE_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom Deinterlacing algorithm VIDEO_COMP_ALGO_DEINTERLACE_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom Deinterlacing algorithm VIDEO_COMP_ALGO_SCALING_ALG_SIMPLE = 0, //!< Do scaling using a simple algorithm VIDEO_COMP_ALGO_SCALING_ALG_4x4FILTER = 1, //!< Perform scaling using a 4x4 filter VIDEO_COMP_ALGO_SCALING_ALG_8x8FILTER = 2, //!< Perform scaling using a 8x8 filter VIDEO_COMP_ALGO_SCALING_ALG_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom scaling component VIDEO_COMP_ALGO_SCALING_ALG_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom scaling component VIDEO_COMP_ALGO_CADENCE_NONE = 0, //!< Turn cadence OFF VIDEO_COMP_ALGO_CADENCE_SIMPLE = 1, //!< Use simple cadence detection VIDEO_COMP_ALGO_CADENCE_VOF = 2, //!< Use video on film cadence detection VIDEO_COMP_ALGO_CADENCE_COMPUTE = 3, //!< Use compute cadence detection VIDEO_COMP_ALGO_CADENCE_GPU_CAPABLE = 4, //!< Best available but GPU dependent. (video driver decides dynamically) VIDEO_COMP_ALGO_NOISE_REDUCE_PUREVIDEO = 0, //!< Use PureVideo noise reduction VIDEO_COMP_ALGO_NOISE_REDUCE_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom noise reduction VIDEO_COMP_ALGO_NOISE_REDUCE_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom noise reduction VIDEO_COMP_ALGO_EDGE_ENHANCE_PUREVIDEO = 0, //!< Use PureVideo Sharpening Filter VIDEO_COMP_ALGO_EDGE_ENHANCE_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom Sharpening Filter VIDEO_COMP_ALGO_EDGE_ENHANCE_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom Sharpening Filter VIDEO_COMP_ALGO_GAMUT_REMAPPING_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom 3x3 gamut remapping matrix VIDEO_COMP_ALGO_GAMUT_REMAPPING_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom 3x3 gamut remapping matrix VIDEO_COMP_ALGO_OVERDRIVE_SIMPLE = 0, //!< deprecated VIDEO_COMP_ALGO_SPLITSCREEN_TYPE_NORMAL = 0, //!< deprecated VIDEO_COMP_ALGO_SPLITSCREEN_TYPE_REPEATED = 1, //!< deprecated VIDEO_COMP_ALGO_SPLITSCREEN_TYPE_ON_MIRROR = 2, //!< deprecated VIDEO_COMP_ALGO_DYNAMIC_CONTRAST_PRESET_NONE = 0, //!< deprecated VIDEO_COMP_ALGO_DYNAMIC_CONTRAST_PRESET_LOW = 1, //!< deprecated VIDEO_COMP_ALGO_DYNAMIC_CONTRAST_PRESET_MEDIUM = 2, //!< deprecated VIDEO_COMP_ALGO_DYNAMIC_CONTRAST_PRESET_HIGH = 3, //!< deprecated VIDEO_COMP_ALGO_GREEN_STRETCH_PRESET_NONE = 0, //!< deprecated VIDEO_COMP_ALGO_GREEN_STRETCH_PRESET_LOW = 1, //!< deprecated VIDEO_COMP_ALGO_GREEN_STRETCH_PRESET_MEDIUM = 2, //!< deprecated VIDEO_COMP_ALGO_GREEN_STRETCH_PRESET_HIGH = 3, //!< deprecated VIDEO_COMP_ALGO_BLUE_STRETCH_PRESET_NONE = 0, //!< deprecated VIDEO_COMP_ALGO_BLUE_STRETCH_PRESET_LOW = 1, //!< deprecated VIDEO_COMP_ALGO_BLUE_STRETCH_PRESET_MEDIUM = 2, //!< deprecated VIDEO_COMP_ALGO_BLUE_STRETCH_PRESET_HIGH = 3, //!< deprecated VIDEO_COMP_ALGO_SKIN_TONE_CORRECTION_PRESET_NONE = 0, //!< deprecated VIDEO_COMP_ALGO_SKIN_TONE_CORRECTION_PRESET_SQUEEZE = 1, //!< deprecated VIDEO_COMP_ALGO_SKIN_TONE_CORRECTION_PRESET_RED = 2, //!< deprecated VIDEO_COMP_ALGO_SKIN_TONE_CORRECTION_PRESET_YELLOW = 3, //!< deprecated VIDEO_COMP_ALGO_2DTO3D_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom 2Dto3D conversion VIDEO_COMP_ALGO_2DTO3D_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom 2Dto3D conversion VIDEO_COMP_ALGO_3D_ANALYSIS_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom 3DAnalysis algorithm VIDEO_COMP_ALGO_3D_ANALYSIS_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom 3DAnalysis algorithm VIDEO_COMP_ALGO_FRC_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom frame rate converter VIDEO_COMP_ALGO_FRC_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom frame rate converter VIDEO_COMP_ALGO_BEN_CUSTOM_00 = VIDEO_COMP_ALGO_CUSTOM_BASE+0, //!< Use custom deblocking algorithm VIDEO_COMP_ALGO_BEN_CUSTOM_01 = VIDEO_COMP_ALGO_CUSTOM_BASE+1, //!< Use custom deblocking algorithm } NVAPI_VIDEO_COMPONENT_ALGORITHM; //! \ingroup vidcontrol //! Bitmasks for video components' enable at various resolutions //! Used in NVAPI_GET_VIDEO_STATE_COMPONENT and NVAPI_SET_VIDEO_STATE_COMPONENT. typedef enum _NVAPI_VIDEO_COMPONENT_ENABLE { VIDEO_COMP_ENA_480i = 0x00000001, //!< component is enabled at 480i video resolution VIDEO_COMP_ENA_480p = 0x00000002, //!< component is enabled at 480p video resolution VIDEO_COMP_ENA_576i = 0x00000004, //!< component is enabled at 576i video resolution VIDEO_COMP_ENA_576p = 0x00000008, //!< component is enabled at 576p video resolution VIDEO_COMP_ENA_720p = 0x00000010, //!< component is enabled at 720p video resolution VIDEO_COMP_ENA_1080i = 0x00000020, //!< component is enabled at 1080i video resolution VIDEO_COMP_ENA_1080p = 0x00000040, //!< component is enabled at 1080p video resolution } NVAPI_VIDEO_COMPONENT_ENABLE; //! \ingroup vidcontrol //! Packet that facilitates retrieving information about a video component \n //! Used in NvAPI_GetVideoState(). typedef struct _NVAPI_GET_VIDEO_STATE_COMPONENT { NvU32 version; //!< (IN) NVAPI version that matches NVAPI_GET_VIDEO_STATE_COMPONENT_VER NvU32 componentID; //!< (IN) identify the individual component, one of NVAPI_VIDEO_STATE_COMPONENT_xxx enums NvU32 bIsSupported : 1; //!< (OUT) set if this component feature is supported NvU32 bIsOverridenByUser : 1; //!< (OUT) set if component is overriden by user's choice NvU32 reserved1 : 30; //!< (OUT) reserved for future expansion NvU32 isEnabled; //!< (OUT) set if component is enabled, one or more of NVAPI_VIDEO_COMPONENT_ENABLE bitmasks NvU32 minValue; //!< (OUT) min valid value NvU32 maxValue; //!< (OUT) max valid value NvU32 totalSteps; //!< (OUT) number of steps between min and max NvU32 defaultValue; //!< (OUT) pre-defined NVIDIA default NvU32 unityValue; //!< (OUT) unity is the disable value for a component NvU32 currentValueActive; //!< (OUT) value in use NvU64 defaultAlgo; //!< (OUT) default algo, one or more of #NVAPI_VIDEO_COMPONENT_ALGORITHM enums NvU64 currentAlgoActive; //!< (OUT) Algorithm in use, one or more of #NVAPI_VIDEO_COMPONENT_ALGORITHM enums union { NvU64 qwReserved[9]; struct { NvU32 dwAppKey; //!< (IN) Secret key to authenticate the caller, used ONLY in NvAPI_SetVideoState() NvU32 bTopPriority : 1; //!< (OUT)Indicates that these settings have precedence over D3D NvAPI settings; valid ONLY in NvAPI_GetVideoState() NvU32 bHasCustomAlgo : 1; //!< (OUT)Indicates whether Out-of-process application has custom algorithm data NvU32 bReserved : 30;//!< (OUT)Reserved for expansion struct { NvU64 pData; //!< (IN) Buffer to hold the retrieved custom algorithm data NvU32 dwSize; //!< (IN) Size in Bytes of the above buffer, must be <= NVAPI_VIDEO_STATE_MAX_CUSTOM_ALGO_SIZE. } customAlgo; } appInfo; }; } NVAPI_GET_VIDEO_STATE_COMPONENT; //! \ingroup vidcontrol //! Used in NVAPI_GET_VIDEO_STATE_COMPONENT. #define NVAPI_GET_VIDEO_STATE_COMPONENT_VER MAKE_NVAPI_VERSION(NVAPI_GET_VIDEO_STATE_COMPONENT,1) //! \ingroup vidcontrol //! Return status after attempting to set a video component //! Used in NVAPI_SET_VIDEO_STATE_COMPONENT. typedef enum _NVAPI_VIDEO_COMP_RETURN_STATUS { VIDEO_COMP_STATUS_SUCCESS = 0x00000000, //!< Video component is set successfully VIDEO_COMP_STATUS_UNSUCCESSFUL = 0x00000001, //!< Failed to set video component VIDEO_COMP_STATUS_COMPONENT_NOT_SUPPORTED = 0x00000002, //!< Video component is not supported VIDEO_COMP_STATUS_VALUE_OUT_OF_RANGE = 0x00000004, //!< Video component's value is invalid and does not fall into range VIDEO_COMP_STATUS_ALGO_NOT_RECOGNIZED = 0x00000008, //!< Video component's algorithm is invalid VIDEO_COMP_STATUS_OVERRIDDEN_BY_USER = 0x00000010, //!< Request not completed because of user-mandated override VIDEO_COMP_STATUS_Y_GAMMA_ENABLED = 0x00000020, //!< Cannot set RGB-gamma because Y-Gamma is already enabled VIDEO_COMP_STATUS_RGB_GAMMA_ENABLED = 0x00000040, //!< Cannot set Y-gamma because RGB-Gamma is already enabled } NVAPI_VIDEO_COMP_RETURN_STATUS; // Packet containing information to allow setting the video component #define NVAPI_VIDEO_STATE_MAX_CUSTOM_ALGO_SIZE 128 //! \ingroup vidcontrol //! Used in NvAPI_SetVideoState(). typedef struct _NVAPI_SET_VIDEO_STATE_COMPONENT { NvU32 version; //!< (IN) NVAPI version that matches NVAPI_SET_VIDEO_STATE_COMPONENT_VER NvU32 componentID; //!< (IN) identify the individual component, one of NVAPI_VIDEO_STATE_COMPONENT_xxx enums NvU32 enable; //!< (IN) flag to enable setting of component, one or more of NVAPI_VIDEO_COMPONENT_ENABLE bitmasks NvU32 setToValue; //!< (IN) value to use NvU64 setToAlgo; //!< (IN) algorithm to use NvU32 retStatus; //!< (OUT) result of video-component-set operation; a combination of VIDEO_COMP_STATUS_xxx bitmasks NvU32 reserved; union { NvU64 qwReserved[4]; struct { NvU32 dwAppKey; //!< (IN) Secret key to authenticate the caller, ONLY used in NvAPI_SetVideoState NvU32 bTopPriority : 1; //!< (IN) Force these settings to have priority over D3D NvAPI settings, ONLY valid in NvAPI_GetVideoState NvU32 bHasCustomAlgo : 1; //!< (IN) Out-of-process application has custom algorithm data NvU32 bReserved : 30;//!< (IN) reserved for expansion struct { NvU64 pData; //!< (IN) (Used only when bHasCustomAlgo == 1) Pointer to the custom algorithm data. NvU32 dwSize; //!< (IN) (Used only when bHasCustomAlgo == 1) Size in Bytes of the custom algorithm data, must be <= NVAPI_VIDEO_STATE_MAX_CUSTOM_ALGO_SIZE. } customAlgo; } appInfo; }; } NVAPI_SET_VIDEO_STATE_COMPONENT; //! \ingroup vidcontrol //! Used in NVAPI_SET_VIDEO_STATE_COMPONENT. #define NVAPI_SET_VIDEO_STATE_COMPONENT_VER MAKE_NVAPI_VERSION(NVAPI_SET_VIDEO_STATE_COMPONENT,1) #endif // ifndef NV_VIDEO_COMPONENTS_DEFINE //! //! \ingroup vidcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GetVideoState(NvDisplayHandle hNvDisplay, NVAPI_GET_VIDEO_STATE_COMPONENT *pGetVidStateComp); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SetVideoState // //! DESCRIPTION: This API that allows callers to set a particular video state component. It is the responsibility //! of the caller to fill the secret application key that enables authentication of the caller. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 170 //! //! \param [in] hNvDisplay(IN) NVIDIA Display selection \n //! It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] pSetVidStateComp NVAPI_SET_VIDEO_STATE_COMPONENT packet containing //! a valid component ID and a valid application secret key. //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! //! \ingroup vidcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SetVideoState(NvDisplayHandle hNvDisplay, NVAPI_SET_VIDEO_STATE_COMPONENT *pSetVidStateComp); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SetFrameRateNotify // //! \fn NvAPI_SetFrameRateNotify(NvDisplayHandle hNvDisplay, NVAPI_FRAME_RATE_NOTIFY_INFO* pFRNotifyInfo) //! DESCRIPTION: This API signals the driver to turn on/off notification to //! the service application of the video frame rate. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 175 //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated //! from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] pFRNotifyInfo Pointer to the supplied NVAPI_FRAME_RATE_NOTIFY_INFO struct. //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! //! \ingroup vidcontrol // /////////////////////////////////////////////////////////////////////////////// //! \ingroup vidcontrol //! Structure containing the video frame rate notification instructions - used in NvAPI_SetFrameRateNotify() typedef struct _NVAPI_FRAME_RATE_NOTIFY_INFO { NvU32 version; //!< (IN) Version of this struct constructed from the macro #NVAPI_FRAME_RATE_NOTIFY_INFO_VER NvU64 hWnd; //!< (IN) The window handle of the service application handling the RR adjust NvU32 bEnable : 1; //!< (IN) To turn feature ON/OFF NvU32 bReserved : 31; //!< (IN/OUT) Reserved for later use } NVAPI_FRAME_RATE_NOTIFY_INFO; //! \ingroup vidcontrol //! Macro for constructing the version field of NVAPI_FRAME_RATE_NOTIFY_INFO #define NVAPI_FRAME_RATE_NOTIFY_INFO_VER MAKE_NVAPI_VERSION(NVAPI_FRAME_RATE_NOTIFY_INFO,1) //! \ingroup vidcontrol NVAPI_INTERFACE NvAPI_SetFrameRateNotify(NvDisplayHandle hNvDisplay, NVAPI_FRAME_RATE_NOTIFY_INFO* pFRNotifyInfo); #ifndef NV_STEREO_VIDEO_FORMAT_DEFINE #define NV_STEREO_VIDEO_FORMAT_DEFINE //! \ingroup vidcontrol typedef enum _NV_STEREO_VIDEO_FORMAT { NV_STEREO_VIDEO_FORMAT_NOT_STEREO = 0, NV_STEREO_VIDEO_FORMAT_SIDE_BY_SIDE_LR = 1, NV_STEREO_VIDEO_FORMAT_SIDE_BY_SIDE_RL = 2, NV_STEREO_VIDEO_FORMAT_TOP_BOTTOM_LR = 3, NV_STEREO_VIDEO_FORMAT_TOP_BOTTOM_RL = 4, NV_STEREO_VIDEO_FORMAT_ROW_INTERLEAVE_LR = 5, NV_STEREO_VIDEO_FORMAT_ROW_INTERLEAVE_RL = 6, NV_STEREO_VIDEO_FORMAT_TWO_FRAMES_LR = 7, NV_STEREO_VIDEO_FORMAT_MONO_PLUS_OFFSET = 8, NV_STEREO_VIDEO_FORMAT_LAST = 9, } NV_STEREO_VIDEO_FORMAT; #endif // NV_STEREO_VIDEO_FORMAT_DEFINE //! \ingroup vidcontrol typedef struct _NV_VIDEO_STEREO_INFO { NvU32 dwVersion; //!< Must be NV_VIDEO_STEREO_INFO_VER NV_STEREO_VIDEO_FORMAT eFormat; //!< Stereo format of the surface (please note that format NV_STEREO_VIDEO_FORMAT_TWO_FRAMES_LR is invalid for this NvAPI) NvS32 sViewOffset; //!< Signed offset of each view (positive offset indicating left view is shifted left) NvU32 bStereoEnable : 1; //!< Whether stereo rendering should be enabled (if FALSE, only left view will be used) } NV_VIDEO_STEREO_INFO; //! \ingroup vidcontrol //! Macro for constructing the version field of ::_NV_VIDEO_STEREO_INFO #define NV_VIDEO_STEREO_INFO_VER MAKE_NVAPI_VERSION(NV_VIDEO_STEREO_INFO, 1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION_NAME: NvAPI_VideoSetStereoInfo // //! DESCRIPTION: This API specifies the stereo format of the video source. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE //! or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in] pStereoInfo The stereo format. //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_ERROR miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameter //! //! \ingroup vidcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_VideoSetStereoInfo(NvDisplayHandle hNvDisplay, NV_VIDEO_STEREO_INFO* pStereoInfo); //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // // FUNCTION_NAME: NvAPI_VideoGetStereoInfo // //! DESCRIPTION: This API retrieves the stereo format of the video source (as set by //! NvAPI_VideoSetStereoInfo()). //! //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE //! or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). //! \param [in,out] pStereoInfo The stereo format returned //! //! \retval ::NVAPI_OK completed request //! \retval ::NVAPI_ERROR miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameter //! //! \ingroup vidcontrol /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_VideoGetStereoInfo(NvDisplayHandle hNvDisplay, NV_VIDEO_STEREO_INFO* pStereoInfo); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SecureAudio_GetSecureAudioAPIRevision //! //! DESCRIPTION: Returns the Secure Audio API revision. //! \deprecated Do not use this function - it is deprecated in release 313. Instead, use NvAPI_SecureAudio_CheckAPICompatibility. //! SUPPORTED OS: Windows 7 and higher //! //! //! //! \param [out] nvSecureAudioAPIRevision Revision number of Secure Audio API. //! //! RETURN STATUS: NVAPI_NOT_SUPPORTED //! /////////////////////////////////////////////////////////////////////////////// //! \ingroup secureaudioapi //! @{ //! Secure Audio API REVISION //! Client uses this revision in NvAPI_SecureAudio_CheckAPICompatibility API to establish compatability between client API and driver. #define NV_SECURE_AUDIO_API_REVISION 0x00010001 //! Content key header version #define NV_CONTENT_KEY_HEADER_VERSION 0x01 //! Secure Audio Flags #define NV_CONTENT_KEY_HEADER_KEY_IS_PLAINTEXT NV_BIT(1) //!< Flags bit #1, leave to 0 if content key is sent already encrypted #define NV_CONTENT_KEY_HEADER_OOS_ENABLED NV_BIT(2) //!< Flags bit #2, Set if input stream has Kepler out-of-sync detection counter bytes enabled //! Content key is copied as-is from the WAVEFORMATEXTENSIBLE data extension area #define NV_CONTENT_KEY_HEADER_KEYLENGTH 16 #define NV_CONTENT_KEY_HEADER_IVLENGTH 16 //! Size of content key header structure. #define NV_CONTENT_KEY_HEADER_SIZE sizeof(NV_CONTENT_KEY_HEADER) typedef struct _NV_CONTENT_KEY_HEADER { NvU8 version; //!< versioning maintained inside the audio driver NvU8 contentKeyHeaderLength; //!< Size of the structure NvU8 flags; //!< flag values specified above NvU8 counterWrapAround; //!< Counter value to be used in case of OOSD enabled NvU8 iv[NV_CONTENT_KEY_HEADER_IVLENGTH]; //!< Initial counter value used for data encryption using content key NvU8 key[NV_CONTENT_KEY_HEADER_KEYLENGTH]; //!< Content Key expected to be encrypted by the session key by the application. } NV_CONTENT_KEY_HEADER; //! @} //! \ingroup secureaudioapi __nvapi_deprecated_function("Do not use this function - it is deprecated in release 313. Instead, use NvAPI_SecureAudio_CheckAPICompatibility.") NVAPI_INTERFACE NvAPI_SecureAudio_GetSecureAudioAPIRevision(__out NvU32* nvSecureAudioAPIRevision); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SecureAudio_CheckAPICompatibility //! //! DESCRIPTION: Checks API and Driver compatibility with the client. Return value NVAPI_OK suggests that the client is using compatible API version with the system driver. //! //! \deprecated Do not use this function - it is deprecated in release 495. //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 313 //! //! \param [in] endpointID Pointer to an endpoint ID string. The caller typically obtains this string from the IMMDevice::GetId method //! \param [in] nvSecureAudioAPIRevision Revision number of Secure Audio API. //! //! RETURN STATUS: NVAPI_NOT_SUPPORTED //! /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 495.") NVAPI_INTERFACE NvAPI_SecureAudio_CheckAPICompatibility( __in NvAPI_LPCWSTR endpointID, __in NvU32 nvSecureAudioAPIRevision); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SecureAudio_GetCustomFormatGUID // //! DESCRIPTION: This API gets the subformat GUID as the input parameter and returns corresponding subformat for encrypted audio. //! //! \deprecated Do not use this function - it is deprecated in release 495. //! SUPPORTED OS: Windows 7 and higher //! //! //! //! \param [in/out] SubFormat GUID for audio subformat //! //! RETURN STATUS: NVAPI_NOT_SUPPORTED //! //! \ingroup secureaudioapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 495.") NVAPI_INTERFACE NvAPI_SecureAudio_GetCustomFormatGUID(__inout NvGUID* subFormat); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SecureAudio_NegotiateDHExchange // //! DESCRIPTION: This API assists the application in negotiating Diffie-Hellman Key exchange with the audio hardware to establish the session Key. //! Application generates the Challenge token for DH Key exchange (256 BYTE array of random numbers). //! API communicates the Challenge token with HW. HW in turn generates the ResponseToken. //! API provides this ResponseToken (256 BYTE) to the application. Application uses this ResponseToken to generate the session key. //! //! \deprecated Do not use this function - it is deprecated in release 495. //! SUPPORTED OS: Windows 7 and higher //! //! //! //! \param [in] endpointID Pointer to an endpoint ID string. The caller typically obtains this string from the IMMDevice::GetId method //! \param [in] challengeToken ChallengeToken for DH Key exchange //! \param [out] responseToken ResponseToken for DH Key exchange //! //! RETURN STATUS: NVAPI_NOT_SUPPORTED //! //! \ingroup secureaudioapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 495.") NVAPI_INTERFACE NvAPI_SecureAudio_NegotiateDHExchange( __in NvAPI_LPCWSTR endpointID, __in NvU8* challengeToken, __out NvU8* responseToken ); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SecureAudio_PollOOSDState // //! DESCRIPTION: While audio stream is playing this API probes into audio driver for every few seconds to detect whether the stream is 'Out of Sync' (OOSD). //! //! \deprecated Do not use this function - it is deprecated in release 495. //! SUPPORTED OS: Windows 7 and higher //! //! //! //! \param [in] endpointID Pointer to an endpoint ID string. The caller typically obtains this string from the IMMDevice::GetId method //! //! RETURN STATUS: NVAPI_NOT_SUPPORTED //! //! \ingroup secureaudioapi /////////////////////////////////////////////////////////////////////////////// __nvapi_deprecated_function("Do not use this function - it is deprecated in release 495.") NVAPI_INTERFACE NvAPI_SecureAudio_PollOOSDState(__in NvAPI_LPCWSTR endpointID); //! \addtogroup drsapi //! @{ // GPU Profile APIs NV_DECLARE_HANDLE(NvDRSSessionHandle); NV_DECLARE_HANDLE(NvDRSProfileHandle); #define NVAPI_DRS_GLOBAL_PROFILE ((NvDRSProfileHandle) -1) #define NVAPI_SETTING_MAX_VALUES 100 typedef enum _NVDRS_SETTING_TYPE { NVDRS_DWORD_TYPE, NVDRS_BINARY_TYPE, NVDRS_STRING_TYPE, NVDRS_WSTRING_TYPE } NVDRS_SETTING_TYPE; typedef enum _NVDRS_SETTING_LOCATION { NVDRS_CURRENT_PROFILE_LOCATION, NVDRS_GLOBAL_PROFILE_LOCATION, NVDRS_BASE_PROFILE_LOCATION, NVDRS_DEFAULT_PROFILE_LOCATION } NVDRS_SETTING_LOCATION; typedef struct _NVDRS_GPU_SUPPORT { NvU32 geforce : 1; NvU32 quadro : 1; NvU32 nvs : 1; NvU32 reserved4 : 1; NvU32 reserved5 : 1; NvU32 reserved6 : 1; NvU32 reserved7 : 1; NvU32 reserved8 : 1; NvU32 reserved9 : 1; NvU32 reserved10 : 1; NvU32 reserved11 : 1; NvU32 reserved12 : 1; NvU32 reserved13 : 1; NvU32 reserved14 : 1; NvU32 reserved15 : 1; NvU32 reserved16 : 1; NvU32 reserved17 : 1; NvU32 reserved18 : 1; NvU32 reserved19 : 1; NvU32 reserved20 : 1; NvU32 reserved21 : 1; NvU32 reserved22 : 1; NvU32 reserved23 : 1; NvU32 reserved24 : 1; NvU32 reserved25 : 1; NvU32 reserved26 : 1; NvU32 reserved27 : 1; NvU32 reserved28 : 1; NvU32 reserved29 : 1; NvU32 reserved30 : 1; NvU32 reserved31 : 1; NvU32 reserved32 : 1; } NVDRS_GPU_SUPPORT; //! Enum to decide on the datatype of setting value. typedef struct _NVDRS_BINARY_SETTING { NvU32 valueLength; //!< valueLength should always be in number of bytes. NvU8 valueData[NVAPI_BINARY_DATA_MAX]; } NVDRS_BINARY_SETTING; typedef struct _NVDRS_SETTING_VALUES { NvU32 version; //!< Structure Version NvU32 numSettingValues; //!< Total number of values available in a setting. NVDRS_SETTING_TYPE settingType; //!< Type of setting value. union //!< Setting can hold either DWORD or Binary value or string. Not mixed types. { NvU32 u32DefaultValue; //!< Accessing default DWORD value of this setting. NVDRS_BINARY_SETTING binaryDefaultValue; //!< Accessing default Binary value of this setting. //!< Must be allocated by caller with valueLength specifying buffer size, or only valueLength will be filled in. NvAPI_UnicodeString wszDefaultValue; //!< Accessing default unicode string value of this setting. }; union //!< Setting values can be of either DWORD, Binary values or String type, { //!< NOT mixed types. NvU32 u32Value; //!< All possible DWORD values for a setting NVDRS_BINARY_SETTING binaryValue; //!< All possible Binary values for a setting NvAPI_UnicodeString wszValue; //!< Accessing current unicode string value of this setting. }settingValues[NVAPI_SETTING_MAX_VALUES]; } NVDRS_SETTING_VALUES; //! Macro for constructing the version field of ::_NVDRS_SETTING_VALUES #define NVDRS_SETTING_VALUES_VER MAKE_NVAPI_VERSION(NVDRS_SETTING_VALUES,1) typedef struct _NVDRS_SETTING_V1 { NvU32 version; //!< Structure Version NvAPI_UnicodeString settingName; //!< String name of setting NvU32 settingId; //!< 32 bit setting Id NVDRS_SETTING_TYPE settingType; //!< Type of setting value. NVDRS_SETTING_LOCATION settingLocation; //!< Describes where the value in CurrentValue comes from. NvU32 isCurrentPredefined; //!< It is different than 0 if the currentValue is a predefined Value, //!< 0 if the currentValue is a user value. NvU32 isPredefinedValid; //!< It is different than 0 if the PredefinedValue union contains a valid value. union //!< Setting can hold either DWORD or Binary value or string. Not mixed types. { NvU32 u32PredefinedValue; //!< Accessing default DWORD value of this setting. NVDRS_BINARY_SETTING binaryPredefinedValue; //!< Accessing default Binary value of this setting. //!< Must be allocated by caller with valueLength specifying buffer size, //!< or only valueLength will be filled in. NvAPI_UnicodeString wszPredefinedValue; //!< Accessing default unicode string value of this setting. }; union //!< Setting can hold either DWORD or Binary value or string. Not mixed types. { NvU32 u32CurrentValue; //!< Accessing current DWORD value of this setting. NVDRS_BINARY_SETTING binaryCurrentValue; //!< Accessing current Binary value of this setting. //!< Must be allocated by caller with valueLength specifying buffer size, //!< or only valueLength will be filled in. NvAPI_UnicodeString wszCurrentValue; //!< Accessing current unicode string value of this setting. }; } NVDRS_SETTING_V1; //! Macro for constructing the version field of ::_NVDRS_SETTING #define NVDRS_SETTING_VER1 MAKE_NVAPI_VERSION(NVDRS_SETTING_V1, 1) typedef NVDRS_SETTING_V1 NVDRS_SETTING; #define NVDRS_SETTING_VER NVDRS_SETTING_VER1 typedef struct _NVDRS_APPLICATION_V1 { NvU32 version; //!< Structure Version NvU32 isPredefined; //!< Is the application userdefined/predefined NvAPI_UnicodeString appName; //!< String name of the Application NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the application } NVDRS_APPLICATION_V1; typedef struct _NVDRS_APPLICATION_V2 { NvU32 version; //!< Structure Version NvU32 isPredefined; //!< Is the application userdefined/predefined NvAPI_UnicodeString appName; //!< String name of the Application NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the Application NvAPI_UnicodeString fileInFolder; //!< Select this application only if this file is found. //!< When specifying multiple files, separate them using the ':' character. } NVDRS_APPLICATION_V2; typedef struct _NVDRS_APPLICATION_V3 { NvU32 version; //!< Structure Version NvU32 isPredefined; //!< Is the application userdefined/predefined NvAPI_UnicodeString appName; //!< String name of the Application NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the Application NvAPI_UnicodeString fileInFolder; //!< Select this application only if this file is found. //!< When specifying multiple files, separate them using the ':' character. NvU32 isMetro:1; //!< Windows 8 style app NvU32 isCommandLine:1; //!< Command line parsing for the application name NvU32 reserved:30; //!< Reserved. Should be 0. } NVDRS_APPLICATION_V3; typedef struct _NVDRS_APPLICATION_V4 { NvU32 version; //!< Structure Version NvU32 isPredefined; //!< Is the application userdefined/predefined NvAPI_UnicodeString appName; //!< String name of the Application NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the Application NvAPI_UnicodeString fileInFolder; //!< Select this application only if this file is found. //!< When specifying multiple files, separate them using the ':' character. NvU32 isMetro:1; //!< Windows 8 style app NvU32 isCommandLine:1; //!< Command line parsing for the application name NvU32 reserved:30; //!< Reserved. Should be 0. NvAPI_UnicodeString commandLine; //!< If isCommandLine is set to 0 this must be an empty. If isCommandLine is set to 1 //!< this contains application's command line as if it was returned by GetCommandLineW. } NVDRS_APPLICATION_V4; #define NVDRS_APPLICATION_VER_V1 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V1,1) #define NVDRS_APPLICATION_VER_V2 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V2,2) #define NVDRS_APPLICATION_VER_V3 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V3,3) #define NVDRS_APPLICATION_VER_V4 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V4,4) typedef NVDRS_APPLICATION_V4 NVDRS_APPLICATION; #define NVDRS_APPLICATION_VER NVDRS_APPLICATION_VER_V4 typedef struct _NVDRS_PROFILE_V1 { NvU32 version; //!< Structure Version NvAPI_UnicodeString profileName; //!< String name of the Profile NVDRS_GPU_SUPPORT gpuSupport; //!< This read-only flag indicates the profile support on either //!< Quadro, or Geforce, or both. NvU32 isPredefined; //!< Is the Profile user-defined, or predefined NvU32 numOfApps; //!< Total number of applications that belong to this profile. Read-only NvU32 numOfSettings; //!< Total number of settings applied for this Profile. Read-only } NVDRS_PROFILE_V1; typedef NVDRS_PROFILE_V1 NVDRS_PROFILE; //! Macro for constructing the version field of ::NVDRS_PROFILE #define NVDRS_PROFILE_VER1 MAKE_NVAPI_VERSION(NVDRS_PROFILE_V1,1) #define NVDRS_PROFILE_VER NVDRS_PROFILE_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_CreateSession // //! DESCRIPTION: This API allocates memory and initializes the session. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [out] *phSession Return pointer to the session handle. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR: For miscellaneous errors. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_CreateSession(NvDRSSessionHandle *phSession); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_DestroySession // //! DESCRIPTION: This API frees the allocation: cleanup of NvDrsSession. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_DestroySession(NvDRSSessionHandle hSession); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_LoadSettings // //! DESCRIPTION: This API loads and parses the settings data. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_LoadSettings(NvDRSSessionHandle hSession); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_SaveSettings // //! DESCRIPTION: This API saves the settings data to the system. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_SaveSettings(NvDRSSessionHandle hSession); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_LoadSettingsFromFile // //! DESCRIPTION: This API loads settings from the given file path. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle //! \param [in] fileName Binary File Name/Path //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_LoadSettingsFromFile(NvDRSSessionHandle hSession, NvAPI_UnicodeString fileName); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_SaveSettingsToFile // //! DESCRIPTION: This API saves settings to the given file path. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] fileName Binary File Name/Path //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. // /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_SaveSettingsToFile(NvDRSSessionHandle hSession, NvAPI_UnicodeString fileName); //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_CreateProfile // //! DESCRIPTION: This API creates an empty profile. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] *pProfileInfo Input pointer to NVDRS_PROFILE. //! \param [in] *phProfile Returns pointer to profile handle. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_CreateProfile(NvDRSSessionHandle hSession, NVDRS_PROFILE *pProfileInfo, NvDRSProfileHandle *phProfile); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_DeleteProfile // //! DESCRIPTION: This API deletes a profile or sets it back to a predefined value. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! //! \retval ::NVAPI_OK SUCCESS if the profile is found //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_DeleteProfile(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_SetCurrentGlobalProfile // //! DESCRIPTION: This API sets the current global profile in the driver. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] wszGlobalProfileName Input current Global profile name. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_SetCurrentGlobalProfile(NvDRSSessionHandle hSession, NvAPI_UnicodeString wszGlobalProfileName); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_GetCurrentGlobalProfile // //! DESCRIPTION: This API returns the handle to the current global profile. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [out] *phProfile Returns current Global profile handle. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_GetCurrentGlobalProfile(NvDRSSessionHandle hSession, NvDRSProfileHandle *phProfile); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_GetProfileInfo // //! DESCRIPTION: This API gets information about the given profile. User needs to specify the name of the Profile. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [out] *pProfileInfo Return the profile info. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_GetProfileInfo(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_PROFILE *pProfileInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_SetProfileInfo // //! DESCRIPTION: Specifies flags for a given profile. Currently only the NVDRS_GPU_SUPPORT is //! used to update the profile. Neither the name, number of settings or applications //! or other profile information can be changed with this function. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] *pProfileInfo Input the new profile info. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_SetProfileInfo(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_PROFILE *pProfileInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_FindProfileByName // //! DESCRIPTION: This API finds a profile in the current session. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] profileName Input profileName. //! \param [out] phProfile Input profile handle. //! //! \retval ::NVAPI_OK SUCCESS if the profile is found //! \retval ::NVAPI_PROFILE_NOT_FOUND if profile is not found //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_FindProfileByName(NvDRSSessionHandle hSession, NvAPI_UnicodeString profileName, NvDRSProfileHandle* phProfile); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_EnumProfiles // //! DESCRIPTION: This API enumerates through all the profiles in the session. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] index Input the index for enumeration. //! \param [out] *phProfile Returns profile handle. //! //! RETURN STATUS: NVAPI_OK: SUCCESS if the profile is found //! NVAPI_ERROR: For miscellaneous errors. //! NVAPI_END_ENUMERATION: index exceeds the total number of available Profiles in DB. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_EnumProfiles(NvDRSSessionHandle hSession, NvU32 index, NvDRSProfileHandle *phProfile); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_GetNumProfiles // //! DESCRIPTION: This API obtains the number of profiles in the current session object. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param out] *numProfiles Returns count of profiles in the current hSession. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_API_NOT_INTIALIZED Failed to initialize. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid Arguments. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_GetNumProfiles(NvDRSSessionHandle hSession, NvU32 *numProfiles); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_CreateApplication // //! DESCRIPTION: This API adds an executable name to a profile. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] *pApplication Input NVDRS_APPLICATION struct with the executable name to be added. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_CreateApplication(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_APPLICATION *pApplication); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_DeleteApplicationEx // //! DESCRIPTION: This API removes an executable from a profile. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession - Input to the session handle. //! \param [in] hProfile - Input profile handle. //! \param [in] *pApp - Input all the information about the application to be removed. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS If the path provided could refer to two different executables, //! this error will be returned. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_DeleteApplicationEx(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_APPLICATION *pApp); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_DeleteApplication // //! DESCRIPTION: This API removes an executable name from a profile. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSessionPARAMETERS Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] appName Input the executable name to be removed. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS If the path provided could refer to two different executables, //! this error will be returned //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_DeleteApplication(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvAPI_UnicodeString appName); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_GetApplicationInfo // //! DESCRIPTION: This API gets information about the given application. The input application name //! must match exactly what the Profile has stored for the application. //! This function is better used to retrieve application information from a previous //! enumeration. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] appName Input application name. //! \param [out] *pApplication Returns NVDRS_APPLICATION struct with all the attributes. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS The application name could not // single out only one executable. //! \retval ::NVAPI_EXECUTABLE_NOT_FOUND No application with that name is found on the profile. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_GetApplicationInfo(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvAPI_UnicodeString appName, NVDRS_APPLICATION *pApplication); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_EnumApplications // //! DESCRIPTION: This API enumerates all the applications in a given profile from the starting index to the maximum length. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] startIndex Indicates starting index for enumeration. //! \param [in,out] *appCount Input maximum length of the passed in arrays. Returns the actual length. //! \param [out] *pApplication Returns NVDRS_APPLICATION struct with all the attributes. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! \retval ::NVAPI_END_ENUMERATION startIndex exceeds the total appCount. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_EnumApplications(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 startIndex, NvU32 *appCount, NVDRS_APPLICATION *pApplication); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_FindApplicationByName // //! DESCRIPTION: This API searches the application and the associated profile for the given application name. //! If a fully qualified path is provided, this function will always return the profile //! the driver will apply upon running the application (on the path provided). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the hSession handle //! \param [in] appName Input appName. For best results, provide a fully qualified path of the type //! c:/Folder1/Folder2/App.exe //! \param [out] *phProfile Returns profile handle. //! \param [in,out] *pApplication Returns NVDRS_APPLICATION struct pointer. //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, //! they are listed below: //! \retval ::NVAPI_APPLICATION_NOT_FOUND If App not found //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS If the input appName was not fully qualified, this error might return in the case of multiple matches //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_FindApplicationByName(__in NvDRSSessionHandle hSession, __in NvAPI_UnicodeString appName, __out NvDRSProfileHandle *phProfile, __inout NVDRS_APPLICATION *pApplication); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_SetSetting // //! DESCRIPTION: This API adds/modifies a setting to a profile. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] *pSetting Input NVDRS_SETTING struct pointer. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_SetSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_SETTING *pSetting); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_GetSetting // //! DESCRIPTION: This API gets information about the given setting. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] settingId Input settingId. //! \param [out] *pSetting Returns all the setting info //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_GetSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId, NVDRS_SETTING *pSetting); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_EnumSettings // //! DESCRIPTION: This API enumerates all the settings of a given profile from startIndex to the maximum length. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] startIndex Indicates starting index for enumeration. //! \param [in,out] *settingsCount Input max length of the passed in arrays, Returns the actual length. //! \param [out] *pSetting Returns all the settings info. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! \retval ::NVAPI_END_ENUMERATION startIndex exceeds the total appCount. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_EnumSettings(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 startIndex, NvU32 *settingsCount, NVDRS_SETTING *pSetting); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_EnumAvailableSettingIds // //! DESCRIPTION: This API enumerates all the Ids of all the settings recognized by NVAPI. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [out] pSettingIds User-provided array of length *pMaxCount that NVAPI will fill with IDs. //! \param [in,out] pMaxCount Input max length of the passed in array, Returns the actual length. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! NVAPI_END_ENUMERATION: the provided pMaxCount is not enough to hold all settingIds. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingIds(NvU32 *pSettingIds, NvU32 *pMaxCount); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_EnumAvailableSettingValues // //! DESCRIPTION: This API enumerates all available setting values for a given setting. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] settingId Input settingId. //! \param [in,out] pMaxNumValues Input max length of the passed in arrays, Returns the actual length. //! \param [out] *pSettingValues Returns all available setting values and its count. //! //! \retval ::NVAPI_OK SUCCESS //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingValues(NvU32 settingId, NvU32 *pMaxNumValues, NVDRS_SETTING_VALUES *pSettingValues); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_GetSettingIdFromName // //! DESCRIPTION: This API gets the binary ID of a setting given the setting name. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] settingName Input Unicode settingName. //! \param [out] *pSettingId Returns corresponding settingId. //! //! \retval ::NVAPI_OK SUCCESS if the profile is found //! \retval ::NVAPI_PROFILE_NOT_FOUND if profile is not found //! \retval ::NVAPI_SETTING_NOT_FOUND if setting is not found //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_GetSettingIdFromName(NvAPI_UnicodeString settingName, NvU32 *pSettingId); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_GetSettingNameFromId // //! DESCRIPTION: This API gets the setting name given the binary ID. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] settingId Input settingId. //! \param [in] *pSettingName Returns corresponding Unicode settingName. //! //! \retval ::NVAPI_OK SUCCESS if the profile is found //! \retval ::NVAPI_PROFILE_NOT_FOUND if profile is not found //! \retval ::NVAPI_SETTING_NOT_FOUND if setting is not found //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_GetSettingNameFromId(NvU32 settingId, NvAPI_UnicodeString *pSettingName); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_DeleteProfileSetting // //! DESCRIPTION: This API deletes a setting or sets it back to predefined value. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] settingId Input settingId to be deleted. //! //! \retval ::NVAPI_OK SUCCESS if the profile is found //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_DeleteProfileSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_RestoreAllDefaults // //! DESCRIPTION: This API restores the whole system to predefined(default) values. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! //! \retval ::NVAPI_OK SUCCESS if the profile is found //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_RestoreAllDefaults(NvDRSSessionHandle hSession); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_RestoreProfileDefault // //! DESCRIPTION: This API restores the given profile to predefined(default) values. //! Any and all user specified modifications will be removed. //! If the whole profile was set by the user, the profile will be removed. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! //! \retval ::NVAPI_OK SUCCESS if the profile is found //! \retval ::NVAPI_ERROR For miscellaneous errors. //! \retval ::NVAPI_PROFILE_REMOVED SUCCESS, and the hProfile is no longer valid. //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefault(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_RestoreProfileDefaultSetting // //! DESCRIPTION: This API restores the given profile setting to predefined(default) values. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] hProfile Input profile handle. //! \param [in] settingId Input settingId. //! //! \retval ::NVAPI_OK SUCCESS if the profile is found //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefaultSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_DRS_GetBaseProfile // //! DESCRIPTION: Returns the handle to the current global profile. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hSession Input to the session handle. //! \param [in] *phProfile Returns Base profile handle. //! //! \retval ::NVAPI_OK SUCCESS if the profile is found //! \retval ::NVAPI_ERROR For miscellaneous errors. //! //! \ingroup drsapi /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_DRS_GetBaseProfile(NvDRSSessionHandle hSession, NvDRSProfileHandle *phProfile); typedef enum _NV_FEATURE_ID { NV_FEATURE_ID_SGM_CLOCK_LOCK = 0, //!< Clock locking for SDI, GSync, Mosaic //!< No need to set Physical GPU or displayId for this feature NV_FEATURE_ID_PAN_SCAN_STATE = 1, //!< Pan Scan State of the display. Set displayId of the desired pan scan target. NV_FEATURE_ID_VRR_STATE = 2, //!< VRR State of VRR capable display. Set displayId of the desired display. NV_FEATURE_ID_CONSISTENT_PERF = 3, //!< Clock locking for consistent performance. NV_FEATURE_ID_HYPER_SAMPLING = 4, //!< hyper sampling on all display of a Gpu. Set hPhysicalGpu of the desired Gpu. NV_FEATURE_ID_GC6_NOTIFY_STATE_CHANGE = 5, //!< GC6 State Change Event for GPU logging feature during GC6 state change. NV_FEATURE_ID_DIRECTMODE = 6, //!< Direct Mode display support for VR. Can be called with both hPhysicalGpu or displayId. //!< Note that even if a GPU supports this feature, the connected display might not. NV_FEATURE_ID_VIDEO_ONESHOT = 7 //!< Enabled state of video with one shot feature. No Physical GPU or DisplayId required. } NV_FEATURE_ID; typedef enum _NV_FEATURE_ID_VALUE { NV_FEATURE_ID_OFF = 0, //!< feature on NV_FEATURE_ID_ON = 1, //!< feature off } NV_FEATURE_ID_VALUE; //! \ingroup sysgeneral typedef struct _NV_SYS_FEATURE_DATA_V1 { NvU32 version; //!< Version of this structure NV_FEATURE_ID featureId; //!< feature Id of the feature NV_FEATURE_ID_VALUE featureIdValue; //!< status of the feature union { NvPhysicalGpuHandle hPhysicalGpu; //!< (Optional)need to be fill in only if feature configuration requires it NvU32 displayId; //!< (Optional)need to be fill in only if feature configuration requires it }; }NV_SYS_FEATURE_DATA_V1; #define NV_FEATURE_NO_SUPPORT_DISABLED NV_BIT(0) //!< The feature is not enabled #define NV_FEATURE_NO_SUPPORT_GPU NV_BIT(1) //!< The current GPU does not support this feature #define NV_FEATURE_NO_SUPPORT_DISPLAY NV_BIT(2) //!< The current monitor does not support this feature #define NV_FEATURE_NO_SUPPORT_DISPLAY_DRIVER NV_BIT(3) //!< The current installed display driver not support this feature #define NV_FEATURE_NO_SUPPORT_CURRENT_DISPLAY_SETTINGS NV_BIT(4) //!< The current display topology does not support this feature //! \ingroup sysgeneral typedef struct _NV_SYS_FEATURE_DATA_V2 { NvU32 version; //!< Version of this structure NV_FEATURE_ID featureId; //!< feature Id of the feature NV_FEATURE_ID_VALUE featureIdValue; //!< status of the feature union { NvPhysicalGpuHandle hPhysicalGpu; //!< (Optional)need to be fill in only if feature configuration requires it NvU32 displayId; //!< (Optional)need to be fill in only if feature configuration requires it }; NvU32 problemFlags; //!< The problem flags (combination of NV_FEATURE_NO_SUPPORT_XXX values) when featureIdValue is NV_FEATURE_ID_OFF }NV_SYS_FEATURE_DATA_V2; //! \ingroup sysgeneral typedef NV_SYS_FEATURE_DATA_V2 NV_SYS_FEATURE_DATA; #define NV_SYS_FEATURE_DATA_VER_1 MAKE_NVAPI_VERSION(NV_SYS_FEATURE_DATA_V1,1) #define NV_SYS_FEATURE_DATA_VER_2 MAKE_NVAPI_VERSION(NV_SYS_FEATURE_DATA_V2,2) #define NV_SYS_FEATURE_DATA_VER NV_SYS_FEATURE_DATA_VER_2 //! SUPPORTED OS: Windows 7 and higher //! /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_GetFeatureState // //! \code //! PARAMETERS: featureData(IN/OUT) � data of the feature //! //! DESCRIPTION: This API Gets the current state of corresponding feature //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. //! //! \endcode /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetFeatureState(__inout NV_SYS_FEATURE_DATA *featureData); //! \addtogroup sysgeneral //! @{ typedef struct { NvU32 version; //!< structure version NvU32 vendorId; //!< Chipset vendor identification NvU32 deviceId; //!< Chipset device identification NvAPI_ShortString szVendorName; //!< Chipset vendor Name NvAPI_ShortString szChipsetName; //!< Chipset device Name NvU32 flags; //!< Chipset info flags - obsolete NvU32 subSysVendorId; //!< Chipset subsystem vendor identification NvU32 subSysDeviceId; //!< Chipset subsystem device identification NvAPI_ShortString szSubSysVendorName; //!< subsystem vendor Name NvU32 HBvendorId; //!< Host bridge vendor identification NvU32 HBdeviceId; //!< Host bridge device identification NvU32 HBsubSysVendorId; //!< Host bridge subsystem vendor identification NvU32 HBsubSysDeviceId; //!< Host bridge subsystem device identification } NV_CHIPSET_INFO_v4; typedef struct { NvU32 version; //!< structure version NvU32 vendorId; //!< vendor ID NvU32 deviceId; //!< device ID NvAPI_ShortString szVendorName; //!< vendor Name NvAPI_ShortString szChipsetName; //!< device Name NvU32 flags; //!< Chipset info flags - obsolete NvU32 subSysVendorId; //!< subsystem vendor ID NvU32 subSysDeviceId; //!< subsystem device ID NvAPI_ShortString szSubSysVendorName; //!< subsystem vendor Name } NV_CHIPSET_INFO_v3; typedef enum { NV_CHIPSET_INFO_HYBRID = 0x00000001, } NV_CHIPSET_INFO_FLAGS; typedef struct { NvU32 version; //!< structure version NvU32 vendorId; //!< vendor ID NvU32 deviceId; //!< device ID NvAPI_ShortString szVendorName; //!< vendor Name NvAPI_ShortString szChipsetName; //!< device Name NvU32 flags; //!< Chipset info flags } NV_CHIPSET_INFO_v2; typedef struct { NvU32 version; //structure version NvU32 vendorId; //vendor ID NvU32 deviceId; //device ID NvAPI_ShortString szVendorName; //vendor Name NvAPI_ShortString szChipsetName; //device Name } NV_CHIPSET_INFO_v1; #define NV_CHIPSET_INFO_VER_1 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v1,1) #define NV_CHIPSET_INFO_VER_2 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v2,2) #define NV_CHIPSET_INFO_VER_3 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v3,3) #define NV_CHIPSET_INFO_VER_4 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v4,4) #define NV_CHIPSET_INFO NV_CHIPSET_INFO_v4 #define NV_CHIPSET_INFO_VER NV_CHIPSET_INFO_VER_4 //! @} /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_GetChipSetInfo // //! This function returns information about the system's chipset. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 95 //! //! \retval NVAPI_INVALID_ARGUMENT pChipSetInfo is NULL. //! \retval NVAPI_OK *pChipSetInfo is now set. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_CHIPSET_INFO version not compatible with driver. //! \ingroup sysgeneral /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetChipSetInfo(NV_CHIPSET_INFO *pChipSetInfo); //! \ingroup sysgeneral //! Lid and dock information - used in NvAPI_GetLidDockInfo() typedef struct { NvU32 version; //! Structure version, constructed from the macro #NV_LID_DOCK_PARAMS_VER NvU32 currentLidState; NvU32 currentDockState; NvU32 currentLidPolicy; NvU32 currentDockPolicy; NvU32 forcedLidMechanismPresent; NvU32 forcedDockMechanismPresent; }NV_LID_DOCK_PARAMS; //! ingroup sysgeneral #define NV_LID_DOCK_PARAMS_VER MAKE_NVAPI_VERSION(NV_LID_DOCK_PARAMS,1) /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GetLidDockInfo // //! DESCRIPTION: This function returns the current lid and dock information. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 177 //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_NOT_SUPPORTED //! \retval ::NVAPI_HANDLE_INVALIDATED //! \retval ::NVAPI_API_NOT_INTIALIZED //! //! \ingroup sysgeneral /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetLidAndDockInfo(NV_LID_DOCK_PARAMS *pLidAndDock); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SYS_GetDisplayIdFromGpuAndOutputId // //! DESCRIPTION: This API converts a Physical GPU handle and output ID to a //! display ID. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] hPhysicalGpu Handle to the physical GPU //! \param [in] outputId Connected display output ID on the //! target GPU - must only have one bit set //! \param [out] displayId Pointer to an NvU32 which contains //! the display ID //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized //! \retval ::NVAPI_ERROR - miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT - Invalid input parameter. //! //! \ingroup sysgeneral /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetDisplayIdFromGpuAndOutputId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NvU32* displayId); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SYS_GetGpuAndOutputIdFromDisplayId // //! DESCRIPTION: This API converts a display ID to a Physical GPU handle and output ID. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [in] displayId Display ID of display to retrieve //! GPU and outputId for //! \param [out] hPhysicalGpu Handle to the physical GPU //! \param [out] outputId ) Connected display output ID on the //! target GPU will only have one bit set. //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_API_NOT_INTIALIZED //! \retval ::NVAPI_ID_OUT_OF_RANGE The DisplayId corresponds to a //! display which is not within the //! normal outputId range. //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! //! \ingroup sysgeneral /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetGpuAndOutputIdFromDisplayId(NvU32 displayId, NvPhysicalGpuHandle *hPhysicalGpu, NvU32 *outputId); /////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SYS_GetPhysicalGpuFromDisplayId // //! \code //! DESCRIPTION: This API retrieves the Physical GPU handle of the connected display //! //! \since Release: 313 //! //! SUPPORTED OS: Windows 7 and higher //! //! //! PARAMETERS: displayId(IN) - Display ID of display to retrieve //! GPU handle //! hPhysicalGpu(OUT) - Handle to the physical GPU //! //! RETURN STATUS: //! NVAPI_OK - completed request //! NVAPI_API_NOT_INTIALIZED - NVAPI not initialized //! NVAPI_ERROR - miscellaneous error occurred //! NVAPI_INVALID_ARGUMENT - Invalid input parameter. //! \endcode //! \ingroup sysgeneral /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetPhysicalGpuFromDisplayId(NvU32 displayId, NvPhysicalGpuHandle *hPhysicalGpu); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_VenturaGetState // //! \fn NvAPI_SYS_VenturaGetState(NVAPI_VENTURA_STATE *state) //! //! DESCRIPTION: This API queries the current Ventura state. //! If the call succeeds, the variable state holds one of the following //! values: //! - NVAPI_VENTURA_STATE_UNSUPPORTED - when executed on //! Ventura non-capable system //! - NVAPI_VENTURA_STATE_DISABLED - Ventura control is not //! active (but system is Ventura capable) //! - NVAPI_VENTURA_STATE_ENABLED - Ventura is actively //! managing power consumption to stay within defined budget //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [out] state The current Ventura state //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_POINTER NULL argument passed //! \retval ::NVAPI_INVALID_ARGUMENT Incorrect param value //! \retval ::NVAPI_NOT_SUPPORTED //! \retval ::NVAPI_API_NOT_INTIALIZED //! /////////////////////////////////////////////////////////////////////////////// //! \ingroup sysgeneral //! Used in NvAPI_SYS_VenturaSetState() and NvAPI_SYS_VenturaGetState(). typedef enum _NVAPI_VENTURA_STATE { NVAPI_VENTURA_STATE_UNSUPPORTED, NVAPI_VENTURA_STATE_DISABLED, //!< Deactivate Ventura NVAPI_VENTURA_STATE_ENABLED //!< Activate Ventura } NVAPI_VENTURA_STATE; //! \ingroup sysgeneral NVAPI_INTERFACE NvAPI_SYS_VenturaGetState(NVAPI_VENTURA_STATE *state); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_VenturaSetState // //! DESCRIPTION: This API controls the Ventura state. //! See ::NVAPI_VENTURA_STATE for valid state values. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] state The new Ventura state //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_NOT_SUPPORTED //! \retval ::NVAPI_API_NOT_INTIALIZED //! //! \ingroup sysgeneral /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_VenturaSetState(NVAPI_VENTURA_STATE state); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_VenturaGetCoolingBudget // //! DESCRIPTION: This API retrieves the cooling budget that is //! currently being used by Ventura. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [out] budget The current cooling budget (in mW) //! //! \retval ::NVAPI_OK //! \retval ::NVAPI_ERROR //! \retval ::NVAPI_INVALID_POINTER //! \retval ::NVAPI_INVALID_ARGUMENT //! \retval ::NVAPI_NOT_SUPPORTED //! \retval ::NVAPI_API_NOT_INTIALIZED //! //! \ingroup sysgeneral /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_VenturaGetCoolingBudget(NvU32 *budget); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_VenturaSetCoolingBudget // //! DESCRIPTION: This API call sets the new cooling budget //! that will be used by Ventura. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 185 //! //! \param [in] budget The new cooling budget (in mW) //! //! \retval ::NVAPI_OK - completed request //! \retval ::NVAPI_ERROR - miscellaneous error occurred //! \retval ::NVAPI_INVALID_ARGUMENT - incorrect param value //! \retval ::NVAPI_NOT_SUPPORTED - call is not supported //! \retval ::NVAPI_API_NOT_INTIALIZED - NvAPI not initialized //! //! \ingroup sysgeneral /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_VenturaSetCoolingBudget(NvU32 budget); //! \ingroup sysgeneral //! @{ /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_VenturaGetPowerReading // //! \fn NvAPI_SYS_VenturaGetPowerReading(NVAPI_VENTURA_DEVICE device, NvU32 *power) //! //! \param [in] device targeted device //! \param [out] power latest power reading [mW] //! //! SUPPORTED OS: Windows 7 and higher //! //! //! DESCRIPTION: This API call is used to query for latest power reading. //! 'Device' describes desired target device . //! If call succeeds, variable 'power' holds device's latest //! power reading in [mW] (1/1000 of Watt). //! //! Power measurement for device 'system' can be greater than //! sum of power measurements for devices 'cpu_0' and 'gpu_0' //! since additional devices can be introduced in the future. //! //! \return //! ::NVAPI_OK, //! ::NVAPI_ERROR, //! ::NVAPI_INVALID_POINTER, //! ::NVAPI_INVALID_ARGUMENT, //! ::NVAPI_NOT_SUPPORTED, //! ::NVAPI_API_NOT_INTIALIZED, // /////////////////////////////////////////////////////////////////////////////// //! See NvAPI_SYS_VenturaGetPowerReading(). typedef enum _NVAPI_VENTURA_DEVICE { NVAPI_VENTURA_DEVICE_SYSTEM, NVAPI_VENTURA_DEVICE_CPU_0, NVAPI_VENTURA_DEVICE_GPU_0 } NVAPI_VENTURA_DEVICE; NVAPI_INTERFACE NvAPI_SYS_VenturaGetPowerReading(NVAPI_VENTURA_DEVICE device, NvU32 *power); //! @} //! \ingroup sysgeneral typedef enum _NV_CURSOR_COLOR_FORMAT_FLAGS { NV_CURSOR_COLOR_FORMAT_NONE = 0, NV_CURSOR_COLOR_FORMAT_MONOCHROME = 1, NV_CURSOR_COLOR_FORMAT_COLOR = 2, NV_CURSOR_COLOR_FORMAT_MASKED_COLOR = 3, } NV_CURSOR_COLOR_FORMAT_FLAGS; //! \ingroup sysgeneral typedef struct _NV_CURSOR_INFO_V1 { NvU32 version; //!< Structure version NvU8 bIsVisible; //!< Whether cursor is visible or not. NvU32 xHot; //!< Cursor hotspot X value. NvU32 yHot; //!< Cursor hotspot Y value. NV_CURSOR_COLOR_FORMAT_FLAGS formatFlag; //!< Color format of the cursor. NvU32 bmpBufferSize; //!< Buffer size required/allocated for pBmpData. NvU8 *pBmpData; //!< Memory which will hold BMP data. } NV_CURSOR_INFO_V1; typedef struct _NV_CURSOR_INFO_V2 { NvU32 version; //!< Structure version NvU8 bIsVisible; //!< Whether cursor is visible or not. NvU32 xHot; //!< Cursor hotspot X value. NvU32 yHot; //!< Cursor hotspot Y value. NV_CURSOR_COLOR_FORMAT_FLAGS formatFlag; //!< Color format of the cursor. NvU32 bmpBufferSize; //!< Buffer size required/allocated for pBmpData. NvU8 *pBmpData; //!< Memory which will hold BMP data. NvU64 ulWidth; //!< Width of cursor. NvU64 ulHeight; //!< Height of cursor. NvU64 ulPitch; //!< Pitch. NvU64 ulPlanes; //!< Planes. NvU64 ulDepth; //!< Depth of cursor. } NV_CURSOR_INFO_V2; //! \ingroup sysgeneral typedef NV_CURSOR_INFO_V2 NV_CURSOR_INFO; #define NV_CURSOR_INFO_VER1 MAKE_NVAPI_VERSION(NV_CURSOR_INFO_V1, 1) #define NV_CURSOR_INFO_VER2 MAKE_NVAPI_VERSION(NV_CURSOR_INFO_V2, 2) #define NV_CURSOR_INFO_VER NV_CURSOR_INFO_VER2 //////////////////////////////////////////////////////////////////////////////////////// // FUNCTION NAME: NvAPI_SYS_GetCursorInfo // //! DESCRIPTION: This API gets the cursor bit map data and other related information. //! //! \since Release: 361 //! //! USAGE: Sequence of calls which caller should make to get the information. //! 1. First call to NvAPI_SYS_GetCursorInfo() gets most of NV_CURSOR_INFO data, except pBmpData. //! 2. Allocate memory for pBmpData pointer as per the bmpBufferSize returned in first call. //! 3. Finally call NvAPI_SYS_GetCursorInfo() to get all NV_CURSOR_INFO. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \param [inout] cursorBitMapInfo - Structure containing cursor bit map info. //! //! \return : This API can return any of the error codes enumerated in #NvAPI_Status. //! If there are return error codes with specific meaning for this API, they are listed below. //! //! NVAPI_NOT_SUPPORTED This API will return NVAPI_NOT_SUPPORTED when cursor is not present on display rendered by Nvidia GPU. //! //! \ingroup sysgeneral //////////////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetCursorInfo(NV_CURSOR_INFO *cursorBitMapInfo); typedef struct _NV_SMP_INFO_V1 { NvU32 version; //!< Structure Version. float tilt; //!< The tilt angle between the monitors float verticalFOV; //!< Distance from the center monitor NvU32 cameraMode; //!< Camera Mode selected by the user NvU32 bDefault:1; //!< Get the default value(1) or current value(0) NvU32 reserved:31; //!< Reserved. } NV_SMP_INFO_V1; #define NV_SMP_INFO_VER1 MAKE_NVAPI_VERSION(NV_SMP_INFO_V1, 1) typedef NV_SMP_INFO_V1 NV_SMP_INFO; #define NV_SMP_INFO_VER NV_SMP_INFO_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_GetSMPInfo // //! DESCRIPTION: This API will get the values for NV_SMP_INFO. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 375 //! //! \param [inout] pSMPInfo - This structure will be filled with the values for SMP feature. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetSMPInfo(__inout NV_SMP_INFO *pSMPInfo); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_SetSMPInfo // //! DESCRIPTION: This API will set the value as specified in NV_SMP_INFO. //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 375 //! //! \param [in] pSMPInfo - The new SMP parameters that have to be set. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_SetSMPInfo(__in NV_SMP_INFO *pSMPInfo); typedef struct _NV_DISPLAY_DRIVER_INFO { NvU32 version; //!< Structure Version. NvU32 driverVersion; //!< Contains the driver version after successful return. NvAPI_ShortString szBuildBranch; //!< Contains the driver-branch string after successful return. NvU32 bIsDCHDriver : 1; //!< Contains the driver DCH status after successful return. //!< Value of 1 means that this is DCH driver. //!< Value of 0 means that this is not a DCH driver (NVAPI may be unable to query the DCH status of the driver due to some registry API errors, in that case the API will return with NVAPI_ERROR) NvU32 bIsNVIDIAStudioPackage : 1; //!< On successful return, this field provides information about whether the installed driver is from an NVIDIA Studio Driver package. //!< Value of 1 means that this driver is from the NVIDIA Studio Driver package. NvU32 bIsNVIDIAGameReadyPackage : 1; //!< On successful return, this field provides information about whether the installed driver is from an NVIDIA Game Ready Driver package. //!< Value of 1 means that this driver is from the NVIDIA Game Ready Driver package. NvU32 bIsNVIDIARTXProductionBranchPackage : 1; //!< On successful return, this field confirms whether the installed driver package is from an NVIDIA RTX Enterprise Production Branch which offers ISV certifications, long life-cycle support, regular security updates, and access to the same functionality as corresponding NVIDIA Studio Driver Packages (i.e., of the same driver version number). //!< Value of 1 means that this driver is from the NVIDIA RTX Enterprise Production Branch package. NvU32 bIsNVIDIARTXNewFeatureBranchPackage : 1; //!< On successful return, this field confirms whether the installed driver package is from an NVIDIA RTX New Feature Branch. //!< This driver typically gives access to new features, bug fixes, new operating system support, and other driver enhancements offered between NVIDIA RTX Enterprise Production Branch releases. Support duration for NVIDIA RTX New Feature Branches is shorter than that for NVIDIA RTX Enterprise Production Branches. //!< Value of 1 means that this driver is from the NVIDIA RTX New Feature Branch package. NvU32 reserved : 27; //!< Reserved for future use. } NV_DISPLAY_DRIVER_INFO_V1; #define NV_DISPLAY_DRIVER_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_INFO_V1, 1) typedef NV_DISPLAY_DRIVER_INFO_V1 NV_DISPLAY_DRIVER_INFO; #define NV_DISPLAY_DRIVER_INFO_VER NV_DISPLAY_DRIVER_INFO_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_GetDisplayDriverInfo // //! DESCRIPTION: This API will return information related to the NVIDIA Display Driver. //! Note that out of the driver types - Studio, Game Ready, RTX Production Branch, RTX New Feature Branch - only one driver type can be available in system. //! If NVAPI is unable to get the information of particular driver type, we report all flags as 0 (Unknown). //! //! SUPPORTED OS: Windows 7 and higher //! //! //! \since Release: 396 //! //! \param [inout] pDriverInfo - This structure will be filled with required information. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetDisplayDriverInfo(__inout NV_DISPLAY_DRIVER_INFO *pDriverInfo); #define NVAPI_INVALID_TARGET_ID 0x0 typedef struct _NV_DISPLAY_TARGET_INFO_V1 { void* pOSAdapterId; //!< The adapter Identifier. User must allocate and send memory buffer of size atleast equal to the size of LUID structure before calling the NVAPI. NvU32 targetId; //!< The target Id of the display, this is similar as the target identifier 'id' returned in structure DISPLAYCONFIG_PATH_TARGET_INFO //!< when the OS function QueryDisplayConfig is called. //!< Note that if the targetId is returned as NVAPI_INVALID_TARGET_ID, it will mean that the information returned for this entire NV_DISPLAY_TARGET_INFO_V1 block is invalid. NvU32 outputTechnology; //!< This is the target's connector type. This is the same as the field outputTechnology available in //!< DISPLAYCONFIG_PATH_TARGET_INFO when the OS function QueryDisplayConfig is called. //!< Refer the OS enum DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY for the possible values. NvU32 bIsActive : 1 ; //!< Whether the display is currently active. NvU32 reserved : 31; //!< Reserved for future use. NvU8 reservedEx[8]; //!< Reserved for future use. } NV_DISPLAY_TARGET_INFO_V1; // This should return the OS visible connector information of the displays sharing the same physical displays typedef struct _NV_DDS_SHARED_DISPLAY_INFO_V1 { NV_DISPLAY_TARGET_INFO_V1 iGpuDisplay; //!< The details of the display available on Integrated GPU. //!< The details are not valid if the targetId field of this structure is NVAPI_INVALID_TARGET_ID. NV_DISPLAY_TARGET_INFO_V1 dGpuDisplay; //!< The details of the display available on Discrete GPU. //!< The details are not valid if the targetId field of this structure is NVAPI_INVALID_TARGET_ID. } NV_DDS_SHARED_DISPLAY_INFO_V1; typedef struct _NV_DDS_INFO_V1 { NvU32 version; //!< The version of the structure. NvU32 numValidEntries; //!< The number of valid entries in the field sharedDisplays below. NV_DDS_SHARED_DISPLAY_INFO_V1 sharedDisplays[NVAPI_MAX_DISPLAYS]; //!< This structure contains information about the displays which are sharing the //!< laptop details for DDS. The number of valid entries is mentioned in 'numValidEntries' field. NvU32 resreved[8]; //!< Reserved for future use. } NV_DDS_INFO_V1 ; #define NV_DDS_INFO_VER1 MAKE_NVAPI_VERSION(NV_DDS_INFO_V1, 1) typedef NV_DDS_INFO_V1 NV_DDS_INFO; typedef NV_DDS_SHARED_DISPLAY_INFO_V1 NV_DDS_SHARED_DISPLAY_INFO; #define NV_DDS_INFO_VER NV_DDS_INFO_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_GetDDSInfo // //! DESCRIPTION: This API will report back the Integrated and Discrete GPU display details which are sharing //! the laptop internal display for DDS enabled platforms. On platforms not supporting DDS (Dynamic Display Support), //! this API shall return NVAPI_NOT_SUPPORTED. It may be possible that the API only returns iGpuDisplay or dGpuDisplay details correctly. //! When the API returns success, check that the targetId available in NV_DISPLAY_TARGET_INFO_V1 is not NVAPI_INVALID_TARGET_ID, then only //! the entire NV_DISPLAY_TARGET_INFO_V1 block and the details in it are valid. //! Note that for the field pOSAdapterId caller must send memory buffer of size atleast equal to the size of LUID structure //! before calling the NVAPI and must cast to LUID structure before using. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release: 440 //! //! \param [inout] pDDSInfo - This structure will be filled with required information. //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_GetDDSInfo(__inout NV_DDS_INFO *pDDSInfo); // Following enum has all possible types of data that can be send to the API NvAPI_SYS_UIControl typedef enum _NV_UI_CONTROL_DATA_TYPE { NV_UI_CONTROL_DATA_TYPE_INVALID = 0, NV_UI_CONTROL_DATA_TYPE_MUX_TRAY_DATA = 1, //!< If this value is used, make sure to pass buffer of size >= sizeof(NV_MUX_UI_TRAY_DATA_V1) //!< in the field NV_MUX_UI_CONTROL_PARAMS :: controlData. //!< Also, specify correct version in NV_MUX_UI_TRAY_DATA :: version field. NV_UI_CONTROL_DATA_TYPE_MAX = 0xFFFF } NV_UI_CONTROL_DATA_TYPE; // ---------------------------------------------NV_MUX_UI_TRAY_DATA------------------------------------------------------------------------ typedef enum _NV_MUX_UI_TRAY_STATE { NV_MUX_UI_TRAY_STATE_OPEN = 0, NV_MUX_UI_TRAY_STATE_CLOSE } NV_MUX_UI_TRAY_STATE; typedef enum _NV_MUX_UI_TRAY_CMD { NV_MUX_UI_TRAY_CMD_INVALID = 0, //!< Invalid command NV_MUX_UI_TRAY_CMD_SET = 1, //!< User sends this command to open/close the MUX UI tray } NV_MUX_UI_TRAY_CMD; typedef struct _NV_UI_TRAY_DATA_V1 { NvU32 version; //!< [in] Version of the structure. Must be the first field. NV_MUX_UI_TRAY_STATE trayState; //!< [inout] This variable can work as input or output. NV_MUX_UI_TRAY_CMD cmd; //!< [in] One of the values of the enum NV_MUX_UI_TRAY_CMD. //!< If the command is NV_MUX_UI_TRAY_CMD_SET, the MUX UI tray will be opened or closed //!< based on the value specified in the field 'trayState'. NvU32 reserved[8]; //!< Reserved for future in order to avoid versioning } NV_MUX_UI_TRAY_DATA_V1; #define NV_MUX_UI_TRAY_DATA_VER1 MAKE_NVAPI_VERSION(NV_MUX_UI_TRAY_DATA_V1, 1) #define NV_MUX_UI_TRAY_DATA_VER NV_MUX_UI_TRAY_DATA_VER1 typedef NV_MUX_UI_TRAY_DATA_V1 NV_MUX_UI_TRAY_DATA; // ----------------------------------------------------------------------------------------------------------------------------------- typedef struct _NV_UI_CONTROL_PARAMS_V1 { NvU32 version; //!< [in] Structure version. void* controlData; //!< [inout] User needs to allocate a buffer of sufficient size while calling the API. NvU32 dataSize; //!< [in] Actual size of the data send in the controlData buffer. NV_UI_CONTROL_DATA_TYPE dataType; //!< [in] Type of the data send in controlData buffer. //!< User needs to pass one of the values from the enum NV_DATA_TYPE NvU32 reserved[8]; //!< Reserved for future in order to avoid versioning. } NV_UI_CONTROL_PARAMS_V1; #define NV_UI_CONTROL_PARAMS_VER1 MAKE_NVAPI_VERSION(NV_UI_CONTROL_PARAMS_V1, 1) typedef NV_UI_CONTROL_PARAMS_V1 NV_UI_CONTROL_PARAMS; #define NV_UI_CONTROL_PARAMS_VER NV_UI_CONTROL_PARAMS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_UIControl // //! DESCRIPTION: This API is used for UI control. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release: 460 //! //! \param [inout] controlParams - Pointer to NV_UI_CONTROL_PARAMS structure; //! //! \return This API can return any of the error codes enumerated in //! #NvAPI_Status. If there are return error codes with specific //! meaning for this API, they are listed below. //! //! NVAPI_NOT_SUPPORTED - The API is not supported on this platform. //! //! \ingroup gpu /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_UIControl(__inout NV_UI_CONTROL_PARAMS *controlParams); // ----------------------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_PCF_DynamicBoostGetStatus // //! \fn NvAPI_PCF_DynamicBoostGetStatus(__out NvU8* pIsEnabled) //! \code //! DESCRIPTION: Get dynamic boost user enable or disable status from SW //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 465 //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \endcode //! \ingroup dynamicboost /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_PCF_DynamicBoostGetStatus(__out NvU8* pIsEnabled); /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_PCF_DynamicBoostSetStatus // //! \fn NvAPI_PCF_DynamicBoostSetStatus(__in NvU8 bEnable) //! \code //! DESCRIPTION: Set dynamic boost enable/disable status from user //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 465 //! //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with //! specific meaning for this API, they are listed below. //! //! \endcode //! \ingroup dynamicboost /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_PCF_DynamicBoostSetStatus(__in NvU8 bEnable); /*! * Callback settings common to all client callbacks. */ typedef struct _NV_CLIENT_CALLBACK_SETTINGS_SUPER_V1 { /*! * [in] Generic callback parameter which will be passed to the callback. */ void* pCallbackParam; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_CLIENT_CALLBACK_SETTINGS_SUPER_V1; typedef NV_CLIENT_CALLBACK_SETTINGS_SUPER_V1 NV_GPU_CLIENT_CALLBACK_SETTINGS_SUPER_V1; /*! * Callback settings common to all periodic client callbacks. */ typedef struct _NV_GPU_CLIENT_PERIODIC_CALLBACK_SETTINGS_SUPER_V1 { /*! * [in] Super class data. */ NV_GPU_CLIENT_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Minimum interval at which callback will be called. * * The callback may be invoked slower than this interval if underlying * sampling rate does not align precisely to the provided period. */ NvU32 callbackPeriodms; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_PERIODIC_CALLBACK_SETTINGS_SUPER_V1; /*! * Callback data common to all client callbacks. */ typedef struct _NV_GPU_CLIENT_CALLBACK_DATA_SUPER_V1 { /*! * [out] Generic callback parameter which was passed in at registration time. */ void* pCallbackParam; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_CALLBACK_DATA_SUPER_V1; /*! * Data specific to a single clock. */ typedef struct _NV_GPU_CLIENT_CLOCK_DATA_V1 { /*! * [out] Clock identifier. */ NV_GPU_PUBLIC_CLOCK_ID clockId; /*! * [out] Current frequency of the clock in kHz. */ NvU32 freqkHz; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_CLOCK_DATA_V1; /*! * Data passed back to callback registered with * @ref NvAPI_GPU_ClientRegisterForClockSampleUpdates. */ typedef struct _NV_GPU_CLIENT_CALLBACK_CLOCK_DATA_V1 { /*! * [out] Super struct. */ NV_GPU_CLIENT_CALLBACK_DATA_SUPER_V1 super; /*! * [out] Number of valid entries in `clocks` array. */ NvU32 numClocks; /*! * [out] Time at which data was collected. Represented as elapsed * microseconds since 00:00:00 UTC on January 1, 1970. */ NvU64 timestamp; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; /*! * [out] Status data for each clock. */ NV_GPU_CLIENT_CLOCK_DATA_V1 clocks[NVAPI_MAX_GPU_PUBLIC_CLOCKS]; } NV_GPU_CLIENT_CALLBACK_CLOCK_DATA_V1; /*! * Function prototype for a periodic clock data callback that will be registered with NvAPI. */ typedef void (__cdecl *NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_V1)(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_CALLBACK_CLOCK_DATA_V1* pData); /*! * Data required to register a periodic callback for clock data. */ typedef struct _NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback settings. Some data within will be passed to the * callback when invoked. */ NV_GPU_CLIENT_PERIODIC_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_V1 callback; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_SETTINGS_V1; #define NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_SETTINGS_V1 NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_SETTINGS; #define NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_SETTINGS_VER NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRegisterForClockSampleUpdates // //! \fn NvAPI_GPU_ClientRegisterForClockSampleUpdates() //! \code //! DESCRIPTION: Register to receive samples of clock data periodically via //! a function pointer callback. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRegisterForClockSampleUpdates(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_CLOCK_PERIODIC_CALLBACK_SETTINGS* pCallbackSettings); /*! * Data specific to a single voltage rail. */ typedef struct _NV_GPU_CLIENT_VOLTAGE_DATA_V1 { /*! * [out] Voltage rail identifier. */ NV_GPU_CLIENT_VOLT_DOMAIN_ID railId; /*! * [out] Current voltage of the voltage rail in uV. */ NvU32 voltageuV; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_VOLTAGE_DATA_V1; /*! * Data passed back to callback registered with * @ref NvAPI_GPU_ClientRegisterForVoltageSampleUpdates. */ typedef struct _NV_GPU_CLIENT_CALLBACK_VOLTAGE_DATA_V1 { /*! * [out] Super struct. */ NV_GPU_CLIENT_CALLBACK_DATA_SUPER_V1 super; /*! * [out] Number of valid entries in `rails` array. */ NvU32 numRails; /*! * [out] Time at which data was collected. Represented as elapsed * microseconds since 00:00:00 UTC on January 1, 1970. */ NvU64 timestamp; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; /*! * [out] Status data for each voltage rail. */ NV_GPU_CLIENT_VOLTAGE_DATA_V1 rails[NV_GPU_CLIENT_VOLT_DOMAIN_MAX_ENTRIES]; } NV_GPU_CLIENT_CALLBACK_VOLTAGE_DATA_V1; /*! * Function prototype for a periodic voltage data callback that will be registered with NvAPI. */ typedef void (__cdecl *NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_V1)(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_CALLBACK_VOLTAGE_DATA_V1* pData); /*! * Data required to register a periodic callback for voltage data. */ typedef struct _NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback settings. Some data within will be passed to the * callback when invoked. */ NV_GPU_CLIENT_PERIODIC_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_V1 callback; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_SETTINGS_V1; #define NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_SETTINGS_V1 NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_SETTINGS; #define NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_SETTINGS_VER NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRegisterForVoltageSampleUpdates // //! \fn NvAPI_GPU_ClientRegisterForVoltageSampleUpdates() //! \code //! DESCRIPTION: Register to receive samples of voltage data periodically via //! a function pointer callback. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRegisterForVoltageSampleUpdates(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_VOLTAGE_PERIODIC_CALLBACK_SETTINGS* pCallbackSettings); /*! * Enumeration of different utilization domains */ typedef enum _NV_GPU_CLIENT_UTIL_DOMAIN_ID { NV_GPU_CLIENT_UTIL_DOMAIN_GRAPHICS = 0, NV_GPU_CLIENT_UTIL_DOMAIN_FRAME_BUFFER = 1, NV_GPU_CLIENT_UTIL_DOMAIN_VIDEO = 2, /*! * Reserved for future use. */ NV_GPU_CLIENT_UTIL_DOMAIN_RSVD = 3, } NV_GPU_CLIENT_UTIL_DOMAIN_ID; #define NV_GPU_CLIENT_UTIL_DOMAINS_MAX_V1 (4) /*! * Data specific to a single utilization domain. */ typedef struct _NV_GPU_CLIENT_UTILIZATION_DATA_V1 { /*! * [out] Utilization domain identifier. */ NV_GPU_CLIENT_UTIL_DOMAIN_ID utilId; /*! * [out] Percentage of time where the domain is considered busy since the * last sample. Units of percent*100; i.e. 5000 = 50%. */ NvU32 utilizationPercent; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[61]; } NV_GPU_CLIENT_UTILIZATION_DATA_V1; /*! * Data passed back to callback registered with * @ref NvAPI_GPU_ClientRegisterForUtilizationSampleUpdates. */ typedef struct _NV_GPU_CLIENT_CALLBACK_UTILIZATION_DATA_V1 { /*! * [out] Super struct. */ NV_GPU_CLIENT_CALLBACK_DATA_SUPER_V1 super; /*! * [out] Number of valid entries in `utils` array. */ NvU32 numUtils; /*! * [out] Time at which data was collected. Represented as elapsed * microseconds since 00:00:00 UTC on January 1, 1970. */ NvU64 timestamp; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; /*! * [out] Status data for each utilization domain. */ NV_GPU_CLIENT_UTILIZATION_DATA_V1 utils[NV_GPU_CLIENT_UTIL_DOMAINS_MAX_V1]; } NV_GPU_CLIENT_CALLBACK_UTILIZATION_DATA_V1; /*! * Function prototype for a periodic utilization data callback that will be registered with NvAPI. */ typedef void (__cdecl *NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_V1)(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_CALLBACK_UTILIZATION_DATA_V1* pData); /*! * Data required to register a periodic callback for utilization data. */ typedef struct _NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback settings. Some data within will be passed to the * callback when invoked. */ NV_GPU_CLIENT_PERIODIC_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_V1 callback; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_SETTINGS_V1; #define NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_SETTINGS_V1 NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_SETTINGS; #define NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_SETTINGS_VER NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRegisterForUtilizationSampleUpdates // //! \fn NvAPI_GPU_ClientRegisterForUtilizationSampleUpdates() //! \code //! DESCRIPTION: Register to receive samples of utilization data periodically //! via a function pointer callback. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRegisterForUtilizationSampleUpdates(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_UTILIZATION_PERIODIC_CALLBACK_SETTINGS* pCallbackSettings); /*! * Enumeration of different thermal domains. */ typedef enum _NV_GPU_CLIENT_THERMAL_DOMAIN_ID { NV_GPU_CLIENT_THERMAL_DOMAIN_GPU = 0, NV_GPU_CLIENT_THERMAL_DOMAIN_MEMORY = 1, NV_GPU_CLIENT_THERMAL_DOMAIN_POWER_SUPPLY = 2, NV_GPU_CLIENT_THERMAL_DOMAIN_BOARD = 3, } NV_GPU_CLIENT_THERMAL_DOMAIN_ID; #define NV_GPU_CLIENT_THERMAL_DOMAINS_MAX_V1 (4) /*! * Data specific to a single thermal domain. */ typedef struct _NV_GPU_CLIENT_THERMAL_DATA_V1 { /*! * [out] Thermal domain identifier. */ NV_GPU_CLIENT_THERMAL_DOMAIN_ID thermalId; /*! * [out] Temperature of thermal domain in degrees celsius */ NvS32 temperature; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_THERMAL_DATA_V1; /*! * Data passed back to callback registered with * @ref NvAPI_GPU_ClientRegisterForThermalSampleUpdates. */ typedef struct _NV_GPU_CLIENT_CALLBACK_THERMAL_DATA_V1 { /*! * [out] Super struct. */ NV_GPU_CLIENT_CALLBACK_DATA_SUPER_V1 super; /*! * [out] Number of valid entries in `thermals` array. */ NvU32 numThermals; /*! * [out] Time at which data was collected. Represented as elapsed * microseconds since 00:00:00 UTC on January 1, 1970. */ NvU64 timestamp; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; /*! * [out] Status data for each thermal domain. */ NV_GPU_CLIENT_THERMAL_DATA_V1 thermals[NV_GPU_CLIENT_THERMAL_DOMAINS_MAX_V1]; } NV_GPU_CLIENT_CALLBACK_THERMAL_DATA_V1; /*! * Function prototype for a periodic thermal data callback that will be registered with NvAPI. */ typedef void (__cdecl *NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_V1)(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_CALLBACK_THERMAL_DATA_V1* pData); /*! * Data required to register a periodic callback for thermal data. */ typedef struct _NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback settings. Some data within will be passed to the * callback when invoked. */ NV_GPU_CLIENT_PERIODIC_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_V1 callback; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_SETTINGS_V1; #define NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_SETTINGS_V1 NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_SETTINGS; #define NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_SETTINGS_VER NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRegisterForThermalSampleUpdates // //! \fn NvAPI_GPU_ClientRegisterForThermalSampleUpdates() //! \code //! DESCRIPTION: Register to receive samples of thermal data periodically via //! function pointer callback. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRegisterForThermalSampleUpdates(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_THERMAL_PERIODIC_CALLBACK_SETTINGS* pCallbackSettings); /*! * Data specific to a single GPU fan cooler domain. */ typedef struct _NV_GPU_CLIENT_FAN_COOLER_DATA_V1 { /*! * [out] Fan cooler identifier. */ NV_GPU_CLIENT_FAN_COOLERS_COOLER_ID coolerId; /*! * [out] Current RPM of the fan cooler. If tach is not supported for the * given cooler, this value is reported as zero. See @ref * NvAPI_GPU_ClientFanCoolersGetInfo for more info on cooler feature * support. */ NvU32 rpm; /*! * [out] Current target fan level. Represented as a percentage [0-100]. */ NvU32 level; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_FAN_COOLER_DATA_V1; /*! * Data passed back to callback registered with * @ref NvAPI_GPU_ClientRegisterForFanCoolerSampleUpdates. */ typedef struct _NV_GPU_CLIENT_CALLBACK_FAN_COOLER_DATA_V1 { /*! * [out] Super struct. */ NV_GPU_CLIENT_CALLBACK_DATA_SUPER_V1 super; /*! * [out] Number of valid entries in `fanCoolers` array. */ NvU32 numFanCoolers; /*! * [out] Time at which data was collected. Represented as elapsed * microseconds since 00:00:00 UTC on January 1, 1970. */ NvU64 timestamp; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; /*! * [out] Status data for each GPU fan cooler domain. */ NV_GPU_CLIENT_FAN_COOLER_DATA_V1 fanCoolers[NV_GPU_CLIENT_FAN_COOLERS_NUM_COOLERS_MAX]; } NV_GPU_CLIENT_CALLBACK_FAN_COOLER_DATA_V1; /*! * Function prototype for a periodic GPU fan cooler data callback that will be registered with NvAPI. */ typedef void (__cdecl *NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_V1)(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_CALLBACK_FAN_COOLER_DATA_V1* pData); /*! * Data required to register a periodic callback for GPU fan cooler data. */ typedef struct _NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback settings. Some data within will be passed to the * callback when invoked. */ NV_GPU_CLIENT_PERIODIC_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_V1 callback; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_SETTINGS_V1; #define NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_SETTINGS_V1 NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_SETTINGS; #define NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_SETTINGS_VER NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRegisterForFanCoolerSampleUpdates // //! \fn NvAPI_GPU_ClientRegisterForFanCoolerSampleUpdates() //! \code //! DESCRIPTION: Register to receive samples of GPU fan cooler data periodically //! via function pointer callback. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRegisterForFanCoolerSampleUpdates(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_FAN_COOLER_PERIODIC_CALLBACK_SETTINGS* pCallbackSettings); /*! * Per perf-point data. */ typedef struct _NV_GPU_CLIENT_PERF_POLICY_PERF_POINT_DATA_V1 { /*! * [out] Perf point identifier. */ NV_GPU_PERF_POINT_ID perfPointId; /*! * [out] Amount of time, in nanoseconds, that this perf point has been * violated since the last sample. * * That is, if the last sample was 1 second ago, and this field reports * 0.5 seconds, then the perf point was violated for 50% of that time since * the last sample. */ NvU64 violationTimeNs; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_PERF_POLICY_PERF_POINT_DATA_V1; /*! * Per perf-policy data. */ typedef struct _NV_GPU_CLIENT_PERF_POLICY_DATA_V1 { /*! * [out] Perf policy identifier. Not applicable to "global" policy in * @ref NV_GPU_CLIENT_CALLBACK_PERF_POLICY_DATA_V1. */ NV_GPU_PERF_POLICY_ID_SW perfPolicyId; /*! * [out] Number of valid entries in `perfPoints` array. */ NvU32 numPerfPoints; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; /*! * [out] Data for all perf points in this policy. */ NV_GPU_CLIENT_PERF_POLICY_PERF_POINT_DATA_V1 perfPoints[NV_GPU_PERF_POINT_ID_NUM_V1]; } NV_GPU_CLIENT_PERF_POLICY_DATA_V1; /*! * Data passed back to callback registered with * @ref NvAPI_GPU_ClientRegisterForPerfPolicySampleUpdates. */ typedef struct _NV_GPU_CLIENT_CALLBACK_PERF_POLICY_DATA_V1 { /*! * [out] Super struct. */ NV_GPU_CLIENT_CALLBACK_DATA_SUPER_V1 super; /*! * [out] Number of valid entries in `policies` array. */ NvU32 numPolicies; /*! * [out] Time at which data was collected. Represented as elapsed * microseconds since 00:00:00 UTC on January 1, 1970. */ NvU64 timestamp; /*! * [out] Mask of current limiting SW perf policies. * * Set bits represent enumerations from @ref NV_GPU_PERF_POLICY_ID_SW. */ NvU32 limitingPoliciesMask; /*! * [out] Global policy representing an aggregation of perf point violations * across all other policies. ::perfPolicyId retains no meaning in this * structure. */ NV_GPU_CLIENT_PERF_POLICY_DATA_V1 global; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; /*! * [out] Status data for each pef policy. */ NV_GPU_CLIENT_PERF_POLICY_DATA_V1 policies[NV_GPU_PERF_POLICY_ID_SW_NUM_V1]; } NV_GPU_CLIENT_CALLBACK_PERF_POLICY_DATA_V1; /*! * Function prototype for a periodic perf policy data callback that will be registered with NvAPI. */ typedef void (__cdecl *NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_V1)(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_CALLBACK_PERF_POLICY_DATA_V1* pData); /*! * Data required to register a periodic callback for perf policy data. */ typedef struct _NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback settings. Some data within will be passed to the * callback when invoked. */ NV_GPU_CLIENT_PERIODIC_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_V1 callback; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_SETTINGS_V1; #define NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_SETTINGS_V1 NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_SETTINGS; #define NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_SETTINGS_VER NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRegisterForPerfPolicySampleUpdates // //! \fn NvAPI_GPU_ClientRegisterForPerfPolicySampleUpdates() //! \code //! DESCRIPTION: Register to receive samples of perf policy data periodically //! via function pointer callback. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRegisterForPerfPolicySampleUpdates(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_PERF_POLICY_PERIODIC_CALLBACK_SETTINGS* pCallbackSettings); /*! * Data passed back to callback registered with * @ref NvAPI_GPU_ClientRegisterForPowerSampleUpdates. */ typedef struct _NV_GPU_CLIENT_CALLBACK_POWER_DATA_V1 { /*! * [out] Super struct. */ NV_GPU_CLIENT_CALLBACK_DATA_SUPER_V1 super; /*! * [out] Time at which data was collected. Represented as elapsed * microseconds since 00:00:00 UTC on January 1, 1970. */ NvU64 timestamp; /*! * [out] Average measured total gpu power since the last sample in * milliwatts. A minimum 100ms moving average is applied in the case that a * sampling period of less than 100ms is chosen. */ NvU32 totalGpuPowermw; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_CALLBACK_POWER_DATA_V1; /*! * Function prototype for a periodic power data callback that will be registered with NvAPI. */ typedef void (__cdecl *NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_V1)(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_CALLBACK_POWER_DATA_V1* pData); /*! * Data required to register a periodic callback for power data. */ typedef struct _NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback settings. Some data within will be passed to the * callback when invoked. */ NV_GPU_CLIENT_PERIODIC_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_V1 callback; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_SETTINGS_V1; #define NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_SETTINGS_V1 NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_SETTINGS; #define NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_SETTINGS_VER NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRegisterForPowerSampleUpdates // //! \fn NvAPI_GPU_ClientRegisterForPowerSampleUpdates() //! \code //! DESCRIPTION: Register to receive samples of power data periodically //! via function pointer callback. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRegisterForPowerSampleUpdates(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_POWER_PERIODIC_CALLBACK_SETTINGS* pCallbackSettings); /*! * Contains settings to start an overclock scan in manual mode. */ typedef struct _NV_GPU_CLIENT_START_OC_SCANNER_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_START_OC_SCANNER_SETTINGS_V1; #define NV_GPU_CLIENT_START_OC_SCANNER_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_START_OC_SCANNER_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_START_OC_SCANNER_SETTINGS_V1 NV_GPU_CLIENT_START_OC_SCANNER_SETTINGS; #define NV_GPU_CLIENT_START_OC_SCANNER_SETTINGS_VER NV_GPU_CLIENT_START_OC_SCANNER_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientStartOcScanner // //! \fn NvAPI_GPU_ClientStartOcScanner() //! \code //! DESCRIPTION: Start overclock scanner in manual mode on the given GPU. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Start was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientStartOcScanner(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_START_OC_SCANNER_SETTINGS* pSettings); /*! * Contains settings to stop an overclock scan in manual mode. */ typedef struct _NV_GPU_CLIENT_STOP_OC_SCANNER_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_STOP_OC_SCANNER_SETTINGS_V1; #define NV_GPU_CLIENT_STOP_OC_SCANNER_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_STOP_OC_SCANNER_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_STOP_OC_SCANNER_SETTINGS_V1 NV_GPU_CLIENT_STOP_OC_SCANNER_SETTINGS; #define NV_GPU_CLIENT_STOP_OC_SCANNER_SETTINGS_VER NV_GPU_CLIENT_STOP_OC_SCANNER_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientStopOcScanner // //! \fn NvAPI_GPU_ClientStopOcScanner() //! \code //! DESCRIPTION: Stop overclock scanner from running a manual scan. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Stop was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientStopOcScanner(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_STOP_OC_SCANNER_SETTINGS* pSettings); /*! * Indicates possible data types contained in NV_GPU_CLIENT_OC_SCANNER_CALLBACK_DATA_UNION. */ typedef enum _NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_TYPE { NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_TYPE_PROGRESS_UPDATE = 0, NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_TYPE_COMPLETION_EVENT = 1, } NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_TYPE; /*! * Indicates completion status of the overclocking scan. Multiple * conditions may exist concurrently (bitmasked). */ typedef enum _NV_GPU_CLIENT_OC_SCANNER_STATUS { NV_GPU_CLIENT_OC_SCANNER_STATUS_SCAN_IN_PROGRESS = 0x0001, NV_GPU_CLIENT_OC_SCANNER_STATUS_NO_SCAN_IN_PROGRESS = 0x0002, NV_GPU_CLIENT_OC_SCANNER_STATUS_COMPLETED_SUCCESSFULLY = 0x0004, NV_GPU_CLIENT_OC_SCANNER_STATUS_CANCELLED = 0x0008, NV_GPU_CLIENT_OC_SCANNER_STATUS_INTERNAL_ERROR = 0x0010, NV_GPU_CLIENT_OC_SCANNER_STATUS_NO_RESULTS_AVAILABLE = 0x0020, NV_GPU_CLIENT_OC_SCANNER_STATUS_CANCELLED_USER_REQUESTED = 0x0040, NV_GPU_CLIENT_OC_SCANNER_STATUS_CANCELLED_GPU_BUSY = 0x0080, NV_GPU_CLIENT_OC_SCANNER_STATUS_CANCELLED_USER_INPUT_DETECTED = 0x0100, NV_GPU_CLIENT_OC_SCANNER_STATUS_CANCELLED_POWER_SWITCH_TO_DC = 0x0200, NV_GPU_CLIENT_OC_SCANNER_STATUS_CANCELLED_SERVICE_SUSPENDED = 0x0400, NV_GPU_CLIENT_OC_SCANNER_STATUS_CANCELLED_SERVICE_STOPPED = 0x0800, NV_GPU_CLIENT_OC_SCANNER_STATUS_CANCELLED_BACKGROUND_SCAN_DISABLED = 0x1000, NV_GPU_CLIENT_OC_SCANNER_STATUS_CANCELLED_CONFIGURATION_NOT_SUPPORTED = 0x2000, } NV_GPU_CLIENT_OC_SCANNER_STATUS; /*! * Contains completion data of an OC scanner scan. */ typedef struct _NV_GPU_CLIENT_OC_SCANNER_RESULTS { /*! * Indicates the completion status of the overclocking scan. */ NV_GPU_CLIENT_OC_SCANNER_STATUS scannerStatus; /*! * Time the scan completed represented as milliseconds since epoch. */ NvU64 completionTime; /*! * Memory OC offset determined by the OC scanner. */ NvU32 memoryOcOffsetMhz; /*! * Average graphics clock OC across all overclockable VF points. */ NvU32 averageGraphicsClockOffsetMhz; /*! * Dominating perf policy present at the end of the scan. */ NV_GPU_PERF_POLICY_ID_SW dominantPerfPolicy; /*! * Scan results (offsets). Only the scanned points will be * noted in the mask within this structure. */ NV_GPU_CLOCK_CLIENT_CLK_VF_POINTS_CONTROL_V2 offsets; /*! * Indicates whether the results are considered stable. */ NvBool bStable; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_OC_SCANNER_RESULTS; /*! * Contains progress data of an OC scanner scan. */ typedef struct _NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_PROGRESS_UPDATE { /*! * Percentage of scan complete (0-100%) */ NvU8 percentComplete; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_PROGRESS_UPDATE; /*! * Contains completion data of an OC scanner scan. */ typedef struct _NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_COMPLETION { /*! * The OC scanner results. */ NV_GPU_CLIENT_OC_SCANNER_RESULTS scannerResults; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_COMPLETION; /*! * Union encapsulating all possible OC scanner callback status events. */ typedef union _NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_UNION { /*! * OC Scanner progress update data. */ NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_PROGRESS_UPDATE progressUpdate; /*! * OC Scanner completion data. */ NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_COMPLETION completion; } NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_UNION; /*! * Data passed back to callback. */ typedef struct _NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_V1 { /*! * Super struct. */ NV_GPU_CLIENT_CALLBACK_SETTINGS_SUPER_V1 super; /*! * Indicates the type of the data. */ NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_TYPE type; /*! * OC scanner status update data. */ NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_UNION data; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_V1; /*! * Callback for OC scanner update callbacks. */ typedef void (__cdecl *NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_V1)(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_DATA_V1 *pData); /*! * Data required to register an update callback from the OC scanner. */ typedef struct _NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback parameter which will be passed to the callback. */ NV_GPU_CLIENT_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_V1 callback; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_SETTINGS_V1; #define NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_SETTINGS_V1 NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_SETTINGS; #define NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_SETTINGS_VER NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRegisterForOcScannerStatusUpdates // //! \fn NvAPI_GPU_ClientRegisterForOcScannerStatusUpdates() //! \code //! DESCRIPTION: Register callback for OC scanner updates. Callback invoked //! as scan progresses and completes. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRegisterForOcScannerStatusUpdates(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_OC_SCANNER_STATUS_CALLBACK_SETTINGS* pCallbackSettings); /*! * Contains settings to get the last OC scanner results. */ typedef struct _NV_GPU_CLIENT_GET_LAST_OC_SCANNER_RESULTS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_GET_LAST_OC_SCANNER_RESULTS_V1; #define NV_GPU_CLIENT_GET_LAST_OC_SCANNER_RESULTS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_GET_LAST_OC_SCANNER_RESULTS_V1, 1) typedef NV_GPU_CLIENT_GET_LAST_OC_SCANNER_RESULTS_V1 NV_GPU_CLIENT_GET_LAST_OC_SCANNER_RESULTS; #define NV_GPU_CLIENT_GET_LAST_OC_SCANNER_RESULTS_VER NV_GPU_CLIENT_GET_LAST_OC_SCANNER_RESULTS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientGetLastOcScannerResults // //! \fn NvAPI_GPU_ClientGetLastOcScannerResults() //! \code //! DESCRIPTION: Gets the last OC scanner results. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Results read successfully //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientGetLastOcScannerResults(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_GET_LAST_OC_SCANNER_RESULTS* pResults); /*! * Contains settings to revert all OC settings. */ typedef struct _NV_GPU_CLIENT_REVERT_OC_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_REVERT_OC_SETTINGS_V1; #define NV_GPU_CLIENT_REVERT_OC_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_REVERT_OC_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_REVERT_OC_SETTINGS_V1 NV_GPU_CLIENT_REVERT_OC_SETTINGS; #define NV_GPU_CLIENT_REVERT_OC_SETTINGS_VER NV_GPU_CLIENT_REVERT_OC_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRevertOc // //! \fn NvAPI_GPU_ClientRevertOc() //! \code //! DESCRIPTION: Reverts all overclocking settings for the given GPU. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Revert was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRevertOc(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_REVERT_OC_SETTINGS* pSettings); /* * Indicates invalid OC configuration values. */ #define NV_GPU_CLIENT_GRAPHICS_OC_INVALID_VALUE 0x7FFFFFFF #define NV_GPU_CLIENT_MEMORY_OC_INVALID_VALUE 0x7FFFFFFF #define NV_GPU_CLIENT_VOLTAGE_LIMIT_INVALID_VALUE 0xFF #define NV_GPU_CLIENT_THERMAL_LIMIT_INVALID_VALUE 0x7FFFFFFF #define NV_GPU_CLIENT_POWER_LIMIT_INVALID_VALUE 0xFFFFFFFF /*! * Enumeration of different persistent overclocking types. */ typedef enum _NV_GPU_CLIENT_OC_PERSISTENCE_TYPE { NV_GPU_CLIENT_OC_PERSISTENCE_NONE = 0, NV_GPU_CLIENT_OC_PERSISTENCE_MANUAL_OC = 1, NV_GPU_CLIENT_OC_PERSISTENCE_AUTOMATIC_OC = 2, } NV_GPU_CLIENT_OC_PERSISTENCE_TYPE; /*! * Contains overclocking configuration data. */ typedef struct _NV_GPU_CLIENT_OC_CONFIG_V1 { /*! * [out] Indicates whether manual OC is supported. */ NvBool bManualOcSupported; /*! * [out] Applied graphics overclock offset in kilohertz. */ NvS32 graphicsOcOffsetKhz; /*! * [out] Applied memory overclock offset in kilohertz. */ NvS32 memoryOcOffsetKhz; /*! * [out] Applied voltage limit percentage. */ NvU8 voltageLimitPercentage; /*! * [out] Applied thermal limit in celcius. */ NvS32 thermalLimitCelcius; /*! * [out] Applied power limit percentage. */ NvU32 powerLimitPercentage; /*! * [out] Indicates type of persistence currently maintained. */ NV_GPU_CLIENT_OC_PERSISTENCE_TYPE ocPersistanceType; /*! * [out] Indicates whether manual OC scanning is supported. */ NvBool bManualOcScannerSupported; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[10240]; } NV_GPU_CLIENT_OC_CONFIG_V1; /*! * Contains settings to retrieve OC configuration. */ typedef struct _NV_GPU_CLIENT_GET_OC_CONFIG_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [out] Overclocking configuration settings. */ NV_GPU_CLIENT_OC_CONFIG_V1 ocConfig; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_GET_OC_CONFIG_SETTINGS_V1; #define NV_GPU_CLIENT_GET_OC_CONFIG_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_GET_OC_CONFIG_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_GET_OC_CONFIG_SETTINGS_V1 NV_GPU_CLIENT_GET_OC_CONFIG_SETTINGS; #define NV_GPU_CLIENT_GET_OC_CONFIG_SETTINGS_VER NV_GPU_CLIENT_GET_OC_CONFIG_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientGetOcConfig // //! \fn NvAPI_GPU_ClientGetOcConfig() //! \code //! DESCRIPTION: Retrieves overclocking configuration settings. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Call was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientGetOcConfig(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_GET_OC_CONFIG_SETTINGS* pSettings); /*! * Data passed back to callback. */ typedef struct _NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_DATA_V1 { /*! * Super struct. */ NV_GPU_CLIENT_CALLBACK_SETTINGS_SUPER_V1 super; /*! * Current overclocking configuration. */ NV_GPU_CLIENT_OC_CONFIG_V1 ocConfig; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_DATA_V1; /*! * Callback for overclocking configuration changed callback. */ typedef void (__cdecl *NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_V1)(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_DATA_V1 *pData); /*! * Data required to register an update for overclocking config changes. */ typedef struct _NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback parameter which will be passed to the callback. */ NV_GPU_CLIENT_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_V1 callback; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[64]; } NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_SETTINGS_V1; #define NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_SETTINGS_V1, 1) typedef NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_SETTINGS_V1 NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_SETTINGS; #define NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_SETTINGS_VER NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_GPU_ClientRegisterForOcConfigChangedUpdates // //! \fn NvAPI_GPU_ClientRegisterForOcConfigChangedUpdates() //! \code //! DESCRIPTION: Register callback for overclocking configuration //! change updates. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_GPU_ClientRegisterForOcConfigChangedUpdates(__in NvPhysicalGpuHandle hPhysicalGpu, __in NV_GPU_CLIENT_OC_CONFIG_CHANGED_CALLBACK_SETTINGS* pCallbackSettings); /*! * Macro representing the maximum count of JPAC control settings. */ #define NV_SYS_CLIENT_JPAC_CONTROL_SETTING_MAX_V1 32 /*! * Enumeration of NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID. */ typedef enum { NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_SPL_ENABLE = 0x0, // Sound pressure level enable/disable NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_SPL_LIMIT = 0x1, // Sound pressure level limit NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_MIN_FPS = 0x2, // Base FPS for WhisperMode 2.0 NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_JPP_ENABLE = 0x3, // Joint processor power enable/disable NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_JPP_LIMIT = 0x4, // Joint processor power limit NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_SPL_ENABLE_PLATFORM = 0x5, // Sound pressure level enable/disable from platform (read-only) NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_JPP_MIN_FPS = 0x6, // Base FPS for BatteryBoost 2.0 NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_DBDC_TPP_MW = 0x7, // Total processor power target (mW) for Dynamic Boost for DC (read-only) NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_BB2_TPP_MW = 0x8, // Total processor power target (mW) for BatteryBoost 2.0 (read-only) NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID_UNKNOWN = 0xFFFFFFFF, // Must always be last. } NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID, *PNV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID; /* * Structure describing JPAC control settings. */ typedef struct { /*! * Structure version. Must always be first element in structure. */ NvU32 version; /*! * Number of settings. */ NvU32 numSettings; /*! * Reserved space such that new elements can be added to the structure * without need to create a new version. */ NvU8 rsvd[64]; /*! * Array of settings. */ struct { /*! * Setting ID. */ NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID id; /*! * ID-specific setting value. */ union { NvBool splEnable; NvU32 splLimit; NvU32 minFps; NvBool jppEnable; NvU32 jppLimit; NvU32 jppMinFps; NvU8 rsvd[32]; } data; } setting[NV_SYS_CLIENT_JPAC_CONTROL_SETTING_MAX_V1]; } NV_SYS_CLIENT_JPAC_CONTROL_V1, *PNV_SYS_CLIENT_JPAC_CONTROL_V1; #define NV_SYS_CLIENT_JPAC_CONTROL_VER1 MAKE_NVAPI_VERSION(NV_SYS_CLIENT_JPAC_CONTROL_V1, 1) typedef NV_SYS_CLIENT_JPAC_CONTROL_V1 NV_SYS_CLIENT_JPAC_CONTROL; #define NV_SYS_CLIENT_JPAC_CONTROL_VER NV_SYS_CLIENT_JPAC_CONTROL_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_ClientJpacSetControl // //! \fn NvAPI_SYS_ClientJpacSetControl() //! \code //! DESCRIPTION: This API applies JPAC control parameters. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Request timed out //! NVAPI_INVALID_ARGUMENT - One or more of the inputs is invalid //! NVAPI_INVALID_POINTER - pControl pointer is NULL //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_ClientJpacSetControl(__in NV_SYS_CLIENT_JPAC_CONTROL* pControl); /*! * Data passed back to callback. */ typedef struct _NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_DATA_V1 { /*! * Super struct. */ NV_CLIENT_CALLBACK_SETTINGS_SUPER_V1 super; /*! * Number of settings. */ NvU32 numSettings; /*! * Reserved space such that new elements can be added to the structure * without need to create a new version. */ NvU8 rsvd[64]; /*! * Array of settings. */ struct { /*! * Setting ID. */ NV_SYS_CLIENT_JPAC_CONTROL_SETTING_ID id; /*! * ID-specific setting value. */ union { NvBool splEnable; NvU32 splLimit; NvU32 minFps; NvBool jppEnable; NvU32 jppLimit; NvU32 jppMinFps; NvBool splEnablePlatform; NvU32 dbdcTppmW; NvU32 bb2TppmW; NvU8 rsvd[32]; } data; } setting[NV_SYS_CLIENT_JPAC_CONTROL_SETTING_MAX_V1]; } NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_DATA_V1; /*! * Callback for JPAC control update callbacks. */ typedef void (__cdecl *NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_V1)(NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_DATA_V1 *pData); /*! * Data required to register an update callback from the OC scanner. */ typedef struct _NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_SETTINGS_V1 { /*! * [in] Structure Version, must always be first. */ NvU32 version; /*! * [in] Generic callback parameter which will be passed to the callback. */ NV_CLIENT_CALLBACK_SETTINGS_SUPER_V1 super; /*! * [in] Callback. Pass in NULL or nullptr to indicate request to unregister. */ NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_V1 callback; /*! * [in] Set to true to allow function to work on systems without WhisperMode 2.0. */ NvBool bAllowWithoutWm2; /*! * Reserved bytes for future expansion. */ NvU8 rsvd[63]; } NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_SETTINGS_V1; #define NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_SETTINGS_VER1 MAKE_NVAPI_VERSION(NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_SETTINGS_V1, 1) typedef NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_SETTINGS_V1 NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_SETTINGS; #define NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_SETTINGS_VER NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_SETTINGS_VER1 /////////////////////////////////////////////////////////////////////////////// // // FUNCTION NAME: NvAPI_SYS_ClientRegisterForJpacControlUpdates // //! \fn NvAPI_SYS_ClientRegisterForJpacControlUpdates() //! \code //! DESCRIPTION: Register callback for JPAC control updates. Callback invoked //! whenever JPAC control settings change. //! //! SUPPORTED OS: Windows 10 and higher //! //! //! \since Release 455 //! //! \return NVAPI_OK - Registration was successful //! NVAPI_API_NOT_INITIALIZED - NVAPI not initialized //! NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid strcuture version specified //! NVAPI_INVALID_CONFIGURATION - Invalid software environment configuration //! NVAPI_TIMEOUT - Registration request timed out //! NVAPI_ERROR - Unknown underlying error //! //! \endcode //! \ingroup nvtopps /////////////////////////////////////////////////////////////////////////////// NVAPI_INTERFACE NvAPI_SYS_ClientRegisterForJpacControlUpdates(__in NV_SYS_CLIENT_JPAC_CONTROL_CALLBACK_SETTINGS* pCallbackSettings); #if (!defined(NVAPI_INTERNAL) && (((defined(WIN32) || defined(_WIN32)) && defined(_MSC_VER) && (_MSC_VER <= 1399)) || defined(NVAPI_DEPRECATED_OLD))) #pragma deprecated( NvAPI_SetView, NvAPI_SetViewEx, NvAPI_GetDisplayDriverVersion, NvAPI_GetDisplayDriverMemoryInfo, NvAPI_GetDriverMemoryInfo, NvAPI_GPU_GetAllOutputs, NvAPI_GPU_GetConnectedOutputs, NvAPI_GPU_GetConnectedSLIOutputs, NvAPI_GPU_GetConnectedOutputsWithLidState, NvAPI_GPU_GetConnectedSLIOutputsWithLidState, NvAPI_GPU_GetAGPAperture, NvAPI_GPU_GetCurrentAGPRate, NvAPI_GPU_GetQuadroStatus, NvAPI_GPU_QueryActiveApps, NvAPI_GPU_CudaEnumComputeCapableGpus, NvAPI_GPU_GetPstatesInfoEx, NvAPI_GetImageSharpeningInfo, NvAPI_SetImageSharpeningLevel, NvAPI_GetTVEncoderControls, NvAPI_SetTVEncoderControls, NvAPI_GetTiming, NvAPI_EnumCustomDisplay, NvAPI_TryCustomDisplay, NvAPI_RevertCustomDisplayTrial, NvAPI_DeleteCustomDisplay, NvAPI_SaveCustomDisplay, NvAPI_GetView, NvAPI_GetViewEx, NvAPI_SetHybridMode, NvAPI_GetHybridMode, NvAPI_Hybrid_QueryUnblockedNonMigratableApps, NvAPI_Hybrid_QueryBlockedMigratableApps, NvAPI_Hybrid_SetAppMigrationState, NvAPI_Hybrid_IsAppMigrationStateChangeable, NvAPI_DISP_SetHCloneTopology, NvAPI_DISP_GetHCloneTopology, NvAPI_DISP_ValidateHCloneTopology, NvAPI_D3D9_CreateVideoBegin, NvAPI_D3D9_CreateVideoEnd, NvAPI_D3D9_CreateVideo, NvAPI_D3D9_FreeVideo, NvAPI_D3D9_PresentVideo, NvAPI_D3D10_AliasPrimaryAsTexture, NvAPI_D3D10_SetPrimaryFlipChainCallbacks, NvAPI_D3D10_ProcessCallbacks, NvAPI_D3D10_GetRenderedCursorAsBitmap, NvAPI_D3D_TagFrameWithAnimationTime, NvAPI_D3D_GetSmoothAnimationTime, NvAPI_D3D_EnableSilk, NvAPI_D3D_DisableSilk, NvAPI_D3D1x_HintCreateLowLatencyDevice, NvAPI_D3D1x_GetLowLatencySupport, NvAPI_VIO_GetCapabilities, NvAPI_VIO_Open, NvAPI_VIO_Close, NvAPI_VIO_Status, NvAPI_VIO_SyncFormatDetect, NvAPI_VIO_GetConfig, NvAPI_VIO_SetConfig, NvAPI_VIO_SetCSC, NvAPI_VIO_GetCSC, NvAPI_VIO_SetGamma, NvAPI_VIO_GetGamma, NvAPI_VIO_SetSyncDelay, NvAPI_VIO_GetSyncDelay, NvAPI_VIO_GetPCIInfo, NvAPI_VIO_IsRunning, NvAPI_VIO_Start, NvAPI_VIO_Stop, NvAPI_VIO_IsFrameLockModeCompatible, NvAPI_VIO_EnumDevices, NvAPI_VIO_QueryTopology, NvAPI_VIO_EnumSignalFormats, NvAPI_VIO_EnumDataFormats, NvAPI_SecureAudio_GetSecureAudioAPIRevision, NvAPI_SecureAudio_CheckAPICompatibility, NvAPI_SecureAudio_GetCustomFormatGUID, NvAPI_SecureAudio_NegotiateDHExchange, NvAPI_SecureAudio_PollOOSDState ) #endif #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 #ifdef __cplusplus }; //extern "C" { #endif #pragma pack(pop) #endif // _NVAPI_H