src/tests/perf_tests/ANGLEPerfTest.cpp


Log

Author Commit Date CI Message
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>
Jamie Madill 514df7f7 2015-03-27T09:46:42 Remove uses of std::unique_ptr in perftests. This is disallowed in Chromium because it isn't currently portable. We can put it back later if the rules change. BUG=angleproject:956 Change-Id: I5be28590f494719b8cc995739dde26726283fced Reviewed-on: https://chromium-review.googlesource.com/262777 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Geoff Lang 7afd4617 2015-03-30T10:56:05 Disable vsync for perf tests and don't report the total time. BUG=angleproject:955 Change-Id: I8223349622531c8fff7c7cd45bdf4754d7619ae2 Reviewed-on: https://chromium-review.googlesource.com/263062 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9bd4dbef 2015-03-27T09:46:40 Split ANGLEPerfTest into a Render and basic test. The basic test we can use for perf testing internal classes with mocks. The render tests are more specific to doing draw calls. BUG=angleproject:956 Change-Id: Iade393facc30c8d7288b1b94a159ce3afe993021 Reviewed-on: https://chromium-review.googlesource.com/262775 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 19a43dbe 2015-03-20T16:14:04 Add a perf test for draw call overhead. These perf tests use the D3D NULL renderers to measure pure CPU time, with no GPU limitations. Also fix our D3D9 SwapChain code to skip creating a SwapChain for NULLREF D3D9 devices, and the vertex decl code to reinitialize the formats when finding a mismatch with the previous value. BUG=angleproject:955 Change-Id: I449e63177b48afd1559c36244de0bc252814e813 Reviewed-on: https://chromium-review.googlesource.com/262208 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill be13ffca 2015-03-19T13:42:16 Use google test to wrap our perf tests. This provides easy implementation with the Chromium perf bots. BUG=angleproject:744 Change-Id: I71c04e3d67cae9344ddca9fd95fd3c9849494922 Reviewed-on: https://chromium-review.googlesource.com/260644 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>