diff options
author | cwallez <cwallez@chromium.org> | 2016-02-05 11:10:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-05 19:11:23 +0000 |
commit | d528a80ee601da34e92b3087aa9899fb73aa2ccd (patch) | |
tree | bcc1a5f95df9c811d3dce067fa5332ab07ecf2ba /gpu | |
parent | 015d4424a950809b8ece3cd840f6327de55d9a98 (diff) | |
download | chromium_src-d528a80ee601da34e92b3087aa9899fb73aa2ccd.zip chromium_src-d528a80ee601da34e92b3087aa9899fb73aa2ccd.tar.gz chromium_src-d528a80ee601da34e92b3087aa9899fb73aa2ccd.tar.bz2 |
ContextGroup::Initialize: LOG the relevant values on failure.
This will help debug cases when the method fails in automated testing
in particular the Linux AMD GPU FYI bot that is currently failing this
on gl_tests.
BUG=568113
Review URL: https://codereview.chromium.org/1672523002
Cr-Commit-Position: refs/heads/master@{#373868}
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/context_group.cc | 64 |
1 files changed, 44 insertions, 20 deletions
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc index c4740f2..56ab7a3 100644 --- a/gpu/command_buffer/service/context_group.cc +++ b/gpu/command_buffer/service/context_group.cc @@ -193,7 +193,8 @@ bool ContextGroup::Initialize(GLES2Decoder* decoder, GL_MAX_VERTEX_ATTRIBS, kGLES2RequiredMinimumVertexAttribs, &max_vertex_attribs_)) { LOG(ERROR) << "ContextGroup::Initialize failed because too few " - << "vertex attributes supported."; + << "vertex attributes supported (" << max_vertex_attribs_ + << ", should be " << kGLES2RequiredMinimumVertexAttribs << ")."; return false; } @@ -202,7 +203,8 @@ bool ContextGroup::Initialize(GLES2Decoder* decoder, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, kGLES2RequiredMinimumTextureUnits, &max_texture_units_)) { LOG(ERROR) << "ContextGroup::Initialize failed because too few " - << "texture units supported."; + << "texture units supported (" << max_texture_units_ + << ", should be " << kGLES2RequiredMinimumTextureUnits << ")."; return false; } @@ -218,18 +220,35 @@ bool ContextGroup::Initialize(GLES2Decoder* decoder, const GLint kMin3DTextureSize = 256; if (!QueryGLFeature(GL_MAX_TEXTURE_SIZE, kMinTextureSize, - &max_texture_size) || - !QueryGLFeature(GL_MAX_CUBE_MAP_TEXTURE_SIZE, kMinCubeMapSize, - &max_cube_map_texture_size) || - (feature_info_->gl_version_info().IsES3Capable() && - !QueryGLFeature(GL_MAX_3D_TEXTURE_SIZE, kMin3DTextureSize, - &max_3d_texture_size)) || - (feature_info_->feature_flags().arb_texture_rectangle && - !QueryGLFeature(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, - kMinRectangleTextureSize, - &max_rectangle_texture_size))) { + &max_texture_size)) { LOG(ERROR) << "ContextGroup::Initialize failed because maximum " - << "texture size is too small."; + << "2d texture size is too small (" << max_texture_size + << ", should be " << kMinTextureSize << ")."; + return false; + } + if (!QueryGLFeature(GL_MAX_CUBE_MAP_TEXTURE_SIZE, kMinCubeMapSize, + &max_cube_map_texture_size)) { + LOG(ERROR) << "ContextGroup::Initialize failed because maximum " + << "cube texture size is too small (" + << max_cube_map_texture_size << ", should be " << kMinCubeMapSize + << ")."; + return false; + } + if (feature_info_->gl_version_info().IsES3Capable() && + !QueryGLFeature(GL_MAX_3D_TEXTURE_SIZE, kMin3DTextureSize, + &max_3d_texture_size)) { + LOG(ERROR) << "ContextGroup::Initialize failed because maximum " + << "3d texture size is too small (" << max_3d_texture_size + << ", should be " << kMin3DTextureSize << ")."; + return false; + } + if (feature_info_->feature_flags().arb_texture_rectangle && + !QueryGLFeature(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, + kMinRectangleTextureSize, &max_rectangle_texture_size)) { + LOG(ERROR) << "ContextGroup::Initialize failed because maximum " + << "rectangle texture size is too small (" + << max_rectangle_texture_size << ", should be " + << kMinRectangleTextureSize << ")."; return false; } @@ -258,14 +277,19 @@ bool ContextGroup::Initialize(GLES2Decoder* decoder, const GLint kMinTextureImageUnits = 8; const GLint kMinVertexTextureImageUnits = 0; - if (!QueryGLFeatureU( - GL_MAX_TEXTURE_IMAGE_UNITS, kMinTextureImageUnits, - &max_texture_image_units_) || - !QueryGLFeatureU( - GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, kMinVertexTextureImageUnits, - &max_vertex_texture_image_units_)) { + if (!QueryGLFeatureU(GL_MAX_TEXTURE_IMAGE_UNITS, kMinTextureImageUnits, + &max_texture_image_units_)) { + LOG(ERROR) << "ContextGroup::Initialize failed because too few " + << "texture image units supported (" << max_texture_image_units_ + << ", should be " << kMinTextureImageUnits << ")."; + } + if (!QueryGLFeatureU(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, + kMinVertexTextureImageUnits, + &max_vertex_texture_image_units_)) { LOG(ERROR) << "ContextGroup::Initialize failed because too few " - << "texture units."; + << "vertex texture image units supported (" + << max_vertex_texture_image_units_ << ", should be " + << kMinTextureImageUnits << ")."; return false; } |