summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2017-10-26 15:45:40 -0700
committerDylan Baker <[email protected]>2017-11-28 14:06:38 -0800
commit43b0e5f5cd87b3ca4dc97a6373cbee1f1f129f06 (patch)
tree47ca49cc9047109bcd390480d6ec26dd680dd373 /src
parenta537231b226280bc1e5b7f0f58707cbd2cf29848 (diff)
meson: build virgl driver
Build tested only. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/virgl/meson.build39
-rw-r--r--src/gallium/meson.build7
-rw-r--r--src/gallium/targets/dri/meson.build5
-rw-r--r--src/gallium/winsys/virgl/drm/meson.build27
-rw-r--r--src/gallium/winsys/virgl/vtest/meson.build26
5 files changed, 103 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/meson.build b/src/gallium/drivers/virgl/meson.build
new file mode 100644
index 00000000000..8284f548927
--- /dev/null
+++ b/src/gallium/drivers/virgl/meson.build
@@ -0,0 +1,39 @@
+# Copyright © 2017 Intel Corporation
+
+# 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_libvirgl = files(
+ 'virgl_buffer.c',
+ 'virgl_context.c',
+ 'virgl_encode.c',
+ 'virgl_query.c',
+ 'virgl_resource.c',
+ 'virgl_screen.c',
+ 'virgl_streamout.c',
+ 'virgl_texture.c',
+ 'virgl_tgsi.c',
+)
+
+libvirgl = static_library(
+ 'virgl',
+ files_libvirgl,
+ c_args : c_vis_args,
+ include_directories : inc_common,
+ dependencies : dep_libdrm,
+)
diff --git a/src/gallium/meson.build b/src/gallium/meson.build
index 6fe7f15da03..8e60c7f3288 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/meson.build
@@ -1,4 +1,5 @@
# Copyright © 2017 Dylan Baker
+# Copyright © 2017 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -85,6 +86,11 @@ if with_gallium_svga
subdir('drivers/svga')
subdir('winsys/svga/drm')
endif
+if with_gallium_virgl
+ subdir('drivers/virgl')
+ subdir('winsys/virgl/drm')
+ subdir('winsys/virgl/vtest')
+endif
if with_dri
subdir('state_trackers/dri')
endif
@@ -96,7 +102,6 @@ if with_glx == 'gallium-xlib'
subdir('state_trackers/glx/xlib')
endif
# TODO: SWR
-# TODO: virgl
# TODO: clover
if with_dri
subdir('targets/dri')
diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build
index 79dc046f896..323b337266f 100644
--- a/src/gallium/targets/dri/meson.build
+++ b/src/gallium/targets/dri/meson.build
@@ -127,6 +127,11 @@ if with_gallium_svga
gallium_dri_link_with += [libsvga, libsvgadrm]
gallium_dri_drivers += 'vmwgfx_dri.so'
endif
+if with_gallium_virgl
+ gallium_dri_c_args += '-DGALLIUM_VIRGL'
+ gallium_dri_link_with += [libvirgl, libvirgldrm, libvirglvtest]
+ gallium_dri_drivers += 'virtio_gpu_dri.so'
+endif
if with_gallium_radeonsi or with_gallium_r300 or with_gallium_r600
gallium_dri_link_with += libradeonwinsys
diff --git a/src/gallium/winsys/virgl/drm/meson.build b/src/gallium/winsys/virgl/drm/meson.build
new file mode 100644
index 00000000000..89626e78637
--- /dev/null
+++ b/src/gallium/winsys/virgl/drm/meson.build
@@ -0,0 +1,27 @@
+# Copyright © 2017 Intel Corporation
+
+# 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.
+
+libvirgldrm = static_library(
+ 'virgldrm',
+ 'virgl_drm_winsys.c',
+ c_args : c_vis_args,
+ include_directories : [inc_common, inc_gallium_drivers],
+ dependencies : dep_libdrm,
+)
diff --git a/src/gallium/winsys/virgl/vtest/meson.build b/src/gallium/winsys/virgl/vtest/meson.build
new file mode 100644
index 00000000000..319bc8e241a
--- /dev/null
+++ b/src/gallium/winsys/virgl/vtest/meson.build
@@ -0,0 +1,26 @@
+# Copyright © 2017 Intel Corporation
+
+# 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.
+
+libvirglvtest = static_library(
+ 'virglvtest',
+ ['virgl_vtest_socket.c', 'virgl_vtest_winsys.c'],
+ c_args : c_vis_args,
+ include_directories : [inc_common, inc_gallium_drivers],
+)