From 6e12fa67e67bd10a10b54e2175085089c6c3c38b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 24 Mar 2020 17:07:11 -0700 Subject: [PATCH] vkr: prepare meson for venus renderer Signed-off-by: Chia-I Wu Reviewed-by: Ryan Neph Reviewed-by: Gert Wollny --- config.h.meson | 1 + meson.build | 8 ++++++++ meson_options.txt | 7 +++++++ src/meson.build | 8 ++++++++ 4 files changed, 24 insertions(+) diff --git a/config.h.meson b/config.h.meson index 25eebb0..def3150 100644 --- a/config.h.meson +++ b/config.h.meson @@ -4,6 +4,7 @@ #mesondefine HAVE_EPOXY_EGL_H #mesondefine HAVE_EPOXY_GLX_H #mesondefine ENABLE_MINIGBM_ALLOCATION +#mesondefine ENABLE_VENUS #mesondefine HAVE_FUNC_ATTRIBUTE_VISIBILITY #mesondefine HAVE_EVENTFD_H #mesondefine HAVE_DLFCN_H diff --git a/meson.build b/meson.build index 64d8c90..2ccc20a 100644 --- a/meson.build +++ b/meson.build @@ -202,6 +202,12 @@ if with_glx endif endif +with_venus = get_option('venus-experimental') +if with_venus + venus_dep = dependency('vulkan') + conf_data.set('ENABLE_VENUS', 1) +endif + if cc.compiles('void __attribute__((hidden)) func() {}') conf_data.set('HAVE_FUNC_ATTRIBUTE_VISIBILITY', 1) endif @@ -251,6 +257,8 @@ lines += 'glx: ' + (have_glx ? 'yes' : 'no') lines += '' lines += 'minigbm_alloc: ' + (with_minigbm_allocation ? 'yes' : 'no' ) lines += '' +lines += 'venus: ' + (with_venus ? 'yes' : 'no' ) +lines += '' lines += 'tests: ' + (with_tests ? 'yes' : 'no' ) lines += 'fuzzer: ' + (with_fuzzer ? 'yes' : 'no' ) lines += 'tracing: ' + with_tracing diff --git a/meson_options.txt b/meson_options.txt index 0a57b6f..ddcd44b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -38,6 +38,13 @@ option( description : 'enable support for minigbm_allocations' ) +option( + 'venus-experimental', + type : 'boolean', + value : 'false', + description : 'enable support for venus' +) + option( 'tests', type : 'boolean', diff --git a/src/meson.build b/src/meson.build index 257d7dc..df95781 100644 --- a/src/meson.build +++ b/src/meson.build @@ -74,6 +74,9 @@ vrend_winsys_glx_sources = [ 'vrend_winsys_glx.h', ] +venus_sources = [ +] + virgl_depends = [ gallium_dep, epoxy_dep, @@ -102,6 +105,11 @@ if have_glx virgl_depends += [glx_dep] endif +if with_venus + virgl_sources += venus_sources + virgl_depends += [venus_dep] +endif + libvirgl = static_library( 'virgl', virgl_sources,