> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PIXCaptureParameters

> PIXCaptureParameters

# PIXCaptureParameters

[PIXBeginCapture](/reference/tools/pix3/functions/pixbegincapture) 的参数。

## 语法

```cpp theme={null}
union PIXCaptureParameters
{
    enum PIXCaptureStorage
    {
        Memory = 0,
        MemoryCircular = 1, // Xbox only
        FileCircular = 2, // PC only
    };

    struct GpuCaptureParameters
    {
        PCWSTR FileName;
    } GpuCaptureParameters;

    struct TimingCaptureParameters
    {
        PCWSTR FileName;
        UINT32 MaximumToolingMemorySizeMb;
        PIXCaptureStorage CaptureStorage;

        BOOL CaptureGpuTiming;

        BOOL CaptureCallstacks;
        BOOL CaptureCpuSamples;
        UINT32 CpuSamplesPerSecond;

        BOOL CaptureFileIO;

        BOOL CaptureVirtualAllocEvents;
        BOOL CaptureHeapAllocEvents;
        BOOL CaptureXMemEvents; // Xbox only
        BOOL CapturePixMemEvents;
        BOOL CapturePageFaultEvents;
        BOOL CaptureVideoFrames; // Xbox only
    } TimingCaptureParameters;
};

typedef PIXCaptureParameters* PPIXCaptureParameters;
```

### 成员

*FileName*\
类型：PWSTR

主机上捕获文件的文件名。

*MaximumToolingMemorySizeMb*\
类型：UINT32

用于保存捕获数据的工具内存缓冲区的最大 MB 数。\
根据 *CaptureStorage* 的值不同，当内存缓冲区已满时捕获要么停止，要么将工具内存用作环形缓冲区。

*CaptureStorage*\
类型：PIXCaptureStorage

捕获模式。设置为 *Memory* 时，`PIXBeginCapture` 会填满可用的工具内存，然后丢弃后续到来的所有新数据。设置为 *MemoryCircular* 时，`PIXBeginCapture` 会将工具内存用作环形缓冲区。捕获会一直运行直到工具内存被填满，但不是停止捕获，而是让最旧的数据老化并被丢弃，为新数据腾出空间。

*CaptureGpuTiming*\
类型：BOOL

决定是否捕获 GPU 时序数据，包括 PIX GPU 事件、GPU 工作、PIX GPU 标记和 API 标记。

*CaptureCallstacks*\
类型：BOOL

决定是否为上下文切换捕获调用堆栈。

*CaptureCpuSamples*\
类型：BOOL

决定是否捕获 CPU 采样。

*CpuSamplesPerSecond*\
类型：UINT32

每秒要捕获的 CPU 采样数量。

*CaptureFileIO*\
类型：BOOL

决定是否捕获 DirectStorage 和 Win32 文件 IO。

*CaptureVirtualAllocEvents*\
类型：BOOL

决定是否捕获虚拟内存分配事件。

*CaptureHeapAllocEvents*\
类型：BOOL

决定是否捕获堆分配事件。

*CaptureXMemEvents*\
类型：BOOL

决定是否捕获 XMem 分配事件。

*CapturePixMemEvents*\
类型：BOOL

决定是否捕获使用标题自定义内存分配器进行的分配。

*CapturePageFaultEvents*\
类型：BOOL

决定是否捕获页面错误事件。

*CaptureVideoFrames*\
类型：BOOL

决定是否捕获视频帧。

## 备注

此联合体由 [PIXBeginCapture](/reference/tools/pix3/functions/pixbegincapture) 使用，用于启动一个以编程方式受控的 PIX 时序捕获。

`PixBeginCapture` 还会使用 [PixGetCaptureState](/reference/tools/pix3/functions/pixgetcapturestate) 返回的标志。

## 要求

**头文件：** pix3.h

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[PIXBeginCapture](/reference/tools/pix3/functions/pixbegincapture)\
[PIX (NDA 主题)](/tools/tools-console/pix/pix)\
[pix3](/reference/tools/pix3/pix3_members)


## Related topics

- [PIX3](/zh-CN/reference/tools/pix3/pix3_members.md)
- [XAppCaptureRecordTimespan](/zh-CN/reference/system/xappcapture/functions/xappcapturerecordtimespan.md)
- [XAppCaptureTakeScreenshot](/zh-CN/reference/system/xappcapture/functions/xappcapturetakescreenshot.md)
- [XAppCaptureOpenScreenshotStream](/zh-CN/reference/system/xappcapture/functions/xappcaptureopenscreenshotstream.md)
- [XAppCaptureReadScreenshotStream](/zh-CN/reference/system/xappcapture/functions/xappcapturereadscreenshotstream.md)
