Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 6749014: Workground for glGenerateMipmap bug in some drivers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment change Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 5444b153aa0a6c1497fd7d36f81854f63f72f591..d50db61eb3e5f0bb334c5e3b12d3bb4c562ce8cd 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2856,7 +2856,12 @@ void GLES2DecoderImpl::DoGenerateMipmap(GLenum target) {
"glGenerateMipmaps: Can not generate mips for npot textures");
return;
}
+ // 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);
glGenerateMipmapEXT(target);
+ glTexParameteri(target, GL_TEXTURE_MIN_FILTER, info->min_filter());
}
bool GLES2DecoderImpl::GetHelper(
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698