util/capture/frame_capture_test_utils.cpp


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 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>
Jamie Madill 85de4f81 2021-12-29T13:06:27 Capture/Replay: Fix TODO in test utils. This code is no longer needed. Bug: angleproject:5133 Change-Id: I06f05b390f36c9d49deaabe8201764968ef3172c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3360782 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 8770cefc 2021-10-04T13:47:23 Capture/Replay: Store enums to JSON as hex We're storing some enums in the per-trace JSON as decimal. This makes them difficult to read, i.e.: "DisplayDeviceType": 12810, "DisplayPlatformType": 13392, "DrawSurfaceColorSpace": 12425, If we instead convert them to hex, they are much easier to read and grep the source for. "DisplayDeviceType": "0x320A", "DisplayPlatformType": "0x3450", "DrawSurfaceColorSpace": "0x3089", Since JSON doesn't actually support hexadecimal values, this CL stores them as strings. Ideally we could take this a step farther and store the enum directly in JSON, but we have no facilities for converting a string back to an enum. Bug: angleproject:5133 Bug: angleproject:6515 Change-Id: I7b5d4dc8958d43c611da1fe98887e089f3d855b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3204135 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
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>