Commit a09dca6847be9ab4476230b155eaea9098509bfc

YuxinHu 2021-09-20T23:40:28

Fix app trace heap buffer overflow During runMidExecutionCapture(), we need to update mMaxAccessedResourceIDs[idType] for idType==ShaderProgram, so that we have enought slot in gShaderProgramMap2 to store the temp shader we create in GenerateLinkedProgram(). Changes in this CL: 1.Renaming Jamie's mMaxAccessResourceIDS array update function updatePreCallResourceCounts() to updateResourceCounts(). 2. Adding updateResourceCounts() to Cody's setup call post processing function scanSetupCalls(). In GenerateLinkedProgram(), we add the temp shader create call with its' tempShaderID into the shareGroupSetupCalls. After that we will run the function scanSetupCalls(), where we will be able to loop through the tempShaderID and update the mMaxAccessResourceIDS[ShaderProgram] with the correct count. Bug: angleproject:6398 Change-Id: Iee78b3b7c1908a90ee8456476902f5e52e4615dc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3172005 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>