-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_env_debug
More file actions
35 lines (29 loc) · 1.09 KB
/
setup_env_debug
File metadata and controls
35 lines (29 loc) · 1.09 KB
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
34
# NOTE: this MUST be sourced in the current shell to have any effect.
# The problem here is: we cannot determine the path of the script by
# itself, since in the sourced case, $0 is the path to the shell the
# user is running. So the user must specify the path for us. As a
# simplification when no parameter is given, the current working dir
# is used.
DIR="`pwd`"
while [[ "x$1x" != "xx" ]]; do
DIR="$1"
shift
done
# check if this directory seems right: it should contain the glx_hook.so
if [ -r "$DIR"/glx_hook.so ]; then
echo using "$DIR"
export LD_PRELOAD="$DIR/glx_hook.so":"$LD_PRELOAD"
# settings to use
export GH_VERBOSE=5
export GH_VERBOSE_FILE=/tmp/glxhook-%p-%c-%t.log
export GH_FORCE_MIN_GL_VERSION_MAJOR=3
export GH_FORCE_MIN_GL_VERSION_MINOR=2
export GH_FORCE_GL_CONTEXT_PROFILE_COMPAT=2
export GH_FORCE_GL_CONTEXT_FLAGS_DEBUG=1
export GH_GL_DEBUG_OUTPUT=1
export GH_GL_INJECT_DEBUG_OUTPUT=1
else
echo "$DIR" seems not to be the right place
echo 'please use: source $PATH_GLX_HOOK/setup_env $PATH_TO_GLX_HOOK'
echo ' or: cd $PATH_TO_GLX_HOOK && source ./setup_env'
fi