Commit 83d22b66 by Cody Northrop Committed by Commit Bot

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: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent 8ea11eb7
...@@ -3610,6 +3610,13 @@ bool SkipCall(EntryPoint entryPoint) ...@@ -3610,6 +3610,13 @@ bool SkipCall(EntryPoint entryPoint)
// There is no need to capture these for replaying a trace in our harness // There is no need to capture these for replaying a trace in our harness
return true; return true;
case EntryPoint::GLGetActiveUniform:
// Skip this call because:
// - We don't use the return values from this call.
// - Active uniform counts can vary between platforms due to cross stage optimizations
// and asking about uniforms above GL_ACTIVE_UNIFORMS triggers errors.
return true;
default: default:
break; break;
} }
......
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