diff --git a/3rd_party/Src/NVAPI/nvHLSLExtns.h b/3rd_party/Src/NVAPI/nvHLSLExtns.h deleted file mode 100644 index c8be106932..0000000000 --- a/3rd_party/Src/NVAPI/nvHLSLExtns.h +++ /dev/null @@ -1,436 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ - -////////////////////////// NVIDIA SHADER EXTENSIONS ///////////////// - -// this file is to be #included in the app HLSL shader code to make -// use of nvidia shader extensions - - -#include "nvHLSLExtnsInternal.h" - -//----------------------------------------------------------------------------// -//------------------------- Warp Shuffle Functions ---------------------------// -//----------------------------------------------------------------------------// - -// all functions have variants with width parameter which permits sub-division -// of the warp into segments - for example to exchange data between 4 groups of -// 8 lanes in a SIMD manner. If width is less than warpSize then each subsection -// of the warp behaves as a separate entity with a starting logical lane ID of 0. -// A thread may only exchange data with others in its own subsection. Width must -// have a value which is a power of 2 so that the warp can be subdivided equally; -// results are undefined if width is not a power of 2, or is a number greater -// than warpSize. - -// -// simple variant of SHFL instruction -// returns val from the specified lane -// optional width parameter must be a power of two and width <= 32 -// -int NvShfl(int val, uint srcLane, int width = NV_WARP_SIZE) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = val; // variable to be shuffled - g_NvidiaExt[index].src0u.y = srcLane; // source lane - g_NvidiaExt[index].src0u.z = __NvGetShflMaskFromWidth(width); - g_NvidiaExt[index].opcode = NV_EXTN_OP_SHFL; - - // result is returned as the return value of IncrementCounter on fake UAV slot - return g_NvidiaExt.IncrementCounter(); -} - -// -// Copy from a lane with lower ID relative to caller -// -int NvShflUp(int val, uint delta, int width = NV_WARP_SIZE) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = val; // variable to be shuffled - g_NvidiaExt[index].src0u.y = delta; // relative lane offset - g_NvidiaExt[index].src0u.z = (NV_WARP_SIZE - width) << 8; // minIndex = maxIndex for shfl_up (src2[4:0] is expected to be 0) - g_NvidiaExt[index].opcode = NV_EXTN_OP_SHFL_UP; - return g_NvidiaExt.IncrementCounter(); -} - -// -// Copy from a lane with higher ID relative to caller -// -int NvShflDown(int val, uint delta, int width = NV_WARP_SIZE) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = val; // variable to be shuffled - g_NvidiaExt[index].src0u.y = delta; // relative lane offset - g_NvidiaExt[index].src0u.z = __NvGetShflMaskFromWidth(width); - g_NvidiaExt[index].opcode = NV_EXTN_OP_SHFL_DOWN; - return g_NvidiaExt.IncrementCounter(); -} - -// -// Copy from a lane based on bitwise XOR of own lane ID -// -int NvShflXor(int val, uint laneMask, int width = NV_WARP_SIZE) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = val; // variable to be shuffled - g_NvidiaExt[index].src0u.y = laneMask; // laneMask to be XOR'ed with current laneId to get the source lane id - g_NvidiaExt[index].src0u.z = __NvGetShflMaskFromWidth(width); - g_NvidiaExt[index].opcode = NV_EXTN_OP_SHFL_XOR; - return g_NvidiaExt.IncrementCounter(); -} - - -//----------------------------------------------------------------------------// -//----------------------------- Warp Vote Functions---------------------------// -//----------------------------------------------------------------------------// - -// returns 0xFFFFFFFF if the predicate is true for any thread in the warp, returns 0 otherwise -uint NvAny(int predicate) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = predicate; - g_NvidiaExt[index].opcode = NV_EXTN_OP_VOTE_ANY; - return g_NvidiaExt.IncrementCounter(); -} - -// returns 0xFFFFFFFF if the predicate is true for ALL threads in the warp, returns 0 otherwise -uint NvAll(int predicate) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = predicate; - g_NvidiaExt[index].opcode = NV_EXTN_OP_VOTE_ALL; - return g_NvidiaExt.IncrementCounter(); -} - -// returns a mask of all threads in the warp with bits set for threads that have predicate true -uint NvBallot(int predicate) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = predicate; - g_NvidiaExt[index].opcode = NV_EXTN_OP_VOTE_BALLOT; - return g_NvidiaExt.IncrementCounter(); -} - - -//----------------------------------------------------------------------------// -//----------------------------- Utility Functions ----------------------------// -//----------------------------------------------------------------------------// - -// returns the lane index of the current thread (thread index in warp) -int NvGetLaneId() -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].opcode = NV_EXTN_OP_GET_LANE_ID; - return g_NvidiaExt.IncrementCounter(); -} - - -//----------------------------------------------------------------------------// -//----------------------------- FP16 Atmoic Functions-------------------------// -//----------------------------------------------------------------------------// - -// The functions below performs atomic operations on two consecutive fp16 -// values in the given raw UAV. -// The uint paramater 'fp16x2Val' is treated as two fp16 values byteAddress must be multiple of 4 -// The returned value are the two fp16 values packed into a single uint - -uint NvInterlockedAddFp16x2(RWByteAddressBuffer uav, uint byteAddress, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, byteAddress, fp16x2Val, NV_EXTN_ATOM_ADD); -} - -uint NvInterlockedMinFp16x2(RWByteAddressBuffer uav, uint byteAddress, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, byteAddress, fp16x2Val, NV_EXTN_ATOM_MIN); -} - -uint NvInterlockedMaxFp16x2(RWByteAddressBuffer uav, uint byteAddress, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, byteAddress, fp16x2Val, NV_EXTN_ATOM_MAX); -} - - -// versions of the above functions taking two fp32 values (internally converted to fp16 values) -uint NvInterlockedAddFp16x2(RWByteAddressBuffer uav, uint byteAddress, float2 val) -{ - return __NvAtomicOpFP16x2(uav, byteAddress, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_ADD); -} - -uint NvInterlockedMinFp16x2(RWByteAddressBuffer uav, uint byteAddress, float2 val) -{ - return __NvAtomicOpFP16x2(uav, byteAddress, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_MIN); -} - -uint NvInterlockedMaxFp16x2(RWByteAddressBuffer uav, uint byteAddress, float2 val) -{ - return __NvAtomicOpFP16x2(uav, byteAddress, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_MAX); -} - - -//----------------------------------------------------------------------------// - -// The functions below perform atomic operation on a R16G16_FLOAT UAV at the given address -// the uint paramater 'fp16x2Val' is treated as two fp16 values -// the returned value are the two fp16 values (.x and .y components) packed into a single uint -// Warning: Behaviour of these set of functions is undefined if the UAV is not -// of R16G16_FLOAT format (might result in app crash or TDR) - -uint NvInterlockedAddFp16x2(RWTexture1D uav, uint address, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_ADD); -} - -uint NvInterlockedMinFp16x2(RWTexture1D uav, uint address, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MIN); -} - -uint NvInterlockedMaxFp16x2(RWTexture1D uav, uint address, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MAX); -} - -uint NvInterlockedAddFp16x2(RWTexture2D uav, uint2 address, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_ADD); -} - -uint NvInterlockedMinFp16x2(RWTexture2D uav, uint2 address, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MIN); -} - -uint NvInterlockedMaxFp16x2(RWTexture2D uav, uint2 address, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MAX); -} - -uint NvInterlockedAddFp16x2(RWTexture3D uav, uint3 address, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_ADD); -} - -uint NvInterlockedMinFp16x2(RWTexture3D uav, uint3 address, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MIN); -} - -uint NvInterlockedMaxFp16x2(RWTexture3D uav, uint3 address, uint fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MAX); -} - - -// versions taking two fp32 values (internally converted to fp16) -uint NvInterlockedAddFp16x2(RWTexture1D uav, uint address, float2 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_ADD); -} - -uint NvInterlockedMinFp16x2(RWTexture1D uav, uint address, float2 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_MIN); -} - -uint NvInterlockedMaxFp16x2(RWTexture1D uav, uint address, float2 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_MAX); -} - -uint NvInterlockedAddFp16x2(RWTexture2D uav, uint2 address, float2 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_ADD); -} - -uint NvInterlockedMinFp16x2(RWTexture2D uav, uint2 address, float2 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_MIN); -} - -uint NvInterlockedMaxFp16x2(RWTexture2D uav, uint2 address, float2 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_MAX); -} - -uint NvInterlockedAddFp16x2(RWTexture3D uav, uint3 address, float2 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_ADD); -} - -uint NvInterlockedMinFp16x2(RWTexture3D uav, uint3 address, float2 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_MIN); -} - -uint NvInterlockedMaxFp16x2(RWTexture3D uav, uint3 address, float2 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x2Tofp16x2(val), NV_EXTN_ATOM_MAX); -} - - -//----------------------------------------------------------------------------// - -// The functions below perform Atomic operation on a R16G16B16A16_FLOAT UAV at the given address -// the uint2 paramater 'fp16x2Val' is treated as four fp16 values -// i.e, fp16x2Val.x = uav.xy and fp16x2Val.y = uav.yz -// The returned value are the four fp16 values (.xyzw components) packed into uint2 -// Warning: Behaviour of these set of functions is undefined if the UAV is not -// of R16G16B16A16_FLOAT format (might result in app crash or TDR) - -uint2 NvInterlockedAddFp16x4(RWTexture1D uav, uint address, uint2 fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_ADD); -} - -uint2 NvInterlockedMinFp16x4(RWTexture1D uav, uint address, uint2 fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MIN); -} - -uint2 NvInterlockedMaxFp16x4(RWTexture1D uav, uint address, uint2 fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MAX); -} - -uint2 NvInterlockedAddFp16x4(RWTexture2D uav, uint2 address, uint2 fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_ADD); -} - -uint2 NvInterlockedMinFp16x4(RWTexture2D uav, uint2 address, uint2 fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MIN); -} - -uint2 NvInterlockedMaxFp16x4(RWTexture2D uav, uint2 address, uint2 fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MAX); -} - -uint2 NvInterlockedAddFp16x4(RWTexture3D uav, uint3 address, uint2 fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_ADD); -} - -uint2 NvInterlockedMinFp16x4(RWTexture3D uav, uint3 address, uint2 fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MIN); -} - -uint2 NvInterlockedMaxFp16x4(RWTexture3D uav, uint3 address, uint2 fp16x2Val) -{ - return __NvAtomicOpFP16x2(uav, address, fp16x2Val, NV_EXTN_ATOM_MAX); -} - -// versions taking four fp32 values (internally converted to fp16) -uint2 NvInterlockedAddFp16x4(RWTexture1D uav, uint address, float4 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x4Tofp16x4(val), NV_EXTN_ATOM_ADD); -} - -uint2 NvInterlockedMinFp16x4(RWTexture1D uav, uint address, float4 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x4Tofp16x4(val), NV_EXTN_ATOM_MIN); -} - -uint2 NvInterlockedMaxFp16x4(RWTexture1D uav, uint address, float4 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x4Tofp16x4(val), NV_EXTN_ATOM_MAX); -} - -uint2 NvInterlockedAddFp16x4(RWTexture2D uav, uint2 address, float4 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x4Tofp16x4(val), NV_EXTN_ATOM_ADD); -} - -uint2 NvInterlockedMinFp16x4(RWTexture2D uav, uint2 address, float4 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x4Tofp16x4(val), NV_EXTN_ATOM_MIN); -} - -uint2 NvInterlockedMaxFp16x4(RWTexture2D uav, uint2 address, float4 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x4Tofp16x4(val), NV_EXTN_ATOM_MAX); -} - -uint2 NvInterlockedAddFp16x4(RWTexture3D uav, uint3 address, float4 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x4Tofp16x4(val), NV_EXTN_ATOM_ADD); -} - -uint2 NvInterlockedMinFp16x4(RWTexture3D uav, uint3 address, float4 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x4Tofp16x4(val), NV_EXTN_ATOM_MIN); -} - -uint2 NvInterlockedMaxFp16x4(RWTexture3D uav, uint3 address, float4 val) -{ - return __NvAtomicOpFP16x2(uav, address, __fp32x4Tofp16x4(val), NV_EXTN_ATOM_MAX); -} - - -//----------------------------------------------------------------------------// -//----------------------------- FP32 Atmoic Functions-------------------------// -//----------------------------------------------------------------------------// - -// The functions below performs atomic add on the given UAV treating the value as float -// byteAddress must be multiple of 4 -// The returned value is the value present in memory location before the atomic add - -float NvInterlockedAddFp32(RWByteAddressBuffer uav, uint byteAddress, float val) -{ - return __NvAtomicAddFP32(uav, byteAddress, val); -} - -//----------------------------------------------------------------------------// - -// The functions below perform atomic add on a R32_FLOAT UAV at the given address -// the returned value is the value before performing the atomic add -// Warning: Behaviour of these set of functions is undefined if the UAV is not -// of R32_FLOAT format (might result in app crash or TDR) - -float NvInterlockedAddFp32(RWTexture1D uav, uint address, float val) -{ - return __NvAtomicAddFP32(uav, address, val); -} - -float NvInterlockedAddFp32(RWTexture2D uav, uint2 address, float val) -{ - return __NvAtomicAddFP32(uav, address, val); -} - -float NvInterlockedAddFp32(RWTexture3D uav, uint3 address, float val) -{ - return __NvAtomicAddFP32(uav, address, val); -} - diff --git a/3rd_party/Src/NVAPI/nvHLSLExtnsInternal.h b/3rd_party/Src/NVAPI/nvHLSLExtnsInternal.h deleted file mode 100644 index b99de89e8d..0000000000 --- a/3rd_party/Src/NVAPI/nvHLSLExtnsInternal.h +++ /dev/null @@ -1,514 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ - -////////////////////////// NVIDIA SHADER EXTENSIONS ///////////////// -// internal functions -// Functions in this file are not expected to be called by apps directly - -#include "nvShaderExtnEnums.h" - -struct NvShaderExtnStruct -{ - uint opcode; // opcode - uint rid; // resource ID - uint sid; // sampler ID - - uint4 dst1u; // destination operand 1 (for instructions that need extra destination operands) - uint4 padding0[3]; // currently unused - - uint4 src0u; // uint source operand 0 - uint4 src1u; // uint source operand 0 - uint4 src2u; // uint source operand 0 - uint4 dst0u; // uint destination operand - - uint markUavRef; // the next store to UAV is fake and is used only to identify the uav slot - float padding1[28];// struct size: 256 bytes -}; - -// RW structured buffer for Nvidia shader extensions - -// Application needs to define NV_SHADER_EXTN_SLOT as a unused slot, which should be -// set using NvAPI_D3D11_SetNvShaderExtnSlot() call before creating the first shader that -// uses nvidia shader extensions. E.g before including this file in shader define it as: -// #define NV_SHADER_EXTN_SLOT u7 - -// For SM5.1, application needs to define NV_SHADER_EXTN_REGISTER_SPACE as register space -// E.g. before including this file in shader define it as: -// #define NV_SHADER_EXTN_REGISTER_SPACE space2 - -// Note that other operations to this UAV will be ignored so application -// should bind a null resource - -#ifdef NV_SHADER_EXTN_REGISTER_SPACE -RWStructuredBuffer g_NvidiaExt : register( NV_SHADER_EXTN_SLOT, NV_SHADER_EXTN_REGISTER_SPACE ); -#else -RWStructuredBuffer g_NvidiaExt : register( NV_SHADER_EXTN_SLOT ); -#endif - -//----------------------------------------------------------------------------// -// the exposed SHFL instructions accept a mask parameter in src2 -// To compute lane mask from width of segment: -// minLaneID : currentLaneId & src2[12:8] -// maxLaneID : minLaneId | (src2[4:0] & ~src2[12:8]) -// where [minLaneId, maxLaneId] defines the segment where currentLaneId belongs -// we always set src2[4:0] to 11111 (0x1F), and set src2[12:8] as (32 - width) -int __NvGetShflMaskFromWidth(uint width) -{ - return ((NV_WARP_SIZE - width) << 8) | 0x1F; -} - -//----------------------------------------------------------------------------// - -void __NvReferenceUAVForOp(RWByteAddressBuffer uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav.Store(index, 0); -} - -void __NvReferenceUAVForOp(RWTexture1D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[index] = float2(0,0); -} - -void __NvReferenceUAVForOp(RWTexture2D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint2(index,index)] = float2(0,0); -} - -void __NvReferenceUAVForOp(RWTexture3D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint3(index,index,index)] = float2(0,0); -} - -void __NvReferenceUAVForOp(RWTexture1D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[index] = float4(0,0,0,0); -} - -void __NvReferenceUAVForOp(RWTexture2D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint2(index,index)] = float4(0,0,0,0); -} - -void __NvReferenceUAVForOp(RWTexture3D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint3(index,index,index)] = float4(0,0,0,0); -} - -void __NvReferenceUAVForOp(RWTexture1D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[index] = 0.0f; -} - -void __NvReferenceUAVForOp(RWTexture2D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint2(index,index)] = 0.0f; -} - -void __NvReferenceUAVForOp(RWTexture3D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint3(index,index,index)] = 0.0f; -} - - -void __NvReferenceUAVForOp(RWTexture1D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[index] = uint2(0,0); -} - -void __NvReferenceUAVForOp(RWTexture2D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint2(index,index)] = uint2(0,0); -} - -void __NvReferenceUAVForOp(RWTexture3D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint3(index,index,index)] = uint2(0,0); -} - -void __NvReferenceUAVForOp(RWTexture1D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[index] = uint4(0,0,0,0); -} - -void __NvReferenceUAVForOp(RWTexture2D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint2(index,index)] = uint4(0,0,0,0); -} - -void __NvReferenceUAVForOp(RWTexture3D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint3(index,index,index)] = uint4(0,0,0,0); -} - -void __NvReferenceUAVForOp(RWTexture1D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[index] = 0; -} - -void __NvReferenceUAVForOp(RWTexture2D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint2(index,index)] = 0; -} - -void __NvReferenceUAVForOp(RWTexture3D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint3(index,index,index)] = 0; -} - -void __NvReferenceUAVForOp(RWTexture1D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[index] = int2(0,0); -} - -void __NvReferenceUAVForOp(RWTexture2D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint2(index,index)] = int2(0,0); -} - -void __NvReferenceUAVForOp(RWTexture3D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint3(index,index,index)] = int2(0,0); -} - -void __NvReferenceUAVForOp(RWTexture1D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[index] = int4(0,0,0,0); -} - -void __NvReferenceUAVForOp(RWTexture2D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint2(index,index)] = int4(0,0,0,0); -} - -void __NvReferenceUAVForOp(RWTexture3D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint3(index,index,index)] = int4(0,0,0,0); -} - -void __NvReferenceUAVForOp(RWTexture1D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[index] = 0; -} - -void __NvReferenceUAVForOp(RWTexture2D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint2(index,index)] = 0; -} - -void __NvReferenceUAVForOp(RWTexture3D uav) -{ - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].markUavRef = 1; - uav[uint3(index,index,index)] = 0; -} - -//----------------------------------------------------------------------------// -// ATOMIC op sub-opcodes -#define NV_EXTN_ATOM_ADD 3 -#define NV_EXTN_ATOM_MAX 6 -#define NV_EXTN_ATOM_MIN 7 - -//----------------------------------------------------------------------------// - -// performs Atomic operation on two consecutive fp16 values in the given UAV -// the uint paramater 'fp16x2Val' is treated as two fp16 values -// the passed sub-opcode 'op' should be an immediate constant -// byteAddress must be multiple of 4 -// the returned value are the two fp16 values packed into a single uint -uint __NvAtomicOpFP16x2(RWByteAddressBuffer uav, uint byteAddress, uint fp16x2Val, uint atomicOpType) -{ - __NvReferenceUAVForOp(uav); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = byteAddress; - g_NvidiaExt[index].src1u.x = fp16x2Val; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - - return g_NvidiaExt[index].dst0u.x; -} - -//----------------------------------------------------------------------------// - -// performs Atomic operation on a R16G16_FLOAT UAV at the given address -// the uint paramater 'fp16x2Val' is treated as two fp16 values -// the passed sub-opcode 'op' should be an immediate constant -// the returned value are the two fp16 values (.x and .y components) packed into a single uint -// Warning: Behaviour of these set of functions is undefined if the UAV is not -// of R16G16_FLOAT format (might result in app crash or TDR) - -uint __NvAtomicOpFP16x2(RWTexture1D uav, uint address, uint fp16x2Val, uint atomicOpType) -{ - __NvReferenceUAVForOp(uav); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = address; - g_NvidiaExt[index].src1u.x = fp16x2Val; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - - return g_NvidiaExt[index].dst0u.x; -} - -uint __NvAtomicOpFP16x2(RWTexture2D uav, uint2 address, uint fp16x2Val, uint atomicOpType) -{ - __NvReferenceUAVForOp(uav); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.xy = address; - g_NvidiaExt[index].src1u.x = fp16x2Val; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - - return g_NvidiaExt[index].dst0u.x; -} - -uint __NvAtomicOpFP16x2(RWTexture3D uav, uint3 address, uint fp16x2Val, uint atomicOpType) -{ - __NvReferenceUAVForOp(uav); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.xyz = address; - g_NvidiaExt[index].src1u.x = fp16x2Val; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - - return g_NvidiaExt[index].dst0u.x; -} - -//----------------------------------------------------------------------------// - -// performs Atomic operation on a R16G16B16A16_FLOAT UAV at the given address -// the uint2 paramater 'fp16x2Val' is treated as four fp16 values -// i.e, fp16x2Val.x = uav.xy and fp16x2Val.y = uav.yz -// the passed sub-opcode 'op' should be an immediate constant -// the returned value are the four fp16 values (.xyzw components) packed into uint2 -// Warning: Behaviour of these set of functions is undefined if the UAV is not -// of R16G16B16A16_FLOAT format (might result in app crash or TDR) - -uint2 __NvAtomicOpFP16x2(RWTexture1D uav, uint address, uint2 fp16x2Val, uint atomicOpType) -{ - __NvReferenceUAVForOp(uav); - - // break it down into two fp16x2 atomic ops - uint2 retVal; - - // first op has x-coordinate = x * 2 - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = address * 2; - g_NvidiaExt[index].src1u.x = fp16x2Val.x; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - retVal.x = g_NvidiaExt[index].dst0u.x; - - // second op has x-coordinate = x * 2 + 1 - index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = address * 2 + 1; - g_NvidiaExt[index].src1u.x = fp16x2Val.y; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - retVal.y = g_NvidiaExt[index].dst0u.x; - - return retVal; -} - -uint2 __NvAtomicOpFP16x2(RWTexture2D uav, uint2 address, uint2 fp16x2Val, uint atomicOpType) -{ - __NvReferenceUAVForOp(uav); - - // break it down into two fp16x2 atomic ops - uint2 retVal; - - // first op has x-coordinate = x * 2 - uint2 addressTemp = uint2(address.x * 2, address.y); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.xy = addressTemp; - g_NvidiaExt[index].src1u.x = fp16x2Val.x; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - retVal.x = g_NvidiaExt[index].dst0u.x; - - // second op has x-coordinate = x * 2 + 1 - addressTemp.x++; - index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.xy = addressTemp; - g_NvidiaExt[index].src1u.x = fp16x2Val.y; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - retVal.y = g_NvidiaExt[index].dst0u.x; - - return retVal; -} - -uint2 __NvAtomicOpFP16x2(RWTexture3D uav, uint3 address, uint2 fp16x2Val, uint atomicOpType) -{ - __NvReferenceUAVForOp(uav); - - // break it down into two fp16x2 atomic ops - uint2 retVal; - - // first op has x-coordinate = x * 2 - uint3 addressTemp = uint3(address.x * 2, address.y, address.z); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.xyz = addressTemp; - g_NvidiaExt[index].src1u.x = fp16x2Val.x; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - retVal.x = g_NvidiaExt[index].dst0u.x; - - // second op has x-coordinate = x * 2 + 1 - addressTemp.x++; - index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.xyz = addressTemp; - g_NvidiaExt[index].src1u.x = fp16x2Val.y; - g_NvidiaExt[index].src2u.x = atomicOpType; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP16_ATOMIC; - retVal.y = g_NvidiaExt[index].dst0u.x; - - return retVal; -} - -uint __fp32x2Tofp16x2(float2 val) -{ - return (f32tof16(val.y)<<16) | f32tof16(val.x) ; -} - -uint2 __fp32x4Tofp16x4(float4 val) -{ - return uint2( (f32tof16(val.y)<<16) | f32tof16(val.x), (f32tof16(val.w)<<16) | f32tof16(val.z) ) ; -} - -// FP32 Atomic functions - -// performs Atomic operation treating the uav as float (fp32) values -// the passed sub-opcode 'op' should be an immediate constant -// byteAddress must be multiple of 4 -float __NvAtomicAddFP32(RWByteAddressBuffer uav, uint byteAddress, float val) -{ - __NvReferenceUAVForOp(uav); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = byteAddress; - g_NvidiaExt[index].src1u.x = asuint(val); // passing as uint to make it more convinient for the driver to translate - g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_ADD; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP32_ATOMIC; - - return asfloat(g_NvidiaExt[index].dst0u.x); -} - -float __NvAtomicAddFP32(RWTexture1D uav, uint address, float val) -{ - __NvReferenceUAVForOp(uav); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.x = address; - g_NvidiaExt[index].src1u.x = asuint(val); - g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_ADD; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP32_ATOMIC; - - return asfloat(g_NvidiaExt[index].dst0u.x); -} - -float __NvAtomicAddFP32(RWTexture2D uav, uint2 address, float val) -{ - __NvReferenceUAVForOp(uav); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.xy = address; - g_NvidiaExt[index].src1u.x = asuint(val); - g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_ADD; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP32_ATOMIC; - - return asfloat(g_NvidiaExt[index].dst0u.x); -} - -float __NvAtomicAddFP32(RWTexture3D uav, uint3 address, float val) -{ - __NvReferenceUAVForOp(uav); - uint index = g_NvidiaExt.IncrementCounter(); - g_NvidiaExt[index].src0u.xyz = address; - g_NvidiaExt[index].src1u.x = asuint(val); - g_NvidiaExt[index].src2u.x = NV_EXTN_ATOM_ADD; - g_NvidiaExt[index].opcode = NV_EXTN_OP_FP32_ATOMIC; - - return asfloat(g_NvidiaExt[index].dst0u.x); -} - diff --git a/3rd_party/Src/NVAPI/nvShaderExtnEnums.h b/3rd_party/Src/NVAPI/nvShaderExtnEnums.h deleted file mode 100644 index 802c2383f8..0000000000 --- a/3rd_party/Src/NVAPI/nvShaderExtnEnums.h +++ /dev/null @@ -1,72 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ - -//////////////////////////////////////////////////////////////////////////////// -////////////////////////// NVIDIA SHADER EXTENSIONS //////////////////////////// -//////////////////////////////////////////////////////////////////////////////// - -// This file can be included both from HLSL shader code as well as C++ code. -// The app should call NvAPI_D3D_IsNvShaderExtnOpCodeSupported() to -// check for support for every nv shader extension opcode it plans to use - - - -//----------------------------------------------------------------------------// -//---------------------------- NV Shader Extn Version -----------------------// -//----------------------------------------------------------------------------// -#define NV_SHADER_EXTN_VERSION 1 - -//----------------------------------------------------------------------------// -//---------------------------- Misc constants --------------------------------// -//----------------------------------------------------------------------------// -#define NV_WARP_SIZE 32 - - -//----------------------------------------------------------------------------// -//---------------------------- opCode constants ------------------------------// -//----------------------------------------------------------------------------// - - -#define NV_EXTN_OP_SHFL 1 -#define NV_EXTN_OP_SHFL_UP 2 -#define NV_EXTN_OP_SHFL_DOWN 3 -#define NV_EXTN_OP_SHFL_XOR 4 - -#define NV_EXTN_OP_VOTE_ALL 5 -#define NV_EXTN_OP_VOTE_ANY 6 -#define NV_EXTN_OP_VOTE_BALLOT 7 - -#define NV_EXTN_OP_GET_LANE_ID 8 -#define NV_EXTN_OP_FP16_ATOMIC 12 -#define NV_EXTN_OP_FP32_ATOMIC 13 diff --git a/3rd_party/Src/NVAPI/nvapi.h b/3rd_party/Src/NVAPI/nvapi.h deleted file mode 100644 index 9545f1cfb3..0000000000 --- a/3rd_party/Src/NVAPI/nvapi.h +++ /dev/null @@ -1,12562 +0,0 @@ -#include"nvapi_lite_salstart.h" -#include"nvapi_lite_common.h" -#include"nvapi_lite_sli.h" -#include"nvapi_lite_surround.h" -#include"nvapi_lite_stereo.h" -#include"nvapi_lite_d3dext.h" - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ - - -/////////////////////////////////////////////////////////////////////////////// -// -// Date: May 9, 2016 -// File: nvapi.h -// -// NvAPI provides an interface to NVIDIA devices. This file contains the -// interface constants, structure definitions and function prototypes. -// -// Target Profile: 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 - - - -//! @} - -//! \ingroup nvapistatus -#define NVAPI_API_NOT_INTIALIZED NVAPI_API_NOT_INITIALIZED //!< Fix typo in error code - -//! \ingroup nvapistatus -#define NVAPI_INVALID_USER_PRIVILEDGE NVAPI_INVALID_USER_PRIVILEGE //!< 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. -//! -//! SUPPORTED OS: Windows XP and higher, Mac OS X -//! -//! -//! \since Release: 80 -//! -//! \retval NVAPI_ERROR An error occurred during the initialization process (generic error) -//! \retval NVAPI_LIBRARYNOTFOUND Failed to load the NVAPI support library -//! \retval NVAPI_OK Initialized -//! \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 XP and higher, Mac OS X -//! -//! -//! Note: By design, it is not mandatory to call NvAPI_Initialize before calling any NvAPI. -//! When any NvAPI is called without first calling NvAPI_Initialize, the internal refcounter -//! will be implicitly incremented. In such cases, calling NvAPI_Initialize from a different thread will -//! result in incrementing the refcount again and the user has to call NvAPI_Unload twice to -//! unload the library. However, note that the implicit increment of the refcounter happens only once. -//! 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. -//! -//! \retval ::NVAPI_ERROR One or more resources are locked and hence cannot unload NVAPI library -//! \retval ::NVAPI_OK NVAPI library unloaded -//! -//! \ingroup nvapifunctions -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Unload(); - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GetErrorMessage -// -//! This function converts an NvAPI error code into a null terminated string. -//! -//! SUPPORTED OS: Windows XP and higher, Mac OS X -//! -//! -//! \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 XP and higher, Mac OS X -//! -//! -//! \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); - - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// 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 -} 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; - -#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 XP 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 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, - NVAPI_GPU_CONNECTOR_UNKNOWN = 0xFFFFFFFF, -} NV_GPU_CONNECTOR_TYPE; - -//////////////////////////////////////////////////////////////////////////////// -// -// 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_SD_OTHER = 0x01000000, - NV_DISPLAY_TV_FORMAT_ED_OTHER = 0x02000000, - NV_DISPLAY_TV_FORMAT_HD_OTHER = 0x04000000, - - NV_DISPLAY_TV_FORMAT_ANY = 0x80000000, - -} NV_DISPLAY_TV_FORMAT; - - -//! \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 - - // 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; - -// TV standard - -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 -//! @} - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_SetView -// -//! \fn NvAPI_SetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargetInfo, NV_TARGET_VIEW_MODE targetView) -//! This function lets the caller modify the target display arrangement of the selected source display handle in any nView mode. -//! It can also modify or extend the source display in Dualview mode. -//! \note Maps the selected source to the associated target Ids. -//! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs cannot be enabled with this API. -//! -//! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig. -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 90 -//! -//! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle(). -//! \param [in] pTargetInfo Pointer to array of NV_VIEW_TARGET_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] targetCount Count of target devices specified in pTargetInfo. -//! \param [in] 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 -//! Used in NvAPI_SetView() and NvAPI_GetView() -typedef struct -{ - NvU32 version; //!< (IN) structure version - NvU32 count; //!< (IN) target count - struct - { - NvU32 deviceMask; //!< (IN/OUT) Device mask - NvU32 sourceId; //!< (IN/OUT) Source ID - values will be based on the number of heads exposed per GPU. - NvU32 bPrimary:1; //!< (OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary. - //!< NvAPI_SetView automatically selects the first target in NV_VIEW_TARGET_INFO index 0 as the GPU's primary view. - NvU32 bInterlaced:1; //!< (IN/OUT) Indicates if the timing being used on this monitor is interlaced. - NvU32 bGDIPrimary:1; //!< (IN/OUT) Indicates if this is the desktop GDI primary. - NvU32 bForceModeSet:1;//!< (IN) Used only on Win7 and higher during a call to NvAPI_SetView(). Turns off optimization & forces OS to set supplied mode. - } target[NVAPI_MAX_VIEW_TARGET]; -} NV_VIEW_TARGET_INFO; - -//! \ingroup dispcontrol -#define NV_VIEW_TARGET_INFO_VER MAKE_NVAPI_VERSION(NV_VIEW_TARGET_INFO,2) - - -//! \ingroup dispcontrol -__nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.") -NVAPI_INTERFACE NvAPI_SetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargetInfo, NV_TARGET_VIEW_MODE targetView); - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_SetViewEx -// -//! \fn NvAPI_SetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NV_TARGET_VIEW_MODE displayView) -//! This function lets caller to modify the display arrangement for selected source display handle in any of the nview modes. -//! It also allows to modify or extend the source display in dualview mode. -//! \note Maps the selected source to the associated target Ids. -//! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs cannot be enabled with this API. -//! -//! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig. -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 95 -//! -//! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with -//! NvAPI_EnumNVidiaDisplayHandle(). -//! \param [in] pPathInfo Pointer to array of 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] pathCount Count of paths specified in pPathInfo. -//! \param [in] displayView Display 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 -#define NVAPI_MAX_DISPLAY_PATH NVAPI_MAX_VIEW_TARGET - -//! \ingroup dispcontrol -#define NVAPI_ADVANCED_MAX_DISPLAY_PATH NVAPI_ADVANCED_MAX_VIEW_TARGET - - - -//! \ingroup dispcontrol -//! Used in NV_DISPLAY_PATH_INFO. -typedef struct -{ - NvU32 deviceMask; //!< (IN) Device mask - NvU32 sourceId; //!< (IN) Values will be based on the number of heads exposed per GPU(0, 1?) - NvU32 bPrimary:1; //!< (IN/OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary. - //!< NvAPI_SetViewEx() automatically selects the first target in NV_DISPLAY_PATH_INFO index 0 as the GPU's primary view. - NV_GPU_CONNECTOR_TYPE connector; //!< (IN) Specify connector type. For TV only. - - // source mode information - NvU32 width; //!< (IN) Width of the mode - NvU32 height; //!< (IN) Height of the mode - NvU32 depth; //!< (IN) Depth of the mode - NV_FORMAT colorFormat; //!< Color format if it needs to be specified. Not used now. - - //rotation setting of the mode - NV_ROTATE rotation; //!< (IN) Rotation setting. - - // the scaling mode - NV_SCALING scaling; //!< (IN) Scaling setting - - // Timing info - NvU32 refreshRate; //!< (IN) Refresh rate of the mode - NvU32 interlaced:1; //!< (IN) Interlaced mode flag - - NV_DISPLAY_TV_FORMAT tvFormat; //!< (IN) To choose the last TV format set this value to NV_DISPLAY_TV_FORMAT_NONE - - // Windows desktop position - NvU32 posx; //!< (IN/OUT) X-offset of this display on the Windows desktop - NvU32 posy; //!< (IN/OUT) Y-offset of this display on the Windows desktop - NvU32 bGDIPrimary:1; //!< (IN/OUT) Indicates if this is the desktop GDI primary. - - NvU32 bForceModeSet:1;//!< (IN) Used only on Win7 and higher during a call to NvAPI_SetViewEx(). Turns off optimization & forces OS to set supplied mode. - NvU32 bFocusDisplay:1;//!< (IN) If set, this display path should have the focus after the GPU topology change - NvU32 gpuId:24; //!< (IN) the physical display/target Gpu id which is the owner of the scan out (for SLI multimon, display from the slave Gpu) - -} NV_DISPLAY_PATH; - -//! \ingroup dispcontrol -//! Used in NvAPI_SetViewEx() and NvAPI_GetViewEx(). -typedef struct -{ - NvU32 version; //!< (IN) Structure version - NvU32 count; //!< (IN) Path count - NV_DISPLAY_PATH path[NVAPI_MAX_DISPLAY_PATH]; -} NV_DISPLAY_PATH_INFO_V3; - -//! \ingroup dispcontrol -//! Used in NvAPI_SetViewEx() and NvAPI_GetViewEx(). -typedef struct -{ - NvU32 version; //!< (IN) Structure version - NvU32 count; //!< (IN) Path count - NV_DISPLAY_PATH path[NVAPI_ADVANCED_MAX_DISPLAY_PATH]; -} NV_DISPLAY_PATH_INFO; - -//! \addtogroup dispcontrol -//! Macro for constructing the version fields of NV_DISPLAY_PATH_INFO -//! @{ -#define NV_DISPLAY_PATH_INFO_VER NV_DISPLAY_PATH_INFO_VER4 -#define NV_DISPLAY_PATH_INFO_VER4 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,4) -#define NV_DISPLAY_PATH_INFO_VER3 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,3) -#define NV_DISPLAY_PATH_INFO_VER2 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,2) -#define NV_DISPLAY_PATH_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,1) -//! @} - - -//! \ingroup dispcontrol -__nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.") -NVAPI_INTERFACE NvAPI_SetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NV_TARGET_VIEW_MODE displayView); - - - -/////////////////////////////////////////////////////////////////////////////// -// 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_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; -/////////////////////////////////////////////////////////////////////////////// -// -// 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 XP and higher, Mac OS X -//! -//! -//! \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_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 XP 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 XP and higher -//! -NVAPI_INTERFACE NvAPI_OGL_ExpertModeSet(NvU32 expertDetailLevel, - NvU32 expertReportMask, - NvU32 expertOutputMask, - NVAPI_OGLEXPERT_CALLBACK expertCallback); - -//! \addtogroup oglapi -//! SUPPORTED OS: Windows XP 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 XP 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 XP and higher -//! -NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsSet(NvU32 expertDetailLevel, - NvU32 expertReportMask, - NvU32 expertOutputMask); - -//! \addtogroup oglapi -//! SUPPORTED OS: Windows XP and higher -//! -NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsGet(NvU32 *pExpertDetailLevel, - NvU32 *pExpertReportMask, - NvU32 *pExpertOutputMask); -//@} - - - - -/////////////////////////////////////////////////////////////////////////////// -// -// 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 Vista and higher, Mac OS X -//! -//! -//! -//! \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 XP and higher, Mac OS X -//! -//! -//! \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 XP 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 XP 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. -//! -//! SUPPORTED OS: Windows XP 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 XP and higher, Mac OS X -//! -//! -//! \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 XP 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_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 XP 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 XP 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 XP 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 XP 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. - -//! @} - -//! \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; //!< if bit is set, then this display is wireless - NvU32 isConnected:1; //!< if bit is set, then this display is connected - NvU32 reservedInternal:10; //!< 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 XP 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 XP 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 XP 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 XP 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 XP and higher -//! -//! -//! \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 XP 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 XP 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 -//! \ingroup gpu -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GPU_SetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID); - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GPU_GetOutputType -// -//! \fn NvAPI_GPU_GetOutputType(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_OUTPUT_TYPE *pOutputType) -//! This function returns the output type for a specific physical GPU handle and outputId (exactly 1 bit set - see \ref handles). -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \Version Earliest supported ForceWare version: 82.61 -//! -//! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu, outputId, or pOutputsMask is NULL; or outputId has > 1 bit set -//! \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_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 XP 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 XP and higher, Mac OS X -//! -//! -//! 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 XP 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 XP and higher, Mac OS X -//! -//! -//! 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 XP and higher, Mac OS X -//! -//! -//! 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 XP and higher, Mac OS X -//! -//! -//! 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 XP and higher, Mac OS X -//! -//! -//! 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 XP and higher, Mac OS X -//! -//! -//! 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 XP and higher, Mac OS X -//! -//! -//! 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 XP and higher -//! -//! -//! \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 XP and higher, Mac OS X -//! -//! -//! 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. -//! -//! SUPPORTED OS: Windows XP and higher, Mac OS X -//! -//! -//! \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_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.). -//! -//! SUPPORTED OS: Windows XP and higher, Mac OS X -//! -//! -//! \since Release: 90 -//! -//! \retval NVAPI_INVALID_ARGUMENT pRate 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_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 XP and higher, Mac OS X -//! -//! -//! \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 XP and higher, Mac OS X -//! -//! -//! 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 XP and higher, Mac OS X -//! -//! -//! 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) -//! -//! SUPPORTED OS: Windows XP and higher, Mac OS X -//! -//! -//! \since Release: 80 -//! -//! \return NVAPI_ERROR or NVAPI_OK -//! \ingroup gpu -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GPU_GetQuadroStatus(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pStatus); - - - - -//! \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 XP 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); - - - - -/////////////////////////////////////////////////////////////////////////////// -// -// GPU Clock Control -// -// These APIs allow the user to get and set individual clock domains -// on a per-GPU basis. -// -/////////////////////////////////////////////////////////////////////////////// - - -//! \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_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; - - -//! \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 gpuclock -//! Used in NvAPI_GPU_GetAllClockFrequencies() -typedef struct -{ - NvU32 version; //!< Structure version - NvU32 reserved; //!< These bits are reserved for future use. - struct - { - NvU32 bIsPresent:1; //!< Set if this domain is present on this GPU - NvU32 reserved:31; //!< These bits are reserved for future use. - NvU32 frequency; //!< Clock frequency (kHz) - }domain[NVAPI_MAX_GPU_PUBLIC_CLOCKS]; -} NV_GPU_CLOCK_FREQUENCIES_V1; - -//! \ingroup gpuclock -//! Used in NvAPI_GPU_GetAllClockFrequencies() -typedef enum -{ - NV_GPU_CLOCK_FREQUENCIES_CURRENT_FREQ = 0, - NV_GPU_CLOCK_FREQUENCIES_BASE_CLOCK = 1, - NV_GPU_CLOCK_FREQUENCIES_BOOST_CLOCK = 2, - NV_GPU_CLOCK_FREQUENCIES_CLOCK_TYPE_NUM = 3 -} NV_GPU_CLOCK_FREQUENCIES_CLOCK_TYPE; - -//! \ingroup gpuclock -//! Used in NvAPI_GPU_GetAllClockFrequencies() -typedef struct -{ - NvU32 version; //!< Structure version - NvU32 ClockType:2; //!< One of NV_GPU_CLOCK_FREQUENCIES_CLOCK_TYPE. Used to specify the type of clock to be returned. - NvU32 reserved:22; //!< These bits are reserved for future use. Must be set to 0. - NvU32 reserved1:8; //!< These bits are reserved. - struct - { - NvU32 bIsPresent:1; //!< Set if this domain is present on this GPU - NvU32 reserved:31; //!< These bits are reserved for future use. - NvU32 frequency; //!< Clock frequency (kHz) - }domain[NVAPI_MAX_GPU_PUBLIC_CLOCKS]; -} NV_GPU_CLOCK_FREQUENCIES_V2; - -//! \ingroup gpuclock -//! Used in NvAPI_GPU_GetAllClockFrequencies() -typedef NV_GPU_CLOCK_FREQUENCIES_V2 NV_GPU_CLOCK_FREQUENCIES; - -//! \addtogroup gpuclock -//! @{ -#define NV_GPU_CLOCK_FREQUENCIES_VER_1 MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V1,1) -#define NV_GPU_CLOCK_FREQUENCIES_VER_2 MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V2,2) -#define NV_GPU_CLOCK_FREQUENCIES_VER_3 MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V2,3) -#define NV_GPU_CLOCK_FREQUENCIES_VER NV_GPU_CLOCK_FREQUENCIES_VER_3 -//! @} - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GPU_GetAllClockFrequencies -// -//! This function retrieves the NV_GPU_CLOCK_FREQUENCIES structure for the specified physical GPU. -//! -//! For each clock domain: -//! - bIsPresent is set for each domain that is present on the GPU -//! - frequency is the domain's clock freq in kHz -//! -//! Each domain's info is indexed in the array. For example: -//! clkFreqs.domain[NVAPI_GPU_PUBLIC_CLOCK_MEMORY] holds the info for the MEMORY domain. -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 295 -//! -//! \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 pClkFreqs is NULL. -//! \ingroup gpuclock -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GPU_GetAllClockFrequencies(__in NvPhysicalGpuHandle hPhysicalGPU, __inout NV_GPU_CLOCK_FREQUENCIES *pClkFreqs); - - -//! \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; - -//! @} - - - -//! \ingroup gpupstate -//! Used in NvAPI_GPU_GetPstatesInfoEx() -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_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 XP and higher, Mac OS X -//! -//! -//! \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); - - - -//! \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 -typedef struct -{ - //! 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 -typedef struct -{ - //! ID of the clock domain - NV_GPU_PUBLIC_CLOCK_ID domainId; - - //! Clock type ID - NV_GPU_PERF_PSTATE20_CLOCK_TYPE_ID typeId; - NvU32 bIsEditable:1; - - //! These bits are reserved for future use (must be always 0) - NvU32 reserved:31; - - //! 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 -typedef struct -{ - //! ID of the voltage domain - NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId; - 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; - - 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. - -typedef struct -{ - //! Version info of the structure (NV_GPU_PERF_PSTATES20_INFO_VER) - NvU32 version; - - NvU32 bIsEditable:1; - - //! These bits are reserved for future use (must be always 0) - NvU32 reserved:31; - - //! Number of populated pstates - NvU32 numPstates; - - //! Number of populated clocks (per pstate) - NvU32 numClocks; - - //! Number of populated base voltages (per pstate) - NvU32 numBaseVoltages; - - //! Performance state (P-State) settings - //! Valid index range is 0 to numPstates-1 - struct - { - //! ID of the P-State - NV_GPU_PERF_PSTATE_ID pstateId; - - 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. - -typedef struct _NV_GPU_PERF_PSTATES20_INFO_V2 -{ - //! Version info of the structure (NV_GPU_PERF_PSTATES20_INFO_VER) - NvU32 version; - - NvU32 bIsEditable:1; - - //! These bits are reserved for future use (must be always 0) - NvU32 reserved:31; - - //! Number of populated pstates - NvU32 numPstates; - - //! Number of populated clocks (per pstate) - NvU32 numClocks; - - //! Number of populated base voltages (per pstate) - NvU32 numBaseVoltages; - - //! Performance state (P-State) settings - //! Valid index range is 0 to numPstates-1 - struct - { - //! ID of the P-State - NV_GPU_PERF_PSTATE_ID pstateId; - - 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 - { - //! 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 - -//! @} - -/////////////////////////////////////////////////////////////////////////////// -// -// 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 XP 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_GetCurrentPstate -// -//! DESCRIPTION: This function retrieves the current performance state (P-State). -//! -//! SUPPORTED OS: Windows XP and higher, Mac OS X -//! -//! -//! \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 -#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 XP and higher, Mac OS X -//! -//! -//! \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 XP 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); - - -/////////////////////////////////////////////////////////////////////////////////// -// 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 XP and higher, Mac OS X -//! -//! -//! \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 XP and higher, Mac OS X -//! -//! -//! \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); - - -/////////////////////////////////////////////////////////////////////////////// -// -// 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_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 XP and higher -//! -//! -//! \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_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 XP 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_GetECCStatusInfo -// -//! \fn NvAPI_GPU_GetECCStatusInfo(NvPhysicalGpuHandle hPhysicalGpu, -//! NV_GPU_ECC_STATUS_INFO *pECCStatusInfo); -//! DESCRIPTION: This function returns ECC memory status information. -//! -//! SUPPORTED OS: Windows XP 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); - -/////////////////////////////////////////////////////////////////////////////// -// -// 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 XP 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 -//! 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) - -//! \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 XP and higher -//! -//! -//! TCC_SUPPORTED -//! -//! \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 caller does not have administrative privileges -//! -//! \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 XP 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 XP and higher -//! -//! -//! TCC_SUPPORTED -//! -//! \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 caller does not have administrative privileges -//! -//! \ingroup gpuecc -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GPU_SetECCConfiguration(NvPhysicalGpuHandle hPhysicalGpu, NvU8 bEnable, - NvU8 bEnableImmediately); - - - -//! \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); - -//! 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 XP 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 gpu -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GPU_GetPerfDecreaseInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NvU32 *pPerfDecrInfo); - -//! \ingroup gpu -typedef enum _NV_GPU_ILLUMINATION_ATTRIB -{ - NV_GPU_IA_LOGO_BRIGHTNESS = 0, - NV_GPU_IA_SLI_BRIGHTNESS = 1, -} NV_GPU_ILLUMINATION_ATTRIB; - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GPU_QueryIlluminationSupport -// -//! \fn NvAPI_GPU_QueryIlluminationSupport(__inout NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM *pIlluminationSupportInfo) -//! DESCRIPTION: This function reports if the specified illumination attribute is supported. -//! -//! \note Only a single GPU can manage an given attribute on a given HW element, -//! regardless of how many are attatched. I.E. only one GPU will be used to control -//! the brightness of the LED on an SLI bridge, regardless of how many are physicaly attached. -//! You should enumerate thru the GPUs with this call to determine which GPU is managing the attribute. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! \since Version: 300.05 -//! -//! \param [in] hPhysicalGpu Physical GPU handle -//! \param Attribute An enumeration value specifying the Illumination attribute to be querried -//! \param [out] pSupported A boolean indicating if the attribute is supported. -//! -//! \return See \ref nvapistatus for the list of possible return values. -// -////////////////////////////////////////////////////////////////////////////// - -//! \ingroup gpu -typedef struct _NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1 { - - // IN - NvU32 version; //!< Version of this structure - NvPhysicalGpuHandle hPhysicalGpu; //!< The handle of the GPU that you are checking for the specified attribute. - //!< note that this is the GPU that is managing the attribute. - //!< Only a single GPU can manage an given attribute on a given HW element, - //!< regardless of how many are attatched. - //!< I.E. only one GPU will be used to control the brightness of the LED on an SLI bridge, - //!< regardless of how many are physicaly attached. - //!< You enumerate thru the GPUs with this call to determine which GPU is managing the attribute. - NV_GPU_ILLUMINATION_ATTRIB Attribute; //!< An enumeration value specifying the Illumination attribute to be querried. - //!< refer to enum \ref NV_GPU_ILLUMINATION_ATTRIB. - - // OUT - NvU32 bSupported; //!< A boolean indicating if the attribute is supported. - -} NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1; - -//! \ingroup gpu -typedef NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1 NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM; -//! \ingroup gpu -#define NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1,1) -//! \ingroup gpu -#define NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_VER NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_VER_1 - -//! \ingroup gpu -NVAPI_INTERFACE NvAPI_GPU_QueryIlluminationSupport(__inout NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM *pIlluminationSupportInfo); - - - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GPU_GetIllumination -// -//! \fn NvAPI_GPU_GetIllumination(NV_GPU_GET_ILLUMINATION_PARM *pIlluminationInfo) -//! DESCRIPTION: This function reports value of the specified illumination attribute. -//! -//! \note Only a single GPU can manage an given attribute on a given HW element, -//! regardless of how many are attatched. I.E. only one GPU will be used to control -//! the brightness of the LED on an SLI bridge, regardless of how many are physicaly attached. -//! You should enumerate thru the GPUs with the \ref NvAPI_GPU_QueryIlluminationSupport call to -//! determine which GPU is managing the attribute. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! \since Version: 300.05 -//! -//! \param [in] hPhysicalGpu Physical GPU handle -//! \param Attribute An enumeration value specifying the Illumination attribute to be querried -//! \param [out] Value A DWORD containing the current value for the specified attribute. -//! This is specified as a percentage of the full range of the attribute -//! (0-100; 0 = off, 100 = full brightness) -//! -//! \return See \ref nvapistatus for the list of possible return values. Return values of special interest are: -//! NVAPI_INVALID_ARGUMENT The specified attibute is not known to the driver. -//! NVAPI_NOT_SUPPORTED: The specified attribute is not supported on the specified GPU -// -////////////////////////////////////////////////////////////////////////////// - -//! \ingroup gpu -typedef struct _NV_GPU_GET_ILLUMINATION_PARM_V1 { - - // IN - NvU32 version; //!< Version of this structure - NvPhysicalGpuHandle hPhysicalGpu; //!< The handle of the GPU that you are checking for the specified attribute. - //!< Note that this is the GPU that is managing the attribute. - //!< Only a single GPU can manage an given attribute on a given HW element, - //!< regardless of how many are attatched. - //!< I.E. only one GPU will be used to control the brightness of the LED on an SLI bridge, - //!< regardless of how many are physicaly attached. - //!< You enumerate thru the GPUs with this call to determine which GPU is managing the attribute. - NV_GPU_ILLUMINATION_ATTRIB Attribute; //!< An enumeration value specifying the Illumination attribute to be querried. - //!< refer to enum \ref NV_GPU_ILLUMINATION_ATTRIB. - - // OUT - NvU32 Value; //!< A DWORD that will contain the current value of the specified attribute. - //! This is specified as a percentage of the full range of the attribute - //! (0-100; 0 = off, 100 = full brightness) - -} NV_GPU_GET_ILLUMINATION_PARM_V1; - -//! \ingroup gpu -typedef NV_GPU_GET_ILLUMINATION_PARM_V1 NV_GPU_GET_ILLUMINATION_PARM; -//! \ingroup gpu -#define NV_GPU_GET_ILLUMINATION_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPU_GET_ILLUMINATION_PARM_V1,1) -//! \ingroup gpu -#define NV_GPU_GET_ILLUMINATION_PARM_VER NV_GPU_GET_ILLUMINATION_PARM_VER_1 - -//! \ingroup gpu -NVAPI_INTERFACE NvAPI_GPU_GetIllumination(NV_GPU_GET_ILLUMINATION_PARM *pIlluminationInfo); - - - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GPU_SetIllumination -// -//! \fn NvAPI_GPU_SetIllumination(NV_GPU_SET_ILLUMINATION_PARM *pIlluminationInfo) -//! DESCRIPTION: This function sets the value of the specified illumination attribute. -//! -//! \note Only a single GPU can manage an given attribute on a given HW element, -//! regardless of how many are attatched. I.E. only one GPU will be used to control -//! the brightness of the LED on an SLI bridge, regardless of how many are physicaly attached. -//! You should enumerate thru the GPUs with the \ref NvAPI_GPU_QueryIlluminationSupport call to -//! determine which GPU is managing the attribute. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! \since Version: 300.05 -//! -//! \param [in] hPhysicalGpu Physical GPU handle -//! \param Attribute An enumeration value specifying the Illumination attribute to be set -//! \param Value The new value for the specified attribute. -//! This should be specified as a percentage of the full range of the attribute -//! (0-100; 0 = off, 100 = full brightness) -//! If a value is specified outside this range, NVAPI_INVALID_ARGUMENT will be returned. -//! -//! \return See \ref nvapistatus for the list of possible return values. Return values of special interest are: -//! NVAPI_INVALID_ARGUMENT The specified attibute is not known to the driver, or the specified value is out of range. -//! NVAPI_NOT_SUPPORTED The specified attribute is not supported on the specified GPU. -// -/////////////////////////////////////////////////////////////////////////////// - -//! \ingroup gpu -typedef struct _NV_GPU_SET_ILLUMINATION_PARM_V1 { - - // IN - NvU32 version; //!< Version of this structure - NvPhysicalGpuHandle hPhysicalGpu; //!< The handle of the GPU that you are checking for the specified attribute. - //!< Note that this is the GPU that is managing the attribute. - //!< Only a single GPU can manage an given attribute on a given HW element, - //!< regardless of how many are attatched. - //!< I.E. only one GPU will be used to control the brightness of the LED on an SLI bridge, - //!< regardless of how many are physicaly attached. - //!< You enumerate thru the GPUs with this call to determine which GPU is managing the attribute. - NV_GPU_ILLUMINATION_ATTRIB Attribute; //!< An enumeration value specifying the Illumination attribute to be querried. - //!< refer to enum \ref NV_GPU_ILLUMINATION_ATTRIB. - NvU32 Value; //!< A DWORD containing the new value for the specified attribute. - //!< This should be specified as a percentage of the full range of the attribute - //!< (0-100; 0 = off, 100 = full brightness) - //!< If a value is specified outside this range, NVAPI_INVALID_ARGUMENT will be returned. - - // OUT - -} NV_GPU_SET_ILLUMINATION_PARM_V1; - -//! \ingroup gpu -typedef NV_GPU_SET_ILLUMINATION_PARM_V1 NV_GPU_SET_ILLUMINATION_PARM; -//! \ingroup gpu -#define NV_GPU_SET_ILLUMINATION_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPU_SET_ILLUMINATION_PARM_V1,1) -//! \ingroup gpu -#define NV_GPU_SET_ILLUMINATION_PARM_VER NV_GPU_SET_ILLUMINATION_PARM_VER_1 - -//! \ingroup gpu -NVAPI_INTERFACE NvAPI_GPU_SetIllumination(NV_GPU_SET_ILLUMINATION_PARM *pIlluminationInfo); - - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_EnumNvidiaDisplayHandle -// -//! This function returns the handle of the NVIDIA display specified by the enum -//! index (thisEnum). The client should keep enumerating until it -//! returns NVAPI_END_ENUMERATION. -//! -//! Note: Display handles can get invalidated on a modeset, so the calling applications need to -//! renum the handles after every modeset. -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 80 -//! -//! \param [in] thisEnum The index of the NVIDIA display. -//! \param [out] pNvDispHandle Pointer to the NVIDIA display handle. -//! -//! \retval NVAPI_INVALID_ARGUMENT Either the handle pointer is NULL or enum index too big -//! \retval NVAPI_OK Return a valid NvDisplayHandle based on the enum index -//! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device found in the system -//! \retval NVAPI_END_ENUMERATION No more display device to enumerate -//! \ingroup disphandle -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_EnumNvidiaDisplayHandle(NvU32 thisEnum, NvDisplayHandle *pNvDispHandle); - - - - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_EnumNvidiaUnAttachedDisplayHandle -// -//! This function returns the handle of the NVIDIA unattached display specified by the enum -//! index (thisEnum). The client should keep enumerating until it -//! returns error. -//! Note: Display handles can get invalidated on a modeset, so the calling applications need to -//! renum the handles after every modeset. -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 80 -//! -//! \param [in] thisEnum The index of the NVIDIA display. -//! \param [out] pNvUnAttachedDispHandle Pointer to the NVIDIA display handle of the unattached display. -//! -//! \retval NVAPI_INVALID_ARGUMENT Either the handle pointer is NULL or enum index too big -//! \retval NVAPI_OK Return a valid NvDisplayHandle based on the enum index -//! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device found in the system -//! \retval NVAPI_END_ENUMERATION No more display device to enumerate. -//! \ingroup disphandle -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_EnumNvidiaUnAttachedDisplayHandle(NvU32 thisEnum, NvUnAttachedDisplayHandle *pNvUnAttachedDispHandle); - - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_CreateDisplayFromUnAttachedDisplay -// -//! This function converts the unattached display handle to an active attached display handle. -//! -//! At least one GPU must be present in the system and running an NVIDIA display driver. -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 80 -//! -//! \retval NVAPI_INVALID_ARGUMENT hNvUnAttachedDisp is not valid or pNvDisplay 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 dispcontrol -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_CreateDisplayFromUnAttachedDisplay(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvDisplayHandle *pNvDisplay); - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GetAssociatedNVidiaDisplayHandle -// -//! This function returns the handle of the NVIDIA display that is associated -//! with the given display "name" (such as "\\.\DISPLAY1"). -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 80 -//! -//! \retval NVAPI_INVALID_ARGUMENT Either argument is NULL -//! \retval NVAPI_OK *pNvDispHandle is now valid -//! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name -//! \ingroup disphandle -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayHandle(const char *szDisplayName, NvDisplayHandle *pNvDispHandle); - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle -// -//! DESCRIPTION: This function returns the handle of an unattached NVIDIA display that is -//! associated with the given display name (such as "\\DISPLAY1"). -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 185 -//! -//! \retval ::NVAPI_INVALID_ARGUMENT Either argument is NULL. -//! \retval ::NVAPI_OK *pNvUnAttachedDispHandle is now valid. -//! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name. -//! -//! \ingroup disphandle -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle(const char *szDisplayName, NvUnAttachedDisplayHandle *pNvUnAttachedDispHandle); - - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GetAssociatedNVidiaDisplayName -// -//! For a given NVIDIA display handle, this function returns a string (such as "\\.\DISPLAY1") to identify the display. -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 80 -//! -//! \retval NVAPI_INVALID_ARGUMENT Either argument is NULL -//! \retval NVAPI_OK *pNvDispHandle is now valid -//! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name -//! \ingroup dispcontrol -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayName(NvDisplayHandle NvDispHandle, NvAPI_ShortString szDisplayName); - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GetUnAttachedAssociatedDisplayName -// -//! This function returns the display name given, for example, "\\DISPLAY1", using the unattached NVIDIA display handle -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 95 -//! -//! \retval NVAPI_INVALID_ARGUMENT Either argument is NULL -//! \retval NVAPI_OK *pNvDispHandle is now valid -//! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name -//! \ingroup dispcontrol -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GetUnAttachedAssociatedDisplayName(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvAPI_ShortString szDisplayName); - - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_EnableHWCursor -// -//! This function enables hardware cursor support -//! -//! SUPPORTED OS: Windows XP -//! -//! -//! -//! \since Release: 80 -//! -//! \return NVAPI_ERROR or NVAPI_OK -//! \ingroup dispcontrol -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_EnableHWCursor(NvDisplayHandle hNvDisplay); - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_DisableHWCursor -// -//! This function disables hardware cursor support -//! -//! SUPPORTED OS: Windows XP -//! -//! -//! \since Release: 80 -//! -//! \return NVAPI_ERROR or NVAPI_OK -//! \ingroup dispcontrol -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_DisableHWCursor(NvDisplayHandle hNvDisplay); - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GetVBlankCounter -// -//! This function gets the V-blank counter -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 80 -//! -//! \return NVAPI_ERROR or NVAPI_OK -//! \ingroup dispcontrol -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GetVBlankCounter(NvDisplayHandle hNvDisplay, NvU32 *pCounter); - -/////////////////////////////////////////////////////////////////////////////// -// FUNCTION NAME: NvAPI_SetRefreshRateOverride -// -//! This function overrides the refresh rate on the given display/outputsMask. -//! The new refresh rate can be applied right away in this API call or deferred to be applied with the -//! next OS modeset. The override is good for only one modeset (regardless whether it's deferred or immediate). -//! -//! -//! SUPPORTED OS: Windows XP -//! -//! -//! \since Release: 80 -//! -//! \param [in] hNvDisplay The NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle -//! enumerated from NvAPI_EnumNVidiaDisplayHandle(). -//! \param [in] outputsMask A set of bits that identify all target outputs which are associated with the NVIDIA -//! display handle to apply the refresh rate override. When SLI is enabled, the -//! outputsMask only applies to the GPU that is driving the display output. -//! \param [in] refreshRate The override value. "0.0" means cancel the override. -//! \param [in] bSetDeferred -//! - "0": Apply the refresh rate override immediately in this API call.\p -//! - "1": Apply refresh rate at the next OS modeset. -//! -//! \retval NVAPI_INVALID_ARGUMENT hNvDisplay or outputsMask is invalid -//! \retval NVAPI_OK The refresh rate override is correct set -//! \retval NVAPI_ERROR The operation failed -//! \ingroup dispcontrol -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_SetRefreshRateOverride(NvDisplayHandle hNvDisplay, NvU32 outputsMask, float refreshRate, NvU32 bSetDeferred); - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GetAssociatedDisplayOutputId -// -//! This function gets the active outputId associated with the display handle. -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 90 -//! -//! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). -//! \param [out] outputId The active display output ID associated with the selected display handle hNvDisplay. -//! The outputid will have only one bit set. In the case of Clone or Span mode, this will indicate the -//! display outputId of the primary display that the GPU is driving. See \ref handles. -//! -//! \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. -//! \ingroup dispcontrol -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_GetAssociatedDisplayOutputId(NvDisplayHandle hNvDisplay, NvU32 *pOutputId); - - -//! \ingroup dispcontrol -//! Used in NvAPI_GetDisplayPortInfo(). -typedef struct _NV_DISPLAY_PORT_INFO_V1 -{ - NvU32 version; //!< Structure version - NvU32 dpcd_ver; //!< DPCD version of the monitor - NV_DP_LINK_RATE maxLinkRate; //!< Maximum supported link rate - NV_DP_LANE_COUNT maxLaneCount; //!< Maximum supported lane count - NV_DP_LINK_RATE curLinkRate; //!< Current link rate - NV_DP_LANE_COUNT curLaneCount; //!< Current lane count - NV_DP_COLOR_FORMAT colorFormat; //!< Current color format - NV_DP_DYNAMIC_RANGE dynamicRange; //!< Dynamic range - NV_DP_COLORIMETRY colorimetry; //!< Ignored in RGB space - NV_DP_BPC bpc; //!< Current bit-per-component - NvU32 isDp : 1; //!< If the monitor is driven by a DisplayPort - NvU32 isInternalDp : 1; //!< If the monitor is driven by an NV Dp transmitter - NvU32 isColorCtrlSupported : 1; //!< If the color format change is supported - NvU32 is6BPCSupported : 1; //!< If 6 bpc is supported - NvU32 is8BPCSupported : 1; //!< If 8 bpc is supported - NvU32 is10BPCSupported : 1; //!< If 10 bpc is supported - NvU32 is12BPCSupported : 1; //!< If 12 bpc is supported - NvU32 is16BPCSupported : 1; //!< If 16 bpc is supported - NvU32 isYCrCb422Supported : 1; //!< If YCrCb422 is supported - NvU32 isYCrCb444Supported : 1; //!< If YCrCb444 is supported - NvU32 isRgb444SupportedOnCurrentMode : 1; //!< If Rgb444 is supported on the current mode - NvU32 isYCbCr444SupportedOnCurrentMode : 1; //!< If YCbCr444 is supported on the current mode - NvU32 isYCbCr422SupportedOnCurrentMode : 1; //!< If YCbCr422 is support on the current mode - NvU32 is6BPCSupportedOnCurrentMode : 1; // if 6 bpc is supported On Current Mode - NvU32 is8BPCSupportedOnCurrentMode : 1; // if 8 bpc is supported On Current Mode - NvU32 is10BPCSupportedOnCurrentMode : 1; // if 10 bpc is supported On Current Mode - NvU32 is12BPCSupportedOnCurrentMode : 1; // if 12 bpc is supported On Current Mode - NvU32 is16BPCSupportedOnCurrentMode : 1; // if 16 bpc is supported On Current Mode - NvU32 isMonxvYCC601Capable : 1; // if xvYCC 601 extended colorimetry is supported - NvU32 isMonxvYCC709Capable : 1; // if xvYCC 709 extended colorimetry is supported - NvU32 isMonsYCC601Capable : 1; // if sYCC601 extended colorimetry is supported - NvU32 isMonAdobeYCC601Capable : 1; // if AdobeYCC601 extended colorimetry is supported - NvU32 isMonAdobeRGBCapable : 1; // if AdobeRGB extended colorimetry is supported - NvU32 isMonBT2020RGBCapable : 1; // if BT2020 RGB extended colorimetry is supported - NvU32 isMonBT2020YCCCapable : 1; // if BT2020 Y'CbCr extended colorimetry is supported - NvU32 isMonBT2020cYCCCapable : 1; // if BT2020 cYCbCr (constant luminance) extended colorimetry is supported - - NvU32 reserved : 6; //!< reserved - } NV_DISPLAY_PORT_INFO_V1; - - typedef NV_DISPLAY_PORT_INFO_V1 NV_DISPLAY_PORT_INFO; - -//! Macro for constructing the version field of NV_DISPLAY_PORT_INFO. -#define NV_DISPLAY_PORT_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_INFO,1) -#define NV_DISPLAY_PORT_INFO_VER2 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_INFO,2) -#define NV_DISPLAY_PORT_INFO_VER NV_DISPLAY_PORT_INFO_VER2 - -/////////////////////////////////////////////////////////////////////////////// -// FUNCTION NAME: NvAPI_GetDisplayPortInfo -// -//! \fn NvAPI_GetDisplayPortInfo(__in_opt NvDisplayHandle hNvDisplay, __in NvU32 outputId, __inout NV_DISPLAY_PORT_INFO *pInfo) -//! DESCRIPTION: This function returns the current DisplayPort-related information on the specified device (monitor). -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 165 -//! -//! \param [in] hvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). -//! This parameter is ignored when the outputId is a NvAPI displayId. -//! \param [in] outputId This can either be the connection bit mask or the NvAPI displayId. When the legacy connection bit mask is passed, -//! it should have exactly 1 bit set to indicate a single display. If it's "0" then the default outputId from -//! NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles. -//! \param [out] pInfo The DisplayPort information -//! -//! \retval NVAPI_OK Completed request -//! \retval NVAPI_ERROR Miscellaneous error occurred -//! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. -// -/////////////////////////////////////////////////////////////////////////////// -//! \ingroup dispcontrol -NVAPI_INTERFACE NvAPI_GetDisplayPortInfo(__in_opt NvDisplayHandle hNvDisplay, __in NvU32 outputId, __inout NV_DISPLAY_PORT_INFO *pInfo); - -/////////////////////////////////////////////////////////////////////////////// -// FUNCTION NAME: NvAPI_SetDisplayPort -// -//! \fn NvAPI_SetDisplayPort(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_CONFIG *pCfg) -//! DESCRIPTION: This function sets up DisplayPort-related configurations. -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 165 -//! -//! \param [in] hNvDisplay NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from -//! NvAPI_EnumNVidiaDisplayHandle(). -//! \param [in] outputId This display output ID, when it's "0" it means the default outputId generated from the return of -//! NvAPI_GetAssociatedDisplayOutputId(). See \ref handles. -//! \param [in] pCfg The display port config structure. If pCfg is NULL, it means to use the driver's default value to setup. -//! -//! \retval NVAPI_OK Completed request -//! \retval NVAPI_ERROR Miscellaneous error occurred -//! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter -/////////////////////////////////////////////////////////////////////////////// - - -//! \ingroup dispcontrol -//! DisplayPort configuration settings - used in NvAPI_SetDisplayPort(). -typedef struct -{ - NvU32 version; //!< Structure version - 2 is the latest - NV_DP_LINK_RATE linkRate; //!< Link rate - NV_DP_LANE_COUNT laneCount; //!< Lane count - NV_DP_COLOR_FORMAT colorFormat; //!< Color format to set - NV_DP_DYNAMIC_RANGE dynamicRange; //!< Dynamic range - NV_DP_COLORIMETRY colorimetry; //!< Ignored in RGB space - NV_DP_BPC bpc; //!< Bit-per-component - NvU32 isHPD : 1; //!< If the control panel is making this call due to HPD - NvU32 isSetDeferred : 1; //!< Requires an OS modeset to finalize the setup if set - NvU32 isChromaLpfOff : 1; //!< Force the chroma low_pass_filter to be off - NvU32 isDitherOff : 1; //!< Force to turn off dither - NvU32 testLinkTrain : 1; //!< If testing mode, skip validation - NvU32 testColorChange : 1; //!< If testing mode, skip validation - -} NV_DISPLAY_PORT_CONFIG; - -//! \addtogroup dispcontrol -//! @{ -//! Macro for constructing the version field of NV_DISPLAY_PORT_CONFIG -#define NV_DISPLAY_PORT_CONFIG_VER MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,2) -//! Macro for constructing the version field of NV_DISPLAY_PORT_CONFIG -#define NV_DISPLAY_PORT_CONFIG_VER_1 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,1) -//! Macro for constructing the version field of NV_DISPLAY_PORT_CONFIG -#define NV_DISPLAY_PORT_CONFIG_VER_2 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,2) -//! @} - - -//! \ingroup dispcontrol -NVAPI_INTERFACE NvAPI_SetDisplayPort(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_CONFIG *pCfg); - - - - -//! \ingroup dispcontrol -//! Used in NvAPI_GetHDMISupportInfo(). -typedef struct _NV_HDMI_SUPPORT_INFO_V1 -{ - NvU32 version; //!< Structure version - - NvU32 isGpuHDMICapable : 1; //!< If the GPU can handle HDMI - NvU32 isMonUnderscanCapable : 1; //!< If the monitor supports underscan - NvU32 isMonBasicAudioCapable : 1; //!< If the monitor supports basic audio - NvU32 isMonYCbCr444Capable : 1; //!< If YCbCr 4:4:4 is supported - NvU32 isMonYCbCr422Capable : 1; //!< If YCbCr 4:2:2 is supported - NvU32 isMonxvYCC601Capable : 1; //!< If xvYCC 601 is supported - NvU32 isMonxvYCC709Capable : 1; //!< If xvYCC 709 is supported - NvU32 isMonHDMI : 1; //!< If the monitor is HDMI (with IEEE's HDMI registry ID) - NvU32 reserved : 24; //!< Reserved. - - NvU32 EDID861ExtRev; //!< Revision number of the EDID 861 extension - } NV_HDMI_SUPPORT_INFO_V1; - -typedef struct _NV_HDMI_SUPPORT_INFO_V2 -{ - NvU32 version; //!< Structure version - - NvU32 isGpuHDMICapable : 1; //!< If the GPU can handle HDMI - NvU32 isMonUnderscanCapable : 1; //!< If the monitor supports underscan - NvU32 isMonBasicAudioCapable : 1; //!< If the monitor supports basic audio - NvU32 isMonYCbCr444Capable : 1; //!< If YCbCr 4:4:4 is supported - NvU32 isMonYCbCr422Capable : 1; //!< If YCbCr 4:2:2 is supported - NvU32 isMonxvYCC601Capable : 1; //!< If xvYCC extended colorimetry 601 is supported - NvU32 isMonxvYCC709Capable : 1; //!< If xvYCC extended colorimetry 709 is supported - NvU32 isMonHDMI : 1; //!< If the monitor is HDMI (with IEEE's HDMI registry ID) - NvU32 isMonsYCC601Capable : 1; //!< if sYCC601 extended colorimetry is supported - NvU32 isMonAdobeYCC601Capable : 1; //!< if AdobeYCC601 extended colorimetry is supported - NvU32 isMonAdobeRGBCapable : 1; //!< if AdobeRGB extended colorimetry is supported - NvU32 reserved : 21; //!< Reserved. - - NvU32 EDID861ExtRev; //!< Revision number of the EDID 861 extension - } NV_HDMI_SUPPORT_INFO_V2; - -#define NV_HDMI_SUPPORT_INFO_VER1 MAKE_NVAPI_VERSION(NV_HDMI_SUPPORT_INFO_V1, 1) -#define NV_HDMI_SUPPORT_INFO_VER2 MAKE_NVAPI_VERSION(NV_HDMI_SUPPORT_INFO_V2, 2) - - - -#ifndef NV_HDMI_SUPPORT_INFO_VER - -typedef NV_HDMI_SUPPORT_INFO_V2 NV_HDMI_SUPPORT_INFO; -#define NV_HDMI_SUPPORT_INFO_VER NV_HDMI_SUPPORT_INFO_VER2 - -#endif - - -//! SUPPORTED OS: Windows Vista and higher -//! -/////////////////////////////////////////////////////////////////////////////// -// FUNCTION NAME: NvAPI_GetHDMISupportInfo -// -//! \fn NvAPI_GetHDMISupportInfo(__in_opt NvDisplayHandle hNvDisplay, __in NvU32 outputId, __inout NV_HDMI_SUPPORT_INFO *pInfo) -//! This API returns the current infoframe data on the specified device(monitor). -//! -//! \since Release: 95 -//! -//! \param [in] hvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle(). -//! This parameter is ignored when the outputId is a NvAPI displayId. -//! \param [in] outputId This can either be the connection bit mask or the NvAPI displayId. When the legacy connection bit mask is passed, -//! it should have exactly 1 bit set to indicate a single display. If it's "0" then the default outputId from -//! NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles. -//! \param [out] pInfo The monitor and GPU's HDMI support info -//! -//! \retval NVAPI_OK Completed request -//! \retval NVAPI_ERROR Miscellaneous error occurred -//! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter. -/////////////////////////////////////////////////////////////////////////////// - - -//! \ingroup dispcontrol -NVAPI_INTERFACE NvAPI_GetHDMISupportInfo(__in_opt NvDisplayHandle hNvDisplay, __in NvU32 outputId, __inout NV_HDMI_SUPPORT_INFO *pInfo); - - -//! \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 Vista 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 Vista 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 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 NV_COLOR_DATA_V3 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_VER NV_COLOR_DATA_VER3 - -NVAPI_INTERFACE NvAPI_Disp_ColorControl(NvU32 displayId, NV_COLOR_DATA *pColorData); - -//! @} - -//! \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 Vista 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. -// -/////////////////////////////////////////////////////////////////////////////// - -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 -{ - 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 reserved :28; - - 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; - -#define NV_HDR_CAPABILITIES_VER1 MAKE_NVAPI_VERSION(NV_HDR_CAPABILITIES, 1) -#define NV_HDR_CAPABILITIES_VER NV_HDR_CAPABILITIES_VER1 - -NVAPI_INTERFACE NvAPI_Disp_GetHdrCapabilities(__in NvU32 displayId, __inout NV_HDR_CAPABILITIES *pHdrCapabilities); - -//! @} - - -//! \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 Vista 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. -// -/////////////////////////////////////////////////////////////////////////////// - -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 -{ - NV_HDR_MODE_OFF = 0, //!< HDR off - standard Low Dynamic Range output - NV_HDR_MODE_UHDA = 2, //!< UHDA HDR (a.k.a HDR10) output: RGB/YCC 10/12bpc ST2084(PQ) EOTF (0..10000 nits luminance range), Rec2020 color primaries, ST2086 static HDR metadata. - NV_HDR_MODE_UHDBD = 2, //!< UHD BD HDR == UHDA HDR. UHD BD HDR baseline mandatory output: YCbCr4:2:0 10bpc ST2084(PQ) EOTF, Rec2020 color primaries, ST2086 static HDR metadata. - NV_HDR_MODE_EDR = 3, //!< EDR (Extended Dynamic Range) output - HDR content is tonemaped and gamut mapped to SDR display capabilties. SDR display is set to max luminance (~300 nits). -} NV_HDR_MODE; - -typedef struct _NV_HDR_COLOR_DATA -{ - 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; - -#define NV_HDR_COLOR_DATA_VER1 MAKE_NVAPI_VERSION(NV_HDR_COLOR_DATA, 1) -#define NV_HDR_COLOR_DATA_VER NV_HDR_COLOR_DATA_VER1 - -NVAPI_INTERFACE NvAPI_Disp_HdrColorControl(__in NvU32 displayId, __inout NV_HDR_COLOR_DATA *pHdrColorData); - -//! @} - - -//! \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_DISP_GetTiming -// -//! DESCRIPTION: This function calculates the timing from the visible width/height/refresh-rate and timing type info. -//! -//! SUPPORTED OS: Windows XP 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 Vista 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; - - -//! 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; - } 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 Vista 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 Vista 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_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 XP 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 XP, 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 XP 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 XP 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 Vista 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_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 Vista 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 Vista 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 XP 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); - - -//! SUPPORTED OS: Windows XP 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); - - - - -/////////////////////////////////////////////////////////////////////////////// -// 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 Vista 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 Vista 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); - - - - - -//////////////////////////////////////////////////////////////////////////////////////// -// -// 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 -// -// 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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; - -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 - -//! @} - -//! 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) - - - - -/////////////////////////////////////////////////////////////////////////////// -// -// 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 -/////////////////////////////////////////////////////////////////////////////// - - -//! 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) - -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_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_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 - - -//! 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 NV_GSYNC_CAPABILITIES_V1 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_VER NV_GSYNC_CAPABILITIES_VER1 - - -/////////////////////////////////////////////////////////////////////////////// -// -// 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 reserved:31; //!< 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 -{ - 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; - - -//! \ingroup gsyncapi -//! Macro for constructing the version field of NV_GSYNC_STATUS_PARAMS -#define NV_GSYNC_STATUS_PARAMS_VER MAKE_NVAPI_VERSION(NV_GSYNC_STATUS_PARAMS,1) - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_GSync_GetStatusParameters -// -//! DESCRIPTION: This API queries for sync status parameters as defined in NV_GSYNC_STATUS_PARAMS. -//! -//! SUPPORTED OS: Windows XP 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); - -//! @} - - - - - - - -#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 XP 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 XP 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 XP 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 XP 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 XP 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(__cplusplus) -//! SUPPORTED OS: Windows XP 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) -//! SUPPORTED OS: Windows Vista 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 (__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. -//! SUPPORTED OS: Windows Vista 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. 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 may set this uav slot -//! to some value that is bigger than the max allowed slot index -//! e.g, 128 or 0xFFFFFFFF. -//! To use Nvidia HLSL extensions the application must include nvHLSLExtns.h -//! in the hlsl shader code. See nvHLSLExtns.h for more details. -//! -//! SUPPORTED OS: Windows Vista 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(__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 Vista 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 Vista 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 Vista 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(_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 XP 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__) - -//! SUPPORTED OS: Windows Vista 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 Vista 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 it needs to match N, in non-TIR it needs to match RT sample count. Ignored if ForcePerSampleInterlock is set - NvU8 SamplePositionsX[16]; //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_VER ID3D11MultiGPUDevice_VER2 - -#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__) - -//! 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 -{ - NvU32 version; // parameter struct version - NvU32 bSinglePassStereoSupported; // Single Pass Stereo supported -} NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V1; - -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 - -#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 -//! -//! 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__) - -//! 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 -//! -//! 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(__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 Vista 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 Vista 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 Vista 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 Vista 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 -//! -//! -//! \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_INTERFACE NvAPI_D3D1x_GetLowLatencySupport(__in LUID pAdapterId, - __out BOOL *pIsLowLatencySupported); - -#endif //defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) ) - -///////////////////////////////////////////////////////////////////////// -// Video Input Output (VIO) API -///////////////////////////////////////////////////////////////////////// - - - -//! \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 Vista 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 Vista 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 Vista 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 Vista 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 Vista 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); - - - - - - - - - - - - - - - -//! \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_) -/////////////////////////////////////////////////////////////////////////////// -// -// 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_) - - - - - -//! \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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP and higher -//! -//! -//! \param [in] settingId Input settingId. -//! \param [in,out] maxNumCount 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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 XP 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); - - - - -//! \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 XP and higher, Mac OS X -//! -//! -//! \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 XP 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 XP 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 XP 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 Vista 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); - - - - -#ifdef __cplusplus -}; //extern "C" { - -#endif - -#pragma pack(pop) - -#endif // _NVAPI_H - -#include"nvapi_lite_salend.h" diff --git a/3rd_party/Src/NVAPI/nvapi_lite_common.h b/3rd_party/Src/NVAPI/nvapi_lite_common.h deleted file mode 100644 index 289050f307..0000000000 --- a/3rd_party/Src/NVAPI/nvapi_lite_common.h +++ /dev/null @@ -1,543 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ -#pragma once -#include"nvapi_lite_salstart.h" -#pragma pack(push,8) -#ifdef __cplusplus -extern "C" { -#endif -#if (defined(WIN32) || defined(_WIN32)) && defined(_MSC_VER) && (_MSC_VER > 1399) && !defined(NVAPI_INTERNAL) && !defined(NVAPI_DEPRECATED_OLD) -#ifndef __nvapi_deprecated_function -#define __nvapi_deprecated_function(message) __declspec(deprecated(message)) -#endif -#ifndef __nvapi_deprecated_datatype -#define __nvapi_deprecated_datatype(FirstRelease) __declspec(deprecated("Do not use this data type - it is deprecated in release " #FirstRelease ".")) -#endif -#else -#ifndef __nvapi_deprecated_function -#define __nvapi_deprecated_function(message) -#endif -#ifndef __nvapi_deprecated_datatype -#define __nvapi_deprecated_datatype(FirstRelease) -#endif -#endif - - -/* 64-bit types for compilers that support them, plus some obsolete variants */ -#if defined(__GNUC__) || defined(__arm) || defined(__IAR_SYSTEMS_ICC__) || defined(__ghs__) || defined(_WIN64) -typedef unsigned long long NvU64; /* 0 to 18446744073709551615 */ -typedef long long NvS64; /* -9223372036854775808 to 9223372036854775807 */ -#else -typedef unsigned __int64 NvU64; /* 0 to 18446744073709551615 */ -typedef __int64 NvS64; /* -9223372036854775808 to 9223372036854775807 */ -#endif - -// mac os 32-bit still needs this -#if (defined(macintosh) || defined(__APPLE__)) && !defined(__LP64__) -typedef signed long NvS32; /* -2147483648 to 2147483647 */ -#else -typedef signed int NvS32; /* -2147483648 to 2147483647 */ -#endif - -#ifndef __unix -// mac os 32-bit still needs this -#if ( (defined(macintosh) && defined(__LP64__) && (__NVAPI_RESERVED0__)) || \ - (!defined(macintosh) && defined(__NVAPI_RESERVED0__)) ) -typedef unsigned int NvU32; /* 0 to 4294967295 */ -#else -typedef unsigned long NvU32; /* 0 to 4294967295 */ -#endif -#else -typedef unsigned int NvU32; /* 0 to 4294967295 */ -#endif - -typedef unsigned long temp_NvU32; /* 0 to 4294967295 */ -typedef signed short NvS16; -typedef unsigned short NvU16; -typedef unsigned char NvU8; -typedef signed char NvS8; - -/* 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(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(NvLogicalGpuHandle); //!< One or more physical GPUs acting in concert (SLI) -NV_DECLARE_HANDLE(NvPhysicalGpuHandle); //!< A single physical GPU -NV_DECLARE_HANDLE(NvEventHandle); //!< A handle to an event registration instance -NV_DECLARE_HANDLE(NvVisualComputingDeviceHandle); //!< A handle to a Visual Computing Device -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; -//! @} - -//! \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 NV_MAX_HEADS 4 //!< Maximum heads, each with NVAPI_DESKTOP_RES resolution -#define NVAPI_MAX_HEADS_PER_GPU 32 - -#define NV_MAX_HEADS 4 //!< Maximum number of heads, each with #NVAPI_DESKTOP_RES resolution -#define NV_MAX_VID_STREAMS 4 //!< Maximum number 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_SYSTEM_MAX_DISPLAYS NVAPI_MAX_PHYSICAL_GPUS * NV_MAX_HEADS - -#define NVAPI_SYSTEM_MAX_HWBCS 128 -#define NVAPI_SYSTEM_HWBC_INVALID_ID 0xffffffff -#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]; -//! @} - - -// ========================================================================================= -//! 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, //!< Current User is not Admin. - 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. - 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_Status; - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_SYS_GetDriverAndBranchVersion -// -//! DESCRIPTION: This API returns display driver version and driver-branch string. -//! -//! SUPPORTED OS: Windows XP 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 XP 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_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 XP and higher, Mac OS X -//! -//! -//! \par Introduced in -//! \since Release: 80 -//! -//! \retval NVAPI_INVALID_ARGUMENT nvGPUHandle or pGpuCount is NULL -//! \retval NVAPI_OK One or more handles were returned -//! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found -//! \ingroup gpu -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_EnumPhysicalGPUs(NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount); -#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) - -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__) -#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_D3D_GetObjectHandleForResource -// -//! DESCRIPTION: This API gets a handle to a resource. -//! -//! \param [in] pDev The ID3D11Device, ID3D10Device or IDirect3DDevice9 to use -//! \param [in] pResource The ID3D10Resource, ID3D10Resource or IDirect3DResource9 from which -//! we want the NvAPI handle -//! \param [out] pHandle A handle to the resource -//! -//! SUPPORTED OS: Windows XP 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__) - -#include"nvapi_lite_salend.h" -#ifdef __cplusplus -} -#endif -#pragma pack(pop) diff --git a/3rd_party/Src/NVAPI/nvapi_lite_d3dext.h b/3rd_party/Src/NVAPI/nvapi_lite_d3dext.h deleted file mode 100644 index dae47aa94e..0000000000 --- a/3rd_party/Src/NVAPI/nvapi_lite_d3dext.h +++ /dev/null @@ -1,188 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ -#pragma once -#include"nvapi_lite_salstart.h" -#include"nvapi_lite_common.h" -#pragma pack(push,8) -#ifdef __cplusplus -extern "C" { -#endif -#if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) -//! \ingroup dx -//! D3D_FEATURE_LEVEL supported - used in NvAPI_D3D11_CreateDevice() and NvAPI_D3D11_CreateDeviceAndSwapChain() -typedef enum -{ - NVAPI_DEVICE_FEATURE_LEVEL_NULL = -1, - NVAPI_DEVICE_FEATURE_LEVEL_10_0 = 0, - NVAPI_DEVICE_FEATURE_LEVEL_10_0_PLUS = 1, - NVAPI_DEVICE_FEATURE_LEVEL_10_1 = 2, - NVAPI_DEVICE_FEATURE_LEVEL_11_0 = 3, -} NVAPI_DEVICE_FEATURE_LEVEL; - -#endif //defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)) -#if defined(__cplusplus) && defined(__d3d11_h__) -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_D3D11_CreateDevice -// -//! DESCRIPTION: This function tries to create a DirectX 11 device. If the call fails (if we are running -//! on pre-DirectX 11 hardware), depending on the type of hardware it will try to create a DirectX 10.1 OR DirectX 10.0+ -//! OR DirectX 10.0 device. The function call is the same as D3D11CreateDevice(), but with an extra -//! argument (D3D_FEATURE_LEVEL supported by the device) that the function fills in. This argument -//! can contain -1 (NVAPI_DEVICE_FEATURE_LEVEL_NULL), if the requested featureLevel is less than DirecX 10.0. -//! -//! NOTE: When NvAPI_D3D11_CreateDevice is called with 10+ feature level we have an issue on few set of -//! tesla hardware (G80/G84/G86/G92/G94/G96) which does not support all feature level 10+ functionality -//! e.g. calling driver with mismatch between RenderTarget and Depth Buffer. App developers should -//! take into consideration such limitation when using NVAPI on such tesla hardwares. -//! SUPPORTED OS: Windows Vista 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 Vista and higher -//! -//! -//! \since Release: 185 -//! -//! \param [in] pAdapter -//! \param [in] DriverType -//! \param [in] Software -//! \param [in] Flags -//! \param [in] *pFeatureLevels -//! \param [in] FeatureLevels -//! \param [in] SDKVersion -//! \param [in] *pSwapChainDesc -//! \param [in] **ppSwapChain -//! \param [in] **ppDevice -//! \param [in] *pFeatureLevel -//! \param [in] **ppImmediateContext -//! \param [in] *pSupportedLevel D3D_FEATURE_LEVEL supported -//! -//!return NVAPI_OK if the createDevice with swap chain call succeeded. -//! -//! \ingroup dx -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_D3D11_CreateDeviceAndSwapChain(IDXGIAdapter* pAdapter, - D3D_DRIVER_TYPE DriverType, - HMODULE Software, - UINT Flags, - CONST D3D_FEATURE_LEVEL *pFeatureLevels, - UINT FeatureLevels, - UINT SDKVersion, - CONST DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, - IDXGISwapChain **ppSwapChain, - ID3D11Device **ppDevice, - D3D_FEATURE_LEVEL *pFeatureLevel, - ID3D11DeviceContext **ppImmediateContext, - NVAPI_DEVICE_FEATURE_LEVEL *pSupportedLevel); - - - -#endif //defined(__cplusplus) && defined(__d3d11_h__) -#if defined(__cplusplus) && defined(__d3d11_h__) -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_D3D11_SetDepthBoundsTest -// -//! DESCRIPTION: This function enables/disables the depth bounds test -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \param [in] pDeviceOrContext The device or device context to set depth bounds test -//! \param [in] bEnable Enable(non-zero)/disable(zero) the depth bounds test -//! \param [in] fMinDepth The minimum depth for depth bounds test -//! \param [in] fMaxDepth The maximum depth for depth bounds test -//! The valid values for fMinDepth and fMaxDepth -//! are such that 0 <= fMinDepth <= fMaxDepth <= 1 -//! -//! \return ::NVAPI_OK if the depth bounds test was correcly enabled or disabled -//! -//! \ingroup dx -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_D3D11_SetDepthBoundsTest(IUnknown* pDeviceOrContext, - NvU32 bEnable, - float fMinDepth, - float fMaxDepth); - -#endif //defined(__cplusplus) && defined(__d3d11_h__) - -#include"nvapi_lite_salend.h" -#ifdef __cplusplus -} -#endif -#pragma pack(pop) diff --git a/3rd_party/Src/NVAPI/nvapi_lite_salend.h b/3rd_party/Src/NVAPI/nvapi_lite_salend.h deleted file mode 100644 index b252780891..0000000000 --- a/3rd_party/Src/NVAPI/nvapi_lite_salend.h +++ /dev/null @@ -1,816 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ -#ifndef __NVAPI_EMPTY_SAL -#ifdef __nvapi_undef__ecount - #undef __ecount - #undef __nvapi_undef__ecount -#endif -#ifdef __nvapi_undef__bcount - #undef __bcount - #undef __nvapi_undef__bcount -#endif -#ifdef __nvapi_undef__in - #undef __in - #undef __nvapi_undef__in -#endif -#ifdef __nvapi_undef__in_ecount - #undef __in_ecount - #undef __nvapi_undef__in_ecount -#endif -#ifdef __nvapi_undef__in_bcount - #undef __in_bcount - #undef __nvapi_undef__in_bcount -#endif -#ifdef __nvapi_undef__in_z - #undef __in_z - #undef __nvapi_undef__in_z -#endif -#ifdef __nvapi_undef__in_ecount_z - #undef __in_ecount_z - #undef __nvapi_undef__in_ecount_z -#endif -#ifdef __nvapi_undef__in_bcount_z - #undef __in_bcount_z - #undef __nvapi_undef__in_bcount_z -#endif -#ifdef __nvapi_undef__in_nz - #undef __in_nz - #undef __nvapi_undef__in_nz -#endif -#ifdef __nvapi_undef__in_ecount_nz - #undef __in_ecount_nz - #undef __nvapi_undef__in_ecount_nz -#endif -#ifdef __nvapi_undef__in_bcount_nz - #undef __in_bcount_nz - #undef __nvapi_undef__in_bcount_nz -#endif -#ifdef __nvapi_undef__out - #undef __out - #undef __nvapi_undef__out -#endif -#ifdef __nvapi_undef__out_ecount - #undef __out_ecount - #undef __nvapi_undef__out_ecount -#endif -#ifdef __nvapi_undef__out_bcount - #undef __out_bcount - #undef __nvapi_undef__out_bcount -#endif -#ifdef __nvapi_undef__out_ecount_part - #undef __out_ecount_part - #undef __nvapi_undef__out_ecount_part -#endif -#ifdef __nvapi_undef__out_bcount_part - #undef __out_bcount_part - #undef __nvapi_undef__out_bcount_part -#endif -#ifdef __nvapi_undef__out_ecount_full - #undef __out_ecount_full - #undef __nvapi_undef__out_ecount_full -#endif -#ifdef __nvapi_undef__out_bcount_full - #undef __out_bcount_full - #undef __nvapi_undef__out_bcount_full -#endif -#ifdef __nvapi_undef__out_z - #undef __out_z - #undef __nvapi_undef__out_z -#endif -#ifdef __nvapi_undef__out_z_opt - #undef __out_z_opt - #undef __nvapi_undef__out_z_opt -#endif -#ifdef __nvapi_undef__out_ecount_z - #undef __out_ecount_z - #undef __nvapi_undef__out_ecount_z -#endif -#ifdef __nvapi_undef__out_bcount_z - #undef __out_bcount_z - #undef __nvapi_undef__out_bcount_z -#endif -#ifdef __nvapi_undef__out_ecount_part_z - #undef __out_ecount_part_z - #undef __nvapi_undef__out_ecount_part_z -#endif -#ifdef __nvapi_undef__out_bcount_part_z - #undef __out_bcount_part_z - #undef __nvapi_undef__out_bcount_part_z -#endif -#ifdef __nvapi_undef__out_ecount_full_z - #undef __out_ecount_full_z - #undef __nvapi_undef__out_ecount_full_z -#endif -#ifdef __nvapi_undef__out_bcount_full_z - #undef __out_bcount_full_z - #undef __nvapi_undef__out_bcount_full_z -#endif -#ifdef __nvapi_undef__out_nz - #undef __out_nz - #undef __nvapi_undef__out_nz -#endif -#ifdef __nvapi_undef__out_nz_opt - #undef __out_nz_opt - #undef __nvapi_undef__out_nz_opt -#endif -#ifdef __nvapi_undef__out_ecount_nz - #undef __out_ecount_nz - #undef __nvapi_undef__out_ecount_nz -#endif -#ifdef __nvapi_undef__out_bcount_nz - #undef __out_bcount_nz - #undef __nvapi_undef__out_bcount_nz -#endif -#ifdef __nvapi_undef__inout - #undef __inout - #undef __nvapi_undef__inout -#endif -#ifdef __nvapi_undef__inout_ecount - #undef __inout_ecount - #undef __nvapi_undef__inout_ecount -#endif -#ifdef __nvapi_undef__inout_bcount - #undef __inout_bcount - #undef __nvapi_undef__inout_bcount -#endif -#ifdef __nvapi_undef__inout_ecount_part - #undef __inout_ecount_part - #undef __nvapi_undef__inout_ecount_part -#endif -#ifdef __nvapi_undef__inout_bcount_part - #undef __inout_bcount_part - #undef __nvapi_undef__inout_bcount_part -#endif -#ifdef __nvapi_undef__inout_ecount_full - #undef __inout_ecount_full - #undef __nvapi_undef__inout_ecount_full -#endif -#ifdef __nvapi_undef__inout_bcount_full - #undef __inout_bcount_full - #undef __nvapi_undef__inout_bcount_full -#endif -#ifdef __nvapi_undef__inout_z - #undef __inout_z - #undef __nvapi_undef__inout_z -#endif -#ifdef __nvapi_undef__inout_ecount_z - #undef __inout_ecount_z - #undef __nvapi_undef__inout_ecount_z -#endif -#ifdef __nvapi_undef__inout_bcount_z - #undef __inout_bcount_z - #undef __nvapi_undef__inout_bcount_z -#endif -#ifdef __nvapi_undef__inout_nz - #undef __inout_nz - #undef __nvapi_undef__inout_nz -#endif -#ifdef __nvapi_undef__inout_ecount_nz - #undef __inout_ecount_nz - #undef __nvapi_undef__inout_ecount_nz -#endif -#ifdef __nvapi_undef__inout_bcount_nz - #undef __inout_bcount_nz - #undef __nvapi_undef__inout_bcount_nz -#endif -#ifdef __nvapi_undef__ecount_opt - #undef __ecount_opt - #undef __nvapi_undef__ecount_opt -#endif -#ifdef __nvapi_undef__bcount_opt - #undef __bcount_opt - #undef __nvapi_undef__bcount_opt -#endif -#ifdef __nvapi_undef__in_opt - #undef __in_opt - #undef __nvapi_undef__in_opt -#endif -#ifdef __nvapi_undef__in_ecount_opt - #undef __in_ecount_opt - #undef __nvapi_undef__in_ecount_opt -#endif -#ifdef __nvapi_undef__in_bcount_opt - #undef __in_bcount_opt - #undef __nvapi_undef__in_bcount_opt -#endif -#ifdef __nvapi_undef__in_z_opt - #undef __in_z_opt - #undef __nvapi_undef__in_z_opt -#endif -#ifdef __nvapi_undef__in_ecount_z_opt - #undef __in_ecount_z_opt - #undef __nvapi_undef__in_ecount_z_opt -#endif -#ifdef __nvapi_undef__in_bcount_z_opt - #undef __in_bcount_z_opt - #undef __nvapi_undef__in_bcount_z_opt -#endif -#ifdef __nvapi_undef__in_nz_opt - #undef __in_nz_opt - #undef __nvapi_undef__in_nz_opt -#endif -#ifdef __nvapi_undef__in_ecount_nz_opt - #undef __in_ecount_nz_opt - #undef __nvapi_undef__in_ecount_nz_opt -#endif -#ifdef __nvapi_undef__in_bcount_nz_opt - #undef __in_bcount_nz_opt - #undef __nvapi_undef__in_bcount_nz_opt -#endif -#ifdef __nvapi_undef__out_opt - #undef __out_opt - #undef __nvapi_undef__out_opt -#endif -#ifdef __nvapi_undef__out_ecount_opt - #undef __out_ecount_opt - #undef __nvapi_undef__out_ecount_opt -#endif -#ifdef __nvapi_undef__out_bcount_opt - #undef __out_bcount_opt - #undef __nvapi_undef__out_bcount_opt -#endif -#ifdef __nvapi_undef__out_ecount_part_opt - #undef __out_ecount_part_opt - #undef __nvapi_undef__out_ecount_part_opt -#endif -#ifdef __nvapi_undef__out_bcount_part_opt - #undef __out_bcount_part_opt - #undef __nvapi_undef__out_bcount_part_opt -#endif -#ifdef __nvapi_undef__out_ecount_full_opt - #undef __out_ecount_full_opt - #undef __nvapi_undef__out_ecount_full_opt -#endif -#ifdef __nvapi_undef__out_bcount_full_opt - #undef __out_bcount_full_opt - #undef __nvapi_undef__out_bcount_full_opt -#endif -#ifdef __nvapi_undef__out_ecount_z_opt - #undef __out_ecount_z_opt - #undef __nvapi_undef__out_ecount_z_opt -#endif -#ifdef __nvapi_undef__out_bcount_z_opt - #undef __out_bcount_z_opt - #undef __nvapi_undef__out_bcount_z_opt -#endif -#ifdef __nvapi_undef__out_ecount_part_z_opt - #undef __out_ecount_part_z_opt - #undef __nvapi_undef__out_ecount_part_z_opt -#endif -#ifdef __nvapi_undef__out_bcount_part_z_opt - #undef __out_bcount_part_z_opt - #undef __nvapi_undef__out_bcount_part_z_opt -#endif -#ifdef __nvapi_undef__out_ecount_full_z_opt - #undef __out_ecount_full_z_opt - #undef __nvapi_undef__out_ecount_full_z_opt -#endif -#ifdef __nvapi_undef__out_bcount_full_z_opt - #undef __out_bcount_full_z_opt - #undef __nvapi_undef__out_bcount_full_z_opt -#endif -#ifdef __nvapi_undef__out_ecount_nz_opt - #undef __out_ecount_nz_opt - #undef __nvapi_undef__out_ecount_nz_opt -#endif -#ifdef __nvapi_undef__out_bcount_nz_opt - #undef __out_bcount_nz_opt - #undef __nvapi_undef__out_bcount_nz_opt -#endif -#ifdef __nvapi_undef__inout_opt - #undef __inout_opt - #undef __nvapi_undef__inout_opt -#endif -#ifdef __nvapi_undef__inout_ecount_opt - #undef __inout_ecount_opt - #undef __nvapi_undef__inout_ecount_opt -#endif -#ifdef __nvapi_undef__inout_bcount_opt - #undef __inout_bcount_opt - #undef __nvapi_undef__inout_bcount_opt -#endif -#ifdef __nvapi_undef__inout_ecount_part_opt - #undef __inout_ecount_part_opt - #undef __nvapi_undef__inout_ecount_part_opt -#endif -#ifdef __nvapi_undef__inout_bcount_part_opt - #undef __inout_bcount_part_opt - #undef __nvapi_undef__inout_bcount_part_opt -#endif -#ifdef __nvapi_undef__inout_ecount_full_opt - #undef __inout_ecount_full_opt - #undef __nvapi_undef__inout_ecount_full_opt -#endif -#ifdef __nvapi_undef__inout_bcount_full_opt - #undef __inout_bcount_full_opt - #undef __nvapi_undef__inout_bcount_full_opt -#endif -#ifdef __nvapi_undef__inout_z_opt - #undef __inout_z_opt - #undef __nvapi_undef__inout_z_opt -#endif -#ifdef __nvapi_undef__inout_ecount_z_opt - #undef __inout_ecount_z_opt - #undef __nvapi_undef__inout_ecount_z_opt -#endif -#ifdef __nvapi_undef__inout_ecount_z_opt - #undef __inout_ecount_z_opt - #undef __nvapi_undef__inout_ecount_z_opt -#endif -#ifdef __nvapi_undef__inout_bcount_z_opt - #undef __inout_bcount_z_opt - #undef __nvapi_undef__inout_bcount_z_opt -#endif -#ifdef __nvapi_undef__inout_nz_opt - #undef __inout_nz_opt - #undef __nvapi_undef__inout_nz_opt -#endif -#ifdef __nvapi_undef__inout_ecount_nz_opt - #undef __inout_ecount_nz_opt - #undef __nvapi_undef__inout_ecount_nz_opt -#endif -#ifdef __nvapi_undef__inout_bcount_nz_opt - #undef __inout_bcount_nz_opt - #undef __nvapi_undef__inout_bcount_nz_opt -#endif -#ifdef __nvapi_undef__deref_ecount - #undef __deref_ecount - #undef __nvapi_undef__deref_ecount -#endif -#ifdef __nvapi_undef__deref_bcount - #undef __deref_bcount - #undef __nvapi_undef__deref_bcount -#endif -#ifdef __nvapi_undef__deref_out - #undef __deref_out - #undef __nvapi_undef__deref_out -#endif -#ifdef __nvapi_undef__deref_out_ecount - #undef __deref_out_ecount - #undef __nvapi_undef__deref_out_ecount -#endif -#ifdef __nvapi_undef__deref_out_bcount - #undef __deref_out_bcount - #undef __nvapi_undef__deref_out_bcount -#endif -#ifdef __nvapi_undef__deref_out_ecount_part - #undef __deref_out_ecount_part - #undef __nvapi_undef__deref_out_ecount_part -#endif -#ifdef __nvapi_undef__deref_out_bcount_part - #undef __deref_out_bcount_part - #undef __nvapi_undef__deref_out_bcount_part -#endif -#ifdef __nvapi_undef__deref_out_ecount_full - #undef __deref_out_ecount_full - #undef __nvapi_undef__deref_out_ecount_full -#endif -#ifdef __nvapi_undef__deref_out_bcount_full - #undef __deref_out_bcount_full - #undef __nvapi_undef__deref_out_bcount_full -#endif -#ifdef __nvapi_undef__deref_out_z - #undef __deref_out_z - #undef __nvapi_undef__deref_out_z -#endif -#ifdef __nvapi_undef__deref_out_ecount_z - #undef __deref_out_ecount_z - #undef __nvapi_undef__deref_out_ecount_z -#endif -#ifdef __nvapi_undef__deref_out_bcount_z - #undef __deref_out_bcount_z - #undef __nvapi_undef__deref_out_bcount_z -#endif -#ifdef __nvapi_undef__deref_out_nz - #undef __deref_out_nz - #undef __nvapi_undef__deref_out_nz -#endif -#ifdef __nvapi_undef__deref_out_ecount_nz - #undef __deref_out_ecount_nz - #undef __nvapi_undef__deref_out_ecount_nz -#endif -#ifdef __nvapi_undef__deref_out_bcount_nz - #undef __deref_out_bcount_nz - #undef __nvapi_undef__deref_out_bcount_nz -#endif -#ifdef __nvapi_undef__deref_inout - #undef __deref_inout - #undef __nvapi_undef__deref_inout -#endif -#ifdef __nvapi_undef__deref_inout_z - #undef __deref_inout_z - #undef __nvapi_undef__deref_inout_z -#endif -#ifdef __nvapi_undef__deref_inout_ecount - #undef __deref_inout_ecount - #undef __nvapi_undef__deref_inout_ecount -#endif -#ifdef __nvapi_undef__deref_inout_bcount - #undef __deref_inout_bcount - #undef __nvapi_undef__deref_inout_bcount -#endif -#ifdef __nvapi_undef__deref_inout_ecount_part - #undef __deref_inout_ecount_part - #undef __nvapi_undef__deref_inout_ecount_part -#endif -#ifdef __nvapi_undef__deref_inout_bcount_part - #undef __deref_inout_bcount_part - #undef __nvapi_undef__deref_inout_bcount_part -#endif -#ifdef __nvapi_undef__deref_inout_ecount_full - #undef __deref_inout_ecount_full - #undef __nvapi_undef__deref_inout_ecount_full -#endif -#ifdef __nvapi_undef__deref_inout_bcount_full - #undef __deref_inout_bcount_full - #undef __nvapi_undef__deref_inout_bcount_full -#endif -#ifdef __nvapi_undef__deref_inout_z - #undef __deref_inout_z - #undef __nvapi_undef__deref_inout_z -#endif -#ifdef __nvapi_undef__deref_inout_ecount_z - #undef __deref_inout_ecount_z - #undef __nvapi_undef__deref_inout_ecount_z -#endif -#ifdef __nvapi_undef__deref_inout_bcount_z - #undef __deref_inout_bcount_z - #undef __nvapi_undef__deref_inout_bcount_z -#endif -#ifdef __nvapi_undef__deref_inout_nz - #undef __deref_inout_nz - #undef __nvapi_undef__deref_inout_nz -#endif -#ifdef __nvapi_undef__deref_inout_ecount_nz - #undef __deref_inout_ecount_nz - #undef __nvapi_undef__deref_inout_ecount_nz -#endif -#ifdef __nvapi_undef__deref_inout_bcount_nz - #undef __deref_inout_bcount_nz - #undef __nvapi_undef__deref_inout_bcount_nz -#endif -#ifdef __nvapi_undef__deref_ecount_opt - #undef __deref_ecount_opt - #undef __nvapi_undef__deref_ecount_opt -#endif -#ifdef __nvapi_undef__deref_bcount_opt - #undef __deref_bcount_opt - #undef __nvapi_undef__deref_bcount_opt -#endif -#ifdef __nvapi_undef__deref_out_opt - #undef __deref_out_opt - #undef __nvapi_undef__deref_out_opt -#endif -#ifdef __nvapi_undef__deref_out_ecount_opt - #undef __deref_out_ecount_opt - #undef __nvapi_undef__deref_out_ecount_opt -#endif -#ifdef __nvapi_undef__deref_out_bcount_opt - #undef __deref_out_bcount_opt - #undef __nvapi_undef__deref_out_bcount_opt -#endif -#ifdef __nvapi_undef__deref_out_ecount_part_opt - #undef __deref_out_ecount_part_opt - #undef __nvapi_undef__deref_out_ecount_part_opt -#endif -#ifdef __nvapi_undef__deref_out_bcount_part_opt - #undef __deref_out_bcount_part_opt - #undef __nvapi_undef__deref_out_bcount_part_opt -#endif -#ifdef __nvapi_undef__deref_out_ecount_full_opt - #undef __deref_out_ecount_full_opt - #undef __nvapi_undef__deref_out_ecount_full_opt -#endif -#ifdef __nvapi_undef__deref_out_bcount_full_opt - #undef __deref_out_bcount_full_opt - #undef __nvapi_undef__deref_out_bcount_full_opt -#endif -#ifdef __nvapi_undef__deref_out_z_opt - #undef __deref_out_z_opt - #undef __nvapi_undef__deref_out_z_opt -#endif -#ifdef __nvapi_undef__deref_out_ecount_z_opt - #undef __deref_out_ecount_z_opt - #undef __nvapi_undef__deref_out_ecount_z_opt -#endif -#ifdef __nvapi_undef__deref_out_bcount_z_opt - #undef __deref_out_bcount_z_opt - #undef __nvapi_undef__deref_out_bcount_z_opt -#endif -#ifdef __nvapi_undef__deref_out_nz_opt - #undef __deref_out_nz_opt - #undef __nvapi_undef__deref_out_nz_opt -#endif -#ifdef __nvapi_undef__deref_out_ecount_nz_opt - #undef __deref_out_ecount_nz_opt - #undef __nvapi_undef__deref_out_ecount_nz_opt -#endif -#ifdef __nvapi_undef__deref_out_bcount_nz_opt - #undef __deref_out_bcount_nz_opt - #undef __nvapi_undef__deref_out_bcount_nz_opt -#endif -#ifdef __nvapi_undef__deref_inout_opt - #undef __deref_inout_opt - #undef __nvapi_undef__deref_inout_opt -#endif -#ifdef __nvapi_undef__deref_inout_ecount_opt - #undef __deref_inout_ecount_opt - #undef __nvapi_undef__deref_inout_ecount_opt -#endif -#ifdef __nvapi_undef__deref_inout_bcount_opt - #undef __deref_inout_bcount_opt - #undef __nvapi_undef__deref_inout_bcount_opt -#endif -#ifdef __nvapi_undef__deref_inout_ecount_part_opt - #undef __deref_inout_ecount_part_opt - #undef __nvapi_undef__deref_inout_ecount_part_opt -#endif -#ifdef __nvapi_undef__deref_inout_bcount_part_opt - #undef __deref_inout_bcount_part_opt - #undef __nvapi_undef__deref_inout_bcount_part_opt -#endif -#ifdef __nvapi_undef__deref_inout_ecount_full_opt - #undef __deref_inout_ecount_full_opt - #undef __nvapi_undef__deref_inout_ecount_full_opt -#endif -#ifdef __nvapi_undef__deref_inout_bcount_full_opt - #undef __deref_inout_bcount_full_opt - #undef __nvapi_undef__deref_inout_bcount_full_opt -#endif -#ifdef __nvapi_undef__deref_inout_z_opt - #undef __deref_inout_z_opt - #undef __nvapi_undef__deref_inout_z_opt -#endif -#ifdef __nvapi_undef__deref_inout_ecount_z_opt - #undef __deref_inout_ecount_z_opt - #undef __nvapi_undef__deref_inout_ecount_z_opt -#endif -#ifdef __nvapi_undef__deref_inout_bcount_z_opt - #undef __deref_inout_bcount_z_opt - #undef __nvapi_undef__deref_inout_bcount_z_opt -#endif -#ifdef __nvapi_undef__deref_inout_nz_opt - #undef __deref_inout_nz_opt - #undef __nvapi_undef__deref_inout_nz_opt -#endif -#ifdef __nvapi_undef__deref_inout_ecount_nz_opt - #undef __deref_inout_ecount_nz_opt - #undef __nvapi_undef__deref_inout_ecount_nz_opt -#endif -#ifdef __nvapi_undef__deref_inout_bcount_nz_opt - #undef __deref_inout_bcount_nz_opt - #undef __nvapi_undef__deref_inout_bcount_nz_opt -#endif -#ifdef __nvapi_undef__deref_opt_ecount - #undef __deref_opt_ecount - #undef __nvapi_undef__deref_opt_ecount -#endif -#ifdef __nvapi_undef__deref_opt_bcount - #undef __deref_opt_bcount - #undef __nvapi_undef__deref_opt_bcount -#endif -#ifdef __nvapi_undef__deref_opt_out - #undef __deref_opt_out - #undef __nvapi_undef__deref_opt_out -#endif -#ifdef __nvapi_undef__deref_opt_out_z - #undef __deref_opt_out_z - #undef __nvapi_undef__deref_opt_out_z -#endif -#ifdef __nvapi_undef__deref_opt_out_ecount - #undef __deref_opt_out_ecount - #undef __nvapi_undef__deref_opt_out_ecount -#endif -#ifdef __nvapi_undef__deref_opt_out_bcount - #undef __deref_opt_out_bcount - #undef __nvapi_undef__deref_opt_out_bcount -#endif -#ifdef __nvapi_undef__deref_opt_out_ecount_part - #undef __deref_opt_out_ecount_part - #undef __nvapi_undef__deref_opt_out_ecount_part -#endif -#ifdef __nvapi_undef__deref_opt_out_bcount_part - #undef __deref_opt_out_bcount_part - #undef __nvapi_undef__deref_opt_out_bcount_part -#endif -#ifdef __nvapi_undef__deref_opt_out_ecount_full - #undef __deref_opt_out_ecount_full - #undef __nvapi_undef__deref_opt_out_ecount_full -#endif -#ifdef __nvapi_undef__deref_opt_out_bcount_full - #undef __deref_opt_out_bcount_full - #undef __nvapi_undef__deref_opt_out_bcount_full -#endif -#ifdef __nvapi_undef__deref_opt_inout - #undef __deref_opt_inout - #undef __nvapi_undef__deref_opt_inout -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount - #undef __deref_opt_inout_ecount - #undef __nvapi_undef__deref_opt_inout_ecount -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount - #undef __deref_opt_inout_bcount - #undef __nvapi_undef__deref_opt_inout_bcount -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount_part - #undef __deref_opt_inout_ecount_part - #undef __nvapi_undef__deref_opt_inout_ecount_part -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount_part - #undef __deref_opt_inout_bcount_part - #undef __nvapi_undef__deref_opt_inout_bcount_part -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount_full - #undef __deref_opt_inout_ecount_full - #undef __nvapi_undef__deref_opt_inout_ecount_full -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount_full - #undef __deref_opt_inout_bcount_full - #undef __nvapi_undef__deref_opt_inout_bcount_full -#endif -#ifdef __nvapi_undef__deref_opt_inout_z - #undef __deref_opt_inout_z - #undef __nvapi_undef__deref_opt_inout_z -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount_z - #undef __deref_opt_inout_ecount_z - #undef __nvapi_undef__deref_opt_inout_ecount_z -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount_z - #undef __deref_opt_inout_bcount_z - #undef __nvapi_undef__deref_opt_inout_bcount_z -#endif -#ifdef __nvapi_undef__deref_opt_inout_nz - #undef __deref_opt_inout_nz - #undef __nvapi_undef__deref_opt_inout_nz -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount_nz - #undef __deref_opt_inout_ecount_nz - #undef __nvapi_undef__deref_opt_inout_ecount_nz -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount_nz - #undef __deref_opt_inout_bcount_nz - #undef __nvapi_undef__deref_opt_inout_bcount_nz -#endif -#ifdef __nvapi_undef__deref_opt_ecount_opt - #undef __deref_opt_ecount_opt - #undef __nvapi_undef__deref_opt_ecount_opt -#endif -#ifdef __nvapi_undef__deref_opt_bcount_opt - #undef __deref_opt_bcount_opt - #undef __nvapi_undef__deref_opt_bcount_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_opt - #undef __deref_opt_out_opt - #undef __nvapi_undef__deref_opt_out_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_ecount_opt - #undef __deref_opt_out_ecount_opt - #undef __nvapi_undef__deref_opt_out_ecount_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_bcount_opt - #undef __deref_opt_out_bcount_opt - #undef __nvapi_undef__deref_opt_out_bcount_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_ecount_part_opt - #undef __deref_opt_out_ecount_part_opt - #undef __nvapi_undef__deref_opt_out_ecount_part_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_bcount_part_opt - #undef __deref_opt_out_bcount_part_opt - #undef __nvapi_undef__deref_opt_out_bcount_part_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_ecount_full_opt - #undef __deref_opt_out_ecount_full_opt - #undef __nvapi_undef__deref_opt_out_ecount_full_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_bcount_full_opt - #undef __deref_opt_out_bcount_full_opt - #undef __nvapi_undef__deref_opt_out_bcount_full_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_z_opt - #undef __deref_opt_out_z_opt - #undef __nvapi_undef__deref_opt_out_z_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_ecount_z_opt - #undef __deref_opt_out_ecount_z_opt - #undef __nvapi_undef__deref_opt_out_ecount_z_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_bcount_z_opt - #undef __deref_opt_out_bcount_z_opt - #undef __nvapi_undef__deref_opt_out_bcount_z_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_nz_opt - #undef __deref_opt_out_nz_opt - #undef __nvapi_undef__deref_opt_out_nz_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_ecount_nz_opt - #undef __deref_opt_out_ecount_nz_opt - #undef __nvapi_undef__deref_opt_out_ecount_nz_opt -#endif -#ifdef __nvapi_undef__deref_opt_out_bcount_nz_opt - #undef __deref_opt_out_bcount_nz_opt - #undef __nvapi_undef__deref_opt_out_bcount_nz_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_opt - #undef __deref_opt_inout_opt - #undef __nvapi_undef__deref_opt_inout_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount_opt - #undef __deref_opt_inout_ecount_opt - #undef __nvapi_undef__deref_opt_inout_ecount_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount_opt - #undef __deref_opt_inout_bcount_opt - #undef __nvapi_undef__deref_opt_inout_bcount_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount_part_opt - #undef __deref_opt_inout_ecount_part_opt - #undef __nvapi_undef__deref_opt_inout_ecount_part_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount_part_opt - #undef __deref_opt_inout_bcount_part_opt - #undef __nvapi_undef__deref_opt_inout_bcount_part_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount_full_opt - #undef __deref_opt_inout_ecount_full_opt - #undef __nvapi_undef__deref_opt_inout_ecount_full_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount_full_opt - #undef __deref_opt_inout_bcount_full_opt - #undef __nvapi_undef__deref_opt_inout_bcount_full_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_z_opt - #undef __deref_opt_inout_z_opt - #undef __nvapi_undef__deref_opt_inout_z_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount_z_opt - #undef __deref_opt_inout_ecount_z_opt - #undef __nvapi_undef__deref_opt_inout_ecount_z_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount_z_opt - #undef __deref_opt_inout_bcount_z_opt - #undef __nvapi_undef__deref_opt_inout_bcount_z_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_nz_opt - #undef __deref_opt_inout_nz_opt - #undef __nvapi_undef__deref_opt_inout_nz_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_ecount_nz_opt - #undef __deref_opt_inout_ecount_nz_opt - #undef __nvapi_undef__deref_opt_inout_ecount_nz_opt -#endif -#ifdef __nvapi_undef__deref_opt_inout_bcount_nz_opt - #undef __deref_opt_inout_bcount_nz_opt - #undef __nvapi_undef__deref_opt_inout_bcount_nz_opt -#endif -#ifdef __nvapi_success - #undef __success - #undef __nvapi_success -#endif -#ifdef __nvapi__Ret_notnull_ - #undef __nvapi__Ret_notnull_ - #undef _Ret_notnull_ -#endif -#ifdef __nvapi__Post_writable_byte_size_ - #undef __nvapi__Post_writable_byte_size_ - #undef _Post_writable_byte_size_ -#endif -#ifdef __nvapi_Outptr_ - #undef __nvapi_Outptr_ - #undef _Outptr_ -#endif - -#endif // __NVAPI_EMPTY_SAL diff --git a/3rd_party/Src/NVAPI/nvapi_lite_salstart.h b/3rd_party/Src/NVAPI/nvapi_lite_salstart.h deleted file mode 100644 index a079ec35c5..0000000000 --- a/3rd_party/Src/NVAPI/nvapi_lite_salstart.h +++ /dev/null @@ -1,821 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ - -// ==================================================== -// SAL related support -// ==================================================== - -#ifndef __ecount - #define __nvapi_undef__ecount - #define __ecount(size) -#endif -#ifndef __bcount - #define __nvapi_undef__bcount - #define __bcount(size) -#endif -#ifndef __in - #define __nvapi_undef__in - #define __in -#endif -#ifndef __in_ecount - #define __nvapi_undef__in_ecount - #define __in_ecount(size) -#endif -#ifndef __in_bcount - #define __nvapi_undef__in_bcount - #define __in_bcount(size) -#endif -#ifndef __in_z - #define __nvapi_undef__in_z - #define __in_z -#endif -#ifndef __in_ecount_z - #define __nvapi_undef__in_ecount_z - #define __in_ecount_z(size) -#endif -#ifndef __in_bcount_z - #define __nvapi_undef__in_bcount_z - #define __in_bcount_z(size) -#endif -#ifndef __in_nz - #define __nvapi_undef__in_nz - #define __in_nz -#endif -#ifndef __in_ecount_nz - #define __nvapi_undef__in_ecount_nz - #define __in_ecount_nz(size) -#endif -#ifndef __in_bcount_nz - #define __nvapi_undef__in_bcount_nz - #define __in_bcount_nz(size) -#endif -#ifndef __out - #define __nvapi_undef__out - #define __out -#endif -#ifndef __out_ecount - #define __nvapi_undef__out_ecount - #define __out_ecount(size) -#endif -#ifndef __out_bcount - #define __nvapi_undef__out_bcount - #define __out_bcount(size) -#endif -#ifndef __out_ecount_part - #define __nvapi_undef__out_ecount_part - #define __out_ecount_part(size,length) -#endif -#ifndef __out_bcount_part - #define __nvapi_undef__out_bcount_part - #define __out_bcount_part(size,length) -#endif -#ifndef __out_ecount_full - #define __nvapi_undef__out_ecount_full - #define __out_ecount_full(size) -#endif -#ifndef __out_bcount_full - #define __nvapi_undef__out_bcount_full - #define __out_bcount_full(size) -#endif -#ifndef __out_z - #define __nvapi_undef__out_z - #define __out_z -#endif -#ifndef __out_z_opt - #define __nvapi_undef__out_z_opt - #define __out_z_opt -#endif -#ifndef __out_ecount_z - #define __nvapi_undef__out_ecount_z - #define __out_ecount_z(size) -#endif -#ifndef __out_bcount_z - #define __nvapi_undef__out_bcount_z - #define __out_bcount_z(size) -#endif -#ifndef __out_ecount_part_z - #define __nvapi_undef__out_ecount_part_z - #define __out_ecount_part_z(size,length) -#endif -#ifndef __out_bcount_part_z - #define __nvapi_undef__out_bcount_part_z - #define __out_bcount_part_z(size,length) -#endif -#ifndef __out_ecount_full_z - #define __nvapi_undef__out_ecount_full_z - #define __out_ecount_full_z(size) -#endif -#ifndef __out_bcount_full_z - #define __nvapi_undef__out_bcount_full_z - #define __out_bcount_full_z(size) -#endif -#ifndef __out_nz - #define __nvapi_undef__out_nz - #define __out_nz -#endif -#ifndef __out_nz_opt - #define __nvapi_undef__out_nz_opt - #define __out_nz_opt -#endif -#ifndef __out_ecount_nz - #define __nvapi_undef__out_ecount_nz - #define __out_ecount_nz(size) -#endif -#ifndef __out_bcount_nz - #define __nvapi_undef__out_bcount_nz - #define __out_bcount_nz(size) -#endif -#ifndef __inout - #define __nvapi_undef__inout - #define __inout -#endif -#ifndef __inout_ecount - #define __nvapi_undef__inout_ecount - #define __inout_ecount(size) -#endif -#ifndef __inout_bcount - #define __nvapi_undef__inout_bcount - #define __inout_bcount(size) -#endif -#ifndef __inout_ecount_part - #define __nvapi_undef__inout_ecount_part - #define __inout_ecount_part(size,length) -#endif -#ifndef __inout_bcount_part - #define __nvapi_undef__inout_bcount_part - #define __inout_bcount_part(size,length) -#endif -#ifndef __inout_ecount_full - #define __nvapi_undef__inout_ecount_full - #define __inout_ecount_full(size) -#endif -#ifndef __inout_bcount_full - #define __nvapi_undef__inout_bcount_full - #define __inout_bcount_full(size) -#endif -#ifndef __inout_z - #define __nvapi_undef__inout_z - #define __inout_z -#endif -#ifndef __inout_ecount_z - #define __nvapi_undef__inout_ecount_z - #define __inout_ecount_z(size) -#endif -#ifndef __inout_bcount_z - #define __nvapi_undef__inout_bcount_z - #define __inout_bcount_z(size) -#endif -#ifndef __inout_nz - #define __nvapi_undef__inout_nz - #define __inout_nz -#endif -#ifndef __inout_ecount_nz - #define __nvapi_undef__inout_ecount_nz - #define __inout_ecount_nz(size) -#endif -#ifndef __inout_bcount_nz - #define __nvapi_undef__inout_bcount_nz - #define __inout_bcount_nz(size) -#endif -#ifndef __ecount_opt - #define __nvapi_undef__ecount_opt - #define __ecount_opt(size) -#endif -#ifndef __bcount_opt - #define __nvapi_undef__bcount_opt - #define __bcount_opt(size) -#endif -#ifndef __in_opt - #define __nvapi_undef__in_opt - #define __in_opt -#endif -#ifndef __in_ecount_opt - #define __nvapi_undef__in_ecount_opt - #define __in_ecount_opt(size) -#endif -#ifndef __in_bcount_opt - #define __nvapi_undef__in_bcount_opt - #define __in_bcount_opt(size) -#endif -#ifndef __in_z_opt - #define __nvapi_undef__in_z_opt - #define __in_z_opt -#endif -#ifndef __in_ecount_z_opt - #define __nvapi_undef__in_ecount_z_opt - #define __in_ecount_z_opt(size) -#endif -#ifndef __in_bcount_z_opt - #define __nvapi_undef__in_bcount_z_opt - #define __in_bcount_z_opt(size) -#endif -#ifndef __in_nz_opt - #define __nvapi_undef__in_nz_opt - #define __in_nz_opt -#endif -#ifndef __in_ecount_nz_opt - #define __nvapi_undef__in_ecount_nz_opt - #define __in_ecount_nz_opt(size) -#endif -#ifndef __in_bcount_nz_opt - #define __nvapi_undef__in_bcount_nz_opt - #define __in_bcount_nz_opt(size) -#endif -#ifndef __out_opt - #define __nvapi_undef__out_opt - #define __out_opt -#endif -#ifndef __out_ecount_opt - #define __nvapi_undef__out_ecount_opt - #define __out_ecount_opt(size) -#endif -#ifndef __out_bcount_opt - #define __nvapi_undef__out_bcount_opt - #define __out_bcount_opt(size) -#endif -#ifndef __out_ecount_part_opt - #define __nvapi_undef__out_ecount_part_opt - #define __out_ecount_part_opt(size,length) -#endif -#ifndef __out_bcount_part_opt - #define __nvapi_undef__out_bcount_part_opt - #define __out_bcount_part_opt(size,length) -#endif -#ifndef __out_ecount_full_opt - #define __nvapi_undef__out_ecount_full_opt - #define __out_ecount_full_opt(size) -#endif -#ifndef __out_bcount_full_opt - #define __nvapi_undef__out_bcount_full_opt - #define __out_bcount_full_opt(size) -#endif -#ifndef __out_ecount_z_opt - #define __nvapi_undef__out_ecount_z_opt - #define __out_ecount_z_opt(size) -#endif -#ifndef __out_bcount_z_opt - #define __nvapi_undef__out_bcount_z_opt - #define __out_bcount_z_opt(size) -#endif -#ifndef __out_ecount_part_z_opt - #define __nvapi_undef__out_ecount_part_z_opt - #define __out_ecount_part_z_opt(size,length) -#endif -#ifndef __out_bcount_part_z_opt - #define __nvapi_undef__out_bcount_part_z_opt - #define __out_bcount_part_z_opt(size,length) -#endif -#ifndef __out_ecount_full_z_opt - #define __nvapi_undef__out_ecount_full_z_opt - #define __out_ecount_full_z_opt(size) -#endif -#ifndef __out_bcount_full_z_opt - #define __nvapi_undef__out_bcount_full_z_opt - #define __out_bcount_full_z_opt(size) -#endif -#ifndef __out_ecount_nz_opt - #define __nvapi_undef__out_ecount_nz_opt - #define __out_ecount_nz_opt(size) -#endif -#ifndef __out_bcount_nz_opt - #define __nvapi_undef__out_bcount_nz_opt - #define __out_bcount_nz_opt(size) -#endif -#ifndef __inout_opt - #define __nvapi_undef__inout_opt - #define __inout_opt -#endif -#ifndef __inout_ecount_opt - #define __nvapi_undef__inout_ecount_opt - #define __inout_ecount_opt(size) -#endif -#ifndef __inout_bcount_opt - #define __nvapi_undef__inout_bcount_opt - #define __inout_bcount_opt(size) -#endif -#ifndef __inout_ecount_part_opt - #define __nvapi_undef__inout_ecount_part_opt - #define __inout_ecount_part_opt(size,length) -#endif -#ifndef __inout_bcount_part_opt - #define __nvapi_undef__inout_bcount_part_opt - #define __inout_bcount_part_opt(size,length) -#endif -#ifndef __inout_ecount_full_opt - #define __nvapi_undef__inout_ecount_full_opt - #define __inout_ecount_full_opt(size) -#endif -#ifndef __inout_bcount_full_opt - #define __nvapi_undef__inout_bcount_full_opt - #define __inout_bcount_full_opt(size) -#endif -#ifndef __inout_z_opt - #define __nvapi_undef__inout_z_opt - #define __inout_z_opt -#endif -#ifndef __inout_ecount_z_opt - #define __nvapi_undef__inout_ecount_z_opt - #define __inout_ecount_z_opt(size) -#endif -#ifndef __inout_ecount_z_opt - #define __nvapi_undef__inout_ecount_z_opt - #define __inout_ecount_z_opt(size) -#endif -#ifndef __inout_bcount_z_opt - #define __nvapi_undef__inout_bcount_z_opt - #define __inout_bcount_z_opt(size) -#endif -#ifndef __inout_nz_opt - #define __nvapi_undef__inout_nz_opt - #define __inout_nz_opt -#endif -#ifndef __inout_ecount_nz_opt - #define __nvapi_undef__inout_ecount_nz_opt - #define __inout_ecount_nz_opt(size) -#endif -#ifndef __inout_bcount_nz_opt - #define __nvapi_undef__inout_bcount_nz_opt - #define __inout_bcount_nz_opt(size) -#endif -#ifndef __deref_ecount - #define __nvapi_undef__deref_ecount - #define __deref_ecount(size) -#endif -#ifndef __deref_bcount - #define __nvapi_undef__deref_bcount - #define __deref_bcount(size) -#endif -#ifndef __deref_out - #define __nvapi_undef__deref_out - #define __deref_out -#endif -#ifndef __deref_out_ecount - #define __nvapi_undef__deref_out_ecount - #define __deref_out_ecount(size) -#endif -#ifndef __deref_out_bcount - #define __nvapi_undef__deref_out_bcount - #define __deref_out_bcount(size) -#endif -#ifndef __deref_out_ecount_part - #define __nvapi_undef__deref_out_ecount_part - #define __deref_out_ecount_part(size,length) -#endif -#ifndef __deref_out_bcount_part - #define __nvapi_undef__deref_out_bcount_part - #define __deref_out_bcount_part(size,length) -#endif -#ifndef __deref_out_ecount_full - #define __nvapi_undef__deref_out_ecount_full - #define __deref_out_ecount_full(size) -#endif -#ifndef __deref_out_bcount_full - #define __nvapi_undef__deref_out_bcount_full - #define __deref_out_bcount_full(size) -#endif -#ifndef __deref_out_z - #define __nvapi_undef__deref_out_z - #define __deref_out_z -#endif -#ifndef __deref_out_ecount_z - #define __nvapi_undef__deref_out_ecount_z - #define __deref_out_ecount_z(size) -#endif -#ifndef __deref_out_bcount_z - #define __nvapi_undef__deref_out_bcount_z - #define __deref_out_bcount_z(size) -#endif -#ifndef __deref_out_nz - #define __nvapi_undef__deref_out_nz - #define __deref_out_nz -#endif -#ifndef __deref_out_ecount_nz - #define __nvapi_undef__deref_out_ecount_nz - #define __deref_out_ecount_nz(size) -#endif -#ifndef __deref_out_bcount_nz - #define __nvapi_undef__deref_out_bcount_nz - #define __deref_out_bcount_nz(size) -#endif -#ifndef __deref_inout - #define __nvapi_undef__deref_inout - #define __deref_inout -#endif -#ifndef __deref_inout_z - #define __nvapi_undef__deref_inout_z - #define __deref_inout_z -#endif -#ifndef __deref_inout_ecount - #define __nvapi_undef__deref_inout_ecount - #define __deref_inout_ecount(size) -#endif -#ifndef __deref_inout_bcount - #define __nvapi_undef__deref_inout_bcount - #define __deref_inout_bcount(size) -#endif -#ifndef __deref_inout_ecount_part - #define __nvapi_undef__deref_inout_ecount_part - #define __deref_inout_ecount_part(size,length) -#endif -#ifndef __deref_inout_bcount_part - #define __nvapi_undef__deref_inout_bcount_part - #define __deref_inout_bcount_part(size,length) -#endif -#ifndef __deref_inout_ecount_full - #define __nvapi_undef__deref_inout_ecount_full - #define __deref_inout_ecount_full(size) -#endif -#ifndef __deref_inout_bcount_full - #define __nvapi_undef__deref_inout_bcount_full - #define __deref_inout_bcount_full(size) -#endif -#ifndef __deref_inout_z - #define __nvapi_undef__deref_inout_z - #define __deref_inout_z -#endif -#ifndef __deref_inout_ecount_z - #define __nvapi_undef__deref_inout_ecount_z - #define __deref_inout_ecount_z(size) -#endif -#ifndef __deref_inout_bcount_z - #define __nvapi_undef__deref_inout_bcount_z - #define __deref_inout_bcount_z(size) -#endif -#ifndef __deref_inout_nz - #define __nvapi_undef__deref_inout_nz - #define __deref_inout_nz -#endif -#ifndef __deref_inout_ecount_nz - #define __nvapi_undef__deref_inout_ecount_nz - #define __deref_inout_ecount_nz(size) -#endif -#ifndef __deref_inout_bcount_nz - #define __nvapi_undef__deref_inout_bcount_nz - #define __deref_inout_bcount_nz(size) -#endif -#ifndef __deref_ecount_opt - #define __nvapi_undef__deref_ecount_opt - #define __deref_ecount_opt(size) -#endif -#ifndef __deref_bcount_opt - #define __nvapi_undef__deref_bcount_opt - #define __deref_bcount_opt(size) -#endif -#ifndef __deref_out_opt - #define __nvapi_undef__deref_out_opt - #define __deref_out_opt -#endif -#ifndef __deref_out_ecount_opt - #define __nvapi_undef__deref_out_ecount_opt - #define __deref_out_ecount_opt(size) -#endif -#ifndef __deref_out_bcount_opt - #define __nvapi_undef__deref_out_bcount_opt - #define __deref_out_bcount_opt(size) -#endif -#ifndef __deref_out_ecount_part_opt - #define __nvapi_undef__deref_out_ecount_part_opt - #define __deref_out_ecount_part_opt(size,length) -#endif -#ifndef __deref_out_bcount_part_opt - #define __nvapi_undef__deref_out_bcount_part_opt - #define __deref_out_bcount_part_opt(size,length) -#endif -#ifndef __deref_out_ecount_full_opt - #define __nvapi_undef__deref_out_ecount_full_opt - #define __deref_out_ecount_full_opt(size) -#endif -#ifndef __deref_out_bcount_full_opt - #define __nvapi_undef__deref_out_bcount_full_opt - #define __deref_out_bcount_full_opt(size) -#endif -#ifndef __deref_out_z_opt - #define __nvapi_undef__deref_out_z_opt - #define __deref_out_z_opt -#endif -#ifndef __deref_out_ecount_z_opt - #define __nvapi_undef__deref_out_ecount_z_opt - #define __deref_out_ecount_z_opt(size) -#endif -#ifndef __deref_out_bcount_z_opt - #define __nvapi_undef__deref_out_bcount_z_opt - #define __deref_out_bcount_z_opt(size) -#endif -#ifndef __deref_out_nz_opt - #define __nvapi_undef__deref_out_nz_opt - #define __deref_out_nz_opt -#endif -#ifndef __deref_out_ecount_nz_opt - #define __nvapi_undef__deref_out_ecount_nz_opt - #define __deref_out_ecount_nz_opt(size) -#endif -#ifndef __deref_out_bcount_nz_opt - #define __nvapi_undef__deref_out_bcount_nz_opt - #define __deref_out_bcount_nz_opt(size) -#endif -#ifndef __deref_inout_opt - #define __nvapi_undef__deref_inout_opt - #define __deref_inout_opt -#endif -#ifndef __deref_inout_ecount_opt - #define __nvapi_undef__deref_inout_ecount_opt - #define __deref_inout_ecount_opt(size) -#endif -#ifndef __deref_inout_bcount_opt - #define __nvapi_undef__deref_inout_bcount_opt - #define __deref_inout_bcount_opt(size) -#endif -#ifndef __deref_inout_ecount_part_opt - #define __nvapi_undef__deref_inout_ecount_part_opt - #define __deref_inout_ecount_part_opt(size,length) -#endif -#ifndef __deref_inout_bcount_part_opt - #define __nvapi_undef__deref_inout_bcount_part_opt - #define __deref_inout_bcount_part_opt(size,length) -#endif -#ifndef __deref_inout_ecount_full_opt - #define __nvapi_undef__deref_inout_ecount_full_opt - #define __deref_inout_ecount_full_opt(size) -#endif -#ifndef __deref_inout_bcount_full_opt - #define __nvapi_undef__deref_inout_bcount_full_opt - #define __deref_inout_bcount_full_opt(size) -#endif -#ifndef __deref_inout_z_opt - #define __nvapi_undef__deref_inout_z_opt - #define __deref_inout_z_opt -#endif -#ifndef __deref_inout_ecount_z_opt - #define __nvapi_undef__deref_inout_ecount_z_opt - #define __deref_inout_ecount_z_opt(size) -#endif -#ifndef __deref_inout_bcount_z_opt - #define __nvapi_undef__deref_inout_bcount_z_opt - #define __deref_inout_bcount_z_opt(size) -#endif -#ifndef __deref_inout_nz_opt - #define __nvapi_undef__deref_inout_nz_opt - #define __deref_inout_nz_opt -#endif -#ifndef __deref_inout_ecount_nz_opt - #define __nvapi_undef__deref_inout_ecount_nz_opt - #define __deref_inout_ecount_nz_opt(size) -#endif -#ifndef __deref_inout_bcount_nz_opt - #define __nvapi_undef__deref_inout_bcount_nz_opt - #define __deref_inout_bcount_nz_opt(size) -#endif -#ifndef __deref_opt_ecount - #define __nvapi_undef__deref_opt_ecount - #define __deref_opt_ecount(size) -#endif -#ifndef __deref_opt_bcount - #define __nvapi_undef__deref_opt_bcount - #define __deref_opt_bcount(size) -#endif -#ifndef __deref_opt_out - #define __nvapi_undef__deref_opt_out - #define __deref_opt_out -#endif -#ifndef __deref_opt_out_z - #define __nvapi_undef__deref_opt_out_z - #define __deref_opt_out_z -#endif -#ifndef __deref_opt_out_ecount - #define __nvapi_undef__deref_opt_out_ecount - #define __deref_opt_out_ecount(size) -#endif -#ifndef __deref_opt_out_bcount - #define __nvapi_undef__deref_opt_out_bcount - #define __deref_opt_out_bcount(size) -#endif -#ifndef __deref_opt_out_ecount_part - #define __nvapi_undef__deref_opt_out_ecount_part - #define __deref_opt_out_ecount_part(size,length) -#endif -#ifndef __deref_opt_out_bcount_part - #define __nvapi_undef__deref_opt_out_bcount_part - #define __deref_opt_out_bcount_part(size,length) -#endif -#ifndef __deref_opt_out_ecount_full - #define __nvapi_undef__deref_opt_out_ecount_full - #define __deref_opt_out_ecount_full(size) -#endif -#ifndef __deref_opt_out_bcount_full - #define __nvapi_undef__deref_opt_out_bcount_full - #define __deref_opt_out_bcount_full(size) -#endif -#ifndef __deref_opt_inout - #define __nvapi_undef__deref_opt_inout - #define __deref_opt_inout -#endif -#ifndef __deref_opt_inout_ecount - #define __nvapi_undef__deref_opt_inout_ecount - #define __deref_opt_inout_ecount(size) -#endif -#ifndef __deref_opt_inout_bcount - #define __nvapi_undef__deref_opt_inout_bcount - #define __deref_opt_inout_bcount(size) -#endif -#ifndef __deref_opt_inout_ecount_part - #define __nvapi_undef__deref_opt_inout_ecount_part - #define __deref_opt_inout_ecount_part(size,length) -#endif -#ifndef __deref_opt_inout_bcount_part - #define __nvapi_undef__deref_opt_inout_bcount_part - #define __deref_opt_inout_bcount_part(size,length) -#endif -#ifndef __deref_opt_inout_ecount_full - #define __nvapi_undef__deref_opt_inout_ecount_full - #define __deref_opt_inout_ecount_full(size) -#endif -#ifndef __deref_opt_inout_bcount_full - #define __nvapi_undef__deref_opt_inout_bcount_full - #define __deref_opt_inout_bcount_full(size) -#endif -#ifndef __deref_opt_inout_z - #define __nvapi_undef__deref_opt_inout_z - #define __deref_opt_inout_z -#endif -#ifndef __deref_opt_inout_ecount_z - #define __nvapi_undef__deref_opt_inout_ecount_z - #define __deref_opt_inout_ecount_z(size) -#endif -#ifndef __deref_opt_inout_bcount_z - #define __nvapi_undef__deref_opt_inout_bcount_z - #define __deref_opt_inout_bcount_z(size) -#endif -#ifndef __deref_opt_inout_nz - #define __nvapi_undef__deref_opt_inout_nz - #define __deref_opt_inout_nz -#endif -#ifndef __deref_opt_inout_ecount_nz - #define __nvapi_undef__deref_opt_inout_ecount_nz - #define __deref_opt_inout_ecount_nz(size) -#endif -#ifndef __deref_opt_inout_bcount_nz - #define __nvapi_undef__deref_opt_inout_bcount_nz - #define __deref_opt_inout_bcount_nz(size) -#endif -#ifndef __deref_opt_ecount_opt - #define __nvapi_undef__deref_opt_ecount_opt - #define __deref_opt_ecount_opt(size) -#endif -#ifndef __deref_opt_bcount_opt - #define __nvapi_undef__deref_opt_bcount_opt - #define __deref_opt_bcount_opt(size) -#endif -#ifndef __deref_opt_out_opt - #define __nvapi_undef__deref_opt_out_opt - #define __deref_opt_out_opt -#endif -#ifndef __deref_opt_out_ecount_opt - #define __nvapi_undef__deref_opt_out_ecount_opt - #define __deref_opt_out_ecount_opt(size) -#endif -#ifndef __deref_opt_out_bcount_opt - #define __nvapi_undef__deref_opt_out_bcount_opt - #define __deref_opt_out_bcount_opt(size) -#endif -#ifndef __deref_opt_out_ecount_part_opt - #define __nvapi_undef__deref_opt_out_ecount_part_opt - #define __deref_opt_out_ecount_part_opt(size,length) -#endif -#ifndef __deref_opt_out_bcount_part_opt - #define __nvapi_undef__deref_opt_out_bcount_part_opt - #define __deref_opt_out_bcount_part_opt(size,length) -#endif -#ifndef __deref_opt_out_ecount_full_opt - #define __nvapi_undef__deref_opt_out_ecount_full_opt - #define __deref_opt_out_ecount_full_opt(size) -#endif -#ifndef __deref_opt_out_bcount_full_opt - #define __nvapi_undef__deref_opt_out_bcount_full_opt - #define __deref_opt_out_bcount_full_opt(size) -#endif -#ifndef __deref_opt_out_z_opt - #define __nvapi_undef__deref_opt_out_z_opt - #define __deref_opt_out_z_opt -#endif -#ifndef __deref_opt_out_ecount_z_opt - #define __nvapi_undef__deref_opt_out_ecount_z_opt - #define __deref_opt_out_ecount_z_opt(size) -#endif -#ifndef __deref_opt_out_bcount_z_opt - #define __nvapi_undef__deref_opt_out_bcount_z_opt - #define __deref_opt_out_bcount_z_opt(size) -#endif -#ifndef __deref_opt_out_nz_opt - #define __nvapi_undef__deref_opt_out_nz_opt - #define __deref_opt_out_nz_opt -#endif -#ifndef __deref_opt_out_ecount_nz_opt - #define __nvapi_undef__deref_opt_out_ecount_nz_opt - #define __deref_opt_out_ecount_nz_opt(size) -#endif -#ifndef __deref_opt_out_bcount_nz_opt - #define __nvapi_undef__deref_opt_out_bcount_nz_opt - #define __deref_opt_out_bcount_nz_opt(size) -#endif -#ifndef __deref_opt_inout_opt - #define __nvapi_undef__deref_opt_inout_opt - #define __deref_opt_inout_opt -#endif -#ifndef __deref_opt_inout_ecount_opt - #define __nvapi_undef__deref_opt_inout_ecount_opt - #define __deref_opt_inout_ecount_opt(size) -#endif -#ifndef __deref_opt_inout_bcount_opt - #define __nvapi_undef__deref_opt_inout_bcount_opt - #define __deref_opt_inout_bcount_opt(size) -#endif -#ifndef __deref_opt_inout_ecount_part_opt - #define __nvapi_undef__deref_opt_inout_ecount_part_opt - #define __deref_opt_inout_ecount_part_opt(size,length) -#endif -#ifndef __deref_opt_inout_bcount_part_opt - #define __nvapi_undef__deref_opt_inout_bcount_part_opt - #define __deref_opt_inout_bcount_part_opt(size,length) -#endif -#ifndef __deref_opt_inout_ecount_full_opt - #define __nvapi_undef__deref_opt_inout_ecount_full_opt - #define __deref_opt_inout_ecount_full_opt(size) -#endif -#ifndef __deref_opt_inout_bcount_full_opt - #define __nvapi_undef__deref_opt_inout_bcount_full_opt - #define __deref_opt_inout_bcount_full_opt(size) -#endif -#ifndef __deref_opt_inout_z_opt - #define __nvapi_undef__deref_opt_inout_z_opt - #define __deref_opt_inout_z_opt -#endif -#ifndef __deref_opt_inout_ecount_z_opt - #define __nvapi_undef__deref_opt_inout_ecount_z_opt - #define __deref_opt_inout_ecount_z_opt(size) -#endif -#ifndef __deref_opt_inout_bcount_z_opt - #define __nvapi_undef__deref_opt_inout_bcount_z_opt - #define __deref_opt_inout_bcount_z_opt(size) -#endif -#ifndef __deref_opt_inout_nz_opt - #define __nvapi_undef__deref_opt_inout_nz_opt - #define __deref_opt_inout_nz_opt -#endif -#ifndef __deref_opt_inout_ecount_nz_opt - #define __nvapi_undef__deref_opt_inout_ecount_nz_opt - #define __deref_opt_inout_ecount_nz_opt(size) -#endif -#ifndef __deref_opt_inout_bcount_nz_opt - #define __nvapi_undef__deref_opt_inout_bcount_nz_opt - #define __deref_opt_inout_bcount_nz_opt(size) -#endif -#ifndef __success - #define __nvapi_success - #define __success(epxr) -#endif -#ifndef _Ret_notnull_ - #define __nvapi__Ret_notnull_ - #define _Ret_notnull_ -#endif -#ifndef _Post_writable_byte_size_ - #define __nvapi__Post_writable_byte_size_ - #define _Post_writable_byte_size_(n) -#endif -#ifndef _Outptr_ - #define __nvapi_Outptr_ - #define _Outptr_ -#endif - - -#define NVAPI_INTERFACE extern __success(return == NVAPI_OK) NvAPI_Status __cdecl diff --git a/3rd_party/Src/NVAPI/nvapi_lite_sli.h b/3rd_party/Src/NVAPI/nvapi_lite_sli.h deleted file mode 100644 index b4ef5af918..0000000000 --- a/3rd_party/Src/NVAPI/nvapi_lite_sli.h +++ /dev/null @@ -1,241 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ - -#pragma once -#include"nvapi_lite_salstart.h" -#include"nvapi_lite_common.h" -#pragma pack(push,8) -#ifdef __cplusplus -extern "C" { -#endif -//----------------------------------------------------------------------------- -// DirectX APIs -//----------------------------------------------------------------------------- - - -//! \ingroup dx -//! Used in NvAPI_D3D10_GetCurrentSLIState(), and NvAPI_D3D_GetCurrentSLIState(). -typedef struct -{ - NvU32 version; //!< Structure version - NvU32 maxNumAFRGroups; //!< [OUT] The maximum possible value of numAFRGroups - NvU32 numAFRGroups; //!< [OUT] The number of AFR groups enabled in the system - NvU32 currentAFRIndex; //!< [OUT] The AFR group index for the frame currently being rendered - NvU32 nextFrameAFRIndex; //!< [OUT] What the AFR group index will be for the next frame (i.e. after calling Present) - NvU32 previousFrameAFRIndex; //!< [OUT] The AFR group index that was used for the previous frame (~0 if more than one frame has not been rendered yet) - NvU32 bIsCurAFRGroupNew; //!< [OUT] Boolean: Is this frame the first time running on the current AFR group - -} NV_GET_CURRENT_SLI_STATE_V1; - -typedef struct -{ - NvU32 version; //!< Structure version - NvU32 maxNumAFRGroups; //!< [OUT] The maximum possible value of numAFRGroups - NvU32 numAFRGroups; //!< [OUT] The number of AFR groups enabled in the system - NvU32 currentAFRIndex; //!< [OUT] The AFR group index for the frame currently being rendered - NvU32 nextFrameAFRIndex; //!< [OUT] What the AFR group index will be for the next frame (i.e. after calling Present) - NvU32 previousFrameAFRIndex; //!< [OUT] The AFR group index that was used for the previous frame (~0 if more than one frame has not been rendered yet) - NvU32 bIsCurAFRGroupNew; //!< [OUT] Boolean: Is this frame the first time running on the current AFR group - NvU32 numVRSLIGpus; //!< [OUT] The number of GPUs used in VR-SLI. If it is 0 VR-SLI is not active - -} NV_GET_CURRENT_SLI_STATE_V2; - -//! \ingroup dx -#define NV_GET_CURRENT_SLI_STATE_VER1 MAKE_NVAPI_VERSION(NV_GET_CURRENT_SLI_STATE_V1,1) -#define NV_GET_CURRENT_SLI_STATE_VER2 MAKE_NVAPI_VERSION(NV_GET_CURRENT_SLI_STATE_V2,1) -#define NV_GET_CURRENT_SLI_STATE_VER NV_GET_CURRENT_SLI_STATE_VER2 -#define NV_GET_CURRENT_SLI_STATE NV_GET_CURRENT_SLI_STATE_V2 -#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_D3D_GetCurrentSLIState -// -//! DESCRIPTION: This function returns the current SLI state for the specified device. The structure -//! contains the number of AFR groups, the current AFR group index, -//! and what the AFR group index will be for the next frame. \p -//! pDevice can be either a IDirect3DDevice9 or ID3D10Device pointer. -//! -//! SUPPORTED OS: Windows XP and higher -//! -//! -//! \since Release: 173 -//! -//! \retval NVAPI_OK Completed request -//! \retval NVAPI_ERROR Error occurred -//! -//! \ingroup dx -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_D3D_GetCurrentSLIState(IUnknown *pDevice, NV_GET_CURRENT_SLI_STATE *pSliState); -#endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) -#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_D3D_SetResourceHint -// -//! \fn NvAPI_D3D_SetResourceHint(IUnknown *pDev, NVDX_ObjectHandle obj, -//! NVAPI_D3D_SETRESOURCEHINT_CATEGORY dwHintCategory, -//! NvU32 dwHintName, -//! NvU32 *pdwHintValue) -//! -//! DESCRIPTION: This is a general purpose function for passing down various resource -//! related hints to the driver. Hints are divided into categories -//! and types within each category. -//! -//! SUPPORTED OS: Windows XP 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] *pdwHintValue Pointer to location containing hint value -//! -//! \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: - - -//! \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 its possible. Hint is static and must be set before resource starts 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_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 *pDev, 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 XP 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] 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 *pDev, 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 XP and higher -//! -//! -//! \since Release: 185 -//! -//! \param [in] pDev The ID3D10Device or IDirect3DDevice9 thatis a 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 *pDev, NVDX_ObjectHandle obj, NvU32 Flags); -#endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) - -#include"nvapi_lite_salend.h" -#ifdef __cplusplus -} -#endif -#pragma pack(pop) diff --git a/3rd_party/Src/NVAPI/nvapi_lite_stereo.h b/3rd_party/Src/NVAPI/nvapi_lite_stereo.h deleted file mode 100644 index 5b02831fcf..0000000000 --- a/3rd_party/Src/NVAPI/nvapi_lite_stereo.h +++ /dev/null @@ -1,600 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ - -#pragma once -#include"nvapi_lite_salstart.h" -#include"nvapi_lite_common.h" -#pragma pack(push,8) -#ifdef __cplusplus -extern "C" { -#endif -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_Enable -// -//! DESCRIPTION: This APU enables stereo mode in the registry. -//! Calls to this function affect the entire system. -//! If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect, -//! and will return the appropriate error code. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \retval ::NVAPI_OK Stereo is now enabled. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_Enable(void); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_Disable -// -//! DESCRIPTION: This API disables stereo mode in the registry. -//! Calls to this function affect the entire system. -//! If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect, -//! and will return the appropriate error code. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \retval ::NVAPI_OK Stereo is now disabled. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_Disable(void); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_IsEnabled -// -//! DESCRIPTION: This API checks if stereo mode is enabled in the registry. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [out] pIsStereoEnabled Address where the result of the inquiry will be placed. -//! -//! \retval ::NVAPI_OK Check was sucessfully completed and result reflects current state of stereo availability. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_IsEnabled(NvU8 *pIsStereoEnabled); -#if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__) - -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_CreateHandleFromIUnknown -// -//! DESCRIPTION: This API creates a stereo handle that is used in subsequent calls related to a given device interface. -//! This must be called before any other NvAPI_Stereo_ function for that handle. -//! Multiple devices can be used at one time using multiple calls to this function (one per each device). -//! -//! HOW TO USE: After the Direct3D device is created, create the stereo handle. -//! On call success: -//! -# Use all other NvAPI_Stereo_ functions that have stereo handle as first parameter. -//! -# After the device interface that corresponds to the the stereo handle is destroyed, -//! the application should call NvAPI_DestroyStereoHandle() for that stereo handle. -//! -//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [in] pDevice Pointer to IUnknown interface that is IDirect3DDevice9* in DX9, ID3D10Device*. -//! \param [out] pStereoHandle Pointer to the newly created stereo handle. -//! -//! \retval ::NVAPI_OK Stereo handle is created for given device interface. -//! \retval ::NVAPI_INVALID_ARGUMENT Provided device interface is invalid. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_CreateHandleFromIUnknown(IUnknown *pDevice, StereoHandle *pStereoHandle); - -#endif // defined(_D3D9_H_) || defined(__d3d10_h__) -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_DestroyHandle -// -//! DESCRIPTION: This API destroys the stereo handle created with one of the NvAPI_Stereo_CreateHandleFrom() functions. -//! This should be called after the device corresponding to the handle has been destroyed. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [in] stereoHandle Stereo handle that is to be destroyed. -//! -//! \retval ::NVAPI_OK Stereo handle is destroyed. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_DestroyHandle(StereoHandle stereoHandle); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_Activate -// -//! DESCRIPTION: This API activates stereo for the device interface corresponding to the given stereo handle. -//! Activating stereo is possible only if stereo was enabled previously in the registry. -//! If stereo is not activated, then calls to functions that require that stereo is activated have no effect, -//! and will return the appropriate error code. -//! -//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [in] stereoHandle Stereo handle corresponding to the device interface. -//! -//! \retval ::NVAPI_OK Stereo is turned on. -//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_Activate(StereoHandle stereoHandle); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_Deactivate -// -//! DESCRIPTION: This API deactivates stereo for the given device interface. -//! If stereo is not activated, then calls to functions that require that stereo is activated have no effect, -//! and will return the appropriate error code. -//! -//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [in] stereoHandle Stereo handle that corresponds to the device interface. -//! -//! \retval ::NVAPI_OK Stereo is turned off. -//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_Deactivate(StereoHandle stereoHandle); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_IsActivated -// -//! DESCRIPTION: This API checks if stereo is activated for the given device interface. -//! -//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [in] stereoHandle Stereo handle that corresponds to the device interface. -//! \param [in] pIsStereoOn Address where result of the inquiry will be placed. -//! -//! \retval ::NVAPI_OK - Check was sucessfully completed and result reflects current state of stereo (on/off). -//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again. -//! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized. -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR - Something is wrong (generic error). -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_IsActivated(StereoHandle stereoHandle, NvU8 *pIsStereoOn); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_GetSeparation -// -//! DESCRIPTION: This API gets current separation value (in percents). -//! -//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [in] stereoHandle Stereo handle that corresponds to the device interface. -//! \param [out] pSeparationPercentage Address of @c float type variable to store current separation percentage in. -//! -//! \retval ::NVAPI_OK Retrieval of separation percentage was successfull. -//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_GetSeparation(StereoHandle stereoHandle, float *pSeparationPercentage); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_SetSeparation -// -//! DESCRIPTION: This API sets separation to given percentage. -//! -//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom() function. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [in] stereoHandle Stereo handle that corresponds to the device interface. -//! \param [in] newSeparationPercentage New value for separation percentage. -//! -//! \retval ::NVAPI_OK Setting of separation percentage was successfull. -//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again. -//! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized. -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_STEREO_PARAMETER_OUT_OF_RANGE Given separation percentage is out of [0..100] range. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_SetSeparation(StereoHandle stereoHandle, float newSeparationPercentage); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_GetConvergence -// -//! DESCRIPTION: This API gets the current convergence value. -//! -//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [in] stereoHandle Stereo handle that corresponds to the device interface. -//! \param [out] pConvergence Address of @c float type variable to store current convergence value in. -//! -//! \retval ::NVAPI_OK Retrieval of convergence value was successfull. -//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_GetConvergence(StereoHandle stereoHandle, float *pConvergence); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_SetConvergence -// -//! DESCRIPTION: This API sets convergence to the given value. -//! -//! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function. -//! -//! SUPPORTED OS: Windows Vista and higher -//! -//! -//! \since Release: 180 -//! -//! \param [in] stereoHandle Stereo handle that corresponds to the device interface. -//! \param [in] newConvergence New value for convergence. -//! -//! \retval ::NVAPI_OK Setting of convergence value was successfull. -//! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again. -//! \retval ::NVAPI_API_NOT_INTIALIZED -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_SetConvergence(StereoHandle stereoHandle, float newConvergence); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_SetActiveEye -// -//! \fn NvAPI_Stereo_SetActiveEye(StereoHandle hStereoHandle, NV_STEREO_ACTIVE_EYE StereoEye); -//! DESCRIPTION: This API sets the back buffer to left or right in Direct stereo mode. -//! -//! HOW TO USE: After the stereo handle for device interface is created via successfull call to appropriate -//! NvAPI_Stereo_CreateHandleFrom function. -//! -//! \since Release: 285 -//! -//! SUPPORTED OS: Windows Vista 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 Vista 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 Vista 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 Vista and higher -//! -//! -//! \param [out] bSupported(OUT) != 0 - supported, \n -//! == 0 - is not supported -//! -//! -//! \retval ::NVAPI_OK Retrieval of frustum adjust mode was successfull. -//! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized. -//! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized. -//! \retval ::NVAPI_ERROR Something is wrong (generic error). -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_IsWindowedModeSupported(NvU8* bSupported); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_SetSurfaceCreationMode -// -//! \function NvAPI_Stereo_SetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE creationMode) -//! \param [in] hStereoHandle Stereo handle that corresponds to the device interface. -//! \param [in] creationMode New surface creation mode for this device interface. -//! -//! \since Release: 285 -//! -//! SUPPORTED OS: Windows Vista 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 Vista 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 Vista and higher -//! -//! -//! DESCRIPTION: This API checks if the last draw call was stereoized. It is a very expensive to call and should be used for debugging purpose *only*. -//! -//! WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function. -//! -//! \return This API can return any of the error codes enumerated in #NvAPI_Status. -//! There are no return error codes with specific meaning for this API. -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_Debug_WasLastDrawStereoized(__in StereoHandle hStereoHandle, __out NvU8 *pWasStereoized); -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Stereo_SetDefaultProfile -// -//! -//! SUPPORTED OS: Windows Vista 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 Vista and higher -//! -//! -//! DESCRIPTION: This API retrieves the current default stereo profile. -//! -//! After call cbSizeOut contain 0 if default profile is not set required buffer size cbSizeOut. -//! To get needed buffer size this function can be called with szProfileName==0 and cbSizeIn == 0. -//! -//! WHEN TO USE: This API can be called at any time. -//! -//! -//! \param [in] cbSizeIn Size of buffer allocated for default stereo profile name. -//! \param [out] szProfileName Default stereo profile name. -//! \param [out] pcbSizeOut Required buffer size. -//! # ==0 - there is no default stereo profile name currently set -//! # !=0 - size of buffer required for currently set default stereo profile name including trailing '0'. -//! -//! -//! \return This API can return any of the error codes enumerated in #NvAPI_Status. -//! Error codes specific to this API are described below. -//! -//! \retval NVAPI_SUCCESS - Default stereo profile name has been copied into szProfileName. -//! \retval NVAPI_DEFAULT_STEREO_PROFILE_IS_NOT_DEFINED - There is no default stereo profile set at this time. -//! \retval NVAPI_INVALID_ARGUMENT - pcbSizeOut == 0 or cbSizeIn >= *pcbSizeOut && szProfileName == 0 -//! \retval NVAPI_INSUFFICIENT_BUFFER - cbSizeIn < *pcbSizeOut -//! -//! \ingroup stereoapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Stereo_GetDefaultProfile( __in NvU32 cbSizeIn, __out_bcount_part_opt(cbSizeIn, *pcbSizeOut) char* szProfileName, __out NvU32 *pcbSizeOut); - -#include"nvapi_lite_salend.h" -#ifdef __cplusplus -} -#endif -#pragma pack(pop) diff --git a/3rd_party/Src/NVAPI/nvapi_lite_surround.h b/3rd_party/Src/NVAPI/nvapi_lite_surround.h deleted file mode 100644 index c8c9c8c84e..0000000000 --- a/3rd_party/Src/NVAPI/nvapi_lite_surround.h +++ /dev/null @@ -1,105 +0,0 @@ - /************************************************************************************************************************************\ -|* *| -|* Copyright © 2012 NVIDIA Corporation. All rights reserved. *| -|* *| -|* NOTICE TO USER: *| -|* *| -|* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *| -|* *| -|* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *| -|* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *| -|* Otherwise, you have no rights to use or access this software in any manner. *| -|* *| -|* If not covered by the applicable NVIDIA software license agreement: *| -|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *| -|* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *| -|* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *| -|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *| -|* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *| -|* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *| -|* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| -|* *| -|* U.S. Government End Users. *| -|* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| -|* consisting of "commercial computer software" and "commercial computer software documentation" *| -|* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *| -|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| -|* all U.S. Government End Users acquire the software with only those rights set forth herein. *| -|* *| -|* Any use of this software in individual and commercial software must include, *| -|* in the user documentation and internal comments to the code, *| -|* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *| -|* *| - \************************************************************************************************************************************/ - -#pragma once -#include"nvapi_lite_salstart.h" -#include"nvapi_lite_common.h" -#pragma pack(push,8) -#ifdef __cplusplus -extern "C" { -#endif -//! SUPPORTED OS: Windows XP and higher -//! -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_DISP_GetGDIPrimaryDisplayId -// -//! DESCRIPTION: This API returns the Display ID of the GDI Primary. -//! -//! \param [out] displayId Display ID of the GDI Primary display. -//! -//! \retval ::NVAPI_OK: Capabilties have been returned. -//! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND: GDI Primary not on an NVIDIA GPU. -//! \retval ::NVAPI_INVALID_ARGUMENT: One or more args passed in are invalid. -//! \retval ::NVAPI_API_NOT_INTIALIZED: The NvAPI API needs to be initialized first -//! \retval ::NVAPI_NO_IMPLEMENTATION: This entrypoint not available -//! \retval ::NVAPI_ERROR: Miscellaneous error occurred -//! -//! \ingroup dispcontrol -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_DISP_GetGDIPrimaryDisplayId(NvU32* displayId); -#define NV_MOSAIC_MAX_DISPLAYS (64) -//! SUPPORTED OS: Windows Vista and higher -//! -/////////////////////////////////////////////////////////////////////////////// -// -// FUNCTION NAME: NvAPI_Mosaic_GetDisplayViewportsByResolution -// -//! DESCRIPTION: This API returns the viewports that would be applied on -//! the requested display. -//! -//! \param [in] displayId Display ID of a single display in the active -//! mosaic topology to query. -//! \param [in] srcWidth Width of full display topology. If both -//! width and height are 0, the current -//! resolution is used. -//! \param [in] srcHeight Height of full display topology. If both -//! width and height are 0, the current -//! resolution is used. -//! \param [out] viewports Array of NV_RECT viewports which represent -//! the displays as identified in -//! NvAPI_Mosaic_EnumGridTopologies. If the -//! requested resolution is a single-wide -//! resolution, only viewports[0] will -//! contain the viewport details, regardless -//! of which display is driving the display. -//! \param [out] bezelCorrected Returns 1 if the requested resolution is -//! bezel corrected. May be NULL. -//! -//! \retval ::NVAPI_OK Capabilties have been returned. -//! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid. -//! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first -//! \retval ::NVAPI_MOSAIC_NOT_ACTIVE The display does not belong to an active Mosaic Topology -//! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available -//! \retval ::NVAPI_ERROR Miscellaneous error occurred -//! -//! \ingroup mosaicapi -/////////////////////////////////////////////////////////////////////////////// -NVAPI_INTERFACE NvAPI_Mosaic_GetDisplayViewportsByResolution(NvU32 displayId, NvU32 srcWidth, NvU32 srcHeight, NV_RECT viewports[NV_MOSAIC_MAX_DISPLAYS], NvU8* bezelCorrected); - -#include"nvapi_lite_salend.h" -#ifdef __cplusplus -} -#endif -#pragma pack(pop) diff --git a/3rd_party/Src/amd/adl_defines.h b/3rd_party/Src/amd/adl_defines.h deleted file mode 100644 index 0e42c43771..0000000000 --- a/3rd_party/Src/amd/adl_defines.h +++ /dev/null @@ -1,2150 +0,0 @@ -// -// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. -// -// MIT LICENSE: -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -/// \file adl_defines.h -/// \brief Contains all definitions exposed by ADL for \ALL platforms.\n Included in ADL SDK -/// -/// This file contains all definitions used by ADL. -/// The ADL definitions include the following: -/// \li ADL error codes -/// \li Enumerations for the ADLDisplayInfo structure -/// \li Maximum limits -/// - -#ifndef ADL_DEFINES_H_ -#define ADL_DEFINES_H_ - -/// \defgroup DEFINES Constants and Definitions -// @{ - -/// \defgroup define_misc Miscellaneous Constant Definitions -// @{ - -/// \name General Definitions -// @{ - -/// Defines ADL_TRUE -#define ADL_TRUE 1 -/// Defines ADL_FALSE -#define ADL_FALSE 0 - -/// Defines the maximum string length -#define ADL_MAX_CHAR 4096 -/// Defines the maximum string length -#define ADL_MAX_PATH 256 -/// Defines the maximum number of supported adapters -#define ADL_MAX_ADAPTERS 250 -/// Defines the maxumum number of supported displays -#define ADL_MAX_DISPLAYS 150 -/// Defines the maxumum string length for device name -#define ADL_MAX_DEVICENAME 32 -/// Defines for all adapters -#define ADL_ADAPTER_INDEX_ALL -1 -/// Defines APIs with iOption none -#define ADL_MAIN_API_OPTION_NONE 0 -// @} - -/// \name Definitions for iOption parameter used by -/// ADL_Display_DDCBlockAccess_Get() -// @{ - -/// Switch to DDC line 2 before sending the command to the display. -#define ADL_DDC_OPTION_SWITCHDDC2 0x00000001 -/// Save command in the registry under a unique key, corresponding to parameter \b iCommandIndex -#define ADL_DDC_OPTION_RESTORECOMMAND 0x00000002 -/// Combine write-read DDC block access command. -#define ADL_DDC_OPTION_COMBOWRITEREAD 0x00000010 -/// Direct DDC access to the immediate device connected to graphics card. -/// MST with this option set: DDC command is sent to first branch. -/// MST with this option not set: DDC command is sent to the end node sink device. -#define ADL_DDC_OPTION_SENDTOIMMEDIATEDEVICE 0x00000020 -// @} - -/// \name Values for -/// ADLI2C.iAction used with ADL_Display_WriteAndReadI2C() -// @{ - -#define ADL_DL_I2C_ACTIONREAD 0x00000001 -#define ADL_DL_I2C_ACTIONWRITE 0x00000002 -#define ADL_DL_I2C_ACTIONREAD_REPEATEDSTART 0x00000003 -// @} - - -// @} //Misc - -/// \defgroup define_adl_results Result Codes -/// This group of definitions are the various results returned by all ADL functions \n -// @{ -/// All OK, but need to wait -#define ADL_OK_WAIT 4 -/// All OK, but need restart -#define ADL_OK_RESTART 3 -/// All OK but need mode change -#define ADL_OK_MODE_CHANGE 2 -/// All OK, but with warning -#define ADL_OK_WARNING 1 -/// ADL function completed successfully -#define ADL_OK 0 -/// Generic Error. Most likely one or more of the Escape calls to the driver failed! -#define ADL_ERR -1 -/// ADL not initialized -#define ADL_ERR_NOT_INIT -2 -/// One of the parameter passed is invalid -#define ADL_ERR_INVALID_PARAM -3 -/// One of the parameter size is invalid -#define ADL_ERR_INVALID_PARAM_SIZE -4 -/// Invalid ADL index passed -#define ADL_ERR_INVALID_ADL_IDX -5 -/// Invalid controller index passed -#define ADL_ERR_INVALID_CONTROLLER_IDX -6 -/// Invalid display index passed -#define ADL_ERR_INVALID_DIPLAY_IDX -7 -/// Function not supported by the driver -#define ADL_ERR_NOT_SUPPORTED -8 -/// Null Pointer error -#define ADL_ERR_NULL_POINTER -9 -/// Call can't be made due to disabled adapter -#define ADL_ERR_DISABLED_ADAPTER -10 -/// Invalid Callback -#define ADL_ERR_INVALID_CALLBACK -11 -/// Display Resource conflict -#define ADL_ERR_RESOURCE_CONFLICT -12 -//Failed to update some of the values. Can be returned by set request that include multiple values if not all values were successfully committed. -#define ADL_ERR_SET_INCOMPLETE -20 -/// There's no Linux XDisplay in Linux Console environment -#define ADL_ERR_NO_XDISPLAY -21 - -// @} -/// - -/// \defgroup define_display_type Display Type -/// Define Monitor/CRT display type -// @{ -/// Define Monitor display type -#define ADL_DT_MONITOR 0 -/// Define TV display type -#define ADL_DT_TELEVISION 1 -/// Define LCD display type -#define ADL_DT_LCD_PANEL 2 -/// Define DFP display type -#define ADL_DT_DIGITAL_FLAT_PANEL 3 -/// Define Componment Video display type -#define ADL_DT_COMPONENT_VIDEO 4 -/// Define Projector display type -#define ADL_DT_PROJECTOR 5 -// @} - -/// \defgroup define_display_connection_type Display Connection Type -// @{ -/// Define unknown display output type -#define ADL_DOT_UNKNOWN 0 -/// Define composite display output type -#define ADL_DOT_COMPOSITE 1 -/// Define SVideo display output type -#define ADL_DOT_SVIDEO 2 -/// Define analog display output type -#define ADL_DOT_ANALOG 3 -/// Define digital display output type -#define ADL_DOT_DIGITAL 4 -// @} - -/// \defgroup define_color_type Display Color Type and Source -/// Define Display Color Type and Source -// @{ -#define ADL_DISPLAY_COLOR_BRIGHTNESS (1 << 0) -#define ADL_DISPLAY_COLOR_CONTRAST (1 << 1) -#define ADL_DISPLAY_COLOR_SATURATION (1 << 2) -#define ADL_DISPLAY_COLOR_HUE (1 << 3) -#define ADL_DISPLAY_COLOR_TEMPERATURE (1 << 4) - -/// Color Temperature Source is EDID -#define ADL_DISPLAY_COLOR_TEMPERATURE_SOURCE_EDID (1 << 5) -/// Color Temperature Source is User -#define ADL_DISPLAY_COLOR_TEMPERATURE_SOURCE_USER (1 << 6) -// @} - -/// \defgroup define_adjustment_capabilities Display Adjustment Capabilities -/// Display adjustment capabilities values. Returned by ADL_Display_AdjustCaps_Get -// @{ -#define ADL_DISPLAY_ADJUST_OVERSCAN (1 << 0) -#define ADL_DISPLAY_ADJUST_VERT_POS (1 << 1) -#define ADL_DISPLAY_ADJUST_HOR_POS (1 << 2) -#define ADL_DISPLAY_ADJUST_VERT_SIZE (1 << 3) -#define ADL_DISPLAY_ADJUST_HOR_SIZE (1 << 4) -#define ADL_DISPLAY_ADJUST_SIZEPOS (ADL_DISPLAY_ADJUST_VERT_POS | ADL_DISPLAY_ADJUST_HOR_POS | ADL_DISPLAY_ADJUST_VERT_SIZE | ADL_DISPLAY_ADJUST_HOR_SIZE) -#define ADL_DISPLAY_CUSTOMMODES (1<<5) -#define ADL_DISPLAY_ADJUST_UNDERSCAN (1<<6) -// @} - -///Down-scale support -#define ADL_DISPLAY_CAPS_DOWNSCALE (1 << 0) - -/// Sharpness support -#define ADL_DISPLAY_CAPS_SHARPNESS (1 << 0) - -/// \defgroup define_desktop_config Desktop Configuration Flags -/// These flags are used by ADL_DesktopConfig_xxx -/// \deprecated This API has been deprecated because it was only used for RandR 1.1 (Red Hat 5.x) distributions which is now not supported. -// @{ -#define ADL_DESKTOPCONFIG_UNKNOWN 0 /* UNKNOWN desktop config */ -#define ADL_DESKTOPCONFIG_SINGLE (1 << 0) /* Single */ -#define ADL_DESKTOPCONFIG_CLONE (1 << 2) /* Clone */ -#define ADL_DESKTOPCONFIG_BIGDESK_H (1 << 4) /* Big Desktop Horizontal */ -#define ADL_DESKTOPCONFIG_BIGDESK_V (1 << 5) /* Big Desktop Vertical */ -#define ADL_DESKTOPCONFIG_BIGDESK_HR (1 << 6) /* Big Desktop Reverse Horz */ -#define ADL_DESKTOPCONFIG_BIGDESK_VR (1 << 7) /* Big Desktop Reverse Vert */ -#define ADL_DESKTOPCONFIG_RANDR12 (1 << 8) /* RandR 1.2 Multi-display */ -// @} - -/// needed for ADLDDCInfo structure -#define ADL_MAX_DISPLAY_NAME 256 - -/// \defgroup define_edid_flags Values for ulDDCInfoFlag -/// defines for ulDDCInfoFlag EDID flag -// @{ -#define ADL_DISPLAYDDCINFOEX_FLAG_PROJECTORDEVICE (1 << 0) -#define ADL_DISPLAYDDCINFOEX_FLAG_EDIDEXTENSION (1 << 1) -#define ADL_DISPLAYDDCINFOEX_FLAG_DIGITALDEVICE (1 << 2) -#define ADL_DISPLAYDDCINFOEX_FLAG_HDMIAUDIODEVICE (1 << 3) -#define ADL_DISPLAYDDCINFOEX_FLAG_SUPPORTS_AI (1 << 4) -#define ADL_DISPLAYDDCINFOEX_FLAG_SUPPORT_xvYCC601 (1 << 5) -#define ADL_DISPLAYDDCINFOEX_FLAG_SUPPORT_xvYCC709 (1 << 6) -// @} - -/// \defgroup define_displayinfo_connector Display Connector Type -/// defines for ADLDisplayInfo.iDisplayConnector -// @{ -#define ADL_DISPLAY_CONTYPE_UNKNOWN 0 -#define ADL_DISPLAY_CONTYPE_VGA 1 -#define ADL_DISPLAY_CONTYPE_DVI_D 2 -#define ADL_DISPLAY_CONTYPE_DVI_I 3 -#define ADL_DISPLAY_CONTYPE_ATICVDONGLE_NTSC 4 -#define ADL_DISPLAY_CONTYPE_ATICVDONGLE_JPN 5 -#define ADL_DISPLAY_CONTYPE_ATICVDONGLE_NONI2C_JPN 6 -#define ADL_DISPLAY_CONTYPE_ATICVDONGLE_NONI2C_NTSC 7 -#define ADL_DISPLAY_CONTYPE_PROPRIETARY 8 -#define ADL_DISPLAY_CONTYPE_HDMI_TYPE_A 10 -#define ADL_DISPLAY_CONTYPE_HDMI_TYPE_B 11 -#define ADL_DISPLAY_CONTYPE_SVIDEO 12 -#define ADL_DISPLAY_CONTYPE_COMPOSITE 13 -#define ADL_DISPLAY_CONTYPE_RCA_3COMPONENT 14 -#define ADL_DISPLAY_CONTYPE_DISPLAYPORT 15 -#define ADL_DISPLAY_CONTYPE_EDP 16 -#define ADL_DISPLAY_CONTYPE_WIRELESSDISPLAY 17 -// @} - -/// TV Capabilities and Standards -/// \defgroup define_tv_caps TV Capabilities and Standards -/// \deprecated Dropping support for TV displays -// @{ -#define ADL_TV_STANDARDS (1 << 0) -#define ADL_TV_SCART (1 << 1) - -/// TV Standards Definitions -#define ADL_STANDARD_NTSC_M (1 << 0) -#define ADL_STANDARD_NTSC_JPN (1 << 1) -#define ADL_STANDARD_NTSC_N (1 << 2) -#define ADL_STANDARD_PAL_B (1 << 3) -#define ADL_STANDARD_PAL_COMB_N (1 << 4) -#define ADL_STANDARD_PAL_D (1 << 5) -#define ADL_STANDARD_PAL_G (1 << 6) -#define ADL_STANDARD_PAL_H (1 << 7) -#define ADL_STANDARD_PAL_I (1 << 8) -#define ADL_STANDARD_PAL_K (1 << 9) -#define ADL_STANDARD_PAL_K1 (1 << 10) -#define ADL_STANDARD_PAL_L (1 << 11) -#define ADL_STANDARD_PAL_M (1 << 12) -#define ADL_STANDARD_PAL_N (1 << 13) -#define ADL_STANDARD_PAL_SECAM_D (1 << 14) -#define ADL_STANDARD_PAL_SECAM_K (1 << 15) -#define ADL_STANDARD_PAL_SECAM_K1 (1 << 16) -#define ADL_STANDARD_PAL_SECAM_L (1 << 17) -// @} - - -/// \defgroup define_video_custom_mode Video Custom Mode flags -/// Component Video Custom Mode flags. This is used by the iFlags parameter in ADLCustomMode -// @{ -#define ADL_CUSTOMIZEDMODEFLAG_MODESUPPORTED (1 << 0) -#define ADL_CUSTOMIZEDMODEFLAG_NOTDELETETABLE (1 << 1) -#define ADL_CUSTOMIZEDMODEFLAG_INSERTBYDRIVER (1 << 2) -#define ADL_CUSTOMIZEDMODEFLAG_INTERLACED (1 << 3) -#define ADL_CUSTOMIZEDMODEFLAG_BASEMODE (1 << 4) -// @} - -/// \defgroup define_ddcinfoflag Values used for DDCInfoFlag -/// ulDDCInfoFlag field values used by the ADLDDCInfo structure -// @{ -#define ADL_DISPLAYDDCINFOEX_FLAG_PROJECTORDEVICE (1 << 0) -#define ADL_DISPLAYDDCINFOEX_FLAG_EDIDEXTENSION (1 << 1) -#define ADL_DISPLAYDDCINFOEX_FLAG_DIGITALDEVICE (1 << 2) -#define ADL_DISPLAYDDCINFOEX_FLAG_HDMIAUDIODEVICE (1 << 3) -#define ADL_DISPLAYDDCINFOEX_FLAG_SUPPORTS_AI (1 << 4) -#define ADL_DISPLAYDDCINFOEX_FLAG_SUPPORT_xvYCC601 (1 << 5) -#define ADL_DISPLAYDDCINFOEX_FLAG_SUPPORT_xvYCC709 (1 << 6) -// @} - -/// \defgroup define_cv_dongle Values used by ADL_CV_DongleSettings_xxx -/// The following is applicable to ADL_DISPLAY_CONTYPE_ATICVDONGLE_JP and ADL_DISPLAY_CONTYPE_ATICVDONGLE_NONI2C_D only -/// \deprecated Dropping support for Component Video displays -// @{ -#define ADL_DISPLAY_CV_DONGLE_D1 (1 << 0) -#define ADL_DISPLAY_CV_DONGLE_D2 (1 << 1) -#define ADL_DISPLAY_CV_DONGLE_D3 (1 << 2) -#define ADL_DISPLAY_CV_DONGLE_D4 (1 << 3) -#define ADL_DISPLAY_CV_DONGLE_D5 (1 << 4) - -/// The following is applicable to ADL_DISPLAY_CONTYPE_ATICVDONGLE_NA and ADL_DISPLAY_CONTYPE_ATICVDONGLE_NONI2C only - -#define ADL_DISPLAY_CV_DONGLE_480I (1 << 0) -#define ADL_DISPLAY_CV_DONGLE_480P (1 << 1) -#define ADL_DISPLAY_CV_DONGLE_540P (1 << 2) -#define ADL_DISPLAY_CV_DONGLE_720P (1 << 3) -#define ADL_DISPLAY_CV_DONGLE_1080I (1 << 4) -#define ADL_DISPLAY_CV_DONGLE_1080P (1 << 5) -#define ADL_DISPLAY_CV_DONGLE_16_9 (1 << 6) -#define ADL_DISPLAY_CV_DONGLE_720P50 (1 << 7) -#define ADL_DISPLAY_CV_DONGLE_1080I25 (1 << 8) -#define ADL_DISPLAY_CV_DONGLE_576I25 (1 << 9) -#define ADL_DISPLAY_CV_DONGLE_576P50 (1 << 10) -#define ADL_DISPLAY_CV_DONGLE_1080P24 (1 << 11) -#define ADL_DISPLAY_CV_DONGLE_1080P25 (1 << 12) -#define ADL_DISPLAY_CV_DONGLE_1080P30 (1 << 13) -#define ADL_DISPLAY_CV_DONGLE_1080P50 (1 << 14) -// @} - -/// \defgroup define_formats_ovr Formats Override Settings -/// Display force modes flags -// @{ -/// -#define ADL_DISPLAY_FORMAT_FORCE_720P 0x00000001 -#define ADL_DISPLAY_FORMAT_FORCE_1080I 0x00000002 -#define ADL_DISPLAY_FORMAT_FORCE_1080P 0x00000004 -#define ADL_DISPLAY_FORMAT_FORCE_720P50 0x00000008 -#define ADL_DISPLAY_FORMAT_FORCE_1080I25 0x00000010 -#define ADL_DISPLAY_FORMAT_FORCE_576I25 0x00000020 -#define ADL_DISPLAY_FORMAT_FORCE_576P50 0x00000040 -#define ADL_DISPLAY_FORMAT_FORCE_1080P24 0x00000080 -#define ADL_DISPLAY_FORMAT_FORCE_1080P25 0x00000100 -#define ADL_DISPLAY_FORMAT_FORCE_1080P30 0x00000200 -#define ADL_DISPLAY_FORMAT_FORCE_1080P50 0x00000400 - -///< Below are \b EXTENDED display mode flags - -#define ADL_DISPLAY_FORMAT_CVDONGLEOVERIDE 0x00000001 -#define ADL_DISPLAY_FORMAT_CVMODEUNDERSCAN 0x00000002 -#define ADL_DISPLAY_FORMAT_FORCECONNECT_SUPPORTED 0x00000004 -#define ADL_DISPLAY_FORMAT_RESTRICT_FORMAT_SELECTION 0x00000008 -#define ADL_DISPLAY_FORMAT_SETASPECRATIO 0x00000010 -#define ADL_DISPLAY_FORMAT_FORCEMODES 0x00000020 -#define ADL_DISPLAY_FORMAT_LCDRTCCOEFF 0x00000040 -// @} - -/// Defines used by OD5 -#define ADL_PM_PARAM_DONT_CHANGE 0 - -/// The following defines Bus types -// @{ -#define ADL_BUSTYPE_PCI 0 /* PCI bus */ -#define ADL_BUSTYPE_AGP 1 /* AGP bus */ -#define ADL_BUSTYPE_PCIE 2 /* PCI Express bus */ -#define ADL_BUSTYPE_PCIE_GEN2 3 /* PCI Express 2nd generation bus */ -#define ADL_BUSTYPE_PCIE_GEN3 4 /* PCI Express 3rd generation bus */ -// @} - -/// \defgroup define_ws_caps Workstation Capabilities -/// Workstation values -// @{ - -/// This value indicates that the workstation card supports active stereo though stereo output connector -#define ADL_STEREO_SUPPORTED (1 << 2) -/// This value indicates that the workstation card supports active stereo via "blue-line" -#define ADL_STEREO_BLUE_LINE (1 << 3) -/// This value is used to turn off stereo mode. -#define ADL_STEREO_OFF 0 -/// This value indicates that the workstation card supports active stereo. This is also used to set the stereo mode to active though the stereo output connector -#define ADL_STEREO_ACTIVE (1 << 1) -/// This value indicates that the workstation card supports auto-stereo monitors with horizontal interleave. This is also used to set the stereo mode to use the auto-stereo monitor with horizontal interleave -#define ADL_STEREO_AUTO_HORIZONTAL (1 << 30) -/// This value indicates that the workstation card supports auto-stereo monitors with vertical interleave. This is also used to set the stereo mode to use the auto-stereo monitor with vertical interleave -#define ADL_STEREO_AUTO_VERTICAL (1 << 31) -/// This value indicates that the workstation card supports passive stereo, ie. non stereo sync -#define ADL_STEREO_PASSIVE (1 << 6) -/// This value indicates that the workstation card supports auto-stereo monitors with vertical interleave. This is also used to set the stereo mode to use the auto-stereo monitor with vertical interleave -#define ADL_STEREO_PASSIVE_HORIZ (1 << 7) -/// This value indicates that the workstation card supports auto-stereo monitors with vertical interleave. This is also used to set the stereo mode to use the auto-stereo monitor with vertical interleave -#define ADL_STEREO_PASSIVE_VERT (1 << 8) -/// This value indicates that the workstation card supports auto-stereo monitors with Samsung. -#define ADL_STEREO_AUTO_SAMSUNG (1 << 11) -/// This value indicates that the workstation card supports auto-stereo monitors with Tridility. -#define ADL_STEREO_AUTO_TSL (1 << 12) -/// This value indicates that the workstation card supports DeepBitDepth (10 bpp) -#define ADL_DEEPBITDEPTH_10BPP_SUPPORTED (1 << 5) - -/// This value indicates that the workstation supports 8-Bit Grayscale -#define ADL_8BIT_GREYSCALE_SUPPORTED (1 << 9) -/// This value indicates that the workstation supports CUSTOM TIMING -#define ADL_CUSTOM_TIMING_SUPPORTED (1 << 10) - -/// Load balancing is supported. -#define ADL_WORKSTATION_LOADBALANCING_SUPPORTED 0x00000001 -/// Load balancing is available. -#define ADL_WORKSTATION_LOADBALANCING_AVAILABLE 0x00000002 - -/// Load balancing is disabled. -#define ADL_WORKSTATION_LOADBALANCING_DISABLED 0x00000000 -/// Load balancing is Enabled. -#define ADL_WORKSTATION_LOADBALANCING_ENABLED 0x00000001 - - - -// @} - -/// \defgroup define_adapterspeed speed setting from the adapter -// @{ -#define ADL_CONTEXT_SPEED_UNFORCED 0 /* default asic running speed */ -#define ADL_CONTEXT_SPEED_FORCEHIGH 1 /* asic running speed is forced to high */ -#define ADL_CONTEXT_SPEED_FORCELOW 2 /* asic running speed is forced to low */ - -#define ADL_ADAPTER_SPEEDCAPS_SUPPORTED (1 << 0) /* change asic running speed setting is supported */ -// @} - -/// \defgroup define_glsync Genlock related values -/// GL-Sync port types (unique values) -// @{ -/// Unknown port of GL-Sync module -#define ADL_GLSYNC_PORT_UNKNOWN 0 -/// BNC port of of GL-Sync module -#define ADL_GLSYNC_PORT_BNC 1 -/// RJ45(1) port of of GL-Sync module -#define ADL_GLSYNC_PORT_RJ45PORT1 2 -/// RJ45(2) port of of GL-Sync module -#define ADL_GLSYNC_PORT_RJ45PORT2 3 - -// GL-Sync Genlock settings mask (bit-vector) - -/// None of the ADLGLSyncGenlockConfig members are valid -#define ADL_GLSYNC_CONFIGMASK_NONE 0 -/// The ADLGLSyncGenlockConfig.lSignalSource member is valid -#define ADL_GLSYNC_CONFIGMASK_SIGNALSOURCE (1 << 0) -/// The ADLGLSyncGenlockConfig.iSyncField member is valid -#define ADL_GLSYNC_CONFIGMASK_SYNCFIELD (1 << 1) -/// The ADLGLSyncGenlockConfig.iSampleRate member is valid -#define ADL_GLSYNC_CONFIGMASK_SAMPLERATE (1 << 2) -/// The ADLGLSyncGenlockConfig.lSyncDelay member is valid -#define ADL_GLSYNC_CONFIGMASK_SYNCDELAY (1 << 3) -/// The ADLGLSyncGenlockConfig.iTriggerEdge member is valid -#define ADL_GLSYNC_CONFIGMASK_TRIGGEREDGE (1 << 4) -/// The ADLGLSyncGenlockConfig.iScanRateCoeff member is valid -#define ADL_GLSYNC_CONFIGMASK_SCANRATECOEFF (1 << 5) -/// The ADLGLSyncGenlockConfig.lFramelockCntlVector member is valid -#define ADL_GLSYNC_CONFIGMASK_FRAMELOCKCNTL (1 << 6) - - -// GL-Sync Framelock control mask (bit-vector) - -/// Framelock is disabled -#define ADL_GLSYNC_FRAMELOCKCNTL_NONE 0 -/// Framelock is enabled -#define ADL_GLSYNC_FRAMELOCKCNTL_ENABLE ( 1 << 0) - -#define ADL_GLSYNC_FRAMELOCKCNTL_DISABLE ( 1 << 1) -#define ADL_GLSYNC_FRAMELOCKCNTL_SWAP_COUNTER_RESET ( 1 << 2) -#define ADL_GLSYNC_FRAMELOCKCNTL_SWAP_COUNTER_ACK ( 1 << 3) -#define ADL_GLSYNC_FRAMELOCKCNTL_VERSION_KMD (1 << 4) - -#define ADL_GLSYNC_FRAMELOCKCNTL_STATE_ENABLE ( 1 << 0) -#define ADL_GLSYNC_FRAMELOCKCNTL_STATE_KMD (1 << 4) - -// GL-Sync Framelock counters mask (bit-vector) -#define ADL_GLSYNC_COUNTER_SWAP ( 1 << 0 ) - -// GL-Sync Signal Sources (unique values) - -/// GL-Sync signal source is undefined -#define ADL_GLSYNC_SIGNALSOURCE_UNDEFINED 0x00000100 -/// GL-Sync signal source is Free Run -#define ADL_GLSYNC_SIGNALSOURCE_FREERUN 0x00000101 -/// GL-Sync signal source is the BNC GL-Sync port -#define ADL_GLSYNC_SIGNALSOURCE_BNCPORT 0x00000102 -/// GL-Sync signal source is the RJ45(1) GL-Sync port -#define ADL_GLSYNC_SIGNALSOURCE_RJ45PORT1 0x00000103 -/// GL-Sync signal source is the RJ45(2) GL-Sync port -#define ADL_GLSYNC_SIGNALSOURCE_RJ45PORT2 0x00000104 - - -// GL-Sync Signal Types (unique values) - -/// GL-Sync signal type is unknown -#define ADL_GLSYNC_SIGNALTYPE_UNDEFINED 0 -/// GL-Sync signal type is 480I -#define ADL_GLSYNC_SIGNALTYPE_480I 1 -/// GL-Sync signal type is 576I -#define ADL_GLSYNC_SIGNALTYPE_576I 2 -/// GL-Sync signal type is 480P -#define ADL_GLSYNC_SIGNALTYPE_480P 3 -/// GL-Sync signal type is 576P -#define ADL_GLSYNC_SIGNALTYPE_576P 4 -/// GL-Sync signal type is 720P -#define ADL_GLSYNC_SIGNALTYPE_720P 5 -/// GL-Sync signal type is 1080P -#define ADL_GLSYNC_SIGNALTYPE_1080P 6 -/// GL-Sync signal type is 1080I -#define ADL_GLSYNC_SIGNALTYPE_1080I 7 -/// GL-Sync signal type is SDI -#define ADL_GLSYNC_SIGNALTYPE_SDI 8 -/// GL-Sync signal type is TTL -#define ADL_GLSYNC_SIGNALTYPE_TTL 9 -/// GL_Sync signal type is Analog -#define ADL_GLSYNC_SIGNALTYPE_ANALOG 10 - -// GL-Sync Sync Field options (unique values) - -///GL-Sync sync field option is undefined -#define ADL_GLSYNC_SYNCFIELD_UNDEFINED 0 -///GL-Sync sync field option is Sync to Field 1 (used for Interlaced signal types) -#define ADL_GLSYNC_SYNCFIELD_BOTH 1 -///GL-Sync sync field option is Sync to Both fields (used for Interlaced signal types) -#define ADL_GLSYNC_SYNCFIELD_1 2 - - -// GL-Sync trigger edge options (unique values) - -/// GL-Sync trigger edge is undefined -#define ADL_GLSYNC_TRIGGEREDGE_UNDEFINED 0 -/// GL-Sync trigger edge is the rising edge -#define ADL_GLSYNC_TRIGGEREDGE_RISING 1 -/// GL-Sync trigger edge is the falling edge -#define ADL_GLSYNC_TRIGGEREDGE_FALLING 2 -/// GL-Sync trigger edge is both the rising and the falling edge -#define ADL_GLSYNC_TRIGGEREDGE_BOTH 3 - - -// GL-Sync scan rate coefficient/multiplier options (unique values) - -/// GL-Sync scan rate coefficient/multiplier is undefined -#define ADL_GLSYNC_SCANRATECOEFF_UNDEFINED 0 -/// GL-Sync scan rate coefficient/multiplier is 5 -#define ADL_GLSYNC_SCANRATECOEFF_x5 1 -/// GL-Sync scan rate coefficient/multiplier is 4 -#define ADL_GLSYNC_SCANRATECOEFF_x4 2 -/// GL-Sync scan rate coefficient/multiplier is 3 -#define ADL_GLSYNC_SCANRATECOEFF_x3 3 -/// GL-Sync scan rate coefficient/multiplier is 5:2 (SMPTE) -#define ADL_GLSYNC_SCANRATECOEFF_x5_DIV_2 4 -/// GL-Sync scan rate coefficient/multiplier is 2 -#define ADL_GLSYNC_SCANRATECOEFF_x2 5 -/// GL-Sync scan rate coefficient/multiplier is 3 : 2 -#define ADL_GLSYNC_SCANRATECOEFF_x3_DIV_2 6 -/// GL-Sync scan rate coefficient/multiplier is 5 : 4 -#define ADL_GLSYNC_SCANRATECOEFF_x5_DIV_4 7 -/// GL-Sync scan rate coefficient/multiplier is 1 (default) -#define ADL_GLSYNC_SCANRATECOEFF_x1 8 -/// GL-Sync scan rate coefficient/multiplier is 4 : 5 -#define ADL_GLSYNC_SCANRATECOEFF_x4_DIV_5 9 -/// GL-Sync scan rate coefficient/multiplier is 2 : 3 -#define ADL_GLSYNC_SCANRATECOEFF_x2_DIV_3 10 -/// GL-Sync scan rate coefficient/multiplier is 1 : 2 -#define ADL_GLSYNC_SCANRATECOEFF_x1_DIV_2 11 -/// GL-Sync scan rate coefficient/multiplier is 2 : 5 (SMPTE) -#define ADL_GLSYNC_SCANRATECOEFF_x2_DIV_5 12 -/// GL-Sync scan rate coefficient/multiplier is 1 : 3 -#define ADL_GLSYNC_SCANRATECOEFF_x1_DIV_3 13 -/// GL-Sync scan rate coefficient/multiplier is 1 : 4 -#define ADL_GLSYNC_SCANRATECOEFF_x1_DIV_4 14 -/// GL-Sync scan rate coefficient/multiplier is 1 : 5 -#define ADL_GLSYNC_SCANRATECOEFF_x1_DIV_5 15 - - -// GL-Sync port (signal presence) states (unique values) - -/// GL-Sync port state is undefined -#define ADL_GLSYNC_PORTSTATE_UNDEFINED 0 -/// GL-Sync port is not connected -#define ADL_GLSYNC_PORTSTATE_NOCABLE 1 -/// GL-Sync port is Idle -#define ADL_GLSYNC_PORTSTATE_IDLE 2 -/// GL-Sync port has an Input signal -#define ADL_GLSYNC_PORTSTATE_INPUT 3 -/// GL-Sync port is Output -#define ADL_GLSYNC_PORTSTATE_OUTPUT 4 - - -// GL-Sync LED types (used index within ADL_Workstation_GLSyncPortState_Get returned ppGlSyncLEDs array) (unique values) - -/// Index into the ADL_Workstation_GLSyncPortState_Get returned ppGlSyncLEDs array for the one LED of the BNC port -#define ADL_GLSYNC_LEDTYPE_BNC 0 -/// Index into the ADL_Workstation_GLSyncPortState_Get returned ppGlSyncLEDs array for the Left LED of the RJ45(1) or RJ45(2) port -#define ADL_GLSYNC_LEDTYPE_RJ45_LEFT 0 -/// Index into the ADL_Workstation_GLSyncPortState_Get returned ppGlSyncLEDs array for the Right LED of the RJ45(1) or RJ45(2) port -#define ADL_GLSYNC_LEDTYPE_RJ45_RIGHT 1 - - -// GL-Sync LED colors (unique values) - -/// GL-Sync LED undefined color -#define ADL_GLSYNC_LEDCOLOR_UNDEFINED 0 -/// GL-Sync LED is unlit -#define ADL_GLSYNC_LEDCOLOR_NOLIGHT 1 -/// GL-Sync LED is yellow -#define ADL_GLSYNC_LEDCOLOR_YELLOW 2 -/// GL-Sync LED is red -#define ADL_GLSYNC_LEDCOLOR_RED 3 -/// GL-Sync LED is green -#define ADL_GLSYNC_LEDCOLOR_GREEN 4 -/// GL-Sync LED is flashing green -#define ADL_GLSYNC_LEDCOLOR_FLASH_GREEN 5 - - -// GL-Sync Port Control (refers one GL-Sync Port) (unique values) - -/// Used to configure the RJ54(1) or RJ42(2) port of GL-Sync is as Idle -#define ADL_GLSYNC_PORTCNTL_NONE 0x00000000 -/// Used to configure the RJ54(1) or RJ42(2) port of GL-Sync is as Output -#define ADL_GLSYNC_PORTCNTL_OUTPUT 0x00000001 - - -// GL-Sync Mode Control (refers one Display/Controller) (bitfields) - -/// Used to configure the display to use internal timing (not genlocked) -#define ADL_GLSYNC_MODECNTL_NONE 0x00000000 -/// Bitfield used to configure the display as genlocked (either as Timing Client or as Timing Server) -#define ADL_GLSYNC_MODECNTL_GENLOCK 0x00000001 -/// Bitfield used to configure the display as Timing Server -#define ADL_GLSYNC_MODECNTL_TIMINGSERVER 0x00000002 - -// GL-Sync Mode Status -/// Display is currently not genlocked -#define ADL_GLSYNC_MODECNTL_STATUS_NONE 0x00000000 -/// Display is currently genlocked -#define ADL_GLSYNC_MODECNTL_STATUS_GENLOCK 0x00000001 -/// Display requires a mode switch -#define ADL_GLSYNC_MODECNTL_STATUS_SETMODE_REQUIRED 0x00000002 -/// Display is capable of being genlocked -#define ADL_GLSYNC_MODECNTL_STATUS_GENLOCK_ALLOWED 0x00000004 - -#define ADL_MAX_GLSYNC_PORTS 8 -#define ADL_MAX_GLSYNC_PORT_LEDS 8 - -// @} - -/// \defgroup define_crossfirestate CrossfireX state of a particular adapter CrossfireX combination -// @{ -#define ADL_XFIREX_STATE_NOINTERCONNECT ( 1 << 0 ) /* Dongle / cable is missing */ -#define ADL_XFIREX_STATE_DOWNGRADEPIPES ( 1 << 1 ) /* CrossfireX can be enabled if pipes are downgraded */ -#define ADL_XFIREX_STATE_DOWNGRADEMEM ( 1 << 2 ) /* CrossfireX cannot be enabled unless mem downgraded */ -#define ADL_XFIREX_STATE_REVERSERECOMMENDED ( 1 << 3 ) /* Card reversal recommended, CrossfireX cannot be enabled. */ -#define ADL_XFIREX_STATE_3DACTIVE ( 1 << 4 ) /* 3D client is active - CrossfireX cannot be safely enabled */ -#define ADL_XFIREX_STATE_MASTERONSLAVE ( 1 << 5 ) /* Dongle is OK but master is on slave */ -#define ADL_XFIREX_STATE_NODISPLAYCONNECT ( 1 << 6 ) /* No (valid) display connected to master card. */ -#define ADL_XFIREX_STATE_NOPRIMARYVIEW ( 1 << 7 ) /* CrossfireX is enabled but master is not current primary device */ -#define ADL_XFIREX_STATE_DOWNGRADEVISMEM ( 1 << 8 ) /* CrossfireX cannot be enabled unless visible mem downgraded */ -#define ADL_XFIREX_STATE_LESSTHAN8LANE_MASTER ( 1 << 9 ) /* CrossfireX can be enabled however performance not optimal due to <8 lanes */ -#define ADL_XFIREX_STATE_LESSTHAN8LANE_SLAVE ( 1 << 10 ) /* CrossfireX can be enabled however performance not optimal due to <8 lanes */ -#define ADL_XFIREX_STATE_PEERTOPEERFAILED ( 1 << 11 ) /* CrossfireX cannot be enabled due to failed peer to peer test */ -#define ADL_XFIREX_STATE_MEMISDOWNGRADED ( 1 << 16 ) /* Notification that memory is currently downgraded */ -#define ADL_XFIREX_STATE_PIPESDOWNGRADED ( 1 << 17 ) /* Notification that pipes are currently downgraded */ -#define ADL_XFIREX_STATE_XFIREXACTIVE ( 1 << 18 ) /* CrossfireX is enabled on current device */ -#define ADL_XFIREX_STATE_VISMEMISDOWNGRADED ( 1 << 19 ) /* Notification that visible FB memory is currently downgraded */ -#define ADL_XFIREX_STATE_INVALIDINTERCONNECTION ( 1 << 20 ) /* Cannot support current inter-connection configuration */ -#define ADL_XFIREX_STATE_NONP2PMODE ( 1 << 21 ) /* CrossfireX will only work with clients supporting non P2P mode */ -#define ADL_XFIREX_STATE_DOWNGRADEMEMBANKS ( 1 << 22 ) /* CrossfireX cannot be enabled unless memory banks downgraded */ -#define ADL_XFIREX_STATE_MEMBANKSDOWNGRADED ( 1 << 23 ) /* Notification that memory banks are currently downgraded */ -#define ADL_XFIREX_STATE_DUALDISPLAYSALLOWED ( 1 << 24 ) /* Extended desktop or clone mode is allowed. */ -#define ADL_XFIREX_STATE_P2P_APERTURE_MAPPING ( 1 << 25 ) /* P2P mapping was through peer aperture */ -#define ADL_XFIREX_STATE_P2PFLUSH_REQUIRED ADL_XFIREX_STATE_P2P_APERTURE_MAPPING /* For back compatible */ -#define ADL_XFIREX_STATE_XSP_CONNECTED ( 1 << 26 ) /* There is CrossfireX side port connection between GPUs */ -#define ADL_XFIREX_STATE_ENABLE_CF_REBOOT_REQUIRED ( 1 << 27 ) /* System needs a reboot bofore enable CrossfireX */ -#define ADL_XFIREX_STATE_DISABLE_CF_REBOOT_REQUIRED ( 1 << 28 ) /* System needs a reboot after disable CrossfireX */ -#define ADL_XFIREX_STATE_DRV_HANDLE_DOWNGRADE_KEY ( 1 << 29 ) /* Indicate base driver handles the downgrade key updating */ -#define ADL_XFIREX_STATE_CF_RECONFIG_REQUIRED ( 1 << 30 ) /* CrossfireX need to be reconfigured by CCC because of a LDA chain broken */ -#define ADL_XFIREX_STATE_ERRORGETTINGSTATUS ( 1 << 31 ) /* Could not obtain current status */ -// @} - -/////////////////////////////////////////////////////////////////////////// -// ADL_DISPLAY_ADJUSTMENT_PIXELFORMAT adjustment values -// (bit-vector) -/////////////////////////////////////////////////////////////////////////// -/// \defgroup define_pixel_formats Pixel Formats values -/// This group defines the various Pixel Formats that a particular digital display can support. \n -/// Since a display can support multiple formats, these values can be bit-or'ed to indicate the various formats \n -// @{ -#define ADL_DISPLAY_PIXELFORMAT_UNKNOWN 0 -#define ADL_DISPLAY_PIXELFORMAT_RGB (1 << 0) -#define ADL_DISPLAY_PIXELFORMAT_YCRCB444 (1 << 1) //Limited range -#define ADL_DISPLAY_PIXELFORMAT_YCRCB422 (1 << 2) //Limited range -#define ADL_DISPLAY_PIXELFORMAT_RGB_LIMITED_RANGE (1 << 3) -#define ADL_DISPLAY_PIXELFORMAT_RGB_FULL_RANGE ADL_DISPLAY_PIXELFORMAT_RGB //Full range -#define ADL_DISPLAY_PIXELFORMAT_YCRCB420 (1 << 4) -// @} - -/// \defgroup define_contype Connector Type Values -/// ADLDisplayConfig.ulConnectorType defines -// @{ -#define ADL_DL_DISPLAYCONFIG_CONTYPE_UNKNOWN 0 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_CV_NONI2C_JP 1 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_CV_JPN 2 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_CV_NA 3 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_CV_NONI2C_NA 4 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_VGA 5 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_DVI_D 6 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_DVI_I 7 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_HDMI_TYPE_A 8 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_HDMI_TYPE_B 9 -#define ADL_DL_DISPLAYCONFIG_CONTYPE_DISPLAYPORT 10 -// @} - -/////////////////////////////////////////////////////////////////////////// -// ADL_DISPLAY_DISPLAYINFO_ Definitions -// for ADLDisplayInfo.iDisplayInfoMask and ADLDisplayInfo.iDisplayInfoValue -// (bit-vector) -/////////////////////////////////////////////////////////////////////////// -/// \defgroup define_displayinfomask Display Info Mask Values -// @{ -#define ADL_DISPLAY_DISPLAYINFO_DISPLAYCONNECTED 0x00000001 -#define ADL_DISPLAY_DISPLAYINFO_DISPLAYMAPPED 0x00000002 -#define ADL_DISPLAY_DISPLAYINFO_NONLOCAL 0x00000004 -#define ADL_DISPLAY_DISPLAYINFO_FORCIBLESUPPORTED 0x00000008 -#define ADL_DISPLAY_DISPLAYINFO_GENLOCKSUPPORTED 0x00000010 -#define ADL_DISPLAY_DISPLAYINFO_MULTIVPU_SUPPORTED 0x00000020 -#define ADL_DISPLAY_DISPLAYINFO_LDA_DISPLAY 0x00000040 -#define ADL_DISPLAY_DISPLAYINFO_MODETIMING_OVERRIDESSUPPORTED 0x00000080 - -#define ADL_DISPLAY_DISPLAYINFO_MANNER_SUPPORTED_SINGLE 0x00000100 -#define ADL_DISPLAY_DISPLAYINFO_MANNER_SUPPORTED_CLONE 0x00000200 - -/// Legacy support for XP -#define ADL_DISPLAY_DISPLAYINFO_MANNER_SUPPORTED_2VSTRETCH 0x00000400 -#define ADL_DISPLAY_DISPLAYINFO_MANNER_SUPPORTED_2HSTRETCH 0x00000800 -#define ADL_DISPLAY_DISPLAYINFO_MANNER_SUPPORTED_EXTENDED 0x00001000 - -/// More support manners -#define ADL_DISPLAY_DISPLAYINFO_MANNER_SUPPORTED_NSTRETCH1GPU 0x00010000 -#define ADL_DISPLAY_DISPLAYINFO_MANNER_SUPPORTED_NSTRETCHNGPU 0x00020000 -#define ADL_DISPLAY_DISPLAYINFO_MANNER_SUPPORTED_RESERVED2 0x00040000 -#define ADL_DISPLAY_DISPLAYINFO_MANNER_SUPPORTED_RESERVED3 0x00080000 - -/// Projector display type -#define ADL_DISPLAY_DISPLAYINFO_SHOWTYPE_PROJECTOR 0x00100000 - -// @} - - -/////////////////////////////////////////////////////////////////////////// -// ADL_ADAPTER_DISPLAY_MANNER_SUPPORTED_ Definitions -// for ADLAdapterDisplayCap of ADL_Adapter_Display_Cap() -// (bit-vector) -/////////////////////////////////////////////////////////////////////////// -/// \defgroup define_adaptermanner Adapter Manner Support Values -// @{ -#define ADL_ADAPTER_DISPLAYCAP_MANNER_SUPPORTED_NOTACTIVE 0x00000001 -#define ADL_ADAPTER_DISPLAYCAP_MANNER_SUPPORTED_SINGLE 0x00000002 -#define ADL_ADAPTER_DISPLAYCAP_MANNER_SUPPORTED_CLONE 0x00000004 -#define ADL_ADAPTER_DISPLAYCAP_MANNER_SUPPORTED_NSTRETCH1GPU 0x00000008 -#define ADL_ADAPTER_DISPLAYCAP_MANNER_SUPPORTED_NSTRETCHNGPU 0x00000010 - -/// Legacy support for XP -#define ADL_ADAPTER_DISPLAYCAP_MANNER_SUPPORTED_2VSTRETCH 0x00000020 -#define ADL_ADAPTER_DISPLAYCAP_MANNER_SUPPORTED_2HSTRETCH 0x00000040 -#define ADL_ADAPTER_DISPLAYCAP_MANNER_SUPPORTED_EXTENDED 0x00000080 - -#define ADL_ADAPTER_DISPLAYCAP_PREFERDISPLAY_SUPPORTED 0x00000100 -#define ADL_ADAPTER_DISPLAYCAP_BEZEL_SUPPORTED 0x00000200 - - -/////////////////////////////////////////////////////////////////////////// -// ADL_DISPLAY_DISPLAYMAP_MANNER_ Definitions -// for ADLDisplayMap.iDisplayMapMask and ADLDisplayMap.iDisplayMapValue -// (bit-vector) -/////////////////////////////////////////////////////////////////////////// -#define ADL_DISPLAY_DISPLAYMAP_MANNER_RESERVED 0x00000001 -#define ADL_DISPLAY_DISPLAYMAP_MANNER_NOTACTIVE 0x00000002 -#define ADL_DISPLAY_DISPLAYMAP_MANNER_SINGLE 0x00000004 -#define ADL_DISPLAY_DISPLAYMAP_MANNER_CLONE 0x00000008 -#define ADL_DISPLAY_DISPLAYMAP_MANNER_RESERVED1 0x00000010 // Removed NSTRETCH -#define ADL_DISPLAY_DISPLAYMAP_MANNER_HSTRETCH 0x00000020 -#define ADL_DISPLAY_DISPLAYMAP_MANNER_VSTRETCH 0x00000040 -#define ADL_DISPLAY_DISPLAYMAP_MANNER_VLD 0x00000080 - -// @} - -/////////////////////////////////////////////////////////////////////////// -// ADL_DISPLAY_DISPLAYMAP_OPTION_ Definitions -// for iOption in function ADL_Display_DisplayMapConfig_Get -// (bit-vector) -/////////////////////////////////////////////////////////////////////////// -#define ADL_DISPLAY_DISPLAYMAP_OPTION_GPUINFO 0x00000001 - -/////////////////////////////////////////////////////////////////////////// -// ADL_DISPLAY_DISPLAYTARGET_ Definitions -// for ADLDisplayTarget.iDisplayTargetMask and ADLDisplayTarget.iDisplayTargetValue -// (bit-vector) -/////////////////////////////////////////////////////////////////////////// -#define ADL_DISPLAY_DISPLAYTARGET_PREFERRED 0x00000001 - -/////////////////////////////////////////////////////////////////////////// -// ADL_DISPLAY_POSSIBLEMAPRESULT_VALID Definitions -// for ADLPossibleMapResult.iPossibleMapResultMask and ADLPossibleMapResult.iPossibleMapResultValue -// (bit-vector) -/////////////////////////////////////////////////////////////////////////// -#define ADL_DISPLAY_POSSIBLEMAPRESULT_VALID 0x00000001 -#define ADL_DISPLAY_POSSIBLEMAPRESULT_BEZELSUPPORTED 0x00000002 -#define ADL_DISPLAY_POSSIBLEMAPRESULT_OVERLAPSUPPORTED 0x00000004 - -/////////////////////////////////////////////////////////////////////////// -// ADL_DISPLAY_MODE_ Definitions -// for ADLMode.iModeMask, ADLMode.iModeValue, and ADLMode.iModeFlag -// (bit-vector) -/////////////////////////////////////////////////////////////////////////// -/// \defgroup define_displaymode Display Mode Values -// @{ -#define ADL_DISPLAY_MODE_COLOURFORMAT_565 0x00000001 -#define ADL_DISPLAY_MODE_COLOURFORMAT_8888 0x00000002 -#define ADL_DISPLAY_MODE_ORIENTATION_SUPPORTED_000 0x00000004 -#define ADL_DISPLAY_MODE_ORIENTATION_SUPPORTED_090 0x00000008 -#define ADL_DISPLAY_MODE_ORIENTATION_SUPPORTED_180 0x00000010 -#define ADL_DISPLAY_MODE_ORIENTATION_SUPPORTED_270 0x00000020 -#define ADL_DISPLAY_MODE_REFRESHRATE_ROUNDED 0x00000040 -#define ADL_DISPLAY_MODE_REFRESHRATE_ONLY 0x00000080 - -#define ADL_DISPLAY_MODE_PROGRESSIVE_FLAG 0 -#define ADL_DISPLAY_MODE_INTERLACED_FLAG 2 -// @} - -/////////////////////////////////////////////////////////////////////////// -// ADL_OSMODEINFO Definitions -/////////////////////////////////////////////////////////////////////////// -/// \defgroup define_osmode OS Mode Values -// @{ -#define ADL_OSMODEINFOXPOS_DEFAULT -640 -#define ADL_OSMODEINFOYPOS_DEFAULT 0 -#define ADL_OSMODEINFOXRES_DEFAULT 640 -#define ADL_OSMODEINFOYRES_DEFAULT 480 -#define ADL_OSMODEINFOXRES_DEFAULT800 800 -#define ADL_OSMODEINFOYRES_DEFAULT600 600 -#define ADL_OSMODEINFOREFRESHRATE_DEFAULT 60 -#define ADL_OSMODEINFOCOLOURDEPTH_DEFAULT 8 -#define ADL_OSMODEINFOCOLOURDEPTH_DEFAULT16 16 -#define ADL_OSMODEINFOCOLOURDEPTH_DEFAULT24 24 -#define ADL_OSMODEINFOCOLOURDEPTH_DEFAULT32 32 -#define ADL_OSMODEINFOORIENTATION_DEFAULT 0 -#define ADL_OSMODEINFOORIENTATION_DEFAULT_WIN7 DISPLAYCONFIG_ROTATION_FORCE_UINT32 -#define ADL_OSMODEFLAG_DEFAULT 0 -// @} - - -/////////////////////////////////////////////////////////////////////////// -// ADLThreadingModel Enumeration -/////////////////////////////////////////////////////////////////////////// -/// \defgroup thread_model -/// Used with \ref ADL_Main_ControlX2_Create and \ref ADL2_Main_ControlX2_Create to specify how ADL handles API calls when executed by multiple threads concurrently. -/// \brief Declares ADL threading behavior. -// @{ -typedef enum ADLThreadingModel -{ - ADL_THREADING_UNLOCKED = 0, /*!< Default behavior. ADL will not enforce serialization of ADL API executions by multiple threads. Multiple threads will be allowed to enter to ADL at the same time. Note that ADL library is not guaranteed to be thread-safe. Client that calls ADL_Main_Control_Create have to provide its own mechanism for ADL calls serialization. */ - ADL_THREADING_LOCKED /*!< ADL will enforce serialization of ADL API when called by multiple threads. Only single thread will be allowed to enter ADL API at the time. This option makes ADL calls thread-safe. You shouldn't use this option if ADL calls will be executed on Linux on x-server rendering thread. It can cause the application to hung. */ -}ADLThreadingModel; - -// @} -/////////////////////////////////////////////////////////////////////////// -// ADLPurposeCode Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLPurposeCode -{ - ADL_PURPOSECODE_NORMAL = 0, - ADL_PURPOSECODE_HIDE_MODE_SWITCH, - ADL_PURPOSECODE_MODE_SWITCH, - ADL_PURPOSECODE_ATTATCH_DEVICE, - ADL_PURPOSECODE_DETACH_DEVICE, - ADL_PURPOSECODE_SETPRIMARY_DEVICE, - ADL_PURPOSECODE_GDI_ROTATION, - ADL_PURPOSECODE_ATI_ROTATION -}; -/////////////////////////////////////////////////////////////////////////// -// ADLAngle Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLAngle -{ - ADL_ANGLE_LANDSCAPE = 0, - ADL_ANGLE_ROTATERIGHT = 90, - ADL_ANGLE_ROTATE180 = 180, - ADL_ANGLE_ROTATELEFT = 270, -}; - -/////////////////////////////////////////////////////////////////////////// -// ADLOrientationDataType Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLOrientationDataType -{ - ADL_ORIENTATIONTYPE_OSDATATYPE, - ADL_ORIENTATIONTYPE_NONOSDATATYPE -}; - -/////////////////////////////////////////////////////////////////////////// -// ADLPanningMode Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLPanningMode -{ - ADL_PANNINGMODE_NO_PANNING = 0, - ADL_PANNINGMODE_AT_LEAST_ONE_NO_PANNING = 1, - ADL_PANNINGMODE_ALLOW_PANNING = 2, -}; - -/////////////////////////////////////////////////////////////////////////// -// ADLLARGEDESKTOPTYPE Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLLARGEDESKTOPTYPE -{ - ADL_LARGEDESKTOPTYPE_NORMALDESKTOP = 0, - ADL_LARGEDESKTOPTYPE_PSEUDOLARGEDESKTOP = 1, - ADL_LARGEDESKTOPTYPE_VERYLARGEDESKTOP = 2 -}; - -/////////////////////////////////////////////////////////////////////////// -// ADLPlatform Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLPlatForm -{ - GRAPHICS_PLATFORM_DESKTOP = 0, - GRAPHICS_PLATFORM_MOBILE = 1 -}; - -/////////////////////////////////////////////////////////////////////////// -// ADLGraphicCoreGeneration Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLGraphicCoreGeneration -{ - ADL_GRAPHIC_CORE_GENERATION_UNDEFINED = 0, - ADL_GRAPHIC_CORE_GENERATION_PRE_GCN = 1, - ADL_GRAPHIC_CORE_GENERATION_GCN = 2 -}; - -// Other Definitions for internal use - -// Values for ADL_Display_WriteAndReadI2CRev_Get() - -#define ADL_I2C_MAJOR_API_REV 0x00000001 -#define ADL_I2C_MINOR_DEFAULT_API_REV 0x00000000 -#define ADL_I2C_MINOR_OEM_API_REV 0x00000001 - -// Values for ADL_Display_WriteAndReadI2C() -#define ADL_DL_I2C_LINE_OEM 0x00000001 -#define ADL_DL_I2C_LINE_OD_CONTROL 0x00000002 -#define ADL_DL_I2C_LINE_OEM2 0x00000003 -#define ADL_DL_I2C_LINE_OEM3 0x00000004 -#define ADL_DL_I2C_LINE_OEM4 0x00000005 -#define ADL_DL_I2C_LINE_OEM5 0x00000006 -#define ADL_DL_I2C_LINE_OEM6 0x00000007 - -// Max size of I2C data buffer -#define ADL_DL_I2C_MAXDATASIZE 0x00000040 -#define ADL_DL_I2C_MAXWRITEDATASIZE 0x0000000C -#define ADL_DL_I2C_MAXADDRESSLENGTH 0x00000006 -#define ADL_DL_I2C_MAXOFFSETLENGTH 0x00000004 - - -/// Values for ADLDisplayProperty.iPropertyType -#define ADL_DL_DISPLAYPROPERTY_TYPE_UNKNOWN 0 -#define ADL_DL_DISPLAYPROPERTY_TYPE_EXPANSIONMODE 1 -#define ADL_DL_DISPLAYPROPERTY_TYPE_USEUNDERSCANSCALING 2 -/// Enables ITC processing for HDMI panels that are capable of the feature -#define ADL_DL_DISPLAYPROPERTY_TYPE_ITCFLAGENABLE 9 -#define ADL_DL_DISPLAYPROPERTY_TYPE_DOWNSCALE 11 - - -/// Values for ADLDisplayContent.iContentType -/// Certain HDMI panels that support ITC have support for a feature such that, the display on the panel -/// can be adjusted to optimize the view of the content being displayed, depending on the type of content. -#define ADL_DL_DISPLAYCONTENT_TYPE_GRAPHICS 1 -#define ADL_DL_DISPLAYCONTENT_TYPE_PHOTO 2 -#define ADL_DL_DISPLAYCONTENT_TYPE_CINEMA 4 -#define ADL_DL_DISPLAYCONTENT_TYPE_GAME 8 - - - -//values for ADLDisplayProperty.iExpansionMode -#define ADL_DL_DISPLAYPROPERTY_EXPANSIONMODE_CENTER 0 -#define ADL_DL_DISPLAYPROPERTY_EXPANSIONMODE_FULLSCREEN 1 -#define ADL_DL_DISPLAYPROPERTY_EXPANSIONMODE_ASPECTRATIO 2 - - -///\defgroup define_dither_states Dithering options -// @{ -/// Dithering disabled. -#define ADL_DL_DISPLAY_DITHER_DISABLED 0 -/// Use default driver settings for dithering. Note that the default setting could be dithering disabled. -#define ADL_DL_DISPLAY_DITHER_DRIVER_DEFAULT 1 -/// Temporal dithering to 6 bpc. Note that if the input is 12 bits, the two least significant bits will be truncated. -#define ADL_DL_DISPLAY_DITHER_FM6 2 -/// Temporal dithering to 8 bpc. -#define ADL_DL_DISPLAY_DITHER_FM8 3 -/// Temporal dithering to 10 bpc. -#define ADL_DL_DISPLAY_DITHER_FM10 4 -/// Spatial dithering to 6 bpc. Note that if the input is 12 bits, the two least significant bits will be truncated. -#define ADL_DL_DISPLAY_DITHER_DITH6 5 -/// Spatial dithering to 8 bpc. -#define ADL_DL_DISPLAY_DITHER_DITH8 6 -/// Spatial dithering to 10 bpc. -#define ADL_DL_DISPLAY_DITHER_DITH10 7 -/// Spatial dithering to 6 bpc. Random number generators are reset every frame, so the same input value of a certain pixel will always be dithered to the same output value. Note that if the input is 12 bits, the two least significant bits will be truncated. -#define ADL_DL_DISPLAY_DITHER_DITH6_NO_FRAME_RAND 8 -/// Spatial dithering to 8 bpc. Random number generators are reset every frame, so the same input value of a certain pixel will always be dithered to the same output value. -#define ADL_DL_DISPLAY_DITHER_DITH8_NO_FRAME_RAND 9 -/// Spatial dithering to 10 bpc. Random number generators are reset every frame, so the same input value of a certain pixel will always be dithered to the same output value. -#define ADL_DL_DISPLAY_DITHER_DITH10_NO_FRAME_RAND 10 -/// Truncation to 6 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN6 11 -/// Truncation to 8 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN8 12 -/// Truncation to 10 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN10 13 -/// Truncation to 10 bpc followed by spatial dithering to 8 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN10_DITH8 14 -/// Truncation to 10 bpc followed by spatial dithering to 6 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN10_DITH6 15 -/// Truncation to 10 bpc followed by temporal dithering to 8 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN10_FM8 16 -/// Truncation to 10 bpc followed by temporal dithering to 6 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN10_FM6 17 -/// Truncation to 10 bpc followed by spatial dithering to 8 bpc and temporal dithering to 6 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN10_DITH8_FM6 18 -/// Spatial dithering to 10 bpc followed by temporal dithering to 8 bpc. -#define ADL_DL_DISPLAY_DITHER_DITH10_FM8 19 -/// Spatial dithering to 10 bpc followed by temporal dithering to 6 bpc. -#define ADL_DL_DISPLAY_DITHER_DITH10_FM6 20 -/// Truncation to 8 bpc followed by spatial dithering to 6 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN8_DITH6 21 -/// Truncation to 8 bpc followed by temporal dithering to 6 bpc. -#define ADL_DL_DISPLAY_DITHER_TRUN8_FM6 22 -/// Spatial dithering to 8 bpc followed by temporal dithering to 6 bpc. -#define ADL_DL_DISPLAY_DITHER_DITH8_FM6 23 -#define ADL_DL_DISPLAY_DITHER_LAST ADL_DL_DISPLAY_DITHER_DITH8_FM6 -// @} - - -/// Display Get Cached EDID flag -#define ADL_MAX_EDIDDATA_SIZE 256 // number of UCHAR -#define ADL_MAX_OVERRIDEEDID_SIZE 512 // number of UCHAR -#define ADL_MAX_EDID_EXTENSION_BLOCKS 3 - -#define ADL_DL_CONTROLLER_OVERLAY_ALPHA 0 -#define ADL_DL_CONTROLLER_OVERLAY_ALPHAPERPIX 1 - -#define ADL_DL_DISPLAY_DATA_PACKET__INFO_PACKET_RESET 0x00000000 -#define ADL_DL_DISPLAY_DATA_PACKET__INFO_PACKET_SET 0x00000001 -#define ADL_DL_DISPLAY_DATA_PACKET__INFO_PACKET_SCAN 0x00000002 - -///\defgroup define_display_packet Display Data Packet Types -// @{ -#define ADL_DL_DISPLAY_DATA_PACKET__TYPE__AVI 0x00000001 -#define ADL_DL_DISPLAY_DATA_PACKET__TYPE__GAMMUT 0x00000002 -#define ADL_DL_DISPLAY_DATA_PACKET__TYPE__VENDORINFO 0x00000004 -#define ADL_DL_DISPLAY_DATA_PACKET__TYPE__HDR 0x00000008 -#define ADL_DL_DISPLAY_DATA_PACKET__TYPE__SPD 0x00000010 -// @} - -// matrix types -#define ADL_GAMUT_MATRIX_SD 1 // SD matrix i.e. BT601 -#define ADL_GAMUT_MATRIX_HD 2 // HD matrix i.e. BT709 - -///\defgroup define_clockinfo_flags Clock flags -/// Used by ADLAdapterODClockInfo.iFlag -// @{ -#define ADL_DL_CLOCKINFO_FLAG_FULLSCREEN3DONLY 0x00000001 -#define ADL_DL_CLOCKINFO_FLAG_ALWAYSFULLSCREEN3D 0x00000002 -#define ADL_DL_CLOCKINFO_FLAG_VPURECOVERYREDUCED 0x00000004 -#define ADL_DL_CLOCKINFO_FLAG_THERMALPROTECTION 0x00000008 -// @} - -// Supported GPUs -// ADL_Display_PowerXpressActiveGPU_Get() -#define ADL_DL_POWERXPRESS_GPU_INTEGRATED 1 -#define ADL_DL_POWERXPRESS_GPU_DISCRETE 2 - -// Possible values for lpOperationResult -// ADL_Display_PowerXpressActiveGPU_Get() -#define ADL_DL_POWERXPRESS_SWITCH_RESULT_STARTED 1 // Switch procedure has been started - Windows platform only -#define ADL_DL_POWERXPRESS_SWITCH_RESULT_DECLINED 2 // Switch procedure cannot be started - All platforms -#define ADL_DL_POWERXPRESS_SWITCH_RESULT_ALREADY 3 // System already has required status - All platforms -#define ADL_DL_POWERXPRESS_SWITCH_RESULT_DEFERRED 5 // Switch was deferred and requires an X restart - Linux platform only - -// PowerXpress support version -// ADL_Display_PowerXpressVersion_Get() -#define ADL_DL_POWERXPRESS_VERSION_MAJOR 2 // Current PowerXpress support version 2.0 -#define ADL_DL_POWERXPRESS_VERSION_MINOR 0 - -#define ADL_DL_POWERXPRESS_VERSION (((ADL_DL_POWERXPRESS_VERSION_MAJOR) << 16) | ADL_DL_POWERXPRESS_VERSION_MINOR) - -//values for ADLThermalControllerInfo.iThermalControllerDomain -#define ADL_DL_THERMAL_DOMAIN_OTHER 0 -#define ADL_DL_THERMAL_DOMAIN_GPU 1 - -//values for ADLThermalControllerInfo.iFlags -#define ADL_DL_THERMAL_FLAG_INTERRUPT 1 -#define ADL_DL_THERMAL_FLAG_FANCONTROL 2 - -///\defgroup define_fanctrl Fan speed cotrol -/// Values for ADLFanSpeedInfo.iFlags -// @{ -#define ADL_DL_FANCTRL_SUPPORTS_PERCENT_READ 1 -#define ADL_DL_FANCTRL_SUPPORTS_PERCENT_WRITE 2 -#define ADL_DL_FANCTRL_SUPPORTS_RPM_READ 4 -#define ADL_DL_FANCTRL_SUPPORTS_RPM_WRITE 8 -// @} - -//values for ADLFanSpeedValue.iSpeedType -#define ADL_DL_FANCTRL_SPEED_TYPE_PERCENT 1 -#define ADL_DL_FANCTRL_SPEED_TYPE_RPM 2 - -//values for ADLFanSpeedValue.iFlags -#define ADL_DL_FANCTRL_FLAG_USER_DEFINED_SPEED 1 - -// MVPU interfaces -#define ADL_DL_MAX_MVPU_ADAPTERS 4 -#define MVPU_ADAPTER_0 0x00000001 -#define MVPU_ADAPTER_1 0x00000002 -#define MVPU_ADAPTER_2 0x00000004 -#define MVPU_ADAPTER_3 0x00000008 -#define ADL_DL_MAX_REGISTRY_PATH 256 - -//values for ADLMVPUStatus.iStatus -#define ADL_DL_MVPU_STATUS_OFF 0 -#define ADL_DL_MVPU_STATUS_ON 1 - -// values for ASIC family -///\defgroup define_Asic_type Detailed asic types -/// Defines for Adapter ASIC family type -// @{ -#define ADL_ASIC_UNDEFINED 0 -#define ADL_ASIC_DISCRETE (1 << 0) -#define ADL_ASIC_INTEGRATED (1 << 1) -#define ADL_ASIC_FIREGL (1 << 2) -#define ADL_ASIC_FIREMV (1 << 3) -#define ADL_ASIC_XGP (1 << 4) -#define ADL_ASIC_FUSION (1 << 5) -#define ADL_ASIC_FIRESTREAM (1 << 6) -#define ADL_ASIC_EMBEDDED (1 << 7) -// @} - -///\defgroup define_detailed_timing_flags Detailed Timimg Flags -/// Defines for ADLDetailedTiming.sTimingFlags field -// @{ -#define ADL_DL_TIMINGFLAG_DOUBLE_SCAN 0x0001 -//sTimingFlags is set when the mode is INTERLACED, if not PROGRESSIVE -#define ADL_DL_TIMINGFLAG_INTERLACED 0x0002 -//sTimingFlags is set when the Horizontal Sync is POSITIVE, if not NEGATIVE -#define ADL_DL_TIMINGFLAG_H_SYNC_POLARITY 0x0004 -//sTimingFlags is set when the Vertical Sync is POSITIVE, if not NEGATIVE -#define ADL_DL_TIMINGFLAG_V_SYNC_POLARITY 0x0008 -// @} - -///\defgroup define_modetiming_standard Timing Standards -/// Defines for ADLDisplayModeInfo.iTimingStandard field -// @{ -#define ADL_DL_MODETIMING_STANDARD_CVT 0x00000001 // CVT Standard -#define ADL_DL_MODETIMING_STANDARD_GTF 0x00000002 // GFT Standard -#define ADL_DL_MODETIMING_STANDARD_DMT 0x00000004 // DMT Standard -#define ADL_DL_MODETIMING_STANDARD_CUSTOM 0x00000008 // User-defined standard -#define ADL_DL_MODETIMING_STANDARD_DRIVER_DEFAULT 0x00000010 // Remove Mode from overriden list -#define ADL_DL_MODETIMING_STANDARD_CVT_RB 0x00000020 // CVT-RB Standard -// @} - -// \defgroup define_xserverinfo driver x-server info -/// These flags are used by ADL_XServerInfo_Get() -// @ - -/// Xinerama is active in the x-server, Xinerama extension may report it to be active but it -/// may not be active in x-server -#define ADL_XSERVERINFO_XINERAMAACTIVE (1<<0) - -/// RandR 1.2 is supported by driver, RandR extension may report version 1.2 -/// but driver may not support it -#define ADL_XSERVERINFO_RANDR12SUPPORTED (1<<1) -// @ - - -///\defgroup define_eyefinity_constants Eyefinity Definitions -// @{ - -#define ADL_CONTROLLERVECTOR_0 1 // ADL_CONTROLLERINDEX_0 = 0, (1 << ADL_CONTROLLERINDEX_0) -#define ADL_CONTROLLERVECTOR_1 2 // ADL_CONTROLLERINDEX_1 = 1, (1 << ADL_CONTROLLERINDEX_1) - -#define ADL_DISPLAY_SLSGRID_ORIENTATION_000 0x00000001 -#define ADL_DISPLAY_SLSGRID_ORIENTATION_090 0x00000002 -#define ADL_DISPLAY_SLSGRID_ORIENTATION_180 0x00000004 -#define ADL_DISPLAY_SLSGRID_ORIENTATION_270 0x00000008 -#define ADL_DISPLAY_SLSGRID_CAP_OPTION_RELATIVETO_LANDSCAPE 0x00000001 -#define ADL_DISPLAY_SLSGRID_CAP_OPTION_RELATIVETO_CURRENTANGLE 0x00000002 -#define ADL_DISPLAY_SLSGRID_PORTAIT_MODE 0x00000004 -#define ADL_DISPLAY_SLSGRID_KEEPTARGETROTATION 0x00000080 - -#define ADL_DISPLAY_SLSGRID_SAMEMODESLS_SUPPORT 0x00000010 -#define ADL_DISPLAY_SLSGRID_MIXMODESLS_SUPPORT 0x00000020 -#define ADL_DISPLAY_SLSGRID_DISPLAYROTATION_SUPPORT 0x00000040 -#define ADL_DISPLAY_SLSGRID_DESKTOPROTATION_SUPPORT 0x00000080 - - -#define ADL_DISPLAY_SLSMAP_SLSLAYOUTMODE_FIT 0x0100 -#define ADL_DISPLAY_SLSMAP_SLSLAYOUTMODE_FILL 0x0200 -#define ADL_DISPLAY_SLSMAP_SLSLAYOUTMODE_EXPAND 0x0400 - -#define ADL_DISPLAY_SLSMAP_IS_SLS 0x1000 -#define ADL_DISPLAY_SLSMAP_IS_SLSBUILDER 0x2000 -#define ADL_DISPLAY_SLSMAP_IS_CLONEVT 0x4000 - -#define ADL_DISPLAY_SLSMAPCONFIG_GET_OPTION_RELATIVETO_LANDSCAPE 0x00000001 -#define ADL_DISPLAY_SLSMAPCONFIG_GET_OPTION_RELATIVETO_CURRENTANGLE 0x00000002 - -#define ADL_DISPLAY_SLSMAPCONFIG_CREATE_OPTION_RELATIVETO_LANDSCAPE 0x00000001 -#define ADL_DISPLAY_SLSMAPCONFIG_CREATE_OPTION_RELATIVETO_CURRENTANGLE 0x00000002 - -#define ADL_DISPLAY_SLSMAPCONFIG_REARRANGE_OPTION_RELATIVETO_LANDSCAPE 0x00000001 -#define ADL_DISPLAY_SLSMAPCONFIG_REARRANGE_OPTION_RELATIVETO_CURRENTANGLE 0x00000002 - -#define ADL_SLS_SAMEMODESLS_SUPPORT 0x0001 -#define ADL_SLS_MIXMODESLS_SUPPORT 0x0002 -#define ADL_SLS_DISPLAYROTATIONSLS_SUPPORT 0x0004 -#define ADL_SLS_DESKTOPROTATIONSLS_SUPPORT 0x0008 - -#define ADL_SLS_TARGETS_INVALID 0x0001 -#define ADL_SLS_MODES_INVALID 0x0002 -#define ADL_SLS_ROTATIONS_INVALID 0x0004 -#define ADL_SLS_POSITIONS_INVALID 0x0008 -#define ADL_SLS_LAYOUTMODE_INVALID 0x0010 - -#define ADL_DISPLAY_SLSDISPLAYOFFSET_VALID 0x0002 - -#define ADL_DISPLAY_SLSGRID_RELATIVETO_LANDSCAPE 0x00000010 -#define ADL_DISPLAY_SLSGRID_RELATIVETO_CURRENTANGLE 0x00000020 - - -/// The bit mask identifies displays is currently in bezel mode. -#define ADL_DISPLAY_SLSMAP_BEZELMODE 0x00000010 -/// The bit mask identifies displays from this map is arranged. -#define ADL_DISPLAY_SLSMAP_DISPLAYARRANGED 0x00000002 -/// The bit mask identifies this map is currently in used for the current adapter. -#define ADL_DISPLAY_SLSMAP_CURRENTCONFIG 0x00000004 - -///For onlay active SLS map info -#define ADL_DISPLAY_SLSMAPINDEXLIST_OPTION_ACTIVE 0x00000001 - -///For Bezel -#define ADL_DISPLAY_BEZELOFFSET_STEPBYSTEPSET 0x00000004 -#define ADL_DISPLAY_BEZELOFFSET_COMMIT 0x00000008 - -typedef enum _SLS_ImageCropType { - Fit = 1, - Fill = 2, - Expand = 3 -}SLS_ImageCropType; - - -typedef enum _DceSettingsType { - DceSetting_HdmiLq, - DceSetting_DpSettings, - DceSetting_Protection -} DceSettingsType; - -typedef enum _DpLinkRate { - DPLinkRate_Unknown, - DPLinkRate_RBR, - DPLinkRate_HBR, - DPLinkRate_HBR2, - DPLinkRate_HBR3 -} DpLinkRate; - -// @} - -///\defgroup define_powerxpress_constants PowerXpress Definitions -/// @{ - -/// The bit mask identifies PX caps for ADLPXConfigCaps.iPXConfigCapMask and ADLPXConfigCaps.iPXConfigCapValue -#define ADL_PX_CONFIGCAPS_SPLASHSCREEN_SUPPORT 0x0001 -#define ADL_PX_CONFIGCAPS_CF_SUPPORT 0x0002 -#define ADL_PX_CONFIGCAPS_MUXLESS 0x0004 -#define ADL_PX_CONFIGCAPS_PROFILE_COMPLIANT 0x0008 -#define ADL_PX_CONFIGCAPS_NON_AMD_DRIVEN_DISPLAYS 0x0010 -#define ADL_PX_CONFIGCAPS_FIXED_SUPPORT 0x0020 -#define ADL_PX_CONFIGCAPS_DYNAMIC_SUPPORT 0x0040 -#define ADL_PX_CONFIGCAPS_HIDE_AUTO_SWITCH 0x0080 - -/// The bit mask identifies PX schemes for ADLPXSchemeRange -#define ADL_PX_SCHEMEMASK_FIXED 0x0001 -#define ADL_PX_SCHEMEMASK_DYNAMIC 0x0002 - -/// PX Schemes -typedef enum _ADLPXScheme -{ - ADL_PX_SCHEME_INVALID = 0, - ADL_PX_SCHEME_FIXED = ADL_PX_SCHEMEMASK_FIXED, - ADL_PX_SCHEME_DYNAMIC = ADL_PX_SCHEMEMASK_DYNAMIC -}ADLPXScheme; - -/// Just keep the old definitions for compatibility, need to be removed later -typedef enum PXScheme -{ - PX_SCHEME_INVALID = 0, - PX_SCHEME_FIXED = 1, - PX_SCHEME_DYNAMIC = 2 -} PXScheme; - - -/// @} - -///\defgroup define_appprofiles For Application Profiles -/// @{ - -#define ADL_APP_PROFILE_FILENAME_LENGTH 256 -#define ADL_APP_PROFILE_TIMESTAMP_LENGTH 32 -#define ADL_APP_PROFILE_VERSION_LENGTH 32 -#define ADL_APP_PROFILE_PROPERTY_LENGTH 64 - -enum ApplicationListType -{ - ADL_PX40_MRU, - ADL_PX40_MISSED, - ADL_PX40_DISCRETE, - ADL_PX40_INTEGRATED, - ADL_MMD_PROFILED, - ADL_PX40_TOTAL -}; - -typedef enum _ADLProfilePropertyType -{ - ADL_PROFILEPROPERTY_TYPE_BINARY = 0, - ADL_PROFILEPROPERTY_TYPE_BOOLEAN, - ADL_PROFILEPROPERTY_TYPE_DWORD, - ADL_PROFILEPROPERTY_TYPE_QWORD, - ADL_PROFILEPROPERTY_TYPE_ENUMERATED, - ADL_PROFILEPROPERTY_TYPE_STRING -}ADLProfilePropertyType; - - -/// @} - -///\defgroup define_dp12 For Display Port 1.2 -/// @{ - -/// Maximum Relative Address Link -#define ADL_MAX_RAD_LINK_COUNT 15 - -/// @} - -///\defgroup defines_gamutspace Driver Supported Gamut Space -/// @{ - -/// The flags desribes that gamut is related to source or to destination and to overlay or to graphics -#define ADL_GAMUT_REFERENCE_SOURCE (1 << 0) -#define ADL_GAMUT_GAMUT_VIDEO_CONTENT (1 << 1) - -/// The flags are used to describe the source of gamut and how read information from struct ADLGamutData -#define ADL_CUSTOM_WHITE_POINT (1 << 0) -#define ADL_CUSTOM_GAMUT (1 << 1) -#define ADL_GAMUT_REMAP_ONLY (1 << 2) - -/// The define means the predefined gamut values . -///Driver uses to find entry in the table and apply appropriate gamut space. -#define ADL_GAMUT_SPACE_CCIR_709 (1 << 0) -#define ADL_GAMUT_SPACE_CCIR_601 (1 << 1) -#define ADL_GAMUT_SPACE_ADOBE_RGB (1 << 2) -#define ADL_GAMUT_SPACE_CIE_RGB (1 << 3) -#define ADL_GAMUT_SPACE_CUSTOM (1 << 4) -#define ADL_GAMUT_SPACE_CCIR_2020 (1 << 5) -#define ADL_GAMUT_SPACE_APPCTRL (1 << 6) - -/// Predefine white point values are structed similar to gamut . -#define ADL_WHITE_POINT_5000K (1 << 0) -#define ADL_WHITE_POINT_6500K (1 << 1) -#define ADL_WHITE_POINT_7500K (1 << 2) -#define ADL_WHITE_POINT_9300K (1 << 3) -#define ADL_WHITE_POINT_CUSTOM (1 << 4) - -///gamut and white point coordinates are from 0.0 -1.0 and divider is used to find the real value . -/// X float = X int /divider -#define ADL_GAMUT_WHITEPOINT_DIVIDER 10000 - -///gamma a0 coefficient uses the following divider: -#define ADL_REGAMMA_COEFFICIENT_A0_DIVIDER 10000000 -///gamma a1 ,a2,a3 coefficients use the following divider: -#define ADL_REGAMMA_COEFFICIENT_A1A2A3_DIVIDER 1000 - -///describes whether the coefficients are from EDID or custom user values. -#define ADL_EDID_REGAMMA_COEFFICIENTS (1 << 0) -///Used for struct ADLRegamma. Feature if set use gamma ramp, if missing use regamma coefficents -#define ADL_USE_GAMMA_RAMP (1 << 4) -///Used for struct ADLRegamma. If the gamma ramp flag is used then the driver could apply de gamma corretion to the supplied curve and this depends on this flag -#define ADL_APPLY_DEGAMMA (1 << 5) -///specifies that standard SRGB gamma should be applied -#define ADL_EDID_REGAMMA_PREDEFINED_SRGB (1 << 1) -///specifies that PQ gamma curve should be applied -#define ADL_EDID_REGAMMA_PREDEFINED_PQ (1 << 2) -///specifies that PQ gamma curve should be applied, lower max nits -#define ADL_EDID_REGAMMA_PREDEFINED_PQ_2084_INTERIM (1 << 3) -///specifies that 3.6 gamma should be applied -#define ADL_EDID_REGAMMA_PREDEFINED_36 (1 << 6) -///specifies that BT709 gama should be applied -#define ADL_EDID_REGAMMA_PREDEFINED_BT709 (1 << 7) -///specifies that regamma should be disabled, and application controls regamma content (of the whole screen) -#define ADL_EDID_REGAMMA_PREDEFINED_APPCTRL (1 << 8) - -/// @} - -/// \defgroup define_ddcinfo_pixelformats DDCInfo Pixel Formats -/// @{ -/// defines for iPanelPixelFormat in struct ADLDDCInfo2 -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_RGB656 0x00000001L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_RGB666 0x00000002L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_RGB888 0x00000004L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_RGB101010 0x00000008L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_RGB161616 0x00000010L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_RGB_RESERVED1 0x00000020L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_RGB_RESERVED2 0x00000040L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_RGB_RESERVED3 0x00000080L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_XRGB_BIAS101010 0x00000100L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_YCBCR444_8BPCC 0x00000200L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_YCBCR444_10BPCC 0x00000400L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_YCBCR444_12BPCC 0x00000800L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_YCBCR422_8BPCC 0x00001000L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_YCBCR422_10BPCC 0x00002000L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_YCBCR422_12BPCC 0x00004000L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_YCBCR420_8BPCC 0x00008000L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_YCBCR420_10BPCC 0x00010000L -#define ADL_DISPLAY_DDCINFO_PIXEL_FORMAT_YCBCR420_12BPCC 0x00020000L -/// @} - -/// \defgroup define_source_content_TF ADLSourceContentAttributes transfer functions (gamma) -/// @{ -/// defines for iTransferFunction in ADLSourceContentAttributes -#define ADL_TF_sRGB 0x0001 ///< sRGB -#define ADL_TF_BT709 0x0002 ///< BT.709 -#define ADL_TF_PQ2084 0x0004 ///< PQ2084 -#define ADL_TF_PQ2084_INTERIM 0x0008 ///< PQ2084-Interim -#define ADL_TF_LINEAR_0_1 0x0010 ///< Linear 0 - 1 -#define ADL_TF_LINEAR_0_125 0x0020 ///< Linear 0 - 125 -#define ADL_TF_DOLBYVISION 0x0040 ///< DolbyVision -#define ADL_TF_GAMMA_22 0x0080 ///< Plain 2.2 gamma curve -/// @} - -/// \defgroup define_source_content_CS ADLSourceContentAttributes color spaces -/// @{ -/// defines for iColorSpace in ADLSourceContentAttributes -#define ADL_CS_sRGB 0x0001 ///< sRGB -#define ADL_CS_BT601 0x0002 ///< BT.601 -#define ADL_CS_BT709 0x0004 ///< BT.709 -#define ADL_CS_BT2020 0x0008 ///< BT.2020 -#define ADL_CS_ADOBE 0x0010 ///< Adobe RGB -#define ADL_CS_P3 0x0020 ///< DCI-P3 -#define ADL_CS_scRGB_MS_REF 0x0040 ///< scRGB (MS Reference) -#define ADL_CS_DISPLAY_NATIVE 0x0080 ///< Display Native -#define ADL_CS_APP_CONTROL 0x0100 ///< Application Controlled -#define ADL_CS_DOLBYVISION 0x0200 ///< DolbyVision -/// @} - -/// \defgroup define_HDR_support ADLDDCInfo2 HDR support options -/// @{ -/// defines for iSupportedHDR in ADLDDCInfo2 -#define ADL_HDR_CEA861_3 0x0001 ///< HDR10/CEA861.3 HDR supported -#define ADL_HDR_DOLBYVISION 0x0002 ///< DolbyVision HDR supported -#define ADL_HDR_FREESYNC_HDR 0x0004 ///< FreeSync HDR supported -/// @} - -/// \defgroup define_FreesyncFlags ADLDDCInfo2 Freesync HDR flags -/// @{ -/// defines for iFreesyncFlags in ADLDDCInfo2 -#define ADL_HDR_FREESYNC_BACKLIGHT_SUPPORT 0x0001 ///< Global backlight control supported -#define ADL_HDR_FREESYNC_LOCAL_DIMMING 0x0002 ///< Local dimming supported -/// @} - -/// \defgroup define_source_content_flags ADLSourceContentAttributes flags -/// @{ -/// defines for iFlags in ADLSourceContentAttributes -#define ADL_SCA_LOCAL_DIMMING_DISABLE 0x0001 ///< Disable local dimming -/// @} - -/// \defgroup define_dbd_state Deep Bit Depth -/// @{ - -/// defines for ADL_Workstation_DeepBitDepth_Get and ADL_Workstation_DeepBitDepth_Set functions -// This value indicates that the deep bit depth state is forced off -#define ADL_DEEPBITDEPTH_FORCEOFF 0 -/// This value indicates that the deep bit depth state is set to auto, the driver will automatically enable the -/// appropriate deep bit depth state depending on what connected display supports. -#define ADL_DEEPBITDEPTH_10BPP_AUTO 1 -/// This value indicates that the deep bit depth state is forced on to 10 bits per pixel, this is regardless if the display -/// supports 10 bpp. -#define ADL_DEEPBITDEPTH_10BPP_FORCEON 2 - -/// defines for ADLAdapterConfigMemory of ADL_Adapter_ConfigMemory_Get -/// If this bit is set, it indicates that the Deep Bit Depth pixel is set on the display -#define ADL_ADAPTER_CONFIGMEMORY_DBD (1 << 0) -/// If this bit is set, it indicates that the display is rotated (90, 180 or 270) -#define ADL_ADAPTER_CONFIGMEMORY_ROTATE (1 << 1) -/// If this bit is set, it indicates that passive stereo is set on the display -#define ADL_ADAPTER_CONFIGMEMORY_STEREO_PASSIVE (1 << 2) -/// If this bit is set, it indicates that the active stereo is set on the display -#define ADL_ADAPTER_CONFIGMEMORY_STEREO_ACTIVE (1 << 3) -/// If this bit is set, it indicates that the tear free vsync is set on the display -#define ADL_ADAPTER_CONFIGMEMORY_ENHANCEDVSYNC (1 << 4) -#define ADL_ADAPTER_CONFIGMEMORY_TEARFREEVSYNC (1 << 4) -/// @} - -/// \defgroup define_adl_validmemoryrequiredfields Memory Type -/// @{ - -/// This group defines memory types in ADLMemoryRequired struct \n -/// Indicates that this is the visible memory -#define ADL_MEMORYREQTYPE_VISIBLE (1 << 0) -/// Indicates that this is the invisible memory. -#define ADL_MEMORYREQTYPE_INVISIBLE (1 << 1) -/// Indicates that this is amount of visible memory per GPU that should be reserved for all other allocations. -#define ADL_MEMORYREQTYPE_GPURESERVEDVISIBLE (1 << 2) -/// @} - -/// \defgroup define_adapter_tear_free_status -/// Used in ADL_Adapter_TEAR_FREE_Set and ADL_Adapter_TFD_Get functions to indicate the tear free -/// desktop status. -/// @{ -/// Tear free desktop is enabled. -#define ADL_ADAPTER_TEAR_FREE_ON 1 -/// Tear free desktop can't be enabled due to a lack of graphic adapter memory. -#define ADL_ADAPTER_TEAR_FREE_NOTENOUGHMEM -1 -/// Tear free desktop can't be enabled due to quad buffer stereo being enabled. -#define ADL_ADAPTER_TEAR_FREE_OFF_ERR_QUADBUFFERSTEREO -2 -/// Tear free desktop can't be enabled due to MGPU-SLS being enabled. -#define ADL_ADAPTER_TEAR_FREE_OFF_ERR_MGPUSLD -3 -/// Tear free desktop is disabled. -#define ADL_ADAPTER_TEAR_FREE_OFF 0 -/// @} - -/// \defgroup define_adapter_crossdisplay_platforminfo -/// Used in ADL_Adapter_CrossDisplayPlatformInfo_Get function to indicate the Crossdisplay platform info. -/// @{ -/// CROSSDISPLAY platform. -#define ADL_CROSSDISPLAY_PLATFORM (1 << 0) -/// CROSSDISPLAY platform for Lasso station. -#define ADL_CROSSDISPLAY_PLATFORM_LASSO (1 << 1) -/// CROSSDISPLAY platform for docking station. -#define ADL_CROSSDISPLAY_PLATFORM_DOCKSTATION (1 << 2) -/// @} - -/// \defgroup define_adapter_crossdisplay_option -/// Used in ADL_Adapter_CrossdisplayInfoX2_Set function to indicate cross display options. -/// @{ -/// Checking if 3D application is runnning. If yes, not to do switch, return ADL_OK_WAIT; otherwise do switch. -#define ADL_CROSSDISPLAY_OPTION_NONE 0 -/// Force switching without checking for running 3D applications -#define ADL_CROSSDISPLAY_OPTION_FORCESWITCH (1 << 0) -/// @} - -/// \defgroup define_adapter_states Adapter Capabilities -/// These defines the capabilities supported by an adapter. It is used by \ref ADL_Adapter_ConfigureState_Get -/// @{ -/// Indicates that the adapter is headless (i.e. no displays can be connected to it) -#define ADL_ADAPTERCONFIGSTATE_HEADLESS ( 1 << 2 ) -/// Indicates that the adapter is configured to define the main rendering capabilities. For example, adapters -/// in Crossfire(TM) configuration, this bit would only be set on the adapter driving the display(s). -#define ADL_ADAPTERCONFIGSTATE_REQUISITE_RENDER ( 1 << 0 ) -/// Indicates that the adapter is configured to be used to unload some of the rendering work for a particular -/// requisite rendering adapter. For eample, for adapters in a Crossfire configuration, this bit would be set -/// on all adapters that are currently not driving the display(s) -#define ADL_ADAPTERCONFIGSTATE_ANCILLARY_RENDER ( 1 << 1 ) -/// Indicates that scatter gather feature enabled on the adapter -#define ADL_ADAPTERCONFIGSTATE_SCATTERGATHER ( 1 << 4 ) -/// @} - -/// \defgroup define_controllermode_ulModifiers -/// These defines the detailed actions supported by set viewport. It is used by \ref ADL_Display_ViewPort_Set -/// @{ -/// Indicate that the viewport set will change the view position -#define ADL_CONTROLLERMODE_CM_MODIFIER_VIEW_POSITION 0x00000001 -/// Indicate that the viewport set will change the view PanLock -#define ADL_CONTROLLERMODE_CM_MODIFIER_VIEW_PANLOCK 0x00000002 -/// Indicate that the viewport set will change the view size -#define ADL_CONTROLLERMODE_CM_MODIFIER_VIEW_SIZE 0x00000008 -/// @} - -/// \defgroup defines for Mirabilis -/// These defines are used for the Mirabilis feature -/// @{ -/// -/// Indicates the maximum number of audio sample rates -#define ADL_MAX_AUDIO_SAMPLE_RATE_COUNT 16 -/// @} - -/////////////////////////////////////////////////////////////////////////// -// ADLMultiChannelSplitStateFlag Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLMultiChannelSplitStateFlag -{ - ADLMultiChannelSplit_Unitialized = 0, - ADLMultiChannelSplit_Disabled = 1, - ADLMultiChannelSplit_Enabled = 2, - ADLMultiChannelSplit_SaveProfile = 3 -}; - -/////////////////////////////////////////////////////////////////////////// -// ADLSampleRate Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLSampleRate -{ - ADLSampleRate_32KHz =0, - ADLSampleRate_44P1KHz, - ADLSampleRate_48KHz, - ADLSampleRate_88P2KHz, - ADLSampleRate_96KHz, - ADLSampleRate_176P4KHz, - ADLSampleRate_192KHz, - ADLSampleRate_384KHz, //DP1.2 - ADLSampleRate_768KHz, //DP1.2 - ADLSampleRate_Undefined -}; - -/// \defgroup define_overdrive6_capabilities -/// These defines the capabilities supported by Overdrive 6. It is used by \ref ADL_Overdrive6_Capabilities_Get -// @{ -/// Indicate that core (engine) clock can be changed. -#define ADL_OD6_CAPABILITY_SCLK_CUSTOMIZATION 0x00000001 -/// Indicate that memory clock can be changed. -#define ADL_OD6_CAPABILITY_MCLK_CUSTOMIZATION 0x00000002 -/// Indicate that graphics activity reporting is supported. -#define ADL_OD6_CAPABILITY_GPU_ACTIVITY_MONITOR 0x00000004 -/// Indicate that power limit can be customized. -#define ADL_OD6_CAPABILITY_POWER_CONTROL 0x00000008 -/// Indicate that SVI2 Voltage Control is supported. -#define ADL_OD6_CAPABILITY_VOLTAGE_CONTROL 0x00000010 -/// Indicate that OD6+ percentage adjustment is supported. -#define ADL_OD6_CAPABILITY_PERCENT_ADJUSTMENT 0x00000020 -/// Indicate that Thermal Limit Unlock is supported. -#define ADL_OD6_CAPABILITY_THERMAL_LIMIT_UNLOCK 0x00000040 -///Indicate that Fan speed needs to be displayed in RPM -#define ADL_OD6_CAPABILITY_FANSPEED_IN_RPM 0x00000080 -// @} - -/// \defgroup define_overdrive6_supported_states -/// These defines the power states supported by Overdrive 6. It is used by \ref ADL_Overdrive6_Capabilities_Get -// @{ -/// Indicate that overdrive is supported in the performance state. This is currently the only state supported. -#define ADL_OD6_SUPPORTEDSTATE_PERFORMANCE 0x00000001 -/// Do not use. Reserved for future use. -#define ADL_OD6_SUPPORTEDSTATE_POWER_SAVING 0x00000002 -// @} - -/// \defgroup define_overdrive6_getstateinfo -/// These defines the power states to get information about. It is used by \ref ADL_Overdrive6_StateInfo_Get -// @{ -/// Get default clocks for the performance state. -#define ADL_OD6_GETSTATEINFO_DEFAULT_PERFORMANCE 0x00000001 -/// Do not use. Reserved for future use. -#define ADL_OD6_GETSTATEINFO_DEFAULT_POWER_SAVING 0x00000002 -/// Get clocks for current state. Currently this is the same as \ref ADL_OD6_GETSTATEINFO_CUSTOM_PERFORMANCE -/// since only performance state is supported. -#define ADL_OD6_GETSTATEINFO_CURRENT 0x00000003 -/// Get the modified clocks (if any) for the performance state. If clocks were not modified -/// through Overdrive 6, then this will return the same clocks as \ref ADL_OD6_GETSTATEINFO_DEFAULT_PERFORMANCE. -#define ADL_OD6_GETSTATEINFO_CUSTOM_PERFORMANCE 0x00000004 -/// Do not use. Reserved for future use. -#define ADL_OD6_GETSTATEINFO_CUSTOM_POWER_SAVING 0x00000005 -// @} - -/// \defgroup define_overdrive6_getstate and define_overdrive6_getmaxclockadjust -/// These defines the power states to get information about. It is used by \ref ADL_Overdrive6_StateEx_Get and \ref ADL_Overdrive6_MaxClockAdjust_Get -// @{ -/// Get default clocks for the performance state. Only performance state is currently supported. -#define ADL_OD6_STATE_PERFORMANCE 0x00000001 -// @} - -/// \defgroup define_overdrive6_setstate -/// These define which power state to set customized clocks on. It is used by \ref ADL_Overdrive6_State_Set -// @{ -/// Set customized clocks for the performance state. -#define ADL_OD6_SETSTATE_PERFORMANCE 0x00000001 -/// Do not use. Reserved for future use. -#define ADL_OD6_SETSTATE_POWER_SAVING 0x00000002 -// @} - -/// \defgroup define_overdrive6_thermalcontroller_caps -/// These defines the capabilities of the GPU thermal controller. It is used by \ref ADL_Overdrive6_ThermalController_Caps -// @{ -/// GPU thermal controller is supported. -#define ADL_OD6_TCCAPS_THERMAL_CONTROLLER 0x00000001 -/// GPU fan speed control is supported. -#define ADL_OD6_TCCAPS_FANSPEED_CONTROL 0x00000002 -/// Fan speed percentage can be read. -#define ADL_OD6_TCCAPS_FANSPEED_PERCENT_READ 0x00000100 -/// Fan speed can be set by specifying a percentage value. -#define ADL_OD6_TCCAPS_FANSPEED_PERCENT_WRITE 0x00000200 -/// Fan speed RPM (revolutions-per-minute) can be read. -#define ADL_OD6_TCCAPS_FANSPEED_RPM_READ 0x00000400 -/// Fan speed can be set by specifying an RPM value. -#define ADL_OD6_TCCAPS_FANSPEED_RPM_WRITE 0x00000800 -// @} - -/// \defgroup define_overdrive6_fanspeed_type -/// These defines the fan speed type being reported. It is used by \ref ADL_Overdrive6_FanSpeed_Get -// @{ -/// Fan speed reported in percentage. -#define ADL_OD6_FANSPEED_TYPE_PERCENT 0x00000001 -/// Fan speed reported in RPM. -#define ADL_OD6_FANSPEED_TYPE_RPM 0x00000002 -/// Fan speed has been customized by the user, and fan is not running in automatic mode. -#define ADL_OD6_FANSPEED_USER_DEFINED 0x00000100 -// @} - -/// \defgroup define_overdrive_EventCounter_type -/// These defines the EventCounter type being reported. It is used by \ref ADL2_OverdriveN_CountOfEvents_Get ,can be used on older OD version supported ASICs also. -// @{ -#define ADL_ODN_EVENTCOUNTER_THERMAL 0 -#define ADL_ODN_EVENTCOUNTER_VPURECOVERY 1 -// @} - -/////////////////////////////////////////////////////////////////////////// -// ADLODNControlType Enumeration -/////////////////////////////////////////////////////////////////////////// -enum ADLODNControlType -{ - ODNControlType_Current = 0, - ODNControlType_Default, - ODNControlType_Auto, - ODNControlType_Manual -}; - -enum ADLODNDPMMaskType -{ - ADL_ODN_DPM_CLOCK = 1 << 0, - ADL_ODN_DPM_VDDC = 1 << 1, - ADL_ODN_DPM_MASK = 1 << 2, -}; - -//ODN features Bits for ADLODNCapabilitiesX2 -enum ADLODNFeatureControl -{ - ADL_ODN_SCLK_DPM = 1 << 0, - ADL_ODN_MCLK_DPM = 1 << 1, - ADL_ODN_SCLK_VDD = 1 << 2, - ADL_ODN_MCLK_VDD = 1 << 3, - ADL_ODN_FAN_SPEED_MIN = 1 << 4, - ADL_ODN_FAN_SPEED_TARGET = 1 << 5, - ADL_ODN_ACOUSTIC_LIMIT_SCLK = 1 << 6, - ADL_ODN_TEMPERATURE_FAN_MAX = 1 << 7, - ADL_ODN_TEMPERATURE_SYSTEM = 1 << 8, - ADL_ODN_POWER_LIMIT = 1 << 9, - ADL_ODN_SCLK_AUTO_LIMIT = 1 << 10, - ADL_ODN_MCLK_AUTO_LIMIT = 1 << 11, - ADL_ODN_SCLK_DPM_MASK_ENABLE = 1 << 12, - ADL_ODN_MCLK_DPM_MASK_ENABLE = 1 << 13, - ADL_ODN_MCLK_UNDERCLOCK_ENABLE = 1 << 14, - ADL_ODN_SCLK_DPM_THROTTLE_NOTIFY = 1 << 15, - ADL_ODN_POWER_UTILIZATION = 1 << 16, - ADL_ODN_PERF_TUNING_SLIDER = 1 << 17, - ADL_ODN_REMOVE_WATTMAN_PAGE = 1 << 31 // Internal Only -}; - -//If any new feature is added, PPLIB only needs to add ext feature ID and Item ID(Seeting ID). These IDs should match the drive defined in CWDDEPM.h -enum ADLODNExtFeatureControl -{ - ADL_ODN_EXT_FEATURE_MEMORY_TIMING_TUNE = 1 << 0, - ADL_ODN_EXT_FEATURE_FAN_ZERO_RPM_CONTROL = 1 << 1, - ADL_ODN_EXT_FEATURE_AUTO_UV_ENGINE = 1 << 2, //Auto under voltage - ADL_ODN_EXT_FEATURE_AUTO_OC_ENGINE = 1 << 3, //Auto OC Enine - ADL_ODN_EXT_FEATURE_AUTO_OC_MEMORY = 1 << 4, //Auto OC memory - ADL_ODN_EXT_FEATURE_FAN_CURVE = 1 << 5 //Fan curve - -}; - -//If any new feature is added, PPLIB only needs to add ext feature ID and Item ID(Seeting ID).These IDs should match the drive defined in CWDDEPM.h -enum ADLODNExtSettingId -{ - ADL_ODN_PARAMETER_AC_TIMING = 0, - ADL_ODN_PARAMETER_FAN_ZERO_RPM_CONTROL, - ADL_ODN_PARAMETER_AUTO_UV_ENGINE, - ADL_ODN_PARAMETER_AUTO_OC_ENGINE, - ADL_ODN_PARAMETER_AUTO_OC_MEMORY, - ADL_ODN_PARAMETER_FAN_CURVE_TEMPERATURE_1, - ADL_ODN_PARAMETER_FAN_CURVE_SPEED_1, - ADL_ODN_PARAMETER_FAN_CURVE_TEMPERATURE_2, - ADL_ODN_PARAMETER_FAN_CURVE_SPEED_2, - ADL_ODN_PARAMETER_FAN_CURVE_TEMPERATURE_3, - ADL_ODN_PARAMETER_FAN_CURVE_SPEED_3, - ADL_ODN_PARAMETER_FAN_CURVE_TEMPERATURE_4, - ADL_ODN_PARAMETER_FAN_CURVE_SPEED_4, - ADL_ODN_PARAMETER_FAN_CURVE_TEMPERATURE_5, - ADL_ODN_PARAMETER_FAN_CURVE_SPEED_5, - ODN_COUNT - -} ; - -//OD8 Capability features bits -enum ADLOD8FeatureControl -{ - ADL_OD8_GFXCLK_LIMITS = 1 << 0, - ADL_OD8_GFXCLK_CURVE = 1 << 1, - ADL_OD8_UCLK_MAX = 1 << 2, - ADL_OD8_POWER_LIMIT = 1 << 3, - ADL_OD8_ACOUSTIC_LIMIT_SCLK = 1 << 4, //FanMaximumRpm - ADL_OD8_FAN_SPEED_MIN = 1 << 5, //FanMinimumPwm - ADL_OD8_TEMPERATURE_FAN = 1 << 6, //FanTargetTemperature - ADL_OD8_TEMPERATURE_SYSTEM = 1 << 7, //MaxOpTemp - ADL_OD8_MEMORY_TIMING_TUNE = 1 << 8, - ADL_OD8_FAN_ZERO_RPM_CONTROL = 1 << 9 , - ADL_OD8_AUTO_UV_ENGINE = 1 << 10, //Auto under voltage - ADL_OD8_AUTO_OC_ENGINE = 1 << 11, //Auto overclock engine - ADL_OD8_AUTO_OC_MEMORY = 1 << 12, //Auto overclock memory - ADL_OD8_FAN_CURVE = 1 << 13 //Fan curve - -}; - - -typedef enum _ADLOD8SettingId -{ - OD8_GFXCLK_FMAX = 0, - OD8_GFXCLK_FMIN, - OD8_GFXCLK_FREQ1, - OD8_GFXCLK_VOLTAGE1, - OD8_GFXCLK_FREQ2, - OD8_GFXCLK_VOLTAGE2, - OD8_GFXCLK_FREQ3, - OD8_GFXCLK_VOLTAGE3, - OD8_UCLK_FMAX, - OD8_POWER_PERCENTAGE, - OD8_FAN_MIN_SPEED, - OD8_FAN_ACOUSTIC_LIMIT, - OD8_FAN_TARGET_TEMP, - OD8_OPERATING_TEMP_MAX, - OD8_AC_TIMING, - OD8_FAN_ZERORPM_CONTROL, - OD8_AUTO_UV_ENGINE_CONTROL, - OD8_AUTO_OC_ENGINE_CONTROL, - OD8_AUTO_OC_MEMORY_CONTROL, - OD8_FAN_CURVE_TEMPERATURE_1, - OD8_FAN_CURVE_SPEED_1, - OD8_FAN_CURVE_TEMPERATURE_2, - OD8_FAN_CURVE_SPEED_2, - OD8_FAN_CURVE_TEMPERATURE_3, - OD8_FAN_CURVE_SPEED_3, - OD8_FAN_CURVE_TEMPERATURE_4, - OD8_FAN_CURVE_SPEED_4, - OD8_FAN_CURVE_TEMPERATURE_5, - OD8_FAN_CURVE_SPEED_5, - OD8_COUNT -} ADLOD8SettingId; - - -//Define Performance Metrics Log max sensors number -#define ADL_PMLOG_MAX_SENSORS 256 - -/// \defgroup define_ecc_mode_states -/// These defines the ECC(Error Correction Code) state. It is used by \ref ADL_Workstation_ECC_Get,ADL_Workstation_ECC_Set -// @{ -/// Error Correction is OFF. -#define ECC_MODE_OFF 0 -/// Error Correction is ECCV2. -#define ECC_MODE_ON 2 -/// Error Correction is HBM. -#define ECC_MODE_HBM 3 -// @} - -/// \defgroup define_board_layout_flags -/// These defines are the board layout flags state which indicates what are the valid properties of \ref ADLBoardLayoutInfo . It is used by \ref ADL_Adapter_BoardLayout_Get -// @{ -/// Indicates the number of slots is valid. -#define ADL_BLAYOUT_VALID_NUMBER_OF_SLOTS 0x1 -/// Indicates the slot sizes are valid. Size of the slot consists of the length and width. -#define ADL_BLAYOUT_VALID_SLOT_SIZES 0x2 -/// Indicates the connector offsets are valid. -#define ADL_BLAYOUT_VALID_CONNECTOR_OFFSETS 0x4 -/// Indicates the connector lengths is valid. -#define ADL_BLAYOUT_VALID_CONNECTOR_LENGTHS 0x8 -// @} - -/// \defgroup define_max_constants -/// These defines are the maximum value constants. -// @{ -/// Indicates the Maximum supported slots on board. -#define ADL_ADAPTER_MAX_SLOTS 4 -/// Indicates the Maximum supported connectors on slot. -#define ADL_ADAPTER_MAX_CONNECTORS 10 -/// Indicates the Maximum supported properties of connection -#define ADL_MAX_CONNECTION_TYPES 32 -/// Indicates the Maximum relative address link count. -#define ADL_MAX_RELATIVE_ADDRESS_LINK_COUNT 15 -/// Indicates the Maximum size of EDID data block size -#define ADL_MAX_DISPLAY_EDID_DATA_SIZE 1024 -/// Indicates the Maximum count of Error Records. -#define ADL_MAX_ERROR_RECORDS_COUNT 256 -/// Indicates the maximum number of power states supported -#define ADL_MAX_POWER_POLICY 6 -// @} - -/// \defgroup define_connection_types -/// These defines are the connection types constants which indicates what are the valid connection type of given connector. It is used by \ref ADL_Adapter_SupportedConnections_Get -// @{ -/// Indicates the VGA connection type is valid. -#define ADL_CONNECTION_TYPE_VGA 0 -/// Indicates the DVI_I connection type is valid. -#define ADL_CONNECTION_TYPE_DVI 1 -/// Indicates the DVI_SL connection type is valid. -#define ADL_CONNECTION_TYPE_DVI_SL 2 -/// Indicates the HDMI connection type is valid. -#define ADL_CONNECTION_TYPE_HDMI 3 -/// Indicates the DISPLAY PORT connection type is valid. -#define ADL_CONNECTION_TYPE_DISPLAY_PORT 4 -/// Indicates the Active dongle DP->DVI(single link) connection type is valid. -#define ADL_CONNECTION_TYPE_ACTIVE_DONGLE_DP_DVI_SL 5 -/// Indicates the Active dongle DP->DVI(double link) connection type is valid. -#define ADL_CONNECTION_TYPE_ACTIVE_DONGLE_DP_DVI_DL 6 -/// Indicates the Active dongle DP->HDMI connection type is valid. -#define ADL_CONNECTION_TYPE_ACTIVE_DONGLE_DP_HDMI 7 -/// Indicates the Active dongle DP->VGA connection type is valid. -#define ADL_CONNECTION_TYPE_ACTIVE_DONGLE_DP_VGA 8 -/// Indicates the Passive dongle DP->HDMI connection type is valid. -#define ADL_CONNECTION_TYPE_PASSIVE_DONGLE_DP_HDMI 9 -/// Indicates the Active dongle DP->VGA connection type is valid. -#define ADL_CONNECTION_TYPE_PASSIVE_DONGLE_DP_DVI 10 -/// Indicates the MST type is valid. -#define ADL_CONNECTION_TYPE_MST 11 -/// Indicates the active dongle, all types. -#define ADL_CONNECTION_TYPE_ACTIVE_DONGLE 12 -/// Indicates the Virtual Connection Type. -#define ADL_CONNECTION_TYPE_VIRTUAL 13 -/// Macros for generating bitmask from index. -#define ADL_CONNECTION_BITMAST_FROM_INDEX(index) (1 << index) -// @} - -/// \defgroup define_connection_properties -/// These defines are the connection properties which indicates what are the valid properties of given connection type. It is used by \ref ADL_Adapter_SupportedConnections_Get -// @{ -/// Indicates the property Bitrate is valid. -#define ADL_CONNECTION_PROPERTY_BITRATE 0x1 -/// Indicates the property number of lanes is valid. -#define ADL_CONNECTION_PROPERTY_NUMBER_OF_LANES 0x2 -/// Indicates the property 3D caps is valid. -#define ADL_CONNECTION_PROPERTY_3DCAPS 0x4 -/// Indicates the property output bandwidth is valid. -#define ADL_CONNECTION_PROPERTY_OUTPUT_BANDWIDTH 0x8 -/// Indicates the property colordepth is valid. -#define ADL_CONNECTION_PROPERTY_COLORDEPTH 0x10 -// @} - -/// \defgroup define_lanecount_constants -/// These defines are the Lane count constants which will be used in DP & etc. -// @{ -/// Indicates if lane count is unknown -#define ADL_LANECOUNT_UNKNOWN 0 -/// Indicates if lane count is 1 -#define ADL_LANECOUNT_ONE 1 -/// Indicates if lane count is 2 -#define ADL_LANECOUNT_TWO 2 -/// Indicates if lane count is 4 -#define ADL_LANECOUNT_FOUR 4 -/// Indicates if lane count is 8 -#define ADL_LANECOUNT_EIGHT 8 -/// Indicates default value of lane count -#define ADL_LANECOUNT_DEF ADL_LANECOUNT_FOUR -// @} - -/// \defgroup define_linkrate_constants -/// These defines are the link rate constants which will be used in DP & etc. -// @{ -/// Indicates if link rate is unknown -#define ADL_LINK_BITRATE_UNKNOWN 0 -/// Indicates if link rate is 1.62Ghz -#define ADL_LINK_BITRATE_1_62_GHZ 0x06 -/// Indicates if link rate is 2.7Ghz -#define ADL_LINK_BITRATE_2_7_GHZ 0x0A -/// Indicates if link rate is 3.24Ghz -#define ADL_LINK_BTIRATE_3_24_GHZ 0x0C -/// Indicates if link rate is 5.4Ghz -#define ADL_LINK_BITRATE_5_4_GHZ 0x14 -/// Indicates default value of link rate -#define ADL_LINK_BITRATE_DEF ADL_LINK_BITRATE_2_7_GHZ -// @} - -/// \defgroup define_colordepth_constants -/// These defines are the color depth constants which will be used in DP & etc. -// @{ -#define ADL_CONNPROP_S3D_ALTERNATE_TO_FRAME_PACK 0x00000001 -// @} - - -/// \defgroup define_colordepth_constants -/// These defines are the color depth constants which will be used in DP & etc. -// @{ -/// Indicates if color depth is unknown -#define ADL_COLORDEPTH_UNKNOWN 0 -/// Indicates if color depth is 666 -#define ADL_COLORDEPTH_666 1 -/// Indicates if color depth is 888 -#define ADL_COLORDEPTH_888 2 -/// Indicates if color depth is 101010 -#define ADL_COLORDEPTH_101010 3 -/// Indicates if color depth is 121212 -#define ADL_COLORDEPTH_121212 4 -/// Indicates if color depth is 141414 -#define ADL_COLORDEPTH_141414 5 -/// Indicates if color depth is 161616 -#define ADL_COLORDEPTH_161616 6 -/// Indicates default value of color depth -#define ADL_COLOR_DEPTH_DEF ADL_COLORDEPTH_888 -// @} - - -/// \defgroup define_emulation_status -/// These defines are the status of emulation -// @{ -/// Indicates if real device is connected. -#define ADL_EMUL_STATUS_REAL_DEVICE_CONNECTED 0x1 -/// Indicates if emulated device is presented. -#define ADL_EMUL_STATUS_EMULATED_DEVICE_PRESENT 0x2 -/// Indicates if emulated device is used. -#define ADL_EMUL_STATUS_EMULATED_DEVICE_USED 0x4 -/// In case when last active real/emulated device used (when persistence is enabled but no emulation enforced then persistence will use last connected/emulated device). -#define ADL_EMUL_STATUS_LAST_ACTIVE_DEVICE_USED 0x8 -// @} - -/// \defgroup define_emulation_mode -/// These defines are the modes of emulation -// @{ -/// Indicates if no emulation is used -#define ADL_EMUL_MODE_OFF 0 -/// Indicates if emulation is used when display connected -#define ADL_EMUL_MODE_ON_CONNECTED 1 -/// Indicates if emulation is used when display dis connected -#define ADL_EMUL_MODE_ON_DISCONNECTED 2 -/// Indicates if emulation is used always -#define ADL_EMUL_MODE_ALWAYS 3 -// @} - -/// \defgroup define_emulation_query -/// These defines are the modes of emulation -// @{ -/// Indicates Data from real device -#define ADL_QUERY_REAL_DATA 0 -/// Indicates Emulated data -#define ADL_QUERY_EMULATED_DATA 1 -/// Indicates Data currently in use -#define ADL_QUERY_CURRENT_DATA 2 -// @} - -/// \defgroup define_persistence_state -/// These defines are the states of persistence -// @{ -/// Indicates persistence is disabled -#define ADL_EDID_PERSISTANCE_DISABLED 0 -/// Indicates persistence is enabled -#define ADL_EDID_PERSISTANCE_ENABLED 1 -// @} - -/// \defgroup define_connector_types Connector Type -/// defines for ADLConnectorInfo.iType -// @{ -/// Indicates unknown Connector type -#define ADL_CONNECTOR_TYPE_UNKNOWN 0 -/// Indicates VGA Connector type -#define ADL_CONNECTOR_TYPE_VGA 1 -/// Indicates DVI-D Connector type -#define ADL_CONNECTOR_TYPE_DVI_D 2 -/// Indicates DVI-I Connector type -#define ADL_CONNECTOR_TYPE_DVI_I 3 -/// Indicates Active Dongle-NA Connector type -#define ADL_CONNECTOR_TYPE_ATICVDONGLE_NA 4 -/// Indicates Active Dongle-JP Connector type -#define ADL_CONNECTOR_TYPE_ATICVDONGLE_JP 5 -/// Indicates Active Dongle-NONI2C Connector type -#define ADL_CONNECTOR_TYPE_ATICVDONGLE_NONI2C 6 -/// Indicates Active Dongle-NONI2C-D Connector type -#define ADL_CONNECTOR_TYPE_ATICVDONGLE_NONI2C_D 7 -/// Indicates HDMI-Type A Connector type -#define ADL_CONNECTOR_TYPE_HDMI_TYPE_A 8 -/// Indicates HDMI-Type B Connector type -#define ADL_CONNECTOR_TYPE_HDMI_TYPE_B 9 -/// Indicates Display port Connector type -#define ADL_CONNECTOR_TYPE_DISPLAYPORT 10 -/// Indicates EDP Connector type -#define ADL_CONNECTOR_TYPE_EDP 11 -/// Indicates MiniDP Connector type -#define ADL_CONNECTOR_TYPE_MINI_DISPLAYPORT 12 -/// Indicates Virtual Connector type -#define ADL_CONNECTOR_TYPE_VIRTUAL 13 -// @} - -/// \defgroup define_freesync_usecase -/// These defines are to specify use cases in which FreeSync should be enabled -/// They are a bit mask. To specify FreeSync for more than one use case, the input value -/// should be set to include multiple bits set -// @{ -/// Indicates FreeSync is enabled for Static Screen case -#define ADL_FREESYNC_USECASE_STATIC 0x1 -/// Indicates FreeSync is enabled for Video use case -#define ADL_FREESYNC_USECASE_VIDEO 0x2 -/// Indicates FreeSync is enabled for Gaming use case -#define ADL_FREESYNC_USECASE_GAMING 0x4 -// @} - -/// \defgroup define_freesync_caps -/// These defines are used to retrieve FreeSync display capabilities. -/// GPU support flag also indicates whether the display is -/// connected to a GPU that actually supports FreeSync -// @{ -#define ADL_FREESYNC_CAP_SUPPORTED (1 << 0) -#define ADL_FREESYNC_CAP_GPUSUPPORTED (1 << 1) -#define ADL_FREESYNC_CAP_DISPLAYSUPPORTED (1 << 2) -#define ADL_FREESYNC_CAP_CURRENTMODESUPPORTED (1 << 3) -#define ADL_FREESYNC_CAP_NOCFXORCFXSUPPORTED (1 << 4) -#define ADL_FREESYNC_CAP_NOGENLOCKORGENLOCKSUPPORTED (1 << 5) -#define ADL_FREESYNC_CAP_BORDERLESSWINDOWSUPPORTED (1 << 6) -// @} - - -/// \defgroup define_MST_CommandLine_execute -// @{ -/// Indicates the MST command line for branch message if the bit is set. Otherwise, it is display message -#define ADL_MST_COMMANDLINE_PATH_MSG 0x1 -/// Indicates the MST command line to send message in broadcast way it the bit is set -#define ADL_MST_COMMANDLINE_BROADCAST 0x2 - -// @} - - -/// \defgroup define_Adapter_CloneTypes_Get -// @{ -/// Indicates there is crossGPU clone with non-AMD dispalys -#define ADL_CROSSGPUDISPLAYCLONE_AMD_WITH_NONAMD 0x1 -/// Indicates there is crossGPU clone -#define ADL_CROSSGPUDISPLAYCLONE 0x2 - -// @} - -/// \defgroup define_D3DKMT_HANDLE -// @{ -/// Handle can be used to create Device Handle when using CreateDevice() -typedef unsigned int ADL_D3DKMT_HANDLE; -// @} - - -// End Bracket for Constants and Definitions. Add new groups ABOVE this line! - -// @} - -#endif /* ADL_DEFINES_H_ */ - - diff --git a/3rd_party/Src/amd/adl_sdk.h b/3rd_party/Src/amd/adl_sdk.h deleted file mode 100644 index d31dd370ea..0000000000 --- a/3rd_party/Src/amd/adl_sdk.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. -// -// MIT LICENSE: -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -/// \file adl_sdk.h -/// \brief Contains the definition of the Memory Allocation Callback.\n Included in ADL SDK -/// -/// \n\n -/// This file contains the definition of the Memory Allocation Callback.\n -/// It also includes definitions of the respective structures and constants.\n -/// This is the only header file to be included in a C/C++ project using ADL - -#ifndef ADL_SDK_H_ -#define ADL_SDK_H_ - -#include "adl_structures.h" - -#if defined (LINUX) -#define __stdcall -#endif /* (LINUX) */ - -/// Memory Allocation Call back -typedef void* ( __stdcall *ADL_MAIN_MALLOC_CALLBACK )( int ); - - -#endif /* ADL_SDK_H_ */ diff --git a/3rd_party/Src/amd/adl_structures.h b/3rd_party/Src/amd/adl_structures.h deleted file mode 100644 index a98e938111..0000000000 --- a/3rd_party/Src/amd/adl_structures.h +++ /dev/null @@ -1,3341 +0,0 @@ -// -// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. -// -// MIT LICENSE: -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -/// \file adl_structures.h -///\brief This file contains the structure declarations that are used by the public ADL interfaces for \ALL platforms.\n Included in ADL SDK -/// -/// All data structures used in AMD Display Library (ADL) public interfaces should be defined in this header file. -/// - -#ifndef ADL_STRUCTURES_H_ -#define ADL_STRUCTURES_H_ - -#include "adl_defines.h" - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the graphics adapter. -/// -/// This structure is used to store various information about the graphics adapter. This -/// information can be returned to the user. Alternatively, it can be used to access various driver calls to set -/// or fetch various settings upon the user's request. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct AdapterInfo -{ -/// \ALL_STRUCT_MEM - -/// Size of the structure. - int iSize; -/// The ADL index handle. One GPU may be associated with one or two index handles - int iAdapterIndex; -/// The unique device ID associated with this adapter. - char strUDID[ADL_MAX_PATH]; -/// The BUS number associated with this adapter. - int iBusNumber; -/// The driver number associated with this adapter. - int iDeviceNumber; -/// The function number. - int iFunctionNumber; -/// The vendor ID associated with this adapter. - int iVendorID; -/// Adapter name. - char strAdapterName[ADL_MAX_PATH]; -/// Display name. For example, "\\\\Display0" for Windows or ":0:0" for Linux. - char strDisplayName[ADL_MAX_PATH]; -/// Present or not; 1 if present and 0 if not present.It the logical adapter is present, the display name such as \\\\.\\Display1 can be found from OS - int iPresent; - -#if defined (_WIN32) || defined (_WIN64) -/// \WIN_STRUCT_MEM - -/// Exist or not; 1 is exist and 0 is not present. - int iExist; -/// Driver registry path. - char strDriverPath[ADL_MAX_PATH]; -/// Driver registry path Ext for. - char strDriverPathExt[ADL_MAX_PATH]; -/// PNP string from Windows. - char strPNPString[ADL_MAX_PATH]; -/// It is generated from EnumDisplayDevices. - int iOSDisplayIndex; -#endif /* (_WIN32) || (_WIN64) */ - -#if defined (LINUX) -/// \LNX_STRUCT_MEM - -/// Internal X screen number from GPUMapInfo (DEPRICATED use XScreenInfo) - int iXScreenNum; -/// Internal driver index from GPUMapInfo - int iDrvIndex; -/// \deprecated Internal x config file screen identifier name. Use XScreenInfo instead. - char strXScreenConfigName[ADL_MAX_PATH]; - -#endif /* (LINUX) */ -} AdapterInfo, *LPAdapterInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the Linux X screen information. -/// -/// This structure is used to store the current screen number and xorg.conf ID name assoicated with an adapter index. -/// This structure is updated during ADL_Main_Control_Refresh or ADL_ScreenInfo_Update. -/// Note: This structure should be used in place of iXScreenNum and strXScreenConfigName in AdapterInfo as they will be -/// deprecated. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -#if defined (LINUX) -typedef struct XScreenInfo -{ -/// Internal X screen number from GPUMapInfo. - int iXScreenNum; -/// Internal x config file screen identifier name. - char strXScreenConfigName[ADL_MAX_PATH]; -} XScreenInfo, *LPXScreenInfo; -#endif /* (LINUX) */ - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the ASIC memory. -/// -/// This structure is used to store various information about the ASIC memory. This -/// information can be returned to the user. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLMemoryInfo -{ -/// Memory size in bytes. - long long iMemorySize; -/// Memory type in string. - char strMemoryType[ADL_MAX_PATH]; -/// Memory bandwidth in Mbytes/s. - long long iMemoryBandwidth; -} ADLMemoryInfo, *LPADLMemoryInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about memory required by type -/// -/// This structure is returned by ADL_Adapter_ConfigMemory_Get, which given a desktop and display configuration -/// will return the Memory used. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLMemoryRequired -{ - long long iMemoryReq; /// Memory in bytes required - int iType; /// Type of Memory \ref define_adl_validmemoryrequiredfields - int iDisplayFeatureValue; /// Display features \ref define_adl_visiblememoryfeatures that are using this type of memory -} ADLMemoryRequired, *LPADLMemoryRequired; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the features associated with a display -/// -/// This structure is a parameter to ADL_Adapter_ConfigMemory_Get, which given a desktop and display configuration -/// will return the Memory used. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLMemoryDisplayFeatures -{ - int iDisplayIndex; /// ADL Display index - int iDisplayFeatureValue; /// features that the display is using \ref define_adl_visiblememoryfeatures -} ADLMemoryDisplayFeatures, *LPADLMemoryDisplayFeatures; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing DDC information. -/// -/// This structure is used to store various DDC information that can be returned to the user. -/// Note that all fields of type int are actually defined as unsigned int types within the driver. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDDCInfo -{ -/// Size of the structure - int ulSize; -/// Indicates whether the attached display supports DDC. If this field is zero on return, no other DDC information fields will be used. - int ulSupportsDDC; -/// Returns the manufacturer ID of the display device. Should be zeroed if this information is not available. - int ulManufacturerID; -/// Returns the product ID of the display device. Should be zeroed if this information is not available. - int ulProductID; -/// Returns the name of the display device. Should be zeroed if this information is not available. - char cDisplayName[ADL_MAX_DISPLAY_NAME]; -/// Returns the maximum Horizontal supported resolution. Should be zeroed if this information is not available. - int ulMaxHResolution; -/// Returns the maximum Vertical supported resolution. Should be zeroed if this information is not available. - int ulMaxVResolution; -/// Returns the maximum supported refresh rate. Should be zeroed if this information is not available. - int ulMaxRefresh; -/// Returns the display device preferred timing mode's horizontal resolution. - int ulPTMCx; -/// Returns the display device preferred timing mode's vertical resolution. - int ulPTMCy; -/// Returns the display device preferred timing mode's refresh rate. - int ulPTMRefreshRate; -/// Return EDID flags. - int ulDDCInfoFlag; -} ADLDDCInfo, *LPADLDDCInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing DDC information. -/// -/// This structure is used to store various DDC information that can be returned to the user. -/// Note that all fields of type int are actually defined as unsigned int types within the driver. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDDCInfo2 -{ -/// Size of the structure - int ulSize; -/// Indicates whether the attached display supports DDC. If this field is zero on return, no other DDC -/// information fields will be used. - int ulSupportsDDC; -/// Returns the manufacturer ID of the display device. Should be zeroed if this information is not available. - int ulManufacturerID; -/// Returns the product ID of the display device. Should be zeroed if this information is not available. - int ulProductID; -/// Returns the name of the display device. Should be zeroed if this information is not available. - char cDisplayName[ADL_MAX_DISPLAY_NAME]; -/// Returns the maximum Horizontal supported resolution. Should be zeroed if this information is not available. - int ulMaxHResolution; -/// Returns the maximum Vertical supported resolution. Should be zeroed if this information is not available. - int ulMaxVResolution; -/// Returns the maximum supported refresh rate. Should be zeroed if this information is not available. - int ulMaxRefresh; -/// Returns the display device preferred timing mode's horizontal resolution. - int ulPTMCx; -/// Returns the display device preferred timing mode's vertical resolution. - int ulPTMCy; -/// Returns the display device preferred timing mode's refresh rate. - int ulPTMRefreshRate; -/// Return EDID flags. - int ulDDCInfoFlag; -/// Returns 1 if the display supported packed pixel, 0 otherwise - int bPackedPixelSupported; -/// Returns the Pixel formats the display supports \ref define_ddcinfo_pixelformats - int iPanelPixelFormat; -/// Return EDID serial ID. - int ulSerialID; -/// Return minimum monitor luminance data - int ulMinLuminanceData; -/// Return average monitor luminance data - int ulAvgLuminanceData; -/// Return maximum monitor luminance data - int ulMaxLuminanceData; - -/// Bit vector of supported transfer functions \ref define_source_content_TF - int iSupportedTransferFunction; - -/// Bit vector of supported color spaces \ref define_source_content_CS - int iSupportedColorSpace; - -/// Display Red Chromaticity X coordinate multiplied by 10000 - int iNativeDisplayChromaticityRedX; -/// Display Red Chromaticity Y coordinate multiplied by 10000 - int iNativeDisplayChromaticityRedY; -/// Display Green Chromaticity X coordinate multiplied by 10000 - int iNativeDisplayChromaticityGreenX; -/// Display Green Chromaticity Y coordinate multiplied by 10000 - int iNativeDisplayChromaticityGreenY; -/// Display Blue Chromaticity X coordinate multiplied by 10000 - int iNativeDisplayChromaticityBlueX; -/// Display Blue Chromaticity Y coordinate multiplied by 10000 - int iNativeDisplayChromaticityBlueY; -/// Display White Point X coordinate multiplied by 10000 - int iNativeDisplayChromaticityWhitePointX; -/// Display White Point Y coordinate multiplied by 10000 - int iNativeDisplayChromaticityWhitePointY; -/// Display diffuse screen reflectance 0-1 (100%) in units of 0.01 - int iDiffuseScreenReflectance; -/// Display specular screen reflectance 0-1 (100%) in units of 0.01 - int iSpecularScreenReflectance; -/// Bit vector of supported color spaces \ref define_HDR_support - int iSupportedHDR; -/// Bit vector for freesync flags - int iFreesyncFlags; - -/// Return minimum monitor luminance without dimming data - int ulMinLuminanceNoDimmingData; - - int ulMaxBacklightMaxLuminanceData; - int ulMinBacklightMaxLuminanceData; - int ulMaxBacklightMinLuminanceData; - int ulMinBacklightMinLuminanceData; - - // Reserved for future use - int iReserved[4]; -} ADLDDCInfo2, *LPADLDDCInfo2; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information controller Gamma settings. -/// -/// This structure is used to store the red, green and blue color channel information for the. -/// controller gamma setting. This information is returned by ADL, and it can also be used to -/// set the controller gamma setting. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGamma -{ -/// Red color channel gamma value. - float fRed; -/// Green color channel gamma value. - float fGreen; -/// Blue color channel gamma value. - float fBlue; -} ADLGamma, *LPADLGamma; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about component video custom modes. -/// -/// This structure is used to store the component video custom mode. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLCustomMode -{ -/// Custom mode flags. They are returned by the ADL driver. - int iFlags; -/// Custom mode width. - int iModeWidth; -/// Custom mode height. - int iModeHeight; -/// Custom mode base width. - int iBaseModeWidth; -/// Custom mode base height. - int iBaseModeHeight; -/// Custom mode refresh rate. - int iRefreshRate; -} ADLCustomMode, *LPADLCustomMode; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing Clock information for OD5 calls. -/// -/// This structure is used to retrieve clock information for OD5 calls. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGetClocksOUT -{ - long ulHighCoreClock; - long ulHighMemoryClock; - long ulHighVddc; - long ulCoreMin; - long ulCoreMax; - long ulMemoryMin; - long ulMemoryMax; - long ulActivityPercent; - long ulCurrentCoreClock; - long ulCurrentMemoryClock; - long ulReserved; -} ADLGetClocksOUT; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing HDTV information for display calls. -/// -/// This structure is used to retrieve HDTV information information for display calls. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayConfig -{ -/// Size of the structure - long ulSize; -/// HDTV connector type. - long ulConnectorType; -/// HDTV capabilities. - long ulDeviceData; -/// Overridden HDTV capabilities. - long ulOverridedDeviceData; -/// Reserved field - long ulReserved; -} ADLDisplayConfig; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the display device. -/// -/// This structure is used to store display device information -/// such as display index, type, name, connection status, mapped adapter and controller indexes, -/// whether or not multiple VPUs are supported, local display connections or not (through Lasso), etc. -/// This information can be returned to the user. Alternatively, it can be used to access various driver calls to set -/// or fetch various display device related settings upon the user's request. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayID -{ -/// The logical display index belonging to this adapter. - int iDisplayLogicalIndex; - -///\brief The physical display index. -/// For example, display index 2 from adapter 2 can be used by current adapter 1.\n -/// So current adapter may enumerate this adapter as logical display 7 but the physical display -/// index is still 2. - int iDisplayPhysicalIndex; - -/// The persistent logical adapter index for the display. - int iDisplayLogicalAdapterIndex; - -///\brief The persistent physical adapter index for the display. -/// It can be the current adapter or a non-local adapter. \n -/// If this adapter index is different than the current adapter, -/// the Display Non Local flag is set inside DisplayInfoValue. - int iDisplayPhysicalAdapterIndex; -} ADLDisplayID, *LPADLDisplayID; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the display device. -/// -/// This structure is used to store various information about the display device. This -/// information can be returned to the user, or used to access various driver calls to set -/// or fetch various display-device-related settings upon the user's request -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayInfo -{ -/// The DisplayID structure - ADLDisplayID displayID; - -///\deprecated The controller index to which the display is mapped.\n Will not be used in the future\n - int iDisplayControllerIndex; - -/// The display's EDID name. - char strDisplayName[ADL_MAX_PATH]; - -/// The display's manufacturer name. - char strDisplayManufacturerName[ADL_MAX_PATH]; - -/// The Display type. For example: CRT, TV, CV, DFP. - int iDisplayType; - -/// The display output type. For example: HDMI, SVIDEO, COMPONMNET VIDEO. - int iDisplayOutputType; - -/// The connector type for the device. - int iDisplayConnector; - -///\brief The bit mask identifies the number of bits ADLDisplayInfo is currently using. \n -/// It will be the sum all the bit definitions in ADL_DISPLAY_DISPLAYINFO_xxx. - int iDisplayInfoMask; - -/// The bit mask identifies the display status. \ref define_displayinfomask - int iDisplayInfoValue; -} ADLDisplayInfo, *LPADLDisplayInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the display port MST device. -/// -/// This structure is used to store various MST information about the display port device. This -/// information can be returned to the user, or used to access various driver calls to -/// fetch various display-device-related settings upon the user's request -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayDPMSTInfo -{ - /// The ADLDisplayID structure - ADLDisplayID displayID; - - /// total bandwidth available on the DP connector - int iTotalAvailableBandwidthInMpbs; - /// bandwidth allocated to this display - int iAllocatedBandwidthInMbps; - - // info from DAL DpMstSinkInfo - /// string identifier for the display - char strGlobalUniqueIdentifier[ADL_MAX_PATH]; - - /// The link count of relative address, rad[0] upto rad[linkCount] are valid - int radLinkCount; - /// The physical connector ID, used to identify the physical DP port - int iPhysicalConnectorID; - - /// Relative address, address scheme starts from source side - char rad[ADL_MAX_RAD_LINK_COUNT]; -} ADLDisplayDPMSTInfo, *LPADLDisplayDPMSTInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the display mode definition used per controller. -/// -/// This structure is used to store the display mode definition used per controller. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayMode -{ -/// Vertical resolution (in pixels). - int iPelsHeight; -/// Horizontal resolution (in pixels). - int iPelsWidth; -/// Color depth. - int iBitsPerPel; -/// Refresh rate. - int iDisplayFrequency; -} ADLDisplayMode; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing detailed timing parameters. -/// -/// This structure is used to store the detailed timing parameters. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDetailedTiming -{ -/// Size of the structure. - int iSize; -/// Timing flags. \ref define_detailed_timing_flags - short sTimingFlags; -/// Total width (columns). - short sHTotal; -/// Displayed width. - short sHDisplay; -/// Horizontal sync signal offset. - short sHSyncStart; -/// Horizontal sync signal width. - short sHSyncWidth; -/// Total height (rows). - short sVTotal; -/// Displayed height. - short sVDisplay; -/// Vertical sync signal offset. - short sVSyncStart; -/// Vertical sync signal width. - short sVSyncWidth; -/// Pixel clock value. - short sPixelClock; -/// Overscan right. - short sHOverscanRight; -/// Overscan left. - short sHOverscanLeft; -/// Overscan bottom. - short sVOverscanBottom; -/// Overscan top. - short sVOverscanTop; - short sOverscan8B; - short sOverscanGR; -} ADLDetailedTiming; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing display mode information. -/// -/// This structure is used to store the display mode information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayModeInfo -{ -/// Timing standard of the current mode. \ref define_modetiming_standard - int iTimingStandard; -/// Applicable timing standards for the current mode. - int iPossibleStandard; -/// Refresh rate factor. - int iRefreshRate; -/// Num of pixels in a row. - int iPelsWidth; -/// Num of pixels in a column. - int iPelsHeight; -/// Detailed timing parameters. - ADLDetailedTiming sDetailedTiming; -} ADLDisplayModeInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about display property. -/// -/// This structure is used to store the display property for the current adapter. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayProperty -{ -/// Must be set to sizeof the structure - int iSize; -/// Must be set to \ref ADL_DL_DISPLAYPROPERTY_TYPE_EXPANSIONMODE or \ref ADL_DL_DISPLAYPROPERTY_TYPE_USEUNDERSCANSCALING - int iPropertyType; -/// Get or Set \ref ADL_DL_DISPLAYPROPERTY_EXPANSIONMODE_CENTER or \ref ADL_DL_DISPLAYPROPERTY_EXPANSIONMODE_FULLSCREEN or \ref ADL_DL_DISPLAYPROPERTY_EXPANSIONMODE_ASPECTRATIO or \ref ADL_DL_DISPLAYPROPERTY_TYPE_ITCFLAGENABLE - int iExpansionMode; -/// Display Property supported? 1: Supported, 0: Not supported - int iSupport; -/// Display Property current value - int iCurrent; -/// Display Property Default value - int iDefault; -} ADLDisplayProperty; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Clock. -/// -/// This structure is used to store the clock information for the current adapter -/// such as core clock and memory clock info. -///\nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLClockInfo -{ -/// Core clock in 10 KHz. - int iCoreClock; -/// Memory clock in 10 KHz. - int iMemoryClock; -} ADLClockInfo, *LPADLClockInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about I2C. -/// -/// This structure is used to store the I2C information for the current adapter. -/// This structure is used by the ADL_Display_WriteAndReadI2C() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLI2C -{ -/// Size of the structure - int iSize; -/// Numerical value representing hardware I2C. - int iLine; -/// The 7-bit I2C slave device address, shifted one bit to the left. - int iAddress; -/// The offset of the data from the address. - int iOffset; -/// Read from or write to slave device. \ref ADL_DL_I2C_ACTIONREAD or \ref ADL_DL_I2C_ACTIONWRITE or \ref ADL_DL_I2C_ACTIONREAD_REPEATEDSTART - int iAction; -/// I2C clock speed in KHz. - int iSpeed; -/// A numerical value representing the number of bytes to be sent or received on the I2C bus. - int iDataSize; -/// Address of the characters which are to be sent or received on the I2C bus. - char *pcData; -} ADLI2C; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about EDID data. -/// -/// This structure is used to store the information about EDID data for the adapter. -/// This structure is used by the ADL_Display_EdidData_Get() and ADL_Display_EdidData_Set() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayEDIDData -{ -/// Size of the structure - int iSize; -/// Set to 0 - int iFlag; - /// Size of cEDIDData. Set by ADL_Display_EdidData_Get() upon return - int iEDIDSize; -/// 0, 1 or 2. If set to 3 or above an error ADL_ERR_INVALID_PARAM is generated - int iBlockIndex; -/// EDID data - char cEDIDData[ADL_MAX_EDIDDATA_SIZE]; -/// Reserved - int iReserved[4]; -}ADLDisplayEDIDData; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about input of controller overlay adjustment. -/// -/// This structure is used to store the information about input of controller overlay adjustment for the adapter. -/// This structure is used by the ADL_Display_ControllerOverlayAdjustmentCaps_Get, ADL_Display_ControllerOverlayAdjustmentData_Get, and -/// ADL_Display_ControllerOverlayAdjustmentData_Set() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLControllerOverlayInput -{ -/// Should be set to the sizeof the structure - int iSize; -///\ref ADL_DL_CONTROLLER_OVERLAY_ALPHA or \ref ADL_DL_CONTROLLER_OVERLAY_ALPHAPERPIX - int iOverlayAdjust; -/// Data. - int iValue; -/// Should be 0. - int iReserved; -} ADLControllerOverlayInput; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about overlay adjustment. -/// -/// This structure is used to store the information about overlay adjustment for the adapter. -/// This structure is used by the ADLControllerOverlayInfo() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLAdjustmentinfo -{ -/// Default value - int iDefault; -/// Minimum value - int iMin; -/// Maximum Value - int iMax; -/// Step value - int iStep; -} ADLAdjustmentinfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about controller overlay information. -/// -/// This structure is used to store information about controller overlay info for the adapter. -/// This structure is used by the ADL_Display_ControllerOverlayAdjustmentCaps_Get() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLControllerOverlayInfo -{ -/// Should be set to the sizeof the structure - int iSize; -/// Data. - ADLAdjustmentinfo sOverlayInfo; -/// Should be 0. - int iReserved[3]; -} ADLControllerOverlayInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing GL-Sync module information. -/// -/// This structure is used to retrieve GL-Sync module information for -/// Workstation Framelock/Genlock. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGLSyncModuleID -{ -/// Unique GL-Sync module ID. - int iModuleID; -/// GL-Sync GPU port index (to be passed into ADLGLSyncGenlockConfig.lSignalSource and ADLGlSyncPortControl.lSignalSource). - int iGlSyncGPUPort; -/// GL-Sync module firmware version of Boot Sector. - int iFWBootSectorVersion; -/// GL-Sync module firmware version of User Sector. - int iFWUserSectorVersion; -} ADLGLSyncModuleID , *LPADLGLSyncModuleID; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing GL-Sync ports capabilities. -/// -/// This structure is used to retrieve hardware capabilities for the ports of the GL-Sync module -/// for Workstation Framelock/Genlock (such as port type and number of associated LEDs). -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGLSyncPortCaps -{ -/// Port type. Bitfield of ADL_GLSYNC_PORTTYPE_* \ref define_glsync - int iPortType; -/// Number of LEDs associated for this port. - int iNumOfLEDs; -}ADLGLSyncPortCaps, *LPADLGLSyncPortCaps; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing GL-Sync Genlock settings. -/// -/// This structure is used to get and set genlock settings for the GPU ports of the GL-Sync module -/// for Workstation Framelock/Genlock.\n -/// \see define_glsync -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGLSyncGenlockConfig -{ -/// Specifies what fields in this structure are valid \ref define_glsync - int iValidMask; -/// Delay (ms) generating a sync signal. - int iSyncDelay; -/// Vector of framelock control bits. Bitfield of ADL_GLSYNC_FRAMELOCKCNTL_* \ref define_glsync - int iFramelockCntlVector; -/// Source of the sync signal. Either GL_Sync GPU Port index or ADL_GLSYNC_SIGNALSOURCE_* \ref define_glsync - int iSignalSource; -/// Use sampled sync signal. A value of 0 specifies no sampling. - int iSampleRate; -/// For interlaced sync signals, the value can be ADL_GLSYNC_SYNCFIELD_1 or *_BOTH \ref define_glsync - int iSyncField; -/// The signal edge that should trigger synchronization. ADL_GLSYNC_TRIGGEREDGE_* \ref define_glsync - int iTriggerEdge; -/// Scan rate multiplier applied to the sync signal. ADL_GLSYNC_SCANRATECOEFF_* \ref define_glsync - int iScanRateCoeff; -}ADLGLSyncGenlockConfig, *LPADLGLSyncGenlockConfig; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing GL-Sync port information. -/// -/// This structure is used to get status of the GL-Sync ports (BNC or RJ45s) -/// for Workstation Framelock/Genlock. -/// \see define_glsync -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGlSyncPortInfo -{ -/// Type of GL-Sync port (ADL_GLSYNC_PORT_*). - int iPortType; -/// The number of LEDs for this port. It's also filled within ADLGLSyncPortCaps. - int iNumOfLEDs; -/// Port state ADL_GLSYNC_PORTSTATE_* \ref define_glsync - int iPortState; -/// Scanned frequency for this port (vertical refresh rate in milliHz; 60000 means 60 Hz). - int iFrequency; -/// Used for ADL_GLSYNC_PORT_BNC. It is ADL_GLSYNC_SIGNALTYPE_* \ref define_glsync - int iSignalType; -/// Used for ADL_GLSYNC_PORT_RJ45PORT*. It is GL_Sync GPU Port index or ADL_GLSYNC_SIGNALSOURCE_*. \ref define_glsync - int iSignalSource; - -} ADLGlSyncPortInfo, *LPADLGlSyncPortInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing GL-Sync port control settings. -/// -/// This structure is used to configure the GL-Sync ports (RJ45s only) -/// for Workstation Framelock/Genlock. -/// \see define_glsync -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGlSyncPortControl -{ -/// Port to control ADL_GLSYNC_PORT_RJ45PORT1 or ADL_GLSYNC_PORT_RJ45PORT2 \ref define_glsync - int iPortType; -/// Port control data ADL_GLSYNC_PORTCNTL_* \ref define_glsync - int iControlVector; -/// Source of the sync signal. Either GL_Sync GPU Port index or ADL_GLSYNC_SIGNALSOURCE_* \ref define_glsync - int iSignalSource; -} ADLGlSyncPortControl; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing GL-Sync mode of a display. -/// -/// This structure is used to get and set GL-Sync mode settings for a display connected to -/// an adapter attached to a GL-Sync module for Workstation Framelock/Genlock. -/// \see define_glsync -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGlSyncMode -{ -/// Mode control vector. Bitfield of ADL_GLSYNC_MODECNTL_* \ref define_glsync - int iControlVector; -/// Mode status vector. Bitfield of ADL_GLSYNC_MODECNTL_STATUS_* \ref define_glsync - int iStatusVector; -/// Index of GL-Sync connector used to genlock the display/controller. - int iGLSyncConnectorIndex; -} ADLGlSyncMode, *LPADLGlSyncMode; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing GL-Sync mode of a display. -/// -/// This structure is used to get and set GL-Sync mode settings for a display connected to -/// an adapter attached to a GL-Sync module for Workstation Framelock/Genlock. -/// \see define_glsync -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGlSyncMode2 -{ -/// Mode control vector. Bitfield of ADL_GLSYNC_MODECNTL_* \ref define_glsync - int iControlVector; -/// Mode status vector. Bitfield of ADL_GLSYNC_MODECNTL_STATUS_* \ref define_glsync - int iStatusVector; -/// Index of GL-Sync connector used to genlock the display/controller. - int iGLSyncConnectorIndex; -/// Index of the display to which this GLSync applies to. - int iDisplayIndex; -} ADLGlSyncMode2, *LPADLGlSyncMode2; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the packet info of a display. -/// -/// This structure is used to get and set the packet information of a display. -/// This structure is used by ADLDisplayDataPacket. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLInfoPacket -{ - char hb0; - char hb1; - char hb2; -/// sb0~sb27 - char sb[28]; -}ADLInfoPacket; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the AVI packet info of a display. -/// -/// This structure is used to get and set AVI the packet info of a display. -/// This structure is used by ADLDisplayDataPacket. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLAVIInfoPacket //Valid user defined data/ -{ -/// byte 3, bit 7 - char bPB3_ITC; -/// byte 5, bit [7:4]. - char bPB5; -}ADLAVIInfoPacket; - -// Overdrive clock setting structure definition. - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the Overdrive clock setting. -/// -/// This structure is used to get the Overdrive clock setting. -/// This structure is used by ADLAdapterODClockInfo. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODClockSetting -{ -/// Deafult clock - int iDefaultClock; -/// Current clock - int iCurrentClock; -/// Maximum clcok - int iMaxClock; -/// Minimum clock - int iMinClock; -/// Requested clcock - int iRequestedClock; -/// Step - int iStepClock; -} ADLODClockSetting; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the Overdrive clock information. -/// -/// This structure is used to get the Overdrive clock information. -/// This structure is used by the ADL_Display_ODClockInfo_Get() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLAdapterODClockInfo -{ -/// Size of the structure - int iSize; -/// Flag \ref define_clockinfo_flags - int iFlags; -/// Memory Clock - ADLODClockSetting sMemoryClock; -/// Engine Clock - ADLODClockSetting sEngineClock; -} ADLAdapterODClockInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the Overdrive clock configuration. -/// -/// This structure is used to set the Overdrive clock configuration. -/// This structure is used by the ADL_Display_ODClockConfig_Set() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLAdapterODClockConfig -{ -/// Size of the structure - int iSize; -/// Flag \ref define_clockinfo_flags - int iFlags; -/// Memory Clock - int iMemoryClock; -/// Engine Clock - int iEngineClock; -} ADLAdapterODClockConfig; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about current power management related activity. -/// -/// This structure is used to store information about current power management related activity. -/// This structure (Overdrive 5 interfaces) is used by the ADL_PM_CurrentActivity_Get() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLPMActivity -{ -/// Must be set to the size of the structure - int iSize; -/// Current engine clock. - int iEngineClock; -/// Current memory clock. - int iMemoryClock; -/// Current core voltage. - int iVddc; -/// GPU utilization. - int iActivityPercent; -/// Performance level index. - int iCurrentPerformanceLevel; -/// Current PCIE bus speed. - int iCurrentBusSpeed; -/// Number of PCIE bus lanes. - int iCurrentBusLanes; -/// Maximum number of PCIE bus lanes. - int iMaximumBusLanes; -/// Reserved for future purposes. - int iReserved; -} ADLPMActivity; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about thermal controller. -/// -/// This structure is used to store information about thermal controller. -/// This structure is used by ADL_PM_ThermalDevices_Enum. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLThermalControllerInfo -{ -/// Must be set to the size of the structure - int iSize; -/// Possible valies: \ref ADL_DL_THERMAL_DOMAIN_OTHER or \ref ADL_DL_THERMAL_DOMAIN_GPU. - int iThermalDomain; -/// GPU 0, 1, etc. - int iDomainIndex; -/// Possible valies: \ref ADL_DL_THERMAL_FLAG_INTERRUPT or \ref ADL_DL_THERMAL_FLAG_FANCONTROL - int iFlags; -} ADLThermalControllerInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about thermal controller temperature. -/// -/// This structure is used to store information about thermal controller temperature. -/// This structure is used by the ADL_PM_Temperature_Get() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLTemperature -{ -/// Must be set to the size of the structure - int iSize; -/// Temperature in millidegrees Celsius. - int iTemperature; -} ADLTemperature; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about thermal controller fan speed. -/// -/// This structure is used to store information about thermal controller fan speed. -/// This structure is used by the ADL_PM_FanSpeedInfo_Get() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLFanSpeedInfo -{ -/// Must be set to the size of the structure - int iSize; -/// \ref define_fanctrl - int iFlags; -/// Minimum possible fan speed value in percents. - int iMinPercent; -/// Maximum possible fan speed value in percents. - int iMaxPercent; -/// Minimum possible fan speed value in RPM. - int iMinRPM; -/// Maximum possible fan speed value in RPM. - int iMaxRPM; -} ADLFanSpeedInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about fan speed reported by thermal controller. -/// -/// This structure is used to store information about fan speed reported by thermal controller. -/// This structure is used by the ADL_Overdrive5_FanSpeed_Get() and ADL_Overdrive5_FanSpeed_Set() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLFanSpeedValue -{ -/// Must be set to the size of the structure - int iSize; -/// Possible valies: \ref ADL_DL_FANCTRL_SPEED_TYPE_PERCENT or \ref ADL_DL_FANCTRL_SPEED_TYPE_RPM - int iSpeedType; -/// Fan speed value - int iFanSpeed; -/// The only flag for now is: \ref ADL_DL_FANCTRL_FLAG_USER_DEFINED_SPEED - int iFlags; -} ADLFanSpeedValue; - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the range of Overdrive parameter. -/// -/// This structure is used to store information about the range of Overdrive parameter. -/// This structure is used by ADLODParameters. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODParameterRange -{ -/// Minimum parameter value. - int iMin; -/// Maximum parameter value. - int iMax; -/// Parameter step value. - int iStep; -} ADLODParameterRange; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive parameters. -/// -/// This structure is used to store information about Overdrive parameters. -/// This structure is used by the ADL_Overdrive5_ODParameters_Get() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODParameters -{ -/// Must be set to the size of the structure - int iSize; -/// Number of standard performance states. - int iNumberOfPerformanceLevels; -/// Indicates whether the GPU is capable to measure its activity. - int iActivityReportingSupported; -/// Indicates whether the GPU supports discrete performance levels or performance range. - int iDiscretePerformanceLevels; -/// Reserved for future use. - int iReserved; -/// Engine clock range. - ADLODParameterRange sEngineClock; -/// Memory clock range. - ADLODParameterRange sMemoryClock; -/// Core voltage range. - ADLODParameterRange sVddc; -} ADLODParameters; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive level. -/// -/// This structure is used to store information about Overdrive level. -/// This structure is used by ADLODPerformanceLevels. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODPerformanceLevel -{ -/// Engine clock. - int iEngineClock; -/// Memory clock. - int iMemoryClock; -/// Core voltage. - int iVddc; -} ADLODPerformanceLevel; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive performance levels. -/// -/// This structure is used to store information about Overdrive performance levels. -/// This structure is used by the ADL_Overdrive5_ODPerformanceLevels_Get() and ADL_Overdrive5_ODPerformanceLevels_Set() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODPerformanceLevels -{ -/// Must be set to sizeof( \ref ADLODPerformanceLevels ) + sizeof( \ref ADLODPerformanceLevel ) * (ADLODParameters.iNumberOfPerformanceLevels - 1) - int iSize; - int iReserved; -/// Array of performance state descriptors. Must have ADLODParameters.iNumberOfPerformanceLevels elements. - ADLODPerformanceLevel aLevels [1]; -} ADLODPerformanceLevels; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the proper CrossfireX chains combinations. -/// -/// This structure is used to store information about the CrossfireX chains combination for a particular adapter. -/// This structure is used by the ADL_Adapter_Crossfire_Caps(), ADL_Adapter_Crossfire_Get(), and ADL_Adapter_Crossfire_Set() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLCrossfireComb -{ -/// Number of adapters in this combination. - int iNumLinkAdapter; -/// A list of ADL indexes of the linked adapters in this combination. - int iAdaptLink[3]; -} ADLCrossfireComb; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing CrossfireX state and error information. -/// -/// This structure is used to store state and error information about a particular adapter CrossfireX combination. -/// This structure is used by the ADL_Adapter_Crossfire_Get() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLCrossfireInfo -{ -/// Current error code of this CrossfireX combination. - int iErrorCode; -/// Current \ref define_crossfirestate - int iState; -/// If CrossfireX is supported by this combination. The value is either \ref ADL_TRUE or \ref ADL_FALSE. - int iSupported; -} ADLCrossfireInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about the BIOS. -/// -/// This structure is used to store various information about the Chipset. This -/// information can be returned to the user. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLBiosInfo -{ - char strPartNumber[ADL_MAX_PATH]; ///< Part number. - char strVersion[ADL_MAX_PATH]; ///< Version number. - char strDate[ADL_MAX_PATH]; ///< BIOS date in yyyy/mm/dd hh:mm format. -} ADLBiosInfo, *LPADLBiosInfo; - - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about adapter location. -/// -/// This structure is used to store information about adapter location. -/// This structure is used by ADLMVPUStatus. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLAdapterLocation -{ -/// PCI Bus number : 8 bits - int iBus; -/// Device number : 5 bits - int iDevice; -/// Function number : 3 bits - int iFunction; -} ADLAdapterLocation,ADLBdf; - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing version information -/// -/// This structure is used to store software version information, description of the display device and a web link to the latest installed Catalyst drivers. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLVersionsInfo -{ - /// Driver Release (Packaging) Version (e.g. 8.71-100128n-094835E-ATI) - char strDriverVer[ADL_MAX_PATH]; - /// Catalyst Version(e.g. "10.1"). - char strCatalystVersion[ADL_MAX_PATH]; - /// Web link to an XML file with information about the latest AMD drivers and locations (e.g. "http://www.amd.com/us/driverxml" ) - char strCatalystWebLink[ADL_MAX_PATH]; - -} ADLVersionsInfo, *LPADLVersionsInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing version information -/// -/// This structure is used to store software version information, description of the display device and a web link to the latest installed Catalyst drivers. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLVersionsInfoX2 -{ - /// Driver Release (Packaging) Version (e.g. "16.20.1035-160621a-303814C") - char strDriverVer[ADL_MAX_PATH]; - /// Catalyst Version(e.g. "15.8"). - char strCatalystVersion[ADL_MAX_PATH]; - /// Crimson Version(e.g. "16.6.2"). - char strCrimsonVersion[ADL_MAX_PATH]; - /// Web link to an XML file with information about the latest AMD drivers and locations (e.g. "http://support.amd.com/drivers/xml/driver_09_us.xml" ) - char strCatalystWebLink[ADL_MAX_PATH]; - -} ADLVersionsInfoX2, *LPADLVersionsInfoX2; - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about MultiVPU capabilities. -/// -/// This structure is used to store information about MultiVPU capabilities. -/// This structure is used by the ADL_Display_MVPUCaps_Get() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLMVPUCaps -{ -/// Must be set to sizeof( ADLMVPUCaps ). - int iSize; -/// Number of adapters. - int iAdapterCount; -/// Bits set for all possible MVPU masters. \ref MVPU_ADAPTER_0 .. \ref MVPU_ADAPTER_3 - int iPossibleMVPUMasters; -/// Bits set for all possible MVPU slaves. \ref MVPU_ADAPTER_0 .. \ref MVPU_ADAPTER_3 - int iPossibleMVPUSlaves; -/// Registry path for each adapter. - char cAdapterPath[ADL_DL_MAX_MVPU_ADAPTERS][ADL_DL_MAX_REGISTRY_PATH]; -} ADLMVPUCaps; - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about MultiVPU status. -/// -/// This structure is used to store information about MultiVPU status. -/// Ths structure is used by the ADL_Display_MVPUStatus_Get() function. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLMVPUStatus -{ -/// Must be set to sizeof( ADLMVPUStatus ). - int iSize; -/// Number of active adapters. - int iActiveAdapterCount; -/// MVPU status. - int iStatus; -/// PCI Bus/Device/Function for each active adapter participating in MVPU. - ADLAdapterLocation aAdapterLocation[ADL_DL_MAX_MVPU_ADAPTERS]; -} ADLMVPUStatus; - -// Displays Manager structures - -/////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about the activatable source. -/// -/// This structure is used to store activatable source information -/// This information can be returned to the user. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLActivatableSource -{ - /// The Persistent logical Adapter Index. - int iAdapterIndex; - /// The number of Activatable Sources. - int iNumActivatableSources; - /// The bit mask identifies the number of bits ActivatableSourceValue is using. (Not currnetly used) - int iActivatableSourceMask; - /// The bit mask identifies the status. (Not currnetly used) - int iActivatableSourceValue; -} ADLActivatableSource, *LPADLActivatableSource; - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about display mode. -/// -/// This structure is used to store the display mode for the current adapter -/// such as X, Y positions, screen resolutions, orientation, -/// color depth, refresh rate, progressive or interlace mode, etc. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - -typedef struct ADLMode -{ -/// Adapter index. - int iAdapterIndex; -/// Display IDs. - ADLDisplayID displayID; -/// Screen position X coordinate. - int iXPos; -/// Screen position Y coordinate. - int iYPos; -/// Screen resolution Width. - int iXRes; -/// Screen resolution Height. - int iYRes; -/// Screen Color Depth. E.g., 16, 32. - int iColourDepth; -/// Screen refresh rate. Could be fractional E.g. 59.97 - float fRefreshRate; -/// Screen orientation. E.g., 0, 90, 180, 270. - int iOrientation; -/// Vista mode flag indicating Progressive or Interlaced mode. - int iModeFlag; -/// The bit mask identifying the number of bits this Mode is currently using. It is the sum of all the bit definitions defined in \ref define_displaymode - int iModeMask; -/// The bit mask identifying the display status. The detailed definition is in \ref define_displaymode - int iModeValue; -} ADLMode, *LPADLMode; - - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about display target information. -/// -/// This structure is used to store the display target information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayTarget -{ - /// The Display ID. - ADLDisplayID displayID; - - /// The display map index identify this manner and the desktop surface. - int iDisplayMapIndex; - - /// The bit mask identifies the number of bits DisplayTarget is currently using. It is the sum of all the bit definitions defined in \ref ADL_DISPLAY_DISPLAYTARGET_PREFERRED. - int iDisplayTargetMask; - - /// The bit mask identifies the display status. The detailed definition is in \ref ADL_DISPLAY_DISPLAYTARGET_PREFERRED. - int iDisplayTargetValue; - -} ADLDisplayTarget, *LPADLDisplayTarget; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the display SLS bezel Mode information. -/// -/// This structure is used to store the display SLS bezel Mode information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct tagADLBezelTransientMode -{ - /// Adapter Index - int iAdapterIndex; - - /// SLS Map Index - int iSLSMapIndex; - - /// The mode index - int iSLSModeIndex; - - /// The mode - ADLMode displayMode; - - /// The number of bezel offsets belongs to this map - int iNumBezelOffset; - - /// The first bezel offset array index in the native mode array - int iFirstBezelOffsetArrayIndex; - - /// The bit mask identifies the bits this structure is currently using. It will be the total OR of all the bit definitions. - int iSLSBezelTransientModeMask; - - /// The bit mask identifies the display status. The detail definition is defined below. - int iSLSBezelTransientModeValue; - -} ADLBezelTransientMode, *LPADLBezelTransientMode; - - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about the adapter display manner. -/// -/// This structure is used to store adapter display manner information -/// This information can be returned to the user. Alternatively, it can be used to access various driver calls to -/// fetch various display device related display manner settings upon the user's request. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLAdapterDisplayCap -{ - /// The Persistent logical Adapter Index. - int iAdapterIndex; - /// The bit mask identifies the number of bits AdapterDisplayCap is currently using. Sum all the bits defined in ADL_ADAPTER_DISPLAYCAP_XXX - int iAdapterDisplayCapMask; - /// The bit mask identifies the status. Refer to ADL_ADAPTER_DISPLAYCAP_XXX - int iAdapterDisplayCapValue; -} ADLAdapterDisplayCap, *LPADLAdapterDisplayCap; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about display mapping. -/// -/// This structure is used to store the display mapping data such as display manner. -/// For displays with horizontal or vertical stretch manner, -/// this structure also stores the display order, display row, and column data. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayMap -{ -/// The current display map index. It is the OS desktop index. For example, if the OS index 1 is showing clone mode, the display map will be 1. - int iDisplayMapIndex; - -/// The Display Mode for the current map - ADLMode displayMode; - -/// The number of display targets belongs to this map\n - int iNumDisplayTarget; - -/// The first target array index in the Target array\n - int iFirstDisplayTargetArrayIndex; - -/// The bit mask identifies the number of bits DisplayMap is currently using. It is the sum of all the bit definitions defined in ADL_DISPLAY_DISPLAYMAP_MANNER_xxx. - int iDisplayMapMask; - -///The bit mask identifies the display status. The detailed definition is in ADL_DISPLAY_DISPLAYMAP_MANNER_xxx. - int iDisplayMapValue; - -} ADLDisplayMap, *LPADLDisplayMap; - - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about the display device possible map for one GPU -/// -/// This structure is used to store the display device possible map -/// This information can be returned to the user. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLPossibleMap -{ - /// The current PossibleMap index. Each PossibleMap is assigned an index - int iIndex; - /// The adapter index identifying the GPU for which to validate these Maps & Targets - int iAdapterIndex; - /// Number of display Maps for this GPU to be validated - int iNumDisplayMap; - /// The display Maps list to validate - ADLDisplayMap* displayMap; - /// the number of display Targets for these display Maps - int iNumDisplayTarget; - /// The display Targets list for these display Maps to be validated. - ADLDisplayTarget* displayTarget; -} ADLPossibleMap, *LPADLPossibleMap; - - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about display possible mapping. -/// -/// This structure is used to store the display possible mapping's controller index for the current display. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLPossibleMapping -{ - int iDisplayIndex; ///< The display index. Each display is assigned an index. - int iDisplayControllerIndex; ///< The controller index to which display is mapped. - int iDisplayMannerSupported; ///< The supported display manner. -} ADLPossibleMapping, *LPADLPossibleMapping; - -///////////////////////////////////////////////////////////////////////////////////////////// -/// \brief Structure containing information about the validated display device possible map result. -/// -/// This structure is used to store the validated display device possible map result -/// This information can be returned to the user. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLPossibleMapResult -{ - /// The current display map index. It is the OS Desktop index. For example, OS Index 1 showing clone mode. The Display Map will be 1. - int iIndex; - // The bit mask identifies the number of bits PossibleMapResult is currently using. It will be the sum all the bit definitions defined in ADL_DISPLAY_POSSIBLEMAPRESULT_VALID. - int iPossibleMapResultMask; - /// The bit mask identifies the possible map result. The detail definition is defined in ADL_DISPLAY_POSSIBLEMAPRESULT_XXX. - int iPossibleMapResultValue; -} ADLPossibleMapResult, *LPADLPossibleMapResult; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the display SLS Grid information. -/// -/// This structure is used to store the display SLS Grid information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLSLSGrid -{ -/// The Adapter index. - int iAdapterIndex; - -/// The grid index. - int iSLSGridIndex; - -/// The grid row. - int iSLSGridRow; - -/// The grid column. - int iSLSGridColumn; - -/// The grid bit mask identifies the number of bits DisplayMap is currently using. Sum of all bits defined in ADL_DISPLAY_SLSGRID_ORIENTATION_XXX - int iSLSGridMask; - -/// The grid bit value identifies the display status. Refer to ADL_DISPLAY_SLSGRID_ORIENTATION_XXX - int iSLSGridValue; - -} ADLSLSGrid, *LPADLSLSGrid; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the display SLS Map information. -/// -/// This structure is used to store the display SLS Map information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLSLSMap -{ - /// The Adapter Index - int iAdapterIndex; - - /// The current display map index. It is the OS Desktop index. For example, OS Index 1 showing clone mode. The Display Map will be 1. - int iSLSMapIndex; - - /// Indicate the current grid - ADLSLSGrid grid; - - /// OS surface index - int iSurfaceMapIndex; - - /// Screen orientation. E.g., 0, 90, 180, 270 - int iOrientation; - - /// The number of display targets belongs to this map - int iNumSLSTarget; - - /// The first target array index in the Target array - int iFirstSLSTargetArrayIndex; - - /// The number of native modes belongs to this map - int iNumNativeMode; - - /// The first native mode array index in the native mode array - int iFirstNativeModeArrayIndex; - - /// The number of bezel modes belongs to this map - int iNumBezelMode; - - /// The first bezel mode array index in the native mode array - int iFirstBezelModeArrayIndex; - - /// The number of bezel offsets belongs to this map - int iNumBezelOffset; - - /// The first bezel offset array index in the - int iFirstBezelOffsetArrayIndex; - - /// The bit mask identifies the number of bits DisplayMap is currently using. Sum all the bit definitions defined in ADL_DISPLAY_SLSMAP_XXX. - int iSLSMapMask; - - /// The bit mask identifies the display map status. Refer to ADL_DISPLAY_SLSMAP_XXX - int iSLSMapValue; - - -} ADLSLSMap, *LPADLSLSMap; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the display SLS Offset information. -/// -/// This structure is used to store the display SLS Offset information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLSLSOffset -{ - /// The Adapter Index - int iAdapterIndex; - - /// The current display map index. It is the OS Desktop index. For example, OS Index 1 showing clone mode. The Display Map will be 1. - int iSLSMapIndex; - - /// The Display ID. - ADLDisplayID displayID; - - /// SLS Bezel Mode Index - int iBezelModeIndex; - - /// SLS Bezel Offset X - int iBezelOffsetX; - - /// SLS Bezel Offset Y - int iBezelOffsetY; - - /// SLS Display Width - int iDisplayWidth; - - /// SLS Display Height - int iDisplayHeight; - - /// The bit mask identifies the number of bits Offset is currently using. - int iBezelOffsetMask; - - /// The bit mask identifies the display status. - int iBezelffsetValue; -} ADLSLSOffset, *LPADLSLSOffset; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the display SLS Mode information. -/// -/// This structure is used to store the display SLS Mode information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLSLSMode -{ - /// The Adapter Index - int iAdapterIndex; - - /// The current display map index. It is the OS Desktop index. For example, OS Index 1 showing clone mode. The Display Map will be 1. - int iSLSMapIndex; - - /// The mode index - int iSLSModeIndex; - - /// The mode for this map. - ADLMode displayMode; - - /// The bit mask identifies the number of bits Mode is currently using. - int iSLSNativeModeMask; - - /// The bit mask identifies the display status. - int iSLSNativeModeValue; -} ADLSLSMode, *LPADLSLSMode; - - - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the display Possible SLS Map information. -/// -/// This structure is used to store the display Possible SLS Map information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLPossibleSLSMap -{ - /// The current display map index. It is the OS Desktop index. - /// For example, OS Index 1 showing clone mode. The Display Map will be 1. - int iSLSMapIndex; - - /// Number of display map to be validated. - int iNumSLSMap; - - /// The display map list for validation - ADLSLSMap* lpSLSMap; - - /// the number of display map config to be validated. - int iNumSLSTarget; - - /// The display target list for validation. - ADLDisplayTarget* lpDisplayTarget; -} ADLPossibleSLSMap, *LPADLPossibleSLSMap; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the SLS targets. -/// -/// This structure is used to store the SLS targets information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLSLSTarget -{ - /// the logic adapter index - int iAdapterIndex; - - /// The SLS map index - int iSLSMapIndex; - - /// The target ID - ADLDisplayTarget displayTarget; - - /// Target postion X in SLS grid - int iSLSGridPositionX; - - /// Target postion Y in SLS grid - int iSLSGridPositionY; - - /// The view size width, height and rotation angle per SLS Target - ADLMode viewSize; - - /// The bit mask identifies the bits in iSLSTargetValue are currently used - int iSLSTargetMask; - - /// The bit mask identifies status info. It is for function extension purpose - int iSLSTargetValue; - -} ADLSLSTarget, *LPADLSLSTarget; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the Adapter offset stepping size. -/// -/// This structure is used to store the Adapter offset stepping size information. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLBezelOffsetSteppingSize -{ - /// the logic adapter index - int iAdapterIndex; - - /// The SLS map index - int iSLSMapIndex; - - /// Bezel X stepping size offset - int iBezelOffsetSteppingSizeX; - - /// Bezel Y stepping size offset - int iBezelOffsetSteppingSizeY; - - /// Identifies the bits this structure is currently using. It will be the total OR of all the bit definitions. - int iBezelOffsetSteppingSizeMask; - - /// Bit mask identifies the display status. - int iBezelOffsetSteppingSizeValue; - -} ADLBezelOffsetSteppingSize, *LPADLBezelOffsetSteppingSize; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about the overlap offset info for all the displays for each SLS mode. -/// -/// This structure is used to store the no. of overlapped modes for each SLS Mode once user finishes the configuration from Overlap Widget -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLSLSOverlappedMode -{ - /// the SLS mode for which the overlap is configured - ADLMode SLSMode; - /// the number of target displays in SLS. - int iNumSLSTarget; - /// the first target array index in the target array - int iFirstTargetArrayIndex; -}ADLSLSTargetOverlap, *LPADLSLSTargetOverlap; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about driver supported PowerExpress Config Caps -/// -/// This structure is used to store the driver supported PowerExpress Config Caps -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLPXConfigCaps -{ - /// The Persistent logical Adapter Index. - int iAdapterIndex; - - /// The bit mask identifies the number of bits PowerExpress Config Caps is currently using. It is the sum of all the bit definitions defined in ADL_PX_CONFIGCAPS_XXXX /ref define_powerxpress_constants. - int iPXConfigCapMask; - - /// The bit mask identifies the PowerExpress Config Caps value. The detailed definition is in ADL_PX_CONFIGCAPS_XXXX /ref define_powerxpress_constants. - int iPXConfigCapValue; - -} ADLPXConfigCaps, *LPADLPXConfigCaps; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about an application -/// -/// This structure is used to store basic information of an application -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLApplicationData -{ - /// Path Name - char strPathName[ADL_MAX_PATH]; - /// File Name - char strFileName[ADL_APP_PROFILE_FILENAME_LENGTH]; - /// Creation timestamp - char strTimeStamp[ADL_APP_PROFILE_TIMESTAMP_LENGTH]; - /// Version - char strVersion[ADL_APP_PROFILE_VERSION_LENGTH]; -}ADLApplicationData; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about an application -/// -/// This structure is used to store basic information of an application -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLApplicationDataX2 -{ - /// Path Name - wchar_t strPathName[ADL_MAX_PATH]; - /// File Name - wchar_t strFileName[ADL_APP_PROFILE_FILENAME_LENGTH]; - /// Creation timestamp - wchar_t strTimeStamp[ADL_APP_PROFILE_TIMESTAMP_LENGTH]; - /// Version - wchar_t strVersion[ADL_APP_PROFILE_VERSION_LENGTH]; -}ADLApplicationDataX2; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about an application -/// -/// This structure is used to store basic information of an application including process id -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLApplicationDataX3 -{ - /// Path Name - wchar_t strPathName[ADL_MAX_PATH]; - /// File Name - wchar_t strFileName[ADL_APP_PROFILE_FILENAME_LENGTH]; - /// Creation timestamp - wchar_t strTimeStamp[ADL_APP_PROFILE_TIMESTAMP_LENGTH]; - /// Version - wchar_t strVersion[ADL_APP_PROFILE_VERSION_LENGTH]; - //Application Process id - unsigned int iProcessId; -}ADLApplicationDataX3; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information of a property of an application profile -/// -/// This structure is used to store property information of an application profile -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _PropertyRecord -{ - /// Property Name - char strName [ADL_APP_PROFILE_PROPERTY_LENGTH]; - /// Property Type - ADLProfilePropertyType eType; - /// Data Size in bytes - int iDataSize; - /// Property Value, can be any data type - unsigned char uData[1]; -}PropertyRecord; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about an application profile -/// -/// This structure is used to store information of an application profile -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLApplicationProfile -{ - /// Number of properties - int iCount; - /// Buffer to store all property records - PropertyRecord record[1]; -}ADLApplicationProfile; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about an OD5 Power Control feature -/// -/// This structure is used to store information of an Power Control feature -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLPowerControlInfo -{ -/// Minimum value. -int iMinValue; -/// Maximum value. -int iMaxValue; -/// The minimum change in between minValue and maxValue. -int iStepValue; - } ADLPowerControlInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about an controller mode -/// -/// This structure is used to store information of an controller mode -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLControllerMode -{ - /// This falg indicates actions that will be applied by set viewport - /// The value can be a combination of ADL_CONTROLLERMODE_CM_MODIFIER_VIEW_POSITION, - /// ADL_CONTROLLERMODE_CM_MODIFIER_VIEW_PANLOCK and ADL_CONTROLLERMODE_CM_MODIFIER_VIEW_SIZE - int iModifiers; - - /// Horizontal view starting position - int iViewPositionCx; - - /// Vertical view starting position - int iViewPositionCy; - - /// Horizontal left panlock position - int iViewPanLockLeft; - - /// Horizontal right panlock position - int iViewPanLockRight; - - /// Vertical top panlock position - int iViewPanLockTop; - - /// Vertical bottom panlock position - int iViewPanLockBottom; - - /// View resolution in pixels (width) - int iViewResolutionCx; - - /// View resolution in pixels (hight) - int iViewResolutionCy; -}ADLControllerMode; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about a display -/// -/// This structure is used to store information about a display -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayIdentifier -{ - /// ADL display index - long ulDisplayIndex; - - /// manufacturer ID of the display - long ulManufacturerId; - - /// product ID of the display - long ulProductId; - - /// serial number of the display - long ulSerialNo; - -} ADLDisplayIdentifier; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 clock range -/// -/// This structure is used to store information about Overdrive 6 clock range -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6ParameterRange -{ - /// The starting value of the clock range - int iMin; - /// The ending value of the clock range - int iMax; - /// The minimum increment between clock values - int iStep; - -} ADLOD6ParameterRange; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 capabilities -/// -/// This structure is used to store information about Overdrive 6 capabilities -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6Capabilities -{ - /// Contains a bitmap of the OD6 capability flags. Possible values: \ref ADL_OD6_CAPABILITY_SCLK_CUSTOMIZATION, - /// \ref ADL_OD6_CAPABILITY_MCLK_CUSTOMIZATION, \ref ADL_OD6_CAPABILITY_GPU_ACTIVITY_MONITOR - int iCapabilities; - /// Contains a bitmap indicating the power states - /// supported by OD6. Currently only the performance state - /// is supported. Possible Values: \ref ADL_OD6_SUPPORTEDSTATE_PERFORMANCE - int iSupportedStates; - /// Number of levels. OD6 will always use 2 levels, which describe - /// the minimum to maximum clock ranges. - /// The 1st level indicates the minimum clocks, and the 2nd level - /// indicates the maximum clocks. - int iNumberOfPerformanceLevels; - /// Contains the hard limits of the sclk range. Overdrive - /// clocks cannot be set outside this range. - ADLOD6ParameterRange sEngineClockRange; - /// Contains the hard limits of the mclk range. Overdrive - /// clocks cannot be set outside this range. - ADLOD6ParameterRange sMemoryClockRange; - - /// Value for future extension - int iExtValue; - /// Mask for future extension - int iExtMask; - -} ADLOD6Capabilities; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 clock values. -/// -/// This structure is used to store information about Overdrive 6 clock values. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6PerformanceLevel -{ - /// Engine (core) clock. - int iEngineClock; - /// Memory clock. - int iMemoryClock; - -} ADLOD6PerformanceLevel; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 clocks. -/// -/// This structure is used to store information about Overdrive 6 clocks. This is a -/// variable-sized structure. iNumberOfPerformanceLevels indicate how many elements -/// are contained in the aLevels array. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6StateInfo -{ - /// Number of levels. OD6 uses clock ranges instead of discrete performance levels. - /// iNumberOfPerformanceLevels is always 2. The 1st level indicates the minimum clocks - /// in the range. The 2nd level indicates the maximum clocks in the range. - int iNumberOfPerformanceLevels; - - /// Value for future extension - int iExtValue; - /// Mask for future extension - int iExtMask; - - /// Variable-sized array of levels. - /// The number of elements in the array is specified by iNumberofPerformanceLevels. - ADLOD6PerformanceLevel aLevels [1]; - -} ADLOD6StateInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about current Overdrive 6 performance status. -/// -/// This structure is used to store information about current Overdrive 6 performance status. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6CurrentStatus -{ - /// Current engine clock in 10 KHz. - int iEngineClock; - /// Current memory clock in 10 KHz. - int iMemoryClock; - /// Current GPU activity in percent. This - /// indicates how "busy" the GPU is. - int iActivityPercent; - /// Not used. Reserved for future use. - int iCurrentPerformanceLevel; - /// Current PCI-E bus speed - int iCurrentBusSpeed; - /// Current PCI-E bus # of lanes - int iCurrentBusLanes; - /// Maximum possible PCI-E bus # of lanes - int iMaximumBusLanes; - - /// Value for future extension - int iExtValue; - /// Mask for future extension - int iExtMask; - -} ADLOD6CurrentStatus; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 thermal contoller capabilities -/// -/// This structure is used to store information about Overdrive 6 thermal controller capabilities -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6ThermalControllerCaps -{ - /// Contains a bitmap of thermal controller capability flags. Possible values: \ref ADL_OD6_TCCAPS_THERMAL_CONTROLLER, \ref ADL_OD6_TCCAPS_FANSPEED_CONTROL, - /// \ref ADL_OD6_TCCAPS_FANSPEED_PERCENT_READ, \ref ADL_OD6_TCCAPS_FANSPEED_PERCENT_WRITE, \ref ADL_OD6_TCCAPS_FANSPEED_RPM_READ, \ref ADL_OD6_TCCAPS_FANSPEED_RPM_WRITE - int iCapabilities; - /// Minimum fan speed expressed as a percentage - int iFanMinPercent; - /// Maximum fan speed expressed as a percentage - int iFanMaxPercent; - /// Minimum fan speed expressed in revolutions-per-minute - int iFanMinRPM; - /// Maximum fan speed expressed in revolutions-per-minute - int iFanMaxRPM; - - /// Value for future extension - int iExtValue; - /// Mask for future extension - int iExtMask; - -} ADLOD6ThermalControllerCaps; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 fan speed information -/// -/// This structure is used to store information about Overdrive 6 fan speed information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6FanSpeedInfo -{ - /// Contains a bitmap of the valid fan speed type flags. Possible values: \ref ADL_OD6_FANSPEED_TYPE_PERCENT, \ref ADL_OD6_FANSPEED_TYPE_RPM, \ref ADL_OD6_FANSPEED_USER_DEFINED - int iSpeedType; - /// Contains current fan speed in percent (if valid flag exists in iSpeedType) - int iFanSpeedPercent; - /// Contains current fan speed in RPM (if valid flag exists in iSpeedType) - int iFanSpeedRPM; - - /// Value for future extension - int iExtValue; - /// Mask for future extension - int iExtMask; - -} ADLOD6FanSpeedInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 fan speed value -/// -/// This structure is used to store information about Overdrive 6 fan speed value -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6FanSpeedValue -{ - /// Indicates the units of the fan speed. Possible values: \ref ADL_OD6_FANSPEED_TYPE_PERCENT, \ref ADL_OD6_FANSPEED_TYPE_RPM - int iSpeedType; - /// Fan speed value (units as indicated above) - int iFanSpeed; - - /// Value for future extension - int iExtValue; - /// Mask for future extension - int iExtMask; - -} ADLOD6FanSpeedValue; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 PowerControl settings. -/// -/// This structure is used to store information about Overdrive 6 PowerControl settings. -/// PowerControl is the feature which allows the performance characteristics of the GPU -/// to be adjusted by changing the PowerTune power limits. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6PowerControlInfo -{ - /// The minimum PowerControl adjustment value - int iMinValue; - /// The maximum PowerControl adjustment value - int iMaxValue; - /// The minimum difference between PowerControl adjustment values - int iStepValue; - - /// Value for future extension - int iExtValue; - /// Mask for future extension - int iExtMask; - -} ADLOD6PowerControlInfo; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 PowerControl settings. -/// -/// This structure is used to store information about Overdrive 6 PowerControl settings. -/// PowerControl is the feature which allows the performance characteristics of the GPU -/// to be adjusted by changing the PowerTune power limits. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6VoltageControlInfo -{ - /// The minimum VoltageControl adjustment value - int iMinValue; - /// The maximum VoltageControl adjustment value - int iMaxValue; - /// The minimum difference between VoltageControl adjustment values - int iStepValue; - - /// Value for future extension - int iExtValue; - /// Mask for future extension - int iExtMask; - -} ADLOD6VoltageControlInfo; - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing ECC statistics namely SEC counts and DED counts -/// Single error count - count of errors that can be corrected -/// Doubt Error Detect - count of errors that cannot be corrected -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLECCData -{ - // Single error count - count of errors that can be corrected - int iSec; - // Double error detect - count of errors that cannot be corrected - int iDed; - -} ADLECCData; - - - - -/// \brief Handle to ADL client context. -/// -/// ADL clients obtain context handle from initial call to \ref ADL2_Main_Control_Create. -/// Clients have to pass the handle to each subsequent ADL call and finally destroy -/// the context with call to \ref ADL2_Main_Control_Destroy -/// \nosubgrouping -typedef void *ADL_CONTEXT_HANDLE; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the display mode definition used per controller. -/// -/// This structure is used to store the display mode definition used per controller. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDisplayModeX2 -{ -/// Horizontal resolution (in pixels). - int iWidth; -/// Vertical resolution (in lines). - int iHeight; -/// Interlaced/Progressive. The value will be set for Interlaced as ADL_DL_TIMINGFLAG_INTERLACED. If not set it is progressive. Refer define_detailed_timing_flags. - int iScanType; -/// Refresh rate. - int iRefreshRate; -/// Timing Standard. Refer define_modetiming_standard. - int iTimingStandard; -} ADLDisplayModeX2; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 extension capabilities -/// -/// This structure is used to store information about Overdrive 6 extension capabilities -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6CapabilitiesEx -{ - /// Contains a bitmap of the OD6 extension capability flags. Possible values: \ref ADL_OD6_CAPABILITY_SCLK_CUSTOMIZATION, - /// \ref ADL_OD6_CAPABILITY_MCLK_CUSTOMIZATION, \ref ADL_OD6_CAPABILITY_GPU_ACTIVITY_MONITOR, - /// \ref ADL_OD6_CAPABILITY_POWER_CONTROL, \ref ADL_OD6_CAPABILITY_VOLTAGE_CONTROL, \ref ADL_OD6_CAPABILITY_PERCENT_ADJUSTMENT, - //// \ref ADL_OD6_CAPABILITY_THERMAL_LIMIT_UNLOCK - int iCapabilities; - /// The Power states that support clock and power customization. Only performance state is currently supported. - /// Possible Values: \ref ADL_OD6_SUPPORTEDSTATE_PERFORMANCE - int iSupportedStates; - /// Returns the hard limits of the SCLK overdrive adjustment range. Overdrive clocks should not be adjusted outside of this range. The values are specified as +/- percentages. - ADLOD6ParameterRange sEngineClockPercent; - /// Returns the hard limits of the MCLK overdrive adjustment range. Overdrive clocks should not be adjusted outside of this range. The values are specified as +/- percentages. - ADLOD6ParameterRange sMemoryClockPercent; - /// Returns the hard limits of the Power Limit adjustment range. Power limit should not be adjusted outside this range. The values are specified as +/- percentages. - ADLOD6ParameterRange sPowerControlPercent; - /// Reserved for future expansion of the structure. - int iExtValue; - /// Reserved for future expansion of the structure. - int iExtMask; -} ADLOD6CapabilitiesEx; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 extension state information -/// -/// This structure is used to store information about Overdrive 6 extension state information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6StateEx -{ - /// The current engine clock adjustment value, specified as a +/- percent. - int iEngineClockPercent; - /// The current memory clock adjustment value, specified as a +/- percent. - int iMemoryClockPercent; - /// The current power control adjustment value, specified as a +/- percent. - int iPowerControlPercent; - /// Reserved for future expansion of the structure. - int iExtValue; - /// Reserved for future expansion of the structure. - int iExtMask; -} ADLOD6StateEx; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive 6 extension recommended maximum clock adjustment values -/// -/// This structure is used to store information about Overdrive 6 extension recommended maximum clock adjustment values -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD6MaxClockAdjust -{ - /// The recommended maximum engine clock adjustment in percent, for the specified power limit value. - int iEngineClockMax; - /// The recommended maximum memory clock adjustment in percent, for the specified power limit value. - /// Currently the memory is independent of the Power Limit setting, so iMemoryClockMax will always return the maximum - /// possible adjustment value. This field is here for future enhancement in case we add a dependency between Memory Clock - /// adjustment and Power Limit setting. - int iMemoryClockMax; - /// Reserved for future expansion of the structure. - int iExtValue; - /// Reserved for future expansion of the structure. - int iExtMask; -} ADLOD6MaxClockAdjust; - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the Connector information -/// -/// this structure is used to get the connector information like length, positions & etc. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLConnectorInfo -{ - ///index of the connector(0-based) - int iConnectorIndex; - ///used for disply identification/ordering - int iConnectorId; - ///index of the slot, 0-based index. - int iSlotIndex; - ///Type of the connector. \ref define_connector_types - int iType; - ///Position of the connector(in millimeters), from the right side of the slot. - int iOffset; - ///Length of the connector(in millimeters). - int iLength; - -} ADLConnectorInfo; - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing the slot information -/// -/// this structure is used to get the slot information like length of the slot, no of connectors on the slot & etc. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLBracketSlotInfo -{ - ///index of the slot, 0-based index. - int iSlotIndex; - ///length of the slot(in millimeters). - int iLength; - ///width of the slot(in millimeters). - int iWidth; -} ADLBracketSlotInfo; - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing MST branch information -/// -/// this structure is used to store the MST branch information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLMSTRad -{ - ///depth of the link. - int iLinkNumber; - /// Relative address, address scheme starts from source side - char rad[ADL_MAX_RAD_LINK_COUNT]; -} ADLMSTRad; - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing port information -/// -/// this structure is used to get the display or MST branch information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLDevicePort -{ - ///index of the connector. - int iConnectorIndex; - ///Relative MST address. If MST RAD contains 0 it means DP or Root of the MST topology. For non DP connectors MST RAD is ignored. - ADLMSTRad aMSTRad; -} ADLDevicePort; - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing supported connection types and properties -/// -/// this structure is used to get the supported connection types and supported properties of given connector -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLSupportedConnections -{ - ///Bit vector of supported connections. Bitmask is defined in constants section. \ref define_connection_types - int iSupportedConnections; - ///Array of bitvectors. Each bit vector represents supported properties for one connection type. Index of this array is connection type (bit number in mask). - int iSupportedProperties[ADL_MAX_CONNECTION_TYPES]; -} ADLSupportedConnections; - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing connection state of the connector -/// -/// this structure is used to get the current Emulation status and mode of the given connector -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLConnectionState -{ - ///The value is bit vector. Each bit represents status. See masks constants for details. \ref define_emulation_status - int iEmulationStatus; - ///It contains information about current emulation mode. See constants for details. \ref define_emulation_mode - int iEmulationMode; - ///If connection is active it will contain display id, otherwise CWDDEDI_INVALID_DISPLAY_INDEX - int iDisplayIndex; -} ADLConnectionState; - - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing connection properties information -/// -/// this structure is used to retrieve the properties of connection type -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLConnectionProperties -{ - //Bit vector. Represents actual properties. Supported properties for specific connection type. \ref define_connection_properties - int iValidProperties; - //Bitrate(in MHz). Could be used for MST branch, DP or DP active dongle. \ref define_linkrate_constants - int iBitrate; - //Number of lanes in DP connection. \ref define_lanecount_constants - int iNumberOfLanes; - //Color depth(in bits). \ref define_colordepth_constants - int iColorDepth; - //3D capabilities. It could be used for some dongles. For instance: alternate framepack. Value of this property is bit vector. - int iStereo3DCaps; - ///Output Bandwidth. Could be used for MST branch, DP or DP Active dongle. \ref define_linkrate_constants - int iOutputBandwidth; -} ADLConnectionProperties; - -//////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing connection information -/// -/// this structure is used to retrieve the data from driver which includes -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLConnectionData -{ - ///Connection type. based on the connection type either iNumberofPorts or IDataSize,EDIDdata is valid, \ref define_connection_types - int iConnectionType; - ///Specifies the connection properties. - ADLConnectionProperties aConnectionProperties; - ///Number of ports - int iNumberofPorts; - ///Number of Active Connections - int iActiveConnections; - ///actual size of EDID data block size. - int iDataSize; - ///EDID Data - char EdidData[ADL_MAX_DISPLAY_EDID_DATA_SIZE]; -} ADLConnectionData; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about an controller mode including Number of Connectors -/// -/// This structure is used to store information of an controller mode -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLAdapterCapsX2 -{ - /// AdapterID for this adapter - int iAdapterID; - /// Number of controllers for this adapter - int iNumControllers; - /// Number of displays for this adapter - int iNumDisplays; - /// Number of overlays for this adapter - int iNumOverlays; - /// Number of GLSyncConnectors - int iNumOfGLSyncConnectors; - /// The bit mask identifies the adapter caps - int iCapsMask; - /// The bit identifies the adapter caps \ref define_adapter_caps - int iCapsValue; - /// Number of Connectors for this adapter - int iNumConnectors; -}ADLAdapterCapsX2; - -typedef enum _ADL_ERROR_RECORD_SEVERITY -{ - ADL_GLOBALLY_UNCORRECTED = 1, - ADL_LOCALLY_UNCORRECTED = 2, - ADL_DEFFERRED = 3, - ADL_CORRECTED = 4 -}ADL_ERROR_RECORD_SEVERITY; - -typedef union _ADL_ECC_EDC_FLAG -{ - struct - { - unsigned int isEccAccessing : 1; - unsigned int reserved : 31; - }bits; - unsigned int u32All; -}ADL_ECC_EDC_FLAG; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about EDC Error Record -/// -/// This structure is used to store EDC Error Record -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLErrorRecord -{ - // Severity of error - ADL_ERROR_RECORD_SEVERITY Severity; - - // Is the counter valid? - int countValid; - - // Counter value, if valid - unsigned int count; - - // Is the location information valid? - int locationValid; - - // Physical location of error - unsigned int CU; // CU number on which error occurred, if known - char StructureName[32]; // e.g. LDS, TCC, etc. - - // Time of error record creation (e.g. time of query, or time of poison interrupt) - char tiestamp[32]; - - unsigned int padding[3]; -}ADLErrorRecord; - -typedef enum _ADL_EDC_BLOCK_ID -{ - ADL_EDC_BLOCK_ID_SQCIS = 1, - ADL_EDC_BLOCK_ID_SQCDS = 2, - ADL_EDC_BLOCK_ID_SGPR = 3, - ADL_EDC_BLOCK_ID_VGPR = 4, - ADL_EDC_BLOCK_ID_LDS = 5, - ADL_EDC_BLOCK_ID_GDS = 6, - ADL_EDC_BLOCK_ID_TCL1 = 7, - ADL_EDC_BLOCK_ID_TCL2 = 8 -}ADL_EDC_BLOCK_ID; - -typedef enum _ADL_ERROR_INJECTION_MODE -{ - ADL_ERROR_INJECTION_MODE_SINGLE = 1, - ADL_ERROR_INJECTION_MODE_MULTIPLE = 2, - ADL_ERROR_INJECTION_MODE_ADDRESS = 3 -}ADL_ERROR_INJECTION_MODE; - -typedef union _ADL_ERROR_PATTERN -{ - struct - { - unsigned long EccInjVector : 16; - unsigned long EccInjEn : 9; - unsigned long EccBeatEn : 4; - unsigned long EccChEn : 4; - unsigned long reserved : 31; - } bits; - unsigned long long u64Value; -} ADL_ERROR_PATTERN; - -typedef struct _ADL_ERROR_INJECTION_DATA -{ - unsigned long long errorAddress; - ADL_ERROR_PATTERN errorPattern; -}ADL_ERROR_INJECTION_DATA; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about EDC Error Injection -/// -/// This structure is used to store EDC Error Injection -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLErrorInjection -{ - ADL_EDC_BLOCK_ID blockId; - ADL_ERROR_INJECTION_MODE errorInjectionMode; -}ADLErrorInjection; - -typedef struct ADLErrorInjectionX2 -{ - ADL_EDC_BLOCK_ID blockId; - ADL_ERROR_INJECTION_MODE errorInjectionMode; - ADL_ERROR_INJECTION_DATA errorInjectionData; -}ADLErrorInjectionX2; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing per display FreeSync capability information. -/// -/// This structure is used to store the FreeSync capability of both the display and -/// the GPU the display is connected to. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLFreeSyncCap -{ - /// FreeSync capability flags. \ref define_freesync_caps - int iCaps; - /// Reports minimum FreeSync refresh rate supported by the display in micro hertz - int iMinRefreshRateInMicroHz; - /// Reports maximum FreeSync refresh rate supported by the display in micro hertz - int iMaxRefreshRateInMicroHz; - /// Reserved - int iReserved[5]; -} ADLFreeSyncCap; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing per display Display Connectivty Experience Settings -/// -/// This structure is used to store the Display Connectivity Experience settings of a -/// display -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLDceSettings -{ - DceSettingsType type; // Defines which structure is in the union below - union - { - struct - { - bool qualityDetectionEnabled; - } HdmiLq; - struct - { - DpLinkRate linkRate; // Read-only - unsigned int numberOfActiveLanes; // Read-only - unsigned int numberofTotalLanes; // Read-only - int relativePreEmphasis; // Allowable values are -2 to +2 - int relativeVoltageSwing; // Allowable values are -2 to +2 - int persistFlag; - } DpLink; - struct - { - bool linkProtectionEnabled; // Read-only - } Protection; - } Settings; - int iReserved[15]; -} ADLDceSettings; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Graphic Core -/// -/// This structure is used to get Graphic Core Info -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLGraphicCoreInfo -{ - /// indicate the graphic core generation - int iGCGen; - - /// Total number of CUs. Valid for GCN (iGCGen == GCN) - int iNumCUs; - - /// Number of processing elements per CU. Valid for GCN (iGCGen == GCN) - int iNumPEsPerCU; - - /// Total number of SIMDs. Valid for Pre GCN (iGCGen == Pre-GCN) - int iNumSIMDs; - - /// Total number of ROPs. Valid for both GCN and Pre GCN - int iNumROPs; - - /// reserved for future use - int iReserved[11]; -}ADLGraphicCoreInfo; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive N clock range -/// -/// This structure is used to store information about Overdrive N clock range -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLODNParameterRange -{ - /// The starting value of the clock range - int iMode; - /// The starting value of the clock range - int iMin; - /// The ending value of the clock range - int iMax; - /// The minimum increment between clock values - int iStep; - /// The default clock values - int iDefault; - -} ADLODNParameterRange; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive N capabilities -/// -/// This structure is used to store information about Overdrive N capabilities -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLODNCapabilities -{ - /// Number of levels which describe the minimum to maximum clock ranges. - /// The 1st level indicates the minimum clocks, and the 2nd level - /// indicates the maximum clocks. - int iMaximumNumberOfPerformanceLevels; - /// Contains the hard limits of the sclk range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange sEngineClockRange; - /// Contains the hard limits of the mclk range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange sMemoryClockRange; - /// Contains the hard limits of the vddc range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange svddcRange; - /// Contains the hard limits of the power range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange power; - /// Contains the hard limits of the power range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange powerTuneTemperature; - /// Contains the hard limits of the Temperature range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange fanTemperature; - /// Contains the hard limits of the Fan range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange fanSpeed; - /// Contains the hard limits of the Fan range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange minimumPerformanceClock; -} ADLODNCapabilities; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive N capabilities -/// -/// This structure is used to store information about Overdrive N capabilities -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLODNCapabilitiesX2 -{ - /// Number of levels which describe the minimum to maximum clock ranges. - /// The 1st level indicates the minimum clocks, and the 2nd level - /// indicates the maximum clocks. - int iMaximumNumberOfPerformanceLevels; - /// bit vector, which tells what are the features are supported. - /// \ref: ADLODNFEATURECONTROL - int iFlags; - /// Contains the hard limits of the sclk range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange sEngineClockRange; - /// Contains the hard limits of the mclk range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange sMemoryClockRange; - /// Contains the hard limits of the vddc range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange svddcRange; - /// Contains the hard limits of the power range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange power; - /// Contains the hard limits of the power range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange powerTuneTemperature; - /// Contains the hard limits of the Temperature range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange fanTemperature; - /// Contains the hard limits of the Fan range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange fanSpeed; - /// Contains the hard limits of the Fan range. Overdrive - /// clocks cannot be set outside this range. - ADLODNParameterRange minimumPerformanceClock; - /// Contains the hard limits of the throttleNotification - ADLODNParameterRange throttleNotificaion; - /// Contains the hard limits of the Auto Systemclock - ADLODNParameterRange autoSystemClock; -} ADLODNCapabilitiesX2; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive level. -/// -/// This structure is used to store information about Overdrive level. -/// This structure is used by ADLODPerformanceLevels. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODNPerformanceLevel -{ - /// clock. - int iClock; - /// VDCC. - int iVddc; - /// enabled - int iEnabled; -} ADLODNPerformanceLevel; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive N performance levels. -/// -/// This structure is used to store information about Overdrive performance levels. -/// This structure is used by the ADL_OverdriveN_ODPerformanceLevels_Get() and ADL_OverdriveN_ODPerformanceLevels_Set() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODNPerformanceLevels -{ - int iSize; - //Automatic/manual - int iMode; - /// Must be set to sizeof( \ref ADLODPerformanceLevels ) + sizeof( \ref ADLODPerformanceLevel ) * (ADLODParameters.iNumberOfPerformanceLevels - 1) - int iNumberOfPerformanceLevels; - /// Array of performance state descriptors. Must have ADLODParameters.iNumberOfPerformanceLevels elements. - ADLODNPerformanceLevel aLevels[1]; -} ADLODNPerformanceLevels; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive N Fan Speed. -/// -/// This structure is used to store information about Overdrive Fan control . -/// This structure is used by the ADL_OverdriveN_ODPerformanceLevels_Get() and ADL_OverdriveN_ODPerformanceLevels_Set() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODNFanControl -{ - int iMode; - int iFanControlMode; - int iCurrentFanSpeedMode; - int iCurrentFanSpeed; - int iTargetFanSpeed; - int iTargetTemperature; - int iMinPerformanceClock; - int iMinFanLimit; -} ADLODNFanControl; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive N power limit. -/// -/// This structure is used to store information about Overdrive power limit. -/// This structure is used by the ADL_OverdriveN_ODPerformanceLevels_Get() and ADL_OverdriveN_ODPerformanceLevels_Set() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODNPowerLimitSetting -{ - int iMode; - int iTDPLimit; - int iMaxOperatingTemperature; -} ADLODNPowerLimitSetting; - -typedef struct ADLODNPerformanceStatus -{ - int iCoreClock; - int iMemoryClock; - int iDCEFClock; - int iGFXClock; - int iUVDClock; - int iVCEClock; - int iGPUActivityPercent; - int iCurrentCorePerformanceLevel; - int iCurrentMemoryPerformanceLevel; - int iCurrentDCEFPerformanceLevel; - int iCurrentGFXPerformanceLevel; - int iUVDPerformanceLevel; - int iVCEPerformanceLevel; - int iCurrentBusSpeed; - int iCurrentBusLanes; - int iMaximumBusLanes; - int iVDDC; - int iVDDCI; -} ADLODNPerformanceStatus; - -///\brief Structure containing information about Overdrive level. -/// -/// This structure is used to store information about Overdrive level. -/// This structure is used by ADLODPerformanceLevels. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODNPerformanceLevelX2 -{ - /// clock. - int iClock; - /// VDCC. - int iVddc; - /// enabled - int iEnabled; - /// MASK - int iControl; -} ADLODNPerformanceLevelX2; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive N performance levels. -/// -/// This structure is used to store information about Overdrive performance levels. -/// This structure is used by the ADL_OverdriveN_ODPerformanceLevels_Get() and ADL_OverdriveN_ODPerformanceLevels_Set() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLODNPerformanceLevelsX2 -{ - int iSize; - //Automatic/manual - int iMode; - /// Must be set to sizeof( \ref ADLODPerformanceLevels ) + sizeof( \ref ADLODPerformanceLevel ) * (ADLODParameters.iNumberOfPerformanceLevels - 1) - int iNumberOfPerformanceLevels; - /// Array of performance state descriptors. Must have ADLODParameters.iNumberOfPerformanceLevels elements. - ADLODNPerformanceLevelX2 aLevels[1]; -} ADLODNPerformanceLevelsX2; - -typedef enum _ADLODNCurrentPowerType -{ - ODN_GPU_TOTAL_POWER = 0, - ODN_GPU_PPT_POWER, - ODN_GPU_SOCKET_POWER, - ODN_GPU_CHIP_POWER -} ADLODNCurrentPowerType; - -// in/out: CWDDEPM_CURRENTPOWERPARAMETERS -typedef struct _ADLODNCurrentPowerParameters -{ - int size; - ADLODNCurrentPowerType powerType; - int currentPower; -} ADLODNCurrentPowerParameters; - -//ODN Ext range data structure -typedef struct _ADLODNExtSingleInitSetting -{ - int mode; - int minValue; - int maxValue; - int step; - int defaultValue; -} ADLODNExtSingleInitSetting; - -//OD8 Ext range data structure -typedef struct _ADLOD8SingleInitSetting -{ - int featureID; - int minValue; - int maxValue; - int defaultValue; -} ADLOD8SingleInitSetting; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive8 initial setting -/// -/// This structure is used to store information about Overdrive8 initial setting -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD8InitSetting -{ - int count; - int overdrive8Capabilities; - ADLOD8SingleInitSetting od8SettingTable[OD8_COUNT]; -} ADLOD8InitSetting; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive8 current setting -/// -/// This structure is used to store information about Overdrive8 current setting -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLOD8CurrentSetting -{ - int count; - int Od8SettingTable[OD8_COUNT]; -} ADLOD8CurrentSetting; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Overdrive8 set setting -/// -/// This structure is used to store information about Overdrive8 set setting -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - -typedef struct _ADLOD8SingleSetSetting -{ - int value; - int requested; // 0 - default , 1 - requested - int reset; // 0 - do not reset , 1 - reset setting back to default -} ADLOD8SingleSetSetting; - - -typedef struct _ADLOD8SetSetting -{ - int count; - ADLOD8SingleSetSetting od8SettingTable[OD8_COUNT]; -} ADLOD8SetSetting; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about Performance Metrics data -/// -/// This structure is used to store information about Performance Metrics data output -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLSingleSensorData -{ - int supported; - int value; -} ADLSingleSensorData; - -typedef struct _ADLPMLogDataOutput -{ - int size; - ADLSingleSensorData sensors[ADL_PMLOG_MAX_SENSORS]; -}ADLPMLogDataOutput; - -typedef enum _ADLSensorType -{ - SENSOR_MAXTYPES = 0, - PMLOG_CLK_GFXCLK = 1, - PMLOG_CLK_MEMCLK = 2, - PMLOG_CLK_SOCCLK = 3, - PMLOG_CLK_UVDCLK1 = 4, - PMLOG_CLK_UVDCLK2 = 5, - PMLOG_CLK_VCECLK = 6, - PMLOG_CLK_VCNCLK = 7, - PMLOG_TEMPERATURE_EDGE = 8, - PMLOG_TEMPERATURE_MEM = 9, - PMLOG_TEMPERATURE_VRVDDC = 10, - PMLOG_TEMPERATURE_VRMVDD = 11, - PMLOG_TEMPERATURE_LIQUID = 12, - PMLOG_TEMPERATURE_PLX = 13, - PMLOG_FAN_RPM = 14, - PMLOG_FAN_PERCENTAGE = 15, - PMLOG_SOC_VOLTAGE = 16, - PMLOG_SOC_POWER = 17, - PMLOG_SOC_CURRENT = 18, - PMLOG_INFO_ACTIVITY_GFX = 19, - PMLOG_INFO_ACTIVITY_MEM = 20, - PMLOG_GFX_VOLTAGE = 21, - PMLOG_MEM_VOLTAGE = 22, - PMLOG_ASIC_POWER = 23, - PMLOG_TEMPERATURE_VRSOC = 24, - PMLOG_TEMPERATURE_VRMVDD0= 25, - PMLOG_TEMPERATURE_VRMVDD1= 26, - PMLOG_TEMPERATURE_HOTSPOT= 27 -} ADLSensorType; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about PPLog settings. -/// -/// This structure is used to store information about PPLog settings. -/// This structure is used by the ADL2_PPLogSettings_Set() and ADL2_PPLogSettings_Get() functions. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct ADLPPLogSettings -{ - int BreakOnAssert; - int BreakOnWarn; - int LogEnabled; - int LogFieldMask; - int LogDestinations; - int LogSeverityEnabled; - int LogSourceMask; - int PowerProfilingEnabled; - int PowerProfilingTimeInterval; -}ADLPPLogSettings; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related Frames Per Second for AC and DC. -/// -/// This structure is used to store information related AC and DC Frames Per Second settings -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLFPSSettingsOutput -{ - /// size - int ulSize; - /// FPS Monitor is enabled in the AC state if 1 - int bACFPSEnabled; - /// FPS Monitor is enabled in the DC state if 1 - int bDCFPSEnabled; - /// Current Value of FPS Monitor in AC state - int ulACFPSCurrent; - /// Current Value of FPS Monitor in DC state - int ulDCFPSCurrent; - /// Maximum FPS Threshold allowed in PPLib for AC - int ulACFPSMaximum; - /// Minimum FPS Threshold allowed in PPLib for AC - int ulACFPSMinimum; - /// Maximum FPS Threshold allowed in PPLib for DC - int ulDCFPSMaximum; - /// Minimum FPS Threshold allowed in PPLib for DC - int ulDCFPSMinimum; - -} ADLFPSSettingsOutput; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related Frames Per Second for AC and DC. -/// -/// This structure is used to store information related AC and DC Frames Per Second settings -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLFPSSettingsInput -{ - /// size - int ulSize; - /// Settings are for Global FPS (used by CCC) - int bGlobalSettings; - /// Current Value of FPS Monitor in AC state - int ulACFPSCurrent; - /// Current Value of FPS Monitor in DC state - int ulDCFPSCurrent; - /// Reserved - int ulReserved[6]; - -} ADLFPSSettingsInput; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related power management logging. -/// -/// This structure is used to store support information for power management logging. -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -enum { ADL_PMLOG_MAX_SUPPORTED_SENSORS = 256 }; - -typedef struct _ADLPMLogSupportInfo -{ - /// list of sensors defined by ADL_PMLOG_SENSORS - unsigned short usSensors[ADL_PMLOG_MAX_SUPPORTED_SENSORS]; - /// Reserved - int ulReserved[16]; - -} ADLPMLogSupportInfo; - -typedef enum _ADL_PMLOG_SENSORS -{ - ADL_SENSOR_MAXTYPES = 0, - ADL_PMLOG_CLK_GFXCLK = 1, - ADL_PMLOG_CLK_MEMCLK = 2, - ADL_PMLOG_CLK_SOCCLK = 3, - ADL_PMLOG_CLK_UVDCLK1 = 4, - ADL_PMLOG_CLK_UVDCLK2 = 5, - ADL_PMLOG_CLK_VCECLK = 6, - ADL_PMLOG_CLK_VCNCLK = 7, - ADL_PMLOG_TEMPERATURE_EDGE = 8, - ADL_PMLOG_TEMPERATURE_MEM = 9, - ADL_PMLOG_TEMPERATURE_VRVDDC = 10, - ADL_PMLOG_TEMPERATURE_VRMVDD = 11, - ADL_PMLOG_TEMPERATURE_LIQUID = 12, - ADL_PMLOG_TEMPERATURE_PLX = 13, - ADL_PMLOG_FAN_RPM = 14, - ADL_PMLOG_FAN_PERCENTAGE = 15, - ADL_PMLOG_SOC_VOLTAGE = 16, - ADL_PMLOG_SOC_POWER = 17, - ADL_PMLOG_SOC_CURRENT = 18, - ADL_PMLOG_INFO_ACTIVITY_GFX = 19, - ADL_PMLOG_INFO_ACTIVITY_MEM = 20, - ADL_PMLOG_GFX_VOLTAGE = 21, - ADL_PMLOG_MEM_VOLTAGE = 22, - ADL_PMLOG_ASIC_POWER = 23, - ADL_PMLOG_TEMPERATURE_VRSOC = 24, - ADL_PMLOG_TEMPERATURE_VRMVDD0 = 25, - ADL_PMLOG_TEMPERATURE_VRMVDD1 = 26, - ADL_PMLOG_TEMPERATURE_HOTSPOT = 27 -} ADL_PMLOG_SENSORS; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information to start power management logging. -/// -/// This structure is used as input to ADL2_Adapter_PMLog_Start -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLPMLogStartInput -{ - /// list of sensors defined by ADL_PMLOG_SENSORS - unsigned short usSensors[ADL_PMLOG_MAX_SUPPORTED_SENSORS]; - /// Sample rate in milliseconds - unsigned long ulSampleRate; - /// Reserved - int ulReserved[15]; - -} ADLPMLogStartInput; - -typedef struct _ADLPMLogData -{ - /// Structure version - unsigned int ulVersion; - /// Current driver sample rate - unsigned int ulActiveSampleRate; - /// Timestamp of last update - unsigned long long ulLastUpdated; - /// 2D array of senesor and values - unsigned int ulValues[ADL_PMLOG_MAX_SUPPORTED_SENSORS][2]; - /// Reserved - unsigned int ulReserved[256]; - -} ADLPMLogData; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information to start power management logging. -/// -/// This structure is returned as output from ADL2_Adapter_PMLog_Start -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLPMLogStartOutput -{ - /// Pointer to memory address containing logging data - union - { - void* pLoggingAddress; - unsigned long long ptr_LoggingAddress; - }; - /// Reserved - int ulReserved[14]; - -} ADLPMLogStartOutput; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related RAS Get Error Counts Information -/// -/// This structure is used to store RAS Error Counts Get Input Information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - -typedef struct _ADLRASGetErrorCountsInput -{ - unsigned int Reserved[16]; -} ADLRASGetErrorCountsInput; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related RAS Get Error Counts Information -/// -/// This structure is used to store RAS Error Counts Get Output Information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - - -typedef struct _ADLRASGetErrorCountsOutput -{ - unsigned int CorrectedErrors; // includes both DRAM and SRAM ECC - unsigned int UnCorrectedErrors; // includes both DRAM and SRAM ECC - unsigned int Reserved[14]; -} ADLRASGetErrorCountsOutput; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related RAS Get Error Counts Information -/// -/// This structure is used to store RAS Error Counts Get Information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - -typedef struct _ADLRASGetErrorCounts -{ - unsigned int InputSize; - ADLRASGetErrorCountsInput Input; - unsigned int OutputSize; - ADLRASGetErrorCountsOutput Output; -} ADLRASGetErrorCounts; - - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related RAS Error Counts Reset Information -/// -/// This structure is used to store RAS Error Counts Reset Input Information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - - -typedef struct _ADLRASResetErrorCountsInput -{ - unsigned int Reserved[8]; -} ADLRASResetErrorCountsInput; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related RAS Error Counts Reset Information -/// -/// This structure is used to store RAS Error Counts Reset Output Information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - - -typedef struct _ADLRASResetErrorCountsOutput -{ - unsigned int Reserved[8]; -} ADLRASResetErrorCountsOutput; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related RAS Error Counts Reset Information -/// -/// This structure is used to store RAS Error Counts Reset Information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - - -typedef struct _ADLRASResetErrorCounts -{ - unsigned int InputSize; - ADLRASResetErrorCountsInput Input; - unsigned int OutputSize; - ADLRASResetErrorCountsOutput Output; -} ADLRASResetErrorCounts; - - -typedef enum _ADL_RAS_ERROR_INJECTION_MODE -{ - ADL_RAS_ERROR_INJECTION_MODE_SINGLE = 1, - ADL_RAS_ERROR_INJECTION_MODE_MULTIPLE = 2 -}ADL_RAS_ERROR_INJECTION_MODE; - - -typedef enum _ADL_RAS_BLOCK_ID -{ - ADL_RAS_BLOCK_ID_UMC = 0, - ADL_RAS_BLOCK_ID_SDMA, - ADL_RAS_BLOCK_ID_GFX_HUB, - ADL_RAS_BLOCK_ID_MMHUB, - ADL_RAS_BLOCK_ID_ATHUB, - ADL_RAS_BLOCK_ID_PCIE_BIF, - ADL_RAS_BLOCK_ID_HDP, - ADL_RAS_BLOCK_ID_XGMI_WAFL, - ADL_RAS_BLOCK_ID_DF, - ADL_RAS_BLOCK_ID_SMN, - ADL_RAS_BLOCK_ID_GFX -}ADL_RAS_BLOCK_ID; -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related RAS Error Injection information -/// -/// This structure is used to store RAS Error Injection input information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - -typedef struct _ADLRASErrorInjectonInput -{ - unsigned long long Address; - unsigned long long Value; - unsigned int BlockId; - unsigned int InjectErrorType; - unsigned int SubBlockIndex; - unsigned int padding[9]; -} ADLRASErrorInjectonInput; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related RAS Error Injection information -/// -/// This structure is used to store RAS Error Injection output information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - - -typedef struct _ADLRASErrorInjectionOutput -{ - unsigned int ErrorInjectionStatus; - unsigned int padding[15]; -} ADLRASErrorInjectionOutput; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information related RAS Error Injection information -/// -/// This structure is used to store RAS Error Injection information -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// - - -typedef struct _ADLRASErrorInjection -{ - unsigned int InputSize; - ADLRASErrorInjectonInput Input; - unsigned int OutputSize; - ADLRASErrorInjectionOutput Output; -} ADLRASErrorInjection; - -///////////////////////////////////////////////////////////////////////////////////////////// -///\brief Structure containing information about an application -/// -/// This structure is used to store basic information of a recently ran or currently running application -/// \nosubgrouping -//////////////////////////////////////////////////////////////////////////////////////////// -typedef struct _ADLSGApplicationInfo -{ - /// Application file name - wchar_t strFileName[ADL_MAX_PATH]; - /// Application file path - wchar_t strFilePath[ADL_MAX_PATH]; - /// Application version - wchar_t strVersion[ADL_MAX_PATH]; - /// Timestamp at which application has run - long long int timeStamp; - /// Holds whether the applicaition profile exists or not - unsigned int iProfileExists; - /// The GPU on which application runs - unsigned int iGPUAffinity; - /// The BDF of the GPU on which application runs - ADLBdf GPUBdf; -} ADLSGApplicationInfo; - - -#endif /* ADL_STRUCTURES_H_ */ diff --git a/3rd_party/Src/amd/amd_ags.h b/3rd_party/Src/amd/amd_ags.h deleted file mode 100644 index 990d6462b3..0000000000 --- a/3rd_party/Src/amd/amd_ags.h +++ /dev/null @@ -1,1217 +0,0 @@ -// -// Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -/// \file -/// \mainpage -/// AGS Library Overview -/// -------------------- -/// This document provides an overview of the AGS (AMD GPU Services) library. The AGS library provides software developers with the ability to query -/// AMD GPU software and hardware state information that is not normally available through standard operating systems or graphic APIs. -/// -/// The latest version of the API is publicly hosted here: https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/. -/// It is also worth checking http://gpuopen.com/gaming-product/amd-gpu-services-ags-library/ for any updates and articles on AGS. -/// \internal -/// Online documentation is publicly hosted here: http://gpuopen-librariesandsdks.github.io/ags/ -/// \endinternal -/// -/// --------------------------------------- -/// What's new in AGS 5.3 since version 5.2 -/// --------------------------------------- -/// AGS 5.3 includes the following updates: -/// * DX11 deferred context support for Multi Draw Indirect and UAV Overlap extensions. -/// * A Radeon Software Version helper to determine whether the installed driver meets your game's minimum driver version requirements. -/// * Freesync2 Gamma 2.2 mode which uses a 1010102 swapchain and can be considered as an alternative to using the 64 bit swapchain required for Freesync2 scRGB. -/// -/// Using the AGS library -/// --------------------- -/// It is recommended to take a look at the source code for the samples that come with the AGS SDK: -/// * AGSSample -/// * CrossfireSample -/// * EyefinitySample -/// The AGSSample application is the simplest of the three examples and demonstrates the code required to initialize AGS and use it to query the GPU and Eyefinity state. -/// The CrossfireSample application demonstrates the use of the new API to transfer resources on GPUs in Crossfire mode. Lastly, the EyefinitySample application provides a more -/// extensive example of Eyefinity setup than the basic example provided in AGSSample. -/// There are other samples on Github that demonstrate the DirectX shader extensions, such as the Barycentrics11 and Barycentrics12 samples. -/// -/// To add AGS support to an existing project, follow these steps: -/// * Link your project against the correct import library. Choose from either the 32 bit or 64 bit version. -/// * Copy the AGS dll into the same directory as your game executable. -/// * Include the amd_ags.h header file from your source code. -/// * Include the AGS hlsl files if you are using the shader intrinsics. -/// * Declare a pointer to an AGSContext and make this available for all subsequent calls to AGS. -/// * On game initialization, call \ref agsInit passing in the address of the context. On success, this function will return a valid context pointer. -/// -/// Don't forget to cleanup AGS by calling \ref agsDeInit when the app exits, after the device has been destroyed. - -#ifndef AMD_AGS_H -#define AMD_AGS_H - -#define AMD_AGS_VERSION_MAJOR 5 ///< AGS major version -#define AMD_AGS_VERSION_MINOR 3 ///< AGS minor version -#define AMD_AGS_VERSION_PATCH 0 ///< AGS patch version - -#ifdef __cplusplus -extern "C" { -#endif - -#define AMD_AGS_API __declspec(dllexport) ///< AGS exported functions - -#define AGS_MAKE_VERSION( major, minor, patch ) ( ( major << 22 ) | ( minor << 12 ) | patch ) ///< Macro to create the app and engine versions for the fields in \ref AGSDX12ExtensionParams and \ref AGSDX11ExtensionParams and the Radeon Software Version -#define AGS_UNSPECIFIED_VERSION 0xFFFFAD00 ///< Use this to specify no version - -// Forward declaration of D3D11 types -struct IDXGIAdapter; -enum D3D_DRIVER_TYPE; -enum D3D_FEATURE_LEVEL; -struct DXGI_SWAP_CHAIN_DESC; -struct ID3D11Device; -struct ID3D11DeviceContext; -struct IDXGISwapChain; -struct ID3D11Resource; -struct ID3D11Buffer; -struct ID3D11Texture1D; -struct ID3D11Texture2D; -struct ID3D11Texture3D; -struct D3D11_BUFFER_DESC; -struct D3D11_TEXTURE1D_DESC; -struct D3D11_TEXTURE2D_DESC; -struct D3D11_TEXTURE3D_DESC; -struct D3D11_SUBRESOURCE_DATA; -struct tagRECT; -typedef tagRECT D3D11_RECT; ///< typedef this ourselves so we don't have to drag d3d11.h in - -// Forward declaration of D3D12 types -struct ID3D12Device; -struct ID3D12GraphicsCommandList; - - -/// The return codes -enum AGSReturnCode -{ - AGS_SUCCESS, ///< Successful function call - AGS_FAILURE, ///< Failed to complete call for some unspecified reason - AGS_INVALID_ARGS, ///< Invalid arguments into the function - AGS_OUT_OF_MEMORY, ///< Out of memory when allocating space internally - AGS_ERROR_MISSING_DLL, ///< Returned when a driver dll fails to load - most likely due to not being present in legacy driver installation - AGS_ERROR_LEGACY_DRIVER, ///< Returned if a feature is not present in the installed driver - AGS_EXTENSION_NOT_SUPPORTED, ///< Returned if the driver does not support the requested driver extension - AGS_ADL_FAILURE, ///< Failure in ADL (the AMD Display Library) - AGS_DX_FAILURE ///< Failure from DirectX runtime -}; - -/// The DirectX11 extension support bits -enum AGSDriverExtensionDX11 -{ - AGS_DX11_EXTENSION_QUADLIST = 1 << 0, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_SCREENRECTLIST = 1 << 1, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_UAV_OVERLAP = 1 << 2, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_DEPTH_BOUNDS_TEST = 1 << 3, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_MULTIDRAWINDIRECT = 1 << 4, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_MULTIDRAWINDIRECT_COUNTINDIRECT = 1 << 5, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_CROSSFIRE_API = 1 << 6, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_INTRINSIC_READFIRSTLANE = 1 << 7, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_INTRINSIC_READLANE = 1 << 8, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_INTRINSIC_LANEID = 1 << 9, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_INTRINSIC_SWIZZLE = 1 << 10, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_INTRINSIC_BALLOT = 1 << 11, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_INTRINSIC_MBCOUNT = 1 << 12, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_INTRINSIC_MED3 = 1 << 13, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_INTRINSIC_BARYCENTRICS = 1 << 14, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_INTRINSIC_WAVE_REDUCE = 1 << 15, ///< Supported in Radeon Software Version 17.9.1 onwards. - AGS_DX11_EXTENSION_INTRINSIC_WAVE_SCAN = 1 << 16, ///< Supported in Radeon Software Version 17.9.1 onwards. - AGS_DX11_EXTENSION_CREATE_SHADER_CONTROLS = 1 << 17, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX11_EXTENSION_MULTIVIEW = 1 << 18, ///< Supported in Radeon Software Version 16.12.1 onwards. - AGS_DX11_EXTENSION_APP_REGISTRATION = 1 << 19, ///< Supported in Radeon Software Version 17.9.1 onwards. - AGS_DX11_EXTENSION_BREADCRUMB_MARKERS = 1 << 20, ///< Supported in Radeon Software Version 17.11.1 onwards. - AGS_DX11_EXTENSION_MDI_DEFERRED_CONTEXTS = 1 << 21, ///< Supported in Radeon Software Version XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX onwards. - AGS_DX11_EXTENSION_UAV_OVERLAP_DEFERRED_CONTEXTS = 1 << 22, ///< Supported in Radeon Software Version XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX onwards. - AGS_DX11_EXTENSION_DEPTH_BOUNDS_DEFERRED_CONTEXTS = 1 << 23 ///< Supported in Radeon Software Version XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX onwards. -}; - -/// The DirectX12 extension support bits -enum AGSDriverExtensionDX12 -{ - AGS_DX12_EXTENSION_INTRINSIC_READFIRSTLANE = 1 << 0, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX12_EXTENSION_INTRINSIC_READLANE = 1 << 1, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX12_EXTENSION_INTRINSIC_LANEID = 1 << 2, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX12_EXTENSION_INTRINSIC_SWIZZLE = 1 << 3, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX12_EXTENSION_INTRINSIC_BALLOT = 1 << 4, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX12_EXTENSION_INTRINSIC_MBCOUNT = 1 << 5, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX12_EXTENSION_INTRINSIC_MED3 = 1 << 6, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX12_EXTENSION_INTRINSIC_BARYCENTRICS = 1 << 7, ///< Supported in Radeon Software Version 16.9.2 onwards. - AGS_DX12_EXTENSION_INTRINSIC_WAVE_REDUCE = 1 << 8, ///< Supported in Radeon Software Version 17.9.1 onwards. - AGS_DX12_EXTENSION_INTRINSIC_WAVE_SCAN = 1 << 9, ///< Supported in Radeon Software Version 17.9.1 onwards. - AGS_DX12_EXTENSION_USER_MARKERS = 1 << 10, ///< Supported in Radeon Software Version 17.9.1 onwards. - AGS_DX12_EXTENSION_APP_REGISTRATION = 1 << 11 ///< Supported in Radeon Software Version 17.9.1 onwards. -}; - -/// The space id for DirectX12 intrinsic support -const unsigned int AGS_DX12_SHADER_INSTRINSICS_SPACE_ID = 0x7FFF0ADE; // 2147420894 - - -/// Additional topologies supported via extensions -enum AGSPrimitiveTopology -{ - AGS_PRIMITIVE_TOPOLOGY_QUADLIST = 7, ///< Quad list - AGS_PRIMITIVE_TOPOLOGY_SCREENRECTLIST = 9 ///< Screen rect list -}; - -/// The display flags describing various properties of the display. -enum AGSDisplayFlags -{ - AGS_DISPLAYFLAG_PRIMARY_DISPLAY = 1 << 0, ///< Whether this display is marked as the primary display. Not set on the WACK version. - AGS_DISPLAYFLAG_HDR10 = 1 << 1, ///< HDR10 is supported on this display - AGS_DISPLAYFLAG_DOLBYVISION = 1 << 2, ///< Dolby Vision is supported on this display - AGS_DISPLAYFLAG_FREESYNC = 1 << 3, ///< Freesync is supported on this display - AGS_DISPLAYFLAG_FREESYNC_2 = 1 << 4, ///< Freesync 2 is supported on this display - AGS_DISPLAYFLAG_EYEFINITY_IN_GROUP = 1 << 5, ///< The display is part of the Eyefinity group - AGS_DISPLAYFLAG_EYEFINITY_PREFERRED_DISPLAY = 1 << 6, ///< The display is the preferred display in the Eyefinity group for displaying the UI - AGS_DISPLAYFLAG_EYEFINITY_IN_PORTRAIT_MODE = 1 << 7 ///< The display is in the Eyefinity group but in portrait mode -}; - -/// The display settings flags. -enum AGSDisplaySettingsFlags -{ - AGS_DISPLAYSETTINGSFLAG_DISABLE_LOCAL_DIMMING = 1 << 0, ///< Disables local dimming if possible -}; - -struct AGSContext; ///< All function calls in AGS require a pointer to a context. This is generated via \ref agsInit - -/// The rectangle struct used by AGS. -struct AGSRect -{ - int offsetX; ///< Offset on X axis - int offsetY; ///< Offset on Y axis - int width; ///< Width of rectangle - int height; ///< Height of rectangle -}; - -/// The clip rectangle struct used by \ref agsDriverExtensionsDX11_SetClipRects -struct AGSClipRect -{ - /// The inclusion mode for the rect - enum Mode - { - ClipRectIncluded = 0, ///< Include the rect - ClipRectExcluded = 1 ///< Exclude the rect - }; - - Mode mode; ///< Include/exclude rect region - AGSRect rect; ///< The rect to include/exclude -}; - -/// The display info struct used to describe a display enumerated by AGS -struct AGSDisplayInfo -{ - char name[ 256 ]; ///< The name of the display - char displayDeviceName[ 32 ]; ///< The display device name, i.e. DISPLAY_DEVICE::DeviceName - - unsigned int displayFlags; ///< Bitfield of ::AGSDisplayFlags - - int maxResolutionX; ///< The maximum supported resolution of the unrotated display - int maxResolutionY; ///< The maximum supported resolution of the unrotated display - float maxRefreshRate; ///< The maximum supported refresh rate of the display - - AGSRect currentResolution; ///< The current resolution and position in the desktop, ignoring Eyefinity bezel compensation - AGSRect visibleResolution; ///< The visible resolution and position. When Eyefinity bezel compensation is enabled this will - ///< be the sub region in the Eyefinity single large surface (SLS) - float currentRefreshRate; ///< The current refresh rate - - int eyefinityGridCoordX; ///< The X coordinate in the Eyefinity grid. -1 if not in an Eyefinity group - int eyefinityGridCoordY; ///< The Y coordinate in the Eyefinity grid. -1 if not in an Eyefinity group - - double chromaticityRedX; ///< Red display primary X coord - double chromaticityRedY; ///< Red display primary Y coord - - double chromaticityGreenX; ///< Green display primary X coord - double chromaticityGreenY; ///< Green display primary Y coord - - double chromaticityBlueX; ///< Blue display primary X coord - double chromaticityBlueY; ///< Blue display primary Y coord - - double chromaticityWhitePointX; ///< White point X coord - double chromaticityWhitePointY; ///< White point Y coord - - double screenDiffuseReflectance; ///< Percentage expressed between 0 - 1 - double screenSpecularReflectance; ///< Percentage expressed between 0 - 1 - - double minLuminance; ///< The minimum luminance of the display in nits - double maxLuminance; ///< The maximum luminance of the display in nits - double avgLuminance; ///< The average luminance of the display in nits - - int logicalDisplayIndex; ///< The internally used index of this display - int adlAdapterIndex; ///< The internally used ADL adapter index -}; - -/// The device info struct used to describe a physical GPU enumerated by AGS -struct AGSDeviceInfo -{ - /// The architecture version - enum ArchitectureVersion - { - ArchitectureVersion_Unknown, ///< Unknown architecture, potentially from another IHV. Check \ref AGSDeviceInfo::vendorId - ArchitectureVersion_PreGCN, ///< AMD architecture, pre-GCN - ArchitectureVersion_GCN ///< AMD GCN architecture - }; - - const char* adapterString; ///< The adapter name string - ArchitectureVersion architectureVersion; ///< Set to Unknown if not AMD hardware - int vendorId; ///< The vendor id - int deviceId; ///< The device id - int revisionId; ///< The revision id - - int numCUs; ///< Number of compute units. Zero if not GCN onwards - int numROPs; ///< Number of ROPs - int coreClock; ///< Core clock speed at 100% power in MHz - int memoryClock; ///< Memory clock speed at 100% power in MHz - int memoryBandwidth; ///< Memory bandwidth in MB/s - float teraFlops; ///< Teraflops of GPU. Zero if not GCN onwards. Calculated from iCoreClock * iNumCUs * 64 Pixels/clk * 2 instructions/MAD - - int isPrimaryDevice; ///< Whether or not this is the primary adapter in the system. Not set on the WACK version. - long long localMemoryInBytes; ///< The size of local memory in bytes. 0 for non AMD hardware. - - int numDisplays; ///< The number of active displays found to be attached to this adapter. - AGSDisplayInfo* displays; ///< List of displays allocated by AGS to be numDisplays in length. - - int eyefinityEnabled; ///< Indicates if Eyefinity is active - int eyefinityGridWidth; ///< Contains width of the multi-monitor grid that makes up the Eyefinity Single Large Surface. - int eyefinityGridHeight; ///< Contains height of the multi-monitor grid that makes up the Eyefinity Single Large Surface. - int eyefinityResolutionX; ///< Contains width in pixels of the multi-monitor Single Large Surface. - int eyefinityResolutionY; ///< Contains height in pixels of the multi-monitor Single Large Surface. - int eyefinityBezelCompensated; ///< Indicates if bezel compensation is used for the current SLS display area. 1 if enabled, and 0 if disabled. - - int adlAdapterIndex; ///< Internally used index into the ADL list of adapters -}; - -/// \defgroup general General API functions -/// API for initialization, cleanup, HDR display modes and Crossfire GPU count -/// @{ - -typedef void* (__stdcall *AGS_ALLOC_CALLBACK)( size_t allocationSize ); ///< AGS user defined allocation prototype -typedef void (__stdcall *AGS_FREE_CALLBACK)( void* allocationPtr ); ///< AGS user defined free prototype - -/// The configuration options that can be passed in to \ref agsInit -struct AGSConfiguration -{ - AGS_ALLOC_CALLBACK allocCallback; ///< Optional memory allocation callback. If not supplied, malloc() is used - AGS_FREE_CALLBACK freeCallback; ///< Optional memory freeing callback. If not supplied, free() is used -}; - -/// The top level GPU information returned from \ref agsInit -struct AGSGPUInfo -{ - int agsVersionMajor; ///< Major field of Major.Minor.Patch AGS version number - int agsVersionMinor; ///< Minor field of Major.Minor.Patch AGS version number - int agsVersionPatch; ///< Patch field of Major.Minor.Patch AGS version number - int isWACKCompliant; ///< 1 if WACK compliant. - - const char* driverVersion; ///< The AMD driver package version - const char* radeonSoftwareVersion; ///< The Radeon Software Version - - int numDevices; ///< Number of GPUs in the system - AGSDeviceInfo* devices; ///< List of GPUs in the system -}; - -/// The struct to specify the display settings to the driver. -struct AGSDisplaySettings -{ - /// The display mode - enum Mode - { - Mode_SDR, ///< SDR mode - Mode_HDR10_PQ, ///< HDR10 PQ encoding, requiring a 1010102 UNORM swapchain and PQ encoding in the output shader. - Mode_HDR10_scRGB, ///< HDR10 scRGB, requiring an FP16 swapchain. Values of 1.0 == 80 nits, 125.0 == 10000 nits. - Mode_Freesync2_scRGB, ///< Freesync2 scRGB, requiring an FP16 swapchain. A value of 1.0 == 80 nits. - Mode_Freesync2_Gamma22, ///< Freesync2 Gamma 2.2, requiring a 1010102 UNORM swapchain. The output needs to be encoded to gamma 2.2. - Mode_DolbyVision ///< Dolby Vision, requiring an 8888 UNORM swapchain - }; - - Mode mode; ///< The display mode to set the display into - - double chromaticityRedX; ///< Red display primary X coord - double chromaticityRedY; ///< Red display primary Y coord - - double chromaticityGreenX; ///< Green display primary X coord - double chromaticityGreenY; ///< Green display primary Y coord - - double chromaticityBlueX; ///< Blue display primary X coord - double chromaticityBlueY; ///< Blue display primary Y coord - - double chromaticityWhitePointX; ///< White point X coord - double chromaticityWhitePointY; ///< White point Y coord - - double minLuminance; ///< The minimum scene luminance in nits - double maxLuminance; ///< The maximum scene luminance in nits - - double maxContentLightLevel; ///< The maximum content light level in nits (MaxCLL) - double maxFrameAverageLightLevel; ///< The maximum frame average light level in nits (MaxFALL) - - int flags; ///< Bitfield of ::AGSDisplaySettingsFlags -}; - - -/// The result returned from \ref agsCheckDriverVersion -enum AGSDriverVersionResult -{ - AGS_SOFTWAREVERSIONCHECK_OK, ///< The reported Radeon Software Version is newer or the same as the required version - AGS_SOFTWAREVERSIONCHECK_OLDER, ///< The reported Radeon Software Version is older than the required version - AGS_SOFTWAREVERSIONCHECK_UNDEFINED ///< The check could not determine as result. This could be because it is a private or custom driver or just invalid arguments. -}; - -/// -/// Helper function to check the installed software version against the required software version. -/// -/// \param [in] radeonSoftwareVersionReported The Radeon Software Version returned from \ref AGSGPUInfo::radeonSoftwareVersion. -/// \param [in] radeonSoftwareVersionRequired The Radeon Software Version to check against. This is specificed using \ref AGS_MAKE_VERSION. -/// \return The result of the check. -/// -AMD_AGS_API AGSDriverVersionResult agsCheckDriverVersion( const char* radeonSoftwareVersionReported, unsigned int radeonSoftwareVersionRequired ); - - -/// -/// Function used to initialize the AGS library. -/// Must be called prior to any of the subsequent AGS API calls. -/// Must be called prior to ID3D11Device or ID3D12Device creation. -/// \note This function will fail with \ref AGS_ERROR_LEGACY_DRIVER in Catalyst versions before 12.20. -/// \note It is good practice to check the AGS version returned from AGSGPUInfo against the version defined in the header in case a mismatch between the dll and header has occurred. -/// -/// \param [in, out] context Address of a pointer to a context. This function allocates a context on the heap which is then required for all subsequent API calls. -/// \param [in] config Optional pointer to a AGSConfiguration struct to override the default library configuration. -/// \param [out] gpuInfo Optional pointer to a AGSGPUInfo struct which will get filled in for all the GPUs in the system. -/// -AMD_AGS_API AGSReturnCode agsInit( AGSContext** context, const AGSConfiguration* config, AGSGPUInfo* gpuInfo ); - -/// -/// Function used to clean up the AGS library. -/// -/// \param [in] context Pointer to a context. This function will deallocate the context from the heap. -/// -AMD_AGS_API AGSReturnCode agsDeInit( AGSContext* context ); - -/// -/// Function used to set a specific display into HDR mode -/// \note Setting all of the values apart from color space and transfer function to zero will cause the display to use defaults. -/// \note Call this function after each mode change (switch to fullscreen, any change in swapchain etc). -/// \note HDR10 PQ mode requires a 1010102 swapchain. -/// \note HDR10 scRGB mode requires an FP16 swapchain. -/// \note Freesync2 scRGB mode requires an FP16 swapchain. -/// \note Dolby Vision requires a 8888 UNORM swapchain. -/// -/// \param [in] context Pointer to a context. This is generated by \ref agsInit -/// \param [in] deviceIndex The index of the device listed in \ref AGSGPUInfo::devices. -/// \param [in] displayIndex The index of the display listed in \ref AGSDeviceInfo::displays. -/// \param [in] settings Pointer to the display settings to use. -/// -AMD_AGS_API AGSReturnCode agsSetDisplayMode( AGSContext* context, int deviceIndex, int displayIndex, const AGSDisplaySettings* settings ); - -/// @} - -/// \defgroup dx12 DirectX12 Extensions -/// DirectX12 driver extensions -/// @{ - -/// \defgroup dx12init Device and device object creation and cleanup -/// It is now mandatory to call \ref agsDriverExtensionsDX12_CreateDevice when creating a device if the user wants to access any future DX12 AMD extensions. -/// The corresponding \ref agsDriverExtensionsDX12_DestroyDevice call must be called to release the device and free up the internal resources allocated by the create call. -/// @{ - -/// The struct to specify the DX12 device creation parameters -struct AGSDX12DeviceCreationParams -{ - IDXGIAdapter* pAdapter; ///< Pointer to the adapter to use when creating the device. This may be null. - IID iid; ///< The interface ID for the type of device to be created. - D3D_FEATURE_LEVEL FeatureLevel; ///< The minimum feature level to create the device with. -}; - -/// The struct to specify DX12 additional device creation parameters -struct AGSDX12ExtensionParams -{ - const WCHAR* pAppName; ///< Application name - const WCHAR* pEngineName; ///< Engine name - unsigned int appVersion; ///< Application version - unsigned int engineVersion; ///< Engine version -}; - -/// The struct to hold all the returned parameters from the device creation call -struct AGSDX12ReturnedParams -{ - ID3D12Device* pDevice; ///< The newly created device - unsigned int extensionsSupported; ///< Bit mask that \ref agsDriverExtensionsDX12_CreateDevice will fill in to indicate which extensions are supported. See \ref AGSDriverExtensionDX12 -}; - - -/// -/// Function used to create a D3D12 device with additional AMD-specific initialization parameters. -/// -/// When using the HLSL shader extensions please note: -/// * The shader compiler should not use the D3DCOMPILE_SKIP_OPTIMIZATION (/Od) option, otherwise it will not work. -/// * The shader compiler needs D3DCOMPILE_ENABLE_STRICTNESS (/Ges) enabled. -/// * The intrinsic instructions require a 5.1 shader model. -/// * The Root Signature will need to use an extra resource and sampler. These are not real resources/samplers, they are just used to encode the intrinsic instruction. -/// -/// \param [in] context Pointer to a context. This is generated by \ref agsInit -/// \param [in] creationParams Pointer to the struct to specify the existing DX12 device creation parameters. -/// \param [in] extensionParams Optional pointer to the struct to specify DX12 additional device creation parameters. -/// \param [out] returnedParams Pointer to struct to hold all the returned parameters from the call. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_CreateDevice( AGSContext* context, const AGSDX12DeviceCreationParams* creationParams, const AGSDX12ExtensionParams* extensionParams, AGSDX12ReturnedParams* returnedParams ); - -/// -/// Function to destroy the D3D12 device. -/// This call will also cleanup any AMD-specific driver extensions for D3D12. -/// -/// \param [in] context Pointer to a context. -/// \param [in] device Pointer to the D3D12 device. -/// \param [out] deviceReferences Optional pointer to an unsigned int that will be set to the value returned from device->Release(). -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_DestroyDevice( AGSContext* context, ID3D12Device* device, unsigned int* deviceReferences ); - -/// @} - -/// \defgroup dx12usermarkers User Markers -/// @{ - -/// -/// Function used to push an AMD user marker onto the command list. -/// This is only has an effect if AGS_DX12_EXTENSION_USER_MARKERS is present in the extensionsSupported bitfield of \ref agsDriverExtensionsDX12_CreateDevice -/// Supported in Radeon Software Version 17.9.1 onwards. -/// -/// \param [in] context Pointer to a context. -/// \param [in] commandList Pointer to the command list. -/// \param [in] data The marker string. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_PushMarker( AGSContext* context, ID3D12GraphicsCommandList* commandList, const char* data ); - -/// -/// Function used to pop an AMD user marker on the command list. -/// Supported in Radeon Software Version 17.9.1 onwards. -/// -/// \param [in] context Pointer to a context. -/// \param [in] commandList Pointer to the command list. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_PopMarker( AGSContext* context, ID3D12GraphicsCommandList* commandList ); - -/// -/// Function used to insert an single event AMD user marker onto the command list. -/// Supported in Radeon Software Version 17.9.1 onwards. -/// -/// \param [in] context Pointer to a context. -/// \param [in] commandList Pointer to the command list. -/// \param [in] data The marker string. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX12_SetMarker( AGSContext* context, ID3D12GraphicsCommandList* commandList, const char* data ); - -/// @} - -/// @} - -/// \defgroup dx11 DirectX11 Extensions -/// DirectX11 driver extensions -/// @{ - -/// \defgroup dx11init Device creation and cleanup -/// It is now mandatory to call \ref agsDriverExtensionsDX11_CreateDevice when creating a device if the user wants to access any DX11 AMD extensions. -/// The corresponding \ref agsDriverExtensionsDX11_DestroyDevice call must be called to release the device and free up the internal resources allocated by the create call. -/// @{ - -/// The different modes to control Crossfire behavior. -enum AGSCrossfireMode -{ - AGS_CROSSFIRE_MODE_DRIVER_AFR = 0, ///< Use the default driver-based AFR rendering. If this mode is specified, do NOT use the agsDriverExtensionsDX11_Create*() APIs to create resources - AGS_CROSSFIRE_MODE_EXPLICIT_AFR, ///< Use the AGS Crossfire API functions to perform explicit AFR rendering without requiring a CF driver profile - AGS_CROSSFIRE_MODE_DISABLE ///< Completely disable AFR rendering -}; - -/// The struct to specify the existing DX11 device creation parameters -struct AGSDX11DeviceCreationParams -{ - IDXGIAdapter* pAdapter; ///< Consult the DX documentation on D3D11CreateDevice for this parameter - D3D_DRIVER_TYPE DriverType; ///< Consult the DX documentation on D3D11CreateDevice for this parameter - HMODULE Software; ///< Consult the DX documentation on D3D11CreateDevice for this parameter - UINT Flags; ///< Consult the DX documentation on D3D11CreateDevice for this parameter - const D3D_FEATURE_LEVEL* pFeatureLevels; ///< Consult the DX documentation on D3D11CreateDevice for this parameter - UINT FeatureLevels; ///< Consult the DX documentation on D3D11CreateDevice for this parameter - UINT SDKVersion; ///< Consult the DX documentation on D3D11CreateDevice for this parameter - const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc; ///< Optional swapchain description. Specify this to invoke D3D11CreateDeviceAndSwapChain instead of D3D11CreateDevice. This must be null on the WACK compliant version -}; - -/// The struct to specify DX11 additional device creation parameters -struct AGSDX11ExtensionParams -{ - const WCHAR* pAppName; ///< Application name - const WCHAR* pEngineName; ///< Engine name - unsigned int appVersion; ///< Application version - unsigned int engineVersion; ///< Engine version - unsigned int numBreadcrumbMarkers; ///< The number of breadcrumb markers to allocate. Each marker is a uint64 (ie 8 bytes). If 0, the system is disabled. - unsigned int uavSlot; ///< The UAV slot reserved for intrinsic support. This must match the slot defined in the HLSL, i.e. "#define AmdDxExtShaderIntrinsicsUAVSlot". - /// The default slot is 7, but the caller is free to use an alternative slot. - /// If 0 is specified, then the default of 7 will be used. - AGSCrossfireMode crossfireMode; ///< Desired Crossfire mode -}; - -/// The struct to hold all the returned parameters from the device creation call -struct AGSDX11ReturnedParams -{ - ID3D11Device* pDevice; ///< The newly created device - ID3D11DeviceContext* pImmediateContext; ///< The newly created immediate device context - IDXGISwapChain* pSwapChain; ///< The newly created swap chain. This is only created if a valid pSwapChainDesc is supplied in AGSDX11DeviceCreationParams. This is not supported on the WACK compliant version - D3D_FEATURE_LEVEL FeatureLevel; ///< The feature level supported by the newly created device - unsigned int extensionsSupported; ///< Bit mask that \ref agsDriverExtensionsDX11_CreateDevice will fill in to indicate which extensions are supported. See \ref AGSDriverExtensionDX11 - unsigned int crossfireGPUCount; ///< The number of GPUs that are active for this app - void* breadcrumbBuffer; ///< The CPU buffer returned if the initialization of the breadcrumb was successful. -}; - -/// -/// Function used to create a D3D11 device with additional AMD-specific initialization parameters. -/// -/// When using the HLSL shader extensions please note: -/// * The shader compiler should not use the D3DCOMPILE_SKIP_OPTIMIZATION (/Od) option, otherwise it will not work. -/// * The shader compiler needs D3DCOMPILE_ENABLE_STRICTNESS (/Ges) enabled. -/// -/// \param [in] context Pointer to a context. This is generated by \ref agsInit -/// \param [in] creationParams Pointer to the struct to specify the existing DX11 device creation parameters. -/// \param [in] extensionParams Optional pointer to the struct to specify DX11 additional device creation parameters. -/// \param [out] returnedParams Pointer to struct to hold all the returned parameters from the call. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateDevice( AGSContext* context, const AGSDX11DeviceCreationParams* creationParams, const AGSDX11ExtensionParams* extensionParams, AGSDX11ReturnedParams* returnedParams ); - -/// -/// Function to destroy the D3D11 device and its immediate context. -/// This call will also cleanup any AMD-specific driver extensions for D3D11. -/// -/// \param [in] context Pointer to a context. -/// \param [in] device Pointer to the D3D11 device. -/// \param [out] deviceReferences Optional pointer to an unsigned int that will be set to the value returned from device->Release(). -/// \param [in] immediateContext Pointer to the D3D11 immediate device context. -/// \param [out] immediateContextReferences Optional pointer to an unsigned int that will be set to the value returned from immediateContext->Release(). -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_DestroyDevice( AGSContext* context, ID3D11Device* device, unsigned int* deviceReferences, ID3D11DeviceContext* immediateContext, unsigned int* immediateContextReferences ); - -/// @} - - -/// \defgroup dx11appreg App Registration -/// @{ -/// This extension allows an apllication to voluntarily register itself with the driver, providing a more robust app detection solution and avoid the issue of the driver -/// relying on exe names to match the app to a driver profile. -/// This feature is supported in Radeon Software Version 17.9.2 onwards. -/// Rules: -/// * AppName or EngineName must be set, but both are not required. Engine profiles will be used only if app specific profiles do not exist. -/// * In an engine, the EngineName should be set, so a default profile can be built. If an app modifies the engine, the AppName should be set, to allow a profile for the specific app. -/// * Version number is not mandatory, but heavily suggested. The use of which can prevent the use of profiles for incompatible versions (for instance engine versions that introduce or change features), and can help prevent older profiles from being used (and introducing new bugs) before the profile is tested with new app builds. -/// * If Version numbers are used and a new version is introduced, a new profile will not be enabled until an AMD engineer has been able to update a previous profile, or make a new one. -/// -/// The cases for profile selection are as follows: -/// -/// |Case|Profile Applied| -/// |----|---------------| -/// | App or Engine Version has profile | The profile is used. | -/// | App or Engine Version num < profile version num | The closest profile > the version number is used. | -/// | App or Engine Version num > profile version num | No profile selected/The previous method is used. | -/// | App and Engine Version have profile | The App's profile is used. | -/// | App and Engine Version num < profile version | The closest App profile > the version number is used. | -/// | App and Engine Version, no App profile found | The Engine profile will be used. | -/// | App/Engine name but no Version, has profile | The latest profile is used. | -/// | No name or version, or no profile | The previous app detection method is used. | -/// -/// As shown above, if an App name is given, and a profile is found for that app, that will be prioritized. The Engine name and profile will be used only if no app name is given, or no viable profile is found for the app name. -/// In the case that App nor Engine have a profile, the previous app detection methods will be used. If given a version number that is larger than any profile version number, no profile will be selected. -/// This is specifically to prevent cases where an update to an engine or app will cause catastrophic breaks in the profile, allowing an engineer to test the profile before clearing it for public use with the new engine/app update. -/// -/// @} - -/// \defgroup breadcrumbs Breadcrumb API -/// API for writing top-of-pipe and bottom-of-pipe markers to help track down GPU hangs. -/// -/// The API is available if the \ref AGS_DX11_EXTENSION_BREADCRUMB_MARKERS is present in \ref AGSDX11ReturnedParams::extensionsSupported. -/// -/// To use the API, a non zero value needs to be specificed in \ref AGSDX11ExtensionParams::numBreadcrumbMarkers. This enables the API (if available) and allocates a system memory buffer -/// which is returned to the user in \ref AGSDX11ReturnedParams::breadcrumbBuffer. -/// -/// The user can now write markers before and after draw calls using \ref agsDriverExtensionsDX11_WriteBreadcrumb. -/// -/// \section background Background -/// -/// A top-of-pipe (TOP) command is scheduled for execution as soon as the command processor (CP) reaches the command. -/// A bottom-of-pipe (BOP) command is scheduled for execution once the previous rendering commands (draw and dispatch) finish execution. -/// TOP and BOP commands do not block CP. i.e. the CP schedules the command for execution then proceeds to the next command without waiting. -/// To effectively use TOP and BOP commands, it is important to understand how they interact with rendering commands: -/// -/// When the CP encounters a rendering command it queues it for execution and moves to the next command. The queued rendering commands are issued in order. -/// There can be multiple rendering commands running in parallel. When a rendering command is issued we say it is at the top of the pipe. When a rendering command -/// finishes execution we say it has reached the bottom of the pipe. -/// -/// A BOP command remains in a waiting queue and is executed once prior rendering commands finish. The queue of BOP commands is limited to 64 entries in GCN generation 1, 2, 3, 4 and 5. -/// If the 64 limit is reached the CP will stop queueing BOP commands and also rendering commands. Developers should limit the number of BOP commands that write markers to avoid contention. -/// In general, developers should limit both TOP and BOP commands to avoid stalling the CP. -/// -/// \subsection eg1 Example 1: -/// -/// \code{.cpp} -/// // Start of a command buffer -/// WriteMarker(TopOfPipe, 1) -/// WriteMarker(BottomOfPipe, 2) -/// WriteMarker(BottomOfPipe, 3) -/// DrawX -/// WriteMarker(BottomOfPipe, 4) -/// WriteMarker(BottomOfPipe, 5) -/// WriteMarker(TopOfPipe, 6) -/// // End of command buffer -/// \endcode -/// -/// In the above example, the CP writes markers 1, 2 and 3 without waiting: -/// Marker 1 is TOP so it's independent from other commands -/// There's no wait for marker 2 and 3 because there are no draws preceding the BOP commands -/// Marker 4 is only written once DrawX finishes execution -/// Marker 5 doesn't wait for additional draws so it is written right after marker 4 -/// Marker 6 can be written as soon as the CP reaches the command. For instance, it is very possible that CP writes marker 6 while DrawX -/// is running and therefore marker 6 gets written before markers 4 and 5 -/// -/// \subsection eg2 Example 2: -/// -/// \code{.cpp} -/// WriteMarker(TopOfPipe, 1) -/// DrawX -/// WriteMarker(BottomOfPipe, 2) -/// WriteMarker(TopOfPipe, 3) -/// DrawY -/// WriteMarker(BottomOfPipe, 4) -/// \endcode -/// -/// In this example marker 1 is written before the start of DrawX -/// Marker 2 is written once DrawX finishes execution -/// Similarly marker 3 is written before the start of DrawY -/// Marker 4 is written once DrawY finishes execution -/// In case of a GPU hang, if markers 1 and 3 are written but markers 2 and 4 are missing we can conclude that: -/// The CP has reached both DrawX and DrawY commands since marker 1 and 3 are present -/// The fact that marker 2 and 4 are missing means that either DrawX is hanging while DrawY is at the top of the pipe or both DrawX and DrawY -/// started and both are simultaneously hanging -/// -/// \subsection eg3 Example 3: -/// -/// \code{.cpp} -/// // Start of a command buffer -/// WriteMarker(BottomOfPipe, 1) -/// DrawX -/// WriteMarker(BottomOfPipe, 2) -/// DrawY -/// WriteMarker(BottomOfPipe, 3) -/// DrawZ -/// WriteMarker(BottomOfPipe, 4) -/// // End of command buffer -/// \endcode -/// -/// In this example marker 1 is written before the start of DrawX -/// Marker 2 is written once DrawX finishes -/// Marker 3 is written once DrawY finishes -/// Marker 4 is written once DrawZ finishes -/// If the GPU hangs and only marker 1 is written we can conclude that the hang is happening in either DrawX, DrawY or DrawZ -/// If the GPU hangs and only marker 1 and 2 are written we can conclude that the hang is happening in DrawY or DrawZ -/// If the GPU hangs and only marker 4 is missing we can conclude that the hang is happening in DrawZ -/// -/// \subsection eg4 Example 4: -/// -/// \code{.cpp} -/// Start of a command buffer -/// WriteMarker(TopOfPipe, 1) -/// DrawX -/// WriteMarker(TopOfPipe, 2) -/// DrawY -/// WriteMarker(TopOfPipe, 3) -/// DrawZ -/// // End of command buffer -/// \endcode -/// -/// In this example, in case the GPU hangs and only marker 1 is written we can conclude that the hang is happening in DrawX -/// In case the GPU hangs and only marker 1 and 2 are written we can conclude that the hang is happening in DrawX or DrawY -/// In case the GPU hangs and all 3 markers are written we can conclude that the hang is happening in any of DrawX, DrawY or DrawZ -/// -/// \subsection eg5 Example 5: -/// -/// \code{.cpp} -/// DrawX -/// WriteMarker(TopOfPipe, 1) -/// WriteMarker(BottomOfPipe, 2) -/// DrawY -/// WriteMarker(TopOfPipe, 3) -/// WriteMarker(BottomOfPipe, 4) -/// \endcode -/// -/// Marker 1 is written right after DrawX is queued for execution. -/// Marker 2 is only written once DrawX finishes execution. -/// Marker 3 is written right after DrawY is queued for execution. -/// Marker 4 is only written once DrawY finishes execution -/// If marker 1 is written we would know that the CP has reached the command DrawX (DrawX at the top of the pipe). -/// If marker 2 is written we can say that DrawX has finished execution (DrawX at the bottom of the pipe). -/// In case the GPU hangs and only marker 1 and 3 are written we can conclude that the hang is happening in DrawX or DrawY -/// In case the GPU hangs and only marker 1 is written we can conclude that the hang is happening in DrawX -/// In case the GPU hangs and only marker 4 is missing we can conclude that the hang is happening in DrawY -/// -/// \section data Retrieving GPU Data -/// -/// In the event of a GPU hang, the user can inspect the system memory buffer to determine which draw has caused the hang. -/// For example: -/// \code{.cpp} -/// // Force the work to be flushed to prevent CPU ahead of GPU -/// g_pImmediateContext->Flush(); -/// -/// // Present the information rendered to the back buffer to the front buffer (the screen) -/// HRESULT hr = g_pSwapChain->Present( 0, 0 ); -/// -/// // Read the marker data buffer once detect device lost -/// if ( hr != S_OK ) -/// { -/// for (UINT i = 0; i < g_NumMarkerWritten; i++) -/// { -/// UINT64* pTempData; -/// pTempData = static_cast(pMarkerBuffer); -/// -/// // Write the marker data to file -/// ofs << i << "\r\n"; -/// ofs << std::hex << *(pTempData + i * 2) << "\r\n"; -/// ofs << std::hex << *(pTempData + (i * 2 + 1)) << "\r\n"; -/// -/// WCHAR s1[256]; -/// setlocale(LC_NUMERIC, "en_US.iso88591"); -/// -/// // Output the marker data to console -/// swprintf(s1, 256, L" The Draw count is %d; The Top maker is % 016llX and the Bottom marker is % 016llX \r\n", i, *(pTempData + i * 2), *(pTempData + (i * 2 + 1))); -/// -/// OutputDebugStringW(s1); -/// } -/// } -/// \endcode -/// -/// The console output would resemble something like: -/// \code{.cpp} -/// D3D11: Removing Device. -/// D3D11 ERROR: ID3D11Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). [ EXECUTION ERROR #378: DEVICE_REMOVAL_PROCESS_AT_FAULT] -/// The Draw count is 0; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF -/// The Draw count is 1; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF -/// The Draw count is 2; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF -/// The Draw count is 3; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF -/// The Draw count is 4; The Top maker is 00000000DEADCAFE and the Bottom marker is 00000000DEADBEEF -/// The Draw count is 5; The Top maker is CDCDCDCDCDCDCDCD and the Bottom marker is CDCDCDCDCDCDCDCD -/// The Draw count is 6; The Top maker is CDCDCDCDCDCDCDCD and the Bottom marker is CDCDCDCDCDCDCDCD -/// The Draw count is 7; The Top maker is CDCDCDCDCDCDCDCD and the Bottom marker is CDCDCDCDCDCDCDCD -/// \endcode -/// -/// @{ - -/// The breadcrumb marker struct used by \ref agsDriverExtensionsDX11_WriteBreadcrumb -struct AGSBreadcrumbMarker -{ - /// The marker type - enum Type - { - TopOfPipe = 0, ///< Top-of-pipe marker - BottomOfPipe = 1 ///< Bottom-of-pipe marker - }; - - unsigned long long markerData; ///< The user data to write. - Type type; ///< Whether this marker is top or bottom of pipe. - unsigned int index; ///< The index of the marker. This should be less than the value specified in \ref AGSDX11ExtensionParams::numBreadcrumbMarkers -}; - -/// -/// Function to write a breadcrumb marker. -/// -/// This method inserts a write marker operation in the GPU command stream. In the case where the GPU is hanging the write -/// command will never be reached and the marker will never get written to memory. -/// -/// In order to use this function, \ref AGSDX11ExtensionParams::numBreadcrumbMarkers must be set to a non zero value. -/// -/// \param [in] context Pointer to a context. -/// \param [in] marker Pointer to a marker. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_WriteBreadcrumb( AGSContext* context, const AGSBreadcrumbMarker* marker ); - -/// @} - -/// \defgroup dx11Topology Extended Topology -/// API for primitive topologies -/// @{ - -/// -/// Function used to set the primitive topology. If you are using any of the extended topology types, then this function should -/// be called to set ALL topology types. -/// -/// The Quad List extension is a convenient way to submit quads without using an index buffer. Note that this still submits two triangles at the driver level. -/// In order to use this function, AGS must already be initialized and agsDriverExtensionsDX11_Init must have been called successfully. -/// -/// The Screen Rect extension, which is only available on GCN hardware, allows the user to pass in three of the four corners of a rectangle. -/// The hardware then uses the bounding box of the vertices to rasterize the rectangle primitive (i.e. as a rectangle rather than two triangles). -/// \note Note that this will not return valid interpolated values, only valid SV_Position values. -/// \note If either the Quad List or Screen Rect extension are used, then agsDriverExtensionsDX11_IASetPrimitiveTopology should be called in place of the native DirectX11 equivalent all the time. -/// -/// \param [in] context Pointer to a context. -/// \param [in] topology The topology to set on the D3D11 device. This can be either an AGS-defined topology such as AGS_PRIMITIVE_TOPOLOGY_QUADLIST -/// or a standard D3D-defined topology such as D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP. -/// NB. the AGS-defined types will require casting to a D3D_PRIMITIVE_TOPOLOGY type. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_IASetPrimitiveTopology( AGSContext* context, enum D3D_PRIMITIVE_TOPOLOGY topology ); - -/// @} - -/// \defgroup dx11UAVOverlap UAV Overlap -/// API for enabling overlapping UAV writes -/// @{ - -/// -/// Function used indicate to the driver that it doesn't need to sync the UAVs bound for the subsequent set of back-to-back dispatches. -/// When calling back-to-back draw calls or dispatch calls that write to the same UAV, the AMD DX11 driver will automatically insert a barrier to ensure there are no write after write (WAW) hazards. -/// If the app can guarantee there is no overlap between the writes between these calls, then this extension will remove those barriers allowing the work to run in parallel on the GPU. -/// -/// Usage would be as follows: -/// \code{.cpp} -/// m_device->Dispatch( ... ); // First call that writes to the UAV -/// -/// // Disable automatic WAW syncs -/// agsDriverExtensionsDX11_BeginUAVOverlap( m_agsContext ); -/// -/// // Submit other dispatches that write to the same UAV concurrently -/// m_device->Dispatch( ... ); -/// m_device->Dispatch( ... ); -/// m_device->Dispatch( ... ); -/// -/// // Reenable automatic WAW syncs -/// agsDriverExtensionsDX11_EndUAVOverlap( m_agsContext ); -/// \endcode -/// -/// \param [in] context Pointer to a context. -/// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed. -/// with the AGS_DX11_EXTENSION_DEFERRED_CONTEXTS bit. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_BeginUAVOverlap( AGSContext* context, ID3D11DeviceContext* dxContext ); - -/// -/// Function used indicate to the driver it can no longer overlap the batch of back-to-back dispatches that has been submitted. -/// -/// \param [in] context Pointer to a context. -/// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed. -/// with the AGS_DX11_EXTENSION_DEFERRED_CONTEXTS bit. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_EndUAVOverlap( AGSContext* context, ID3D11DeviceContext* dxContext ); - -/// @} - -/// \defgroup dx11DepthBoundsTest Depth Bounds Test -/// API for enabling depth bounds testing -/// @{ - -/// -/// Function used to set the depth bounds test extension -/// -/// \param [in] context Pointer to a context -/// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed. -/// \param [in] enabled Whether to enable or disable the depth bounds testing. If disabled, the next two args are ignored. -/// \param [in] minDepth The near depth range to clip against. -/// \param [in] maxDepth The far depth range to clip against. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetDepthBounds( AGSContext* context, ID3D11DeviceContext* dxContext, bool enabled, float minDepth, float maxDepth ); - -/// @} - -/// \defgroup mdi Multi Draw Indirect (MDI) -/// API for dispatching multiple instanced draw commands. -/// The multi draw indirect extensions allow multiple sets of DrawInstancedIndirect to be submitted in one API call. -/// The draw calls are issued on the GPU's command processor (CP), potentially saving the significant CPU overheads incurred by submitting the equivalent draw calls on the CPU. -/// -/// The extension allows the following code: -/// \code{.cpp} -/// // Submit n batches of DrawIndirect calls -/// for ( int i = 0; i < n; i++ ) -/// deviceContext->DrawIndexedInstancedIndirect( buffer, i * sizeof( cmd ) ); -/// \endcode -/// To be replaced by the following call: -/// \code{.cpp} -/// // Submit all n batches in one call -/// agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect( m_agsContext, deviceContext, n, buffer, 0, sizeof( cmd ) ); -/// \endcode -/// -/// The buffer used for the indirect args must be of the following formats: -/// \code{.cpp} -/// // Buffer layout for agsDriverExtensions_MultiDrawInstancedIndirect -/// struct DrawInstancedIndirectArgs -/// { -/// UINT VertexCountPerInstance; -/// UINT InstanceCount; -/// UINT StartVertexLocation; -/// UINT StartInstanceLocation; -/// }; -/// -/// // Buffer layout for agsDriverExtensions_MultiDrawIndexedInstancedIndirect -/// struct DrawIndexedInstancedIndirectArgs -/// { -/// UINT IndexCountPerInstance; -/// UINT InstanceCount; -/// UINT StartIndexLocation; -/// UINT BaseVertexLocation; -/// UINT StartInstanceLocation; -/// }; -/// \endcode -/// -/// Example usage can be seen in AMD's GeometryFX (https://github.com/GPUOpen-Effects/GeometryFX). In particular, in this file: https://github.com/GPUOpen-Effects/GeometryFX/blob/master/amd_geometryfx/src/AMD_GeometryFX_Filtering.cpp -/// -/// @{ - -/// -/// Function used to submit a batch of draws via MultiDrawIndirect -/// -/// \param [in] context Pointer to a context. -/// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed. -/// \param [in] drawCount The number of draws. -/// \param [in] pBufferForArgs The args buffer. -/// \param [in] alignedByteOffsetForArgs The offset into the args buffer. -/// \param [in] byteStrideForArgs The per element stride of the args buffer. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawInstancedIndirect( AGSContext* context, ID3D11DeviceContext* dxContext, unsigned int drawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs ); - -/// -/// Function used to submit a batch of draws via MultiDrawIndirect -/// -/// \param [in] context Pointer to a context. -/// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed. -/// \param [in] drawCount The number of draws. -/// \param [in] pBufferForArgs The args buffer. -/// \param [in] alignedByteOffsetForArgs The offset into the args buffer. -/// \param [in] byteStrideForArgs The per element stride of the args buffer. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirect( AGSContext* context, ID3D11DeviceContext* dxContext, unsigned int drawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs ); - -/// -/// Function used to submit a batch of draws via MultiDrawIndirect -/// -/// \param [in] context Pointer to a context. -/// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed. -/// \param [in] pBufferForDrawCount The draw count buffer. -/// \param [in] alignedByteOffsetForDrawCount The offset into the draw count buffer. -/// \param [in] pBufferForArgs The args buffer. -/// \param [in] alignedByteOffsetForArgs The offset into the args buffer. -/// \param [in] byteStrideForArgs The per element stride of the args buffer. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawInstancedIndirectCountIndirect( AGSContext* context, ID3D11DeviceContext* dxContext, ID3D11Buffer* pBufferForDrawCount, unsigned int alignedByteOffsetForDrawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs ); - -/// -/// Function used to submit a batch of draws via MultiDrawIndirect -/// -/// \param [in] context Pointer to a context. -/// \param [in] dxContext Pointer to the DirectX device context. If this is to work using the non-immediate context, then you need to check support. If nullptr is specified, then the immediate context is assumed. -/// \param [in] pBufferForDrawCount The draw count buffer. -/// \param [in] alignedByteOffsetForDrawCount The offset into the draw count buffer. -/// \param [in] pBufferForArgs The args buffer. -/// \param [in] alignedByteOffsetForArgs The offset into the args buffer. -/// \param [in] byteStrideForArgs The per element stride of the args buffer. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_MultiDrawIndexedInstancedIndirectCountIndirect( AGSContext* context, ID3D11DeviceContext* dxContext, ID3D11Buffer* pBufferForDrawCount, unsigned int alignedByteOffsetForDrawCount, ID3D11Buffer* pBufferForArgs, unsigned int alignedByteOffsetForArgs, unsigned int byteStrideForArgs ); - -/// @} - -/// \defgroup shadercompiler Shader Compiler Controls -/// API for controlling DirectX11 shader compilation. -/// Check support for this feature using the AGS_DX11_EXTENSION_CREATE_SHADER_CONTROLS bit. -/// Supported in Radeon Software Version 16.9.2 (driver version 16.40.2311) onwards. -/// @{ - -/// -/// This method can be used to limit the maximum number of threads the driver uses for asynchronous shader compilation. -/// Setting it to 0 will disable asynchronous compilation completely and force the shaders to be compiled "inline" on the threads that call Create*Shader. -/// -/// This method can only be called before any shaders are created and being compiled by the driver. -/// If this method is called after shaders have been created the function will return AGS_FAILURE. -/// This function only sets an upper limit.The driver may create fewer threads than allowed by this function. -/// -/// \param [in] context Pointer to a context. -/// \param [in] numberOfThreads The maximum number of threads to use. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetMaxAsyncCompileThreadCount( AGSContext* context, unsigned int numberOfThreads ); - -/// -/// This method can be used to determine the total number of asynchronous shader compile jobs that are either -/// queued for waiting for compilation or being compiled by the driver’s asynchronous compilation threads. -/// This method can be called at any during the lifetime of the driver. -/// -/// \param [in] context Pointer to a context. -/// \param [out] numberOfJobs Pointer to the number of jobs in flight currently. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NumPendingAsyncCompileJobs( AGSContext* context, unsigned int* numberOfJobs ); - -/// -/// This method can be used to enable or disable the disk based shader cache. -/// Enabling/disabling the disk cache is not supported if is it disabled explicitly via Radeon Settings or by an app profile. -/// Calling this method under these conditions will result in AGS_FAILURE being returned. -/// It is recommended that this method be called before any shaders are created by the application and being compiled by the driver. -/// Doing so at any other time may result in the cache being left in an inconsistent state. -/// -/// \param [in] context Pointer to a context. -/// \param [in] enable Whether to enable the disk cache. 0 to disable, 1 to enable. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetDiskShaderCacheEnabled( AGSContext* context, int enable ); - -/// @} - -/// \defgroup multiview Multiview -/// API for multiview broadcasting. -/// Check support for this feature using the AGS_DX11_EXTENSION_MULTIVIEW bit. -/// Supported in Radeon Software Version 16.12.1 (driver version 16.50.2001) onwards. -/// @{ - -/// -/// Function to control draw calls replication to multiple viewports and RT slices. -/// Setting any mask to 0 disables draw replication. -/// -/// \param [in] context Pointer to a context. -/// \param [in] vpMask Viewport control bit mask. -/// \param [in] rtSliceMask RT slice control bit mask. -/// \param [in] vpMaskPerRtSliceEnabled If 0, 16 lower bits of vpMask apply to all RT slices; if 1 each 16 bits of 64-bit mask apply to corresponding 4 RT slices. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetViewBroadcastMasks( AGSContext* context, unsigned long long vpMask, unsigned long long rtSliceMask, int vpMaskPerRtSliceEnabled ); - -/// -/// Function returns max number of supported clip rectangles. -/// -/// \param [in] context Pointer to a context. -/// \param [out] maxRectCount Returned max number of clip rectangles. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_GetMaxClipRects( AGSContext* context, unsigned int* maxRectCount ); - -/// -/// Function sets clip rectangles. -/// -/// \param [in] context Pointer to a context. -/// \param [in] clipRectCount Number of specified clip rectangles. Use 0 to disable clip rectangles. -/// \param [in] clipRects Array of clip rectangles. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetClipRects( AGSContext* context, unsigned int clipRectCount, const AGSClipRect* clipRects ); - -/// @} - -/// \defgroup cfxapi Explicit Crossfire API -/// API for explicit control over Crossfire -/// @{ - -/// The Crossfire API transfer types -enum AGSAfrTransferType -{ - AGS_AFR_TRANSFER_DEFAULT = 0, ///< Default Crossfire driver resource tracking - AGS_AFR_TRANSFER_DISABLE = 1, ///< Turn off driver resource tracking - AGS_AFR_TRANSFER_1STEP_P2P = 2, ///< App controlled GPU to next GPU transfer - AGS_AFR_TRANSFER_2STEP_NO_BROADCAST = 3, ///< App controlled GPU to next GPU transfer using intermediate system memory - AGS_AFR_TRANSFER_2STEP_WITH_BROADCAST = 4, ///< App controlled GPU to all render GPUs transfer using intermediate system memory -}; - -/// The Crossfire API transfer engines -enum AGSAfrTransferEngine -{ - AGS_AFR_TRANSFERENGINE_DEFAULT = 0, ///< Use default engine for Crossfire API transfers - AGS_AFR_TRANSFERENGINE_3D_ENGINE = 1, ///< Use 3D engine for Crossfire API transfers - AGS_AFR_TRANSFERENGINE_COPY_ENGINE = 2, ///< Use Copy engine for Crossfire API transfers -}; - -/// -/// Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine. -/// -/// \param [in] context Pointer to a context. -/// \param [in] desc Pointer to the D3D11 resource description. -/// \param [in] initialData Optional pointer to the initializing data for the resource. -/// \param [out] buffer Returned pointer to the resource. -/// \param [in] transferType The transfer behavior. -/// \param [in] transferEngine The transfer engine to use. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateBuffer( AGSContext* context, const D3D11_BUFFER_DESC* desc, const D3D11_SUBRESOURCE_DATA* initialData, ID3D11Buffer** buffer, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine ); - -/// -/// Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine. -/// -/// \param [in] context Pointer to a context. -/// \param [in] desc Pointer to the D3D11 resource description. -/// \param [in] initialData Optional pointer to the initializing data for the resource. -/// \param [out] texture1D Returned pointer to the resource. -/// \param [in] transferType The transfer behavior. -/// \param [in] transferEngine The transfer engine to use. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture1D( AGSContext* context, const D3D11_TEXTURE1D_DESC* desc, const D3D11_SUBRESOURCE_DATA* initialData, ID3D11Texture1D** texture1D, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine ); - -/// -/// Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine. -/// -/// \param [in] context Pointer to a context. -/// \param [in] desc Pointer to the D3D11 resource description. -/// \param [in] initialData Optional pointer to the initializing data for the resource. -/// \param [out] texture2D Returned pointer to the resource. -/// \param [in] transferType The transfer behavior. -/// \param [in] transferEngine The transfer engine to use. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture2D( AGSContext* context, const D3D11_TEXTURE2D_DESC* desc, const D3D11_SUBRESOURCE_DATA* initialData, ID3D11Texture2D** texture2D, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine ); - -/// -/// Function to create a Direct3D11 resource with the specified AFR transfer type and specified transfer engine. -/// -/// \param [in] context Pointer to a context. -/// \param [in] desc Pointer to the D3D11 resource description. -/// \param [in] initialData Optional pointer to the initializing data for the resource. -/// \param [out] texture3D Returned pointer to the resource. -/// \param [in] transferType The transfer behavior. -/// \param [in] transferEngine The transfer engine to use. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_CreateTexture3D( AGSContext* context, const D3D11_TEXTURE3D_DESC* desc, const D3D11_SUBRESOURCE_DATA* initialData, ID3D11Texture3D** texture3D, AGSAfrTransferType transferType, AGSAfrTransferEngine transferEngine ); - -/// -/// Function to notify the driver that we have finished writing to the resource this frame. -/// This will initiate a transfer for AGS_AFR_TRANSFER_1STEP_P2P, -/// AGS_AFR_TRANSFER_2STEP_NO_BROADCAST, and AGS_AFR_TRANSFER_2STEP_WITH_BROADCAST. -/// -/// \param [in] context Pointer to a context. -/// \param [in] resource Pointer to the resource. -/// \param [in] transferRegions An array of transfer regions (can be null to specify the whole area). -/// \param [in] subresourceArray An array of subresource indices (can be null to specify all subresources). -/// \param [in] numSubresources The number of subresources in subresourceArray OR number of transferRegions. Use 0 to specify ALL subresources and one transferRegion (which may be null if specifying the whole area). -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceEndWrites( AGSContext* context, ID3D11Resource* resource, const D3D11_RECT* transferRegions, const unsigned int* subresourceArray, unsigned int numSubresources ); - -/// -/// This will notify the driver that the app will begin read/write access to the resource. -/// -/// \param [in] context Pointer to a context. -/// \param [in] resource Pointer to the resource. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceBeginAllAccess( AGSContext* context, ID3D11Resource* resource ); - -/// -/// This is used for AGS_AFR_TRANSFER_1STEP_P2P to notify when it is safe to initiate a transfer. -/// This call in frame N-(NumGpus-1) allows a 1 step P2P in frame N to start. -/// This should be called after agsDriverExtensionsDX11_NotifyResourceEndWrites. -/// -/// \param [in] context Pointer to a context. -/// \param [in] resource Pointer to the resource. -/// -AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NotifyResourceEndAllAccess( AGSContext* context, ID3D11Resource* resource ); - -/// @} - -/// @} - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // AMD_AGS_H \ No newline at end of file diff --git a/Game/Resources_SoC_1.0006/gamedata/config/text/rus/ui_st_mm.xml b/Game/Resources_SoC_1.0006/gamedata/config/text/rus/ui_st_mm.xml index c2db1e7a8b..82232d8ce9 100644 --- a/Game/Resources_SoC_1.0006/gamedata/config/text/rus/ui_st_mm.xml +++ b/Game/Resources_SoC_1.0006/gamedata/config/text/rus/ui_st_mm.xml @@ -581,6 +581,9 @@ , + + ( ) + diff --git a/Game/Resources_SoC_1.0006/gamedata/config/ui/ui_mm_load_dlg.xml b/Game/Resources_SoC_1.0006/gamedata/config/ui/ui_mm_load_dlg.xml new file mode 100644 index 0000000000..2c6049b202 --- /dev/null +++ b/Game/Resources_SoC_1.0006/gamedata/config/ui/ui_mm_load_dlg.xml @@ -0,0 +1,78 @@ + + + + + ui\ui_mm_window_back_crop + + + <_back_video x="0" y="0" width="1024" height="512" stretch="1"> + ui\ui_vid_back_04 + + + + ui\ui_static_mm_back_04 + + + + ui\ui_mm_newspaper + + +
+ <_texture>ui\ui_options_menu_static + <_texture_offset x="-29" y="-19"/> + ui_menu_options_dlg + + + ui_mm_load_game + + + + ui\ui_noise + + + + <_texture>ui\ui_static_loadgameinfo + ui\ui_static_mm_back_04 + + + + + + + + + + + + ui_tablist_textbox + + + + + + + + ui_button_main01 + ui_mm_load_game + + + + + + + ui_button_main01 + ui_mm_delete + + + + + + + ui_button_main01 + ui_mm_cancel + + + + + +
diff --git a/Game/Resources_SoC_1.0006/gamedata/config/ui/ui_mm_opt.xml b/Game/Resources_SoC_1.0006/gamedata/config/ui/ui_mm_opt.xml index 647b4c52f4..2a46e12825 100644 --- a/Game/Resources_SoC_1.0006/gamedata/config/ui/ui_mm_opt.xml +++ b/Game/Resources_SoC_1.0006/gamedata/config/ui/ui_mm_opt.xml @@ -1,6 +1,6 @@ - + ui\ui_mm_window_back_crop @@ -30,7 +30,7 @@ - + ui_mm_cancel ui_button_main03 @@ -41,7 +41,7 @@