Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp |
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp |
index e8d9ee846d1ac3f0b0e95e7e5915a68a22b34ce5..c3d6afeae6f33c2ecb0f5df2d6a47d7156fd8726 100644 |
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp |
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp |
@@ -929,6 +929,11 @@ void WebGL2RenderingContextBase::compressedTexImage3D(GLenum target, GLint level |
if (!tex) |
return; |
+ if (!tex->isValidLevel(target, level)) { |
qiankun
2015/11/23 12:06:53
Please use validateTexFuncLevel(). You can refer t
|
+ synthesizeGLError(GL_INVALID_OPERATION, "compressedTexImage3D", "level does not valid"); |
+ return; |
+ } |
+ |
if (tex->isImmutable()) { |
synthesizeGLError(GL_INVALID_OPERATION, "compressedTexImage3D", "attempted to modify immutable texture"); |
return; |