#!/bin/bash # iter8 step-B diagnostic: install patched libvulkan_panfrost.so under LD_LIBRARY_PATH # (no system overwrite) and characterize what Zink-on-patched-PanVk-Bifrost does. # # Usage on ohm (as user mfritsche): # bash diagnose_zink_smoke.sh /path/to/built/libvulkan_panfrost.so set -uo pipefail LIB_SRC="${1:?usage: $0 /path/to/built/libvulkan_panfrost.so}" if [[ ! -f "$LIB_SRC" ]]; then echo "FAIL: $LIB_SRC not found"; exit 2 fi STAGE=/home/mfritsche/panvk-patched-libs mkdir -p "$STAGE" cp "$LIB_SRC" "$STAGE/libvulkan_panfrost.so" # Need a matching ICD JSON that points at this lib path, otherwise the loader # uses the system one which points at /usr/lib/libvulkan_panfrost.so. cat > "$STAGE/panfrost_icd_patched.json" <&1 | grep -iE "driverInfo|robust|nullDescriptor" | head -15 RC1=$? echo "(RC1=$RC1, but the real signal is whether VK_EXT_robustness2 + nullDescriptor=true appear above.)" echo echo "===== STEP 2: eglinfo with Zink — does Zink load against the patched lib? =====" env "${COMMON_ENV[@]}" MESA_LOADER_DRIVER_OVERRIDE=zink eglinfo 2>&1 | grep -iE "renderer|version|zink|llvmpipe|nullDescriptor|Mali|error" | head -20 RC2=$? echo "(if 'renderer' line mentions Mali-G52 / Zink => SUCCESS, if 'llvmpipe' => still failing)" echo echo "===== STEP 3: es2_info — does GLES2 context create against Zink-on-PanVk? =====" env "${COMMON_ENV[@]}" MESA_LOADER_DRIVER_OVERRIDE=zink es2_info 2>&1 | head -30 RC3=$? echo echo "===== STEP 4: dmesg for GPU faults from these runs =====" dmesg 2>/dev/null | tail -30 | grep -iE "panfrost|mali|gpu fault|page fault" | tail -10 echo echo "===== STEP 5: minimal Zink-triggered shader workload =====" # Run vkcube with MESA_VK_VERSION_OVERRIDE to see if Vulkan side still works env "${COMMON_ENV[@]}" timeout 5 vkcube --c 60 --wsi wayland 2>&1 | head -5 echo "(vkcube confirms the patched lib still works for native Vulkan, no regression on iter7 baseline.)" echo echo "===== DONE ====="