src/tests/perf_tests/ANGLEPerfTest.cpp


Log

Author Commit Date CI Message
Roman Lavrov 056f8044 2022-10-11T11:58:20 Perf tests: write metrics to file and read from merge script. The idea behind is to save metrics in a structured output with full context so that we don't have to parse stdout and reconstruct that context (e.g. which test was running when the output was printed etc). Note: we already have a "histogram" file (addHistogramSample) written but it is structured using some UUID-based ids making its digestion more complicated (https://anglebug.com/7299#c3). This CL just writes events as one-json-per-line simplifying downstream handling and debugging. Just a sanity check / logging in the merge script for now. Bug: angleproject:7299 Change-Id: I56dada643eceef180ce9bb1aa9ae6a641ea41e4c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3945112 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Jamie Madill aaee3c23 2022-11-30T14:24:13 Build and test ANGLE with Vulkan secondary CBs. This will allow us to run tests with both permutations of ANGLE (custom secondaries & Vulkan secondaries) in the same build directory. It will also allow us to run these configs as tests on our infra. This CL adds a few simple test to CI. Bug: angleproject:6811 Change-Id: I053f8cc5bafc2a7ab7d0665da9301f0ba7f8417f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4067806 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Nicolas Capens 938f4372 2022-11-30T15:30:23 Move trace_event into anglebase This originates from Chromium's base/trace_event/ so it doesn't need to be under a third-party folder. Bug: b/260093525 Change-Id: Iab7a40569b6c1f91454f099c07bf51e3ce4b65df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4068342 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 1f69f580 2022-11-18T14:33:20 Perf tests: Add --fixed-test-time-with-warmup Warmup trials combined with fixed-test-time was broken recently. It was already fragile and only worked when parameters were provided in the right order. On Android we're relying on this combination to get steady results without hitting thermal limits. To address this: - Add a new parameter that encapsulates the combination - ASSERT that flags aren't provided in unsupported combinations Test: python3 restricted_trace_perf.py --fixedtime 10 Bug: angleproject:7755 Change-Id: I56fce1f65d4f0538e623951163a9c8736cb3fb03 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4027282 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 6b3e4d8b 2022-11-07T09:32:33 Ensure replay is at the first frame on startTest(). Currently trials continue from the next frame after warmup, so the frame that they start from fluctuate depending on how the warmup went. This was supposed to be tackled by aligning to frameCount() but the first warmup trial wasn't aligned as it would stop after a condition was reached. Only stop on mTrialNumStepsPerformed % stepAlignment == 0 Bug: angleproject:7671 Change-Id: I0da74d89547eda6e78762ee7745204d0da6fe73a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4008998 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@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 a9868110 2022-09-15T17:29:04 Add support for testing with Mesa + Zink. To run a trace test with zink, use --use-gl=zink. Bug: angleproject:7689 Change-Id: I70073756f903db1c224fe6175d55be4cad637aca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3899382 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bc2e9eea 2022-10-15T14:38:15 Refine sampling of trace perf tests. - The warmup algorithm now computes an accurate steps estimate. - Bump up the trials, samples, and trial time in the runner. Bug: angleproject:7671 Change-Id: I89a73472fd72af73f695c9107119cbc559d2d6e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956946 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com>
Jamie Madill 4bfb749f 2022-10-10T20:59:48 Capture/Replay: Move shared trace code into src/common. This will let them be accessible to the test harnesses. The trace tests interpreter will need direct access to the classes that we move in this CL. This CL also moves the GLenum utils into the common folder, where they were already used by some other tests. Bug: angleproject:7752 Change-Id: I97ad607938ef29bc316f6d40098478e002ea8128 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963362 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill e495e7fd 2022-10-14T13:52:47 Redo perf and trace test parameters. - Moves common argument parsing code into test_util. - Changes the perf test arg parsing to use the common functions. - Adds new --use-angle and --use-gl parameters to the trace tests. - Also adds new --offscreen and --vsync parameters to the traces. - Removes the now unneeded --enable-all-trace-tests argument. - Both --arg=value and --arg value work in test suites now. Now, instead of using --enable-all-trace-tests you can specify the backend with --use-angle=swiftshader, --offscreen, or combinations of those parameters. The test names are the same as they were before, but only the configured tests will run in a session. We could opt to simplify the test names in later CLs if we want to simplify the test running. Ideally we'd keep the perf reporting the same because then we'd keep the time series the same on the test infra. This also allows us to split up the trace tests into separate targets on the bots, which will better allow us to control the workloads and sampling of the tests. For example: - angle_perftests becomes - angle_perftests (microbenchmarks) - angle_trace_perf_vulkan_tests (traces with vulkan back-end) - angle_trace_perf_native_tests (traces with system GL) Bug: angleproject:7755 Change-Id: I537168f3a6de96425dfda05ed98220eff9b19b76 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956937 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov d22edf57 2022-10-18T14:57:55 Perf Tests: fail test on GL_CONTEXT_LOST after glFinish(). Interrupts the test in the case I ran into: ../../src/tests/perf_tests/ANGLEPerfTest.cpp:383: Failure Failed Context lost Warm-up trial took 1.11 seconds. [ FAILED ] TracePerfTest.Run/vulkan_dr_driving, where GetParam() = vulkan_dr_driving (1476 ms) [----------] 1 test from TracePerfTest (1476 ms total) Bug: angleproject:7762 Change-Id: Iaf416dbdaa0eb846b744bdb4d1eb596f0c2bb1a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963360 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Jamie Madill 04f3ed80 2022-10-04T08:24:16 Perf Tests: Use specified trial time for warmup. When the user specifies a trial time, use this for the warmup time instead of using the calibration time. This will give a longer warmup time on our test infra and should help stabilize perf testing scores on our bots. Bug: angleproject:7671 Change-Id: I65fb8a7ae1f684d3f7834613d8341d17bd2df00f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3933315 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 67af8d89 2022-09-19T15:19:57 Perf Tests: Make dynamic step count calibration optional. This uses a fixed test time for the tests, instead of using an extra step to calibrate a number of steps to run in an approximate maximum time. Before: 1. run a test for <test time>, return the number of steps 2. for <num samples> x <num trials> times, run the tests for that number of steps After: 1. for <num samples> x <num trials> times, run the tests for <test time> This saves some total time since we don't need to run the tests in a pre-process to calibrate the number of steps, and it also makes this test script more like the restricted trace perf script. Bug: angleproject:7671 Change-Id: I413cbf8d65f9f2f87781d8607f799d2450a71ea7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3906144 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Solti f5b3ecd4 2022-09-06T17:02:50 fix perf test result path ==== Overview ==== Previously for bug 6353, we wanted to enable this extra logging at ANGLERenderTest level so that all ANGLERenderTest tests can benefit from the extra logging. The design was assuming ANGLERenderTest can have any arbitrary naming, and then just include the trace name in the name. However this assumption is wrong because the name affects the path of some perf data that is monitored by a dashboard. Therefore, if we don't want to change the dashboard, then ANGLERenderTest naming is constrained. This CL changes how the trace names are printed in logcat for ANGLERenderTest. Instead of passing down from TracePerfTest via the name, the new design is just printing the mName, mBackend, and the mStory since those variables contain the required information to serve the purpose of bug 6353. ==== Tests ==== [test 1] - use this build args: http://go/paste/4625489225318400 - ```autoninja -C out/Android && ./out/Android/angle_perftests --gtest_filter="*angry_birds*" --verbose``` - Wait for the test to complete, then run ```adb logcat -d | grep "running test"``` - 4 tests were executed: ``` solti@solti:~/angle$ adb logcat -d | grep "running test" 09-06 18:34:13.491 13614 13644 I ANGLE : running test name: "TracePerf", backend: "_vulkan", story: "angry_birds_2_1500" 09-06 18:34:23.958 13614 13644 I ANGLE : running test name: "TracePerf", backend: "_native", story: "angry_birds_2_1500" 09-06 18:34:45.177 13614 13644 I ANGLE : running test name: "TracePerf", backend: "_vulkan", story: "angry_birds_2_launch" 09-06 18:35:11.136 13614 13644 I ANGLE : running test name: "TracePerf", backend: "_native", story: "angry_birds_2_launch" solti@solti:~/angle$ ``` [test 2] - follow http://docs/document/d/1W3E7e-YcR5noim_poM0f7Dc0W8AdQDbJ2tFSPXgjpH0? resourcekey=0-VmGDLI3x0q4-sdpQ0n8GSA - setup out/AndroidPerformance - the build args: http://go/paste/4862801771233280 - the build cmd: autoninja -C out/AndroidPerformance angle_perftests - run cmd: ./out/AndroidPerformance/angle_perftests --gtest_filter="*angry_birds*" --verbose --local-output --verbose-output --shard-timeout 100000 --max-steps-performed 1 - then, run cmd: ```adb logcat -d | grep "running test"``` - confirmed the test names are printed: ``` solti@solti:~/angle$ adb logcat -d | grep "running test" 09-06 18:58:50.216 14592 14621 I ANGLE : running test name: "TracePerf", backend: "_vulkan", story: "angry_birds_2_1500" 09-06 18:58:51.143 14592 14621 I ANGLE : running test name: "TracePerf", backend: "_native", story: "angry_birds_2_1500" 09-06 18:58:51.467 14592 14621 I ANGLE : running test name: "TracePerf", backend: "_vulkan", story: "angry_birds_2_launch" 09-06 18:58:51.907 14592 14621 I ANGLE : running test name: "TracePerf", backend: "_native", story: "angry_birds_2_launch" solti@solti:~/angle$ ``` Bug: angleproject:6353 Bug: angleproject:7627 Change-Id: I02ad4396674fc01e9d10e474660a9dfac0d31edc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3873118 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Solti Ho <solti@google.com>
Jamie Madill 64f41972 2022-08-25T11:16:23 Use canonical gl.xml and update enum to string function. This replaces our copy of gl.xml with the upstream canonical copy. Note that one patch is required before we can remove ANGLE's copy: https://github.com/KhronosGroup/OpenGL-Registry/pull/538 Because the upstream version uses a new method of enum groups, we also update our enum-to-string generator to use the new groups. This new code includes many more enums and groups in the mapping. Bug: angleproject:6461 Change-Id: I1c0ab44c36afce8db04c9661b377bbe5762c913e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856649 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Roman Lavrov f18b6335 2022-08-29T11:53:01 Replace std::this_thread::get_id() use with a unique thread id. std::this_thread::get_id() gets recycled. It's pthread_self() under the hood on Linux and Android which gets recycled, for example when one thread terminates and another one starts it is likely to return the same value. Bug: angleproject:7602 Change-Id: I83d818bc17ead5cce8bce7f7d88fc1c7c0fa860c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855041 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Solti a216cfe8 2022-08-08T21:05:00 Adding angle_perftests test case names in logcat Overview: In logcat, we want to know which test is being executed. The CL 1. makes *ANGLEPerfTest* print the test name 2. wire the trace names in *TracePerfTest* as test names to *ANGLEPerfTest* Local Test: ==== Test 1 ==== - use this build args: http://go/paste/5111738277036032 - ```autoninja -C out/Android && ./out/Android/angle_perftests --gtest_filter="*angry_birds*" --verbose``` - Wait for the test to complete, then run ```adb logcat -d | grep running``` - 4 tests were executed: ``` solti@solti:~/angle$ adb logcat -d | grep running 08-11 18:13:49.757 7690 7721 I ANGLE : running test: TracePerf_Run/vulkan_angry_birds_2_1500 08-11 18:13:59.914 7690 7721 I ANGLE : running test: TracePerf_Run/native_angry_birds_2_1500 08-11 18:14:21.265 7690 7721 I ANGLE : running test: TracePerf_Run/vulkan_angry_birds_2_launch 08-11 18:14:48.030 7690 7721 I ANGLE : running test: TracePerf_Run/native_angry_birds_2_launch 08-11 18:14:58.296 1525 1525 E JobScheduler.Quota: <0>com.google.android.apps.docs has 0 EJ quota without running anything 08-11 18:14:58.296 1525 1525 E JobScheduler.Quota: <0>com.google.android.apps.docs has 0 EJ quota without running anything 08-11 18:14:58.297 1525 1635 E JobScheduler.Quota: <0>com.google.android.apps.docs has 0 EJ quota without running anything solti@solti:~/angle$ ``` ==== Test 2 ==== - follow http://docs/document/d/1W3E7e-YcR5noim_poM0f7Dc0W8AdQDbJ2tFSPXgjpH0? resourcekey=0-VmGDLI3x0q4-sdpQ0n8GSA - setup out/AndroidPerformance - run cmd: ./out/AndroidPerformance/angle_perftests --gtest_filter="*angry_birds*" --verbose --local-output --verbose-output --shard-timeout 100000 --max-steps-performed 1 - then, run cmd: ```adb logcat -d | grep running``` - confirmed the test names are printed ``` solti@solti:~/angle$ adb logcat -d | grep running 08-11 18:22:50.698 8496 8525 I ANGLE : running test: TracePerf_Run/vulkan_angry_birds_2_1500 08-11 18:22:51.599 8496 8525 I ANGLE : running test: TracePerf_Run/native_angry_birds_2_1500 08-11 18:22:51.917 8496 8525 I ANGLE : running test: TracePerf_Run/vulkan_angry_birds_2_launch 08-11 18:22:52.362 8496 8525 I ANGLE : running test: TracePerf_Run/native_angry_birds_2_launch solti@solti:~/angle$ ``` ==== Test 3 ==== - build a Linux build, using the args: http://go/paste/5953043785842688 - run the same test with cmd: xvfb-run ./out/Debug/angle_perftests --gtest_filter="*angry_birds*" --verbose | grep "running test" - confirmed the message is printed: http://go/paste/5800151735074816 Bug: angleproject:6353 Change-Id: I6118a75f54b1648923cb5fe541633d7dd52b20bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3817409 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Eddie Hatfield 6e6f3e6d 2022-07-29T11:13:24 Convert GLenum to string for failed trace prereq message Bug: angleproject:5784 Change-Id: I14bc01afe97a2475d8b0f278840a279b663da7db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3794304 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Eddie Hatfield 466fc0c6 2022-06-30T15:47:14 Add new prerequisite type for GL_ENUM integers This check is not applied in this commit. Bug: angleproject:7420 Change-Id: Ie84600c21aa4829c8d8c798643719c3084597af4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3759423 Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gregg Tavares 82ff27bf 2022-07-08T12:38:41 Add Metal to the perf tests Bug: angleproject:7296 Change-Id: I69cd17c464d48b933c51466bf9d21c278438c4e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3753277 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 785353fd 2022-05-24T12:40:16 Support Desktop OpenGL context creation in end2end tests Validation of Desktop GL versions and profile masks is unimplemented. Bug: angleproject:7360 Change-Id: Ifae94215b6aada895c2b02318a1d05c9515e9b96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3664916 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Eddie Hatfield 91976352 2022-06-21T15:41:02 Use C++17 attributes instead of custom macros Bug: angleproject:6747 Change-Id: Iad6c7cd8a18d028e01da49b647c5d01af11e0522 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3718999 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Lubosz Sarnecki 72f69e84 2022-06-21T16:22:25 ANGLEPerfTest: Add option to disable GL debug callbacks. Disable GL debug callbacks on native ARM GLES1. This fixes native GLES1 replay on Pixel 6 when running debug builds. Bug: angleproject:7447 Change-Id: I0059c07f4f2fb944e54a5163863b487bc31ab28f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3716584 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi b0d75fb5 2022-05-31T16:55:23 Vulkan: Use 64-bit counters Some upcoming counters don't fit in 32 bits. Bug: angleproject:5881 Change-Id: I2de8a603cabdb5f7417c29d5f37a50899485d6d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3679488 Commit-Queue: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Charlie Lao 5c756bc1 2022-04-26T14:31:47 Perf Tests: Compute GPU time periodically If you specify `--fixed-test-time 30` while running app perftest and watch for GPU memory allocation, you see GPU memory keeps growing. This is due to we generate timestamp query for every frame, but don't calculate the GPU time at the end of run. We accumulate all these queries over the entire test run. Even though this is technically not a leak, it does grow monotonically while test is running. This CL calls computeGPUTime every 16 frames (steps) and changed the mTimestampQueries to a queue structure and clean up the completed query as GPU time is computed. Bug: angleproject:7243 Change-Id: I283ee24c4835fe0fb4d15f8d1975c85b64e16443 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3609011 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Amirali Abdolrashidi cb1ee485 2022-04-08T12:58:12 Vulkan: Add perf test for MSAA swapchain resolve * Added a perf test for the swap time of the MSAA swapchain resolve * Average wall time results on Pixel 6: ~ 296992 ns using the subpass ~3163355 ns with the subpass disabled * Average wall time results on Pixel 6 Pro: ~ 225089 ns using the subpass ~2975449 ns with the subpass disabled Bug: angleproject:6762 Change-Id: I95f8c4350c5da136afd7f1b28b8c00d6707574ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3586181 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Jamie Madill b2a1f0d2 2022-04-14T07:58:32 Track total vs per-frame descriptor set counters. This will give more consistent measurements for descriptor set caches and descriptor set allocations. Bug: angleproject:6776 Change-Id: I584b8807ad19f8393ae54cc1d88b319c8f7f9f39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584636 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 8074061d 2022-04-09T01:03:53 Remove feature override platform methods Instead, the tests now use the enable() functions to override the feature at platform level. This fixes the forceFallbackFormat feature mistakenly not having been tested. Bug: angleproject:6435 Change-Id: I605e4133407282bd52232887b595af0d2c13575d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3577369 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 23558369 2022-04-06T15:41:59 Update perf tests arguments. Bug: angleproject:6776 Change-Id: I3cf51cdf9ad05dc792126354c84e717574638408 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3566219 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Roman Lavrov 1a3411c7 2022-04-01T18:42:51 Set SKIPPED status on skipped tests, rely on it in Gold tests. Gold tests check for '[ SKIPPED ] {test_name}' notice in test output instead of assuming that missing screenshot means SKIP. Now missing screenshot raises an exception. Also log the reason why the test was skipped. Example: [ RUN ] TracePerfTest.Run/native_asphalt_8 ../../src/tests/perf_tests/ANGLEPerfTest.cpp:837: Skipped Test skipped due to missing extension: GL_KHR_texture_compression_astc_ldr [ SKIPPED ] TracePerfTest.Run/native_asphalt_8 (182 ms) Bug: angleproject:6854 Change-Id: I2d88e2063a68ae95399a7932700f74032737ec91 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3565561 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Jamie Madill b2c01ac4 2021-09-28T12:57:45 Report process memory in perf tests. Bug: angleproject:6440 Change-Id: Ifdd4389266e3ac55963a3069d437c631bf73f72a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3191194 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3739a195 2022-03-09T13:56:36 perf tests: Record perf counter metrics. This adds a new command line argument that will allow the user to specify perf counters to record into the test output. Bug: angleproject:4918 Change-Id: Ia7432ff96eadf13ef681f67d2d503d00fd83e06e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516970 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1cfbe863 2022-03-09T13:35:44 perf tests: Report multiple time metrics. We can now report cpu/wall/gpu time instead of just a single timing metric. This is in preparation for reporting other types of metric including counters. Also includes some other minor script improvements. Bug: angleproject:4918 Change-Id: I52a3241893c56a1bfe982990ebac0fa168dbac51 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516969 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten b0e15ee4 2021-12-28T20:37:33 Decide GL_KHR_parallel_shader_compile in backends GL_KHR_parallel_shader_compile was previously being enabled unconditionally in the front end. However, some backends (Vulkan) perform worse with parallel shader compilation. This CL moves the decision of enabling GL_KHR_parallel_shader_compile to the backends. To support single-threaded shader compilation without affecting the generic worker thread pool, Context::mSingleThreadPool is added to own the single-threaded WorkerThreadPool and can be returned by the new function Context::getShaderCompileThreadPool(). Otherwise, if the extension is enabled, the (renamed) Context::mMultiThreadPool is returned. Bug: angleproject:6748 Change-Id: Ic8d3a183f397608f3002a05480deb976dfe44792 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3360337 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Lingfeng Yang e9f9fa17 2021-11-09T18:13:15 Add cpu time measurement to perf tests Bug: angleproject:6667 Change-Id: I16570a7b51d363dd1c0f35789b985520cb76d488 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270601 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Jamie Madill 666fcf38 2021-10-08T12:19:15 Rename functions that overlap with Windows APIs. Bug: angleproject:6283 Change-Id: Ifcd9ea9e3bf729fd2066178eb9429050b2f10518 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212894 Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 62414cf8 2021-10-06T16:07:03 Fix GPU-time-tracking in WebGL perf tests GL_EXT_disjoint_timer_query is not enabled by default in WebGL mode. This change ensures that extension is enabled. Bug: angleproject:4794 Change-Id: I1835f7ed2afd7a155ff9b63fad74a066df59ea4f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3210626 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lubosz Sarnecki e024635d 2021-09-10T13:56:28 ANGLEPerfTest: Skip tests when missing color space support. Make tests where a non-linear colorspace was requested on platforms that do not support EGL_KHR_gl_colorspace non-fatal. Add a initializeGLWithResult function to GLWindowBase, returning a new GLWindowResult enum and wrap it in EGLWindow and WGLWindow. Bug: angleproject:6366 Change-Id: Ib57327c4d988d82064272f229f8ad59287541623 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3151833 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 247ee1c3 2021-09-10T09:38:25 Perf Tests: Output results in "msBestFitFormat" again. The histogram bins for "ms" would cause excessive rounding for tests that run very quickly. For example, 0.0012354 ms would be rounded to 0.001 ms. This would produce very flat graphs that don't accurately represent the real results. Bug: angleproject:6090 Change-Id: I9293b2083d7e54dc2663648c361f4883278806ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3152746 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9c05f55a 2021-07-15T10:58:10 Capture/Replay: Add replay state validation. We can use this to validate traces that have slight differences when retracing. The valdation works by embedding the "expected" JSON into a string at the end of each captured frame. The replay also embeds a callback which fires right before the swap in the replay harness. The harness then gets the "actual" JSON and runs a comparison. On a mismatch it calls "diff" externally. Currently the diff call is hard-coded to work on Linux only. Note that when running validation it's important to replay on SwiftShader since that's what we use to retrace. Bug: angleproject:5133 Change-Id: Icbf0031d07be8bd916607c537dec235f9a512c43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3066008 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 1b2febb9 2021-08-23T12:39:16 Trace Tests: Refactor calibration logic. Instead of calling glFinish every step we now run a few warmup loops to try and figure out the right step interval. On each run we refine the step interval until we reach a number that completes in the specific time after a single glFinish call. This method will use the specified test time much more consistenty. Also a couple other improvements. Will use more test time on the bots because previously they were using a calibration/warmup time of 1 second per run loop, and this bumps it up to 3 per run loop. Long explanation below. What we did before: step() glFinish() step() glFinish() .. repeat for "gCalibrationTime" seconds then take the number of steps, the actual time ran, and compute an estimate for "mStepsToRun". When we run for real, we go: step() step() step() .. repeat for "mStepsToRun" steps. glFinish() this has an obvious performance difference, because after each step() (one frame in a trace) you had a complete stall. The new code first does the above to compute a tentative mStepsToRun, then uses the results of the second run to compute a much more accurate mStepsToRun by using the "actual" time it took to run the estimate. Bug: angleproject:6090 Change-Id: I0ff19873580e13f2af5a145a21f5b1c59fb15795 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3114606 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill d240f104 2021-08-23T16:25:20 Perf Tests: Update histogram units. Use "ms_smallerIsBetter" instead of "msBestFitFormat". This matches the requirements of the online docs as well as ensuring the dashboard knows which way to track the regressions. https://chromium.googlesource.com/catapult/+/HEAD/docs/histogram-set-json-format.md Bug: angleproject:6090 Change-Id: I0b234725b55d4abb1dd1e8153e132fdbcbad1c60 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3115225 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 13e52124 2021-08-23T08:44:13 ANGLEPerfTest: Fix a couple comment typos. Bug: angleproject:6090 Change-Id: I2c1a2f4c6b25bb1d4e462bcb20bd788529e255e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3114605 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d2d1f41f 2021-08-16T08:05:55 Add EGL extension to create window with a swap interval set. On Vulkan this allows creating a window once without needing to recreate the swapChain after we specify the swap interval. Also adds a simple regression test and EGL enum assertion printing formatting. Bug: angleproject:5133 Change-Id: I72af124cb0e8f7cddfa810988a9862c0f36a0e46 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3097806 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki 4a841e6a 2021-07-27T13:30:26 PerfTests: Replay EGL color spaces. Add EGL_GL_COLORSPACE_KHR to the EGLWindow's surface attributes if EGL_KHR_gl_colorspace is available. Require the extension to be available if the color space differs from the default EGL_COLORSPACE_LINEAR value. Bug: angleproject:5857 Change-Id: Ib33cbed7d4b115979bd847418cb5cd2b96f4f173 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3056374 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Jamie Madill 61517a16 2021-08-02T16:49:32 Remove extra angle:: uses from ANGLEPestTest.cpp. Bug: None Change-Id: I7101398504c547b97b9184c56b252bef5198cecb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3067510 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 48da1c35 2021-07-16T13:24:34 Vulkan: Prefer the local vulkan loader over the system one. Load the Vulkan loader ourselves and give vkGetInstanceProcAddr to volk. This allows us to always prefer loading from the current module directory instead of using the platform-specific ordering. Refactor angle::Library loading to use ModuleDir instead of ApplicationDir. CL originally authored by Geoff Lang. Bug: chromium:1219969 Change-Id: I21d1926e90fd66e1c23cea7323991ae55f3d22d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035444 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 51937ab3 2021-06-25T09:10:42 Re-land "Add SearchType to OpenSharedLibraryWithExtension." This fixes a bug in SystemInfo_vulkan where we were using the System search path for the Vulkan loader when we prefer using the custom ANGLE loader. Re-land fixes a bug where we would try to load the custom libVulkan on Android and other platforms where we should be using the system version. Bug: chromium:1219969 Change-Id: I34b592fb87cbddfd02c837a17942cac54c85d9d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3007265 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov f8d5d5ed 2021-07-05T21:11:23 Revert "Add SearchType to OpenSharedLibraryWithExtension." This reverts commit 18e99f4a2b37468b103da4a56c5b0fff25458062. Reason for revert: breaks Mac, e.g. https://ci.chromium.org/ui/p/chromium/builders/ci/mac-arm64-rel-tests/2197/overview Original change's description: > Add SearchType to OpenSharedLibraryWithExtension. > > This fixes a bug in SystemInfo_vulkan where we were using the > System search path for the Vulkan loader when we prefer using the > custom ANGLE loader. > > Bug: chromium:1219969 > Change-Id: Iedf0fd11fe9ed8cc020b445ea9e12a7936937361 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2988791 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: chromium:1219969, chromium:1225040, chromium:1226675 Change-Id: I7a7e329181b69b0fb546e5245d8842723077126f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3006320 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 5f869b74 2021-06-28T18:02:42 Revert "Vulkan: Load custom Vk Loader." This reverts commit e6e99c5472d2fe9beaa12840fa4a71191667b9a4. Reason for revert: Seems to be flaking on linux-clang-rel: https://ci.chromium.org/ui/p/angle/builders/try/linux-clang-rel/22602/overview Original change's description: > Vulkan: Load custom Vk Loader. > > Uses a GN copy rule to duplicate the loader. Also updates volk to > load using the new custom loader. Once both are in place we can > go back and remove the copy. > > Bug: chromium:1219969 > Change-Id: I8c48d168a842539f7cdba1ebfdaf3b08c3e1990d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982499 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Bug: chromium:1219969 Change-Id: Ib29014e728c1ce63c5e5bf7136ce19de7692964d No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987874 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e6e99c54 2021-06-23T08:25:58 Vulkan: Load custom Vk Loader. Uses a GN copy rule to duplicate the loader. Also updates volk to load using the new custom loader. Once both are in place we can go back and remove the copy. Bug: chromium:1219969 Change-Id: I8c48d168a842539f7cdba1ebfdaf3b08c3e1990d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982499 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill 18e99f4a 2021-06-25T09:10:42 Add SearchType to OpenSharedLibraryWithExtension. This fixes a bug in SystemInfo_vulkan where we were using the System search path for the Vulkan loader when we prefer using the custom ANGLE loader. Bug: chromium:1219969 Change-Id: Iedf0fd11fe9ed8cc020b445ea9e12a7936937361 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2988791 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>