Skip to content

vulkan: allow building venus without libcompiler

Gurchetan Singh requested to merge gurchetansingh/mesa:vk-no-nir-android into main

This MR allows for building the Mesa Vulkan runtime without libcompiler/nir dependencies which are redundant for API virtualization/remote Vulkan drivers like Venus or gfxstream [1].

The current delta between the LITE runtime (linked by Venus) and the FULL runtime (linked by others) with this MR is:

vk_meta.c
vk_meta_blit_resolve.c
vk_meta_draw_rects.c
vk_meta_clear.c
vk_nir.c
vk_nir_convert_ycbcr.c
vk_pipeline.c
vk_pipeline_cache.c
vk_shader.c
vk_shader_module.c
vk_texcompress_etc2.c

and vk_instance.c separately compiled with VK_LITE_RUNTIME_INSTANCE variances.

Metrics for x86_64 surfaceless release build Venus driver on 12th Gen Intel(R) Core(TM) i5-1240P are as below:

before after
# files 445 211
icd size 3.096MB 1.451MB
real time 0m21.381s 0m6.790s
user time 3m36.301s 1m8.436s
sys time 0m14.643s 0m5.144s

The compilation time for Venus used in ARCVM on ChromeOS also dramatically decreases, as Android ndk build is much slower and meanwhile requires both 32bit and 64bit ABIs. This has made Venus devs much happier, esp myself(@zzyiwei) xD

This also allows building a relativly ToT-ish version of common Mesa Vulkan inside the Android Soong build system, which is used in AOSP.

[1] https://android-review.googlesource.com/q/topic:%22gfxstream-guest-linux-wsi-support%22

Edited by Yiwei Zhang

Merge request reports