summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meson.build18
-rw-r--r--src/gallium/drivers/radeon/meson.build55
-rw-r--r--src/gallium/drivers/radeonsi/meson.build78
-rw-r--r--src/gallium/meson.build38
-rw-r--r--src/gallium/winsys/amdgpu/drm/meson.build36
-rw-r--r--src/gallium/winsys/radeon/drm/meson.build30
6 files changed, 250 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 4cde8c76908..ebaf2d957fd 100644
--- a/meson.build
+++ b/meson.build
@@ -543,7 +543,15 @@ dep_expat = dependency('expat')
# this only exists on linux so either this is linux and it will be found, or
# its not linux and and wont
dep_m = cc.find_library('m', required : false)
-dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.82', required : with_amd_vk)
+
+dep_libdrm_amdgpu = []
+dep_libdrm_radeon = []
+if with_amd_vk or with_gallium_radeonsi
+ dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.84')
+endif
+if with_gallium_radeonsi # older radeon too
+ dep_libdrm_radeon = dependency('libdrm_radeon', version : '>= 2.4.71')
+endif
llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit']
if with_amd_vk
@@ -566,12 +574,12 @@ if with_llvm
'-DMESA_LLVM_VERSION_PATCH=@0@'.format(_llvm_patch),
]
else
- if with_amd_vk
- error('The following drivers requires LLVM: Radv. One of these is enabled, but LLVM was not found.')
+ if with_amd_vk or with_gallium_radeonsi
+ error('The following drivers requires LLVM: Radv, RadeonSI. One of these is enabled, but LLVM was not found.')
endif
endif
-elif with_amd_vk
- error('The following drivers requires LLVM: Radv. One of these is enabled, but LLVM is disabled.')
+elif with_amd_vk or with_gallium_radeonsi
+ error('The following drivers requires LLVM: Radv, RadeonSI. One of these is enabled, but LLVM is disabled.')
endif
dep_glvnd = []
diff --git a/src/gallium/drivers/radeon/meson.build b/src/gallium/drivers/radeon/meson.build
new file mode 100644
index 00000000000..b4d2832d016
--- /dev/null
+++ b/src/gallium/drivers/radeon/meson.build
@@ -0,0 +1,55 @@
+# Copyright © 2017 Dylan Baker
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_libradeon = files(
+ 'r600_buffer_common.c',
+ 'r600_cs.h',
+ 'r600_gpu_load.c',
+ 'r600_perfcounter.c',
+ 'r600_pipe_common.c',
+ 'r600_pipe_common.h',
+ 'r600_query.c',
+ 'r600_query.h',
+ 'r600_test_dma.c',
+ 'r600_texture.c',
+ 'radeon_uvd.c',
+ 'radeon_uvd.h',
+ 'radeon_vcn_dec.c',
+ 'radeon_vcn_dec.h',
+ 'radeon_vce_40_2_2.c',
+ 'radeon_vce_50.c',
+ 'radeon_vce_52.c',
+ 'radeon_vce.c',
+ 'radeon_vce.h',
+ 'radeon_video.c',
+ 'radeon_video.h',
+ 'radeon_winsys.h',
+)
+
+libradeon = static_library(
+ 'radeon',
+ files_libradeon,
+ c_args : ['-Wstrict-overflow=0', c_vis_args],
+ dependencies : [dep_llvm, dep_clock],
+ include_directories : [
+ inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_gallium_drivers,
+ ],
+ build_by_default : false,
+)
diff --git a/src/gallium/drivers/radeonsi/meson.build b/src/gallium/drivers/radeonsi/meson.build
new file mode 100644
index 00000000000..08e855d75b5
--- /dev/null
+++ b/src/gallium/drivers/radeonsi/meson.build
@@ -0,0 +1,78 @@
+# Copyright © 2017 Dylan Baker
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_libradeonsi = files(
+ 'cik_sdma.c',
+ 'driinfo_radeonsi.h',
+ 'si_blit.c',
+ 'si_compute.c',
+ 'si_compute.h',
+ 'si_cp_dma.c',
+ 'si_debug.c',
+ 'si_descriptors.c',
+ 'si_dma.c',
+ 'si_hw_context.c',
+ 'si_pipe.c',
+ 'si_pipe.h',
+ 'si_pm4.c',
+ 'si_pm4.h',
+ 'si_perfcounter.c',
+ 'si_public.h',
+ 'si_shader.c',
+ 'si_shader.h',
+ 'si_shader_internal.h',
+ 'si_shader_nir.c',
+ 'si_shader_tgsi_alu.c',
+ 'si_shader_tgsi_mem.c',
+ 'si_shader_tgsi_setup.c',
+ 'si_state.c',
+ 'si_state_binning.c',
+ 'si_state_draw.c',
+ 'si_state_msaa.c',
+ 'si_state_shaders.c',
+ 'si_state_streamout.c',
+ 'si_state_viewport.c',
+ 'si_state.h',
+ 'si_uvd.c',
+)
+
+si_driinfo_h = custom_target(
+ 'si_driinfo.h',
+ input : files(
+ '../../../util/merge_driinfo.py',
+ '../../auxiliary/pipe-loader/driinfo_gallium.h', 'driinfo_radeonsi.h'
+ ),
+ output : 'si_driinfo.h',
+ command : [prog_python2, '@INPUT@'],
+ capture : true,
+)
+
+libradeonsi = static_library(
+ 'radeonsi',
+ [files_libradeonsi, si_driinfo_h, nir_opcodes_h],
+ include_directories : [
+ inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common,
+ inc_gallium_drivers,
+ ],
+ c_args : [c_vis_args],
+ cpp_args : [cpp_vis_args],
+ dependencies : dep_llvm,
+ build_by_default : false,
+)
diff --git a/src/gallium/meson.build b/src/gallium/meson.build
index 47dbcd84414..0a808d3cfda 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/meson.build
@@ -19,6 +19,7 @@
# SOFTWARE.
inc_gallium = include_directories('include')
+inc_gallium_drivers = include_directories('drivers')
inc_gallium_winsys = include_directories('winsys')
subdir('auxiliary')
@@ -27,4 +28,41 @@ subdir('drivers/ddebug')
subdir('drivers/noop')
subdir('drivers/trace')
subdir('drivers/rbug')
+subdir('drivers/radeon')
+subdir('drivers/radeonsi')
+subdir('winsys/radeon/drm')
+subdir('winsys/amdgpu/drm')
subdir('state_trackers/dri')
+# TODO: freedreno
+# TODO: i915
+# TODO: nouveau
+# TODO: SVGA
+# TODO: r300
+# TODO: r600
+# TODO: etnaviv
+# TODO: IMX
+# TODO: PL111
+# TODO: softpipe
+# TODO: llvmpipe
+# TODO: SWR
+# TODO: vc4
+# TODO: virgl
+# TODO: winsys/sw/null
+# TODO: winsys/sw/xlib
+# TODO: winsys/sw/dri
+# TODO: winsys/sw/kms-dri
+# TODO: winsys/sw/wrapper
+# TODO: clover
+if with_dri
+ #subdir('targets/dri')
+endif
+# TODO: dricommon
+# TODO: xlib-glx
+# TODO: OMX
+# TODO: osmesa
+# TODO: VA
+# TODO: vdpau
+# TODO: xa
+# TODO: xvmc
+# TODO: nine
+# TODO: tests
diff --git a/src/gallium/winsys/amdgpu/drm/meson.build b/src/gallium/winsys/amdgpu/drm/meson.build
new file mode 100644
index 00000000000..a81750e842a
--- /dev/null
+++ b/src/gallium/winsys/amdgpu/drm/meson.build
@@ -0,0 +1,36 @@
+# Copyright © 2017 Dylan Baker
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+libamdgpuwinsys = static_library(
+ 'amdgpuwinsys',
+ files(
+ 'amdgpu_bo.c', 'amdgpu_bo.h', 'amdgpu_cs.c', 'amdgpu_cs.h',
+ 'amdgpu_public.h', 'amdgpu_surface.c', 'amdgpu_winsys.c',
+ 'amdgpu_winsys.h',
+ ),
+ include_directories : [
+ inc_amd, inc_gallium, inc_gallium_aux, inc_include, inc_src,
+ ],
+ c_args : [c_vis_args],
+ cpp_args : [cpp_vis_args],
+ link_with : libamdgpu_addrlib,
+ dependencies : dep_libdrm_amdgpu,
+ build_by_default : false,
+)
diff --git a/src/gallium/winsys/radeon/drm/meson.build b/src/gallium/winsys/radeon/drm/meson.build
new file mode 100644
index 00000000000..8a3f8021157
--- /dev/null
+++ b/src/gallium/winsys/radeon/drm/meson.build
@@ -0,0 +1,30 @@
+# Copyright © 2017 Dylan Baker
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+libradeonwinsys = static_library(
+ 'radeonwinsys',
+ files('radeon_drm_bo.c', 'radeon_drm_bo.h', 'radeon_drm_cs.c',
+ 'radeon_drm_cs.h', 'radeon_drm_public.h', 'radeon_drm_surface.c',
+ 'radeon_drm_winsys.c', 'radeon_drm_winsys.h'),
+ include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux],
+ c_args : [c_vis_args],
+ dependencies : [dep_libdrm_radeon],
+ build_by_default : false,
+)