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

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: re-rebase 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 e5673ab76d54906d8c6688ff7183e50f1754659a..991d525ff7b79a21c7e6434401e8a9b21c22ed3e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -15728,6 +15728,10 @@ void GLES2DecoderImpl::TexStorageImpl(GLenum target,
compatibility_internal_format = format_info->decompressed_internal_format;
}
+ if (feature_info_->workarounds().reset_base_mipmap_level_before_texstorage &&
+ texture->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.
@@ -15738,6 +15742,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 &&
+ texture->base_level() > 0)
+ glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, texture->base_level());
{
GLsizei level_width = width;

Powered by Google App Engine
This is Rietveld 408576698