Re: [chromium-dev] How to capture graphics commands sent to driver on Windows?

350 views
Skip to first unread message

Yuly Novikov

unread,
May 14, 2019, 12:30:01 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.

From: Yang Gu <yan...@intel.com>
Date: Tue, May 14, 2019 at 2:25 AM
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! 

--
--
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.

Jasper St. Pierre

unread,
May 14, 2019, 12:33:48 PM5/14/19
to ynov...@chromium.org, yan...@intel.com, angleproject, Chromium-dev
On Windows 10, the command line I use to hook Chrome is "--disable-gpu-sandbox --gpu-startup-dialog --disable-direct-composition" together with the RENDERDOC_HOOK_EGL=0 env var, which appears to work for me. Chrome's use of the system compositor seems to confuse RenderDoc.

You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angleproject/CAKK1iFDvtaPHJc3nh%3D1Hegjr85hz9UP0T1hJxkk35fhywZvjPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
  Jasper

yang gu

unread,
May 15, 2019, 7:37:57 AM5/15/19
to angleproject
Thanks for the reply! The challenge here comes from Chromium's multi-process arch, so I think ANGLE might be straightforward.
I tried the method Jasper pointed out and it worked! It seems to me "--disable-direct-composition" is the key, and "--gpu-startup-dialog" is not necessary. I could capture the frame, though the display in Chrome was not correct.
I still had no luck with Visual Studio using "--disable-direct-composition". 

Yang Gu

unread,
May 16, 2019, 10:52:43 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". 
Reply all
Reply to author
Forward
0 new messages