mixed-reality

Installing PIX for HoloLens 2

PIX is a performance tuning and debugging tool for DirectX 12 applications on Windows but can also be used for DirectX 11 using Direct3D 11 on 12.

Prerequisites

  1. Latest version of PIX installed on the PC.
  2. Latest Windows SDK for IPoverUSB to be able to connect the HoloLens 2 to a PC via USB.
  3. An ARM64 build of your application. PIX only supports ARM64.
  4. The HoloLens2 needs to be connected to the PC via a USB cable.

[!NOTE] Some configurations, like using a Windows Insider build can break PIX on HoloLens 2. If that happens, reflash your device to erase all data and repeat the instructions below.

Setup

  1. Enable Developer Mode and Device Portal:

Screenshot of the HoloLens menu with settings button highlighted

Screenshot of settings window open on HoloLens with update and security button highlighted

Screenshot of security and updates window open with for developers button highlighted

Screenshot of for developers window open in settings with enable device portal button highlighted

Screenshot of for developers window open in settings with use develop features toggle highlighted

[!IMPORTANT] Make sure your device isn’t in standby mode or asleep. If you’re having trouble with this step, refer to the Windows Device Portal instructions.

Preparing for deployment

  1. In Visual Studio, set ARM64 as the platform and Device as the device:

Screenshot of visual studios solution with platform and device settings highlighted

  1. When Visual Studio prompts you for a PIN from the device:

Screenshot of visual studio pop-up asking for PIN

Screenshot of for developers window open in settings with device discovery highlighted

Screenshot of paid device pop-up with registration code highlighted

  1. Visual Studio will deploy the app to the connected HoloLens 2, which may take a few minutes depending on the app.

Launching PIX

First, use Device Portal to verify the app isn’t running on the HoloLens 2. Then, launch PIX, connect to your device, and select Home:

Screenshot of PIX application home screen

Screenshot of PIX application left-side menu with connect button highlighted

  1. From the Computer tab, select Add, and enter the following credentials:
    • Alias: Up to user’s discretion
    • Host Name or IP Address: 127.0.0.1
  2. Select Connect in the lower right of the Computer tab:

Screenshot of PIX application connect window with alias, host name, IP address, and add button highlighted

[!NOTE] The first connection is always slower because binaries are being copied.

  1. When PIX has connected to the HoloLens 2, find your app in the Select Target Process section in the Launch UWP tab, and then make sure Launch for GPU Capture is active.

  2. If your application is running on DX11, make sure that Force D3D11On12 is selected.

  3. Click Launch:

Screenshot of PIX application with the select target process window and launch button highlighted

GPU captured

  1. Start the GPU capture by clicking Photo in the GPU Capture section:

Screenshot of the PIX application with the PC connection panel open with GPU capture highlighted

  1. Open the capture for analysis by clicking on the generated screenshot in the GPU Capture panel:

Screenshot of the PIX application with the GPU capture section open with GPU capture panel highlighted

  1. Press Start to begin the analysis:

Screenshot of the PIX application the start button highlighted

[!IMPORTANT] If you collect timing data after taking a GPU capture, you’ll be required to reboot the headset. This is a one-time restart of the device and is required for timing data collection.

PIX is now ready for use! For an introduction on how to use PIX, please refer to PIX GPU captures.

See also