• Show log

    Commit

  • Hash : d9c0aa4a
    Author : Takuto Ikuta
    Date : 2025-01-09T18:08:08

    Reland "Roll third_party/glmark2/src/ ca8de51fe..2054465f6 (77 commits)"
    
    This is a reland of commit 68b594e859f036b01974f78f8ddca8c419bc8ce3
    
    Includes fixes to glmark2Benchmark.cpp to parse updated output.
    
    Original change's description:
    > Roll third_party/glmark2/src/ ca8de51fe..2054465f6 (77 commits)
    >
    > https://chromium.googlesource.com/external/github.com/glmark2/glmark2/+log/ca8de51fedb7..2054465f6f7c
    >
    > $ git log ca8de51fe..2054465f6 --date=short --no-merges --format='%ad %ae %s'
    > 2024-04-25 alexandros.frantzis Use std::filesystem throughout the codebase
    > 2024-04-25 alexandros.frantzis android: Build native code with C++17
    > 2024-04-25 alexandros.frantzis Doc: Recommend meson for building win32 flavors
    > 2024-04-25 alexandros.frantzis github: Build win32 flavors with msvc in CI
    > 2024-04-25 alexandros.frantzis github: Build win32 flavors with mingw in CI
    > 2024-04-25 alexandros.frantzis include/getopt: Always use non-const char array to avoid MSVC errors
    > 2024-04-25 alexandros.frantzis libmatrix: Add utility function to get idle time
    > 2024-04-25 alexandros.frantzis libmatrix: Add utility function to get process times
    > 2024-04-24 alexandros.frantzis libmatrix: Add utility function to get the number of processors
    > 2024-04-25 alexandros.frantzis libmatrix: Use C++ std::chrono instead of clock_gettime
    > 2024-04-25 alexandros.frantzis libmatrix: Use C++17 std::filesystem instead of dirent
    > 2024-04-25 alexandros.frantzis Build: Add support for win32 flavors in meson
    > 2024-04-24 alexandros.frantzis libmatrix: Provide a copy of the va_list to __android_log_vprint
    > 2024-04-13 kode54 NativeStateX11: Fix WM_DELETE_WINDOW handling
    > 2024-02-15 alexandros.frantzis NativeStateWayland: Explicitly destroy all Wayland resources at shutdown
    > 2024-02-15 alexandros.frantzis Explicitly release GL related resources at shutdown
    > 2023-06-03 prlw1 src/meson.build: add x11 dependency to glx
    > 2024-02-07 timchen021 Fix memory leaks using smart pointers
    > 2024-01-12 daniel.levin Add missing includes in scene-collection.h
    > 2023-11-01 alexandros.frantzis GLVisualConfig: By default don't care about the stencil config component
    > 2023-11-01 alexandros.frantzis Options,GLStateEGL,GLStateGLX: Add option to require a good visual config
    > 2023-07-26 abs GLStateEGL,GLStateGLX: Change failure to get a "good" visual config to warning
    > 2023-11-01 alexandros.frantzis libmatrix: Add Log::warning() function
    > 2023-05-20 prlw1 meson.build: fix build and avoid sigsegv
    > 2023-05-03 ofourdan NativeStateX11: Add winsys option for position
    > 2023-01-19 alexandros.frantzis Build,Doc: Update files for 2023.01 release
    > 2023-01-19 alexandros.frantzis NativeStateMir: Remove Mir/mirclient support
    > 2023-01-03 alexandros.frantzis ResultsFile: Support storing results in an XML file
    > 2023-01-03 alexandros.frantzis ResultsFile: Support storing results in a CSV file
    > 2023-01-03 alexandros.frantzis Options,ResultsFile: Add option to set the results file
    > 2023-01-03 alexandros.frantzis Introduce infrastructure to support saving results to a file
    > 2023-01-03 alexandros.frantzis CanvasGeneric: Store individual info elements in separate strings
    > 2023-01-03 alexandros.frantzis MainLoop: Store indivitual result values in separate strings
    > 2023-01-03 alexandros.frantzis Scene: Remove trailing ':' from scene info string
    > 2023-01-04 alexandros.frantzis SceneTerrain: Silence unused variable warning
    > 2022-12-21 pierre-yves.mordret NativeStateGBM: Lock and release the front buffer on flip
    > 2022-12-21 alexandros.frantzis MainLoop,Scene: Support reporting shader compilation time
    > 2022-12-20 alexandros.frantzis MainLoop,Scene: Add busy percentage in CPU time results
    > 2022-12-20 alexandros.frantzis MainLoop,Scene: Support reporting CPU time results
    > 2022-12-20 alexandros.frantzis Options: Introduce option to specify benchmark results to show
    > 2022-12-20 alexandros.frantzis Scene: Update elapsed times when a benchmark finishes
    > 2022-12-19 alexandros.frantzis Scene: Introduce struct to keep track of elapsed time
    > 2022-12-15 alexandros.frantzis Scene: Introduce infrastructure for more complex scene stats
    > 2022-12-15 alexandros.frantzis Scene: Move common preparation logic to Scene::prepare
    > 2022-12-13 alexandros.frantzis Scene: Introduce non-virtual methods to prepare and finish a scene for benchmark
    > 2022-12-08 alexandros.frantzis GLVisualConfig: Support specifying the config id in --visual-config
    > 2022-12-08 alexandros.frantzis libmatrix: Support prefix dependent input conversions from string
    > 2022-12-08 alexandros.frantzis GLStateEGL,GLStateGLX: Fail if no suitable config is found
    > 2022-12-08 alexandros.frantzis GLStateEGL,GLStateGLX: Don't limit the configs passed to our selection mechanism
    > 2022-12-08 alexandros.frantzis GLVisualConfig: Penalize configs with components smaller than requested
    > 2022-11-16 alexandros.frantzis github: Build x11-gl-egl flavor in CI
    > 2022-11-14 rilian-la-te build: Add x11-gl-egl flavor
    > 2022-11-10 alexandros.frantzis GLStateGLX: Support multisampled configs
    > 2022-11-10 l.stach GLStateEGL: Support multisampled configs
    > 2022-11-10 l.stach GLVisualConfig: Add multisampling support
    > 2022-09-02 120989324 Add missing newline at end of log messages
    > 2022-11-10 alexandros.frantzis NativeStateDRM,NativeStateGBM: Support configuring the DRM device
    > 2022-11-10 alexandros.frantzis Options: Support passing window system specific options
    > 2022-04-23 nunes.erico NativeStateGBM: Add GBM offscreen backend
    > 2022-07-07 wuqianhai SceneJellyfish: Fix memory leak
    > 2022-07-07 wuqianhai SceneRefract: Fix texture leak
    > 2022-07-07 wuqianhai SceneIdeas: Fix texture leak
    > 2022-06-14 Martin.Jansa waflib: fix compatibility with python-3.11
    > 2022-05-12 jeffy.chen NativeStateDRM: Honor visual configuration
    > 2022-05-13 alexandros.frantzis GLStateEGL,GLStateGLX: Use SwapInterval 1 for FIFO swap mode
    > 2022-04-15 alexandros.frantzis NativeStateDrm: Implement swap interval 0
    > 2022-02-14 alexandros.frantzis github: Run apt-get update to get latest packages
    > 2022-02-14 alexandros.frantzis CanvasGeneric,CanvasAndroid: Display surface config info
    > 2022-02-14 alexandros.frantzis Options: Support --version command line argument
    > 2022-02-14 alexandros.frantzis libmatrix: Add missing <utility> include
    > 2022-02-10 hillma libmatrix: avoid -Wimplicit-fallthrough
    > 2021-12-23 alexandros.frantzis Build,Doc: Update files for 2021.12 release
    > 2021-12-23 alexandros.frantzis NativeStateDrm: Fix crash when we can't become DRM master
    > 2021-09-30 jf android: Fix benchmark parameter edition
    > 2021-08-30 alexandros.frantzis Use highp precision modifier only on GLES
    > 2021-08-30 alexandros.frantzis GLStateEGL: Support EGL versions < 1.4
    > 2021-04-11 maahiuzeon Fix model loading on big endian.
    >
    > Created with:
    >   roll-dep third_party/glmark2/src
    >
    > Bug: chromium:40263312
    > No-Presubmit: true
    > Change-Id: Ifee506badac67ff5af57605994daff01278c6d56
    > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6162277
    > Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
    > Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
    > Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
    
    Test: angle_perftests --gtest_filter="*GLMark2Benchmark*"
    Bug: chromium:40263312
    Change-Id: I54d8982cb37e488f80b7511ad0111d1ff111f004
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6174747
    Reviewed-by: Roman Lavrov <romanl@google.com>
    Commit-Queue: Cody Northrop <cnorthrop@google.com>
    Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/angle.git
    Git SSH git@git.kmx.io:kc3-lang/angle.git
    Public access ? public
    Description

    A conformant OpenGL ES implementation for Windows, Mac, Linux, iOS and Android.

    Homepage

    Github

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg thodg_l
    Tags

  • README.md

  • ANGLE Performance Tests

    angle_perftests is a standalone microbenchmark testing suite that contains tests for the OpenGL API. angle_trace_tests is a suite to run captures traces for correctness and performance. Because the traces contain confidential data, they are not publicly available. For more details on ANGLE’s tracer please see the docs.

    The tests currently run on the Chromium ANGLE infrastructure and report results to the Chromium perf dashboard. Please refer to thepublic dashboard docs for help

    Running the Tests

    You can follow the usual instructions to check out and build ANGLE. Build the angle_perftests or angle_trace_tests targets. Note that all test scores are higher-is-better. You should also ensure is_debug=false in your build. Running with angle_assert_always_on or debug validation enabled is not recommended.

    Variance can be a problem when benchmarking. We have a test harness to run a tests repeatedly to find a lower variance measurement. See src/tests/run_perf_tests.py.

    To use the script first build angle_perftests or angle_trace_tests, set your working directory your build directory, and invoke the run_perf_tests.py script. Use --test-suite to specify your test suite, and --filter to specify a test filter.

    Choosing the Test to Run

    You can choose individual tests to run with --gtest_filter=*TestName*. To select a particular ANGLE back-end, add the name of the back-end to the test filter. For example: DrawCallPerfBenchmark.Run/gl or DrawCallPerfBenchmark.Run/d3d11. Many tests have sub-tests that run slightly different code paths. You might need to experiment to find the right sub-test and its name.

    Null/No-op Configurations

    ANGLE implements a no-op driver for OpenGL, D3D11 and Vulkan. To run on these configurations use the gl_null, d3d11_null or vulkan_null test configurations. These null drivers will not do any GPU work. They will skip the driver entirely. These null configs are useful for diagnosing performance overhead in ANGLE code.

    Command-line Arguments

    Each test runs N trials and prints metrics for each trial. Trials are limited by time (default), step/frame limits can also be set. Note that at the beginning performance might be affected by hitting new code paths, cold caches etc (see warmup below) but longer runs on some devices trigger thermal throttling affecting performance (known: phones, desktop perf CI bots).

    Several command-line arguments control how the tests run:

    • --run-to-key-frame: If the trace specifies a key frame, run to that frame and stop. Traces without a KeyFrames entry in their JSON will default to frame 1. This is primarily to save cycles on our bots that do screenshot quality comparison.
    • --enable-trace: Write a JSON event log that can be loaded in Chrome.
    • --trace-file file: Name of the JSON event log for --enable-trace.
    • --steps-per-trial x: Fixed number of steps to run for each test trial.
    • --max-steps-performed x: Upper maximum on total number of steps for the entire test run. For a quick smoke test, you can specify 1.
    • --render-test-output-dir=dir: Directory to store test artifacts (including screenshots but unlike --screenshot-dir, dir here is always a local directory regardless of platform and --save-screenshots isn’t implied).
    • --verbose: Print extra timing information.
    • --trial-time x or --max-trial-time x: Run each test trial under this max time. Defaults to 10 seconds.
    • --fixed-test-time x: Run the tests until this much time has elapsed.
    • --warmup: Run a warmup phase before the test. Defaults to off.
    • --fixed-test-time-with-warmup x: Start with a warmup, then run the tests until this much time has elapsed.
    • --trials: Number of times to repeat testing. Defaults to 3.
    • --no-finish: Don’t call glFinish after each test trial.
    • --validation: Enable serialization validation in the trace tests. Normally used with SwiftShader and retracing.
    • --perf-counters: Additional performance counters to include in the result output. Separate multiple entries with colons: ‘:’.

    The command line arguments implementations are located in ANGLEPerfTestArgs.cpp.

    Test Breakdown

    Microbenchmarks

    • DrawCallPerfBenchmark: Runs a tight loop around DrawArarys calls.
      • validation_only: Skips all rendering.
      • render_to_texture: Render to a user Framebuffer instead of the default FBO.
      • vbo_change: Applies a Vertex Array change between each draw.
      • tex_change: Applies a Texture change between each draw.
    • UniformsBenchmark: Tests performance of updating various uniforms counts followed by a DrawArrays call.
      • vec4: Tests vec4 Uniforms.
      • matrix: Tests using Matrix uniforms instead of vec4.
      • multiprogram: Tests switching Programs between updates and draws.
      • repeating: Skip the update of uniforms before each draw call.
    • DrawElementsPerfBenchmark: Similar to DrawCallPerfBenchmark but for indexed DrawElements calls.
    • BindingsBenchmark: Tests Buffer binding performance. Does no draw call operations.
      • 100_objects_allocated_every_iteration: Tests repeated glBindBuffer with new buffers allocated each iteration.
      • 100_objects_allocated_at_initialization: Tests repeated glBindBuffer the same objects each iteration.
    • TexSubImageBenchmark: Tests glTexSubImage update performance.
    • BufferSubDataBenchmark: Tests glBufferSubData update performance.
    • TextureSamplingBenchmark: Tests Texture sampling performance.
    • TextureBenchmark: Tests Texture state change performance.
    • LinkProgramBenchmark: Tests performance of glLinkProgram.
    • glmark2: Runs the glmark2 benchmark.

    Many other tests can be found that have documentation in their classes.

    Trace Tests

    Trace tests take command line arguments that pick the run configuration:

    • --use-gl=native: Runs the tests against the default system GLES implementation instad of your local ANGLE.
    • --use-angle=backend: Picks an ANGLE back-end. e.g. vulkan, d3d11, d3d9, gl, gles, metal, or swiftshader. Vulkan is the default.
    • --offscreen: Run with an offscreen surface instead of swapping every frame.
    • --vsync: Run with vsync enabled, and measure CPU and GPU work insead of wall clock time.
    • --minimize-gpu-work: Modify API calls so that GPU work is reduced to minimum.
    • --screenshot-dir dir: Directory to store test screenshots. Implies --save-screenshots. On Android this directory is on device, not local (see also --render-test-output-dir). Only implemented in TracePerfTest.
    • --save-screenshots: Save screenshots. Only implemented in TracePerfTest.
    • --screenshot-frame <frame>: Which frame to capture a screenshot of. Defaults to first frame (1). Using -1 will capture every frame rendered, including those after Reset for multiple loops. Only implemented in TracePerfTest.
    • --include-inactive-resources : Include all resources captured at trace-time during replay. Only resources which are active during trace execution are replayed by default.

    For example, for an endless run with no warmup on swiftshader, run:

    angle_trace_tests --gtest_filter=TraceTest.trex_200 --use-angle=swiftshader --trial-time 1000000

    Understanding the Metrics

    • cpu_time: Amount of CPU time consumed by an iteration of the test. This is backed by GetProcessTimes on Windows, getrusage on Linux/Android, and zx_object_get_info on Fuchsia.
      • This value may sometimes be larger than wall_time. That is because we are summing up the time on all CPU threads for the test.
    • wall_time: Wall time taken to run a single iteration, calculated by dividing the total wall clock time by the number of test iterations.
      • For trace tests, each rendered frame is an iteration.
    • gpu_time: Estimated GPU elapsed time per test iteration. We compute the estimate using GLES timestamp queries at the beginning and ending of each test loop.
      • For trace tests, this metric is only enabled in vsync mode.