Commit e2de2c1c by Jonah Ryan-Davis Committed by Commit Bot

Fix disable_native_parallel_compile workaround condition.

This workaround should only be enabled when ANGLE is built with TSAN on. Bug: chromium:1094869 Change-Id: If527457c11ce744b543ac69761cc64235d2f1dd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267420Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
parent bdf91e5f
...@@ -445,12 +445,10 @@ unsigned int RendererGL::getMaxWorkerContexts() ...@@ -445,12 +445,10 @@ unsigned int RendererGL::getMaxWorkerContexts()
bool RendererGL::hasNativeParallelCompile() bool RendererGL::hasNativeParallelCompile()
{ {
#ifdef THREAD_SANITIZER
if (mFeatures.disableNativeParallelCompile.enabled) if (mFeatures.disableNativeParallelCompile.enabled)
{ {
return false; return false;
} }
#endif
return mFunctions->maxShaderCompilerThreadsKHR != nullptr || return mFunctions->maxShaderCompilerThreadsKHR != nullptr ||
mFunctions->maxShaderCompilerThreadsARB != nullptr; mFunctions->maxShaderCompilerThreadsARB != nullptr;
} }
......
...@@ -1776,9 +1776,14 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature ...@@ -1776,9 +1776,14 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature
} }
ANGLE_FEATURE_CONDITION(features, disableGPUSwitchingSupport, isDualGPUMacWithNVIDIA); ANGLE_FEATURE_CONDITION(features, disableGPUSwitchingSupport, isDualGPUMacWithNVIDIA);
// Workaround issue in NVIDIA GL driver on Linux // Workaround issue in NVIDIA GL driver on Linux when TSAN is enabled
// http://crbug.com/1094869 // http://crbug.com/1094869
ANGLE_FEATURE_CONDITION(features, disableNativeParallelCompile, IsLinux() && isNvidia); bool isTSANBuild = false;
#ifdef THREAD_SANITIZER
isTSANBuild = true;
#endif
ANGLE_FEATURE_CONDITION(features, disableNativeParallelCompile,
isTSANBuild && IsLinux() && isNvidia);
} }
void InitializeFrontendFeatures(const FunctionsGL *functions, angle::FrontendFeatures *features) void InitializeFrontendFeatures(const FunctionsGL *functions, angle::FrontendFeatures *features)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment