• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2025 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 // ANGLEComputeTestCL:
7 //   Base class for ANGLEComputeTestCL performance tests
8 //
9 
10 #include "ANGLEPerfTest.h"
11 
12 class ANGLEComputeTestCL : public ANGLEPerfTest
13 {
14   public:
15     ANGLEComputeTestCL(const std::string &name,
16                        const RenderTestParams &testParams,
17                        const char *units = "ns");
18     ~ANGLEComputeTestCL() override;
19 
initializeBenchmark()20     virtual void initializeBenchmark() {}
destroyBenchmark()21     virtual void destroyBenchmark() {}
22 
23     virtual void drawBenchmark() = 0;
24 
getTraceEventMutex()25     std::mutex &getTraceEventMutex() { return mTraceEventMutex; }
isRenderTest()26     bool isRenderTest() const override { return true; }
27 
28   protected:
29     const RenderTestParams &mTestParams;
30 
31     void updatePerfCounters();
32 
33   private:
34     void SetUp() override;
35     void TearDown() override;
36 
37     void step() override;
38 
39     std::mutex mTraceEventMutex;
40 };
41