From: Zebediah Figura zfigura@codeweavers.com
GL_MAP_WRITE_BIT does not mean that the buffer will be filled, unless an INVALIDATE bit is explicitly set. The application is free to partially update the buffer, even if it does not read from it.
Thanks to Aida JonikienÄ— for doing most of the debugging here.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55045 --- dlls/opengl32/unix_wgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index e58e5b5d9b5..92a77b78f18 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1827,7 +1827,7 @@ static NTSTATUS wow64_map_buffer( TEB *teb, GLint buffer, GLenum target, void *p { if (*ret) /* wow64 pointer provided, map buffer to it */ { - if (access & GL_MAP_READ_BIT) + if (!(access & (GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT))) { TRACE( "Copying %#zx from buffer at %p to wow64 buffer %p\n", size, ptr, UlongToPtr(*ret) ); memcpy( UlongToPtr(*ret), ptr, size );