| # 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/chromeos/ui_mode.gni") |
| import("//build/config/ui.gni") |
| import("//gpu/vulkan/features.gni") |
| import("//testing/libfuzzer/fuzzer_test.gni") |
| import("//testing/test.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| import("//ui/gl/features.gni") |
| |
| config("gpu_implementation") { |
| defines = [ "GPU_IMPLEMENTATION" ] |
| configs = [ |
| "//build/config/compiler:noshadowing", |
| "//build/config/compiler:wexit_time_destructors", |
| ] |
| } |
| |
| config("gpu_gles2_implementation") { |
| defines = [ "GPU_GLES2_IMPLEMENTATION" ] |
| configs = [ |
| "//build/config/compiler:noshadowing", |
| "//build/config/compiler:wexit_time_destructors", |
| ] |
| } |
| |
| config("gpu_util_implementation") { |
| defines = [ "GPU_UTIL_IMPLEMENTATION" ] |
| configs = [ |
| "//build/config/compiler:noshadowing", |
| "//build/config/compiler:wexit_time_destructors", |
| ] |
| } |
| |
| config("raster_implementation") { |
| defines = [ "RASTER_IMPLEMENTATION" ] |
| configs = [ |
| "//build/config/compiler:noshadowing", |
| "//build/config/compiler:wexit_time_destructors", |
| ] |
| } |
| |
| config("webgpu_implementation") { |
| defines = [ "WEBGPU_IMPLEMENTATION" ] |
| configs = [ |
| "//build/config/compiler:noshadowing", |
| "//build/config/compiler:wexit_time_destructors", |
| ] |
| } |
| |
| component("gpu") { |
| public_deps = [ |
| "//gpu/command_buffer/client:client_sources", |
| "//gpu/command_buffer/common:common_sources", |
| "//gpu/command_buffer/service:service_sources", |
| "//gpu/config:config_sources", |
| "//gpu/ipc/client:ipc_client_sources", |
| "//gpu/ipc/common:ipc_common_sources", |
| ] |
| } |
| |
| component("gles2") { |
| public_deps = [ |
| "//gpu/command_buffer/client:gles2_cmd_helper_sources", |
| "//gpu/command_buffer/common:gles2_sources", |
| "//gpu/command_buffer/common:raster_sources", |
| "//gpu/command_buffer/service:gles2_sources", |
| ] |
| } |
| |
| component("raster") { |
| public_deps = [ "//gpu/command_buffer/client:raster_sources" ] |
| } |
| |
| component("mailbox") { |
| defines = [ "IS_GPU_MAILBOX_IMPL" ] |
| public_deps = [ "//gpu/command_buffer/common:mailbox_sources" ] |
| } |
| |
| component("webgpu") { |
| public_deps = [ "//gpu/command_buffer/client:webgpu_sources" ] |
| } |
| |
| if (!use_static_angle) { |
| shared_library("command_buffer_gles2") { |
| sources = [ |
| # TODO(hendrikw): Move egl out of gles2_conform_support. |
| "gles2_conform_support/egl/config.cc", |
| "gles2_conform_support/egl/config.h", |
| "gles2_conform_support/egl/context.cc", |
| "gles2_conform_support/egl/context.h", |
| "gles2_conform_support/egl/display.cc", |
| "gles2_conform_support/egl/display.h", |
| "gles2_conform_support/egl/egl.cc", |
| "gles2_conform_support/egl/surface.cc", |
| "gles2_conform_support/egl/surface.h", |
| "gles2_conform_support/egl/test_support.cc", |
| "gles2_conform_support/egl/test_support.h", |
| "gles2_conform_support/egl/thread_state.cc", |
| "gles2_conform_support/egl/thread_state.h", |
| ] |
| |
| deps = [ |
| ":gpu", |
| "//base", |
| "//gpu/command_buffer/client:gles2_c_lib", |
| "//gpu/command_buffer/client:gles2_cmd_helper", |
| "//gpu/command_buffer/client:gles2_implementation", |
| "//gpu/command_buffer/service:gles2", |
| "//ui/gl", |
| "//ui/gl/init", |
| ] |
| |
| defines = [ |
| "COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY", |
| "EGLAPIENTRY=", |
| ] |
| if (is_android) { |
| configs -= [ "//build/config/android:hide_all_but_jni_onload" ] |
| } |
| if (current_os == "win") { |
| defines += [ "EGLAPI=__declspec(dllexport)" ] |
| } else { |
| defines += [ "EGLAPI=__attribute__((visibility(\"default\")))" ] |
| } |
| } |
| |
| test("command_buffer_gles2_tests") { |
| sources = [ |
| "command_buffer/tests/command_buffer_gles2_tests_main.cc", |
| "command_buffer/tests/egl_test.cc", |
| ] |
| |
| deps = [ |
| ":command_buffer_gles2", |
| "//base", |
| "//base/test:test_support", |
| "//base/third_party/dynamic_annotations", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| |
| defines = [ |
| "COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY", |
| "EGLAPIENTRY=", |
| ] |
| if (current_os == "win") { |
| defines += [ "EGLAPI=__declspec(dllimport)" ] |
| } else { |
| defines += [ "EGLAPI=" ] |
| } |
| |
| libs = [] |
| |
| if (is_android) { |
| libs += [ "android" ] |
| deps += [ "//ui/android:ui_java" ] |
| } |
| if ((is_linux || is_chromeos) && !is_component_build) { |
| configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] |
| } |
| |
| if (use_ozone) { |
| deps += [ "//ui/base:features" ] |
| } |
| } |
| } # if (!use_static_angle) |
| |
| static_library("test_support") { |
| testonly = true |
| sources = [ |
| "command_buffer/client/client_test_helper.cc", |
| "command_buffer/client/client_test_helper.h", |
| "command_buffer/client/gles2_interface_stub.cc", |
| "command_buffer/client/gles2_interface_stub.h", |
| "command_buffer/client/gles2_interface_stub_autogen.h", |
| "command_buffer/client/gles2_interface_stub_impl_autogen.h", |
| "command_buffer/client/webgpu_interface_stub.cc", |
| "command_buffer/client/webgpu_interface_stub.h", |
| "command_buffer/client/webgpu_interface_stub_autogen.h", |
| "command_buffer/client/webgpu_interface_stub_impl_autogen.h", |
| "command_buffer/service/copy_texture_chromium_mock.cc", |
| "command_buffer/service/copy_texture_chromium_mock.h", |
| "command_buffer/service/error_state_mock.cc", |
| "command_buffer/service/error_state_mock.h", |
| "command_buffer/service/gles2_cmd_decoder_mock.cc", |
| "command_buffer/service/gles2_cmd_decoder_mock.h", |
| "command_buffer/service/mocks.cc", |
| "command_buffer/service/mocks.h", |
| "command_buffer/service/test_helper.cc", |
| "command_buffer/service/test_helper.h", |
| "command_buffer/service/test_shared_image_backing.cc", |
| "command_buffer/service/test_shared_image_backing.h", |
| "ipc/raster_in_process_context.cc", |
| "ipc/raster_in_process_context.h", |
| "ipc/service/gpu_memory_buffer_factory_test_template.h", |
| "ipc/webgpu_in_process_context.cc", |
| "ipc/webgpu_in_process_context.h", |
| ] |
| |
| public_deps = [ |
| ":gles2", |
| ":gpu", |
| ":webgpu", |
| "//gpu/command_buffer/client:gles2_interface", |
| "//gpu/command_buffer/client:webgpu_interface", |
| "//gpu/ipc:gpu_thread_holder", |
| ] |
| deps = [ |
| "//base/test:test_support", |
| "//gpu/command_buffer/client:raster", |
| "//gpu/command_buffer/common", |
| "//gpu/ipc:gl_in_process_context", |
| "//gpu/ipc/common", |
| "//gpu/ipc/service", |
| "//gpu/skia_bindings:skia_bindings", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/angle:translator", |
| "//ui/gfx:test_support", |
| "//ui/gl:gl_unittest_utils", |
| "//ui/gl:test_support", |
| ] |
| } |
| |
| if (!is_android && !is_fuchsia && !is_chromeos_ash) { |
| proto_library("gl_lpm_fuzzer_proto") { |
| sources = [ "command_buffer/tests/lpm/gl_lpm_fuzzer.proto" ] |
| |
| use_protobuf_full = true |
| deps = [ "//third_party/protobuf:protobuf_full" ] |
| } |
| |
| static_library("gl_lpm_shader_to_string") { |
| sources = [ |
| "command_buffer/tests/lpm/gl_lpm_shader_to_string.cc", |
| "command_buffer/tests/lpm/gl_lpm_shader_to_string.h", |
| ] |
| |
| deps = [ |
| ":gl_lpm_fuzzer_proto", |
| "//base:base", |
| ] |
| } |
| |
| test("gl_lpm_shader_to_string_unittest") { |
| sources = [ "command_buffer/tests/lpm/gl_lpm_shader_to_string_unittest.cc" ] |
| |
| deps = [ |
| ":gl_lpm_shader_to_string", |
| "//base/test:run_all_unittests", |
| "//testing/gtest", |
| "//third_party/protobuf:protobuf_full", |
| ] |
| } |
| |
| fuzzer_test("gl_lpm_fuzzer") { |
| sources = [ |
| "command_buffer/tests/gl_manager.cc", |
| "command_buffer/tests/gl_manager.h", |
| "command_buffer/tests/gl_test_utils.cc", |
| "command_buffer/tests/gl_test_utils.h", |
| "command_buffer/tests/lpm/gl_lpm_fuzzer.cc", |
| ] |
| |
| defines = [ "GL_GLEXT_PROTOTYPES" ] |
| |
| if (is_mac) { |
| frameworks = [ "IOSurface.framework" ] |
| } |
| |
| deps = [ |
| ":gl_lpm_fuzzer_proto", |
| ":gl_lpm_shader_to_string", |
| ":gles2", |
| ":test_support", |
| "//gpu/command_buffer/client:gles2_c_lib", |
| "//gpu/command_buffer/client:gles2_implementation", |
| "//gpu/command_buffer/common:gles2_utils", |
| "//gpu/ipc:gl_in_process_context", |
| "//gpu/ipc/service:service", |
| "//testing/gtest:gtest", |
| "//third_party/libprotobuf-mutator", |
| "//ui/gfx:gfx", |
| "//ui/gl:gl", |
| "//ui/gl/init:init", |
| ] |
| } |
| } |
| |
| test("gl_tests") { |
| use_xvfb = use_xvfb_in_this_config |
| |
| sources = [ |
| "command_buffer/service/shared_image_backing_factory_gl_texture_unittest.cc", |
| "command_buffer/service/shared_image_factory_unittest.cc", |
| "command_buffer/service/shared_image_manager_unittest.cc", |
| "command_buffer/service/shared_image_representation_unittest.cc", |
| "command_buffer/service/shared_image_test_utils.cc", |
| "command_buffer/service/shared_image_test_utils.h", |
| "command_buffer/tests/compressed_texture_test.cc", |
| "command_buffer/tests/es3_misc_functions_unittest.cc", |
| "command_buffer/tests/gl_bgra_mipmap_unittest.cc", |
| "command_buffer/tests/gl_bind_uniform_location_unittest.cc", |
| "command_buffer/tests/gl_chromium_framebuffer_mixed_samples_unittest.cc", |
| "command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc", |
| "command_buffer/tests/gl_clear_framebuffer_unittest.cc", |
| "command_buffer/tests/gl_copy_tex_image_2d_workaround_unittest.cc", |
| "command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc", |
| "command_buffer/tests/gl_cube_map_texture_unittest.cc", |
| "command_buffer/tests/gl_depth_texture_unittest.cc", |
| "command_buffer/tests/gl_deschedule_unittest.cc", |
| "command_buffer/tests/gl_discardable_textures_unittest.cc", |
| "command_buffer/tests/gl_dynamic_config_unittest.cc", |
| "command_buffer/tests/gl_ext_blend_func_extended_unittest.cc", |
| "command_buffer/tests/gl_ext_multisample_compatibility_unittest.cc", |
| "command_buffer/tests/gl_ext_srgb_unittest.cc", |
| "command_buffer/tests/gl_ext_window_rectangles_unittest.cc", |
| "command_buffer/tests/gl_gpu_memory_buffer_unittest.cc", |
| "command_buffer/tests/gl_helper_unittest.cc", |
| "command_buffer/tests/gl_iosurface_readback_workaround_unittest.cc", |
| "command_buffer/tests/gl_lose_context_chromium_unittest.cc", |
| "command_buffer/tests/gl_manager.cc", |
| "command_buffer/tests/gl_manager.h", |
| "command_buffer/tests/gl_map_buffer_range_unittest.cc", |
| "command_buffer/tests/gl_native_gmb_backbuffer_unittest.cc", |
| "command_buffer/tests/gl_object_bindings_unittest.cc", |
| "command_buffer/tests/gl_oes_egl_image_unittest.cc", |
| "command_buffer/tests/gl_offscreen_surface_unittest.cc", |
| "command_buffer/tests/gl_oob_attrib_unittest.cc", |
| "command_buffer/tests/gl_pointcoord_unittest.cc", |
| "command_buffer/tests/gl_program_unittest.cc", |
| "command_buffer/tests/gl_query_unittest.cc", |
| "command_buffer/tests/gl_readback_unittest.cc", |
| "command_buffer/tests/gl_request_extension_unittest.cc", |
| "command_buffer/tests/gl_set_aggressively_free_resources_unittest.cc", |
| "command_buffer/tests/gl_shared_resources_unittest.cc", |
| "command_buffer/tests/gl_stream_draw_unittest.cc", |
| "command_buffer/tests/gl_test_utils.cc", |
| "command_buffer/tests/gl_test_utils.h", |
| "command_buffer/tests/gl_tests_main.cc", |
| "command_buffer/tests/gl_texture_mailbox_unittest.cc", |
| "command_buffer/tests/gl_texture_storage_unittest.cc", |
| "command_buffer/tests/gl_unallocated_texture_unittest.cc", |
| "command_buffer/tests/gl_unittest.cc", |
| "command_buffer/tests/gl_virtual_contexts_ext_window_rectangles_unittest.cc", |
| "command_buffer/tests/gl_virtual_contexts_unittest.cc", |
| "command_buffer/tests/gl_webgl_multi_draw_test.cc", |
| "command_buffer/tests/occlusion_query_unittest.cc", |
| "command_buffer/tests/texture_image_factory.cc", |
| "command_buffer/tests/texture_image_factory.h", |
| "ipc/client/gpu_context_tests.h", |
| "ipc/client/gpu_in_process_context_tests.cc", |
| "ipc/client/raster_in_process_context_tests.cc", |
| ] |
| |
| if (is_android) { |
| sources += [ "command_buffer/tests/gl_unittests_android.cc" ] |
| } |
| |
| # Simply loading the Vulkan driver leaks crbug.com/1134681 |
| if (use_dawn && !is_lsan) { |
| sources += [ |
| "command_buffer/service/webgpu_decoder_unittest.cc", |
| "command_buffer/tests/shared_image_gl_backing_produce_dawn_unittest.cc", |
| "command_buffer/tests/webgpu_fence_unittest.cc", |
| "command_buffer/tests/webgpu_mailbox_unittest.cc", |
| "command_buffer/tests/webgpu_test.cc", |
| "command_buffer/tests/webgpu_test.h", |
| ] |
| } |
| |
| defines = [ "GL_GLEXT_PROTOTYPES" ] |
| |
| configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| ":test_support", |
| "//base", |
| "//base/test:test_support", |
| "//base/third_party/dynamic_annotations", |
| "//cc/paint", |
| "//components/viz/test:test_support", |
| "//gpu/command_buffer/client:gles2_c_lib", |
| "//gpu/command_buffer/client:gles2_implementation", |
| "//gpu/command_buffer/client:raster", |
| "//gpu/command_buffer/client:webgpu", |
| "//gpu/command_buffer/common:gles2_utils", |
| "//gpu/ipc:gl_in_process_context", |
| "//gpu/ipc/host", |
| "//gpu/ipc/service", |
| "//mojo/core/embedder", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/angle:translator", |
| "//third_party/libyuv", |
| "//ui/gfx", |
| "//ui/gfx:test_support", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| "//ui/gl/init", |
| ] |
| |
| if (use_ozone) { |
| deps += [ "//ui/ozone" ] |
| } |
| |
| libs = [] |
| |
| if (is_android) { |
| libs += [ "android" ] |
| deps += [ "//ui/android:ui_java" ] |
| sources += [ "command_buffer/service/shared_image_backing_factory_ahardwarebuffer_unittest.cc" ] |
| } else if (is_mac) { |
| frameworks = [ "IOSurface.framework" ] |
| sources += [ "command_buffer/service/shared_image_backing_factory_iosurface_unittest.cc" ] |
| } else if (is_win) { |
| deps += [ |
| "//ui/platform_window", |
| "//ui/platform_window:platform_impls", |
| ] |
| sources += [ |
| "command_buffer/service/shared_image_backing_factory_d3d_unittest.cc", |
| ] |
| } else if (is_linux || is_chromeos) { |
| # Simply loading the Vulkan driver leaks crbug.com/1134681 |
| # CFI error in third_party/vulkan_memory_allocator crbug.com/1139916 |
| if (enable_vulkan && !is_lsan && !is_cfi) { |
| deps += [ "//gpu/vulkan/init:init" ] |
| sources += |
| [ "command_buffer/service/external_vk_image_factory_unittest.cc" ] |
| } |
| } |
| |
| if (use_dawn) { |
| deps += [ |
| "//third_party/dawn/src/dawn:dawn_proc", |
| "//third_party/dawn/src/dawn:dawncpp", |
| "//third_party/dawn/src/dawn_native", |
| ] |
| } |
| |
| data_deps = [ "//testing/buildbot/filters:gl_tests_filters" ] |
| } |
| |
| test("gpu_unittests") { |
| use_xvfb = use_xvfb_in_this_config |
| |
| sources = [ |
| "command_buffer/client/buffer_tracker_unittest.cc", |
| "command_buffer/client/client_discardable_manager_unittest.cc", |
| "command_buffer/client/cmd_buffer_helper_test.cc", |
| "command_buffer/client/command_buffer_direct_locked.cc", |
| "command_buffer/client/command_buffer_direct_locked.h", |
| "command_buffer/client/fenced_allocator_test.cc", |
| "command_buffer/client/gles2_implementation_unittest.cc", |
| "command_buffer/client/gles2_implementation_unittest_autogen.h", |
| "command_buffer/client/mapped_memory_unittest.cc", |
| "command_buffer/client/mock_transfer_buffer.cc", |
| "command_buffer/client/mock_transfer_buffer.h", |
| "command_buffer/client/program_info_manager_unittest.cc", |
| "command_buffer/client/query_tracker_unittest.cc", |
| "command_buffer/client/raster_implementation_gles_unittest.cc", |
| "command_buffer/client/raster_implementation_unittest.cc", |
| "command_buffer/client/raster_implementation_unittest_autogen.h", |
| "command_buffer/client/ring_buffer_test.cc", |
| "command_buffer/client/transfer_buffer_cmd_copy_helpers_unittest.cc", |
| "command_buffer/client/transfer_buffer_unittest.cc", |
| "command_buffer/client/vertex_array_object_manager_unittest.cc", |
| "command_buffer/client/webgpu_implementation_unittest.cc", |
| "command_buffer/client/webgpu_implementation_unittest_autogen.h", |
| "command_buffer/common/activity_flags_unittest.cc", |
| "command_buffer/common/bitfield_helpers_test.cc", |
| "command_buffer/common/buffer_unittest.cc", |
| "command_buffer/common/command_buffer_shared_test.cc", |
| "command_buffer/common/debug_marker_manager_unittest.cc", |
| "command_buffer/common/discardable_handle_unittest.cc", |
| "command_buffer/common/gles2_cmd_format_test.cc", |
| "command_buffer/common/gles2_cmd_format_test_autogen.h", |
| "command_buffer/common/gles2_cmd_utils_unittest.cc", |
| "command_buffer/common/id_allocator_test.cc", |
| "command_buffer/common/raster_cmd_format_test.cc", |
| "command_buffer/common/raster_cmd_format_test_autogen.h", |
| "command_buffer/common/unittest_main.cc", |
| "command_buffer/common/webgpu_cmd_format_test.cc", |
| "command_buffer/common/webgpu_cmd_format_test_autogen.h", |
| "command_buffer/service/buffer_manager_unittest.cc", |
| "command_buffer/service/client_service_map_unittest.cc", |
| "command_buffer/service/command_buffer_service_unittest.cc", |
| "command_buffer/service/common_decoder_unittest.cc", |
| "command_buffer/service/context_group_unittest.cc", |
| "command_buffer/service/context_state_test_helpers.cc", |
| "command_buffer/service/context_state_test_helpers.h", |
| "command_buffer/service/context_state_test_helpers_autogen.h", |
| "command_buffer/service/context_state_unittest.cc", |
| "command_buffer/service/feature_info_unittest.cc", |
| "command_buffer/service/framebuffer_manager_unittest.cc", |
| "command_buffer/service/gl_context_mock.cc", |
| "command_buffer/service/gl_context_mock.h", |
| "command_buffer/service/gl_context_virtual_unittest.cc", |
| "command_buffer/service/gl_surface_mock.cc", |
| "command_buffer/service/gl_surface_mock.h", |
| "command_buffer/service/gles2_cmd_decoder_unittest.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest.h", |
| "command_buffer/service/gles2_cmd_decoder_unittest_1.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h", |
| "command_buffer/service/gles2_cmd_decoder_unittest_2.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h", |
| "command_buffer/service/gles2_cmd_decoder_unittest_3.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h", |
| "command_buffer/service/gles2_cmd_decoder_unittest_4.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_4_autogen.h", |
| "command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_base.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_base.h", |
| "command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_programs.cc", |
| "command_buffer/service/gles2_cmd_decoder_unittest_textures.cc", |
| "command_buffer/service/gpu_service_test.cc", |
| "command_buffer/service/gpu_service_test.h", |
| "command_buffer/service/gpu_tracer_unittest.cc", |
| "command_buffer/service/gr_cache_controller_unittest.cc", |
| "command_buffer/service/gr_shader_cache_unittest.cc", |
| "command_buffer/service/id_manager_unittest.cc", |
| "command_buffer/service/indexed_buffer_binding_host_unittest.cc", |
| "command_buffer/service/mailbox_manager_unittest.cc", |
| "command_buffer/service/memory_program_cache_unittest.cc", |
| "command_buffer/service/multi_draw_manager_unittest.cc", |
| "command_buffer/service/passthrough_program_cache_unittest.cc", |
| "command_buffer/service/program_cache_unittest.cc", |
| "command_buffer/service/program_manager_unittest.cc", |
| "command_buffer/service/query_manager_unittest.cc", |
| "command_buffer/service/raster_decoder_unittest.cc", |
| "command_buffer/service/raster_decoder_unittest_1.cc", |
| "command_buffer/service/raster_decoder_unittest_base.cc", |
| "command_buffer/service/raster_decoder_unittest_base.h", |
| "command_buffer/service/raster_decoder_unittest_context_lost.cc", |
| "command_buffer/service/renderbuffer_manager_unittest.cc", |
| "command_buffer/service/scheduler_unittest.cc", |
| "command_buffer/service/service_discardable_manager_unittest.cc", |
| "command_buffer/service/service_transfer_cache_unittest.cc", |
| "command_buffer/service/shader_manager_unittest.cc", |
| "command_buffer/service/shader_translator_cache_unittest.cc", |
| "command_buffer/service/shader_translator_unittest.cc", |
| "command_buffer/service/shared_context_state_unittest.cc", |
| "command_buffer/service/sync_point_manager_unittest.cc", |
| "command_buffer/service/texture_manager_unittest.cc", |
| "command_buffer/service/transfer_buffer_manager_unittest.cc", |
| "command_buffer/service/transform_feedback_manager_unittest.cc", |
| "command_buffer/service/vertex_array_manager_unittest.cc", |
| "command_buffer/service/vertex_attrib_manager_unittest.cc", |
| "config/gpu_blocklist_unittest.cc", |
| "config/gpu_control_list_entry_unittest.cc", |
| "config/gpu_control_list_testing_arrays_and_structs_autogen.h", |
| "config/gpu_control_list_testing_autogen.cc", |
| "config/gpu_control_list_testing_autogen.h", |
| "config/gpu_control_list_testing_data.h", |
| "config/gpu_control_list_testing_entry_enums_autogen.h", |
| "config/gpu_control_list_testing_exceptions_autogen.h", |
| "config/gpu_control_list_unittest.cc", |
| "config/gpu_control_list_version_unittest.cc", |
| "config/gpu_driver_bug_list_unittest.cc", |
| "config/gpu_info_collector_unittest.cc", |
| "config/gpu_info_unittest.cc", |
| "config/gpu_preferences_unittest.cc", |
| "config/gpu_test_config_unittest.cc", |
| "config/gpu_test_expectations_parser_unittest.cc", |
| "config/gpu_util_unittest.cc", |
| "ipc/client/command_buffer_proxy_impl_unittest.cc", |
| "ipc/client/image_decode_accelerator_proxy_unittest.cc", |
| "ipc/common/gpu_memory_buffer_impl_shared_memory_unittest.cc", |
| "ipc/common/gpu_memory_buffer_impl_test_template.h", |
| "ipc/common/mojom_traits_unittest.cc", |
| "ipc/host/shader_disk_cache_unittest.cc", |
| "ipc/service/gpu_channel_manager_unittest.cc", |
| "ipc/service/gpu_channel_test_common.cc", |
| "ipc/service/gpu_channel_test_common.h", |
| "ipc/service/gpu_channel_unittest.cc", |
| "ipc/service/gpu_watchdog_thread_unittest.cc", |
| ] |
| |
| if (is_chromeos_ash) { |
| # Image decode acceleration with hardware is only supported in Chrome OS. |
| # The intention is to run this test in the linux-chromeos build. |
| sources += [ "ipc/service/image_decode_accelerator_stub_unittest.cc" ] |
| } |
| |
| if (is_mac) { |
| sources += [ |
| "ipc/common/gpu_memory_buffer_impl_io_surface_unittest.cc", |
| "ipc/service/gpu_memory_buffer_factory_io_surface_unittest.cc", |
| ] |
| } |
| |
| if (is_linux || is_chromeos || use_ozone) { |
| sources += [ |
| "ipc/common/gpu_memory_buffer_impl_native_pixmap_unittest.cc", |
| "ipc/service/gpu_memory_buffer_factory_native_pixmap_unittest.cc", |
| ] |
| } |
| |
| if (is_win) { |
| sources += [ |
| "ipc/common/gpu_memory_buffer_impl_dxgi_unittest.cc", |
| "ipc/service/gpu_memory_buffer_factory_dxgi_unittest.cc", |
| ] |
| } |
| |
| if (is_android) { |
| sources += [ |
| "ipc/common/gpu_memory_buffer_impl_android_hardware_buffer_unittest.cc", |
| ] |
| } |
| |
| if (is_linux || is_chromeos || is_android || is_chromeos) { |
| sources += [ "command_buffer/service/gpu_fence_manager_unittest.cc" ] |
| } |
| |
| # TODO(geofflang): Run passthrough command decoder unittests on more platforms |
| # once initialization of ANGLE's NULL context is supported |
| if ((is_win || ((is_linux || is_chromeos) && !use_ozone)) && !is_asan) { |
| sources += [ |
| "command_buffer/service/gles2_cmd_decoder_passthrough_unittest_buffers.cc", |
| "command_buffer/service/gles2_cmd_decoder_passthrough_unittest_commands.cc", |
| "command_buffer/service/gles2_cmd_decoder_passthrough_unittest_discardable_textures.cc", |
| "command_buffer/service/gles2_cmd_decoder_passthrough_unittest_drawing.cc", |
| "command_buffer/service/gles2_cmd_decoder_passthrough_unittest_framebuffers.cc", |
| "command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc", |
| ] |
| } |
| |
| configs += [ "//build/config:precompiled_headers" ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| ":test_support", |
| "//base", |
| "//base/test:test_support", |
| "//base/third_party/dynamic_annotations", |
| "//build:chromeos_buildflags", |
| "//cc/paint", |
| "//components/viz/common:resource_format", |
| "//gpu/command_buffer/client:gles2_c_lib", |
| "//gpu/command_buffer/client:gles2_implementation", |
| "//gpu/command_buffer/client:raster", |
| "//gpu/command_buffer/client:webgpu", |
| "//gpu/command_buffer/common", |
| "//gpu/command_buffer/common:gles2_utils", |
| "//gpu/command_buffer/service", |
| "//gpu/config", |
| "//gpu/ipc:gl_in_process_context", |
| "//gpu/ipc/client", |
| "//gpu/ipc/common", |
| "//gpu/ipc/common:test_interfaces", |
| "//gpu/ipc/host", |
| "//gpu/ipc/service", |
| "//ipc:test_support", |
| "//mojo/core/embedder", |
| "//mojo/public/cpp/bindings", |
| "//mojo/public/cpp/test_support:test_utils", |
| "//net:test_support", |
| "//skia", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/angle:translator", |
| "//third_party/mesa_headers", |
| "//ui/gfx", |
| "//ui/gfx:test_support", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:gl_unittest_utils", |
| "//ui/gl:test_support", |
| "//url", |
| ] |
| |
| if (is_android) { |
| deps += [ |
| "//ui/android:ui_java", |
| "//ui/gl:gl_jni_headers", |
| ] |
| } |
| |
| if (use_ozone) { |
| deps += [ "//ui/ozone" ] |
| } |
| } |
| |
| test("gpu_perftests") { |
| sources = [ |
| "perftests/measurements.cc", |
| "perftests/measurements.h", |
| "perftests/run_all_tests.cc", |
| "perftests/texture_upload_perftest.cc", |
| ] |
| |
| deps = [ |
| ":gpu", |
| "//base", |
| "//base/test:test_support", |
| "//gpu/command_buffer/client:gles2_implementation", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//testing/perf", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl/init", |
| ] |
| |
| if (use_ozone) { |
| deps += [ |
| "//ui/base:features", |
| "//ui/ozone", |
| ] |
| } |
| |
| data_deps = [ |
| # Needed for isolate script to execute. |
| "//testing:run_perf_test", |
| "//third_party/mesa_headers", |
| ] |
| |
| # This target should not require the Chrome executable to run. |
| assert_no_deps = [ "//chrome" ] |
| } |
| |
| test("command_buffer_perftests") { |
| sources = [ |
| "command_buffer/tests/decoder_perftest.cc", |
| "perftests/run_all_tests.cc", |
| ] |
| |
| deps = [ |
| ":gpu", |
| "//base", |
| "//base/test:test_support", |
| "//gpu/command_buffer/client:gles2_cmd_helper", |
| "//gpu/command_buffer/client:gles2_implementation", |
| "//gpu/command_buffer/service:gles2", |
| "//testing/gtest", |
| "//testing/perf", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl/init", |
| ] |
| |
| if (use_ozone) { |
| deps += [ |
| "//ui/base:features", |
| "//ui/ozone", |
| ] |
| } |
| |
| data_deps = [ |
| # Needed for isolate script to execute. |
| "//testing:run_perf_test", |
| ] |
| |
| # This target should not require the Chrome executable to run. |
| assert_no_deps = [ "//chrome" ] |
| } |
| |
| fuzzer_test("gpu_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base:i18n", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| if (is_linux || is_chromeos) { |
| fuzzer_test("gpu_angle_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| defines = [ "GPU_FUZZER_USE_ANGLE" ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| fuzzer_test("gpu_angle_passthrough_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| defines = [ |
| "GPU_FUZZER_USE_ANGLE", |
| "GPU_FUZZER_USE_PASSTHROUGH_CMD_DECODER", |
| ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| fuzzer_test("gpu_swiftshader_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| defines = [ "GPU_FUZZER_USE_SWIFTSHADER" ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| fuzzer_test("gpu_swangle_passthrough_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| defines = [ |
| "GPU_FUZZER_USE_ANGLE", |
| "GPU_FUZZER_USE_SWANGLE", |
| "GPU_FUZZER_USE_PASSTHROUGH_CMD_DECODER", |
| ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| fuzzer_test("gpu_raster_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| defines = [ "GPU_FUZZER_USE_RASTER_DECODER" ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| fuzzer_test("gpu_raster_passthrough_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| defines = [ |
| "GPU_FUZZER_USE_ANGLE", |
| "GPU_FUZZER_USE_RASTER_DECODER", |
| "GPU_FUZZER_USE_PASSTHROUGH_CMD_DECODER", |
| ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| fuzzer_test("gpu_raster_swiftshader_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| defines = [ |
| "GPU_FUZZER_USE_RASTER_DECODER", |
| "GPU_FUZZER_USE_SWIFTSHADER", |
| ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| fuzzer_test("gpu_raster_angle_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| defines = [ |
| "GPU_FUZZER_USE_RASTER_DECODER", |
| "GPU_FUZZER_USE_ANGLE", |
| ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| fuzzer_test("gpu_raster_swangle_passthrough_fuzzer") { |
| sources = [ "command_buffer/tests/fuzzer_main.cc" ] |
| |
| defines = [ |
| "GPU_FUZZER_USE_ANGLE", |
| "GPU_FUZZER_USE_SWANGLE", |
| "GPU_FUZZER_USE_PASSTHROUGH_CMD_DECODER", |
| "GPU_FUZZER_USE_RASTER_DECODER", |
| ] |
| |
| deps = [ |
| ":gles2", |
| ":gpu", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:test_support", |
| ] |
| |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| } |
| |
| # Microbenchmark to measure performance of GLHelper code, for use in |
| # debugging, profiling, and optimizing. |
| test("gpu_benchmark") { |
| sources = [ "command_buffer/tests/gl_helper_benchmark.cc" ] |
| |
| configs += [ |
| "//build/config/compiler:no_size_t_to_int_warning", |
| "//build/config:precompiled_headers", |
| "//third_party/khronos:khronos_headers", |
| ] |
| |
| if (!is_debug && (is_win || is_android)) { |
| configs -= [ "//build/config/compiler:default_optimization" ] |
| configs += [ "//build/config/compiler:optimize_max" ] |
| } |
| |
| deps = [ |
| "//base", |
| "//base/test:test_support", |
| "//components/test:run_all_unittests", |
| "//components/viz/common", |
| "//components/viz/test:test_support", |
| "//gpu/command_buffer/client", |
| "//gpu/command_buffer/client:gles2_implementation", |
| "//gpu/ipc:gl_in_process_context", |
| "//gpu/ipc:gpu_thread_holder", |
| "//skia", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/gfx", |
| ] |
| |
| data_deps = [ "//third_party/mesa_headers" ] |
| } |