mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
render/vulkan: add Vulkan allocator
This commit is contained in:
parent
f52482d23a
commit
80d870ae52
6 changed files with 543 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
allocators = get_option('allocators')
|
||||
if 'auto' in allocators and get_option('auto_features').enabled()
|
||||
allocators = ['gbm']
|
||||
allocators = ['gbm', 'vulkan']
|
||||
elif 'auto' in allocators and get_option('auto_features').disabled()
|
||||
allocators = []
|
||||
endif
|
||||
|
|
@ -23,3 +23,13 @@ if gbm.found()
|
|||
has = cc.has_function('gbm_bo_get_fd_for_plane', dependencies: [gbm])
|
||||
internal_config.set10('HAVE_GBM_BO_GET_FD_FOR_PLANE', has)
|
||||
endif
|
||||
|
||||
vulkan = disabler()
|
||||
if 'vulkan' in allocators or 'auto' in allocators
|
||||
vulkan = dependency('vulkan', required: 'vulkan' in allocators)
|
||||
endif
|
||||
if vulkan.found()
|
||||
wlr_files += files('vulkan.c')
|
||||
wlr_deps += vulkan
|
||||
features += { 'vulkan-allocator': true }
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue