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++17", 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_ASSERT_FAILURE_CALLBACK", 100 "-DDE_COMPILER=DE_COMPILER_CLANG", 101 "-DDE_MINGW=0", 102 "-DDE_OS=DE_OS_ANDROID", 103 "-DDEQP_GLES2_DIRECT_LINK=1", 104 "-DDEQP_HAVE_RENDERDOC_HEADER=0", // Needs to be 0. 105 "-DDEQP_EXCLUDE_VK_VIDEO_TESTS", 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 product_variables: { 125 platform_sdk_version: { 126 cflags: [ 127 // dEQP defines: 128 "-DDE_ANDROID_API=%d", 129 ], 130 }, 131 }, 132} 133 134cc_library_shared { 135 name: "libdeqp", 136 defaults: ["libdeqp_defaults"], 137} 138 139cc_defaults { 140 name: "libdeqp_defaults", 141 defaults: [ 142 "libdeqp_gen", 143 "deqp_and_deps_defaults", 144 ], 145 146 tidy_checks: [ 147 // The clang-tidy google-explicit-constructor warning is issued to nearly 148 // 1000 conversion constructors in this project. They are from more than 149 // 500 source files. Most of them should be declared explicit, but many 150 // of them need to be implicit. Until we correctly mark them as explicit 151 // or NOLINT(implicit), we suppress the google-explicit-constructor check. 152 "-google-explicit-constructor", 153 154 "-google-build-explicit-make-pair", 155 "-google-global-names-in-headers", 156 "-google-runtime-member-string-references", 157 "-google-runtime-operator", 158 ], 159 160 header_libs: ["jni_headers"], 161 162 include_dirs: [ 163 "external/deqp-deps/SPIRV-Headers/include", 164 ], 165 166 shared_libs: [ 167 "libEGL", 168 "libGLESv2", 169 "libandroid", 170 "liblog", 171 "libm", 172 "libc", 173 "libz", 174 "libdl", 175 ], 176 177 static_libs: [ 178 "libpng_ndk", 179 "deqp_glslang_glslang", 180 "deqp_glslang_OSDependent", 181 "deqp_glslang_MachineIndependent", 182 "deqp_glslang_GenericCodeGen", 183 "deqp_glslang_SPIRV", 184 "deqp_glslang_SPVRemapper", 185 "deqp_spirv-tools", 186 "deqp_amber", 187 ], 188 189 cflags: [ 190 "-Wno-implicit-fallthrough", 191 "-Wno-sign-conversion", 192 "-Wno-unused-private-field", 193 "-Wno-shorten-64-to-32", 194 ], 195 196 cppflags: [ 197 "-Wno-non-virtual-dtor", 198 "-Wno-delete-non-virtual-dtor", 199 "-Wno-implicit-int-conversion", 200 "-Wno-missing-field-initializers", 201 "-Wno-switch", 202 "-Wno-unused-parameter", 203 "-Wno-unused-variable", 204 ], 205} 206 207android_test { 208 name: "com.drawelements.deqp", 209 210 test_suites: [ 211 "vts10", 212 ], 213 214 srcs: ["android/package/src/**/*.java"], 215 resource_dirs: ["android/package/res"], 216 manifest: "android/package/AndroidManifest-integration.xml", 217 218 asset_dirs: [ 219 "data", 220 "external/vulkancts/data", 221 "external/graphicsfuzz/data", 222 ], 223 224 jni_libs: ["libdeqp"], 225 226 compile_multilib: "both", 227 228 // We could go down all the way to API-13 for 32bit. 22 is required for 64bit ARM. 229 sdk_version: "test_current", 230 231 // Avoid apk installation failures ('Requires development platform...' errors) 232 min_sdk_version: "31", 233 target_sdk_version: "34", 234} 235 236cc_test { 237 name: "deqp-binary", 238 defaults: ["libdeqp_defaults"], 239 240 cflags: [ 241 "-DDEQP_GLES3_RUNTIME_LOAD=1", 242 ], 243 244 cppflags: [ 245 "-Wno-macro-redefined", 246 ], 247 248 srcs: [ 249 "framework/platform/tcuMain.cpp", 250 "framework/platform/surfaceless/tcuSurfacelessPlatform.cpp", 251 ], 252 253 local_include_dirs: [ 254 "framework/platform/surfaceless", 255 ], 256 257 multilib: { 258 lib32: { 259 suffix: "32", 260 }, 261 lib64: { 262 suffix: "64", 263 }, 264 }, 265 266 compile_multilib: "both", 267 268 version_script: "deqp_binary.lds", 269 270 host_supported: false, 271 gtest: false, 272 auto_gen_config: false, 273 test_options: { 274 unit_test: false, 275 }, 276 data: [ 277 ":deqp_binary_incremental_test_lists", 278 ":deqp_binary_data", 279 ":deqp_binary_data_vulkancts", 280 ":deqp_binary_data_graphicsfuzz", 281 ], 282} 283 284filegroup { 285 name: "deqp_binary_incremental_test_lists", 286 srcs: [ 287 "android/cts/main/gles3-incremental-deqp.txt", 288 "android/cts/main/vk-incremental-deqp.txt", 289 ], 290 path: "android/cts/main", 291} 292 293filegroup { 294 name: "deqp_binary_data", 295 srcs: [ 296 "data/**/*", 297 ], 298 path: "data", 299} 300 301filegroup { 302 name: "deqp_binary_data_vulkancts", 303 srcs: [ 304 "external/vulkancts/data/**/*", 305 ], 306 path: "external/vulkancts/data", 307} 308 309filegroup { 310 name: "deqp_binary_data_graphicsfuzz", 311 srcs: [ 312 "external/graphicsfuzz/data/**/*", 313 ], 314 path: "external/graphicsfuzz/data", 315} 316