diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2017-10-20 21:48:18 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-10-27 11:06:45 -0700 |
commit | cbbd5bb889a2c271a504c379f36a7cb717a85af4 (patch) | |
tree | 58c7208233c088bdca901498a2ab3ed704469225 /meson.build | |
parent | 7503ab687b3992b0967eafd4fb7372ddb3f4445a (diff) |
meson: build classic osmesa
This builds the classic (non-gallium) osmesa with meson. This has been
tested with the osdemo application from mesa-demos.
v2: - Remove unrelated change
- Add SELinux dependency to osmesa
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 33abdac7ee9..ef06ea8f6b7 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 @@ -713,7 +711,22 @@ 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 + 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 @@ -740,6 +753,7 @@ dep_xext = [] dep_xdamage = [] dep_xfixes = [] dep_x11_xcb = [] +dep_xcb = [] dep_xcb_glx = [] dep_xcb_dri2 = [] dep_xcb_dri3 = [] |