Commit 56eb961f5da652bcc3251781751090be7490fea7

Roman Lavrov 2023-01-17T17:03:39

Revert "Capture/Replay: Capture the attr locations as set by the program" This reverts commit 585d2a9e5c546c7aa59b987da6c70d310cccd3ee. Reason for revert: glBindAttribLocation calls added by frame capture, even when location was not set explicitly, are currently necessary for replay stability across different platforms. Example from a trace: glGetAttribLocation(gShaderProgramMap[24], "position"); ... glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 112, nullptr); Note how "0" is hard-coded instead of using the value returned by glGetAttribLocation above, and that can be different on a different platform. This was resolved before this CL by calling glBindAttribLocation to map "position" to 0, and after this CL glBindAttribLocation calls are missing from the trace and we end up with inconsistent native replays (found in Android b/265429003) Original change's description: > Capture/Replay: Capture the attr locations as set by the program > > Setting the attribute location based on the input declaration > results in a discrepancy with MEC when recording the context state, > because if a location was never set explicitely, the captured > context state will hold no attribute location information, but > since calls were recorded to set the default attribute locations, > the context state recorded during replay will contain these extra > entries. > > To avoid this, only record the attribute locations that were > explicitely set. > > Bug: angleproject:7564 > Change-Id: Ib9d6c7b098935d199921e0fe5c0ef985e6187f1b > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3827345 > Commit-Queue: Gert Wollny <gert.wollny@collabora.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> Bug: angleproject:7564 Bug: angleproject:7964 Bug: b/265429003 Change-Id: I4f97c8162601cc1b749bbc8a06851561654205e6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4172756 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>