src/tests/perf_tests/ANGLEPerfTest.cpp


Log

Author Commit Date CI Message
Cody Northrop 913bc473 2021-05-07T11:37:01 Tests: Add --fixed-test-time option Similar to --max-steps-performed, don't do any calibration and just run flat out for a fixed amount of time. Also rename --test-time to --max-trial-time to reflect what the parameter actually does, limiting each trial to a ceiling. Also remove a redundant check in doRunLoop. Test: angle_perftests --fixed-test-time 20 Test: angle_perftests --max-trial-time 2 Bug: angleproject:5935 Change-Id: I854799a734cd6c019399f5a1444b4ef5f659ddf4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2878937 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 68f06888 2021-03-23T16:38:50 Perf Tests: Trigger test failure on API errors. A prior refactor had broken the method we used to cause test steps to fail on API errors. This CL restores the path. We detected this when analyzing a particular GLES trace that contained invalid GLES calls. Bug: angleproject:5788 Change-Id: I26940e49cf73ce6050ea6ee274d5c5748835a167 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2782008 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 78dde332 2021-03-29T17:31:52 Move restricted traces to CIPD. All traces are now stored as DEPS entries in CIPD. The auto-generation script generates the DEPS entries. Note that we don't include DEPS in the list of generated outputs to simplify other rollers. Also we update auto-generation to include full sources list to allow 'gn analyze' to work successfully. Usees a trace fixture for common code. This will enable a more compact trace without as much repeated code. We must land a set of re-trace traces to avoid breakage. Also includes a python script for uploading new traces to CIPD. The script first checks if traces are already present in the cloud, and if so it skips the upload. It will take a while to complete as the number of traces grows larger as it takes a few seconds per trace. The traces in this patch are also re-traced to use the common fixture code instead of including duplicated code in each trace. They now form a simple common interface and the autogenerated cpp is now simply a list of properties. I've also updated the capture/replay tests to use the simpler common entry point integration. There is less auto-generated glue code now. We now use a new serialized string query extension instead of calling directly into ANGLE's internals. Also includes a docs update. The capture/replay sample is broken and we'll need to update it in a follow-up CL. Also includes a few necessary fixes to the retracing script. Bug: angleproject:5811 Change-Id: I977bc6dc56843c8966377fc445ae97e91e17319a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2797833 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 2c685a41 2021-02-03T11:20:20 Fix the perf test runner calibration. This path was broken for the white box unit tests. Also adds argparse handling to the runner so we can more flexibly override command line arguments. Previously the broken calibration was causing some of the tests to run only a single test iteration when measuring. This could lead to low quality measurements. Bug: angleproject:5573 Change-Id: Ic1cb2b2553774a361325f290440c40b2ff90db5e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2672702 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill ae5a2047 2020-11-20T16:31:32 Trace Tests: Screenshot within the render loop. Previously we were using a separate mechanism to capture screen shots. This would cause very long traces to replay the entire trace before normal execution. The Maps trace used hundreds of frames and this was timing out the test step. Instead we can capture a screenshot after the first time we run a trace. This will normally not interfere with performance work because we don't usually capture screenshots and do performance work at the same time. Bug: b/172977194 Change-Id: I12cfe2d051d41f1e000a98ac8aef16eb153879c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552925 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 202304e7 2020-11-17T17:33:47 Trace Tests: Add renderer string logging. This outputs the GL_RENDERER string in each test when using the --verbose-logging command-line flag. Bug: b/173518650 Change-Id: Id966294d50aaba0c8a1f3e010f76d5560e6f1288 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2545403 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8b76d37f 2020-11-17T17:33:47 Trace Tests: Run one step per frame. Instead of trying to make one step take one sequence of frames, one run step per frame always. This will scale better for traces that are very long and cannot complete in the short times we use on the bots. Adds an explicit step round-up feature so that we can always run chunks of full trace sequences when we are not running with a fixed maximum number of steps. Bug: b/172977194 Change-Id: I0f069a66a86d8c4a698ebffb66782d13843539a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2545884 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fb34c93d 2020-11-09T19:30:17 Perf Tests: Add mutex around trace events. This prevents a race where two threads try to write events simultaneously. Bug: b/172704839 Change-Id: Idd2f3b1c2a393488ea2270b91d579dc8630e59d5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2533496 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 489f2c83 2020-11-06T17:24:28 Perf Tests: Trace multiple threads. This uses a little helper list to map thread IDs into simple serials that we output as 'tid' in our trace JSON file. We can use this to analyze the behaviour of the command processor thread. Bug: b/172704839 Change-Id: Ic1b5f3ec8427cb310833d1f589503daec4812681 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2524542 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 06eaaac5 2020-11-06T16:33:13 Fix trace writing in angle_perftests. We can use this to produce AGI-like reports in standalone desktop. Bug: b/172704839 Change-Id: Ifc510232e3da81210e22429b6cea9800e2723e06 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2524540 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4323ed0c 2020-11-06T12:45:12 Perf Tests: Fix test time with max steps performed. This lets the default test time be 10 minutes when using a maximum steps value. This will prevent the current 10 second limit from kicking in and aborting. Also changes the --test-time override to be more clearly a calibration time, and adds a new --test-time that lets the user override the actual trial test time. Bug: b/172480147 Change-Id: I630aa8d3c9e118bb5f0100b38f37e717e12f3538 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2523371 Reviewed-by: Paul Thomson <paulthomson@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill af16c638 2020-11-06T09:50:51 Perf Tests: Add --max-steps-performed argument. This will limit the total number of steps run in the test. When using this argument we skip warmp & calibration. Renames the prior --steps argument to --steps-per-trial. Bug: b/172480147 Change-Id: Iae7cce26d66ca0bbdb21c1f511a6bfa246bd204e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519404 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 3e5b6f81 2020-10-31T12:33:28 Enable writing histogram-set-json-format. This uses the protobuf histogram functionality to build up a histogram set. The test suites then output the histograms to JSON. This is only implemented for angle_perftests. Bug: angleproject:5161 Change-Id: Ia5a7868e8d8dcf4f13d83115ae622828c63ef0d9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482295 Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 77defeb0 2020-10-27T18:31:53 Add the ability to re-trace existing traces. This new script runs the ANGLE trace tests with capture enabled to generate updated replay cpp files. This allows us to update our traces files to a new file format in one step. Trace metadata (currently only the default FBO format) is preserved between re-traces. Currently only desktop-based retracing is supported. This means a couple traces that require specific extensions don't run on all platforms. Bug: angleproject:5134 Change-Id: I7c923d89e33c18285ab36a7cee91f2fb735758eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488130 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 626a4185 2020-10-27T18:31:52 Trace Tests: Allow runs against SwiftShader. SwiftShader can allow for a platform-indendent replay. This is useful for re-tracing. By default disable the SwiftShader test configs unless we pass in --enable-all-trace-tests. Also disable the mock ICD trace tests by default. Bug: angleproject:5134 Change-Id: Ibf1f3ebd6c17f15123705b7d4d9ddd6308f873f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2502311 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 5eebf3a7 2020-10-18T11:44:27 Perf Tests: Call finish every step in calibration. Calibration is only supposed to take one second of warmup time. Instead we were queuing up a large amount of GPU work and then janking on the finish call at the end of calibration. Fix this by calling glFinish repeatedly during calibration. Bug: chromium:1136900 Change-Id: Idb2fefe17fcb9acbe688cff5a36f051732fc5b59 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2483462 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 51ff0d05 2020-10-16T11:54:04 Trace Tests: Add vsync-limited mode with a GPU timer. Local testing on Linux shows that ANGLE and native have the same wall-time, and ANGLE has a 10 ms vs native 6 ms GPU time. Bug: angleproject:5183 Change-Id: I26da678b984af916bfb40e1db6416f5df4f85c08 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2480782 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill a22a19a4 2020-10-04T13:16:46 Add a --no-finish option to the perf tests. We can use this to re-capture replays. Bug: angleproject:5134 Change-Id: I765e0bbb66cfdd822ffa981f2b5533157d024cac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449161 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 974c2371 2020-10-04T12:22:38 Perf Tests: Run at least 1 step. We could end up in some very slow scenes (e.g. when debugging). This could produce a step count of zero which doesn't make sense. Noticed while capturing the T-Rex replay. Bug: angleproject:5134 Change-Id: Ibf2439961dfb3c01649dcab37acead7b6e2ab345 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449160 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill f8e5b97e 2020-09-28T23:31:41 Additional perf test cleanup & functionality. Adds several new command line arguments and documents all args in the README. Changes the trace tests to output milliseconds. Bug: b/169600938 Change-Id: Ie8c7840a6a8958951992c806979dde6dc7d8a709 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2438194 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 5ec560fb 2020-09-17T17:18:25 Add restricted trace golden image script test. The script reads the list of tests from the restricted traces JSON and runs angle_perftests once for each test. Running the tests in a batch seems unstable on some platfroms so running each test separately works around that limitation. It does not yet interact with Skia Gold. The Gold integration will come later once this basic skeleton is running on the bots. Also updates the perf tests to exit more quickly with --one-frame-only. This will speed up the screenshots. Example run with trigger.py: https://chromium-swarm.appspot.com/task?id=4ecb985330a33910 Bug: angleproject:4090 Bug: b/168049670 Test: tested with trigger.py Change-Id: I52820dfba2acfbc5d638673c37297877e8476adb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2417641 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill a2d670c5 2020-08-15T21:13:33 Run trace tests against Vulkan Mock ICD. Required an upstream fix: https://github.com/KhronosGroup/Vulkan-Tools/pull/437 Also a workaround filed as an issue: https://github.com/KhronosGroup/Vulkan-Tools/issues/445 Bug: angleproject:4950 Change-Id: I21333464d2a8e52d5d85d35654f0e6372f9650db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2358517 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ba7f8913 2020-09-12T23:23:01 Samples: Enable Debug callback. This moves the debug callback code into a common location. For ease of access it's in shader_utils since that file has access to the GL API. Bug: angleproject:5040 Change-Id: Iab9de47c2d520a5618ea6825852f8afa63565c8a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2408715 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill e89eb912 2020-08-12T11:21:07 Reduce spam in native perf tests. The QC driver was repeating HIGH priority messages about map flags. Bug: angleproject:4943 Change-Id: I927c38249f840544a7c1f5e595fa34e706e401bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2352472 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 48d951e2 2020-07-30T15:32:03 Perf Tests: Handle logError callback. This will force errors when ANGLE runs into Vulkan Validation Layer failures and other internal bugs. Currently we could sometimes fail silently. Especially on Android where the error would only show up in logcat. Bug: angleproject:4909 Change-Id: Ie2888805c577d9fbad417d45a33e3269966b7b25 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2330091 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 2d0265fa 2020-08-02T12:01:46 Trace Tests: Scale results based on frames in capture. This now reports averaged time per frame instead of per "step". Scores in general will be divided by 11. Results still reported in nanoseconds. Bug: angleproject:4920 Change-Id: I6f9dca75885cce358c3c7d1e871441969d8aa3d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334095 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bba8daea 2020-07-27T20:07:53 Perf Tests: Use timestamp queries for GPU time. Testing shows that using timestamp queries and deferring the query get calls until after the frame produces little overhead. Also this fixes a missing GPU time reset between iterations. Bug: angleproject:4879 Change-Id: I2a566548add1536aab689cd969594a15f0628da3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321573 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4e577a2a 2020-07-15T15:50:06 Perf Tests: Make "offscreen" a common test param. This will let us use it in the trace perf tests. Bug: angleproject:4845 Change-Id: I6188a0765c6f482bb38842faa4c58209c70b0153 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2300206 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4e7a6a69 2020-07-15T19:35:43 Perf Tests: Fix trace test calibration. The trace tests were including the startup time in their calibration calculations. Then was forcing them to always render one step. This fixes the calibration to attempt to get a more consistent measurement. The trace tests now render many more steps than they did before. It should increase the stability and decrease variance in our measurements as they will be runnnig many more frames than before. Also adds a verbose logging flag to help debugging. Noticed this bug when working on the trace test offscreen mode. Bug: angleproject:4845 Change-Id: Iff0c987008a935e7051fca34ef12f4433eb46092 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2300205 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jordan Bayles 1265dbe6 2020-06-24T15:12:17 Update JsonCpp usage This patch updates usages of the JsonCpp library, including the following changes: 1. Removed unused version variable from the DEPS file. 2. Removed deprecated writer and reader usages, in favor of the new builder pattern inside JsonCpp. 3. Modernized usage of the Json::Value types, including some rewrites to avoid unnecessary heap allocations, and using the new foreach iterators. Bug: chromium:983223 Change-Id: If26abc8be677d905183a23498fbb81256854525c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2265093 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill aad69df9 2020-06-11T13:27:52 Run TracePerfTests in WGL configs. Uses the "native" naming pattern. Bug: angleproject:4728 Change-Id: I28cafcdb8c5c1fb48bba51adeca641e88bfe3446 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241619 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6de7ee52 2020-05-25T17:00:01 Clean up overlay RenderPass count reporting. This fixes the trace perf test to accurately report how many RPs in each frame. Instead of counting the RPs on a flush we now count only on a swap call. This won't work for offscreen surfaces which is fine - the overlay doesn't really have the same use for offscreen rendering. Also ignores the first frame in graph data so we can ignore the first setup frame in the trace tests. Also skips the redundant extra "flush" call that would generate an empty space in the RP graph. Gives a cleaner measurement for optimizing the XFB RP count. Bug: angleproject:4622 Change-Id: I5762c500cdb216700247095984ae62b4f8741602 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2215309 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 6c4af0c3 2020-05-20T14:54:39 Tests: Add a common framebuffer config for perf tests As we add traces tests, some were recorded expecting depth as an attachment to framebuffer 0. This causes errors when they unconditionally query info about depth attachments. Since perf tests have never requested a config before (they are all DONT_CARE for each componenent), go ahead and set one shared by all. Test: angle_perftests Bug: b/157158456 Change-Id: I83ef1a58f246bfbc98c3bc7e024aca01560107f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2210966 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b35c7f6 2020-05-07T13:40:55 Fix up screenshot saving for trace tests. Now works when run in a sequence. Also saves RGB images to avoid issues with the alpha being inconsistent and also flips images vertically to fix the rendering. Bug: angleproject:4615 Change-Id: I8d3b38c5d914e0ca2227320ac42a0e28acd12c4d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2187971 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill d08f1d8d 2020-05-05T12:54:07 Perf tests: Add screenshot capture mode. This adds a "--screenshot-dir" argument to capture screenshots. If we're running with screenshot capture then the test will early exit after the first capture. The screenshots use the same naming pattern as the test name: TracePerfTest.Run/vulkan_trex_200 -> angle_vulkan_trex_200.png Note the screenshot dir is relative to the test binary directory, not the CWD. Also adds a PNG saving utility function. Bug: angleproject:4615 Change-Id: I1de8ae6a6e6892586bb0b743e7b9a842f90f98e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2184834 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 930b2641 2020-03-23T14:47:03 Allow tests to run on native EGL. Adds support for Linux and Android native EGL testing. This can be useful for doing performance comparisons of ANGLE vs a native GL driver. Only enabled for the trace perf tests due to limitations in the test harness. Bug: angleproject:4596 Change-Id: Iba6d3ccd7c1275cf095893fab824a0ea33dc3a79 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2116254 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Cody Northrop 78c77361 2020-03-20T13:50:24 Perf: Add a single Manhattan trace Now that TRex is up and working and Manhattan runs cleanly: * Add a single compressed Manhattan trace. * Allow errors from tests to fail the test * Restore the working directory between each trace test Test: angle_perftest --gtest_filter=TracePerfTest* Bug: b:151349786 Bug: angleproject:3630 Bug: angleproject:4496 Change-Id: I9e9d9342efb23431380f484befb9a19915c4bd0a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2113230 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 42c453fe 2020-03-15T18:23:15 Move perf test common files to a source set. Similarly to a prior patch this organizes the common perf test sources into a single target. This will allow us to more easily support setting compiler flags on particular perf test sources. This also fixes some build errors that popped up when new warnings were enabled. Bug: angleproject:3630 Change-Id: I866885199f93a5055e8d160e39f72d1f8209bc75 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2103086 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 1393bf9e 2020-02-28T22:03:27 Vulkan: Timestamp internal RenderPasses in perf tests. This change book-ends RenderPasses in the Vulkan back-end with timestamp queries. This allows us to write out a trace of GPU/CPU that we can inspect in Chrome. To enable the GPU trace you can define ANGLE_ENABLE_VULKAN_GPU_TRACE_EVENTS in ContextVk.cpp and run the angle_perftests suite with --enable-trace. Note that we ran into some issues with the implementation not returning monotonic timestamps. This may be a driver bug but bears more investigation. Bug: angleproject:4433 Change-Id: I0e6a364367f15183068e55686549cb418aa94c2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2081380 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 391f38c9 2020-03-05T12:18:34 Capture/Replay: Add Manhattan to TracePerfTest This CL also adds the ability for a perf test to elect to ignore GL errors during replay. Otherwise, errors will cause the test to fail. We have known failures with Manhattan that don't affect replay. Test: angle_perftests.exe --gtest_filter="*Trace*" Bug: angleproject:4091 Change-Id: I36268a9f80754f338e52208273e889d2404b7eed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2090663 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9acaf662 2020-02-28T14:58:17 Add timer query support to TracePerfTests. This can allow us to get some profiling measurements on ANGLE vs a native driver. We correlate host times with GL times using the blocking timestamp query. We also time RenderPasses/FBO switches using the trace instrumentation we added in an earlier patch combined with timer queries. Not currently instrumented for the current tests. We'll need to re-run capture to get the callbacks working correctly. Bug: angleproject:4433 Change-Id: I8f61774a3a090ac9460a378d34715a72954d1331 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2080597 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c7f63a01 2020-02-23T16:46:41 Fix debug callback in perf tests. Was not outputting correctly. Also print more information like the type and severity of the message. Moves some stringification code out of RendererGL into common/utilities. Bug: angleproject:3630 Change-Id: I029e279764fa4ae5cab8d903bd0ef7d376b7b846 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2067630 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 39087f4a 2020-02-16T11:53:23 Refactor DrawCallPerf test parameters. Use the new combiners functions added in an earlier CL. Makes it easy to maintain bigger lists of test combinations. Also a few other changes: - removes some D3D9 perf testing since we don't maintain this config - removes the "validation only" tests. these were mostly redundant - makes the tests permutation combinations more consistent Bug: angleproject:3630 Change-Id: I175d887a01b21123f83f9fa4f64dacaa2644147a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2059468 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 519163ee 2020-02-15T12:20:17 Run debug callback in perf render tests. This can catch unexpected GL errors from ANGLE or the system driver. Only enable when ASSERTs are enabled to ensure that we get full performance when profiling. Helpful to diagnose incorrect perf test rendering. In this case it helped diagnose that our frame tracing and replay do not correctly remap uniform locations. Bug: angleproject:3630 Change-Id: Ifd9f47196381e48f74a810ea0c9f9c0fd7a13a22 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057352 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Cody Northrop 080d711b 2020-01-08T13:04:44 Tests: Add a perf test using traces This test will load traces and cycle through a set of frames. The new tests are: TracePerfTest.Run/gl_trex_200_210 TracePerfTest.Run/gl_trex_800_810 TracePerfTest.Run/gl_trex_900_910 TracePerfTest.Run/gl_trex_1300_1310 To download the traces, you must be granted access and authenticate with the cloud. See the steps in RestrictedTraces.md for this. Then add the following to the end of your .gclient file: "custom_vars": { "checkout_angle_internal":"True" }, And run `glcient runhooks`. To enable building the test, add the following GN arg: build_angle_trace_perf_tests = true See the new markdown document for ways to execute the tests. Bug: angleproject:3630 Change-Id: Ic25cd94fb36b35fcf187e88d3bf9548c65f59755 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1949605 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Eric Binet 4ffc254e 2020-01-08T09:58:24 Only initialize the timestamp query pools if the extension is available. Also added a few assertions to ensure that timestamp queries aren't attempted when support is missing. Bug: angleproject:4114 Change-Id: Ie6d7d5face59f9bc137aebd86c9d0e965773e6e6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1992184 Commit-Queue: Eric Binet <ericbinet@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 57b37b6b 2019-09-25T18:29:28 Rename util/system_utils to util/test_utils. This removes a GN naming conflict between util/system_utils and common/system_utils. This conflict was preventing us from adding unit tests to utils' version of system_utils. Since these functions are only useful to tests and samples rename them test_utils for simplicity. Will enable further development of ANGLE's standalone testing harness. Bug: angleproject:3162 Change-Id: I9e34fb69f96c5de6dc2453fce4148a0f285e15ed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1825268 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi e54d0f90 2019-06-30T03:26:18 Vulkan: Debug overlay A debug overlay system for the Vulkan backend designed with efficiency and runtime configurability in mind. Overlay widgets are of two fundamental types: - Text widgets: A single line of text with small, medium or large font. - Graph widgets: A bar graph of data. Built on these, various overlay widget types are defined that gather statistics. Five such types are defined with one widget per type as example: - Count: A widget that counts something. VulkanValidationMessageCount is an overlay widget of this type that shows the number of validation messages received from the validation layers. - Text: A generic text. VulkanLastValidationMessage is an overlay widget of this type that shows the last validation message. - PerSecond: A value that gets reset every second automatically. FPS is an overlay widget of this type that simply gets incremented on every swap(). - RunningGraph: A graph of last N values. VulkanCommandGraphSize is an overlay of this type. On every vkQueueSubmit, the number of nodes in the command graph is accumulated. On every present(), the value is taken as the number of nodes for the whole duration of the frame. - RunningHistogram: A histogram of last N values. Input values are in the [0, 1] range and they are ranked to N buckets for histogram calculation. VulkanSecondaryCommandBufferPoolWaste is an overlay widget of this type. On vkQueueSubmit, the memory waste from command buffer pool allocations is recorded in the histogram. Overlay font is placed in libANGLE/overlay/ which gen_overlay_fonts.py processes to create an array of bits, which is processed at runtime to create the actual font image (an image with 3 layers). The overlay widget layout is defined in overlay_widgets.json which gen_overlay_widgets.py processes to generate an array of widgetss, each of its respective type, and sets their properties, such as color and bounding box. The json file allows widgets to align against other widgets as well as against the framebuffer edges. Two compute shaders are implemented to efficiently render the UI: - OverlayCull: This shader creates a bitset of Text and Graph widgets whose bounding boxes intersect a corresponding subgroup processed by OverlayDraw. This is done only when the enabled overlay widgets are changed (a feature that is not yet implemented) or the surface is resized. - OverlayDraw: Using the bitsets generated by OverlayCull, values that are uniform for each workgroup (set to be equal to hardware subgroup size), this shader loops over enabled widgets that can possibly intersect the pixel being processed and renders and blends in texts and graphs. This is done once per frame on present(). Currently, to enable overlay widgets an environment variable is used. For example: $ export ANGLE_OVERLAY=FPS:VulkanSecondaryCommandBufferPoolWaste $ ./hello_triangle --use-angle=vulkan Possible future work: - On Android, add settings in developer options and enable widgets based on those. - Spawn a small server in ANGLE and write an application that sends enable/disable commands remotely. - Implement overlay for other backends. Bug: angleproject:3757 Change-Id: If9c6974d1935c18f460ec569e79b41188bd7afcc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1729440 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi f0dd087e 2019-08-23T15:45:34 Move timer functionality from util/ to common/ The main timer functionality (get absolute time) is moved to common/ for use in ANGLE itself (in upcoming overlay change). util/Timer.h is no longer an abstract class and uses this functionality to implement the timer. Bug: angleproject:3757 Change-Id: I3fe418778d80d1089c9bfe43a9e8098e43236f18 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769061 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Brian Sheedy 2f4a7518 2019-08-16T14:09:13 Refactor perf tests to fix metric/story swapping Refactors the perf tests to fix the issue of metric and story being swapped, which causes issues when trying to convert to histograms. Specifically, does the following: 1. Rolls the version of src/tests/perf_tests/third_party/perf/ to Chromium 476dae823269c8d05b544271af97ad1adb0db8ee 2. Switch to using PerfResultReporter instead of PrintResult directly. 3. Split RenderTestParams::suffix into backend and story; backend is used as part of the metric, while story is used as the story. 4. Remove the "average" metric that was being automatically reported by ANGLEPerfTest, as reported results are automatically averaged. 5. Update the reported metric to more clearly distinguish between test, backend, and metric. It is now name_backend.metric. e.g. DrawCallPerf_vulkan.wall_time. Bug: chromium:923564,chromium:924618 Change-Id: I00cc191407052f23df57dbfa53b6fb088fc26960 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762360 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 69194e5f 2019-07-17T15:35:10 Reduce variance in TextureUploadPerf. This reduces the test time to run in several ms instead of almost seconds per iteration. It allows us to use the perf test runner harness to check test performance more accurately by increasing the sample count. It first reduces the test iteration count to reduce total test time. It also refactors the test contents to not allocate new objects and memory with every test iteration. This gives a better sampling of what the test is obsering: texture upload performance. Also allows tests that like to track GPU time to be used with the NULL device option. Bug: angleproject:3712 Change-Id: Idacc3e3b424f8882d7680769b27d1f04146ea65d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707112 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Clemen Deng 663b0481 2019-07-11T12:37:35 Load correct opengl32.dll Tests are still loading ANGLE's opengl32.dll instead of system's This is because external drivers are trying to load opengl32.dll Workaround: renamed to libGL.dll, need to change back when copying dll over for loading Bug: angleproject:3641 Change-Id: I051adc1fbb488a704c99718ad4a2f74bb7756cbd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1697290 Commit-Queue: Clemen Deng <clemendeng@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Clemen Deng a71a8c66 2019-07-04T09:42:31 ANGLE tests loading wrong opengl32.dll ANGLE tests try to load opengl32.dll from ANGLE directory instead of system Bug: angleproject:3645 Change-Id: I3a8cea37252d13e915ff54ae6bbac920db16e4c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688544 Commit-Queue: Clemen Deng <clemendeng@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jordan Bayles b5a13bec 2019-06-28T14:11:17 Prepare for JsonCpp roll in Chromium This patch is the first of a multistep process to upgrade JsonCpp from its current legacy version to the latest version. A minor fix to how Json::Value is used is included, as well as properly pulling in the jsoncpp_config where jsoncpp is used, allowing for us to roll Chromium while Angle uses the deprecated Reader/Writer classes. After this patch is landed, the Angle dependency in Chromium can be rolled as part of rolling JsonCpp, then Angle can update to the new StreamWriter/CharReader classes. Bug: 961513 Change-Id: Idd1d61270aa0a7e4a91983b4c22a24e2fdaafe49 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1682815 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d5cef305 2019-06-19T14:21:33 Vulkan: Add more trace events. This captures a bit more information about where the call time goes during a flush. It can show at least on desktop NVIDIA that we spend a fair amount of time in vkQueuePresentKHR. Bug: angleproject:3117 Change-Id: I2d0195b9338bcac80e8dd8cfb550402271f286f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1650787 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis eee67c6e 2019-06-18T13:00:43 Fix Platform.h integration with ANGLE A function was renamed which broke the platformMethods table strings. This CL reverts the rename (originally from crrev/c/1660952) Bug: angleproject:1621 Change-Id: I8121a4956ba1d3e3c5036f72f6f1fdf5509dc491 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1664792 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis beb0eb2d 2019-06-14T15:10:33 Clean up workarounds/features to single location. Rename all workarounds structs to features, and move the lists to a shared location in include/platform (to help with documentation, see: https://cs.chromium.org/chromium/src/ui/gl/gl_switches.cc?sq=package:chromium&g=0&l=69) Bug: angleproject:1621 Change-Id: I4069f08131db5e886047a007efb5d7764dfee5f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660952 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3089f92e 2019-05-01T15:11:46 Move EGL Display config into EGLPlatformParameters. This CL moves all of the EGLDisplay configuration into an EGL platform struct. Consolidating display configuration in the struct allows us to move configuration out of the test constructor. Then when we filter test configs we don't need to wait for the individual test setup. Bug: angleproject:3393 Change-Id: I5bd06dcdc9f2867ebc43c1d4984077ada35cafc8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574674 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 0659c991 2019-04-30T16:14:43 Set swap interval explicitly. The swap interval can be changed independent of the Surface config. Thus it makes more sense to set it explicitly in test setup. This simplifies the test config. Also updates some of the API for GLWindowBase. Return an explicit error from makeCurrent. Bug: angleproject:3393 Change-Id: Ic62b33018e872bc0e38f2848e2427ed898b60749 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574672 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 91524d8c 2019-04-02T15:31:30 Disable Clear and TextureUpload perf tests on D3D11 The tests crash on Nvidia in the driver. Bug: 945415 Change-Id: I0f635eb5d99ecaeeaff055793b1b5fd3a314b055 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1548440 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 50fb5cc9 2019-03-25T15:10:34 Disable GPU perf tracking on D3D Causes crashes. Bug: angleproject:3310 Bug: 945415 Change-Id: I59c5fee0afaf74c99ac19168fbfd96de04796add Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1534946 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0f566fc7 2019-03-20T11:36:29 Introduce ConfigParameters test helper struct. This allows us to more easily compare sets of parameters used in our tests. The config parameters are stuff like the red / gree / blue bits used in an EGL config. Or particular sets of extensions or other EGL options. This will more easily allow us to determine when we need to use a new EGL display instead of reusing a prior. Bug: angleproject:3261 Change-Id: Ia1f0ede988e0b4084fbb4d55097e94fd89ee4899 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi f576a708 2019-02-04T16:52:12 Add glmark2 to angle_perftests Bug: angleproject:3125 Change-Id: I9242743c6b5c6e18d0a23ff853ef6b9b370865a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1452956 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Tim Van Patten 77874e2c 2019-02-13T09:15:06 Vulkan: Reduce Default Descriptor Pool Max Sets The current value of kDefaultDescriptorPoolMaxSets is 2048, which allocates too much memory on a Pixel device, causing Android's low memory killer to terminate dEQP (leading to a test failure). This change reduces the value of kDefaultDescriptorPoolMaxSets to 128 to reduce the memory usage during the test. We suspect a later change may be required to dynamically grow the descriptor pools and update the recycling behavior. This change also exposed a bug in the ANGLERenderTest where the swap() call was being skipped for null devices. This was causing code that ANGLE requires to clean up and re-use resources to be skipped. Enabling the swap() call fixes this issue as well as improves performance for the test overall. This does make comparing old performance values to new difficult (if not entirely incorrect), so take care when doing so. dEQP-EGL.functional.multicontext.non_shared_clear Bug: angleproject:3056 Bug: angleproject:3135 Change-Id: Ibdfd3a5eb436a7ba4e45002ebef5809afe777af1 Reviewed-on: https://chromium-review.googlesource.com/c/1470830 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tobin Ehlis 3571ad49 2019-02-06T12:24:19 Vulkan:Adding Cmd Buffer Reset tests Resetting cmd buffers in various ways to understand VK driver perf on various devices. Also includes some changes to get the chromium APK wrapper for angle_white_box_perftests compiling. Bug: angleproject:3137 Change-Id: I56bd163cdd6605ce09effe509a9c7ac5e0008e7a Reviewed-on: https://chromium-review.googlesource.com/c/1456482 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 4704eb02 2019-01-25T13:25:52 Add possibility to track GPU time in perf tests This paves the way for perf tests that measure GPU performance. Bug: angleproject:2999 Change-Id: I9d49d3e1256d8d18514885ae63264a5fbc5c29d1 Reviewed-on: https://chromium-review.googlesource.com/c/1436839 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 5fe7c5b9 2019-01-17T12:16:34 Include common/platform.h where used Bug: 922443 Change-Id: I35b9e34266d4a15f8d0769c2770801b1b0511398 Reviewed-on: https://chromium-review.googlesource.com/c/1418091 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 1f56ed2a 2019-01-03T15:24:22 Add WGLWindow and WGL test configs. WGLWindow lets us use a Windows driver's bindings instead of ANGLE. This only works if the underlying driver supports OpenGL ES compatibility. Also adds the WGL headers, WGL XML, and a specialized WGL loader. Because of a small driver issue with NVIDIA I added a retry for the WGL Window initialization. Bug: angleproject:2995 Change-Id: Ie5148ece470dd03df33015f4919ad1fa79a859ec Reviewed-on: https://chromium-review.googlesource.com/c/1366021 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill ad398ee8 2019-01-03T13:01:08 Free OSWindow and EGLWindow through helpers. This cleans up any potential problems with allocating and freeing resources in different shared objects or DLLs. Previously we were using a dynamically linked allocation function and then calling the standard delete function. Also adds a base class helper for EGLWindow. Will base the WGL Window class on this. Needed for running ANGLE tests against native drivers. Bug: angleproject:2995 Change-Id: Ic92b447649ebb32c547605c20086c07a601842f0 Reviewed-on: https://chromium-review.googlesource.com/c/1393443 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill ba319ba3 2018-12-29T10:29:33 Re-land "Load entry points dynamically in tests and samples." Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL headers. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57 Reviewed-on: https://chromium-review.googlesource.com/c/1392382 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 9f088621 2018-12-29T20:46:15 Revert "Load entry points dynamically in tests and samples." This reverts commit 03923558a7103827ffec6a4d2a1453ed91f01c6f. Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624 Original change's description: > Load entry points dynamically in tests and samples. > > This CL adds a dynamic loader generator based on XML files. It also > refactors the entry point generation script to move the XML parsing > into a helper class. > > Additionally this includes a new GLES 1.0 base header. The new > header allows for function pointer types and hiding prototypes. > > All tests and samples now load ANGLE dynamically. In the future this > will be extended to load entry points from the driver directly when > possible. This will allow us to perform more accurate A/B testing. > > The new build configuration leads to some tests having more warnings > applied. The CL includes fixes for the new warnings. > > Bug: angleproject:2995 > Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 > Reviewed-on: https://chromium-review.googlesource.com/c/1359516 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2995 Reviewed-on: https://chromium-review.googlesource.com/c/1392381 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 03923558 2018-12-29T10:29:33 Load entry points dynamically in tests and samples. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 Reviewed-on: https://chromium-review.googlesource.com/c/1359516 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 720ca449 2018-12-17T14:04:10 Pass GN header visibility check. This fixes a few things: * removes includes that weren't supposed to be present * scopes some compiler code into white_box_perftests * makes version.h/commit and angle_common id more visible * roll zlib to a version that passes check This should help prevent build problems from popping up in the downstream Chromium build. We could also potentially look at including gn check in our CQ recipe. Bug: chromium:915429 Change-Id: I350f543e16de13c84eb2c43260f4966d47185114 Reviewed-on: https://chromium-review.googlesource.com/c/1380771 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 35cd7332 2018-12-02T12:03:33 Refactor test shader style. This change enforces a lot more consistency. We pass const char * to the Compile functions instead of std::string. Also fixes the indentation of C++11 block comments to be more consistent. Bug: angleproject:2995 Change-Id: Id6e5ea94055d8cbd420df4ea2e81b2d96cb5ce78 Reviewed-on: https://chromium-review.googlesource.com/c/1357103 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 0e604f9f 2018-11-19T21:33:25 ANGLE Perf Test fixes. Includes the following fixes: * Removes obsolete global variable. * Disables trace event collection when trace events disabled. * Fixes calibrated steps getting stuck after first test. * Scale calibrated steps with actual time after glFinish. Should fix a few crashes and timeouts with the perf tests. Bug: angleproject:2923 Change-Id: I9ba1c042dee31cf2400ccbeedca0d497ed52fb12 Reviewed-on: https://chromium-review.googlesource.com/c/1343677 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f3acb8c1 2018-11-14T16:24:25 Retool perf test running. This change does a few things involving the way we run the perf tests: - Perf test runner can capture different metrics Useful for capturing the new "nanoSecPerIteration" metric. - Removes the "score" metric We'll move to the new time-based metrics. These new metrics are scaled correctly with iteration counts. - Runs three trials per perf test This gives more measurements per test. Each trial is approximately one second. First the perf tests set a fixed number of iterations after calibrating the number of steps that we can run in one second. After that the three trials are run. This should give more stable results. - Apply more CPU stabilization on Windows Use SetPriorityClass to apply more CPU priority. Also upgrade SetThreadPriority to the highest level. - Always build the Vulkan command buffer test This catches build regressions more easily. We still skip the test on non-Android platforms. Bug: angleproject:2923 Change-Id: I7da234c5af07775ba4a232bb8d65e0138ee7073f Reviewed-on: https://chromium-review.googlesource.com/c/1330262 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 557a1ee4 2018-10-30T17:26:24 Make perf tests faster in correctness-only mode. When running with "--one-frame-only" we can also skip the test warmup. Also we can reduce the internal iteration count to 1 to make the tests as fast as possible. Bug: angleproject:2923 Change-Id: I2f82ae0dd237767ea7b15074e459ed1094ba9943 Reviewed-on: https://chromium-review.googlesource.com/c/1308737 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3402d523 2018-10-30T15:14:52 Try to reduce variance in angle_perftests. This change does a few things: - make perf test runner script print % variation instead of stddev This makes it a bit more clear how much variance there is. - stabilize CPU in the render perf tests Setting a thread affinity and priority should stop from switching cores during the run. Hopefully can prevent background noise from changing the test results. - warm up the benchmark with a few iterations This should hopefully make the test results a bit more stable. - output a new normalized perf result value The new result is normalized against the number of iterations. So it should hopefully be stable even if the number of iterations is changed. - increases the iteration count in the draw call perf tests. These tests were completely dominated by SwapBuffers time. Increasing the iterations per step means we actually are bottlenecked on CPU time instead. Bug: angleproject:2923 Change-Id: I5ee347cf93df239ac33b83dc5effe4c21e066736 Reviewed-on: https://chromium-review.googlesource.com/c/1303679 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 0ea96210 2018-10-30T15:14:51 Vulkan: Enable more perf tests. Also fixes the check for the correct UINT index extension that wasn't available on Vulkan. Also includes a workaround for the mock ICD not implementing buffer state for index ranges. Bug: angleproject:2923 Change-Id: Iab35809d15f890525a9e658d4148272c46cf1320 Reviewed-on: https://chromium-review.googlesource.com/c/1308733 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 25224e78 2018-10-22T11:56:02 Vulkan: add GPU trace events RendererVk now tries, as best as it can, to match the CPU and GPU timers on init as well as every finish(). A clock-sync event is generated for each such synchronization point. RendererVk::traceGpuEvent() is a new function that, given a command buffer, performs timestamp queries corresponding to GPU events. These queries are read back when done, without incurring GPU bubbles, at which point an event is generated with that timestamp. Bug: angleproject:2908 Change-Id: I08d7d11ff9f8ad6c9f9a9899767c9cd746d0623e Reviewed-on: https://chromium-review.googlesource.com/c/1296954 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 4024e217 2018-10-17T14:53:29 perftests: Record trace events to JSON file. This allows us to view the timeline of events in the trace event browser. We can extend this to do GPU timestamp queries and analyze when work is actually in flight. The trace is enabled in standalone ANGLE only using the flag --enable-trace with angle_perftests. You can also optionally specify the trace output file with --trace-file <blah>. The default file is ANGLETrace.json. Bug: angleproject:2781 Change-Id: I871f28545d9bf18220b55aaf69e9554dcb4c834d Reviewed-on: https://chromium-review.googlesource.com/c/1259763 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c801e359 2017-11-21T13:53:48 Add configurations of the TexturePerf benchmark that use robust init. BUG=angleproject:2188 Change-Id: Ia23b54044a85435c761478bceeb9aac961fac0d1 Reviewed-on: https://chromium-review.googlesource.com/783230 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 981f0f8f 2017-09-21T09:07:41 Add flag to do a fast pass through perf tests. This flag will only render the first frame of each perf test, regardless of their preferences for how many seconds to run. It will be useful for speeding up the run time of the perf tests on testing infrastructure that only cares about correctness. BUG=chromium:725308 BUG=chromium:765321 Change-Id: I926f488c42f27ef23ef06a0159902613cff04080 Reviewed-on: https://chromium-review.googlesource.com/677306 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Martin Radev fca78130 2017-09-06T13:51:39 Extend multiview perf tests to cover all extension code paths The ANGLE_multiview extension can be supported with three possible code paths - through view being selected in the vertex shader on D3D and OpenGL, and through the view being selected in the geometry shader on D3D only. This patch extends the multi-view performance tests to benchmark these three different code paths. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I443e4db64a95eede1142718a43a095ee5a03738c Reviewed-on: https://chromium-review.googlesource.com/652466 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Martin Radev 6a6199b4 2017-06-05T17:30:55 Add multiview performance tests The patch adds two tests to measure the performance of the ANGLE_multiview extension implementation: 1) The first test renders onto two views by issuing thousands of state changes and draw calls. The aim of the test is to stress the CPU. 2) The second test renders onto two views by drawing with one draw call half a million quads with multiple attributes per vertex. The attributes are passed to the fragment shader where they are used for computing the color. The aim of the test is to stress the GPU's memory system. The patch also extends the ANGLEPerfTest's functionality to only run the benchmark if the necessary extensions are available. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ic63d54a69fdddb72439eeeb1951a500fb1247e95 Reviewed-on: https://chromium-review.googlesource.com/597630 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 3764b257 2017-02-15T10:41:31 Vulkan: Run simple triangle perf test. The most basic perf test possible. BUG=angleproject:xxxx Change-Id: I71b28098c0a1f2174a0177b08bddf74d337438e9 Reviewed-on: https://chromium-review.googlesource.com/427270 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Hans Wennborg e1743f37 2016-01-06T05:24:22 Clang warning fixes This fixes member initialization order and unused private member warnings that broke the Clang build after the last Angle roll. BUG=82385 Change-Id: If866f352bda6d66093c180fdbec6c16bf902b628 Reviewed-on: https://chromium-review.googlesource.com/320466 Reviewed-by: Nico Weber <thakis@chromium.org> Tryjob-Request: Nico Weber <thakis@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Geoff Lang <geofflang@chromium.org> Tested-by: Nico Weber <thakis@chromium.org>
Corentin Wallez 7ee40d1a 2016-01-04T08:37:00 Fix compilation failures on OSX standalone builds BUG= Change-Id: Ifd40ae30d601227caf550546fcffc286cf533a73 Reviewed-on: https://chromium-review.googlesource.com/320290 Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 8047f065 2015-12-15T17:54:42 Improve perf testing framework The ANGLERenderTest subclasses have a parameter "iterations". Previously most of these tests would perform iterations^2 iterations, since the looping was done both in ANGLERenderTest and in the individual test classes. Do the looping only in the individual test classes instead. This enables getting rid of separate beginDrawBenchmark() and endDrawBenchmark() functions. Some other unused code is also removed: 1. stepBenchmark function 2. unused parameters to step() This makes the core loop of running tests simpler. The perf testing framework also now has shared logic for deciding when to end a given test. The score calculation for tests is also changed. Instead of reporting just the number of operations done, it is reported relative to the actual run time of the test. This should make the test results more accurate, since run time of the tests may have some variation. It also enables changing the run time of the tests without rebaselining them. In the tests that use GPU, GPU operations are also waited to finish before stopping the timer. BUG=angleproject:1261 TEST=angle_perftests Change-Id: I69e9aad8afd2d9dedd60e144f0a5d4203618feef Reviewed-on: https://chromium-review.googlesource.com/319381 Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho fecbed9f 2015-12-17T12:01:12 Fix code style in perf tests 1) Format switch/case with git cl format 2) Change NULL -> nullptr 3) Change int to GLint where appropriate 4) Use more appropriate variants of asserts BUG=angleproject:1261 TEST=angle_perftests Change-Id: I97d6260dbd72ef3897fff145682b7043bf323b76 Reviewed-on: https://chromium-review.googlesource.com/319380 Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5ade8459 2015-09-02T11:00:30 Properly check for EGL_KHR_create_context before creating ES3 context. Mark EGL_KHR_create_context as supported in the DisplayGLs. BUG=angleproject:1149 Change-Id: I20671535680eb2c3b9c08205cee243b3aa5c5821 Reviewed-on: https://chromium-review.googlesource.com/297080 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez f3357ee2 2015-07-22T14:10:19 EGLWindow: remove the unused width and height EGLWindow does nothing with it per se, but some code was relying on it to store it. Add width and height to ANGLETest and SampleApplication instead. Also fix a typo in PerfTestParams, widowWidth -> windowWidth. BUG=angleproject:1105 Change-Id: I26da607a2e6342864b508a50ee3cf8944608f868 Reviewed-on: https://chromium-review.googlesource.com/287379 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9e582b93 2015-06-22T11:18:32 perf_tests: Normalize MS counts in EGL init test. The un-normalized values depend on the number of frames rendered, so if we optimize down one time, the other ms values all increase, because we are rendering more frames. This generates spurious perf alerts from the perf dashboard. BUG=None Change-Id: I1bc480141a8cad7eee96bcdf4d6747a3cbae30f2 Reviewed-on: https://chromium-review.googlesource.com/280980 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang dd323e95 2015-06-09T15:16:31 Only run tests that the current hardware can support. For each config, determine if a context can be created at test instantiation time. This allows skipping of ES3 tests when the hardware does not support ES3. Updated the perf_tests to use the EGLPlatformParameters struct so that they can be filtered in the same way. Change-Id: If664604b057cec4005eb4b63bebd83cd4964b7b2 Reviewed-on: https://chromium-review.googlesource.com/276460 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez b45a80db 2015-05-21T10:39:43 Make perftests use ANGLE_INSTANTIATE_TEST This also moves ANGLE_INSTANTIATE_TEST to its own header and makes it generic over the type of test parameter. BUG=angleproject:892 Change-Id: Id4e3929d7ad06964b3259015915be84a8ee414f9 Reviewed-on: https://chromium-review.googlesource.com/272553 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 3c8870a1 2015-04-20T16:00:15 perf_tests: Use 'score' units. The dashboard automatically marks 'frames' as 'lower is better', while 'score' is automatically marked as 'higher is better'. Hence, use score instead of frames. BUG=468852 Change-Id: I02b3a9e4b74989793d4bfbf21a94e43670b3e028 Reviewed-on: https://chromium-review.googlesource.com/266522 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 304dcde8 2015-04-15T14:26:36 perftests: Use gtest asserts macro helpers. We still were using the old cassert code, with a boolean return value on our initialization code. We can make use of the gtest macros and helpers to check for a successful init or GL errors. BUG=476658 Change-Id: I09cbb3d40748cbeaf530ae8f23fb8a1b07e7611f Reviewed-on: https://chromium-review.googlesource.com/265837 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 835be965 2015-04-13T14:17:49 perf_tests: Only print final score result. Don't print all the other measurements and values, since they'll just add noise to the perf bot dashboards. Also increase the run time of the DrawCallPerfTest to 10.0 seconds. BUG=angleproject:744 BUG=468852 Change-Id: If076055ad46b4e6923f39687edcaa25930b188a7 Reviewed-on: https://chromium-review.googlesource.com/265464 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>