util/capture/frame_capture_test_utils.h


Log

Author Commit Date CI Message
Cody Northrop b0739436 2023-02-13T14:28:17 Traces: Add key frame support Allow specifying a key frame in the trace JSON, i.e: "KeyFrames": [ 20 ], This allows our infra to use a frame other than 1 when taking screenshots for quality comparison. Adds new flag `--run-to-key-frame`, which will stop the trace once key frame has been reached. If no key frame in JSON, frame 1 will be used. Note the name in JSON is plural, but we only support one key frame for now. Multiple key frame support can come in the future. This CL also updates the code to allow ending traces early with `--max-steps-performed` which has been broken since http://crrev/c/4008998 It also removes `--one-frame-only` which is superseded by `--run-to-key-frame`, and can be replicated using `--max-steps-performed 1`. Test: angle_trace_tests --gtest_filter="*tmnt_shredders_revenge*" Bug: angleproject:8035 Bug: b/270426257 Change-Id: Ib02ef60d887ae5efb0288f5a9b8c2914dafc6efc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4284637 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 5ca36d3c 2023-01-05T15:16:35 Trace Interpreter: Properly support resource ID maps. Previously we were using the key value as the resource value. In some cases these values would become mismatched when running a replay, which would cause interpreter errors. Bug: angleproject:7887 Change-Id: I7f8e687986e8282a6df066bdae5ace07e4510b47 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4140258 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e5e78ab4 2022-12-29T13:16:13 Trace Interpreter: Auto-gen ReplayCustomFunctionCall. This makes it easier to add or remove fixture functions. Bug: angleproject:7775 Change-Id: I1c56465cfa0580414715f562cadc916c4baf3d11 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4128718 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Sean Risser f3e047b5 2022-10-12T16:28:32 Add new retrace command get_min_reqs `retrace_restricted_traces.py get_min_reqs` finds the minimum required GLES version and extensions and record them to a trace's json file. TracePerfTest has also been modified to use the new "RequiredExtensions" json field to determine if it should run a test or not. This allows several lines to be removed from TracePerfTest's constructor. get_min_reqs uses a divide-and-conquer strategy to find the extensions. This approach should be faster for traces where the number of required extensions is less than 20. This adds a new command to retrace_restricted_traces.py called get_min_reqs. This runs an existing trace multiple times to find what the minimum required GLES version is, then records that version to the trace's json file. Bug: angleproject:7639 Change-Id: I42530e438054efec1ad79ababebe06d221d5c695 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3884175 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Sean Risser <srisser@google.com>
Jamie Madill dc62b3ee 2022-10-10T21:00:16 Capture/Replay: Add trace interpreter. Also adds a self-test using the retrace script. Bug: angleproject:7752 Change-Id: I1985b47250bef99726d2ca2d90bef859208e357e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3965128 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill 6193274a 2022-10-10T21:00:12 Capture/Replay: Redesign in-memory call capture replay. This will allow the replay to use the call captures returned by the interpreter's parser. Bug: angleproject:7752 Change-Id: If1b281d9ce7ccfbdc23bea615e1e2258c8a029f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963367 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Roman Lavrov 4b33633a 2022-08-26T16:16:50 Capture/Replay: Delete binary data in FinishReplay via callback Delete callback fixes b/179188489 as delete[] will get called from the same module where allocation happens. When decompress/delete callbacks not provided, new[] and delete[] are called from the fixture. AFAICT, gBinaryData == nullptr every time, even with a single test and --gtest_repeat=N, so we never delete the uncompressed data. When running multiple tests locally, I see RES usage grow significantly on Linux which this CL fixes. I don't think this matters for bot runs as we run tests one by one there. Bug: b/179188489 Change-Id: Iee3bccb9d6d72c315c4358b70ec9c3c0ac963258 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858185 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 153d8db9 2022-06-06T13:49:40 Turn missing {trace_name}.json trace files into test failures. Before this change, a missing or broken trace json file results in all trace tests "disappear" from the list with only ERR in logs. After this change, a missing or broken trace json will result in that specific test FAIL status and error in logs. Note that this also allows for inconsistency between restricted_traces.json and trace json files on the device because we're no longer requiring for trace json to be loaded unless the test is actually being run. Bug: angleproject:7410 Change-Id: I07532dc0bf85a0d2fcaf425ce8d4a589473a898d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3690734 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Peter Kasting 2ce60b52 2022-05-05T08:23:07 Fixes for C++20 support. * The compiler grew smart enough to warn about value changes due to casting to float inside floatToNormalized(). Make it smart enough to realize this isn't a problem by using constexpr if. * Types on both sides of a comparison operator should be the same. * Structs with user-declared constructors are no longer aggregates. Provide a constructor and call it. * std::result_of<F(x)> is gone, use std::invoke_result<F, x> instead. Bug: chromium:1284275 Change-Id: I6487bb18c65837a6d7d2661f65e097dc6a7605b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3630478 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org>
Jamie Madill 2f3e4db8 2021-09-02T10:31:13 Capture/Replay: Serialize trace metadata to a JSON file. This will allow us to remove more code auto-generation for the trace tests. The trace info now can be loaded directly from JSON instead of from the autogenerated information. Bug: angleproject:5133 Change-Id: I04e22b9279b19282df274bc8defcd363d0449111 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140218 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>