summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/gles2_cmd_decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/service/gles2_cmd_decoder.cc')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc7
1 files changed, 5 insertions, 2 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());
}