From 4b314eefc839f688cf2367b2cc288a8e954d1c4f Mon Sep 17 00:00:00 2001 From: Jamie Madill Date: Wed, 27 Feb 2019 13:20:51 -0500 Subject: [PATCH] Win7: No warnings as errors in FragData test. Applies to all Windows because we currently don't have a way to check which version we're on. The fallback to the old compiler is generating a warning. This test was being overly conservative. Also updates a few message strings. Bug: chromium:920704 Change-Id: If83677881e85d6a6f9ad98b33cd5f7d917bbec6b Reviewed-on: https://chromium-review.googlesource.com/c/1492311 Commit-Queue: Jamie Madill Reviewed-by: Jamie Madill --- src/libANGLE/renderer/d3d/HLSLCompiler.cpp | 4 ++-- src/tests/test_utils/ANGLETest.cpp | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/libANGLE/renderer/d3d/HLSLCompiler.cpp b/src/libANGLE/renderer/d3d/HLSLCompiler.cpp index 3239295682..1b56cbc823 100644 --- a/src/libANGLE/renderer/d3d/HLSLCompiler.cpp +++ b/src/libANGLE/renderer/d3d/HLSLCompiler.cpp @@ -149,7 +149,7 @@ angle::Result HLSLCompiler::ensureInitialized(d3d::Context *context) } else { - WARN() << "Failed to load HLSL compiler library. Trying old DLL."; + WARN() << "Failed to load HLSL compiler library. Using 'old' DLL."; mD3DCompilerModule = LoadLibraryA(kOldCompilerLibrary); if (mD3DCompilerModule) { @@ -162,7 +162,7 @@ angle::Result HLSLCompiler::ensureInitialized(d3d::Context *context) if (!mD3DCompilerModule) { DWORD lastError = GetLastError(); - ERR() << "LoadLibrary(" << D3DCOMPILER_DLL_A << ") failed. GetLastError=" << lastError; + ERR() << "D3D Compiler LoadLibrary failed. GetLastError=" << lastError; ANGLE_HISTOGRAM_ENUMERATION("GPU.ANGLE.D3DCompilerLoadLibraryResult", D3DCompilerFailure, D3DCompilerEnumBoundary); ANGLE_TRY_HR(context, E_OUTOFMEMORY, "LoadLibrary failed to load D3D Compiler DLL."); diff --git a/src/tests/test_utils/ANGLETest.cpp b/src/tests/test_utils/ANGLETest.cpp index b1baf57fd7..132989735b 100644 --- a/src/tests/test_utils/ANGLETest.cpp +++ b/src/tests/test_utils/ANGLETest.cpp @@ -18,6 +18,10 @@ # include "util/windows/WGLWindow.h" #endif // defined(ANGLE_USE_UTIL_LOADER) && defined(ANGLE_PLATFORM_WINDOWS) +#if defined(ANGLE_PLATFORM_WINDOWS) +# include +#endif // defined(ANGLE_PLATFORM_WINDOWS) + namespace angle { @@ -1276,7 +1280,13 @@ void ANGLETestBase::ignoreD3D11SDKLayersWarnings() void ANGLETestBase::treatPlatformWarningsAsErrors() { - mPlatformContext.warningsAsErrors = true; +#if defined(ANGLE_PLATFORM_WINDOWS) + // Disable on Windows 7-8. We are falling back to the old compiler DLL. + if (!IsWindows10OrGreater()) + { + mPlatformContext.warningsAsErrors = true; + } +#endif // defined(ANGLE_PLATFORM_WINDOWS) } ANGLETestBase::ScopedIgnorePlatformMessages::ScopedIgnorePlatformMessages(ANGLETestBase *test)