[Mesa-dev] [PATCH 1/2] meson: build etnaviv driver + winsys
Dylan Baker
dylan at pnwbakers.com
Fri Oct 20 23:04:10 UTC 2017
Build tested only.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
meson.build | 6 ++
meson_options.txt | 2 +-
src/gallium/drivers/etnaviv/meson.build | 96 ++++++++++++++++++++++++++++++
src/gallium/meson.build | 7 ++-
src/gallium/targets/dri/meson.build | 5 ++
src/gallium/winsys/etnaviv/drm/meson.build | 28 +++++++++
6 files changed, 142 insertions(+), 2 deletions(-)
create mode 100644 src/gallium/drivers/etnaviv/meson.build
create mode 100644 src/gallium/winsys/etnaviv/drm/meson.build
diff --git a/meson.build b/meson.build
index 82c4d2ed12c..143ee7febf3 100644
--- a/meson.build
+++ b/meson.build
@@ -97,6 +97,7 @@ with_gallium_nouveau = false
with_gallium_softpipe = false
with_gallium_vc4 = false
with_gallium_vc5 = false
+with_gallium_etnaviv = false
_drivers = get_option('gallium-drivers')
if _drivers != ''
_split = _drivers.split(',')
@@ -106,6 +107,7 @@ if _drivers != ''
with_gallium_softpipe = _split.contains('swrast')
with_gallium_vc4 = _split.contains('vc4')
with_gallium_vc5 = _split.contains('vc5')
+ with_gallium_etnaviv = _split.contains('etnaviv')
with_gallium = true
with_dri = true
endif
@@ -564,6 +566,7 @@ dep_m = cc.find_library('m', required : false)
dep_libdrm_amdgpu = []
dep_libdrm_radeon = []
dep_libdrm_nouveau = []
+dep_libdrm_etnaviv = []
if with_amd_vk or with_gallium_radeonsi
dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.84')
endif
@@ -573,6 +576,9 @@ endif
if with_gallium_nouveau
dep_libdrm_nouveau = dependency('libdrm_nouveau', version : '>= 2.4.66')
endif
+if with_gallium_etnaviv
+ dep_libdrm_etnaviv = dependency('libdrm_etnaviv', version : '>= 2.4.82')
+endif
llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit']
if with_amd_vk
diff --git a/meson_options.txt b/meson_options.txt
index 8fd00d41b45..fbc6fad5a41 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,7 +46,7 @@ option(
option(
'gallium-drivers',
type : 'string',
- value : 'pl111,radeonsi,nouveau,swrast,vc4',
+ value : 'pl111,radeonsi,nouveau,swrast,vc4,etnaviv',
description : 'comma separated list of gallium drivers to build.'
)
option(
diff --git a/src/gallium/drivers/etnaviv/meson.build b/src/gallium/drivers/etnaviv/meson.build
new file mode 100644
index 00000000000..f4ae57b4a75
--- /dev/null
+++ b/src/gallium/drivers/etnaviv/meson.build
@@ -0,0 +1,96 @@
+# 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_etnaviv = files(
+ 'hw/cmdstream.xml.h',
+ 'hw/common.xml.h',
+ 'hw/isa.xml.h',
+ 'hw/state_3d.xml.h',
+ 'hw/state.xml.h',
+ 'etnaviv_asm.c',
+ 'etnaviv_asm.h',
+ 'etnaviv_blend.c',
+ 'etnaviv_blend.h',
+ 'etnaviv_clear_blit.c',
+ 'etnaviv_clear_blit.h',
+ 'etnaviv_compiler.c',
+ 'etnaviv_compiler.h',
+ 'etnaviv_context.c',
+ 'etnaviv_context.h',
+ 'etnaviv_debug.h',
+ 'etnaviv_disasm.c',
+ 'etnaviv_disasm.h',
+ 'etnaviv_emit.c',
+ 'etnaviv_emit.h',
+ 'etnaviv_fence.c',
+ 'etnaviv_fence.h',
+ 'etnaviv_format.c',
+ 'etnaviv_format.h',
+ 'etnaviv_internal.h',
+ 'etnaviv_query.c',
+ 'etnaviv_query.h',
+ 'etnaviv_query_hw.c',
+ 'etnaviv_query_hw.h',
+ 'etnaviv_query_sw.c',
+ 'etnaviv_query_sw.h',
+ 'etnaviv_rasterizer.c',
+ 'etnaviv_rasterizer.h',
+ 'etnaviv_resource.c',
+ 'etnaviv_resource.h',
+ 'etnaviv_rs.c',
+ 'etnaviv_rs.h',
+ 'etnaviv_screen.c',
+ 'etnaviv_screen.h',
+ 'etnaviv_shader.c',
+ 'etnaviv_shader.h',
+ 'etnaviv_state.c',
+ 'etnaviv_state.h',
+ 'etnaviv_surface.c',
+ 'etnaviv_surface.h',
+ 'etnaviv_texture.c',
+ 'etnaviv_texture.h',
+ 'etnaviv_tiling.c',
+ 'etnaviv_tiling.h',
+ 'etnaviv_transfer.c',
+ 'etnaviv_transfer.h',
+ 'etnaviv_translate.h',
+ 'etnaviv_uniforms.c',
+ 'etnaviv_uniforms.h',
+ 'etnaviv_util.h',
+ 'etnaviv_zsa.c',
+ 'etnaviv_zsa.h',
+)
+
+libetnaviv = static_library(
+ 'etnaviv',
+ files_etnaviv,
+ c_args : [c_vis_args],
+ include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux],
+ dependencies : dep_libdrm_etnaviv,
+)
+
+etnaviv_compiler = executable(
+ 'etnaviv_compiler',
+ 'etnaviv_compiler_cmdline.c',
+ include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux],
+ link_with : [libmesa_util, libgallium, libetnaviv],
+ dependencies : dep_libdrm_etnaviv,
+ build_by_default : false,
+)
diff --git a/src/gallium/meson.build b/src/gallium/meson.build
index 97347819d60..cc823ca2e4f 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/meson.build
@@ -38,6 +38,9 @@ endif
if with_gallium_vc5
subdir('drivers/vc5')
endif
+if with_gallium_etnaviv
+ subdir('drivers/etnaviv')
+endif
subdir('drivers/llvmpipe')
subdir('winsys/sw/null')
subdir('winsys/sw/dri')
@@ -55,13 +58,15 @@ endif
if with_gallium_vc5
subdir('winsys/vc5/drm')
endif
+if with_gallium_etnaviv
+ subdir('winsys/etnaviv/drm')
+endif
subdir('state_trackers/dri')
# TODO: freedreno
# TODO: i915
# TODO: SVGA
# TODO: r300
# TODO: r600
-# TODO: etnaviv
# TODO: IMX
# TODO: SWR
# TODO: virgl
diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build
index 541234f8032..9640e8acbab 100644
--- a/src/gallium/targets/dri/meson.build
+++ b/src/gallium/targets/dri/meson.build
@@ -91,6 +91,11 @@ if with_gallium_vc5
gallium_dri_link_with += [libvc5, libvc5winsys, libbroadcom_vc5]
gallium_dri_drivers += 'vc5_dri.so'
endif
+if with_gallium_etnaviv
+ gallium_dri_c_args += '-DGALLIUM_ETNAVIV'
+ gallium_dri_link_with += [libetnaviv, libetnavivdrm]
+ gallium_dri_drivers += 'etnaviv_dri.so'
+endif
if with_gallium_vc4 or with_gallium_vc5
gallium_dri_link_with += libbroadcom_cle
diff --git a/src/gallium/winsys/etnaviv/drm/meson.build b/src/gallium/winsys/etnaviv/drm/meson.build
new file mode 100644
index 00000000000..21bb6f67567
--- /dev/null
+++ b/src/gallium/winsys/etnaviv/drm/meson.build
@@ -0,0 +1,28 @@
+# 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.
+
+libetnavivdrm = static_library(
+ 'etnavivdrm',
+ 'etnaviv_drm_winsys.c',
+ include_directories : [
+ inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_gallium_drivers
+ ],
+ dependencies : dep_libdrm_etnaviv
+)
--
2.14.2
More information about the mesa-dev
mailing list