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 "//gpu/gles2_conform_support/egl",
30 "//base/third_party/dynamic_annotations",
32 "//gpu/command_buffer/client:gles2_c_lib_nocheck",
36 "native/egl_native_aura.cc",
37 "native/egl_native_x11.cc",
40 if (use_allocator != "none") {
41 # See http://crbug.com/162998#c4 for why this is needed.
42 deps += [ "//base/allocator" ]
46 if (internal_gles2_conform_tests) {
47 action("generate_gles2_conform_embedded_data") {
48 script = "generate_gles2_embedded_data.py"
50 "$target_gen_dir/gles2_conform_test_embedded_data/FilesData.c",
51 "$target_gen_dir/gles2_conform_test_embedded_data/FilesData.h",
52 "$target_gen_dir/gles2_conform_test_embedded_data/FilesTOC.c",
55 "../../third_party/gles2_conform/GTF_ES/glsl/GTF",
56 "$target_gen_dir/gles2_conform_test_embedded_data",
59 gles2_conform_gypi = exec_script("//build/gypi_to_gn.py",
60 [ rebase_path("gles2_conform_gypi") ],
62 [ "gles2_conform_gypi" ])
63 executable("gles2_conform_test_windowless") {
66 # Include a dummy c++ file to force linking of libstdc++.
68 gles2_conform_gypi.gtf_es_sources,
72 "HKEMBEDDEDFILESYSTEM",
75 ":generate_gles2_conform_embedded_data",
76 "//gpu/gles2_conform_support/egl",
77 "//gpu/gles2_conform_support/native:windowless",
78 "//gpu/command_buffer/client:gles2_c_libnocheck",
80 configs += [ "//build/compiler:no_incompatible_pointer_warnings" ]
83 deps += [ "//build/linux/system/gtk" ]
88 "-Wno-implicit-function-declaration",
89 "-Wno-parentheses-equality",
92 "-Wno-sizeof-pointer-memaccess",
93 "-Wno-tautological-compare",
100 "//third_party/angle:libEGL",
101 "//third_party/angle:libGLESv2",
107 defines -= [ "NOMINMAX" ]
109 "/wd4018", # signed/unsigned mismatch
110 "/wd4101", # unreferenced local variable
111 "/wd4715", # not all control paths return a value
112 "/wd4267", # size_t/unsigned int conversion
124 "-Wno-sizeof-pointer-memaccess",
125 "-Wno-implicit-function-declaration",
126 "-Wno-logical-op-parentheses",
127 "-Wno-tautological-compare",
128 "-Wno-parentheses-equality",
134 #"-Wno-pointer-sign",
135 #"-Wno-array-bounds",
136 #"-Wno-sizeof-pointer-memaccess",
137 #"-Wno-implicit-function-declaration",
138 #"-Wno-logical-op-parentheses",
139 #"-Wno-tautological-compare",
140 #"-Wno-parentheses-equality",
153 # '-run=<(DEPTH)/third_party/gles2_conform/GTF_ES/glsl/GTF/mustpass.run',
161 # TODO(GYP): Delete this after we've converted everything to GN.
162 # The _run targets exist only for compatibility w/ GYP.
163 group("gles2_conform_test_run") {
166 ":gles2_conform_test",
170 test("gles2_conform_test") {
172 "gles2_conform_test.cc",
181 "gles2_conform_test_expectations.txt",
184 if (internal_gles2_conform_tests) {
185 deps += [ "gles2_conform_test_windowless" ]
187 data_deps = [ "//third_party/gles2_conform/GTF_ES/" ]