1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/ui.gni")
group("config") {
if (is_component_build) {
public_deps = [
"//gpu",
]
} else {
public_deps = [
":config_sources",
]
}
}
process_json_outputs = [
"$target_gen_dir/gpu_driver_bug_list_arrays_and_structs_autogen.h",
"$target_gen_dir/gpu_driver_bug_list_autogen.cc",
"$target_gen_dir/gpu_driver_bug_list_autogen.h",
"$target_gen_dir/gpu_driver_bug_list_exceptions_autogen.h",
"$target_gen_dir/software_rendering_list_arrays_and_structs_autogen.h",
"$target_gen_dir/software_rendering_list_autogen.cc",
"$target_gen_dir/software_rendering_list_autogen.h",
"$target_gen_dir/software_rendering_list_exceptions_autogen.h",
]
action("process_json") {
script = "process_json.py"
inputs = [
"gpu_driver_bug_list.json",
"gpu_driver_bug_workaround_type.h",
"gpu_feature_type.h",
"software_rendering_list.json",
]
outputs = process_json_outputs
args = [
"--output-dir",
rebase_path("$target_gen_dir", root_build_dir),
"--skip-testing-data",
"--os-filter",
]
if (is_win) {
args += [ "win" ]
} else if (is_mac) {
args += [ "macosx" ]
} else if (is_android) {
args += [ "android" ]
} else if (is_chromeos) {
args += [ "chromeos" ]
} else if (is_fuchsia) {
args += [ "fuchsia" ]
} else {
args += [ "linux" ]
}
public_deps = [
":workaround_list",
]
}
action("workaround_list") {
script = "build_workaround_header.py"
inputs = [
"gpu_workaround_list.txt",
]
outputs = [
"$target_gen_dir/gpu_driver_bug_workaround_autogen.h",
]
args = [
"--output-file",
rebase_path(outputs[0], root_build_dir),
]
foreach(file, inputs) {
args += [ rebase_path(file, root_build_dir) ]
}
}
source_set("config_sources") {
# External code should depend on this via //gpu/config above rather than
# depending on this directly or the component build will break.
visibility = [ "//gpu/*" ]
sources = [
"dx_diag_node.cc",
"dx_diag_node.h",
"gpu_blacklist.cc",
"gpu_blacklist.h",
"gpu_control_list.cc",
"gpu_control_list.h",
"gpu_crash_keys.cc",
"gpu_crash_keys.h",
"gpu_driver_bug_list.cc",
"gpu_driver_bug_list.h",
"gpu_driver_bug_workaround_type.h",
"gpu_driver_bug_workarounds.cc",
"gpu_driver_bug_workarounds.h",
"gpu_dx_diagnostics_win.cc",
"gpu_feature_info.cc",
"gpu_feature_info.h",
"gpu_feature_type.h",
"gpu_finch_features.cc",
"gpu_finch_features.h",
"gpu_info.cc",
"gpu_info.h",
"gpu_info_collector.cc",
"gpu_info_collector.h",
"gpu_info_collector_android.cc",
"gpu_info_collector_linux.cc",
"gpu_info_collector_mac.mm",
"gpu_info_collector_win.cc",
"gpu_switches.cc",
"gpu_switches.h",
"gpu_switching.cc",
"gpu_switching.h",
"gpu_test_config.cc",
"gpu_test_config.h",
"gpu_test_expectations_parser.cc",
"gpu_test_expectations_parser.h",
"gpu_util.cc",
"gpu_util.h",
]
if (is_fuchsia) {
sources += [ "gpu_info_collector_fuchsia.cc" ]
}
sources += process_json_outputs
configs += [ "//gpu:gpu_implementation" ]
public_deps = [
"//components/crash/core/common:crash_key",
]
deps = [
":process_json",
"//base",
"//third_party/re2",
"//ui/gl",
"//ui/gl:gl_features",
"//ui/gl/init",
]
# Prefer mesa GL headers to system headers, which cause problems on Win.
include_dirs = [ "//third_party/mesa/src/include" ]
if (is_win) {
libs = [
"dxguid.lib",
"setupapi.lib",
]
if (is_chrome_branded && is_official_build) {
sources += [
"//third_party/amd/AmdCfxPxExt.h",
"//third_party/amd/amd_videocard_info_win.cc",
]
}
}
if (is_mac) {
libs = [ "OpenGL.framework" ]
}
if (is_linux || is_mac) {
deps += [ "//third_party/angle:angle_gpu_info_util" ]
}
}
|