These tests draw a simple triangle with many ways of encoding commands, binding, and uploading data to the GPU. This tests the performance of Dawn's validation, command recording, and submission by switching buffer bindings, bind groups, and pipelines. Some test instantiations upload per-draw data to test efficiency of resource transitions or pre-record commands in a render bundle. Change-Id: I9994cd96ef5988cca410462418792f28161c0526 Bug: dawn:208 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12460 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Dawn Perf Tests
Tests
BufferUploadPerf
Tests repetitively uploading data to the GPU using either SetSubData
or CreateBufferMapped
.
Test Harness
The test harness provides a DawnPerfTestBase
which Derived tests should inherit from.
The harness calls Step()
of a Derived class to measure its execution
time. First, a calibration step is run which determines the number of times
to call Step()
to last approximately kCalibrationRunTimeSeconds
. Then,
Step()
is called for the computed number of times, or until
kMaximumRunTimeSeconds
is exceeded. kNumTrials
are performed and the
results and averages per iteration* are printed.
(See DawnPerfTest.h
for the values of the constants).
The results are printed according to the format specified at [chromium]//build/scripts/slave/performance_log_processor.py
*The number of iterations a test performs should be passed to the
constructor of DawnPerfTestBase
. The reported times are the total time
divided by numSteps * iterationsPerStep
.