mesa: Retire classic OSMesa.

The classic OSMesa renders directly into user memory using
src/mesa/swrast, while gallium OSMesa renders using softpipe or llvmpipe
and copies out at glFlush() time.  This would make gallium look like a
worse choice for OSMesa, except that swrast is:

1) Painfully slow to render compared to llvmpipe
2) Incorrect at derivatives
3) Limited to GL 2.1 instead of GL 4.6

In my survey of OSMesa users, debian was the remaining holdout with
classic OSMesa in use on hurd and some rare non-LLVM-supported
architectures (sh4, alpha, etc.).  As of today, they've switched to
softpipe-based gallium OSMesa for them.

To prevent people from running the wrong OSMesa (to the extent that
running OSMesa can ever be the right thing), delete the classic
version.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>

Closes: #320
Closes: #877
Closes: #2297
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1243>
This commit is contained in:
Eric Anholt 2019-07-03 11:10:32 -07:00 committed by Marge Bot
parent 6ffc5611c8
commit ee80237218
12 changed files with 19 additions and 1415 deletions

View File

@ -643,7 +643,7 @@ meson-gallium:
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
VULKAN_DRIVERS: swrast
EXTRA_OPTION: >
-D osmesa=gallium
-D osmesa=true
-D tools=all
-D werror=true
script:
@ -675,27 +675,12 @@ meson-release:
GALLIUM_DRIVERS: "nouveau,kmsro,freedreno,r300,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
BUILDTYPE: "release"
EXTRA_OPTION: >
-D osmesa=none
-D osmesa=false
-D tools=all
-D werror=true
script:
- .gitlab-ci/meson-build.sh
meson-classic:
extends: .meson-build
variables:
UNWIND: "enabled"
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
-D egl=enabled
-D platforms=x11,wayland
DRI_DRIVERS: "auto"
EXTRA_OPTION: >
-D osmesa=classic
-D tools=all
-D werror=true
meson-android:
extends:
- .meson-cross
@ -741,7 +726,7 @@ meson-android:
-D gbm=disabled
-D egl=enabled
-D platforms=[]
-D osmesa=none
-D osmesa=false
GALLIUM_ST: >
-D dri3=disabled
-D gallium-vdpau=disabled
@ -892,7 +877,7 @@ meson-vulkan:
-D gbm=disabled
-D egl=disabled
-D platforms=x11,wayland
-D osmesa=none
-D osmesa=false
GALLIUM_ST: >
-D dri3=enabled
-D gallium-vdpau=disabled
@ -957,7 +942,7 @@ meson-mingw32-x86_64:
GALLIUM_DRIVERS: "swrast"
EXTRA_OPTION: >
-Dllvm=disabled
-Dosmesa=gallium
-Dosmesa=true
--cross-file=.gitlab-ci/x86_64-w64-mingw32
.test:

View File

@ -11,11 +11,10 @@ renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for more
information about the API functions.
The OSMesa interface may be used with any of three software renderers:
The OSMesa interface may be used with the gallium software renderers:
#. llvmpipe - this is the high-performance Gallium LLVM driver
#. softpipe - this it the reference Gallium software driver
#. swrast - this is the legacy Mesa software rasterizer
There are several examples of OSMesa in the mesa/demos repository.
@ -26,7 +25,7 @@ Configure and build Mesa with something like:
::
meson builddir -Dosmesa=gallium -Dgallium-drivers=swrast -Ddri-drivers=[] -Dvulkan-drivers=[] -Dprefix=$PWD/builddir/install
meson builddir -Dosmesa=true -Dgallium-drivers=swrast -Ddri-drivers=[] -Dvulkan-drivers=[] -Dprefix=$PWD/builddir/install
ninja -C builddir install
Make sure you have LLVM installed first if you want to use the llvmpipe

View File

@ -5,3 +5,4 @@ Removed GL_NV_point_sprite for classic swrast.
driconf: remove glx_disable_oml_sync_control, glx_disable_sgi_video_sync, and glx_disable_ext_buffer_age
Removed support for loading DRI drivers older than Mesa 8.0, including all DRI1 support
Add support for VK_VALVE_mutable_descriptor_type on RADV
Removed classic OSMesa in favor of the newly improved gallium OSMesa

View File

@ -96,7 +96,7 @@ if with_egl
)
endif
if with_osmesa != 'none'
if with_osmesa
install_headers('GL/osmesa.h', subdir : 'GL')
endif

View File

@ -517,8 +517,8 @@ if with_any_vk and (with_platform_x11 and not with_dri3)
error('Vulkan drivers require dri3 for X11 support')
endif
if with_dri
if with_glx == 'disabled' and not with_egl and not with_gbm and with_osmesa != 'classic'
error('building dri drivers require at least one windowing system or classic osmesa')
if with_glx == 'disabled' and not with_egl and not with_gbm
error('building dri drivers require at least one windowing system')
endif
endif
@ -1737,8 +1737,8 @@ else
dep_unwind = null_dep
endif
if with_osmesa != 'none'
if with_osmesa == 'gallium' and not with_gallium_softpipe
if with_osmesa
if not with_gallium_softpipe
error('OSMesa gallium requires gallium softpipe or llvmpipe.')
endif
if host_machine.system() == 'windows'
@ -1976,13 +1976,9 @@ lines = ['',
with_gles2 ? 'yes' : 'no'),
]
if with_osmesa != 'none'
if with_osmesa
lines += ''
suffix = ''
if with_osmesa == 'gallium'
suffix = '(Gallium)'
endif
lines += 'OSMesa: lib' + osmesa_lib_name + suffix
lines += 'OSMesa: lib' + osmesa_lib_name
else
lines += 'OSMesa: no'
endif

View File

@ -362,9 +362,8 @@ option(
)
option(
'osmesa',
type : 'combo',
value : 'none',
choices : ['none', 'classic', 'gallium'],
type : 'boolean',
value : false,
description : 'Build OSmesa.'
)
option(

View File

@ -180,7 +180,7 @@ if with_dri
subdir('frontends/dri')
subdir('targets/dri')
endif
if with_osmesa == 'gallium'
if with_osmesa
subdir('frontends/osmesa')
subdir('targets/osmesa')
endif

View File

@ -1,50 +0,0 @@
# Copyright © 2017 Dylan Baker
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
osmesa_link_with = []
if with_shared_glapi
osmesa_link_with += libglapi
endif
libosmesa = shared_library(
osmesa_lib_name,
['osmesa.c', glapitable_h, glapitemp_h],
gnu_symbol_visibility : 'hidden',
link_args : ld_args_gc_sections,
include_directories : [
inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux,
],
link_whole : libglapi_static,
link_with : [libmesa_classic, osmesa_link_with],
dependencies : [dep_thread, dep_selinux],
name_prefix : host_machine.system() == 'windows' ? '' : 'lib', # otherwise mingw will create libosmesa.dll
soversion : host_machine.system() == 'windows' ? '' : '8',
version : '8.0.0',
install : true,
)
pkg.generate(
name : 'osmesa',
description : 'Mesa Off-screen Rendering Library',
version : '8.0.0',
libraries : libosmesa,
libraries_private : gl_priv_libs,
)

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +0,0 @@
;DESCRIPTION 'Mesa OSMesa lib for Win32'
VERSION 4.1
EXPORTS
OSMesaColorClamp
OSMesaCreateContext
OSMesaCreateContextAttribs
OSMesaCreateContextExt
OSMesaDestroyContext
OSMesaMakeCurrent
OSMesaGetCurrentContext
OSMesaPixelStore
OSMesaGetIntegerv
OSMesaGetDepthBuffer
OSMesaGetColorBuffer
OSMesaGetProcAddress

View File

@ -116,7 +116,7 @@ _mesa_override_extensions(struct gl_context *ctx)
/**
* Enable all extensions suitable for a software-only renderer.
* This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc.
* This is a convenience function used by the mesa/swrast drivers.
*/
void
_mesa_enable_sw_extensions(struct gl_context *ctx)

View File

@ -760,9 +760,6 @@ libmesa_gallium = static_library(
)
subdir('drivers/dri')
if with_osmesa == 'classic'
subdir('drivers/osmesa')
endif
if with_glx == 'xlib'
subdir('drivers/x11')
endif