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 2272823004: Add a base mipmap level walkaround for Intel MacOSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test other GPUs without the walkaround Created 4 years, 4 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
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 3895c9f7b023467215c13843320cba7d1079154e..ef60dab4f84667e3578ed7f49359e4afe2077587 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -15698,6 +15698,12 @@ void GLES2DecoderImpl::TexStorageImpl(GLenum target,
compatibility_internal_format = format_info->decompressed_internal_format;
}
+ GLint base_level = 0;
Zhenyao Mo 2016/08/25 18:06:55 You should just use texture->base_level(), and no
+ if (feature_info_->workarounds().reset_base_mipmap_level_before_texstorage) {
+ glGetTexParameteriv(target, GL_TEXTURE_BASE_LEVEL, &base_level);
+ if (base_level > 0)
+ glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, 0);
+ }
// TODO(zmo): We might need to emulate TexStorage using TexImage or
// CompressedTexImage on Mac OSX where we expose ES3 APIs when the underlying
// driver is lower than 4.2 and ARB_texture_storage extension doesn't exist.
@@ -15708,6 +15714,9 @@ void GLES2DecoderImpl::TexStorageImpl(GLenum target,
glTexStorage3D(target, levels, compatibility_internal_format, width, height,
depth);
}
+ if (feature_info_->workarounds().reset_base_mipmap_level_before_texstorage &&
+ base_level > 0)
+ glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, base_level);
{
GLsizei level_width = width;
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698