mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
render/allocator: add DMA-BUF heap allocator
This commit is contained in:
parent
ab118042ea
commit
aa6d72f904
5 changed files with 156 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
allocators = get_option('allocators')
|
||||
if 'auto' in allocators and get_option('auto_features').enabled()
|
||||
allocators = ['gbm']
|
||||
allocators = ['gbm', 'dma-heap']
|
||||
elif 'auto' in allocators and get_option('auto_features').disabled()
|
||||
allocators = []
|
||||
endif
|
||||
|
|
@ -23,3 +23,12 @@ 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
|
||||
|
||||
has_dma_heap_header = false
|
||||
if 'dma-heap' in allocators or 'auto' in allocators
|
||||
has_dma_heap_header = cc.check_header('linux/dma-heap.h', required: 'dma-heap' in allocators)
|
||||
endif
|
||||
if has_dma_heap_header
|
||||
wlr_files += files('dma_heap.c')
|
||||
features += { 'dma-heap-allocator': true }
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue