http://bugs.winehq.org/show_bug.cgi?id=22478
--- Comment #20 from Roderick Colenbrander thunderbird2k@gmail.com 2010-04-30 12:52:32 --- Just for testing I added a patch to fix the shader compile issue the nvidia drivers report errors about. When using that patch in combination with the stretch_rect_fbo patch I get the same performance with and without the ClearSurface patch, so I must have used that patch (better call it hack since it renamed tmp0.xyz in the shader to tmp0.xy) when I did the performance testing.
I haven't had that much time yet to investigate the performance issue but it at least seems to be related to context_attach_surface_fbo. I moved the context_fbo bind, context_attach_surface_fbo and an unbind line to the end of the function, so it wouldn't affect rendering and it caused a similar performance drop, so it might be this one. I haven't investigated it more yet.