cogl: Ensure rendering to a texture gets glFlush before glGenerateMipmap
_cogl_texture_flush_journal_rendering
is optimized to avoid glFlushing
the driver. That's fine for most cases but insufficient if it's followed
by a driver call like texture_2d_generate_mipmap
(glGenerateMipmap
).
So in some cases we were generating mipmaps from an uninitialized texture.
This fixes mipmap corruption observed on Xilinx (Mali): https://github.com/Xilinx/mali-userspace-binaries/issues/3
Related to: #2354 (closed)
Edited by Daniel van Vugt