Support jumbo in the gpu code and the ui/gl code |
|
Issue descriptionjumbo is a unity build system that improves compilation times for those with no access to goma. Adding jumbo support to gpu and ui/gl has the potential to save 10-15 CPU minutes of compilation time.
,
Jul 18
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aabc8d68ec9ca3f787acc3f478229132f38136a6 commit aabc8d68ec9ca3f787acc3f478229132f38136a6 Author: Daniel Bratell <bratell@opera.com> Date: Wed Jul 18 19:20:26 2018 Avoid "using namespace gles2" in the gpu code Jumbo isn't compatible with "using namespace" since those cause compiler warnings unless in the top level file, but "using namespace" is also prohibited by the code style guide (see: https://google.github.io/styleguide/cppguide.html#Namespaces ) This makes the code a bit more verbose, but it also makes it more self consistent since the gles2:: prefix was already occasionally used. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I7c2111e70407a7ddf65473cb83e7f63b70b18747 Reviewed-on: https://chromium-review.googlesource.com/1141882 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#576159} [modify] https://crrev.com/aabc8d68ec9ca3f787acc3f478229132f38136a6/gpu/command_buffer/build_cmd_buffer_lib.py [modify] https://crrev.com/aabc8d68ec9ca3f787acc3f478229132f38136a6/gpu/command_buffer/service/raster_decoder.cc [modify] https://crrev.com/aabc8d68ec9ca3f787acc3f478229132f38136a6/gpu/command_buffer/service/raster_decoder_autogen.h [modify] https://crrev.com/aabc8d68ec9ca3f787acc3f478229132f38136a6/gpu/command_buffer/service/raster_decoder_unittest_base.cc
,
Jul 20
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1a397ee20c1caa944f67467005fcd7ab84ffd6a1 commit 1a397ee20c1caa944f67467005fcd7ab84ffd6a1 Author: Daniel Bratell <bratell@opera.com> Date: Fri Jul 20 16:28:13 2018 Clarify which of ::base and ::angle::base is intended There is a namespace base inside the namespace angle so when writing code inside angle, "base" is ambigious. This triggered a compilation failure in some jumbo experiments where the compiler knew about both ::angle::base and ::base. There are guides to not name inner namespaces the same as common top level namespaces for this reason but I guess renaming angle::base is not an option. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I7c780aea3408d11082a96baa729f2cc0b6dd3247 Reviewed-on: https://chromium-review.googlesource.com/1144936 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#576892} [modify] https://crrev.com/1a397ee20c1caa944f67467005fcd7ab84ffd6a1/ui/gl/angle_platform_impl.h
,
Jul 20
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/53d2c3fdf60575a8dfcfe58a04995be6f767a5df commit 53d2c3fdf60575a8dfcfe58a04995be6f767a5df Author: Daniel Bratell <bratell@opera.com> Date: Fri Jul 20 22:00:53 2018 Reuse the logging glCompileShader instead of redefining it Three files had their own logging glCompileShader wrapper named CompileShader and in jumbo build experiments those clashed. This makes that helper function shared, makes the logging a little more accepting of long error messages, but loses a little bit of information about where the code was called from. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: If7e518cc993e165c2f51c4b32a7f1df96d31ad5d Reviewed-on: https://chromium-review.googlesource.com/1143266 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#577004} [modify] https://crrev.com/53d2c3fdf60575a8dfcfe58a04995be6f767a5df/gpu/command_buffer/service/gles2_cmd_clear_framebuffer.cc [modify] https://crrev.com/53d2c3fdf60575a8dfcfe58a04995be6f767a5df/gpu/command_buffer/service/gles2_cmd_copy_tex_image.cc [modify] https://crrev.com/53d2c3fdf60575a8dfcfe58a04995be6f767a5df/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc [modify] https://crrev.com/53d2c3fdf60575a8dfcfe58a04995be6f767a5df/gpu/command_buffer/service/gles2_cmd_srgb_converter.cc [modify] https://crrev.com/53d2c3fdf60575a8dfcfe58a04995be6f767a5df/gpu/command_buffer/service/shader_manager.cc [modify] https://crrev.com/53d2c3fdf60575a8dfcfe58a04995be6f767a5df/gpu/command_buffer/service/shader_manager.h
,
Jul 21
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/036438089d99d45c6b472cef75f77d9167eecbe0 commit 036438089d99d45c6b472cef75f77d9167eecbe0 Author: Daniel Bratell <bratell@opera.com> Date: Sat Jul 21 00:02:41 2018 [jumbo] undef SHADER macros after using them Several files in gpu/command_buffer/service use local SHADER macros. If they are compiled together in a jumbo build those macros will collide and prevent the compilation. This patch undefs the macros after use. An alternative is to give them unique names. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I9de4011e1d609e5658a9d6cbe1775a3146364fa1 Reviewed-on: https://chromium-review.googlesource.com/1143265 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#577044} [modify] https://crrev.com/036438089d99d45c6b472cef75f77d9167eecbe0/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc [modify] https://crrev.com/036438089d99d45c6b472cef75f77d9167eecbe0/gpu/command_buffer/service/gles2_cmd_clear_framebuffer.cc
,
Jul 23
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ecab7921131a4c2c37ae27dad912126f5bdb196f commit ecab7921131a4c2c37ae27dad912126f5bdb196f Author: Daniel Bratell <bratell@opera.com> Date: Mon Jul 23 20:22:50 2018 Switch shader_translator from khronos GL to ui/gl In jumbo experiments build targets using both ui/gl+mesa and khronos at the same time fail to compile because the two GL libraries declare the same constants and functions. This happened in gpu/command_buffer/service because ShaderTranslator used khronos GL when it should have been using ui/gl. This patch switches that code over to ui/gl. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I522243374eaf0416df58d84e20585c11aef3de32 Reviewed-on: https://chromium-review.googlesource.com/1145306 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#577236} [modify] https://crrev.com/ecab7921131a4c2c37ae27dad912126f5bdb196f/gpu/command_buffer/service/shader_translator.cc [modify] https://crrev.com/ecab7921131a4c2c37ae27dad912126f5bdb196f/gpu/command_buffer/service/shader_translator_cache.cc [modify] https://crrev.com/ecab7921131a4c2c37ae27dad912126f5bdb196f/gpu/command_buffer/service/shader_translator_cache_unittest.cc [modify] https://crrev.com/ecab7921131a4c2c37ae27dad912126f5bdb196f/gpu/command_buffer/service/shader_translator_unittest.cc
,
Jul 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d4c1809775e705fa353c844f7691a1219fc226af commit d4c1809775e705fa353c844f7691a1219fc226af Author: Daniel Bratell <bratell@opera.com> Date: Tue Jul 24 12:57:29 2018 Deduplicated a gpu code helper function to avoid jumbo clashes There are three identical small ToGLuint functions which clashed in jumbo build experiments. This moves it to gles2_cmd_utils.h and changes the type to not add a dependency on GL in command_buffer/common. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Iad7cfc8a2506b765ba7a93c2eb9dc59149e5b8f4 Reviewed-on: https://chromium-review.googlesource.com/1141944 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#577499} [modify] https://crrev.com/d4c1809775e705fa353c844f7691a1219fc226af/gpu/command_buffer/client/gles2_implementation.cc [modify] https://crrev.com/d4c1809775e705fa353c844f7691a1219fc226af/gpu/command_buffer/client/vertex_array_object_manager.cc [modify] https://crrev.com/d4c1809775e705fa353c844f7691a1219fc226af/gpu/command_buffer/common/gles2_cmd_utils.h [modify] https://crrev.com/d4c1809775e705fa353c844f7691a1219fc226af/gpu/command_buffer/service/texture_manager.cc
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3e7ad811e5213421556c84a0101f761f0e303cfb commit 3e7ad811e5213421556c84a0101f761f0e303cfb Author: Daniel Bratell <bratell@opera.com> Date: Wed Jul 25 04:45:09 2018 Switch ui/gl/gl_enums.cc from khronos GL to ui/gl gl_enums used Khronos to get a definition of GL_NONE but that broke jumbo build experiments because you cannot have khronos headers and ui/gl headers in the same translation unit. This patch switches gl_enums.cc to use ui/gl/gl_bindings.h like the rest of the code. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Id239ca4aa55278ac012c066d6a6f8e243b3ec319 Reviewed-on: https://chromium-review.googlesource.com/1148442 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#577799} [modify] https://crrev.com/3e7ad811e5213421556c84a0101f761f0e303cfb/ui/gl/gl_enums.cc
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bce0d0abc121e1378ffe94930bab95c8f87b6f07 commit bce0d0abc121e1378ffe94930bab95c8f87b6f07 Author: Daniel Bratell <bratell@opera.com> Date: Wed Jul 25 04:46:11 2018 [jumbo] Give two internal ui/gl functions unique names MakeFunctionUnique and MockInvalidFunction are functions that are generated twice by ui/gl/generate_bindings.py. With that double generation the code can't be jumbo compiled because of the resulting symbol clash when the code ends up in a single translation unit. This patch gives the functions unique names by adding the "set_name" (gl, egl) to their names. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Ia08d42a86b99bddc808d1ac7c921f6801eb07782 Reviewed-on: https://chromium-review.googlesource.com/1148453 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#577800} [modify] https://crrev.com/bce0d0abc121e1378ffe94930bab95c8f87b6f07/ui/gl/egl_bindings_autogen_mock.cc [modify] https://crrev.com/bce0d0abc121e1378ffe94930bab95c8f87b6f07/ui/gl/generate_bindings.py [modify] https://crrev.com/bce0d0abc121e1378ffe94930bab95c8f87b6f07/ui/gl/gl_bindings_autogen_mock.cc
,
Jul 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/60acbb59f81bb655cec94d7c916c4209e485e7e3 commit 60acbb59f81bb655cec94d7c916c4209e485e7e3 Author: Daniel Bratell <bratell@opera.com> Date: Thu Jul 26 09:13:14 2018 [jumbo] Refactor and deduplicate some command_buffer constants A couple of constants in the command_buffer code were duplicated which caused symbol clashes in jumbo build experiments. This patch tries to ensure each constant is only in the code once. To make it possible to deduplicate kS3TCBlockWidth, ASTCBlockArray and kASTCBlockArray, some validation code had to move from gles2_cmd_decoder.cc to gl_utils.cc where there already were some validators. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I4ffb28630a1900a9400f29690cfb802497550077 Reviewed-on: https://chromium-review.googlesource.com/1145308 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#578244} [modify] https://crrev.com/60acbb59f81bb655cec94d7c916c4209e485e7e3/gpu/command_buffer/service/gl_utils.cc [modify] https://crrev.com/60acbb59f81bb655cec94d7c916c4209e485e7e3/gpu/command_buffer/service/gl_utils.h [modify] https://crrev.com/60acbb59f81bb655cec94d7c916c4209e485e7e3/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc [modify] https://crrev.com/60acbb59f81bb655cec94d7c916c4209e485e7e3/gpu/command_buffer/service/gles2_cmd_decoder.cc [modify] https://crrev.com/60acbb59f81bb655cec94d7c916c4209e485e7e3/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc [modify] https://crrev.com/60acbb59f81bb655cec94d7c916c4209e485e7e3/gpu/command_buffer/service/service_discardable_manager.cc [modify] https://crrev.com/60acbb59f81bb655cec94d7c916c4209e485e7e3/gpu/command_buffer/service/service_transfer_cache.cc
,
Jul 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/db6d860ec201996c328df0e4828094d6ba4f3dbb commit db6d860ec201996c328df0e4828094d6ba4f3dbb Author: Daniel Bratell <bratell@opera.com> Date: Thu Jul 26 19:33:41 2018 Don't use Khronos headers from gpu code Switching from Khronos headers to more approprite headers primarily to avoid jumbo compilation problems but also because it was wrong. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I9a7c33acfcc72133638c47ae370020331c445ac9 Reviewed-on: https://chromium-review.googlesource.com/1151630 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#578402} [modify] https://crrev.com/db6d860ec201996c328df0e4828094d6ba4f3dbb/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc [modify] https://crrev.com/db6d860ec201996c328df0e4828094d6ba4f3dbb/gpu/ipc/service/gpu_memory_buffer_factory_io_surface.cc
,
Jul 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/49e1d713b2f3eca480220135c8a39e92253bc3d1 commit 49e1d713b2f3eca480220135c8a39e92253bc3d1 Author: Daniel Bratell <bratell@opera.com> Date: Fri Jul 27 10:57:17 2018 Change variable names in gpu info tables to be jumbo compatible In jumbo compilation many cc files compile in the same translation unit and if they use the same local variable names, there will be compilation clashes. That happened in the automatically generated code with info about various problems in gpu drivers or the like. This patch makes sure necessary variables have unique names by adding a unique keyword for each set of data. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Ief86248f2d17f123602c7e641c286d0550a85d89 Reviewed-on: https://chromium-review.googlesource.com/1151314 Commit-Queue: Daniel Bratell <bratell@opera.com> Reviewed-by: Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#578587} [modify] https://crrev.com/49e1d713b2f3eca480220135c8a39e92253bc3d1/gpu/config/process_json.py
,
Jul 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9a408c6e3e2c412e675c04853028d7bd3ec7fc8d commit 9a408c6e3e2c412e675c04853028d7bd3ec7fc8d Author: Daniel Bratell <bratell@opera.com> Date: Fri Jul 27 11:05:29 2018 Split osmesa code into its own build target Some osmesa code uses the "real" OSMesa API headers and those are not 100% compatible with the wrapper API headers normally used. That incompatibility means that they cannot compile in the same translation unit (jumbo builds). This splits the osmesa files into their own build target to avoid potential conflicts. Also changes the code to be consistent with how osmesa.h is included. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Ifc96cf25f7b69f23f293e297ab59ce5192f1cd20 Reviewed-on: https://chromium-review.googlesource.com/1149874 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#578588} [modify] https://crrev.com/9a408c6e3e2c412e675c04853028d7bd3ec7fc8d/ui/gl/BUILD.gn [modify] https://crrev.com/9a408c6e3e2c412e675c04853028d7bd3ec7fc8d/ui/gl/DEPS [modify] https://crrev.com/9a408c6e3e2c412e675c04853028d7bd3ec7fc8d/ui/gl/gl_context_osmesa.cc
,
Jul 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/532b0aeb4388d2c6d10de124e0d1b6f7c092c25a commit 532b0aeb4388d2c6d10de124e0d1b6f7c092c25a Author: Daniel Bratell <bratell@opera.com> Date: Fri Jul 27 18:26:32 2018 Avoid the name "interface" since it's a macro in Windows In Win32 some headers defines "interface" to mean struct which makes it unsuitable to cross platform code. This instance was hit in a jumbo experimental build where apparently enough win32 headers were included in the translation unit. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I1e906a46620378be2ded6a4a4868e2034cc1868b Reviewed-on: https://chromium-review.googlesource.com/1152735 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#578715} [modify] https://crrev.com/532b0aeb4388d2c6d10de124e0d1b6f7c092c25a/gpu/config/gpu_info_collector.cc
,
Sep 7
The ui/gl support for jumbo landed in https://chromium-review.googlesource.com/834348
,
Sep 12
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/da6b809331d57899f1594ca9144b8df3dcdf6b45 commit da6b809331d57899f1594ca9144b8df3dcdf6b45 Author: Daniel Bratell <bratell@opera.com> Date: Wed Sep 12 09:09:16 2018 Support jumbo in the //gpu code Jumbo is a unity build system for Chromium. By compiling many cc files as one unit, the compile time is drastically reduced. This patch adds support for jumbo compiling //gpu. The expected effect is about 6 CPU minutes (~1 wall clock minute on a normal computer) or 1% of the total reference jumbo compilation time. Bug: 864986 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I096335ba283f9b03cf4dcde554e7b19620f08834 Reviewed-on: https://chromium-review.googlesource.com/1151323 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#590626} [modify] https://crrev.com/da6b809331d57899f1594ca9144b8df3dcdf6b45/gpu/BUILD.gn [modify] https://crrev.com/da6b809331d57899f1594ca9144b8df3dcdf6b45/gpu/command_buffer/client/BUILD.gn [modify] https://crrev.com/da6b809331d57899f1594ca9144b8df3dcdf6b45/gpu/command_buffer/common/BUILD.gn [modify] https://crrev.com/da6b809331d57899f1594ca9144b8df3dcdf6b45/gpu/command_buffer/service/BUILD.gn [modify] https://crrev.com/da6b809331d57899f1594ca9144b8df3dcdf6b45/gpu/config/BUILD.gn [modify] https://crrev.com/da6b809331d57899f1594ca9144b8df3dcdf6b45/gpu/ipc/service/BUILD.gn [modify] https://crrev.com/da6b809331d57899f1594ca9144b8df3dcdf6b45/gpu/vulkan/BUILD.gn |
|
►
Sign in to add a comment |
|
Comment 1 by brat...@opera.com
, Jul 18