Add detachShader capture calls in MEC This change adds a capture call to detach shader object before deleting the shader object in function GenerateLinkedProgram(), if that is also what the app does. GenerateLinkedProgram() is part of the Mid Execution Capture (MEC), and the purpose of the MEC is to setup a program that more closely mirrors the original app. The game World Cricket Championship2 detaches the shader object before deleting the shader object. With this change, we can follow the same behavior in GenerateLinkedProgram(). This ensures that the Shader Object refcount is decremented to 0 before the CaptureDeleteShader call is applied, and the ShaderProgramID handle assigned to the Shader Object will be released and can be reused for subsequent glCreateShader calls. The total number of ShaderProgramID we need will be consistent between SetupReplayContextShared() and the game uses. We are allocating memory slots for gUniformLocations2 array based on the total number of ShaderProgramID the game uses. Keeping the ShaderProgramID counts the same between trace replay and the game ensures we allocate the right amount of memory for the trace replay. Bug: angleproject:6621 Bug: b/194508692 Change-Id: Ib2810b486a6e9108db2a32f084d650a25f14bebd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3246533 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>