From 3384f06d7fd5e0ebc07fabcf9f5b9a1d0996b927 Mon Sep 17 00:00:00 2001 From: Alexis Hetu Date: Mon, 27 Aug 2018 18:30:44 +0000 Subject: [PATCH] Removing OSMesa specific workarounds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that SwiftShader has replaced OSMesa, we can remove all OSMesa specific workarounds in chromium. Bug: chromium:873321 chromium:174845 chromium:348350 chromium:347967 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: I12fe2de6f7ea963ca9ebeeee1f35cd54e4cbecd0 Reviewed-on: https://chromium-review.googlesource.com/1175450 Reviewed-by: Bruce Dawson Reviewed-by: Dirk Pranke Reviewed-by: Kenneth Russell Reviewed-by: enne Reviewed-by: Michael Moss Reviewed-by: Bill Budge Commit-Queue: Alexis Hétu Cr-Commit-Position: refs/heads/master@{#586326} --- chrome/tools/build/linux/FILES.cfg | 12 ---------- chrome/tools/build/mac/FILES.cfg | 6 ----- chrome/tools/build/win/FILES.cfg | 6 ----- .../service/display/gl_renderer_unittest.cc | 12 ---------- .../viz/service/display/renderer_pixeltest.cc | 5 +---- .../viz/test/data/trilinear_filtering.png | Bin 601 -> 600 bytes docs/chromeos_build_instructions.md | 3 +-- gpu/command_buffer/service/context_group.cc | 21 ------------------ gpu/config/gpu_driver_bug_list.json | 11 --------- gpu/config/gpu_driver_bug_workarounds.cc | 13 ----------- gpu/config/gpu_driver_bug_workarounds.h | 3 --- gpu/config/gpu_workaround_list.txt | 3 --- gpu/config/software_rendering_list.json | 3 --- gpu/ipc/service/image_transport_surface.h | 4 ---- .../browsertester/browserlauncher.py | 6 ++--- .../breakpad/dump_reader_multipart.py | 2 +- .../deterministic_build_whitelist.pyl | 1 - tools/msan/blacklist.txt | 4 ---- ui/gl/gl_context.h | 2 +- ui/gl/gl_surface_format.h | 2 +- 20 files changed, 8 insertions(+), 111 deletions(-) diff --git a/chrome/tools/build/linux/FILES.cfg b/chrome/tools/build/linux/FILES.cfg index 911bd9040b62d0..165353c74228d5 100644 --- a/chrome/tools/build/linux/FILES.cfg +++ b/chrome/tools/build/linux/FILES.cfg @@ -245,12 +245,6 @@ FILES = [ 'archive': 'content-shell.zip', 'optional': ['dev'], }, - { - 'filename': 'libosmesa.so', - 'buildtype': ['dev'], - 'archive': 'content-shell.zip', - 'optional': ['dev'], - }, { 'filename': 'minidump_stackwalk', 'buildtype': ['dev'], @@ -305,10 +299,4 @@ FILES = [ 'archive': 'headless-shell.zip', 'optional': ['dev'], }, - { - 'filename': 'libosmesa.so', - 'buildtype': ['dev'], - 'archive': 'headless-shell.zip', - 'optional': ['dev'], - }, ] diff --git a/chrome/tools/build/mac/FILES.cfg b/chrome/tools/build/mac/FILES.cfg index a24fe945215bf2..72c6ae75960e59 100644 --- a/chrome/tools/build/mac/FILES.cfg +++ b/chrome/tools/build/mac/FILES.cfg @@ -116,12 +116,6 @@ FILES = [ 'archive': 'content-shell.zip', 'optional': ['dev'], }, - { - 'filename': 'osmesa.so', - 'buildtype': ['dev'], - 'archive': 'content-shell.zip', - 'optional': ['dev'], - }, { 'filename': 'resources', 'buildtype': ['dev'], diff --git a/chrome/tools/build/win/FILES.cfg b/chrome/tools/build/win/FILES.cfg index 1b6622526457a3..ac6ff1e67e3520 100644 --- a/chrome/tools/build/win/FILES.cfg +++ b/chrome/tools/build/win/FILES.cfg @@ -748,12 +748,6 @@ FILES = [ 'archive': 'content-shell.zip', 'optional': ['dev'], }, - { - 'filename': 'osmesa.dll', - 'buildtype': ['dev'], - 'archive': 'content-shell.zip', - 'optional': ['dev'], - }, { 'filename': 'resources', 'buildtype': ['dev'], diff --git a/components/viz/service/display/gl_renderer_unittest.cc b/components/viz/service/display/gl_renderer_unittest.cc index d59d4d65bc0f28..c057732d52cf17 100644 --- a/components/viz/service/display/gl_renderer_unittest.cc +++ b/components/viz/service/display/gl_renderer_unittest.cc @@ -275,12 +275,6 @@ class GLRendererShaderPixelTest : public cc::GLRendererPixelTest { void TestShadersWithPrecisionAndSampler(TexCoordPrecision precision, SamplerType sampler) { - if (!context_provider()->ContextCapabilities().egl_image_external && - sampler == SAMPLER_TYPE_EXTERNAL_OES) { - // This will likely be hit in tests due to usage of osmesa. - return; - } - TestShader(ProgramKey::Texture(precision, sampler, PREMULTIPLIED_ALPHA, false, true, false)); TestShader(ProgramKey::Texture(precision, sampler, PREMULTIPLIED_ALPHA, @@ -355,12 +349,6 @@ class GLRendererShaderPixelTest : public cc::GLRendererPixelTest { SamplerType sampler, BlendMode blend_mode, bool mask_for_background) { - if (!context_provider()->ContextCapabilities().egl_image_external && - sampler == SAMPLER_TYPE_EXTERNAL_OES) { - // This will likely be hit in tests due to usage of osmesa. - return; - } - TestShader(ProgramKey::RenderPass(precision, sampler, blend_mode, NO_AA, HAS_MASK, mask_for_background, false, false)); diff --git a/components/viz/service/display/renderer_pixeltest.cc b/components/viz/service/display/renderer_pixeltest.cc index 34be534e121344..d61603aea99251 100644 --- a/components/viz/service/display/renderer_pixeltest.cc +++ b/components/viz/service/display/renderer_pixeltest.cc @@ -3003,10 +3003,7 @@ TEST_F(GLRendererPixelTest, AntiAliasingPerspective) { } // Trilinear filtering is only supported in the gl renderer. -// TODO(reveman): Enable test after updating osmesa to a version where -// GL_LINEAR_MIPMAP_LINEAR works correctly. --use-gpu-in-tests can be -// used to verify that trilinear filtering works until then. -TEST_F(GLRendererPixelTest, DISABLED_TrilinearFiltering) { +TEST_F(GLRendererPixelTest, TrilinearFiltering) { gfx::Rect viewport_rect(this->device_viewport_size_); int root_pass_id = 1; diff --git a/components/viz/test/data/trilinear_filtering.png b/components/viz/test/data/trilinear_filtering.png index e2d0c1f940657b3be3806ddea4fc01fecfa6f0c3..4d7799774f0f0ba171a131094cb02492ee2301b8 100644 GIT binary patch literal 600 zcmeAS@N?(olHy`uVBq!ia0vp^CqS5k2}mkgS)OEIV3PNAaSW-L^Y+p~UIzvNhJ%X@ zy_OqAeYnXnb7g}3?lUomnSakQEfl0yB#WAE}&fCii8JigxjvUaR zY-lyRaaAvCp}C_^-R;_be~a?m+w11)PybN9N0uQzO@M=~F=3P#Az|==L9B(f@3BP7 RPhgT^@O1TaS?83{1OV4ih0Oo} diff --git a/docs/chromeos_build_instructions.md b/docs/chromeos_build_instructions.md index 1a3fe231500f21..852fc25491a30f 100644 --- a/docs/chromeos_build_instructions.md +++ b/docs/chromeos_build_instructions.md @@ -88,8 +88,7 @@ testing it through Chromium Remote Desktop you might face drawing problems (e.g. Aura window not painting anything). Possible remedies: * `--ui-enable-software-compositing --ui-disable-threaded-compositing` -* `--use-gl=osmesa`, but it's ultra slow, and you'll have to build osmesa - yourself. +* `--use-gl=swiftshader`, but it's slow. To more closely match the UI used on devices, you can install fonts used by Chrome OS, such as Roboto, on your Linux distro. diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc index c92751e4ac5004..3200bd14d3515f 100644 --- a/gpu/command_buffer/service/context_group.cc +++ b/gpu/command_buffer/service/context_group.cc @@ -421,27 +421,6 @@ gpu::ContextResult ContextGroup::Initialize( : gpu::ContextResult::kFatalFailure; } - // Some shaders in Skia need more than the min available vertex and - // fragment shader uniform vectors in case of OSMesa GL Implementation - if (feature_info_->workarounds().max_fragment_uniform_vectors) { - max_fragment_uniform_vectors_ = std::min( - max_fragment_uniform_vectors_, - static_cast( - feature_info_->workarounds().max_fragment_uniform_vectors)); - } - if (feature_info_->workarounds().max_varying_vectors) { - max_varying_vectors_ = - std::min(max_varying_vectors_, - static_cast( - feature_info_->workarounds().max_varying_vectors)); - } - if (feature_info_->workarounds().max_vertex_uniform_vectors) { - max_vertex_uniform_vectors_ = - std::min(max_vertex_uniform_vectors_, - static_cast( - feature_info_->workarounds().max_vertex_uniform_vectors)); - } - if (context_type != CONTEXT_TYPE_WEBGL1 && context_type != CONTEXT_TYPE_OPENGLES2) { const GLuint kMinVertexOutputComponents = 64; diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json index 7f941e9775a7f1..82c315b8a2229e 100644 --- a/gpu/config/gpu_driver_bug_list.json +++ b/gpu/config/gpu_driver_bug_list.json @@ -457,17 +457,6 @@ "disable_post_sub_buffers_for_onscreen_surfaces" ] }, - { - "id": 69, - "description": "Some shaders in Skia need more than the min available vertex and fragment shader uniform vectors in case of OSMesa", - "cr_bugs": [174845], - "driver_vendor": "osmesa", - "features": [ - "max_fragment_uniform_vectors_32", - "max_varying_vectors_16", - "max_vertex_uniform_vectors_256" - ] - }, { "id": 70, "description": "Disable D3D11 on older nVidia drivers", diff --git a/gpu/config/gpu_driver_bug_workarounds.cc b/gpu/config/gpu_driver_bug_workarounds.cc index 1daf4f8e475200..bd29c9e0595900 100644 --- a/gpu/config/gpu_driver_bug_workarounds.cc +++ b/gpu/config/gpu_driver_bug_workarounds.cc @@ -28,13 +28,6 @@ void IntSetToWorkarounds(const std::vector& enabled_workarounds, if (workarounds->max_texture_size_limit_4096) workarounds->max_texture_size = 4096; - if (workarounds->max_fragment_uniform_vectors_32) - workarounds->max_fragment_uniform_vectors = 32; - if (workarounds->max_varying_vectors_16) - workarounds->max_varying_vectors = 16; - if (workarounds->max_vertex_uniform_vectors_256) - workarounds->max_vertex_uniform_vectors = 256; - if (workarounds->max_copy_texture_chromium_size_1048576) workarounds->max_copy_texture_chromium_size = 1048576; if (workarounds->max_copy_texture_chromium_size_262144) @@ -81,12 +74,6 @@ void GpuDriverBugWorkarounds::Append(const GpuDriverBugWorkarounds& extra) { #undef GPU_OP max_texture_size = LowerMax(max_texture_size, extra.max_texture_size); - max_fragment_uniform_vectors = LowerMax(max_fragment_uniform_vectors, - extra.max_fragment_uniform_vectors); - max_varying_vectors = - LowerMax(max_varying_vectors, extra.max_varying_vectors); - max_vertex_uniform_vectors = - LowerMax(max_vertex_uniform_vectors, extra.max_vertex_uniform_vectors); max_copy_texture_chromium_size = LowerMax( max_copy_texture_chromium_size, extra.max_copy_texture_chromium_size); } diff --git a/gpu/config/gpu_driver_bug_workarounds.h b/gpu/config/gpu_driver_bug_workarounds.h index f69486f4bddd94..6618597555ce03 100644 --- a/gpu/config/gpu_driver_bug_workarounds.h +++ b/gpu/config/gpu_driver_bug_workarounds.h @@ -39,9 +39,6 @@ class GPU_EXPORT GpuDriverBugWorkarounds { // Note: 0 here means use driver limit. GLint max_texture_size = 0; - GLint max_fragment_uniform_vectors = 0; - GLint max_varying_vectors = 0; - GLint max_vertex_uniform_vectors = 0; GLint max_copy_texture_chromium_size = 0; }; diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list.txt index a302fa3533c197..e3b5778624512a 100644 --- a/gpu/config/gpu_workaround_list.txt +++ b/gpu/config/gpu_workaround_list.txt @@ -65,11 +65,8 @@ init_two_cube_map_levels_before_copyteximage init_vertex_attributes max_copy_texture_chromium_size_1048576 max_copy_texture_chromium_size_262144 -max_fragment_uniform_vectors_32 max_msaa_sample_count_4 max_texture_size_limit_4096 -max_varying_vectors_16 -max_vertex_uniform_vectors_256 msaa_is_slow multisample_renderbuffer_resize_emulation needs_offscreen_buffer_workaround diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json index d472340aaaa6ef..ff3f022f9c5bb1 100644 --- a/gpu/config/software_rendering_list.json +++ b/gpu/config/software_rendering_list.json @@ -122,9 +122,6 @@ "value": "7.15.10.1624" } }, - { - "driver_vendor": "osmesa" - }, { "vendor_id": "0x1414", "device_id": ["0x02c1"] diff --git a/gpu/ipc/service/image_transport_surface.h b/gpu/ipc/service/image_transport_surface.h index 8303330b7530b9..3e76738360785a 100644 --- a/gpu/ipc/service/image_transport_surface.h +++ b/gpu/ipc/service/image_transport_surface.h @@ -25,10 +25,6 @@ class ImageTransportSurfaceDelegate; class GPU_IPC_SERVICE_EXPORT ImageTransportSurface { public: -#if defined(OS_MACOSX) - static void SetAllowOSMesaForTesting(bool allow); -#endif - // Creates the appropriate native surface depending on the GL implementation. // This will be implemented separately by each platform. On failure, a null // scoped_refptr should be returned. diff --git a/ppapi/native_client/tools/browser_tester/browsertester/browserlauncher.py b/ppapi/native_client/tools/browser_tester/browsertester/browserlauncher.py index b07be1062d9a6a..d6b29ce41617b2 100755 --- a/ppapi/native_client/tools/browser_tester/browsertester/browserlauncher.py +++ b/ppapi/native_client/tools/browser_tester/browsertester/browserlauncher.py @@ -293,9 +293,9 @@ def MakeCmd(self, url, host, port): # Log network requests to assist debugging. cmd.append('--log-net-log=%s' % self.NetLogName()) if PLATFORM == 'linux': - # Explicitly run with mesa on linux. The test infrastructure doesn't have - # sufficient native GL contextes to run these tests. - cmd.append('--use-gl=osmesa') + # Explicitly run with SwiftShader on linux. The test infrastructure + # doesn't have sufficient native GL contextes to run these tests. + cmd.append('--use-gl=swiftshader') if self.options.ppapi_plugin is None: cmd.append('--enable-nacl') disable_sandbox = False diff --git a/third_party/blink/tools/blinkpy/web_tests/breakpad/dump_reader_multipart.py b/third_party/blink/tools/blinkpy/web_tests/breakpad/dump_reader_multipart.py index e83025d3383a84..ee47da7635d955 100644 --- a/third_party/blink/tools/blinkpy/web_tests/breakpad/dump_reader_multipart.py +++ b/third_party/blink/tools/blinkpy/web_tests/breakpad/dump_reader_multipart.py @@ -175,7 +175,7 @@ class DumpReaderLinux(DumpReaderMultipart): """Linux breakpad dump reader.""" def _binaries_to_symbolize(self): - return ['content_shell', 'libosmesa.so'] + return ['content_shell'] def _file_extension(self): return 'dmp' diff --git a/tools/determinism/deterministic_build_whitelist.pyl b/tools/determinism/deterministic_build_whitelist.pyl index 2dd24117cebd72..b0cde932c1c668 100644 --- a/tools/determinism/deterministic_build_whitelist.pyl +++ b/tools/determinism/deterministic_build_whitelist.pyl @@ -140,7 +140,6 @@ 'nacl_loader_unittests', 'native_theme_unittests', 'net_unittests', - 'osmesa.so', 'performance_browser_tests', 'ppapi_perftests', 'ppapi_unittests', diff --git a/tools/msan/blacklist.txt b/tools/msan/blacklist.txt index feada5c171f80a..f3ca83018317fc 100644 --- a/tools/msan/blacklist.txt +++ b/tools/msan/blacklist.txt @@ -15,10 +15,6 @@ fun:longest_match # Uninit in zlib with SIMD intrinsic http://crbug.com/426868 fun:crc_fold512_to_32 -# Uninit in OSMesa. http://crbug.com/347967 -fun:unpack_RGBA8888 -fun:unpack_RGB888 - # False positives due to use of linux_syscall_support. http://crbug.com/394028 src:*/third_party/breakpad/breakpad/src/* src:*/components/crash/content/app/breakpad_linux.cc diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h index b747c543054e30..9e38ea80199ca8 100644 --- a/ui/gl/gl_context.h +++ b/ui/gl/gl_context.h @@ -97,7 +97,7 @@ class GL_EXPORT GLContext : public base::RefCounted { // Initializes the GL context to be compatible with the given surface. The GL // context can be made with other surface's of the same type. The compatible - // surface is only needed for certain platforms like WGL, OSMesa and GLX. It + // surface is only needed for certain platforms like WGL and GLX. It // should be specific for all platforms though. virtual bool Initialize(GLSurface* compatible_surface, const GLContextAttribs& attribs) = 0; diff --git a/ui/gl/gl_surface_format.h b/ui/gl/gl_surface_format.h index ec702fcfa58402..70af5e16fc307b 100644 --- a/ui/gl/gl_surface_format.h +++ b/ui/gl/gl_surface_format.h @@ -27,7 +27,7 @@ class GL_EXPORT GLSurfaceFormat { // Use the setters below to change attributes if needed. GLSurfaceFormat(); - // Use a specified pixel layout, cf. gl_surface_osmesa. + // Use a specified pixel layout, cf. GLSurfaceFormatTest. GLSurfaceFormat(SurfacePixelLayout layout); // Copy constructor from pre-existing format.