Bug 1320620 - GL_TEXTURE_2D_ARRAY should zero memory by TexSubImage3D. r=jgilbert
MozReview-Commit-ID: 5p35oAYmyn5
--- 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;