mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
meson: Add support for the vc4 driver.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
parent
2f4705afde
commit
1ae8018a6a
9 changed files with 234 additions and 4 deletions
|
|
@ -94,12 +94,14 @@ with_gallium = false
|
||||||
with_gallium_radeonsi = false
|
with_gallium_radeonsi = false
|
||||||
with_gallium_nouveau = false
|
with_gallium_nouveau = false
|
||||||
with_gallium_softpipe = false
|
with_gallium_softpipe = false
|
||||||
|
with_gallium_vc4 = false
|
||||||
_drivers = get_option('gallium-drivers')
|
_drivers = get_option('gallium-drivers')
|
||||||
if _drivers != ''
|
if _drivers != ''
|
||||||
_split = _drivers.split(',')
|
_split = _drivers.split(',')
|
||||||
with_gallium_radeonsi = _split.contains('radeonsi')
|
with_gallium_radeonsi = _split.contains('radeonsi')
|
||||||
with_gallium_nouveau = _split.contains('nouveau')
|
with_gallium_nouveau = _split.contains('nouveau')
|
||||||
with_gallium_softpipe = _split.contains('swrast')
|
with_gallium_softpipe = _split.contains('swrast')
|
||||||
|
with_gallium_vc4 = _split.contains('vc4')
|
||||||
with_gallium = true
|
with_gallium = true
|
||||||
with_dri = true
|
with_dri = true
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ option(
|
||||||
option(
|
option(
|
||||||
'gallium-drivers',
|
'gallium-drivers',
|
||||||
type : 'string',
|
type : 'string',
|
||||||
value : 'radeonsi,nouveau,swrast',
|
value : 'radeonsi,nouveau,swrast,vc4',
|
||||||
description : 'comma separated list of gallium drivers to build.'
|
description : 'comma separated list of gallium drivers to build.'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
|
|
||||||
59
src/broadcom/cle/meson.build
Normal file
59
src/broadcom/cle/meson.build
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
# Copyright © 2017 Broadcom
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
v3d_versions = [
|
||||||
|
21,
|
||||||
|
33
|
||||||
|
]
|
||||||
|
|
||||||
|
v3d_xml_files = []
|
||||||
|
foreach v: v3d_versions
|
||||||
|
v3d_xml_files += 'v3d_packet_v@0@.xml'.format(v)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
v3d_xml_h = custom_target(
|
||||||
|
'v3d_xml.h',
|
||||||
|
input : ['../../intel/genxml/gen_zipped_file.py', v3d_xml_files],
|
||||||
|
output : 'v3d_xml.h',
|
||||||
|
command : [prog_python2, '@INPUT@'],
|
||||||
|
capture : true,
|
||||||
|
)
|
||||||
|
|
||||||
|
v3d_xml_pack = []
|
||||||
|
foreach f : v3d_xml_files
|
||||||
|
_name = '@0@_pack.h'.format(f.split('.')[0])
|
||||||
|
_xml = custom_target(
|
||||||
|
_name,
|
||||||
|
input : ['gen_pack_header.py', f],
|
||||||
|
output : _name,
|
||||||
|
command : [prog_python2, '@INPUT@'],
|
||||||
|
capture : true,
|
||||||
|
)
|
||||||
|
v3d_xml_pack += _xml
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
libbroadcom_cle = static_library(
|
||||||
|
['broadcom_cle', v3d_xml_h],
|
||||||
|
'v3d_decoder.c',
|
||||||
|
include_directories : [inc_common, inc_broadcom],
|
||||||
|
c_args : [c_vis_args, no_override_init_args],
|
||||||
|
dependencies : [dep_libdrm, dep_valgrind],
|
||||||
|
build_by_default : false,
|
||||||
|
)
|
||||||
23
src/broadcom/meson.build
Normal file
23
src/broadcom/meson.build
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Copyright © 2017 Broadcom
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
inc_broadcom = include_directories('.', 'cle')
|
||||||
|
|
||||||
|
subdir('cle')
|
||||||
101
src/gallium/drivers/vc4/meson.build
Normal file
101
src/gallium/drivers/vc4/meson.build
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
# Copyright © 2017 Broadcom
|
||||||
|
#
|
||||||
|
# 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_libvc4 = files(
|
||||||
|
'kernel/vc4_drv.h',
|
||||||
|
'kernel/vc4_gem.c',
|
||||||
|
'kernel/vc4_packet.h',
|
||||||
|
'kernel/vc4_render_cl.c',
|
||||||
|
'kernel/vc4_validate.c',
|
||||||
|
'kernel/vc4_validate_shaders.c',
|
||||||
|
'vc4_blit.c',
|
||||||
|
'vc4_bufmgr.c',
|
||||||
|
'vc4_bufmgr.h',
|
||||||
|
'vc4_cl.c',
|
||||||
|
'vc4_cl_dump.c',
|
||||||
|
'vc4_cl_dump.h',
|
||||||
|
'vc4_cl.h',
|
||||||
|
'vc4_context.c',
|
||||||
|
'vc4_context.h',
|
||||||
|
'vc4_draw.c',
|
||||||
|
'vc4_emit.c',
|
||||||
|
'vc4_fence.c',
|
||||||
|
'vc4_formats.c',
|
||||||
|
'vc4_job.c',
|
||||||
|
'vc4_nir_lower_blend.c',
|
||||||
|
'vc4_nir_lower_io.c',
|
||||||
|
'vc4_nir_lower_txf_ms.c',
|
||||||
|
'vc4_opt_algebraic.c',
|
||||||
|
'vc4_opt_constant_folding.c',
|
||||||
|
'vc4_opt_copy_propagation.c',
|
||||||
|
'vc4_opt_dead_code.c',
|
||||||
|
'vc4_opt_peephole_sf.c',
|
||||||
|
'vc4_opt_small_immediates.c',
|
||||||
|
'vc4_opt_vpm.c',
|
||||||
|
'vc4_opt_coalesce_ff_writes.c',
|
||||||
|
'vc4_program.c',
|
||||||
|
'vc4_qir.c',
|
||||||
|
'vc4_qir_emit_uniform_stream_resets.c',
|
||||||
|
'vc4_qir_live_variables.c',
|
||||||
|
'vc4_qir_lower_uniforms.c',
|
||||||
|
'vc4_qir_schedule.c',
|
||||||
|
'vc4_qir_validate.c',
|
||||||
|
'vc4_qir.h',
|
||||||
|
'vc4_qpu.c',
|
||||||
|
'vc4_qpu_defines.h',
|
||||||
|
'vc4_qpu_disasm.c',
|
||||||
|
'vc4_qpu_emit.c',
|
||||||
|
'vc4_qpu.h',
|
||||||
|
'vc4_qpu_schedule.c',
|
||||||
|
'vc4_qpu_validate.c',
|
||||||
|
'vc4_query.c',
|
||||||
|
'vc4_register_allocate.c',
|
||||||
|
'vc4_reorder_uniforms.c',
|
||||||
|
'vc4_resource.c',
|
||||||
|
'vc4_resource.h',
|
||||||
|
'vc4_screen.c',
|
||||||
|
'vc4_screen.h',
|
||||||
|
'vc4_simulator.c',
|
||||||
|
'vc4_simulator_validate.h',
|
||||||
|
'vc4_state.c',
|
||||||
|
'vc4_tiling.c',
|
||||||
|
'vc4_tiling_lt.c',
|
||||||
|
'vc4_tiling.h',
|
||||||
|
'vc4_uniforms.c',
|
||||||
|
)
|
||||||
|
|
||||||
|
simpenrose_c_args = []
|
||||||
|
dep_simpenrose = dependency('simpenrose', required : false)
|
||||||
|
if dep_simpenrose.found()
|
||||||
|
simpenrose_c_args = '-DUSE_VC4_SIMULATOR'
|
||||||
|
endif
|
||||||
|
|
||||||
|
libvc4 = static_library(
|
||||||
|
'vc4',
|
||||||
|
[files_libvc4, v3d_xml_pack, nir_opcodes_h, nir_builder_opcodes_h],
|
||||||
|
include_directories : [
|
||||||
|
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom,
|
||||||
|
inc_gallium_drivers, inc_drm_uapi,
|
||||||
|
],
|
||||||
|
c_args : [c_vis_args, simpenrose_c_args],
|
||||||
|
cpp_args : [cpp_vis_args],
|
||||||
|
dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind],
|
||||||
|
build_by_default : false,
|
||||||
|
)
|
||||||
|
|
@ -32,6 +32,9 @@ subdir('drivers/radeon')
|
||||||
subdir('drivers/radeonsi')
|
subdir('drivers/radeonsi')
|
||||||
subdir('drivers/nouveau')
|
subdir('drivers/nouveau')
|
||||||
subdir('drivers/softpipe')
|
subdir('drivers/softpipe')
|
||||||
|
if with_gallium_vc4
|
||||||
|
subdir('drivers/vc4')
|
||||||
|
endif
|
||||||
subdir('drivers/llvmpipe')
|
subdir('drivers/llvmpipe')
|
||||||
subdir('winsys/sw/null')
|
subdir('winsys/sw/null')
|
||||||
subdir('winsys/sw/dri')
|
subdir('winsys/sw/dri')
|
||||||
|
|
@ -40,6 +43,9 @@ subdir('winsys/sw/wrapper')
|
||||||
subdir('winsys/radeon/drm')
|
subdir('winsys/radeon/drm')
|
||||||
subdir('winsys/amdgpu/drm')
|
subdir('winsys/amdgpu/drm')
|
||||||
subdir('winsys/nouveau/drm')
|
subdir('winsys/nouveau/drm')
|
||||||
|
if with_gallium_vc4
|
||||||
|
subdir('winsys/vc4/drm')
|
||||||
|
endif
|
||||||
subdir('state_trackers/dri')
|
subdir('state_trackers/dri')
|
||||||
# TODO: freedreno
|
# TODO: freedreno
|
||||||
# TODO: i915
|
# TODO: i915
|
||||||
|
|
@ -50,7 +56,6 @@ subdir('state_trackers/dri')
|
||||||
# TODO: IMX
|
# TODO: IMX
|
||||||
# TODO: PL111
|
# TODO: PL111
|
||||||
# TODO: SWR
|
# TODO: SWR
|
||||||
# TODO: vc4
|
|
||||||
# TODO: virgl
|
# TODO: virgl
|
||||||
# TODO: winsys/sw/xlib
|
# TODO: winsys/sw/xlib
|
||||||
# TODO: clover
|
# TODO: clover
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ endif
|
||||||
if with_gallium_radeonsi
|
if with_gallium_radeonsi
|
||||||
gallium_dri_c_args += '-DGALLIUM_RADEONSI'
|
gallium_dri_c_args += '-DGALLIUM_RADEONSI'
|
||||||
gallium_dri_link_with += [
|
gallium_dri_link_with += [
|
||||||
libradeonsi, libnir, libradeonwinsys, libamdgpuwinsys, libradeon,
|
libradeonsi, libradeonwinsys, libamdgpuwinsys, libradeon,
|
||||||
libamd_common,
|
libamd_common,
|
||||||
]
|
]
|
||||||
gallium_dri_drivers += 'radeonsi_dri.so'
|
gallium_dri_drivers += 'radeonsi_dri.so'
|
||||||
|
|
@ -76,6 +76,15 @@ if with_gallium_softpipe
|
||||||
gallium_dri_link_with += libllvmpipe
|
gallium_dri_link_with += libllvmpipe
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
if with_gallium_vc4
|
||||||
|
gallium_dri_c_args += '-DGALLIUM_VC4'
|
||||||
|
gallium_dri_link_with += [libvc4, libvc4winsys, libbroadcom_cle]
|
||||||
|
gallium_dri_drivers += 'vc4_dri.so'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if with_gallium_vc4 or with_gallium_radeonsi
|
||||||
|
gallium_dri_link_with += libnir
|
||||||
|
endif
|
||||||
|
|
||||||
libgallium_dri = shared_library(
|
libgallium_dri = shared_library(
|
||||||
'gallium_dri',
|
'gallium_dri',
|
||||||
|
|
|
||||||
29
src/gallium/winsys/vc4/drm/meson.build
Normal file
29
src/gallium/winsys/vc4/drm/meson.build
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Copyright © 2017 Broadcom
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
libvc4winsys = static_library(
|
||||||
|
'vc4winsys',
|
||||||
|
files('vc4_drm_winsys.c'),
|
||||||
|
include_directories : [
|
||||||
|
inc_src, inc_include,
|
||||||
|
inc_gallium, inc_gallium_aux, inc_gallium_drivers,
|
||||||
|
],
|
||||||
|
c_args : [c_vis_args],
|
||||||
|
)
|
||||||
|
|
@ -49,8 +49,10 @@ subdir('compiler')
|
||||||
subdir('egl/wayland/wayland-drm')
|
subdir('egl/wayland/wayland-drm')
|
||||||
subdir('vulkan')
|
subdir('vulkan')
|
||||||
subdir('amd')
|
subdir('amd')
|
||||||
|
if with_gallium_vc4
|
||||||
|
subdir('broadcom')
|
||||||
|
endif
|
||||||
subdir('intel')
|
subdir('intel')
|
||||||
# TODO: vc4
|
|
||||||
subdir('mesa')
|
subdir('mesa')
|
||||||
subdir('loader')
|
subdir('loader')
|
||||||
subdir('glx')
|
subdir('glx')
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue