1 // 2 // Copyright 2017 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // DrawCallPerfParams.h: 7 // Parametrization for performance tests for ANGLE draw call overhead. 8 // 9 10 #ifndef TESTS_PERF_TESTS_DRAW_CALL_PERF_PARAMS_H_ 11 #define TESTS_PERF_TESTS_DRAW_CALL_PERF_PARAMS_H_ 12 13 #include <ostream> 14 15 #include "ANGLEPerfTest.h" 16 #include "test_utils/angle_test_configs.h" 17 18 struct DrawCallPerfParams : public RenderTestParams 19 { 20 // Common default options 21 DrawCallPerfParams(); 22 ~DrawCallPerfParams() override; 23 24 std::string story() const override; 25 26 double runTimeSeconds; 27 int numTris; 28 bool offscreen; 29 }; 30 31 namespace params 32 { 33 template <typename ParamsT> D3D9(const ParamsT & in)34ParamsT D3D9(const ParamsT &in) 35 { 36 ParamsT out = in; 37 out.eglParameters = angle::egl_platform::D3D9(); 38 return out; 39 } 40 41 template <typename ParamsT> D3D11(const ParamsT & in)42ParamsT D3D11(const ParamsT &in) 43 { 44 ParamsT out = in; 45 out.eglParameters = angle::egl_platform::D3D11(); 46 return out; 47 } 48 49 template <typename ParamsT> GL(const ParamsT & in)50ParamsT GL(const ParamsT &in) 51 { 52 ParamsT out = in; 53 out.eglParameters = angle::egl_platform::OPENGL_OR_GLES(); 54 return out; 55 } 56 57 template <typename ParamsT> GL3(const ParamsT & in)58ParamsT GL3(const ParamsT &in) 59 { 60 ParamsT out = in; 61 out.eglParameters = angle::egl_platform::OPENGL_OR_GLES(3, 0); 62 return out; 63 } 64 65 template <typename ParamsT> Vulkan(const ParamsT & in)66ParamsT Vulkan(const ParamsT &in) 67 { 68 ParamsT out = in; 69 out.eglParameters = angle::egl_platform::VULKAN(); 70 return out; 71 } 72 73 template <typename ParamsT> WGL(const ParamsT & in)74ParamsT WGL(const ParamsT &in) 75 { 76 ParamsT out = in; 77 out.driver = angle::GLESDriverType::SystemWGL; 78 return out; 79 } 80 81 } // namespace params 82 83 #endif // TESTS_PERF_TESTS_DRAW_CALL_PERF_PARAMS_H_ 84