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

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: 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..639de6ae63d06730a8f4d3b443952628be45bb20 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2856,7 +2856,11 @@ void GLES2DecoderImpl::DoGenerateMipmap(GLenum target) {
"glGenerateMipmaps: Can not generate mips for npot textures");
return;
}
+ // Workaround for Mac driver bug. Since glGenerateMipmap is not a high
apatrick_chromium 2011/03/25 21:53:26 I might expect it to be high performance if I was
+ // performance function there's 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