diff --git a/meson.build b/meson.build index c6dad4c78ba..4766ce838ba 100644 --- a/meson.build +++ b/meson.build @@ -119,26 +119,15 @@ if gbm_backends_path == '' gbm_backends_path = join_paths(get_option('prefix'), get_option('libdir'), 'gbm') endif -# TODO: Remove this and the old static glapi along with it. -with_shared_glapi = true - with_opengl = get_option('opengl') - -with_gles1 = get_option('gles1') \ - .require(with_shared_glapi, error_message : 'OpengGL ES 1.x requires shared-glapi') \ - .allowed() - -with_gles2 = get_option('gles2') \ - .require(with_shared_glapi, error_message : 'OpengGL ES 2.x requires shared-glapi') \ - .allowed() +with_gles1 = get_option('gles1').allowed() +with_gles2 = get_option('gles2').allowed() pre_args += '-DHAVE_OPENGL=@0@'.format(with_opengl.to_int()) pre_args += '-DHAVE_OPENGL_ES_1=@0@'.format(with_gles1.to_int()) pre_args += '-DHAVE_OPENGL_ES_2=@0@'.format(with_gles2.to_int()) with_any_opengl = with_opengl or with_gles1 or with_gles2 -# Only build shared_glapi if at least one OpenGL API is enabled -with_shared_glapi = with_shared_glapi and with_any_opengl system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android', 'managarm'].contains(host_machine.system()) @@ -473,7 +462,6 @@ if not (with_dri or with_gallium or with_glx != 'disabled') with_gles2 = false with_opengl = false with_any_opengl = false - with_shared_glapi = false endif with_gbm = get_option('gbm') \ @@ -487,7 +475,6 @@ with_xlib_lease = get_option('xlib-lease') \ with_egl = get_option('egl') \ .require(with_platform_windows or with_platform_haiku or with_dri or with_platform_android, error_message : 'EGL requires DRI, Haiku, Windows or Android') \ - .require(with_shared_glapi, error_message : 'EGL requires shared-glapi') \ .require(with_glx != 'xlib', error_message :'EGL requires DRI, but GLX is being built with xlib support') \ .disable_auto_if(with_platform_haiku) \ .allowed() @@ -577,10 +564,6 @@ if with_glx != 'disabled' elif with_dri error('xlib conflicts with any dri driver') endif - elif with_glx == 'dri' - if not with_shared_glapi - error('dri based GLX requires shared-glapi') - endif endif endif @@ -894,7 +877,7 @@ if with_platform_x11 endif with_glapi_export_proto_entry_points = false -if with_shared_glapi and not with_glx_indirect_rendering +if not with_glx_indirect_rendering # Imply !defined(GLX_INDIRECT_RENDERING) with_glapi_export_proto_entry_points = true endif @@ -2354,7 +2337,6 @@ summary( 'OpenGL': with_opengl, 'ES1': with_gles1, 'ES2': with_gles2, - 'Shared glapi': with_shared_glapi, 'GLVND': with_glvnd, }, section: 'OpenGL', bool_yn: true diff --git a/src/gallium/frontends/wgl/meson.build b/src/gallium/frontends/wgl/meson.build index 0bb34851b55..004e635fb71 100644 --- a/src/gallium/frontends/wgl/meson.build +++ b/src/gallium/frontends/wgl/meson.build @@ -2,11 +2,6 @@ # SPDX-License-Identifier: MIT inc_wgl = include_directories('.') -_c_args_wgl = [] -if not with_shared_glapi - # prevent _glapi_* from being declared __declspec(dllimport) - _c_args_wgl += '-D_GLAPI_NO_EXPORTS' -endif _wgl_deps = [idep_xmlconfig, driver_zink, idep_mesautilformat] if with_gallium_zink @@ -42,7 +37,6 @@ libwgl = static_library( files_libwgl, c_args : [ '-D_GDI32_', # prevent wgl* being declared __declspec(dllimport) - _c_args_wgl ], include_directories : [ inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa, diff --git a/src/gallium/targets/libgl-gdi/meson.build b/src/gallium/targets/libgl-gdi/meson.build index 6b77c99464e..943e212f46a 100644 --- a/src/gallium/targets/libgl-gdi/meson.build +++ b/src/gallium/targets/libgl-gdi/meson.build @@ -50,9 +50,7 @@ if with_tests wgl_test_env = environment() wgl_test_env.append('PATH', libgallium_wgl_build_dir) - if with_shared_glapi - wgl_test_env.append('PATH', libglapi_build_dir) - endif + wgl_test_env.append('PATH', libglapi_build_dir) test( 'wgl', diff --git a/src/gallium/targets/libgl-xlib/meson.build b/src/gallium/targets/libgl-xlib/meson.build index 3d478773262..646642fa9cb 100644 --- a/src/gallium/targets/libgl-xlib/meson.build +++ b/src/gallium/targets/libgl-xlib/meson.build @@ -6,16 +6,12 @@ # configure.ac) gallium_xlib_ld_args = [] -gallium_xlib_link_with = [] gallium_xlib_link_depends = [] if with_ld_version_script gallium_xlib_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'libgl-xlib.sym')] gallium_xlib_link_depends += files('libgl-xlib.sym') endif -if with_shared_glapi - gallium_xlib_link_with += libglapi -endif libgl = shared_library( 'GL', @@ -28,10 +24,7 @@ libgl = shared_library( link_args : [ld_args_bsymbolic, ld_args_gc_sections, gallium_xlib_ld_args], link_depends : gallium_xlib_link_depends, link_whole : [libxlib, libglapi_bridge], - link_with : [ - libgalliumvl_stub, libws_xlib, libglapi, - libgallium, libmesa, gallium_xlib_link_with, - ], + link_with : [libgalliumvl_stub, libws_xlib, libglapi, libgallium, libmesa], dependencies : [dep_x11, idep_mesautil, dep_thread, dep_clock, dep_unwind, driver_swrast, driver_virgl, driver_asahi], install : true, version : '1.5.0', diff --git a/src/gallium/targets/wgl/meson.build b/src/gallium/targets/wgl/meson.build index db040e286c5..78c56ded38a 100644 --- a/src/gallium/targets/wgl/meson.build +++ b/src/gallium/targets/wgl/meson.build @@ -20,7 +20,7 @@ libgallium_wgl = shared_library( ], link_whole : [libwgl], link_with : [ - libgallium, libglsl, libmesa, libwsgdi, (with_shared_glapi ? libglapi_bridge : libglapi_static), libglapi, libgalliumvl_stub, + libgallium, libglsl, libmesa, libwsgdi, libglapi_bridge, libglapi, libgalliumvl_stub, ], dependencies : [ dep_ws2_32, idep_nir, idep_mesautil, driver_swrast, diff --git a/src/glx/meson.build b/src/glx/meson.build index d6462d60464..1fe8ac45321 100644 --- a/src/glx/meson.build +++ b/src/glx/meson.build @@ -130,13 +130,9 @@ libglx = static_library( ], ) -if with_shared_glapi - # libglapi_bridge contains GL functions that we need to export from libGL.so. - # Other than that, we don't need it. - libgl_link = with_glvnd ? [] : [libglapi_bridge] -else - libgl_link = libglapi_static -endif +# libglapi_bridge contains GL functions that we need to export from libGL.so. +# Other than that, we don't need it. +libgl_link = with_glvnd ? [] : [libglapi_bridge] libgl = shared_library( gl_lib_name, diff --git a/src/mapi/glapi/meson.build b/src/mapi/glapi/meson.build index 4050abd9bcb..11a1962b575 100644 --- a/src/mapi/glapi/meson.build +++ b/src/mapi/glapi/meson.build @@ -67,7 +67,7 @@ libglapi_bridge = static_library( build_by_default : false, ) -if not with_shared_glapi +if false libglapi_static = static_library( 'glapi_static', static_glapi_files, diff --git a/src/mapi/meson.build b/src/mapi/meson.build index 3544d807509..8076527e3e5 100644 --- a/src/mapi/meson.build +++ b/src/mapi/meson.build @@ -147,8 +147,4 @@ glapi_xml_py_deps = files( ) subdir('glapi') -if with_shared_glapi - subdir('shared-glapi') -else - libglapi = [] -endif +subdir('shared-glapi') diff --git a/src/mesa/main/tests/meson.build b/src/mesa/main/tests/meson.build index fd75934ddd8..b61ebcbb23b 100644 --- a/src/mesa/main/tests/meson.build +++ b/src/mesa/main/tests/meson.build @@ -4,21 +4,12 @@ files_main_test = files( 'enum_strings.cpp', 'disable_windows_include.c', + 'mesa_formats.cpp', + 'mesa_extensions.cpp', + 'program_state_string.cpp', ) # disable_windows_include.c includes this generated header. files_main_test += main_marshal_generated_h -link_main_test = [] - -if with_shared_glapi - files_main_test += files( - 'mesa_formats.cpp', - 'mesa_extensions.cpp', - 'program_state_string.cpp', - ) - link_main_test += libglapi -else - files_main_test += files('stubs.cpp') -endif test( 'main-test', @@ -27,7 +18,7 @@ test( [files_main_test, main_dispatch_h], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : [idep_gtest, dep_clock, dep_dl, dep_thread, idep_nir_headers, idep_mesautil], - link_with : [libmesa, libgallium, link_main_test], + link_with : [libmesa, libgallium, libglapi], ), suite : ['mesa'], protocol : 'gtest', diff --git a/src/meson.build b/src/meson.build index 8ebbfdac536..d443d2b41bb 100644 --- a/src/meson.build +++ b/src/meson.build @@ -119,7 +119,7 @@ if with_gallium and (with_glx != 'disabled' or with_egl) if with_gles2 and not with_glvnd subdir('mapi/es2api') endif - if with_tests and with_shared_glapi + if with_tests subdir('mesa/main/tests') subdir('mesa/state_tracker/tests') endif