diff options
author | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 18:28:56 +0000 |
---|---|---|
committer | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 18:28:56 +0000 |
commit | a8bad26a6e21894a24c26248bab989434735fb2e (patch) | |
tree | a4e3bae98e0b4dfa957165d0bfa8692ab6d3680d /gpu | |
parent | 57519062b82314010273d35b341e4146b4292620 (diff) | |
download | chromium_src-a8bad26a6e21894a24c26248bab989434735fb2e.zip chromium_src-a8bad26a6e21894a24c26248bab989434735fb2e.tar.gz chromium_src-a8bad26a6e21894a24c26248bab989434735fb2e.tar.bz2 |
Adjust workaround for mipmap-related OpenGL implementation bug on Mac OS X.
BUG=101105
TEST=GPU unit tests; manually ran WebGL conformance test textures/texture-mips.html on NVIDIA and AMD GPUs on Mac OS
Review URL: http://codereview.chromium.org/8363016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 7 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 20d97bb..081d371 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -3008,8 +3008,11 @@ void GLES2DecoderImpl::DoGenerateMipmap(GLenum target) { } // Workaround for Mac driver bug. In the large scheme of things setting // glTexParamter twice for glGenerateMipmap is probably not a lage performance - // hit so there's probably no need to make this conditional. - glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); + // hit so there's probably no need to make this conditional. The bug appears + // to be that if the filtering mode is set to something that doesn't require + // mipmaps for rendering, or is never set to something other than the default, + // then glGenerateMipmap misbehaves. + glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); glGenerateMipmapEXT(target); glTexParameteri(target, GL_TEXTURE_MIN_FILTER, info->min_filter()); } diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc index dc086f3..5a52f8a 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc @@ -41,7 +41,7 @@ void GLES2DecoderTestBase::SpecializedSetup<GenerateMipmap, 0>( 0, 0); if (valid) { EXPECT_CALL(*gl_, TexParameteri( - GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR)) + GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST)) .Times(1) .RetiresOnSaturation(); EXPECT_CALL(*gl_, TexParameteri( |