mirror of
https://github.com/tsukumijima/libmali-rockchip.git
synced 2026-01-24 00:10:50 +01:00
meson: Support vulkan
Tested with an internal version of DDK for vulkan, vulkaninfo works. Change-Id: I5875165e3c93b53c77aaeef09fbd673306bae14d Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
parent
ff98f49e36
commit
9bfa06c27d
2 changed files with 25 additions and 3 deletions
7
data/vulkan/mali.json.in
Normal file
7
data/vulkan/mali.json.in
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"file_format_version" : "1.0.0",
|
||||
"ICD" : {
|
||||
"library_path" : "@LIB@",
|
||||
"api_version" : "1.0.5"
|
||||
}
|
||||
}
|
||||
21
meson.build
21
meson.build
|
|
@ -98,6 +98,7 @@ glesv1_wrappers = {'GLESv1_CM' : '1'}
|
|||
glesv2_wrappers = {'GLESv2' : '2'}
|
||||
wayland_wrappers = {'wayland-egl' : '1'}
|
||||
cl_wrappers = opencl_icd ? {'MaliOpenCL' : '1'} : {'OpenCL' : '1'}
|
||||
vk_wrappers = {'MaliVulkan' : '1'}
|
||||
|
||||
# Source dir : dest dir
|
||||
gbm_headers = {
|
||||
|
|
@ -147,6 +148,7 @@ map = {
|
|||
'wayland-egl' : ['wl_egl_window_create', wayland_wrappers,
|
||||
wayland_egl_headers, '18.1.0'],
|
||||
'OpenCL' : ['clCreateContext', cl_wrappers, cl_headers, '1.2'],
|
||||
'vulkan' : ['vk_icdGetInstanceProcAddr', vk_wrappers, {}, mali_version],
|
||||
}
|
||||
|
||||
libhook = []
|
||||
|
|
@ -196,6 +198,7 @@ foreach name, values : map
|
|||
headers = values[2]
|
||||
pkg_version = values[3]
|
||||
is_opencl_icd = opencl_icd and name == 'OpenCL'
|
||||
is_vulkan_icd = name == 'vulkan'
|
||||
|
||||
if not cc.has_function(symbol, dependencies : mali)
|
||||
continue
|
||||
|
|
@ -214,7 +217,7 @@ foreach name, values : map
|
|||
# Install ICD OpenCL vendor config
|
||||
if is_opencl_icd
|
||||
custom_target(
|
||||
'vendor icd',
|
||||
'OpenCL vendor icd',
|
||||
output : 'mali.icd',
|
||||
command : ['echo', 'libMaliOpenCL.so.1'],
|
||||
capture : true,
|
||||
|
|
@ -222,8 +225,20 @@ foreach name, values : map
|
|||
install : true)
|
||||
endif
|
||||
|
||||
# No {headers, pkgconfig} for {ICD OpenGL, vendor packages}
|
||||
if is_opencl_icd or vendor_package
|
||||
# Install ICD Vulkan vendor config
|
||||
if is_vulkan_icd
|
||||
custom_target(
|
||||
'Vulkan vendor icd',
|
||||
input : 'data/vulkan/mali.json.in',
|
||||
output : 'mali.json',
|
||||
command : ['sed', 's/@LIB@/libMaliVulkan.so.1/', '@INPUT@'],
|
||||
capture : true,
|
||||
install_dir : get_option('datadir') / 'vulkan' / 'icd.d',
|
||||
install : true)
|
||||
endif
|
||||
|
||||
# No {headers, pkgconfig} for {ICD, vendor packages}
|
||||
if is_opencl_icd or is_vulkan_icd or vendor_package
|
||||
continue
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue