drisw: fix drawing to GL_FRONT after SwapBuffers

Peter Harris requested to merge peterh/mesa:main into main

The drisw_copy_to_front function copies the back buffer to the user's display, but it does not copy the back buffer to drisw's front buffer. This results in incorrect drawing if an application draws to GL_FRONT on a double-buffered visual. Swap the drisw front and back texture pointers to fix this problem.

This is fast (because it's only swapping pointers), but it is incorrect if GLX_SWAP_COPY_OML is set. (AFAIK most (all?) swrast users set GLX_SWAP_UNDEFINED_OML, so this should be an improvement on the status quo).

Signed-off-by: Peter Harris pharris@opentext.com

Merge request reports