nvk: generate Rust bindings from SPH header files

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29034>
This commit is contained in:
Arthur Huillet 2024-05-02 12:07:40 +02:00 committed by Marge Bot
parent f7d4e4ba2b
commit 784407f932
2 changed files with 11 additions and 0 deletions

View File

@ -100,6 +100,15 @@ if with_nouveau_vk
'--out-rs', '@OUTPUT0@']
)
endif
if fs.is_file(f'nvidia/classes/@cl@sph.h')
cl_rs_generated += custom_target(
input : ['struct_parser.py', f'nvidia/classes/@cl@sph.h'],
output : [f'nvh_classes_@cl@_sph.rs'],
command : [prog_python, '@INPUT0@', '--in-h', '@INPUT1@',
'--out-rs', '@OUTPUT0@']
)
endif
endforeach
fs = import('fs')

View File

@ -39,6 +39,8 @@ pub const ${s.name}_${f.name}_${e.name}: u32 = ${e.value};
""")
STRUCTS = [
'SPHV3',
'SPHV4',
'TEXHEADV2',
'TEXHEADV3',
'TEXHEAD_BL',