From 9e2f460998c85976f00f6f5d75a0098155ba196c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 7 Jun 2007 21:11:56 +0000 Subject: reimport from latest checkout --- test/glx_test.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 test/glx_test.sh (limited to 'test/glx_test.sh') diff --git a/test/glx_test.sh b/test/glx_test.sh new file mode 100755 index 0000000..55c3104 --- /dev/null +++ b/test/glx_test.sh @@ -0,0 +1,16 @@ +#!/bin/sh +XGL=no +COMPIZ=no +# auto-start Xgl if direct rendering is available +# and GLX_EXT_texture_from_pixmap is not available in server GLX extensions +# (displayed before client glx extensions by glxinfo) +glxinfo 2>/dev/null | awk 'BEGIN { no_direct = 1; in_client = 0; server_tfp = 0; client_tfp = 0 } /direct rendering: Yes/ { no_direct = 0 } /GLX_EXT_texture_from_pixmap/ { if (in_client) { client_tfp = 1 } else { server_tfp = 1 } } /client glx extensions:/ { in_client = 1 } /GLX extensions/ { exit } END { exit or(no_direct, and(server_tfp, client_tfp)) }' && XGL=yes +# auto-start compiz if direct rendering and GLX_EXT_texture_from_pixmap are available +source /etc/init.d/functions +if [ "$XGL" = "yes" ] || pidof Xgl >/dev/null 2>&1; then + COMPIZ=yes +elif glxinfo 2>/dev/null | awk 'BEGIN { no_direct = 1; no_tfp = 1 } /direct rendering: Yes/ { no_direct = 0 } /GLX_EXT_texture_from_pixmap/ { no_tfp = 0 } END { exit or(no_direct, no_tfp) }'; then + COMPIZ=yes +fi +echo "Xgl auto: $XGL" +echo "Compiz auto: $COMPIZ" -- cgit v1.2.1