Commit eb278cb0 by Jamie Madill Committed by Commit Bot

D3D: Log GetLastError when compiler load fails.

Also use the non-unicode version of LoadLibrary explicitly. Bug: chromium:919163 Change-Id: I4841c3eef586ff57563915da12765baaa6e0b146 Reviewed-on: https://chromium-review.googlesource.com/c/1398642Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 5df1d281
...@@ -130,15 +130,18 @@ angle::Result HLSLCompiler::ensureInitialized(d3d::Context *context) ...@@ -130,15 +130,18 @@ angle::Result HLSLCompiler::ensureInitialized(d3d::Context *context)
{ {
// Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was // Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was
// built with. // built with.
mD3DCompilerModule = LoadLibrary(D3DCOMPILER_DLL); mD3DCompilerModule = LoadLibraryA(D3DCOMPILER_DLL_A);
}
if (!mD3DCompilerModule) if (!mD3DCompilerModule)
{ {
ERR() << "D3D compiler module not found."; DWORD lastError = GetLastError();
ANGLE_TRY_HR(context, E_OUTOFMEMORY, "D3D compiler module not found."); ERR() << "LoadLibrary(" << D3DCOMPILER_DLL_A << ") failed. GetLastError=" << lastError;
ANGLE_TRY_HR(context, E_OUTOFMEMORY, "LoadLibrary failed to load D3D Compiler DLL.");
}
} }
ASSERT(mD3DCompilerModule);
mD3DCompileFunc = mD3DCompileFunc =
reinterpret_cast<pD3DCompile>(GetProcAddress(mD3DCompilerModule, "D3DCompile")); reinterpret_cast<pD3DCompile>(GetProcAddress(mD3DCompilerModule, "D3DCompile"));
ASSERT(mD3DCompileFunc); ASSERT(mD3DCompileFunc);
......
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