Skip to content

Commit

Permalink
Removing OSMesa specific workarounds
Browse files Browse the repository at this point in the history
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 <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586326}
  • Loading branch information
sugoi1 authored and Commit Bot committed Aug 27, 2018
1 parent 03d8c16 commit 3384f06
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 111 deletions.
12 changes: 0 additions & 12 deletions chrome/tools/build/linux/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -305,10 +299,4 @@ FILES = [
'archive': 'headless-shell.zip',
'optional': ['dev'],
},
{
'filename': 'libosmesa.so',
'buildtype': ['dev'],
'archive': 'headless-shell.zip',
'optional': ['dev'],
},
]
6 changes: 0 additions & 6 deletions chrome/tools/build/mac/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
6 changes: 0 additions & 6 deletions chrome/tools/build/win/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
12 changes: 0 additions & 12 deletions components/viz/service/display/gl_renderer_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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));
Expand Down
5 changes: 1 addition & 4 deletions components/viz/service/display/renderer_pixeltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file modified components/viz/test/data/trilinear_filtering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions docs/chromeos_build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
21 changes: 0 additions & 21 deletions gpu/command_buffer/service/context_group.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t>(
feature_info_->workarounds().max_fragment_uniform_vectors));
}
if (feature_info_->workarounds().max_varying_vectors) {
max_varying_vectors_ =
std::min(max_varying_vectors_,
static_cast<uint32_t>(
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<uint32_t>(
feature_info_->workarounds().max_vertex_uniform_vectors));
}

if (context_type != CONTEXT_TYPE_WEBGL1 &&
context_type != CONTEXT_TYPE_OPENGLES2) {
const GLuint kMinVertexOutputComponents = 64;
Expand Down
11 changes: 0 additions & 11 deletions gpu/config/gpu_driver_bug_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 0 additions & 13 deletions gpu/config/gpu_driver_bug_workarounds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ void IntSetToWorkarounds(const std::vector<int32_t>& 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)
Expand Down Expand Up @@ -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);
}
Expand Down
3 changes: 0 additions & 3 deletions gpu/config/gpu_driver_bug_workarounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
3 changes: 0 additions & 3 deletions gpu/config/gpu_workaround_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions gpu/config/software_rendering_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@
"value": "7.15.10.1624"
}
},
{
"driver_vendor": "osmesa"
},
{
"vendor_id": "0x1414",
"device_id": ["0x02c1"]
Expand Down
4 changes: 0 additions & 4 deletions gpu/ipc/service/image_transport_surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion tools/determinism/deterministic_build_whitelist.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
'nacl_loader_unittests',
'native_theme_unittests',
'net_unittests',
'osmesa.so',
'performance_browser_tests',
'ppapi_perftests',
'ppapi_unittests',
Expand Down
4 changes: 0 additions & 4 deletions tools/msan/blacklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion ui/gl/gl_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {

// 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;
Expand Down
2 changes: 1 addition & 1 deletion ui/gl/gl_surface_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3384f06

Please sign in to comment.