Skip to content

Commit

Permalink
servertest: Allow setting eglxfakerut thread count
Browse files Browse the repository at this point in the history
Some drivers need this.
  • Loading branch information
dcommander committed Feb 20, 2024
1 parent f4557c0 commit d950b03
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions server/servertest.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fi

NODL=
FAKERUTARGS=
THREADSARG=
DEPTH=24
IPV6=1
SCREENS="0 1"
Expand Down Expand Up @@ -66,6 +67,11 @@ while [ $# -gt 0 ]; do
-nomitshm)
XVFBARGS=$XVFBARGS" -extension MIT-SHM"
;;
-n)
THREADSARG="-n $2"
echo "Testing with $2 threads"
shift
;;
-10bpc)
DEPTH=30
FAKERUTARGS=-nostereo
Expand Down Expand Up @@ -145,28 +151,28 @@ for SCREEN in $SCREENS; do
echo "===== VGL Transport, JPEG compression ====="
echo
VGL_CLIENT=127.0.0.1 LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -c jpeg $WRAP $BIN/fakerut $FAKERUTARGS
$BIN/vglrun $NODL -c jpeg $WRAP $BIN/fakerut $FAKERUTARGS $THREADSARG
if [ "$EGLX" = "1" ]; then
echo "===== VGL Transport, JPEG compression (EGL/X11) ====="
echo
VGL_CLIENT=127.0.0.1 LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -c jpeg $WRAP $BIN/eglxfakerut
$BIN/vglrun $NODL -c jpeg $WRAP $BIN/eglxfakerut $THREADSARG
fi
echo "===== VGL Transport, RGB encoding, 2 threads ====="
echo
VGL_CLIENT=127.0.0.1 LD_LIBRARY_PATH=$LIB VGL_READBACK=sync \
$BIN/vglrun $NODL -np 2 -c rgb $WRAP $BIN/fakerut $FAKERUTARGS
$BIN/vglrun $NODL -np 2 -c rgb $WRAP $BIN/fakerut $FAKERUTARGS $THREADSARG
# (we can't test stereo here, because the transport plugin assumes
# quad-buffered, which isn't available with an X proxy.)
echo "===== VGL Transport plugin, JPEG compression ====="
echo
VGL_CLIENT=127.0.0.1 LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -trans test $WRAP $BIN/fakerut -nostereo $FAKERUTARGS
$BIN/vglrun $NODL -trans test $WRAP $BIN/fakerut -nostereo $FAKERUTARGS $THREADSARG
if [ "$EGLX" = "1" ]; then
echo "===== VGL Transport plugin, JPEG compression (EGL/X11) ====="
echo
VGL_CLIENT=127.0.0.1 LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -trans test $WRAP $BIN/eglxfakerut
$BIN/vglrun $NODL -trans test $WRAP $BIN/eglxfakerut $THREADSARG
fi
kill $VGLCLIENTPID
VGLCLIENTPID=-1
Expand All @@ -179,11 +185,11 @@ for SCREEN in $SCREENS; do
echo "===== VGL Transport, JPEG compression ====="
echo
VGL_CLIENT=::1 LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -c jpeg $WRAP $BIN/fakerut $FAKERUTARGS
$BIN/vglrun $NODL -c jpeg $WRAP $BIN/fakerut $FAKERUTARGS $THREADSARG
echo "===== VGL Transport plugin, JPEG compression ====="
echo
VGL_CLIENT=[::1]:0 LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -trans test $WRAP $BIN/fakerut -nostereo $FAKERUTARGS
$BIN/vglrun $NODL -trans test $WRAP $BIN/fakerut -nostereo $FAKERUTARGS $THREADSARG
kill $VGLCLIENTPID
VGLCLIENTPID=-1
fi
Expand All @@ -193,23 +199,23 @@ for SCREEN in $SCREENS; do
echo \*\*\*\*\* Testing X11 Transport, Screen $SCREEN \*\*\*\*\*
echo
LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -c proxy $WRAP $BIN/fakerut $FAKERUTARGS
$BIN/vglrun $NODL -c proxy $WRAP $BIN/fakerut $FAKERUTARGS $THREADSARG
if [ "$EGLX" = "1" ]; then
echo "===== X11 Transport (EGL/X11) ====="
echo
LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -c proxy $WRAP $BIN/eglxfakerut
$BIN/vglrun $NODL -c proxy $WRAP $BIN/eglxfakerut $THREADSARG
fi
if [ $DEPTH = 24 ]; then
echo "===== X11 Transport plugin ====="
echo
LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -trans test2 $WRAP $BIN/fakerut $FAKERUTARGS
$BIN/vglrun $NODL -trans test2 $WRAP $BIN/fakerut $FAKERUTARGS $THREADSARG
if [ "$EGLX" = "1" ]; then
echo "===== X11 Transport plugin (EGL/X11) ====="
echo
LD_LIBRARY_PATH=$LIB \
$BIN/vglrun $NODL -trans test2 $WRAP $BIN/eglxfakerut
$BIN/vglrun $NODL -trans test2 $WRAP $BIN/eglxfakerut $THREADSARG
fi
fi

Expand Down

0 comments on commit d950b03

Please sign in to comment.