• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2014 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 
7 // angle_deqp_libtester.h:
8 //   Exports for the ANGLE dEQP libtester module.
9 
10 #ifndef ANGLE_DEQP_LIBTESTER_H_
11 #define ANGLE_DEQP_LIBTESTER_H_
12 
13 #include <stdint.h>
14 #include "tcuANGLEPlatform.h"
15 
16 #if defined(_WIN32)
17 #    if defined(ANGLE_DEQP_LIBTESTER_IMPLEMENTATION)
18 #        define ANGLE_LIBTESTER_EXPORT __declspec(dllexport)
19 #    else
20 #        define ANGLE_LIBTESTER_EXPORT __declspec(dllimport)
21 #    endif
22 #elif defined(__GNUC__)
23 #    if defined(ANGLE_DEQP_LIBTESTER_IMPLEMENTATION)
24 #        define ANGLE_LIBTESTER_EXPORT __attribute__((visibility("default")))
25 #    else
26 #        define ANGLE_LIBTESTER_EXPORT
27 #    endif
28 #else
29 #    define ANGLE_LIBTESTER_EXPORT
30 #endif
31 
32 // Possible results of deqp_libtester_run
33 enum class dEQPTestResult
34 {
35     Pass,
36     Fail,
37     NotSupported,
38     Exception,
39 };
40 
41 struct dEQPOptions
42 {
43     uint32_t preRotation;
44     bool enableRenderDocCapture;
45     dEQPDriverOption driverOption{dEQPDriverOption::ANGLE};
46 };
47 
48 // Exported to the tester app.
49 ANGLE_LIBTESTER_EXPORT int deqp_libtester_main(int argc, const char *argv[]);
50 ANGLE_LIBTESTER_EXPORT bool deqp_libtester_init_platform(int argc,
51                                                          const char *argv[],
52                                                          void *logErrorFunc,
53                                                          const dEQPOptions &options);
54 ANGLE_LIBTESTER_EXPORT void deqp_libtester_shutdown_platform();
55 ANGLE_LIBTESTER_EXPORT dEQPTestResult deqp_libtester_run(const char *caseName);
56 
57 #endif  // ANGLE_DEQP_LIBTESTER_H_
58