Module: wine Branch: master Commit: 77981d45488d2d4458b90eee5e8acb7a17e84100 URL: https://gitlab.winehq.org/wine/wine/-/commit/77981d45488d2d4458b90eee5e8acb7...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Jul 13 18:01:28 2023 -0500
opengl32: Copy to the wow64 buffer even for write maps.
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 );