Commit 1a07524d by Qin Jiajia Committed by Commit Bot

Fix the misuse of deepCopy()

When we use replaceChildNode function, the first argument must be the original child node instead of the deepCopy. Otherwise, replaceChildNode will do nothing since it will think deepCopy is a different node. In that case, RewriteExpressionsWithShaderStorageBlockTraverser::visitAggregate will enter an endless loop since ssbo argument is never really replaced. Test: dEQP-GLES31.functional.ssbo.* Bug: angleproject:1951 Change-Id: Ieb17a16ab2b3e0270328fafd7ba0944ca05f842f Reviewed-on: https://chromium-review.googlesource.com/c/1446686Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
parent 48d040e8
...@@ -302,7 +302,7 @@ bool RewriteExpressionsWithShaderStorageBlockTraverser::visitAggregate(Visit vis ...@@ -302,7 +302,7 @@ bool RewriteExpressionsWithShaderStorageBlockTraverser::visitAggregate(Visit vis
readBackToSSBOs.push_back(readBackToSSBO); readBackToSSBOs.push_back(readBackToSSBO);
} }
} }
node->replaceChildNode(ssboArgument->deepCopy(), argumentCopy); node->replaceChildNode(ssboArgument, argumentCopy);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment