forked from gem5-graphics/gem5-graphics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setEnvironment
34 lines (29 loc) · 919 Bytes
/
setEnvironment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
echo Using MESA+GPGPUSIM!
#PLEASE CONFIG
export CUDAHOME= #FIXME
export M5_PATH= #FIXME
export NVIDIA_CUDA_SDK_LOCATION= #FIXME
export LD_LIBRARY_PATH=$PWD/mesa/lib/gallium
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/android_libs
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDAHOME/lib
export GPGPUSIM_MESA_ROOT=$PWD
#export MESA_GPGPUSIM_DEBUG="$1"
export PATH=$PATH:$CUDAHOME/bin
export PATH=$PATH:$PWD/gem5/util/term
export CUDA_INSTALL_PATH=$CUDAHOME
#emulator & mesa flags
export ANDROID_GL_SOFTWARE_RENDERER=1
if [ $ANDROID_GL_SOFTWARE_RENDERER -eq 1 ]
then
echo "Running in OGLES mode"
export LIBGL_DRIVERS_PATH=$PWD/mesa/lib/gallium
export ANDROID_EGL_LIB=$PWD/mesa/lib/libEGL.so
#export ANDROID_GLESv1_LIB=""
export ANDROID_GLESv2_LIB=$PWD/mesa/lib/libGLESv2.so
else
echo "Running in OGL mode"
export LIBGL_DRIVERS_PATH=
export ANDROID_EGL_LIB=
export ANDROID_GLESv2_LIB=
fi