Hello,
Orcs must die 2 is running quite slowly on my computer (noticable lag, but there is no FPS counter).
I have decided to profile, with sysprof and compilation changes.
It appears that memcpy is taking almost 20% of CPU time.
When compiling with -O2 (and -fno-omit-frame-pointer), sysprof says memcpy is called from wined3d_buffer_unmap.
In -O0, memcpy is still number 1 CPU eater, but called from wined3d_buffer_preload, in sysprof.
Removing memcpy call on line 727 (wine 1.5.10), call is memcpy(map + start, This->resource.allocatedMemory + start, len);
improves performance, and as expected shows some screen corruption.
The wierd thing, is that removing the wined3d_buffer_unmap function, with a return right at the beginning does not break the game, and speeds up.
Could someone tell me what all those bufer related functions should do? There may be some optimizations.