Add begin-capture-on-startup testing flag

In order to debug single frame applications such as unit tests with
with PIX, you need to call BeginCapture() at the start of your
application.

This change adds a begin-capture-on-startup flag to the Dawn test
environment. The flag, when set, will call BeginCapture() right after
the DXGI factory is created.

Bug: dawn:44
Change-Id: Ibb8f7b05707915510f9886524f0144c0576d2603
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8200
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Rafael Cintron
2019-06-21 02:09:05 +00:00
committed by Commit Bot service account
parent bfd0d94a31
commit 4729b15365
9 changed files with 76 additions and 19 deletions

View File

@@ -127,7 +127,11 @@ namespace dawn_native {
// Enable backend's validation layers if it has.
void EnableBackendValidation(bool enableBackendValidation);
bool IsBackendValidationEnabled();
bool IsBackendValidationEnabled() const;
// Enable debug capture on Dawn startup
void EnableBeginCaptureOnStartup(bool beginCaptureOnStartup);
bool IsBeginCaptureOnStartupEnabled() const;
private:
InstanceBase* mImpl = nullptr;