xref: /aosp_15_r20/external/angle/src/tests/deqp_support/angle_deqp_libtester.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
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 
15 #if defined(_WIN32)
16 #    if defined(ANGLE_DEQP_LIBTESTER_IMPLEMENTATION)
17 #        define ANGLE_LIBTESTER_EXPORT __declspec(dllexport)
18 #    else
19 #        define ANGLE_LIBTESTER_EXPORT __declspec(dllimport)
20 #    endif
21 #elif defined(__GNUC__)
22 #    if defined(ANGLE_DEQP_LIBTESTER_IMPLEMENTATION)
23 #        define ANGLE_LIBTESTER_EXPORT __attribute__((visibility("default")))
24 #    else
25 #        define ANGLE_LIBTESTER_EXPORT
26 #    endif
27 #else
28 #    define ANGLE_LIBTESTER_EXPORT
29 #endif
30 
31 // Possible results of deqp_libtester_run
32 enum class dEQPTestResult
33 {
34     Pass,
35     Fail,
36     NotSupported,
37     Exception,
38 };
39 
40 struct dEQPOptions
41 {
42     uint32_t preRotation;
43     bool enableRenderDocCapture;
44 };
45 
46 // Exported to the tester app.
47 ANGLE_LIBTESTER_EXPORT int deqp_libtester_main(int argc, const char *argv[]);
48 ANGLE_LIBTESTER_EXPORT bool deqp_libtester_init_platform(int argc,
49                                                          const char *argv[],
50                                                          void *logErrorFunc,
51                                                          const dEQPOptions &options);
52 ANGLE_LIBTESTER_EXPORT void deqp_libtester_shutdown_platform();
53 ANGLE_LIBTESTER_EXPORT dEQPTestResult deqp_libtester_run(const char *caseName);
54 
55 #endif  // ANGLE_DEQP_LIBTESTER_H_
56