mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-16 08:21:40 -04:00
This adds a benchmark for render pass that exercises the following
workload configurations:
1. Rect vs. texture
2. Grid of nodes vs. stack of nodes
3. One output-wide clip vs. 200 line-by-line clips
Each test performs two warm-up runs to give an initial estimate on the
required run counter, and will retry the run until at least 100 ms of
runtime is achieved (see TARGET_NS at the top).
The test uses the Go benchmark output format for compatibility with
benchstat. Each test will print the name of the test, the iteration
count used, the CPU time per operation and if available the GPU time per
operation.
The -count N argument can be used to re-run each test N times, which
benchstat uses to observe how much the results vary.
The test uses XRGB8888 and sRGB to stay within the Vulkan one-pass
pathway. Switch to e.g., XRGB2101010 or gamma22 to test the two-pass
pathway.
Example use with benchstat:
WLR_RENDERER=gles2 ./bench_render_pass -count=10 | tee gles2.txt
WLR_RENDERER=vulkan ./bench_render_pass -count=10 | tee vulkan.txt
benchstat gles2.txt vulkan.txt
Assisted-By: robots
16 lines
308 B
Meson
16 lines
308 B
Meson
test(
|
|
'box',
|
|
executable('test-box', 'test_box.c', dependencies: wlroots),
|
|
)
|
|
|
|
benchmark(
|
|
'scene',
|
|
executable('bench-scene', 'bench_scene.c', dependencies: wlroots),
|
|
timeout: 30,
|
|
)
|
|
|
|
benchmark(
|
|
'render-pass',
|
|
executable('bench-render-pass', 'bench_render_pass.c', dependencies: wlroots),
|
|
timeout: 30,
|
|
)
|