Bug 1320620 - GL_TEXTURE_2D_ARRAY should zero memory by TexSubImage3D. r=jgilbert draft
authorEthan Lin <ethlin@mozilla.com>
Fri, 09 Dec 2016 16:16:51 -1000
changeset 448377 2587c4e6350af8d415bbceec7f69f1cd5920507d
parent 442499 1a3194836cb4c3da6ba3a9742a2d25cf26669b55
child 539290 6e64c3c9e6d8cee2f83d56a3c7ec105a665eb272
push id38343
push userbmo:ethlin@mozilla.com
push dateSat, 10 Dec 2016 02:24:34 +0000
reviewersjgilbert
bugs1320620
milestone53.0a1
Bug 1320620 - GL_TEXTURE_2D_ARRAY should zero memory by TexSubImage3D. r=jgilbert MozReview-Commit-ID: 5p35oAYmyn5
dom/canvas/WebGLContext.cpp
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -2357,17 +2357,18 @@ ZeroTextureData(WebGLContext* webgl, con
 
         return true;
     }
 
     const auto driverUnpackInfo = usage->idealUnpack;
     MOZ_RELEASE_ASSERT(driverUnpackInfo, "GFX: ideal unpack info not set.");
 
     if (usage->IsRenderable() && depth == 1 &&
-        !xOffset && !yOffset && !zOffset)
+        !xOffset && !yOffset && !zOffset &&
+        target != LOCAL_GL_TEXTURE_2D_ARRAY)
     {
         // While we would like to skip the extra complexity of trying to zero with an FB
         // clear, ANGLE_depth_texture requires this.
         do {
             if (ZeroTexImageWithClear(webgl, gl, target, tex, level, usage, width,
                                       height))
             {
                 return true;