ci/android: Check Vulkan driver using vulkaninfo

Add a step to detect the active Vulkan driver by parsing `vulkaninfo`.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35232>
This commit is contained in:
Valentine Burley 2025-05-28 12:26:06 +02:00 committed by Marge Bot
parent 3029fdde65
commit 3ba9038648
3 changed files with 18 additions and 4 deletions

View file

@ -77,21 +77,28 @@ $ADB push /angle/libGLESv1_CM_angle.so "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"
$ADB push /angle/libGLESv2_angle.so "$ANGLE_DEST_PATH/libGLESv2_angle.so"
$ADB push /android-tools/eglinfo /data
$ADB push /android-tools/vulkaninfo /data
get_gles_runtime_version() {
while [ "$($ADB shell /data/eglinfo | grep 'OpenGL ES profile version':)" = "" ] ; do sleep 1; done
$ADB shell /data/eglinfo | grep 'OpenGL ES profile version'
}
get_vk_runtime_version() {
$ADB shell /data/vulkaninfo | grep driverInfo
}
# Check what GLES implementation is used before loading the new libraries
# Check what GLES & VK implementation is used before loading the new libraries
get_gles_runtime_version
get_vk_runtime_version
# restart Android shell, so that services use the new libraries
$ADB shell stop
$ADB shell start
# Check what GLES implementation is used after loading the new libraries
# Check what GLES & VK implementation is used after loading the new libraries
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
GLES_RUNTIME_VERSION="$(get_gles_runtime_version)"
VK_RUNTIME_VERSION="$(get_vk_runtime_version)"
if [ -n "$ANGLE_TAG" ]; then
# Note: we are injecting the ANGLE libs too, so we need to check if the
@ -102,12 +109,15 @@ if [ -n "$ANGLE_TAG" ]; then
exit 1
fi
else
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; then
echo "Fatal: Android is loading a wrong version of the Mesa3D GLES libs: ${GLES_RUNTIME_VERSION}" 1>&2
exit 1
fi
fi
if ! printf "%s" "$VK_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; then
echo "Fatal: Android is loading a wrong version of the Mesa3D Vulkan libs: ${VK_RUNTIME_VERSION}" 1>&2
exit 1
fi
if [ -n "$USE_ANDROID_CTS" ]; then
# The script sets EXIT_CODE

View file

@ -53,6 +53,10 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o eglinfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/eglinfo-android-x86_64"
chmod +x eglinfo
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o vulkaninfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/vulkaninfo-android-x86_64"
chmod +x vulkaninfo
popd
############### Downloading NDK for native builds for the guest ...

View file

@ -23,7 +23,7 @@ variables:
DEBIAN_BUILD_TAG: "20250515-aarch64"
DEBIAN_TEST_ANDROID_TAG: "20250524-angle-ec"
DEBIAN_TEST_ANDROID_TAG: "20250528-info"
DEBIAN_TEST_GL_TAG: "20250526-piglit-c32"
DEBIAN_TEST_VIDEO_TAG: "20250503-fluster"
DEBIAN_TEST_VK_TAG: "20250527-vkd3d"