| Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| index 0de60d442fa09bf2852f82e317b2e02e28247600..4c7cc57438bcead5516d20fa34c7911ad4e7c9e6 100644
|
| --- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| +++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| @@ -2039,7 +2039,10 @@ void WebGLRenderingContextBase::framebufferTexture2D(GLenum target, GLenum attac
|
| {
|
| if (isContextLost() || !validateFramebufferFuncParameters("framebufferTexture2D", target, attachment))
|
| return;
|
| - if (level) {
|
| + if (isWebGL2OrHigher()) {
|
| + if (!validateTexFuncLevel("framebufferTexture2D", textarget, level))
|
| + return;
|
| + } else if (level) {
|
| synthesizeGLError(GL_INVALID_VALUE, "framebufferTexture2D", "level not 0");
|
| return;
|
| }
|
|
|