diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-09 20:42:24 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-09 20:42:24 +0000 |
commit | 3a86ca3f024896e8839e5b2a40f9dd770c0d765c (patch) | |
tree | 896a2656d23ea90c8445acb66901e3d0d62a904d /gpu | |
parent | dd33fa43a759529bd471ca531b0694d4a70c5472 (diff) | |
download | chromium_src-3a86ca3f024896e8839e5b2a40f9dd770c0d765c.zip chromium_src-3a86ca3f024896e8839e5b2a40f9dd770c0d765c.tar.gz chromium_src-3a86ca3f024896e8839e5b2a40f9dd770c0d765c.tar.bz2 |
ContextGroup::Initialize fails on insufficient vertex attribs or texture units.
It was an assertion before but these are legitimate runtime errors.
TEST=try, gpu unit tests locally
BUG=none
Review URL: http://codereview.chromium.org/3027047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/context_group.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc index 8437c66..4e625c41 100644 --- a/gpu/command_buffer/service/context_group.cc +++ b/gpu/command_buffer/service/context_group.cc @@ -137,12 +137,14 @@ bool ContextGroup::Initialize() { // Lookup GL things we need to know. GetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs_); - const GLuint kGLES2RequiredMiniumumVertexAttribs = 8u; - DCHECK_GE(max_vertex_attribs_, kGLES2RequiredMiniumumVertexAttribs); + const GLuint kGLES2RequiredMinimumVertexAttribs = 8u; + if (max_vertex_attribs_ < kGLES2RequiredMinimumVertexAttribs) + return false; GetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &max_texture_units_); - const GLuint kGLES2RequiredMiniumumTextureUnits = 8u; - DCHECK_GE(max_texture_units_, kGLES2RequiredMiniumumTextureUnits); + const GLuint kGLES2RequiredMinimumTextureUnits = 8u; + if (max_texture_units_ < kGLES2RequiredMinimumTextureUnits) + return false; GLint max_texture_size; GLint max_cube_map_texture_size; |