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

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

Issue 2448083003: Reland of gpu: Clarify sized texture format is available (https://codereview.chromium.org/211718300… (Closed)
Patch Set: diff to reland Created 4 years, 2 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 7d8f292242f731f79343a4b1571b30277d405fe5..82d776f38ff97d81369c1946ea12f130516d8d71 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -16557,22 +16557,24 @@ void GLES2DecoderImpl::TexStorageImpl(GLenum target,
GLsizei level_width = width;
GLsizei level_height = height;
GLsizei level_depth = depth;
- GLenum adjusted_format =
- feature_info_->IsES3Enabled() ? internal_format : format;
+ GLenum adjusted_format = internal_format;
+#if defined(OS_MACOSX)
+ // TODO(dshwang): remove it after fixing the root cause. crbug.com/657532
+ adjusted_format = feature_info_->IsES3Enabled() ? internal_format : format;
+#endif
+
for (int ii = 0; ii < levels; ++ii) {
if (target == GL_TEXTURE_CUBE_MAP) {
for (int jj = 0; jj < 6; ++jj) {
GLenum face = GL_TEXTURE_CUBE_MAP_POSITIVE_X + jj;
- texture_manager()->SetLevelInfo(texture_ref, face, ii,
- adjusted_format,
- level_width, level_height, 1,
- 0, format, type, gfx::Rect());
+ texture_manager()->SetLevelInfo(
+ texture_ref, face, ii, adjusted_format, level_width, level_height,
+ 1, 0, format, type, gfx::Rect());
}
} else {
- texture_manager()->SetLevelInfo(texture_ref, target, ii,
- adjusted_format,
- level_width, level_height, level_depth,
- 0, format, type, gfx::Rect());
+ texture_manager()->SetLevelInfo(
+ texture_ref, target, ii, adjusted_format, level_width, level_height,
+ level_depth, 0, format, type, gfx::Rect());
}
level_width = std::max(1, level_width >> 1);
level_height = std::max(1, level_height >> 1);
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager_unittest.cc ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698