diff --git a/meson.build b/meson.build index d8f170f0c5f..9eb7f9221ea 100644 --- a/meson.build +++ b/meson.build @@ -56,7 +56,8 @@ with_glx_read_only_text = get_option('glx-read-only-text') with_glx_direct = get_option('glx-direct') with_osmesa = get_option('osmesa') with_swr_arches = get_option('swr-arches') -with_vulkan_overlay_layer = get_option('vulkan-overlay-layer') +with_vulkan_overlay_layer = get_option('vulkan-layers').contains('overlay') +with_vulkan_device_select_layer = get_option('vulkan-layers').contains('device-select') with_tools = get_option('tools') if with_tools.contains('all') with_tools = [ @@ -940,7 +941,7 @@ if _shader_cache != 'disabled' endif endif -if with_shader_cache +if with_shader_cache shader_cache_max_size = get_option('shader-cache-max-size') if shader_cache_max_size != '' pre_args += '-DMESA_GLSL_CACHE_MAX_SIZE="@0@"'.format(shader_cache_max_size) diff --git a/meson_options.txt b/meson_options.txt index 3d37a2b2c15..e0ce124140c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -218,16 +218,11 @@ option( description : 'Location relative to prefix to put vulkan icds on install. Default: $datadir/vulkan/icd.d' ) option( - 'vulkan-overlay-layer', - type : 'boolean', - value : false, - description : 'Whether to build the vulkan overlay layer' -) -option( - 'vulkan-device-select-layer', - type : 'boolean', - value : false, - description : 'Whether to build the vulkan device select layer' + 'vulkan-layers', + type : 'array', + value : [], + choices : ['device-select', 'overlay'], + description : 'List of vulkan layers to build' ) option( 'shared-glapi', diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build index 53e7d6a82b5..3a6806cb5e1 100644 --- a/src/vulkan/meson.build +++ b/src/vulkan/meson.build @@ -69,6 +69,6 @@ subdir('wsi') if with_vulkan_overlay_layer subdir('overlay-layer') endif -if get_option('vulkan-device-select-layer') +if with_vulkan_device_select_layer subdir('device-select-layer') endif