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

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

Issue 2458103002: Set correct internalformat info for TexStorageEXT according context type (Closed)
Patch Set: use RGBA8_OES for ES2 Created 4 years, 1 month 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_textures.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 c480b71567dca3814c19aeca0b4f7185bc338e42..b32fd3286fe8cecbae49ae82cf11723211aa9508 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -16676,18 +16676,21 @@ void GLES2DecoderImpl::TexStorageImpl(GLenum target,
GLsizei level_height = height;
GLsizei level_depth = depth;
+ GLenum adjusted_internal_format =
+ feature_info_->context_type() == CONTEXT_TYPE_OPENGLES2 ?
+ format : internal_format;
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, internal_format, level_width, level_height,
- 1, 0, format, type, gfx::Rect());
+ texture_ref, face, ii, adjusted_internal_format, level_width,
+ level_height, 1, 0, format, type, gfx::Rect());
}
} else {
texture_manager()->SetLevelInfo(
- texture_ref, target, ii, internal_format, level_width, level_height,
- level_depth, 0, format, type, gfx::Rect());
+ texture_ref, target, ii, adjusted_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 | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698