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

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

Issue 2117183006: gpu: Clarify sized texture format is available only if ES3 context or immutable texture is supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rely on right extension Created 4 years, 5 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 | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/texture_manager.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 3491223854744ffe23d1136248aabeb49e2ca252..96d0a336604771df8cd9e843565dbf37c615601e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -15096,22 +15096,18 @@ 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;
dshwang 2016/10/10 15:45:49 Remove this hack. Rationale 1. After ES3 support,
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, internal_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, internal_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/feature_info.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698