How to capture graphics commands sent to driver on Windows?

1,497 views
Skip to first unread message

Yang Gu

unread,
May 14, 2019, 2:24:12 AM5/14/19
to Chromium-dev
Requirements: 
1. Capture graphics commands, like D3D11 draw calls in some frames, sent to graphics driver.
2. Currently I only want to make this work on Windows 10, which means I need D3D11 commands for some frames.
3. I'm working on Intel hardware. So any tool agnostic to GPU vendors or friendly to Intel is helpful.
4. The usage targets vanilla Chrome, which means I don't want to build any Chrome in debug version or even add some code in Chrome. Any public release of Chrome, stable, beta, dev and canary is OK.

Test case:
Any WebGL case might be my target, while WebGL Aquarium (https://webglsamples.org/aquarium/aquarium.html) is an example. 

I know there are some related tools: Intel Graphics Performance Analyzer, Visual Studio Graphics Diagnostics and RenderDoc. I also know there are some Chrome options related: --disable-gpu-sandbox (or --no-sandbox), --gpu-startup-dialog and --disable-gpu-watchdog. I tried all above 3 tools with the combination of Chrome options, but had no luck to dump the graphics commands. 
Some details from experiments are as below:

[Intel Graphics Performance Analyzer]
As "--in-progress-gpu" is no longer supported (crbug.com/961558), and I couldn't find option to attach process, this tool doesn't work.

[Visual Studio Graphics Diagnostics]
I installed Graphics Tools, also some addons to support debugging child process (like Child Process Debugging Power Tool and VSChromium). But it seemed to me "Debug/Graphics/Start Graphics Debugging" is the only way for this, which relies on "--in-process-gpu".

[RenderDoc]
I tried all the options, like "--disable-gpu-sandbox" when capturing child process, and also "--gpu-startup-dialog" to inject into GPU process, but could make none of them work. Here are 2 links I followed specifically https://github.com/baldurk/renderdoc/issues/810 and https://weekly-geekly.github.io/articles/234619/index.html

Any help here would be very appreciated! 

Yuly Novikov

unread,
May 14, 2019, 12:31:03 PM5/14/19
to yan...@intel.com, angleproject, Chromium-dev
I know that we use RenderDoc in ANGLE, but I don't know the details of how to configure it.
Not sure if there is more to it.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/4a41959f-5458-4818-89dc-5ebf315bde31%40chromium.org.

Yang Gu

unread,
May 16, 2019, 10:52:41 AM5/16/19
to Chromium-dev, yan...@intel.com, anglep...@googlegroups.com
Let me post some updates here.
With help from https://groups.google.com/forum/#!topic/angleproject/Btbq9wZwslg, I could make it work with RenderDoc. The rendering in Chrome looks incorrect, however, the captured commands look correct to me.
With fix of "--in-progress-gpu" (https://bugs.chromium.org/p/chromium/issues/detail?id=961558), I also made it work with Visual Studio. However, the capture is very unstable, and I only successfully captured the frame 3 times out of about 10 trials. For Visual Studio, the options I used are "--disable-gpu-sandbox --disable-direct-composition --in-process-gpu". 

Zhenyao Mo

unread,
May 16, 2019, 3:42:53 PM5/16/19
to Chromium-dev, yan...@intel.com, anglep...@googlegroups.com, Geoff Lang, Jamie Madill
+geofflang +jmadill

in case you did something similar before

Zhenyao Mo

unread,
May 16, 2019, 3:47:34 PM5/16/19
to Gu, Yang, Chromium-dev, geof...@chromium.org, Jamie Madill
+geofflang +jmadill

in case you did something similar before

> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
> ---
> You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/2684a360-8a8c-49c8-9f1e-ec2f9bcbe858%40chromium.org.
Reply all
Reply to author
Forward
0 new messages