Bug 1136508 - Remove redundent READ_BUFFER != NONE validation. - r=mtseng
authorJeff Gilbert <jgilbert@mozilla.com>
Wed, 13 Jul 2016 00:50:45 -0700
changeset 304924 13d68716249bee54c5c1e8785871557f62ebb186
parent 304923 190fa9a5f989a43f93295d8364ac83f6e6c1e4e1
child 304925 1620c8f330a36f2d60f1acbb05aff606e622a388
push id30447
push usercbook@mozilla.com
push dateThu, 14 Jul 2016 09:46:02 +0000
treeherdermozilla-central@08f8a5aacd83 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmtseng
bugs1136508
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1136508 - Remove redundent READ_BUFFER != NONE validation. - r=mtseng MozReview-Commit-ID: D1yZ4m6p8Wk
dom/canvas/WebGLTextureUpload.cpp
--- a/dom/canvas/WebGLTextureUpload.cpp
+++ b/dom/canvas/WebGLTextureUpload.cpp
@@ -1974,25 +1974,16 @@ WebGLTexture::CopyTexImage2D(TexImageTar
     if (!mContext->ValidateCurFBForRead(funcName, &srcUsage, &srcWidth, &srcHeight,
                                         &srcMode))
         return;
     auto srcFormat = srcUsage->format;
 
     if (!ValidateCopyTexImageForFeedback(funcName, level))
         return;
 
-    // GLES 3.0.4 p145:
-    // "Calling CopyTexSubImage3D, CopyTexImage2D, or CopyTexSubImage2D will result in an
-    //  INVALID_OPERATION error if any of the following conditions is true: READ_BUFFER
-    //  is NONE"
-    if (srcMode == LOCAL_GL_NONE) {
-        mContext->ErrorInvalidOperation("%s: READ_BUFFER is NONE. ", funcName);
-        return;
-    }
-
     ////////////////////////////////////
     // Check that source and dest info are compatible
 
     const auto dstUsage = ValidateCopyDestUsage(funcName, mContext, srcFormat,
                                                 internalFormat);
     if (!dstUsage)
         return;
 
@@ -2118,25 +2109,16 @@ WebGLTexture::CopyTexSubImage(const char
     if (!mContext->ValidateCurFBForRead(funcName, &srcUsage, &srcWidth, &srcHeight,
                                         &srcMode))
         return;
     auto srcFormat = srcUsage->format;
 
     if (!ValidateCopyTexImageForFeedback(funcName, level))
         return;
 
-    // GLES 3.0.4 p145:
-    // "Calling CopyTexSubImage3D, CopyTexImage2D, or CopyTexSubImage2D will result in an
-    //  INVALID_OPERATION error if any of the following conditions is true: READ_BUFFER
-    //  is NONE"
-    if (srcMode == LOCAL_GL_NONE) {
-        mContext->ErrorInvalidOperation("%s: READ_BUFFER is NONE. ", funcName);
-        return;
-    }
-
     ////////////////////////////////////
     // Check that source and dest info are compatible
 
     if (!ValidateCopyTexImageFormats(mContext, funcName, srcFormat, dstFormat))
         return;
 
     ////////////////////////////////////
     // Do the thing!