summaryrefslogtreecommitdiff
path: root/src/broadcom/vulkan/meson.build
diff options
context:
space:
mode:
authorAlejandro Piñeiro <apinheiro@igalia.com>2019-11-25 16:29:12 +0100
committerMarge Bot <eric+marge@anholt.net>2020-10-13 21:21:24 +0000
commite5034f0d0d48ab541dad5d5e5c439fe82096950a (patch)
tree4c172db7339b83c0b9ea91fd773bcba250e70199 /src/broadcom/vulkan/meson.build
parentbdb1e5aa0ae6410ec829f6213549f951a5f17684 (diff)
v3dv: add v3d vulkan driver skeleton
Initial commit, mostly a import of the minimum from anv/radv to get a skeleton to start to work with. In includes: * meson files * Copy & adapt entrypoints ane extensions scripts from anv (that were later used on radv) This is a firt approach, but is is likely that we can remove/simplify some things. v2: fix copyright character at broadcom/vulkan/meson.build (Eric) v3: no spaces inside arrays (Dylan) v4: add gnu_symbol_visibility (detected by CI on first Merge attemp) Reviewed-by: Eric Anholt <eric@anholt.net> squash! v3dv: add v3d vulkan driver skeleton Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
Diffstat (limited to 'src/broadcom/vulkan/meson.build')
-rw-r--r--src/broadcom/vulkan/meson.build113
1 files changed, 113 insertions, 0 deletions
diff --git a/src/broadcom/vulkan/meson.build b/src/broadcom/vulkan/meson.build
new file mode 100644
index 00000000000..7890377da12
--- /dev/null
+++ b/src/broadcom/vulkan/meson.build
@@ -0,0 +1,113 @@
+# Copyright © 2019 Raspberry Pi
+#
+# 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.
+
+v3dv_entrypoints = custom_target(
+ 'v3dv_entrypoints.[ch]',
+ input : ['v3dv_entrypoints_gen.py', vk_api_xml],
+ output : ['v3dv_entrypoints.h', 'v3dv_entrypoints.c'],
+ command : [
+ prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
+ meson.current_build_dir()
+ ],
+ depend_files : files('v3dv_extensions.py'),
+)
+
+v3dv_extensions_c = custom_target(
+ 'v3dv_extensions.c',
+ input : ['v3dv_extensions_gen.py', vk_api_xml],
+ output : 'v3dv_extensions.c',
+ command : [
+ prog_python, '@INPUT0@', '--xml', '@INPUT1@',
+ '--out-c', '@OUTPUT@',
+ ],
+ depend_files : files('v3dv_extensions.py'),
+)
+
+v3dv_extensions_h = custom_target(
+ 'v3dv_extensions.h',
+ input : ['v3dv_extensions_gen.py', vk_api_xml],
+ output : 'v3dv_extensions.h',
+ command : [
+ prog_python, '@INPUT0@', '--xml', '@INPUT1@',
+ '--out-h', '@OUTPUT@',
+ ],
+ depend_files : files('v3dv_extensions.py'),
+)
+
+libv3dv_files = files(
+ 'v3dv_device.c',
+ 'v3dv_pipeline.c',
+ 'v3dv_private.h',
+ 'v3dv_util.c',
+)
+
+# The vulkan driver only supports version >= 42, which is the version present in
+# Rpi4. We need to explicitly set it as we are reusing pieces from the GL v3d
+# driver.
+v3dv_flags = ['-DV3D_VERSION=42']
+
+v3dv_deps = [
+ dep_libdrm,
+ idep_vulkan_util,
+]
+
+libvulkan_broadcom = shared_library(
+ 'vulkan_broadcom',
+ [libv3dv_files, v3dv_entrypoints, v3dv_extensions_c, v3dv_extensions_h, sha1_h],
+ include_directories : [
+ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_broadcom, inc_compiler, inc_util,
+ ],
+ link_with : [
+ libbroadcom_v3d,
+ ],
+ dependencies : v3dv_deps,
+ c_args : v3dv_flags,
+ link_args : ['-Wl,--build-id=sha1', ld_args_bsymbolic, ld_args_gc_sections],
+ gnu_symbol_visibility : 'hidden',
+ install : true,
+)
+
+if with_symbols_check
+ test(
+ 'v3dv symbols check',
+ symbols_check,
+ args : [
+ '--lib', libvulkan_broadcom,
+ '--symbols-file', vulkan_icd_symbols,
+ symbols_check_args,
+ ],
+ suite : ['broadcom'],
+ )
+endif
+
+broadcom_icd = custom_target(
+ 'broadcom_icd',
+ input : 'v3dv_icd.py',
+ output : 'broadcom_icd.@0@.json'.format(host_machine.cpu()),
+ command : [
+ prog_python, '@INPUT@',
+ '--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
+ '--out', '@OUTPUT@',
+ ],
+ depend_files : files('v3dv_extensions.py'),
+ build_by_default : true,
+ install_dir : with_vulkan_icd_dir,
+ install : true,
+)