meson: switch vulkan layer to list of choices

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2832>
This commit is contained in:
Lionel Landwerlin 2019-11-11 23:01:23 +02:00 committed by Marge Bot
parent 82b25a1d75
commit 54fe5b0482
3 changed files with 9 additions and 13 deletions

View File

@ -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)

View File

@ -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',

View File

@ -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