Disable tests broken on WinXP Tests(1) only.
[chromium-blink-merge.git] / gpu / gpu.gyp
blob57b358e62b1fca0e4ea9e09f55080023df5e2743
1 # Copyright (c) 2012 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   'variables': {
7     'nacl_win64_target': 0,
8   },
9   'includes': [
10     'gpu_common.gypi',
11   ],
12   'targets': [
13     {
14       # Library emulates GLES2 using command_buffers.
15       'target_name': 'gles2_implementation',
16       'type': '<(component)',
17       'dependencies': [
18         '../base/base.gyp:base',
19         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
20         '../third_party/khronos/khronos.gyp:khronos_headers',
21         '../ui/gl/gl.gyp:gl',
22         '../ui/gfx/gfx.gyp:gfx',
23         '../ui/gfx/gfx.gyp:gfx_geometry',
24         'command_buffer/command_buffer.gyp:gles2_utils',
25         'gles2_cmd_helper',
26       ],
27       'defines': [
28         'GLES2_IMPL_IMPLEMENTATION',
29       ],
30       'sources': [
31         '<@(gles2_implementation_source_files)',
32         'command_buffer/client/gl_in_process_context.h',
33         'command_buffer/client/gl_in_process_context.cc',
34       ],
35       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
36       'msvs_disabled_warnings': [4267, ],
37     },
38     {
39       # Library emulates GLES2 using command_buffers.
40       'target_name': 'gles2_implementation_client_side_arrays',
41       'type': '<(component)',
42       'defines': [
43         'GLES2_IMPL_IMPLEMENTATION',
44         'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1',
45       ],
46       'dependencies': [
47         '../base/base.gyp:base',
48         '../third_party/khronos/khronos.gyp:khronos_headers',
49         '../ui/gl/gl.gyp:gl',
50         '../ui/gfx/gfx.gyp:gfx_geometry',
51         '../ui/gfx/gfx.gyp:gfx',
52         'command_buffer/command_buffer.gyp:gles2_utils',
53         'gles2_cmd_helper',
54       ],
55       'sources': [
56         '<@(gles2_implementation_source_files)',
57       ],
58       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
59       'msvs_disabled_warnings': [ 4267, ],
60     },
61     {
62       # Library emulates GLES2 using command_buffers.
63       'target_name': 'gles2_implementation_client_side_arrays_no_check',
64       'type': '<(component)',
65       'defines': [
66         'GLES2_IMPL_IMPLEMENTATION',
67         'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1',
68         'GLES2_CONFORMANCE_TESTS=1',
69       ],
70       'dependencies': [
71         '../base/base.gyp:base',
72         '../third_party/khronos/khronos.gyp:khronos_headers',
73         '../ui/gfx/gfx.gyp:gfx',
74         '../ui/gfx/gfx.gyp:gfx_geometry',
75         'command_buffer/command_buffer.gyp:gles2_utils',
76         'gles2_cmd_helper',
77       ],
78       'sources': [
79         '<@(gles2_implementation_source_files)',
80       ],
81       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
82       'msvs_disabled_warnings': [ 4267, ],
83     },
84     {
85       # Stub to expose gles2_implemenation in C instead of C++.
86       # so GLES2 C programs can work with no changes.
87       'target_name': 'gles2_c_lib',
88       'type': '<(component)',
89       'dependencies': [
90         '../base/base.gyp:base',
91         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
92         'command_buffer/command_buffer.gyp:gles2_utils',
93         'command_buffer_client',
94         'gles2_implementation',
95       ],
96       'defines': [
97         'GLES2_C_LIB_IMPLEMENTATION',
98       ],
99       'sources': [
100         '<@(gles2_c_lib_source_files)',
101       ],
102       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
103       'msvs_disabled_warnings': [4267, ],
104     },
105     {
106       # Same as gles2_c_lib except with no parameter checking. Required for
107       # OpenGL ES 2.0 conformance tests.
108       'target_name': 'gles2_c_lib_nocheck',
109       'type': '<(component)',
110       'defines': [
111         'GLES2_C_LIB_IMPLEMENTATION',
112         'GLES2_CONFORMANCE_TESTS=1',
113       ],
114       'dependencies': [
115         '../base/base.gyp:base',
116         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
117         'command_buffer/command_buffer.gyp:gles2_utils',
118         'command_buffer_client',
119         'gles2_implementation_client_side_arrays_no_check',
120       ],
121       'sources': [
122         '<@(gles2_c_lib_source_files)',
123       ],
124     },
125     {
126       'target_name': 'angle_unittests',
127       'type': '<(gtest_target_type)',
128       'dependencies': [
129         '../base/base.gyp:base',
130         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
131         '../testing/gmock.gyp:gmock',
132         '../testing/gtest.gyp:gtest',
133         '<(angle_path)/src/build_angle.gyp:translator_static',
134       ],
135       'variables': {
136         'ANGLE_DIR': '<(angle_path)',
137       },
138       'includes': [
139         '../third_party/angle/tests/preprocessor_tests/preprocessor_tests.gypi',
140         '../third_party/angle/tests/compiler_tests/compiler_tests.gypi',
141       ],
142       'include_dirs': [
143         '..',
144         '<(angle_path)/include',
145         '<(angle_path)/src',
146         '<(angle_path)/src/compiler/preprocessor',
147         '<(angle_path)/tests',
148       ],
149       'sources': [
150         'angle_unittest_main.cc',
151       ],
152     },
153     {
154       'target_name': 'gpu_unittests',
155       'type': '<(gtest_target_type)',
156       'dependencies': [
157         '../base/base.gyp:base',
158         '../base/base.gyp:test_support_base',
159         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
160         '../testing/gmock.gyp:gmock',
161         '../testing/gtest.gyp:gtest',
162         '<(angle_path)/src/build_angle.gyp:translator',
163         '../ui/gl/gl.gyp:gl',
164         '../ui/gfx/gfx.gyp:gfx',
165         '../ui/gfx/gfx.gyp:gfx_geometry',
166         'command_buffer/command_buffer.gyp:gles2_utils',
167         'command_buffer_client',
168         'command_buffer_common',
169         'command_buffer_service',
170         'gpu',
171         'gpu_unittest_utils',
172         'gles2_implementation_client_side_arrays',
173         'gles2_cmd_helper',
174       ],
175       'defines': [
176         'GLES2_C_LIB_IMPLEMENTATION',
177       ],
178       'sources': [
179         '<@(gles2_c_lib_source_files)',
180         'command_buffer/client/buffer_tracker_unittest.cc',
181         'command_buffer/client/client_test_helper.cc',
182         'command_buffer/client/client_test_helper.h',
183         'command_buffer/client/cmd_buffer_helper_test.cc',
184         'command_buffer/client/fenced_allocator_test.cc',
185         'command_buffer/client/gles2_implementation_unittest.cc',
186         'command_buffer/client/mapped_memory_unittest.cc',
187         'command_buffer/client/query_tracker_unittest.cc',
188         'command_buffer/client/program_info_manager_unittest.cc',
189         'command_buffer/client/ring_buffer_test.cc',
190         'command_buffer/client/transfer_buffer_unittest.cc',
191         'command_buffer/client/vertex_array_object_manager_unittest.cc',
192         'command_buffer/common/bitfield_helpers_test.cc',
193         'command_buffer/common/command_buffer_mock.cc',
194         'command_buffer/common/command_buffer_mock.h',
195         'command_buffer/common/command_buffer_shared_test.cc',
196         'command_buffer/common/debug_marker_manager_unittest.cc',
197         'command_buffer/common/gles2_cmd_format_test.cc',
198         'command_buffer/common/gles2_cmd_format_test_autogen.h',
199         'command_buffer/common/gles2_cmd_utils_unittest.cc',
200         'command_buffer/common/id_allocator_test.cc',
201         'command_buffer/common/trace_event.h',
202         'command_buffer/common/unittest_main.cc',
203         'command_buffer/service/async_pixel_transfer_delegate_mock.h',
204         'command_buffer/service/async_pixel_transfer_delegate_mock.cc',
205         'command_buffer/service/async_pixel_transfer_manager_mock.h',
206         'command_buffer/service/async_pixel_transfer_manager_mock.cc',
207         'command_buffer/service/buffer_manager_unittest.cc',
208         'command_buffer/service/cmd_parser_test.cc',
209         'command_buffer/service/command_buffer_service_unittest.cc',
210         'command_buffer/service/common_decoder_unittest.cc',
211         'command_buffer/service/context_group_unittest.cc',
212         'command_buffer/service/feature_info_unittest.cc',
213         'command_buffer/service/framebuffer_manager_unittest.cc',
214         'command_buffer/service/gles2_cmd_decoder_unittest.cc',
215         'command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h',
216         'command_buffer/service/gles2_cmd_decoder_unittest_1.cc',
217         'command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h',
218         'command_buffer/service/gles2_cmd_decoder_unittest_2.cc',
219         'command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h',
220         'command_buffer/service/gles2_cmd_decoder_unittest_3.cc',
221         'command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h',
222         'command_buffer/service/gles2_cmd_decoder_unittest_base.cc',
223         'command_buffer/service/gles2_cmd_decoder_unittest_base.h',
224         'command_buffer/service/gl_surface_mock.cc',
225         'command_buffer/service/gl_surface_mock.h',
226         'command_buffer/service/gpu_scheduler_unittest.cc',
227         'command_buffer/service/id_manager_unittest.cc',
228         'command_buffer/service/mailbox_manager_unittest.cc',
229         'command_buffer/service/memory_program_cache_unittest.cc',
230         'command_buffer/service/mocks.cc',
231         'command_buffer/service/mocks.h',
232         'command_buffer/service/program_manager_unittest.cc',
233         'command_buffer/service/query_manager_unittest.cc',
234         'command_buffer/service/renderbuffer_manager_unittest.cc',
235         'command_buffer/service/program_cache_unittest.cc',
236         'command_buffer/service/shader_manager_unittest.cc',
237         'command_buffer/service/shader_translator_unittest.cc',
238         'command_buffer/service/test_helper.cc',
239         'command_buffer/service/test_helper.h',
240         'command_buffer/service/texture_manager_unittest.cc',
241         'command_buffer/service/transfer_buffer_manager_unittest.cc',
242         'command_buffer/service/vertex_attrib_manager_unittest.cc',
243         'command_buffer/service/vertex_array_manager_unittest.cc',
244         'command_buffer/service/gpu_tracer_unittest.cc',
245         'config/gpu_blacklist_unittest.cc',
246         'config/gpu_control_list_entry_unittest.cc',
247         'config/gpu_control_list_machine_model_info_unittest.cc',
248         'config/gpu_control_list_number_info_unittest.cc',
249         'config/gpu_control_list_os_info_unittest.cc',
250         'config/gpu_control_list_string_info_unittest.cc',
251         'config/gpu_control_list_unittest.cc',
252         'config/gpu_control_list_version_info_unittest.cc',
253         'config/gpu_driver_bug_list_unittest.cc',
254         'config/gpu_info_collector_unittest.cc',
255         'config/gpu_info_unittest.cc',
256         'config/gpu_test_config_unittest.cc',
257         'config/gpu_test_expectations_parser_unittest.cc',
258         'config/gpu_util_unittest.cc',
259       ],
260       'conditions': [
261         ['OS == "android" and gtest_target_type == "shared_library"', {
262           'dependencies': [
263             '../testing/android/native_test.gyp:native_test_native_code',
264           ],
265         }],
266         # See http://crbug.com/162998#c4 for why this is needed.
267         # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
268         ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
269           'dependencies': [
270             '../base/allocator/allocator.gyp:allocator',
271           ],
272         }],
273       ],
274       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
275       'msvs_disabled_warnings': [ 4267, ],
276     },
277     {
278       'target_name': 'gl_tests',
279       'type': '<(gtest_target_type)',
280       'dependencies': [
281         '../base/base.gyp:base',
282         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
283         '../testing/gmock.gyp:gmock',
284         '../testing/gtest.gyp:gtest',
285         '<(angle_path)/src/build_angle.gyp:translator',
286         '../ui/gfx/gfx.gyp:gfx',
287         '../ui/gfx/gfx.gyp:gfx_geometry',
288         '../ui/gl/gl.gyp:gl',
289         'command_buffer/command_buffer.gyp:gles2_utils',
290         'command_buffer_client',
291         'command_buffer_common',
292         'command_buffer_service',
293         'gpu',
294         'gpu_unittest_utils',
295         'gles2_implementation_client_side_arrays',
296         'gles2_cmd_helper',
297         #'gl_unittests',
298       ],
299       'defines': [
300         'GLES2_C_LIB_IMPLEMENTATION',
301         'GL_GLEXT_PROTOTYPES',
302       ],
303       'sources': [
304         '<@(gles2_c_lib_source_files)',
305         'command_buffer/tests/compressed_texture_test.cc',
306         'command_buffer/tests/gl_bind_uniform_location_unittest.cc',
307         'command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc',
308         'command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc',
309         'command_buffer/tests/gl_depth_texture_unittest.cc',
310         'command_buffer/tests/gl_gpu_memory_buffer_unittest.cc',
311         'command_buffer/tests/gl_lose_context_chromium_unittest.cc',
312         'command_buffer/tests/gl_manager.cc',
313         'command_buffer/tests/gl_manager.h',
314         'command_buffer/tests/gl_pointcoord_unittest.cc',
315         'command_buffer/tests/gl_program_unittest.cc',
316         'command_buffer/tests/gl_query_unittest.cc',
317         'command_buffer/tests/gl_readback_unittest.cc',
318         'command_buffer/tests/gl_shared_resources_unittest.cc',
319         'command_buffer/tests/gl_stream_draw_unittest.cc',
320         'command_buffer/tests/gl_test_utils.cc',
321         'command_buffer/tests/gl_test_utils.h',
322         'command_buffer/tests/gl_tests_main.cc',
323         'command_buffer/tests/gl_texture_mailbox_unittest.cc',
324         'command_buffer/tests/gl_texture_storage_unittest.cc',
325         'command_buffer/tests/gl_unittest.cc',
326         'command_buffer/tests/gl_unittests_android.cc',
327         'command_buffer/tests/gl_virtual_contexts_unittest.cc',
328         'command_buffer/tests/occlusion_query_unittest.cc',
329       ],
330       'conditions': [
331         ['OS == "android" and gtest_target_type == "shared_library"', {
332           'dependencies': [
333             '../testing/android/native_test.gyp:native_test_native_code',
334           ],
335         }],
336         ['OS == "win"', {
337           'dependencies': [
338             '../third_party/angle/src/build_angle.gyp:libEGL',
339             '../third_party/angle/src/build_angle.gyp:libGLESv2',
340           ],
341         }],
342       ],
343       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
344       'msvs_disabled_warnings': [ 4267, ],
345     },
346     {
347       'target_name': 'gpu_unittest_utils',
348       'type': 'static_library',
349       'dependencies': [
350         '../testing/gmock.gyp:gmock',
351         '../testing/gtest.gyp:gtest',
352         '../third_party/khronos/khronos.gyp:khronos_headers',
353         '../ui/gl/gl.gyp:gl_unittest_utils',
354         'gpu',
355       ],
356       'include_dirs': [
357         '..',
358       ],
359       'sources': [
360         'command_buffer/service/gles2_cmd_decoder_mock.cc',
361         'command_buffer/service/error_state_mock.cc',
362         'command_buffer/client/gles2_interface_stub.cc',
363         'command_buffer/client/gles2_interface_stub.h',
364       ],
365     },
366   ],
367   'conditions': [
368     ['component=="static_library"', {
369       'targets': [
370          {
371           'target_name': 'disk_cache_proto',
372           'type': 'static_library',
373           'sources': [ 'command_buffer/service/disk_cache_proto.proto' ],
374           'variables': {
375             'proto_in_dir': 'command_buffer/service',
376             'proto_out_dir': 'gpu/command_buffer/service',
377           },
378           'includes': [ '../build/protoc.gypi' ],
379         },
380         {
381           'target_name': 'gpu',
382           'type': 'none',
383           'dependencies': [
384             'command_buffer_client',
385             'command_buffer_common',
386             'command_buffer_service',
387             'gles2_cmd_helper',
388             'gpu_config',
389             'gpu_ipc',
390           ],
391           'sources': [
392             'gpu_export.h',
393           ],
394           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
395           'msvs_disabled_warnings': [4267, ],
396         },
397         {
398           'target_name': 'command_buffer_common',
399           'type': 'static_library',
400           'includes': [
401             'command_buffer_common.gypi',
402           ],
403           'dependencies': [
404             '../base/base.gyp:base',
405             'command_buffer/command_buffer.gyp:gles2_utils',
406           ],
407           'export_dependent_settings': [
408             '../base/base.gyp:base',
409           ],
410         },
411         {
412           # Library helps make GLES2 command buffers.
413           'target_name': 'gles2_cmd_helper',
414           'type': 'static_library',
415           'includes': [
416             'gles2_cmd_helper.gypi',
417           ],
418           'dependencies': [
419             'command_buffer_client',
420           ],
421           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
422           'msvs_disabled_warnings': [4267, ],
423         },
424         {
425           'target_name': 'command_buffer_client',
426           'type': 'static_library',
427           'includes': [
428             'command_buffer_client.gypi',
429           ],
430           'dependencies': [
431             'command_buffer_common',
432           ],
433           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
434           'msvs_disabled_warnings': [4267, ],
435         },
436         {
437           'target_name': 'command_buffer_service',
438           'type': 'static_library',
439           'includes': [
440             'command_buffer_service.gypi',
441           ],
442           'dependencies': [
443             'command_buffer_common',
444             'disk_cache_proto',
445           ],
446           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
447           'msvs_disabled_warnings': [4267, ],
448         },
449         {
450           'target_name': 'gpu_ipc',
451           'type': 'static_library',
452           'includes': [
453             'gpu_ipc.gypi',
454           ],
455           'dependencies': [
456             'command_buffer_common',
457           ],
458         },
459         {
460           'target_name': 'gpu_config',
461           'type': 'static_library',
462           'includes': [
463             'gpu_config.gypi',
464           ],
465         },
466       ],
467     },
468     { # component != static_library
469       'targets': [
470          {
471           'target_name': 'disk_cache_proto',
472           'type': 'static_library',
473           'sources': [ 'command_buffer/service/disk_cache_proto.proto' ],
474           'variables': {
475             'proto_in_dir': 'command_buffer/service',
476             'proto_out_dir': 'gpu/command_buffer/service',
477           },
478           'includes': [ '../build/protoc.gypi' ],
479         },
480         {
481           'target_name': 'gpu',
482           'type': 'shared_library',
483           'includes': [
484             'command_buffer_client.gypi',
485             'command_buffer_common.gypi',
486             'command_buffer_service.gypi',
487             'gles2_cmd_helper.gypi',
488             'gpu_config.gypi',
489             'gpu_ipc.gypi',
490           ],
491           'defines': [
492             'GPU_IMPLEMENTATION',
493           ],
494           'sources': [
495             'gpu_export.h',
496           ],
497           'dependencies': [
498             '../base/base.gyp:base',
499             'command_buffer/command_buffer.gyp:gles2_utils',
500             'disk_cache_proto',
501           ],
502           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
503           'msvs_disabled_warnings': [4267, ],
504         },
505         {
506           'target_name': 'command_buffer_common',
507           'type': 'none',
508           'dependencies': [
509             'gpu',
510           ],
511         },
512         {
513           # Library helps make GLES2 command buffers.
514           'target_name': 'gles2_cmd_helper',
515           'type': 'none',
516           'dependencies': [
517             'gpu',
518           ],
519           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
520           'msvs_disabled_warnings': [4267, ],
521         },
522         {
523           'target_name': 'command_buffer_client',
524           'type': 'none',
525           'dependencies': [
526             'gpu',
527           ],
528         },
529         {
530           'target_name': 'command_buffer_service',
531           'type': 'none',
532           'dependencies': [
533             'gpu',
534           ],
535         },
536         {
537           'target_name': 'gpu_ipc',
538           'type': 'none',
539           'dependencies': [
540             'gpu',
541           ],
542         },
543       ],
544     }],
545     ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', {
546       'targets': [
547         {
548           'target_name': 'gpu_ipc_win64',
549           'type': 'static_library',
550           'variables': {
551             'nacl_win64_target': 1,
552           },
553           'includes': [
554             'gpu_ipc.gypi',
555           ],
556           'dependencies': [
557             '../base/base.gyp:base_win64',
558             '../ipc/ipc.gyp:ipc_win64',
559           ],
560           'defines': [
561             '<@(nacl_win64_defines)',
562             'GPU_IMPLEMENTATION',
563           ],
564           'configurations': {
565             'Common_Base': {
566               'msvs_target_platform': 'x64',
567             },
568           },
569         },
570       ],
571     }],
572     ['OS == "android" and gtest_target_type == "shared_library"', {
573       'targets': [
574         {
575           'target_name': 'gl_tests_apk',
576           'type': 'none',
577           'dependencies': [
578             'gl_tests',
579           ],
580           'variables': {
581             'test_suite_name': 'gl_tests',
582             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)gl_tests<(SHARED_LIB_SUFFIX)',
583           },
584           'includes': [
585             '../build/apk_test.gypi',
586           ],
587         },
588       ],
589     }],
590   ],