On Mon Jan 6 16:11:53 2025 +0000, Paul Gofman wrote:
Well, the sequence is important: glFinish() should be called before NtGdiStretchBlt() in present_gl_drawable (so the GL really completes its part before we are trying to blit from its result). At the same time, calling before present_gl_drawable would inject unneeded and performance impacting glFinish on the normal path without offscreen blit. ... or otherwise it needs this logic from present_gl_drawable() to be factored out in a separate function:
if (!gl) return;
switch (gl->type)
{
case DC_GL_PIXMAP_WIN: drawable = gl->pixmap; break;
case DC_GL_CHILD_WIN: drawable = gl->window; break;
default: drawable = 0; break;
}
if (!drawable) return;
Which would essentially mean reverting 73453e9442fea9fffcbba6bde49c0931f05579df , but it seems to me even with the extra flag avoiding repeating all of that in 3 functions is better? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7094#note_91476