Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 12th, 2013  |  syntax: None  |  size: 1.31 KB  |  views: 131  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. # Readback-display synchronization method
  4. # 0: no sync, 1: D lags behind one frame, 2: fully synced
  5. # export PRIMUS_SYNC=${PRIMUS_SYNC:-0}
  6.  
  7. # Verbosity level
  8. # 0: only errors, 1: warnings (default), 2: profiling
  9. # export PRIMUS_VERBOSE=${PRIMUS_VERBOSE:-1}
  10.  
  11. # Secondary display
  12. # export PRIMUS_DISPLAY=${PRIMUS_DISPLAY:-:8}
  13.  
  14. # "Accelerating" libGL
  15. # $LIB will be interpreted by the dynamic linker
  16. export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/lib/nvidia-experimental-310/libGL.so.1:/usr/lib32/nvidia-experimental-310/libGL.so.1'}
  17.  
  18. # "Displaying" libGL
  19. # export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/lib/$LIB/mesa/libGL.so.1'}
  20.  
  21. # Directory containing primus libGL
  22. PRIMUS_libGL=${PRIMUS_libGL:-/usr/lib/'$LIB'/primus}
  23.  
  24. # On some distributions, e.g. on Gentoo, libnvidia-tls.so is not available
  25. # in default search paths.  Add its path manually after the primus library
  26. case $PRIMUS_libGLa in
  27. /usr/lib*/nvidia-experimental-310|'') # nvidia is used by default
  28. PRIMUS_libGL=${PRIMUS_libGL}:${PRIMUS_libGLa///libGL.so.1}
  29. ;; esac
  30.  
  31. # Mesa drivers need a few symbols to be visible
  32. # export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'libglapi.so.0'}
  33.  
  34. # Need functions from primus libGL to take precedence
  35. export LD_LIBRARY_PATH=${PRIMUS_libGL}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
  36.  
  37. # And go!
  38. exec "$@"