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

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

Issue 2510163003: Initialize depth texture using tex{Sub}Image2D except for ANGLE ES2 (Closed)
Patch Set: 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 | no next file » | 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 bb2c85e8bf60d4f0e8d93d5fecae46ea2a018827..56c1716f5b2a4658240aff28bd58b5be4a30e117 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -12199,11 +12199,11 @@ bool GLES2DecoderImpl::ClearLevel(Texture* texture,
DCHECK(target != GL_TEXTURE_3D && target != GL_TEXTURE_2D_ARRAY &&
target != GL_TEXTURE_EXTERNAL_OES);
uint32_t channels = GLES2Util::GetChannelsForFormat(format);
- if ((feature_info_->feature_flags().angle_depth_texture ||
- feature_info_->IsWebGL2OrES3Context())
- && (channels & GLES2Util::kDepth) != 0) {
+ if ((channels & GLES2Util::kDepth) != 0 &&
+ feature_info_->feature_flags().angle_depth_texture &&
+ feature_info_->gl_version_info().is_es2) {
Kai Ninomiya 2016/11/17 20:41:22 I think the logic here is valid but doesn't quite
Zhenyao Mo 2016/11/17 20:46:58 You are right. I can move feature_info_->feature_
// It's a depth format and ANGLE doesn't allow texImage2D or texSubImage2D
- // on depth formats.
+ // on depth formats in ES2.
GLuint fb = 0;
glGenFramebuffersEXT(1, &fb);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fb);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698