aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar brucedawson <brucedawson@chromium.org>2016-09-06 09:54:44 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-06 09:54:44 -0700
commit3c3e0d7bad86b805b08a81ab09d6f7ed25f47899 (patch)
treeee3c3d68c007beb1bb7a5b083db66ab7b1a31737
parente86134fc703eba776715a9e0fdcb6c4e6f7d60e7 (diff)
Work around VS 2015 Update 3 optimizer internal compiler error
VS 2015 Update 3 comes with a fancy new optimizer and this optimizer causes an internal compiler error on one skia function. This change works around the bug by disabling optimize-for-time for that function. Other options would be to add /d2SSAOptimizer- to the command-line for the file or project but that would *require* Update 3 which is not yet desirable. VS bug report is here: https://connect.microsoft.com/VisualStudio/feedback/details/3100520 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2308833002 Review-Url: https://codereview.chromium.org/2308833002
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 2808af638f..aeb0393daf 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -125,6 +125,12 @@ void GrConfigConversionEffect::onComputeInvariantOutput(GrInvariantOutput* inout
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConfigConversionEffect);
+#if !defined(__clang__) && _MSC_FULL_VER >= 190024213
+// Work around VS 2015 Update 3 optimizer bug that causes internal compiler error
+//https://connect.microsoft.com/VisualStudio/feedback/details/3100520/internal-compiler-error
+#pragma optimize("t", off)
+#endif
+
sk_sp<GrFragmentProcessor> GrConfigConversionEffect::TestCreate(GrProcessorTestData* d) {
PMConversion pmConv = static_cast<PMConversion>(d->fRandom->nextULessThan(kPMConversionCnt));
GrSwizzle swizzle;
@@ -136,6 +142,11 @@ sk_sp<GrFragmentProcessor> GrConfigConversionEffect::TestCreate(GrProcessorTestD
swizzle, pmConv, GrTest::TestMatrix(d->fRandom)));
}
+#if !defined(__clang__) && _MSC_FULL_VER >= 190024213
+// Restore optimization settings.
+#pragma optimize("", on)
+#endif
+
///////////////////////////////////////////////////////////////////////////////
void GrConfigConversionEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,