现在主流的显卡有两种,一类是Nvidia的GPU,一种是AMD的GPU。
很多人都在做GPU的时候,都想知道GPU的特性,想知道使用时候的状态,有问题,频率,内存使用情况,占有率,很多人问道了,是否可以使用系统底层的API得到?
其实系统给的API并不完善,经常得不到完全的信息。
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
对于NVidia的GPU,推荐使用NVAPI来得到这些参数:
http://developer.nvidia.com/nvapi
这个链接是NVAPI的具体的信息:
NVAPI
WHAT IS NVAPI, AND WHY DO YOU NEED IT?
NVAPI is NVIDIA's core software development kit that allows direct access to NVIDIA GPUs and drivers on all windows platforms. NVAPI provides support for categories of operations that range beyond the scope of those found in familiar graphics APIs such as DirectX and OpenGL.
Initially exposed only to OEMs and game developer tools, NVAPI is now available for download to all developers interested in building Windows applications on NVIDIA GPUs.
DOWNLOADS
- NVAPI (2012-Apr) (1MB ZIP)
- NVIDIA Driver Settings Programming Guide (520k PDF)
APPLICATION TYPES
NVAPI allows full access to NVIDIA GPUs and drivers in any UI and non-UI application. Under Windows Vista, the application context using NVAPI must be launched in Session 1 or higher.
NVAPI FEATURE CATEGORIES
-
Driver Management
- Initialization and driver version controls. GPU Management
- Enumeration of physical and logical GPUs. Thermal and Cooling controls. Display Management
- Enumeration of NVDIA displays, display postion and timings controls. GPU Topology
- Ability to enable SLI and Hybrid GPU topologies. * Frame Rendering
- Ability to control Video and DX rendering not available in DX runtime. * System Management
- Ability to query chipset and system specific information. HDTV Controls
- HDTV format and overscan controls. * Video Controls
- Extended video engine controls. * Connecting and Configuring Monitors
- Ability to set views on multiple target monitors. GPU Overclocking
- GPU overclocking APIs allows apps to run apps at maximum possible clocks. *
* Use NDA edition for full control of this feature.
NVAPI COMPONENTS & DOCUMENTATION
NVAPI components includes the header, lib files for each platform - x86 and x64 respectively.
Documentation is provided as a compiled HTML help (.chm) file in each download.
NVAPI SUPPORT
NVAPI is constantly and rigorously tested not only for end-users, but for internal use at NVIDIA and our closest partners. To discuss common issues regarding NVAPI with NVIDIA and other developers, click here for a direct link to NVIDIA's developer forums.
NVAPI NDA CUSTOMERS
NVAPI comes in two "flavors": the public version, available below, and a more extensive version available to registered developers under NDA. Registered developers can log in here, or contact your NVIDIA account manager to make sure you have the latest NDA edition of NVAPI.
Not a registered NVIDIA developer? Sign up here.
对于AMD的GPU:
可以使用 GPUPerfAPI:
http://developer.amd.com/tools/GPUPerfAPI/Pages/default.aspx
这个链接上可以找到信息:
GPUPerfAPI
| |||||||||||||||||
![]() OverviewGPUPerfAPI is AMD's library for accessing GPU performance counters on ATI Radeon graphics cards. It is used by GPU PerfStudio 2 and the AMD APP Profiler and is now available to third party developers who wish to incorporate it within their own applications. GPUPerfAPI supports DirectX10, DirectX11, OpenGL, and OpenCL applications. Release NotesVersion 2.9 (1/18/12)
Version 2.8 (4/22/11)
Version 2.7 (4/6/11)
Version 2.5 (11/17/10)
Version 2.3 (6/4/10)
DocumentationSupportDownload
|
========================================================================================================================================================================
GPU的参数特性,通过里面的sample是可以找到简单地例子,可以快速的入门的。
对于CPU的参数特性的拾取,下次再讲:)
From OpenHero http://blog.csdn.net/openhero/article/details/7702028#comments