aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-25 19:54:31 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-25 19:54:31 +0000
commit6f6a6d0e4d64c69e56082d82c12c0cee7155f43c (patch)
treec90893d0418f6d12dfc54660d26a846b8e4d02a8 /code/unix
parentfbe63afdd0785b5a5813453800a581c166112328 (diff)
downloadioquake3-aero-6f6a6d0e4d64c69e56082d82c12c0cee7155f43c.tar.gz
ioquake3-aero-6f6a6d0e4d64c69e56082d82c12c0cee7155f43c.zip
* Mostly selfish patch to work around what I believe is probably an nvidia and/or agpgart bug
git-svn-id: svn://svn.icculus.org/quake3/trunk@103 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix')
-rw-r--r--code/unix/linux_qgl.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/code/unix/linux_qgl.c b/code/unix/linux_qgl.c
index b38edbc..d4841c2 100644
--- a/code/unix/linux_qgl.c
+++ b/code/unix/linux_qgl.c
@@ -2651,6 +2651,24 @@ void QGL_Shutdown( void )
{
if ( glw_state.OpenGLLib )
{
+ // 25/09/05 Tim Angus <tim@ngus.net>
+ // Certain combinations of hardware and software, specifically
+ // Linux/SMP/Nvidia/agpgart (OK, OK. MY combination of hardware and
+ // software), seem to cause a catastrophic (hard reboot required) crash
+ // when libGL is dynamically unloaded. I'm unsure of the precise cause,
+ // suffice to say I don't see anything in the Q3 code that could cause it.
+ // I suspect it's an Nvidia driver bug, but without the source or means to
+ // debug I obviously can't prove (or disprove) this. Interestingly (though
+ // perhaps not suprisingly), Enemy Territory and Doom 3 both exhibit the
+ // same problem.
+ //
+ // After many, many reboots and prodding here and there, it seems that a
+ // placing a short delay before libGL is unloaded works around the problem.
+ // This delay is changable via the r_GLlibCoolDownMsec cvar (nice name
+ // huh?), and it defaults to 0. For me, 500 seems to work.
+ if( r_GLlibCoolDownMsec->integer )
+ usleep( r_GLlibCoolDownMsec->integer * 1000 );
+
dlclose ( glw_state.OpenGLLib );
glw_state.OpenGLLib = NULL;
}