Commit 83d22b6605fc5f8b14f111172e25a6ac3b2867b8

Cody Northrop 2021-05-13T16:10:54

Capture/Replay: Skip glGetActiveUniform Apps are querying GL_ACTIVE_UNIFORMS and then walking through them all numerically, calling glGetActiveUniform on each one. Before this CL, our trace would also walk through them all, exactly as the app. But, the active uniform count can vary on different platforms depending on how aggressive the underlying compiler is. We have at least one that does cross stage optimizations eliminating more active uniforms than others. Rather than check each call against the actual number of active uniforms, we can just drop the calls to glGetActiveUniform. We don't actually use any of the results from the call. For example, this is what we generate before this CL: glGetActiveUniform(gShaderProgramMap[144], 31, 1024, reinterpret_cast<GLsizei *>(gReadBuffer), reinterpret_cast<GLint *>(gReadBuffer), reinterpret_cast<GLenum *>(gReadBuffer), glGetActiveUniform_name_30); This has the downside of moving away from reflecting what the app actually sent down. The alternatives are too intrusive though, and we want to stay as close to speed of light as we can. Test: Pokemon Go MEC Bug: b/188091629 Bug: angleproject:5968 Change-Id: I1263f2256c6a964dac54d9997a1c1c2dceac711b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2895327 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>