#!/bin/bash # This tool will dump the FIFO commands on both Nouveau and the blob # For the blob, it needs libnvdump installed # For Nouveau, it needs libdrm with the patch at http://www.mail-archive.com/nouveau@lists.freedesktop.org/msg05406.html applied # # -n will cause commands to not be submitted to the GPU (Nouveau only for now) if glxinfo 2>/dev/null|grep -q 'OpenGL vendor string: NVIDIA Corporation'; then export LD_PRELOAD=libnvdump.so fi if test "$1" == "-n"; then # Nouveau-only for now export NOUVEAU_NO_SUBMIT=1 shift fi file="$1" shift export NOUVEAU_DUMP="$file" exec "$@"