X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=meson.build;h=8988deae7838d5d5d68150ae12a63cf7d0bff95d;hb=1fe4c7b2afac17d4f333b7b63251e98fd193a32a;hp=b6293760fafc5d9a0ff8d3c2ba4d4740498e69ec;hpb=eecd2860ffc89bf1c699dcb41e00205f8fa7e08a;p=mesa.git diff --git a/meson.build b/meson.build index b6293760faf..8988deae783 100644 --- a/meson.build +++ b/meson.build @@ -46,6 +46,7 @@ with_valgrind = get_option('valgrind') with_libunwind = get_option('libunwind') with_asm = get_option('asm') with_llvm = get_option('llvm') +with_osmesa = get_option('osmesa') if get_option('texture-float') pre_args += '-DTEXTURE_FLOAT_ENABLED' message('WARNING: Floating-point texture enabled. Please consult docs/patents.txt and your lawyer before building mesa.') @@ -67,9 +68,6 @@ 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 = get_option('shared-glapi') and with_any_opengl -# TODO: these will need options, but at the moment they just control header -# installs -with_osmesa = false # shared-glapi is required if at least two OpenGL APIs are being built if not with_shared_glapi @@ -89,6 +87,7 @@ with_dri_i915 = false with_dri_i965 = false with_dri_r100 = false with_dri_r200 = false +with_dri_nouveau = false with_dri_swrast = false _drivers = get_option('dri-drivers') if _drivers != '' @@ -97,6 +96,7 @@ if _drivers != '' with_dri_i965 = _split.contains('i965') with_dri_r100 = _split.contains('r100') with_dri_r200 = _split.contains('r200') + with_dri_nouveau = _split.contains('nouveau') with_dri_swrast = _split.contains('swrast') with_dri = true endif @@ -634,7 +634,7 @@ endif if with_gallium_radeonsi or with_dri_r100 or with_dri_r200 dep_libdrm_radeon = dependency('libdrm_radeon', version : '>= 2.4.71') endif -if with_gallium_nouveau +if with_gallium_nouveau or with_dri_nouveau dep_libdrm_nouveau = dependency('libdrm_nouveau', version : '>= 2.4.66') endif if with_gallium_etnaviv @@ -692,8 +692,11 @@ endif prog_bison = find_program('bison', required : with_any_opengl) prog_flex = find_program('flex', required : with_any_opengl) -# TODO: selinux dep_selinux = [] +if get_option('selinux') + dep_selinux = dependency('libselinux') + pre_args += '-DMESA_SELINUX' +endif # TODO: llvm-prefix and llvm-shared-libs @@ -708,7 +711,25 @@ endif # TODO: glx provider -# TODO: osmesa provider +if with_osmesa != 'none' + if with_osmesa == 'classic' and not with_dri_swrast + error('OSMesa classic requires dri (classic) swrast.') + endif + if with_osmesa == 'gallium' and not with_gallium_softpipe + error('OSMesa gallium requires gallium softpipe or llvmpipe.') + endif + osmesa_lib_name = 'OSMesa' + osmesa_bits = get_option('osmesa-bits') + if osmesa_bits != '8' + if with_dri or with_glx != 'disabled' + error('OSMesa bits must be 8 if building glx or dir based drivers') + endif + osmesa_lib_name = osmesa_lib_name + osmesa_bits + pre_args += [ + '-DCHAN_BITS=@0@'.format(osmesa_bits), '-DDEFAULT_SOFTWARE_DEPTH_BITS=31' + ] + endif +endif # TODO: symbol mangling @@ -735,12 +756,13 @@ dep_xext = [] dep_xdamage = [] dep_xfixes = [] dep_x11_xcb = [] +dep_xcb = [] dep_xcb_glx = [] dep_xcb_dri2 = [] dep_xcb_dri3 = [] dep_dri2proto = [] dep_glproto = [] -dep_xf86vm = [] +dep_xxf86vm = [] dep_xcb_dri3 = [] dep_xcb_present = [] dep_xcb_sync = [] @@ -753,7 +775,7 @@ if with_platform_x11 dep_xdamage = dependency('xdamage', version : '>= 1.1') dep_xfixes = dependency('xfixes') dep_xcb_glx = dependency('xcb-glx', version : '>= 1.8.1') - dep_xf86vm = dependency('xxf86vm', required : false) + dep_xxf86vm = dependency('xxf86vm', required : false) endif if with_any_vk or (with_glx == 'dri' and with_dri_platform == 'drm') dep_xcb = dependency('xcb') @@ -817,8 +839,8 @@ gl_priv_reqs = [ 'x11', 'xext', 'xdamage >= 1.1', 'xfixes', 'x11-xcb', 'xcb', 'xcb-glx >= 1.8.1', 'libdrm >= 2.4.75', ] -if dep_xf86vm != [] and dep_xf86vm.found() - gl_priv_reqs += 'xf86vm' +if dep_xxf86vm != [] and dep_xxf86vm.found() + gl_priv_reqs += 'xxf86vm' endif if with_dri_platform == 'drm' gl_priv_reqs += 'xcb-dri2 >= 1.8' @@ -838,4 +860,5 @@ endif pkg = import('pkgconfig') subdir('include') +subdir('bin') subdir('src')