Skip to content

cogl: Ensure rendering to a texture gets glFlush before glGenerateMipmap

Daniel van Vugt requested to merge vanvugt/mutter:flush-harder-pre-mipmap into main

_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):

Related to: #2354 (closed)

Edited by Daniel van Vugt

Merge request reports