Commit b70b63e8 by Jamie Madill

Add trace event for D3DCompile.

Adds more profiling help for startup shader compiles in Chrome. BUG=510151 Change-Id: I550b55b1280542d1eaab9ed6166387b663cafffe Reviewed-on: https://chromium-review.googlesource.com/290091Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent d17c016b
...@@ -216,9 +216,14 @@ gl::Error HLSLCompiler::compileToBinary(gl::InfoLog &infoLog, const std::string ...@@ -216,9 +216,14 @@ gl::Error HLSLCompiler::compileToBinary(gl::InfoLog &infoLog, const std::string
{ {
ID3DBlob *errorMessage = nullptr; ID3DBlob *errorMessage = nullptr;
ID3DBlob *binary = nullptr; ID3DBlob *binary = nullptr;
HRESULT result = S_OK;
HRESULT result = mD3DCompileFunc(hlsl.c_str(), hlsl.length(), gl::g_fakepath, macros, nullptr, "main", profile.c_str(), {
configs[i].flags, 0, &binary, &errorMessage); TRACE_EVENT0("gpu.angle", "D3DCompile");
result = mD3DCompileFunc(hlsl.c_str(), hlsl.length(), gl::g_fakepath, macros, nullptr,
"main", profile.c_str(), configs[i].flags, 0, &binary,
&errorMessage);
}
if (errorMessage) if (errorMessage)
{ {
......
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