Skip to content

Commit

Permalink
Win7: No warnings as errors in FragData test.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
  • Loading branch information
null77 authored and Commit Bot committed Feb 28, 2019
1 parent 9dc8eaf commit 4b314ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/libANGLE/renderer/d3d/HLSLCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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.");
Expand Down
12 changes: 11 additions & 1 deletion src/tests/test_utils/ANGLETest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <VersionHelpers.h>
#endif // defined(ANGLE_PLATFORM_WINDOWS)

namespace angle
{

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4b314ee

Please sign in to comment.