GPU Flush (TYVM Baldur)

aChallenged1

Active Member
GPU Flush (TYVM Baldur) & Cr4zyB4rd

Thanks to Baldur for this little script.

Code:
function main()
{
  do
    {
      if ${Display.TextureMem} < 128
	  VGExecute /flush
      wait 150
    }
  while 1
}
I simply made it into a script instead of a snippet of a script. Great for those who have issues with CTD after running through a lot of zones. Won't help in all cases, but should help in many.

No warranty provided. Use at your own risk (I do!).
 
Last edited:

Baldur

Active Member
Glad to see you made it a script :)

For those who might have questions - just replace the "250" with however much GPU ram you have, divided by two. I find that to be a pretty safe number.

So, I have 512 megs of gpu ram... i want the script to flush at 250 megs. Works great and lets the bot run lag free for long periods of time.
 

Cr4zyb4rd

Active Member
After playing the game a bit it's obvious that their caching and UI management in general is just horribly broken. But surely dumping everything at Mem/2 (especially every 10th of a second, the way aC's script tries) is way too aggressive...at that rate I might as well just install a card with half as much RAM.

I'd suggest opening the IS console and echoing TextureMem while you fiddle around and open/close various windows, to see what's actually going on. I expect it varies wildly depending on various game engine settings, as well what card/drivers you're using and how well they support the various texture blitting/compressing/scaling/etc features the engine might be using. Try to keep track of the largest jump you see...if you have 150 one minute and 50 the next, that tells you you're probably going to want at least 100 free at any given time.

If you use a script like aC's above, set the wait to something a bit more reasonable...at least a few seconds in between checks. Flushing 6 times while a slow-to-open window is still popping up isn't going to buy you anything, it's more likely to hurt. I'd even consider a sub-loop that waits a few seconds once it detects things getting low, to make sure it stays that way for a bit...the game could just be in the middle of one of it's own garbage collection routines and/or swapping things around to reduce fragmentation.
 

aChallenged1

Active Member
Anything called a "script" should be a ISS file, e.g. gpuflush.iss in this case. Though I simply call it gpuf.iss and it goes in the scripts directory.
 
Top Bottom