From 3bbbd3e72734db6d3fab829bb5c51ecd7d4a24ce Mon Sep 17 00:00:00 2001 From: David Reveman Date: Mon, 20 Mar 2006 18:32:25 +0000 Subject: [PATCH] Add workaround for xgl being unresponsive on high CPU load --- ChangeLog | 4 ++++ hw/xgl/xglinit.c | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 411184fc1..70c5b0cde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-03-20 David Reveman + * hw/xgl/xglinit.c: Add workaround for xgl being unresponsive on + nvidia's driver when something that consumes a lot of CPU is running + in the background. + * hw/xgl/glxext/xglglxext.c: Update for rendering to FBOs. Adjust clipping and draw/read offsets when FBO is bound. Lookup texture and renderbuffer objects when attaching. Fix diff --git a/hw/xgl/xglinit.c b/hw/xgl/xglinit.c index 3d93c46cc..dd0e6b0f6 100644 --- a/hw/xgl/xglinit.c +++ b/hw/xgl/xglinit.c @@ -331,6 +331,21 @@ OsVendorInit (void) (*__ddxFunc.osVendorInit) (); } -void ddxInitGlobals() +void +ddxInitGlobals (void) { } + +#if 1 + +/* nvdia's driver seem to be abusing sched_yield and it is causing + xgl to be very unresponsive if something that consumes a lot of CPU + is running in the background. having this empty implementation of + sched_yield here is an ugly workaround that seem to make things + work a lot better. */ +void +sched_yield (void) +{ +} + +#endif