diff options
author | Brian Salomon <bsalomon@google.com> | 2017-01-24 22:22:05 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-24 22:22:17 +0000 |
commit | 7f9c29a887106ab3babe0ec423a3bcae87ae4788 (patch) | |
tree | d1249262d482be61e90d420926ccf5a1ff06aa68 /tools | |
parent | 901f29ad3e38b7072a2abef5ff1665cd755d21a2 (diff) |
Revert "Remove sentinal GLContext used in early days of Vulkan in our tools"
This reverts commit bfd97c59350c112ad85301eb6ff6005ae4fd9e8c.
Reason for revert: Windows bots crashing.
Original change's description:
> Remove sentinal GLContext used in early days of Vulkan in our tools
>
> I've ran this through multiple variations of dm and nanobench on Linux
> and no longer see any crash/hangs. I forget what the original repo case
> for the bug was, but I'm at least not seeing it now with updated drivers.
>
> BUG=skia:
>
> Change-Id: I6b7129a4c4d67938baa35d2e2c720cb078fc4c18
> Reviewed-on: https://skia-review.googlesource.com/7441
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
>
TBR=egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: I94a16b2b13d09182232061b0aebd0d58df96db8a
Reviewed-on: https://skia-review.googlesource.com/7453
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpu/GrContextFactory.cpp | 9 | ||||
-rw-r--r-- | tools/gpu/GrContextFactory.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp index 9c124bffa2..bd745bcfcd 100644 --- a/tools/gpu/GrContextFactory.cpp +++ b/tools/gpu/GrContextFactory.cpp @@ -191,6 +191,15 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions op return ContextInfo(); } + // There is some bug (either in Skia or the NV Vulkan driver) where VkDevice + // destruction will hang occaisonally. For some reason having an existing GL + // context fixes this. + if (!fSentinelGLContext) { + fSentinelGLContext.reset(CreatePlatformGLTestContext(kGL_GrGLStandard)); + if (!fSentinelGLContext) { + fSentinelGLContext.reset(CreatePlatformGLTestContext(kGLES_GrGLStandard)); + } + } backendContext = testCtx->backendContext(); break; #endif diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h index 25ebee90e0..a232112d75 100644 --- a/tools/gpu/GrContextFactory.h +++ b/tools/gpu/GrContextFactory.h @@ -163,6 +163,7 @@ private: bool fAbandoned; }; SkTArray<Context, true> fContexts; + std::unique_ptr<GLTestContext> fSentinelGLContext; const GrContextOptions fGlobalOptions; }; } // namespace sk_gpu_test |