As most Wine users probably know, running applications using Wine won't (in most cases) give you the same performance as running the application in native Windows. From my experience this is especially true when it comes to applications that make use of Direct3D, and I suppose the performance drop is (at least in part) due to the translation of Direct3D to OpenGL in Wine. Now, this got me thinking, could one gain performance by intentionally disabling functionality in Wine? Let's say for example that some D3D function that's translated to the corresponding OGL function gives you a drop in performance. Would simply dropping the translation of those D3D functions in Wine give you a performance boost? I'm no experienced programmer and I know this would pretty much go against the purpose of Wine, but would it actually work for the single user who's already tweaked everything else and still would like to see better performance to the price of some functionality?
Sure, you could do that. But it might cause unwanted effects, like game not functioning at all or so. Since the program code detects if certain tasks succeeded or so, and you can't really lie to them cause it's still trying to handle the resources.
James_Huk
2011-May-16 20:10 UTC
[Wine] Re: Gaining performance by disabling functionality?
@Das Letzte Einhorn: Keep in mind that wine compiled that way will NOT WORK with many (most?) applications, wined3d should work but not wine as a whole. I usually copy wined3d.dll.so from it and use "O2" for the rest. That way I can use optimized wined3d for any game desired (just paste it in the game folder and rename it to wined3d.dll), and still keep compatibility.
Frédéric Delanoy
2011-May-16 22:17 UTC
[Wine] Gaining performance by disabling functionality?
On Mon, May 16, 2011 at 21:49, Cloudef <wineforum-user at winehq.org> wrote:> >> My compile script for git looks like this. Where do I put the -O3 option you suggested? > > CFLAGS="-O3"Be aware that -O3 option can cause some problems for certain programs (e.g. regarding integer overflow behaviour), but YMMV See http://www.pubbs.net/201007/gcc/34944-re-how-safe-is-gcc-o3-.html for a quick explanation.
Just found that using UseGLSL = disabled seems to be 5-10 fps faster with a number of games (The Witcher, The Last Remnant, Vampire Masquerade: Bloodlines), with no graphical deficiencies that I can see. And this was with very demanding areas; the fps increase will probably be even greater in less demanding scenes. I remember this would force DX7 level graphics on Half-Life 2 back in the day, but did not know that it can be used with newer games. It also is the only way to get Witcher 2 to work properly at the moment.