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

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

Issue 1236053003: texture mipmap level is not zero-only in ES 3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed zmo@'s feedback Created 5 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
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index c7150ee98eee936d0c174cd9246505cbc691eefe..fd6301b9b0fbfd1b283abea5d6a9597d8f679ea2 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -1436,6 +1436,8 @@ scoped_refptr<TextureRef>
bool TextureManager::ValidForTarget(
GLenum target, GLint level, GLsizei width, GLsizei height, GLsizei depth) {
+ if (level > 0 && !feature_info_->IsES3Capable())
Zhenyao Mo 2015/07/21 21:25:05 This is the wrong place for this validation. We o
+ return false;
GLsizei max_size = MaxSizeForTarget(target) >> level;
return level >= 0 &&
width >= 0 &&

Powered by Google App Engine
This is Rietveld 408576698