http://bugs.winehq.org/show_bug.cgi?id=23765
Summary: Fraps cannot measure FPS Product: Wine Version: 1.2 Platform: x86 URL: http://www.fraps.com/setup.exe OS/Version: Linux Status: NEW Keywords: download Severity: minor Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Long standing bug, afaik, but Fraps can't measure fps. While many games have their own fps measuring option, some don't, and others make it hard to find. Under wine, you can get reasonably close with WINEDEBUG=+fps, but for a full screen app, or when you only want to measure a certain scene, this can be a PITA.
Easy demo: download/install Fraps (http://www.fraps.com/setup.exe) download/install 3dMark2001 (http://www.majorgeeks.com/download.php?det=99) run fraps (wine C:\fraps\fraps.exe) run 3dmark2001, and press 'F11'.
expected result: fps display in top left actual result: no fps in top left
http://bugs.winehq.org/show_bug.cgi?id=23765
--- Comment #1 from Austin English austinenglish@gmail.com 2013-08-20 21:07:56 CDT --- Still in wine-1.7.0-114-g73aef40
http://bugs.winehq.org/show_bug.cgi?id=23765
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |levanchelidze@gmail.com
--- Comment #2 from Stefan Dösinger stefan@codeweavers.com --- *** Bug 32949 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=23765
--- Comment #3 from Stefan Dösinger stefan@codeweavers.com --- I investigated this problem. Fraps mostly works for OpenGL applications. For d3d-based apps there are a number of problems:
1) IDirect3DDevice9::PresentEx, IDirect3DSwapChain8::Present, IDirectDrawSurface::Unlock/Blt/Flip need DECLSPEC_HOTPATCH. This is fairly easy to fix.
2) Fraps assumes that IDirect3DDevice8::Present calls IDirect3DSwapChain8::Present. Fixable. It also assumes that IDirectDrawSurface7 calls back to DirectDrawSurface1 rather than the other way around. Also fixable, but needs some more checks.
3) Fraps assumes that the offset of functions inside ddraw, d3d8 and d3d9 is constant. It calculates IDirect3DSwapChain9::Present - d3d9_handle in its main process, sends this address to the injection DLL inside the client app and hooks client_d3d9_handle + offset.
The last problem is tricky to fix. A workaround is to give ddraw, d3d8 and d3d9 (and later on d3d10 and d3d11) fixed load addresses. Alexandre already said no to this approach.
Another workaround might be to use the offset between IDirect3DCreate9 and hooked functions. This is something the Fraps maintainers have to do though. I have suggested this idea to them. I guess it isn't a guarantee either, but more likely to work because both address are in the code area of the d3d9 binary.
https://bugs.winehq.org/show_bug.cgi?id=23765
jre.winesim@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jre.winesim@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=23765
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #4 from joaopa jeremielapuree@yahoo.fr --- Still a bug in current wine?
https://bugs.winehq.org/show_bug.cgi?id=23765
--- Comment #5 from Austin English austinenglish@gmail.com --- (In reply to joaopa from comment #4)
Still a bug in current wine?
Still in wine-2.4-55-g5b4f8a3