Hash :
c2493e38
Author :
Date :
2017-06-20T17:16:25
Add DrawElementsPerf test This is a follow-up CL for https://chromium-review.googlesource.com/c/544634/. In this commit, we add drawElements perf test for d3d9, d3d11 and OpenGL. Specially, we test DrawElements with unchanged index buffer every frame and changed index buffer every frame. This is also a preparation for further remove IndexRange in validation. Paste a set of data (repeated 30) for reference on Intel skylake Win10 desktop. DrawElementsPerfBenchmark.Run/d3d11: mean: 13186.1666667, stddev: 200.479605502, truncated mean: 13192.5416667, stddev: 156.284190704 DrawElementsPerfBenchmark.Run/d3d11_index_buffer_changed: mean: 43.6, stddev: 4.02160830183, truncated mean: 43.5833333333, stddev: 2.97092391166 BUG=angleproject:1393 TEST=angle_perftests Change-Id: I94bd181aa2b4515df1affc79f591f5db399feac3 Reviewed-on: https://chromium-review.googlesource.com/585981 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
//
// Copyright (c) 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// DrawCallPerfParams.h:
// Parametrization for performance tests for ANGLE draw call overhead.
//
#ifndef TESTS_PERF_TESTS_DRAW_CALL_PERF_PARAMS_H_
#define TESTS_PERF_TESTS_DRAW_CALL_PERF_PARAMS_H_
#include <ostream>
#include "ANGLEPerfTest.h"
struct DrawCallPerfParams : public RenderTestParams
{
// Common default options
DrawCallPerfParams()
{
majorVersion = 2;
minorVersion = 0;
windowWidth = 256;
windowHeight = 256;
}
virtual ~DrawCallPerfParams() {}
std::string suffix() const override;
unsigned int iterations = 50;
double runTimeSeconds = 10.0;
int numTris = 1;
bool useFBO = false;
};
std::ostream &operator<<(std::ostream &os, const DrawCallPerfParams ¶ms);
DrawCallPerfParams DrawCallPerfD3D11Params(bool useNullDevice, bool renderToTexture);
DrawCallPerfParams DrawCallPerfD3D9Params(bool useNullDevice, bool renderToTexture);
DrawCallPerfParams DrawCallPerfOpenGLParams(bool useNullDevice, bool renderToTexture);
DrawCallPerfParams DrawCallPerfValidationOnly();
DrawCallPerfParams DrawCallPerfVulkanParams(bool renderToTexture);
#endif // TESTS_PERF_TESTS_DRAW_CALL_PERF_PARAMS_H_