Skip to content

Draft: state_tracker: don't always bail for surfaces images in st_finalize_texture

Antonino Maniscalco requested to merge antonino/mesa:mipmapgen_fix into main

This function should not reallocate surface images, however it should still perform the copy between st and pipe images when no allocation is needed even for surface images since st_generate_mipmap relies on this.

Don't bail early if not reallocating.

Without this patch calling glGenerateMipmaps will correctly reallocate the pipe texture before the call to st_finalize_texture but data won't be copied into it so the image contents become uninitialized.

I'm not sure of the interaction between this and 8d20c660 and 639d0f73

Edited by Antonino Maniscalco

Merge request reports