Commit 04213219 authored by Khushal's avatar Khushal Committed by Commit Bot

gpu: Add some logging to clarify failure reasons during context init.

R=sunnyps@chromium.org

Change-Id: I67a0bb9643ecbf70c5aa2b9f5f6a070883cf7a3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078799
Auto-Submit: Khushal <khushalsagar@chromium.org>
Reviewed-by: default avatarSunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745550}
parent db005758
......@@ -273,6 +273,10 @@ bool SharedContextState::InitializeGL(
GLint max_vertex_attribs = 0;
api->glGetIntegervFn(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs);
if (max_vertex_attribs < kGLES2RequiredMinimumVertexAttribs) {
LOG(ERROR)
<< "SharedContextState::InitializeGL failure max_vertex_attribs : "
<< max_vertex_attribs << " is less that minimum required : "
<< kGLES2RequiredMinimumVertexAttribs;
feature_info_ = nullptr;
return false;
}
......@@ -296,6 +300,8 @@ bool SharedContextState::InitializeGL(
// inconsistent between various ContextStates on the same underlying real
// GL context. Make sure to report the failure early, to not allow
// virtualized context switches in that case.
LOG(ERROR) << "SharedContextState::InitializeGL failure driver error : "
<< driver_status;
feature_info_ = nullptr;
context_state_ = nullptr;
return false;
......@@ -306,6 +312,8 @@ bool SharedContextState::InitializeGL(
share_group_.get(), real_context_.get(),
weak_ptr_factory_.GetWeakPtr());
if (!virtual_context->Initialize(surface_.get(), gl::GLContextAttribs())) {
LOG(ERROR) << "SharedContextState::InitializeGL failure Initialize "
"virtual context failed";
feature_info_ = nullptr;
context_state_ = nullptr;
return false;
......
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