1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 # Set to true to compile with the OpenGL ES 2.0 conformance tests.
7 internal_gles2_conform_tests = false
10 import("//build/config/allocator.gni")
11 import("//testing/test.gni")
13 # GYP version: gpu/gles2_conform_support/gles2_conform_support.gyp:gles2_conform_support
14 executable("gles2_conform_support") {
16 "gles2_conform_support.c",
17 "native/egl_native.cc",
18 "native/egl_native_win.cc",
22 "GLES2_CONFORM_SUPPORT_ONLY",
29 "//base/third_party/dynamic_annotations",
30 "//build/config/sanitizers:deps",
31 "//gpu/command_buffer/client:gles2_c_lib_nocheck",
32 "//gpu/gles2_conform_support/egl",
37 "native/egl_native_aura.cc",
38 "native/egl_native_x11.cc",
41 if (use_allocator != "none") {
42 # See http://crbug.com/162998#c4 for why this is needed.
43 deps += [ "//base/allocator" ]
47 if (internal_gles2_conform_tests) {
48 action("generate_gles2_conform_embedded_data") {
49 script = "generate_gles2_embedded_data.py"
51 "$target_gen_dir/gles2_conform_test_embedded_data/FilesDATA.c",
52 "$target_gen_dir/gles2_conform_test_embedded_data/FilesDATA.h",
53 "$target_gen_dir/gles2_conform_test_embedded_data/FilesTOC.c",
56 rebase_path("//third_party/gles2_conform/GTF_ES/glsl/GTF"),
57 rebase_path("$target_gen_dir/gles2_conform_test_embedded_data"),
61 exec_script("//build/gypi_to_gn.py",
63 rebase_path("gles2_conform.gypi"),
64 "--replace=<(DEPTH)=../..",
65 "--replace=<(SHARED_INTERMEDIATE_DIR)=$target_gen_dir",
68 [ "gles2_conform.gypi" ])
69 executable("gles2_conform_test_windowless") {
72 # Include a dummy c++ file to force linking of libstdc++.
73 sources = [ "dummy.cc" ] + gles2_conform_gypi.gtf_es_sources
76 "HKEMBEDDEDFILESYSTEM",
79 ":generate_gles2_conform_embedded_data",
80 "//build/config/sanitizers:deps",
81 "//gpu/command_buffer/client:gles2_c_lib_nocheck",
82 "//gpu/gles2_conform_support/egl",
83 "//gpu/gles2_conform_support/native:windowless",
85 configs += [ "//build/config/compiler:no_incompatible_pointer_warnings" ]
88 deps += [ "//build/config/linux/gtk2" ]
93 "-Wno-implicit-function-declaration",
94 "-Wno-parentheses-equality",
97 "-Wno-sizeof-pointer-memaccess",
98 "-Wno-tautological-compare",
105 "//third_party/angle:libEGL",
106 "//third_party/angle:libGLESv2",
112 defines -= [ "NOMINMAX" ]
114 "/wd4018", # signed/unsigned mismatch
115 "/wd4101", # unreferenced local variable
116 "/wd4715", # not all control paths return a value
117 "/wd4267", # size_t/unsigned int conversion
129 "-Wno-sizeof-pointer-memaccess",
130 "-Wno-implicit-function-declaration",
131 "-Wno-logical-op-parentheses",
132 "-Wno-tautological-compare",
133 "-Wno-parentheses-equality",
139 #"-Wno-pointer-sign",
140 #"-Wno-array-bounds",
141 #"-Wno-sizeof-pointer-memaccess",
142 #"-Wno-implicit-function-declaration",
143 #"-Wno-logical-op-parentheses",
144 #"-Wno-tautological-compare",
145 #"-Wno-parentheses-equality",
158 # '-run=<(DEPTH)/third_party/gles2_conform/GTF_ES/glsl/GTF/mustpass.run',
166 # TODO(GYP): Delete this after we've converted everything to GN.
167 # The _run targets exist only for compatibility w/ GYP.
168 group("gles2_conform_test_run") {
171 ":gles2_conform_test",
175 test("gles2_conform_test") {
177 "gles2_conform_test.cc",
186 "gles2_conform_test_expectations.txt",
189 if (internal_gles2_conform_tests) {
190 deps += [ ":gles2_conform_test_windowless" ]
191 # TODO: Make these tests pull in the correct data dependencies once they
192 # are exported in GN. Maybe from //third_party/gles2_conform/GTF_ES/