nvk: clean up direct u_gralloc dep

The u_gralloc fallback backend exists as a best effort attempt and it
does log in the Android logcat so can be easily identified if not WAI.
So far there's no Vulkan impl in mesa could reasonably work with the
fallback backend alone, so if that becomes a real pain, we can exclude
it from inside vk_android_get_ugralloc runtime helper.

Also drop redundant ANB header.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36386>
This commit is contained in:
Yiwei Zhang 2025-07-18 21:20:05 +00:00 committed by Marge Bot
parent 0d5a2f92ca
commit 00d0f2bec5
2 changed files with 2 additions and 8 deletions

View file

@ -132,7 +132,7 @@ nvk_deps = [
nvk_flags = []
if with_platform_android
nvk_deps += [dep_android, idep_u_gralloc]
nvk_deps += [dep_android]
nvk_flags += '-DVK_USE_PLATFORM_ANDROID_KHR'
nvk_files += files('nvk_android.c')
endif

View file

@ -22,11 +22,6 @@
#include "util/disk_cache.h"
#include "util/mesa-sha1.h"
#if DETECT_OS_ANDROID
#include <vulkan/vk_android_native_buffer.h>
#include "util/u_gralloc/u_gralloc.h"
#endif
#include "vk_android.h"
#include "vk_device.h"
#include "vk_drm_syncobj.h"
@ -286,8 +281,7 @@ nvk_get_device_extensions(const struct nvk_instance *instance,
.EXT_ycbcr_image_arrays = true,
.EXT_zero_initialize_device_memory = true,
#if DETECT_OS_ANDROID
.ANDROID_native_buffer = vk_android_get_ugralloc() &&
u_gralloc_get_type(vk_android_get_ugralloc()) != U_GRALLOC_TYPE_FALLBACK,
.ANDROID_native_buffer = vk_android_get_ugralloc() != NULL,
#endif
.GOOGLE_decorate_string = true,
.GOOGLE_hlsl_functionality1 = true,