Commit 77981d45 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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
parent 1fca47b7
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment