• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_deqp_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18//
19// large-scale-change included anything that looked like it might be a license
20// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
21//
22// Please consider removing redundant or irrelevant files from 'license_text:'.
23// See: http://go/android-license-faq
24license {
25    name: "external_deqp_license",
26    visibility: [":__subpackages__"],
27    license_kinds: [
28        "SPDX-license-identifier-Apache-2.0",
29        "SPDX-license-identifier-BSD",
30        "SPDX-license-identifier-MIT",
31    ],
32    license_text: [
33        "LICENSE",
34        "NOTICE",
35    ],
36}
37
38build = ["AndroidGen.bp"]
39
40// Used by Amber.
41// Amber includes "vkDefs.h".
42cc_library_headers {
43    name: "deqp_vulkan_headers",
44    defaults: ["deqp_and_deps_defaults"],
45    export_include_dirs: [
46        "external/vulkancts/framework/vulkan",
47        "external/vulkancts/framework/vulkan/generated/vulkan",
48        "framework/delibs/debase",
49    ],
50}
51
52// These defaults ensure we have a consistent set of defines and compiler flags
53// across dEQP and its dependencies.
54cc_defaults {
55    name: "deqp_and_deps_defaults",
56    cpp_std: "c++11",
57    cflags: [
58        // Amber defines.
59        "-DAMBER_CTS_VULKAN_HEADER=1",
60        "-DAMBER_ENABLE_CLSPV=0",
61        "-DAMBER_ENABLE_DXC=0",
62        "-DAMBER_ENABLE_LODEPNG=1", // This has no effect.
63        "-DAMBER_ENABLE_RTTI=1",
64        "-DAMBER_ENABLE_SHADERC=0",
65        "-DAMBER_ENABLE_SPIRV_TOOLS=0",
66        "-DAMBER_ENABLE_VK_DEBUGGING=0",
67        "-DAMBER_ENGINE_DAWN=0",
68        "-DAMBER_ENGINE_VULKAN=1",
69
70        // glslang defines:
71        "-DENABLE_HLSL",
72        "-DENABLE_OPT=0",
73        "-DGLSLANG_OSINCLUDE_UNIX",
74
75        // SPIRV-Tools defines:
76        "-DSPIRV_ANDROID",
77        "-DSPIRV_CHECK_CONTEXT",
78        "-DSPIRV_COLOR_TERMINAL",
79        "-DSPIRV_TIMER_ENABLED",
80
81        // Android/Clang defines (not needed):
82        // -D_FORTIFY_SOURCE=2
83        // -DANDROID
84        // -DNDEBUG
85
86        // dEQP defines that we don't want/need:
87        // -DDE_DEBUG
88        // -DDEQP_USE_RELEASE_INFO_FILE
89        // -DPNG_DEBUG
90
91        // dEQP defines that are worked out in deDefs.h, without needing
92        // explicit defs:
93        // -DDE_PTR_SIZE=8
94        // -DDE_CPU=DE_CPU_ARM_64
95        //"-DDE_FENV_ACCESS_ON=_Pragma(\"STDC FENV_ACCESS ON\")",
96
97        // dEQP defines:
98        "-D_XOPEN_SOURCE=600",
99        "-DDE_ANDROID_API=28",
100        "-DDE_ASSERT_FAILURE_CALLBACK",
101        "-DDE_COMPILER=DE_COMPILER_CLANG",
102        "-DDE_MINGW=0",
103        "-DDE_OS=DE_OS_ANDROID",
104        "-DDEQP_GLES2_DIRECT_LINK=1",
105        "-DDEQP_HAVE_RENDERDOC_HEADER=0", // Needs to be 0.
106        "-DDEQP_SUPPORT_DRM=0",
107        "-DDEQP_SUPPORT_GLES1=1",
108        "-DDEQP_TARGET_NAME=\"Android\"",
109        "-DQP_SUPPORT_PNG",
110        "-DCTS_USES_VULKAN",
111
112        "-Wall",
113        "-Werror",
114        "-Wconversion",
115
116        "-fwrapv",
117    ],
118    cppflags: [
119        "-fexceptions",
120    ],
121    sdk_version: "27",
122    rtti: true,
123    stl: "c++_static",
124}
125
126cc_library_shared {
127    name: "libdeqp",
128    defaults: ["libdeqp_defaults"]
129}
130
131cc_defaults {
132    name: "libdeqp_defaults",
133    defaults: ["libdeqp_gen", "deqp_and_deps_defaults"],
134
135    tidy_checks: [
136        // The clang-tidy google-explicit-constructor warning is issued to nearly
137        // 1000 conversion constructors in this project. They are from more than
138        // 500 source files. Most of them should be declared explicit, but many
139        // of them need to be implicit. Until we correctly mark them as explicit
140        // or NOLINT(implicit), we suppress the google-explicit-constructor check.
141        "-google-explicit-constructor",
142
143        "-google-build-explicit-make-pair",
144        "-google-global-names-in-headers",
145        "-google-runtime-member-string-references",
146        "-google-runtime-operator",
147    ],
148
149    header_libs: ["jni_headers"],
150
151    include_dirs: [
152        "external/deqp-deps/SPIRV-Headers/include",
153    ],
154
155    shared_libs: [
156        "libEGL",
157        "libGLESv2",
158        "libandroid",
159        "liblog",
160        "libm",
161        "libc",
162        "libz",
163        "libdl",
164    ],
165
166    static_libs: [
167        "libpng_ndk",
168        "deqp_glslang_glslang",
169        "deqp_glslang_OGLCompiler",
170        "deqp_glslang_OSDependent",
171        "deqp_glslang_MachineIndependent",
172        "deqp_glslang_GenericCodeGen",
173        "deqp_glslang_SPIRV",
174        "deqp_glslang_SPVRemapper",
175        "deqp_spirv-tools",
176        "deqp_amber",
177    ],
178
179    cflags: [
180        "-Wno-implicit-fallthrough",
181        "-Wno-sign-conversion",
182        "-Wno-unused-private-field",
183        "-Wno-shorten-64-to-32",
184    ],
185
186    cppflags: [
187        "-Wno-non-virtual-dtor",
188        "-Wno-delete-non-virtual-dtor",
189        "-Wno-implicit-int-conversion",
190        "-Wno-missing-field-initializers",
191        "-Wno-switch",
192        "-Wno-unused-parameter",
193        "-Wno-unused-variable",
194    ],
195}
196
197android_test {
198    name: "com.drawelements.deqp",
199
200    test_suites: [
201        "vts10",
202    ],
203
204    srcs: ["android/package/src/**/*.java"],
205    resource_dirs: ["android/package/res"],
206    manifest: "android/package/AndroidManifest-integration.xml",
207
208    asset_dirs: [
209        "data",
210        "external/vulkancts/data",
211        "external/graphicsfuzz/data",
212    ],
213
214    jni_libs: ["libdeqp"],
215
216    compile_multilib: "both",
217
218    // We could go down all the way to API-13 for 32bit. 22 is required for 64bit ARM.
219    sdk_version: "test_current",
220
221    // Avoid apk installation failures ('Requires development platform...' errors)
222    min_sdk_version: "31",
223    target_sdk_version: "34",
224}
225
226cc_test {
227    name: "deqp-binary",
228    defaults: ["libdeqp_defaults"],
229
230    cflags: [
231        "-DDEQP_GLES3_RUNTIME_LOAD=1",
232    ],
233
234    cppflags: [
235        "-Wno-macro-redefined",
236    ],
237
238    srcs: [
239        "framework/platform/tcuMain.cpp",
240        "framework/platform/surfaceless/tcuSurfacelessPlatform.cpp",
241    ],
242
243    local_include_dirs: [
244       "framework/platform/surfaceless",
245    ],
246
247    multilib: {
248        lib32: {
249            suffix: "32",
250        },
251        lib64: {
252            suffix: "64",
253        },
254    },
255
256    compile_multilib: "both",
257
258    version_script: "deqp_binary.lds",
259
260    host_supported: false,
261    gtest: false,
262    auto_gen_config: false,
263    test_options: {
264        unit_test: false,
265    },
266    data: [
267        ":deqp_binary_incremental_test_lists",
268        ":deqp_binary_data",
269        ":deqp_binary_data_vulkancts",
270        ":deqp_binary_data_graphicsfuzz",
271    ],
272}
273
274filegroup {
275    name: "deqp_binary_incremental_test_lists",
276    srcs: [
277        "android/cts/main/gles3-incremental-deqp.txt",
278        "android/cts/main/vk-incremental-deqp.txt",
279    ],
280    path: "android/cts/main",
281}
282
283filegroup {
284    name: "deqp_binary_data",
285    srcs: [
286        "data/**/*",
287    ],
288    path: "data",
289}
290
291filegroup {
292    name: "deqp_binary_data_vulkancts",
293    srcs: [
294        "external/vulkancts/data/**/*",
295    ],
296    path: "external/vulkancts/data",
297}
298
299filegroup {
300    name: "deqp_binary_data_graphicsfuzz",
301    srcs: [
302        "external/graphicsfuzz/data/**/*",
303    ],
304    path: "external/graphicsfuzz/data",
305}
306