performance issue when OffscreenRenderingMode = "pbuffer"

Roderick Colenbrander thunderbird2k at gmx.net
Sun Jan 25 04:28:56 CST 2009


> I tried to play Supreme Commander using pbuffer option instead of fbo. I 
> was quite happy with it, since I gained quite a bunch of performance (I 
> mean, something I really COULD see), but after a while, the performance 
> dropped dramatically, to ~4-5 fps.
> 
> I tested quite a few thing, and I finally found that pixel bufers were 
> not taken in account when calculating available texture memory. The game 
> then allocated more textures, and good opengl didn't dare complain when 
> putting them in system memory.
> 
> Attached is a patch which should solve the problem.
> 
> For those who are curious, try setting VideoMemorySize to 200 instead of 
> 256. It works just like a charm.
> 

I think the basic idea of the patch is good but the calculation itself should take into account double buffering. In wine we don't use double buffering on pbuffers but we might be receiving a WGL pixel format which uses double buffering, so in that case the amount of video memory would be a factor 2 too low.

Something like this would give you the double buffering capability from a d3d device:
This->adapter->cfgs[iPixelFormat]->doubleBuffer

Roderick
-- 
NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a



More information about the wine-devel mailing list