[Mesa-dev] [PATCH v2 08/21] meson: build libmesa_gallium
Dylan Baker
dylan at pnwbakers.com
Thu Oct 12 17:38:35 UTC 2017
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
meson.build | 19 ++++---
meson_options.txt | 2 +
src/mesa/meson.build | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 155 insertions(+), 9 deletions(-)
diff --git a/meson.build b/meson.build
index a96f2a1aa65..39d800ee031 100644
--- a/meson.build
+++ b/meson.build
@@ -88,7 +88,17 @@ if _drivers != ''
with_dri = true
endif
-if not with_dri
+with_gallium = false
+with_gallium_radeonsi = false
+_drivers = get_option('gallium-drivers')
+if _drivers != ''
+ _split = _drivers.split(',')
+ with_gallium_radeonsi = _split.contains('radeonsi')
+ with_gallium = true
+ with_dri = true
+endif
+
+if not (with_dri or with_gallium)
with_gles1 = false
with_gles2 = false
with_opengl = false
@@ -99,9 +109,6 @@ endif
# TODO: other OSes
with_dri_platform = 'drm'
-with_gallium = false
-# TODO: gallium drivers
-
# TODO: conditionalize libdrm requirement
dep_libdrm = dependency('libdrm', version : '>= 2.4.75')
pre_args += '-DHAVE_LIBDRM'
@@ -200,7 +207,7 @@ if _vulkan_drivers != ''
endif
endif
-if with_dri # TODO: or gallium
+if with_dri or with_gallium
if with_glx == 'disabled' # TODO: or egl
error('building dri or gallium drivers require at least one window system')
endif
@@ -557,8 +564,6 @@ dep_selinux = []
# TODO: flags for xa, egl, gbm, nin, xvmc, vdpau, omx, va, opencl,
# gallium-tests,
-# TODO: gallium drivers
-
# TODO: symbol mangling
# TODO: egl configuration
diff --git a/meson_options.txt b/meson_options.txt
index 2b13d241eb7..48e8867aa4c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -26,6 +26,8 @@ option('dri-drivers', type : 'string', value : 'swrast,i965',
description : 'comma separated list of dri drivers to build.')
option('dri-drivers-path', type : 'string', value : '',
description : 'Location of dri drivers. Default: $libdir/dri.')
+option('gallium-drivers', type : 'string', value : 'radeonsi',
+ description : 'comma separated list of gallium drivers to build.')
option('vulkan-drivers', type : 'string', value : 'intel,amd',
description : 'comma separated list of vulkan drivers to build.')
option('shader-cache', type : 'boolean', value : true,
diff --git a/src/mesa/meson.build b/src/mesa/meson.build
index 665b35e5339..5cfb0460835 100644
--- a/src/mesa/meson.build
+++ b/src/mesa/meson.build
@@ -350,6 +350,7 @@ files_libmesa_common = files(
'vbo/vbo_split_copy.c',
'vbo/vbo_split.h',
'vbo/vbo_split_inplace.c',
+ 'x86/common_x86.c',
)
# mesa files
@@ -457,7 +458,6 @@ files_libmesa_classic = files(
'drivers/common/meta_tex_subimage.c',
'drivers/common/meta.c',
'drivers/common/meta.h',
- 'x86/common_x86.c',
'x86/x86_xform.c',
'x86/3dnow.c',
'x86/sse.c',
@@ -467,6 +467,137 @@ files_libmesa_classic = files(
'x86-64/x86-64.c',
)
+files_libmesa_gallium = files(
+ 'state_tracker/st_atifs_to_tgsi.c',
+ 'state_tracker/st_atifs_to_tgsi.h',
+ 'state_tracker/st_atom_array.c',
+ 'state_tracker/st_atom_atomicbuf.c',
+ 'state_tracker/st_atom_blend.c',
+ 'state_tracker/st_atom.c',
+ 'state_tracker/st_atom_clip.c',
+ 'state_tracker/st_atom_constbuf.c',
+ 'state_tracker/st_atom_constbuf.h',
+ 'state_tracker/st_atom_depth.c',
+ 'state_tracker/st_atom_framebuffer.c',
+ 'state_tracker/st_atom.h',
+ 'state_tracker/st_atom_list.h',
+ 'state_tracker/st_atom_image.c',
+ 'state_tracker/st_atom_msaa.c',
+ 'state_tracker/st_atom_pixeltransfer.c',
+ 'state_tracker/st_atom_rasterizer.c',
+ 'state_tracker/st_atom_sampler.c',
+ 'state_tracker/st_atom_scissor.c',
+ 'state_tracker/st_atom_shader.c',
+ 'state_tracker/st_atom_shader.h',
+ 'state_tracker/st_atom_stipple.c',
+ 'state_tracker/st_atom_storagebuf.c',
+ 'state_tracker/st_atom_tess.c',
+ 'state_tracker/st_atom_texture.c',
+ 'state_tracker/st_atom_viewport.c',
+ 'state_tracker/st_cb_bitmap.c',
+ 'state_tracker/st_cb_bitmap.h',
+ 'state_tracker/st_cb_bitmap_shader.c',
+ 'state_tracker/st_cb_blit.c',
+ 'state_tracker/st_cb_blit.h',
+ 'state_tracker/st_cb_bufferobjects.c',
+ 'state_tracker/st_cb_bufferobjects.h',
+ 'state_tracker/st_cb_clear.c',
+ 'state_tracker/st_cb_clear.h',
+ 'state_tracker/st_cb_compute.c',
+ 'state_tracker/st_cb_compute.h',
+ 'state_tracker/st_cb_condrender.c',
+ 'state_tracker/st_cb_condrender.h',
+ 'state_tracker/st_cb_copyimage.c',
+ 'state_tracker/st_cb_copyimage.h',
+ 'state_tracker/st_cb_drawpixels.c',
+ 'state_tracker/st_cb_drawpixels.h',
+ 'state_tracker/st_cb_drawpixels_shader.c',
+ 'state_tracker/st_cb_drawtex.c',
+ 'state_tracker/st_cb_drawtex.h',
+ 'state_tracker/st_cb_eglimage.c',
+ 'state_tracker/st_cb_eglimage.h',
+ 'state_tracker/st_cb_fbo.c',
+ 'state_tracker/st_cb_fbo.h',
+ 'state_tracker/st_cb_feedback.c',
+ 'state_tracker/st_cb_feedback.h',
+ 'state_tracker/st_cb_flush.c',
+ 'state_tracker/st_cb_flush.h',
+ 'state_tracker/st_cb_memoryobjects.c',
+ 'state_tracker/st_cb_memoryobjects.h',
+ 'state_tracker/st_cb_msaa.c',
+ 'state_tracker/st_cb_msaa.h',
+ 'state_tracker/st_cb_perfmon.c',
+ 'state_tracker/st_cb_perfmon.h',
+ 'state_tracker/st_cb_program.c',
+ 'state_tracker/st_cb_program.h',
+ 'state_tracker/st_cb_queryobj.c',
+ 'state_tracker/st_cb_queryobj.h',
+ 'state_tracker/st_cb_rasterpos.c',
+ 'state_tracker/st_cb_rasterpos.h',
+ 'state_tracker/st_cb_readpixels.c',
+ 'state_tracker/st_cb_readpixels.h',
+ 'state_tracker/st_cb_strings.c',
+ 'state_tracker/st_cb_strings.h',
+ 'state_tracker/st_cb_syncobj.c',
+ 'state_tracker/st_cb_syncobj.h',
+ 'state_tracker/st_cb_texturebarrier.c',
+ 'state_tracker/st_cb_texturebarrier.h',
+ 'state_tracker/st_cb_texture.c',
+ 'state_tracker/st_cb_texture.h',
+ 'state_tracker/st_cb_viewport.c',
+ 'state_tracker/st_cb_viewport.h',
+ 'state_tracker/st_cb_xformfb.c',
+ 'state_tracker/st_cb_xformfb.h',
+ 'state_tracker/st_context.c',
+ 'state_tracker/st_context.h',
+ 'state_tracker/st_copytex.c',
+ 'state_tracker/st_copytex.h',
+ 'state_tracker/st_debug.c',
+ 'state_tracker/st_debug.h',
+ 'state_tracker/st_draw.c',
+ 'state_tracker/st_draw_feedback.c',
+ 'state_tracker/st_draw.h',
+ 'state_tracker/st_extensions.c',
+ 'state_tracker/st_extensions.h',
+ 'state_tracker/st_format.c',
+ 'state_tracker/st_format.h',
+ 'state_tracker/st_gen_mipmap.c',
+ 'state_tracker/st_gen_mipmap.h',
+ 'state_tracker/st_gl_api.h',
+ 'state_tracker/st_glsl_to_nir.cpp',
+ 'state_tracker/st_glsl_to_tgsi.cpp',
+ 'state_tracker/st_glsl_to_tgsi.h',
+ 'state_tracker/st_glsl_to_tgsi_private.cpp',
+ 'state_tracker/st_glsl_to_tgsi_private.h',
+ 'state_tracker/st_glsl_to_tgsi_temprename.cpp',
+ 'state_tracker/st_glsl_to_tgsi_temprename.h',
+ 'state_tracker/st_glsl_types.cpp',
+ 'state_tracker/st_glsl_types.h',
+ 'state_tracker/st_manager.c',
+ 'state_tracker/st_manager.h',
+ 'state_tracker/st_mesa_to_tgsi.c',
+ 'state_tracker/st_mesa_to_tgsi.h',
+ 'state_tracker/st_nir.h',
+ 'state_tracker/st_nir_lower_builtin.c',
+ 'state_tracker/st_nir_lower_tex_src_plane.c',
+ 'state_tracker/st_pbo.c',
+ 'state_tracker/st_pbo.h',
+ 'state_tracker/st_program.c',
+ 'state_tracker/st_program.h',
+ 'state_tracker/st_sampler_view.c',
+ 'state_tracker/st_sampler_view.h',
+ 'state_tracker/st_scissor.c',
+ 'state_tracker/st_scissor.h',
+ 'state_tracker/st_shader_cache.c',
+ 'state_tracker/st_shader_cache.h',
+ 'state_tracker/st_texture.c',
+ 'state_tracker/st_texture.h',
+ 'state_tracker/st_tgsi_lower_yuv.c',
+ 'state_tracker/st_tgsi_lower_yuv.h',
+ 'state_tracker/st_vdpau.c',
+ 'state_tracker/st_vdpau.h',
+)
+
# TODO: sse41
libmesa_sse41 = []
@@ -577,6 +708,14 @@ libmesa_classic = static_library(
build_by_default : false,
)
-# TODO: gallium
+libmesa_gallium = static_library(
+ 'mesa_gallium',
+ [files_libmesa_common, files_libmesa_gallium],
+ c_args : [c_vis_args, c_msvc_compat_args],
+ cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
+ include_directories : [inc_common, include_directories('main')],
+ link_with : [libglsl, libmesa_sse41],
+ build_by_default : false,
+)
subdir('drivers/dri')
--
2.14.2
More information about the mesa-dev
mailing list