Commit 22c9596456866cd0e55df4c5e8f1bef2727959cb

Cody Northrop 2020-06-04T17:00:52

Capture/Replay: Support buffer map/unmap state during MEC Angry Birds 2 is the first app we've targeted that maps buffers across frame boundaries. This exposed some gaps and assumptions we had in the code, and required additional support for MEC. To support this, we track each buffer's starting map/unmap state and how it changes throughout the trace. Then during Reset, we emit calls to return them to the correct state: void ResetContext3Replay() { ... glBindBuffer(GL_ARRAY_BUFFER, gBufferMap[546]); glUnmapBuffer(GL_ARRAY_BUFFER); glBindBuffer(GL_ARRAY_BUFFER, gBufferMap[550]); gMappedBufferData[gBufferMap[550]] = glMapBufferRange(GL_ARRAY_BUFFER, 0, 8192, GL_MAP_WRITE_BIT); ... } Test: MEC of Angry Birds 2 Bug: angleproject:4599 Bug: b/157672184 Change-Id: I5c73ca4d4eba7f1ecea01467ae887bae7f2d27fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231803 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>