Bug 1300946 - Only clear TFO indexed bindings on delete if TFO is inactive. - r=ethlin a=ritu
authorJeff Gilbert (:jgilbert) <jgilbert@mozilla.com>
Mon, 19 Sep 2016 13:25:06 -0700
changeset 358065 f2ec118dca15813a344b599252fd2066929f5c97
parent 358064 10d4c1119501dac47d2a75d0aa0be94b5818cdd9
child 358066 1a2156ed87746d7932c26aeffde5b08ae1429274
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersethlin, ritu
bugs1300946
milestone51.0a2
Bug 1300946 - Only clear TFO indexed bindings on delete if TFO is inactive. - r=ethlin a=ritu MozReview-Commit-ID: JNG2I3saqva
dom/canvas/WebGLContextBuffers.cpp
--- a/dom/canvas/WebGLContextBuffers.cpp
+++ b/dom/canvas/WebGLContextBuffers.cpp
@@ -506,18 +506,20 @@ WebGLContext::DeleteBuffer(WebGLBuffer* 
     if (IsWebGL2()) {
         fnClearIfBuffer(mBoundCopyReadBuffer);
         fnClearIfBuffer(mBoundCopyWriteBuffer);
         fnClearIfBuffer(mBoundPixelPackBuffer);
         fnClearIfBuffer(mBoundPixelUnpackBuffer);
         fnClearIfBuffer(mBoundUniformBuffer);
         fnClearIfBuffer(mBoundTransformFeedback->mGenericBufferBinding);
 
-        for (auto& binding : mBoundTransformFeedback->mIndexedBindings) {
-            fnClearIfBuffer(binding.mBufferBinding);
+        if (!mBoundTransformFeedback->mIsActive) {
+            for (auto& binding : mBoundTransformFeedback->mIndexedBindings) {
+                fnClearIfBuffer(binding.mBufferBinding);
+            }
         }
 
         for (auto& binding : mIndexedUniformBufferBindings) {
             fnClearIfBuffer(binding.mBufferBinding);
         }
     }
 
     for (int32_t i = 0; i < mGLMaxVertexAttribs; i++) {