Skip to content

Instantly share code, notes, and snippets.

@Popov72
Last active February 14, 2024 04:36
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Popov72/41f71cbf8d55f2cb8cae93f439eee347 to your computer and use it in GitHub Desktop.
Save Popov72/41f71cbf8d55f2cb8cae93f439eee347 to your computer and use it in GitHub Desktop.
Using PIX with Chrome

In PIX, Select Target Process => Launch Win32 and set the following 2 entries according to where Canary / Chrome is installed:

  • Path to executable: "C:\Users\alexis\AppData\Local\Google\Chrome SxS\Application\chrome.exe"
  • Working directory: "C:\Users\alexis\AppData\Local\Google\Chrome SxS\Application"
  • Command line arguments: --disable-gpu-sandbox --disable-direct-composition
    • You can add those arguments if you want to be able to see the disassembled shader code: --enable-dawn-features=emit_hlsl_debug_symbols,disable_symbol_renaming
  • Launch Suspended unchecked, Launch for GPU capture and Force D3D11On12 checked

Then click on "Launch".

Important: you should close all your Canary / Chrome windows/processes before clicking on the "Launch" button!

To Capture a frame (GPU Capture frame):

  • Choose Present-to-Present
  • Click on the Capture icon
    • You probably need to set Capture frame count to 2 (I had to), otherwise the capture won't contain your commands, only those of Canary / Chrome
  • If you do other captures you can get an "An error occurred during capture" popup: just close it, the capture does work (at least it works for me).

If you want the debug markers to work inside PIX, you need to perform those steps: https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/debug_markers.md

Notes:

  • I could not locate the libdawn_native.dll file: I have simply copied the WinPixEventRuntime.dll file into "C:\Users\alexis\AppData\Local\Google\Chrome SxS\Application<version>" and it did work
  • If you update Canary / Chrome, this file will be removed, you will have to copy it again
@Aaron-Bird
Copy link

I tested many parameters (including dump_shaders), but it still doesn't work.
Thank you again for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment