Possible regression in SDL_RenderFlush

I haven’t got a testcase for this because it’s quite tricky to create one, but I’m seeing a different behavior in SDL 2.0.18 compared with SDL 2.0.16 which I’m suspicious is related to SDL_RenderFlush().

In my app I mix SDL2 calls with direct OpenGL calls (specifically so I can call glLogicOp() to achieve OR, AND and XOR plotting). Because of batching I call SDL_RenderFlush() before and after every non-standard rendering operation; I was assured this was legitimate. So typically:

SDL_RenderDrawLine(renderer, x1, y1, x2, y2);

This works as expected in SDL 2.0.16 and earlier, but in SDL 2.0.18 I’m seeing some lines drawn, apparently, with the wrong logical operation. This could be explained if SDL_RenderFlush() is no longer working as intended (for example if it’s been affected by the SDL_RenderDrawLine() fixes).

Can anybody shed any light on this, and perhaps suggest a workaround, because my app is currently broken in SDL 2.0.18.

On further investigation it looks like the regression is far more fundamental: running with OpenGL in Windows, SDL 2.0.18 seems to have reverted to drawing horizontal lines with the end-point not plotted at all! So for example:

SDL_RenderDrawLine(renderer, 200, 300, 300, 300);

Seems not to be drawing the point 300,300 when run with OpenGL in Windows. :frowning_face: