• Intel® Graphics Performance Analyzers 2020 R1
  • 12/20/2019
  • Public Content
Contents

自动化帧捕获

使用自动化帧捕获将对 Intel® GPA 接口的调用直接包括在应用程序中,可自动化捕获帧。这样,您就能够精准捕获所关注的帧,简化调试和分析过程。例如,发生一个特定事件时,您可能希望捕获一个帧,或希望捕获多个帧。
备注
自动化帧捕获不可用于基于 DirectX* 12 的应用程序。
要将自动化帧捕获链接至应用程序:
  1. 在 Microsoft Visual Studio* 中打开应用程序项目。
  2. 更新项目
    Properties
    如下:
    • Linker > Input > Additional Dependencies
      之下,添加
      sdk.lib
    • Linker > General > Additional Library Directories
      下,添加
      “C:\Program Files\IntelSWTools\GPA\sdk\lib\x64 or lib\x86”。
    • C
      /C++ > General > Additional Include Directories
      下,添加
      “C:\Program Files\IntelSWTools\GPA\sdk\include”。
  3. 在应用程序的源代码中:
    • 将 GpaSdk.h 加到源代码中:
      &num;include <GPASDK.h>
    • 获取 Intel® GPA 接口:
      IGPA* gpa_interface = GetGPAInterface();
    • 希望用帧捕获每个事件之前,将对
      CaptureFrame
      函数的调用插入源代码:
      // If GPA is attached
      if (gpa_interface)
      {
          const char* frame_filename = "Example.gpa_frame"; // You can also use nullptr and the name will be generated automatically
          IGPA::Result capture_result = gpa_interface->CaptureFrame(frame_filename);
          if (capture_result != IGPA::Result::Ok)
          {
              // Capture failed
          }
      }
  4. 编译并构建应用程序。
要捕获帧,只需如常从 Graphics Monitor 运行该应用程序。Intel® GPA 按源代码中的指定自动捕获帧。
 

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804