src/libANGLE/frame_capture_utils.cpp


Log

Author Commit Date CI Message
Jamie Madill ea3f501e 2020-08-18T11:13:33 Feedback Loop Redesign 3/3: Remove feedback loop tracking. We now we detect feedback loops by tracking the Framebuffers that the Texture is bound to. We still have the old tracking method that counts sampler and image bindings in the code as well. This CL removes the old front-end tracking for feedback loops. It's no longer used by any back-ends. This removal should reduce CPU overhead around Texture and Program binding changes. Reverts the image binding tracking to the simpler scheme that tracks if a Texture has ever been bound as an Image. This should practically have little or no perf effect and we can reinstate some simpler tracking in the future if required. Bug: angleproject:4500 Bug: angleproject:4959 Change-Id: Idc625d6e4c519919f97a4dc72dd9c35d262706fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2363210 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Tim Van Patten 81370214 2020-07-29T12:54:02 Pass the Command when sync'ing dirty objects A new enum is being created that contains command types, which are then passed to each dirty object when they are synced. This allows the syncState() methods to perform special handling for each command type. This change is in preparation for optimizing resolving multisample images with glBlit, since the render pass needs to be updated before it's ended. Bug: angleproject:4753 Change-Id: I77701f79418d35cff689e864c8a8b47b6fca0255 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2327335 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Manh Nguyen 846cd169 2020-07-30T22:11:12 Add vertex array serialization capability Serializes vertex arrays' states stored on CPU. Adds vertex array serialization to serializeContext method so that capture replay regresssion testing now compares the states of vertex array objects too. Bug: angleproject:4817 Change-Id: Ia2897c056adff9bd433765186240ab07f78db232 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2331737 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Manh Nguyen be6a1d87 2020-07-29T10:15:28 Add texture serialization capability Serializes textures' states stored on CPU. Gets textures' contents at every mipmap level from GPU then serialize them. Adds texture serialization to serializeContext method so that capture replay regresssion testing now compares the states of texture too. Bug: angleproject:4817 Change-Id: I87670fdc744f96d4ff244462dee1a065de44f9b7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2325029 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Manh Nguyen fba96e90 2020-07-30T10:04:59 Add shaders and programs serialization capability Serializes shaders and programs' states stored on CPU. Adds shaders and programs serialization to serializeContext method so that capture replay regresssion testing now compares the states of shaders and programs too. Bug: angleproject:4817 Change-Id: I026762ffcd85c9cf209f17d02025730aa286bd2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2329830 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Manh Nguyen aca14d47 2020-07-29T13:52:28 Add renderbuffer serialization capability Serializes renderbuffers' states stored on CPU. Gets renderbuffers content from GPU then serialize them. Adds renderbuffers serialization to serializeContext method so that capture replay regresssion testing now compares the states of renderbuffers too. Bug: angleproject:4817 Change-Id: I537b11ee85decb14eea461ebbd62ce6ab0402f85 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2327173 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Manh Nguyen 2918eade 2020-07-28T13:08:05 Remove context id serialization Serializing context id causes many tests to fail capture replay test. Remove it from the the GL context state's serialization. Bug: angleproject:4817 Change-Id: Ide04f24c54d1f1fced532e49e85c0c2970816f5e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2323645 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Manh Nguyen 50a27257 2020-07-22T22:14:16 Adds sampler serialization capability Adds the ability to serialize sampler objects. Adds serialization of sampler objects to serializeContext method so that capture replay regression testing now compares the states of samplers too. Bug: angleproject:4817 Change-Id: Ic32d442eac9aa3afc5c9eea577522fe7054a755a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2315048 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Manh Nguyen db88baa8 2020-07-23T11:12:46 Serializes GL context states and reformats frame_capture_utils Adds the ability to serialize GL context states. Adds serialization of GL context states to serializeContext method so that capture replay regression testing now compares the GL context states. Reformats frame_capture_utils to make most serialization methods private, except for the ones called by other classes and template methods. Bug: angleproject:4817 Change-Id: I2d53c88be3d503268bd6e2e5058b5fabe0644f67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2314829 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Manh Nguyen dc9743fb 2020-07-14T11:33:29 Add buffer serialization capability Serializes buffers' states stored on CPU. Gets buffers contents on GPU by mapping buffers to CPU's address space, then copy their data. Unmap buffers after finish. Since this feature is for tests only, it is only implemented for the Vulkan backend. Adds buffer serialization to serializeContext method so that capture replay regresssion testing now compares the states of buffers too. Bug: angleproject:4817 Change-Id: Ic9b529701014d5ba8420023a021cd5ea381bd9a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2295950 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Manh Nguyen 900c7e87 2020-07-07T14:20:36 Serialize d/s buffers + use color buffers' impl format for readPixels Adds serialization of depth/stencil buffer contents Currently, readPixels on color buffers uses the gles front-end format, which can be different from the implementation format used in the backend. This can cause seg fault crashes when the number of bytes in a pixel differs between the two format. Changes so that readPixels for color buffers always use the backend format. Bug: angleproject:4817 Change-Id: I62d5deb1320ea38ee46143b2aa97f372ba01baeb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2284451 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Manh Nguyen 05e2fe78 2020-07-03T12:25:01 Remove class size static_asserts from serialize methods Right now, the static_asserts will fail on certain platforms with certain configurations as the class sizes differ between platforms. Bug: angleproject:4779 Change-Id: I92f61393b2e9e5b7d6dc9085b1a42cb377143469 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2280987 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Manh Nguyen dce37b7d 2020-06-21T22:27:06 Serialize framebuffers + compare contexts for CaptureReplayTests Adds to frame capture the ability to serialize a frame's pre-swap GL state and store it in the binary data file Adds to CaptureReplayTests the ability to compare its serialized GL state with the serialized state pulled from the binary data file Adds a serialization module that serializes framebuffers' GL states and the contents of their color attachments Adds checks to automation script so that it would skips tests that do not produce the expected trace files Adds exception handling to automation script so that it will not crash when a replay build crashes Bug: angleproject:4779 Change-Id: I40a02e018073749e79f0ddbfd3d4065745548f46 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2258295 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>