From: Dylan Baker Date: Fri, 29 Sep 2017 04:03:07 +0000 (-0700) Subject: meson: build libmesa_gallium X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af9d276134d9af3b6145f10943eaf7bf1a6226b6;p=mesa.git meson: build libmesa_gallium Signed-off-by: Dylan Baker Reviewed-by: Eric Anholt --- diff --git a/meson.build b/meson.build index ff2ce55e924..0ffa280b7e4 100644 --- a/meson.build +++ b/meson.build @@ -90,12 +90,17 @@ if _drivers != '' with_dri = true endif -dep_libdrm_intel = [] -if with_dri_i915 - dep_libdrm_intel = dependency('libdrm_intel', version : '>= 2.4.75') +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 +if not (with_dri or with_gallium) with_gles1 = false with_gles2 = false with_opengl = false @@ -103,12 +108,14 @@ if not with_dri with_shared_glapi = false endif +dep_libdrm_intel = [] +if with_dri_i915 + dep_libdrm_intel = dependency('libdrm_intel', version : '>= 2.4.75') +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' @@ -207,7 +214,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 @@ -564,8 +571,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 21cf07ea934..c9e95263cd2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -26,6 +26,8 @@ option('dri-drivers', type : 'string', value : 'swrast,i915,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 c96105faae4..d55b03c7187 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 @@ -456,7 +457,6 @@ files_libmesa_classic = files( 'drivers/common/meta_generate_mipmap.c', 'drivers/common/meta.c', 'drivers/common/meta.h', - 'x86/common_x86.c', 'x86/x86_xform.c', 'x86/3dnow.c', 'x86/sse.c', @@ -466,6 +466,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 = [] @@ -576,6 +707,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')