nouveau/headers: Add the MMU headers to the Rust crate

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
This commit is contained in:
Faith Ekstrand 2024-04-19 12:20:35 -05:00
parent 3bd8a2568d
commit 51ffb45b5c

View file

@ -25,6 +25,13 @@ nvk_classes = [
'clc7c0',
]
hwref_gens = [
'maxwell/gm107',
'pascal/gp100',
'hopper/gh100',
'turing/tu102',
]
nvk_cl_header_depend_files = [
files('class_parser.py')
]
@ -101,6 +108,17 @@ if with_nouveau_vk
endif
endforeach
fs = import('fs')
foreach family_gen : hwref_gens
family = fs.parent(family_gen)
gen = fs.name(family_gen)
cl_rs_generated += rust.bindgen(
input : ['nvidia/hwref/'+family+'/'+gen+'/dev_mmu.h'],
output : 'nvh_hwref_'+gen+'_mmu.rs',
args : ['--allowlist-var', 'NV_MMU_.*'],
)
endforeach
_nvidia_headers_lib_rs = custom_target(
'lib.rs',
input : ['lib_rs_gen.py'],