I should've pushed this shortly after the workaround for the WineD3D WoW64 graphics corruption got upstreamed (which I discovered when messing around) but never got around to MR anything in Wine.
The copies of mapped buffers introduce significant performance overhead (I'll add a FIXME so that people don't get surprised when their old games run like a slideshow like for example NFS Most Wanted).
From: Aida Jonikienė aidas957@gmail.com
I should've pushed this shortly after the workaround for the WineD3D WoW64 graphics corruption got upstreamed (which I discovered when messing around) but never got around to MR anything in Wine.
The copies of mapped buffers introduce significant performance overhead (I'll add a FIXME so that people don't get surprised when their old games run like a slideshow like for example NFS Most Wanted). --- dlls/opengl32/unix_wgl.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index e03bbc0a9c0..c376c5cd14d 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1855,10 +1855,15 @@ static void unmap_named_buffer( TEB *teb, GLint buffer ) static NTSTATUS wow64_map_buffer( TEB *teb, GLint buffer, GLenum target, void *ptr, SIZE_T size, GLbitfield access, PTR32 *ret ) { + static unsigned int once; + if (*ret) /* wow64 pointer provided, map buffer to it */ { if (!(access & (GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT))) { + if (!once++) + FIXME( "Doing a copy of a mapped buffer (expect performance issues)!\n" ); + TRACE( "Copying %#zx from buffer at %p to wow64 buffer %p\n", size, ptr, UlongToPtr(*ret) ); memcpy( UlongToPtr(*ret), ptr, size ); }
I think you could strip the commit description, or at least make it more concise and only keep something like:
`The copies of mapped buffers introduce significant performance overhead`
This merge request was approved by Rémi Bernon.